umap-project 1.14.0a5__py3-none-any.whl → 2.0.0a1__py3-none-any.whl

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.

Potentially problematic release.


This version of umap-project might be problematic. Click here for more details.

Files changed (216) hide show
  1. umap/__init__.py +1 -1
  2. umap/decorators.py +0 -14
  3. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/br/LC_MESSAGES/django.po +137 -85
  5. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/cs_CZ/LC_MESSAGES/django.po +136 -84
  7. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/el/LC_MESSAGES/django.po +136 -84
  9. umap/locale/en/LC_MESSAGES/django.po +128 -88
  10. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  11. umap/locale/es/LC_MESSAGES/django.po +136 -84
  12. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  13. umap/locale/fr/LC_MESSAGES/django.po +131 -91
  14. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  15. umap/locale/hu/LC_MESSAGES/django.po +137 -85
  16. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  17. umap/locale/it/LC_MESSAGES/django.po +136 -84
  18. umap/locale/ms/LC_MESSAGES/django.mo +0 -0
  19. umap/locale/ms/LC_MESSAGES/django.po +136 -84
  20. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  21. umap/locale/pl/LC_MESSAGES/django.po +136 -84
  22. umap/locale/sv/LC_MESSAGES/django.mo +0 -0
  23. umap/locale/sv/LC_MESSAGES/django.po +135 -83
  24. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  25. umap/locale/zh_TW/LC_MESSAGES/django.po +143 -91
  26. umap/models.py +23 -1
  27. umap/settings/__init__.py +1 -4
  28. umap/settings/base.py +1 -0
  29. umap/static/umap/base.css +5 -0
  30. umap/static/umap/content.css +185 -13
  31. umap/static/umap/favicons/icon.svg +2 -2
  32. umap/static/umap/img/edit.svg +3 -3
  33. umap/static/umap/img/icon-delete.svg +4 -0
  34. umap/static/umap/img/icon-download.svg +13 -0
  35. umap/static/umap/img/icon-duplicate.svg +5 -0
  36. umap/static/umap/img/icon-edit.svg +12 -0
  37. umap/static/umap/img/icon-share.svg +11 -0
  38. umap/static/umap/img/icon-view.svg +12 -0
  39. umap/static/umap/img/logo.svg +2 -2
  40. umap/static/umap/img/logo_small.svg +2 -2
  41. umap/static/umap/img/marker.svg +4 -0
  42. umap/static/umap/img/opensource.svg +2 -2
  43. umap/static/umap/img/osm.svg +2 -2
  44. umap/static/umap/js/components/fragment.js +1 -1
  45. umap/static/umap/js/modules/browser.js +159 -0
  46. umap/static/umap/js/modules/global.js +3 -1
  47. umap/static/umap/js/modules/request.js +155 -0
  48. umap/static/umap/js/umap.autocomplete.js +28 -38
  49. umap/static/umap/js/umap.controls.js +73 -58
  50. umap/static/umap/js/umap.core.js +4 -9
  51. umap/static/umap/js/umap.datalayer.permissions.js +13 -12
  52. umap/static/umap/js/umap.features.js +51 -49
  53. umap/static/umap/js/umap.forms.js +19 -19
  54. umap/static/umap/js/umap.icon.js +17 -17
  55. umap/static/umap/js/umap.importer.js +2 -1
  56. umap/static/umap/js/umap.js +242 -291
  57. umap/static/umap/js/umap.layer.js +173 -141
  58. umap/static/umap/js/umap.permissions.js +24 -25
  59. umap/static/umap/js/umap.popup.js +14 -14
  60. umap/static/umap/js/umap.share.js +4 -4
  61. umap/static/umap/js/umap.slideshow.js +4 -4
  62. umap/static/umap/js/umap.tableeditor.js +2 -2
  63. umap/static/umap/js/umap.ui.js +1 -1
  64. umap/static/umap/locale/am_ET.js +1 -11
  65. umap/static/umap/locale/am_ET.json +1 -11
  66. umap/static/umap/locale/ar.js +1 -11
  67. umap/static/umap/locale/ar.json +1 -11
  68. umap/static/umap/locale/ast.js +1 -11
  69. umap/static/umap/locale/ast.json +1 -11
  70. umap/static/umap/locale/bg.js +1 -11
  71. umap/static/umap/locale/bg.json +1 -11
  72. umap/static/umap/locale/br.js +1 -11
  73. umap/static/umap/locale/br.json +1 -11
  74. umap/static/umap/locale/ca.js +1 -11
  75. umap/static/umap/locale/ca.json +1 -11
  76. umap/static/umap/locale/cs_CZ.js +1 -11
  77. umap/static/umap/locale/cs_CZ.json +1 -11
  78. umap/static/umap/locale/da.js +1 -11
  79. umap/static/umap/locale/da.json +1 -11
  80. umap/static/umap/locale/de.js +1 -11
  81. umap/static/umap/locale/de.json +1 -11
  82. umap/static/umap/locale/el.js +1 -11
  83. umap/static/umap/locale/el.json +1 -11
  84. umap/static/umap/locale/en.js +1 -11
  85. umap/static/umap/locale/en.json +1 -11
  86. umap/static/umap/locale/en_US.json +1 -11
  87. umap/static/umap/locale/es.js +1 -11
  88. umap/static/umap/locale/es.json +1 -11
  89. umap/static/umap/locale/et.js +1 -11
  90. umap/static/umap/locale/et.json +1 -11
  91. umap/static/umap/locale/fa_IR.js +6 -16
  92. umap/static/umap/locale/fa_IR.json +6 -16
  93. umap/static/umap/locale/fi.js +1 -11
  94. umap/static/umap/locale/fi.json +1 -11
  95. umap/static/umap/locale/fr.js +1 -11
  96. umap/static/umap/locale/fr.json +1 -11
  97. umap/static/umap/locale/gl.js +1 -11
  98. umap/static/umap/locale/gl.json +1 -11
  99. umap/static/umap/locale/he.js +1 -11
  100. umap/static/umap/locale/he.json +1 -11
  101. umap/static/umap/locale/hr.js +1 -11
  102. umap/static/umap/locale/hr.json +1 -11
  103. umap/static/umap/locale/hu.js +1 -11
  104. umap/static/umap/locale/hu.json +1 -11
  105. umap/static/umap/locale/id.js +1 -11
  106. umap/static/umap/locale/id.json +1 -11
  107. umap/static/umap/locale/is.js +1 -11
  108. umap/static/umap/locale/is.json +1 -11
  109. umap/static/umap/locale/it.js +1 -11
  110. umap/static/umap/locale/it.json +1 -11
  111. umap/static/umap/locale/ja.js +1 -11
  112. umap/static/umap/locale/ja.json +1 -11
  113. umap/static/umap/locale/ko.js +1 -11
  114. umap/static/umap/locale/ko.json +1 -11
  115. umap/static/umap/locale/lt.js +1 -11
  116. umap/static/umap/locale/lt.json +1 -11
  117. umap/static/umap/locale/ms.js +1 -11
  118. umap/static/umap/locale/ms.json +1 -11
  119. umap/static/umap/locale/nl.js +1 -11
  120. umap/static/umap/locale/nl.json +1 -11
  121. umap/static/umap/locale/no.js +1 -11
  122. umap/static/umap/locale/no.json +1 -11
  123. umap/static/umap/locale/pl.js +1 -11
  124. umap/static/umap/locale/pl.json +1 -11
  125. umap/static/umap/locale/pl_PL.json +1 -11
  126. umap/static/umap/locale/pt.js +1 -11
  127. umap/static/umap/locale/pt.json +1 -11
  128. umap/static/umap/locale/pt_BR.js +1 -11
  129. umap/static/umap/locale/pt_BR.json +1 -11
  130. umap/static/umap/locale/pt_PT.js +1 -11
  131. umap/static/umap/locale/pt_PT.json +1 -11
  132. umap/static/umap/locale/ro.js +1 -11
  133. umap/static/umap/locale/ro.json +1 -11
  134. umap/static/umap/locale/ru.js +1 -11
  135. umap/static/umap/locale/ru.json +1 -11
  136. umap/static/umap/locale/sk_SK.js +1 -11
  137. umap/static/umap/locale/sk_SK.json +1 -11
  138. umap/static/umap/locale/sl.js +1 -11
  139. umap/static/umap/locale/sl.json +1 -11
  140. umap/static/umap/locale/sr.js +1 -11
  141. umap/static/umap/locale/sr.json +1 -11
  142. umap/static/umap/locale/sv.js +1 -11
  143. umap/static/umap/locale/sv.json +1 -11
  144. umap/static/umap/locale/th_TH.js +1 -11
  145. umap/static/umap/locale/th_TH.json +1 -11
  146. umap/static/umap/locale/tr.js +1 -11
  147. umap/static/umap/locale/tr.json +1 -11
  148. umap/static/umap/locale/uk_UA.js +1 -11
  149. umap/static/umap/locale/uk_UA.json +1 -11
  150. umap/static/umap/locale/vi.js +1 -11
  151. umap/static/umap/locale/vi.json +1 -11
  152. umap/static/umap/locale/vi_VN.json +1 -11
  153. umap/static/umap/locale/zh.js +1 -11
  154. umap/static/umap/locale/zh.json +1 -11
  155. umap/static/umap/locale/zh_CN.json +1 -11
  156. umap/static/umap/locale/zh_TW.Big5.json +1 -11
  157. umap/static/umap/locale/zh_TW.js +17 -27
  158. umap/static/umap/locale/zh_TW.json +17 -27
  159. umap/static/umap/map.css +2 -2
  160. umap/static/umap/nav.css +2 -1
  161. umap/static/umap/test/.eslintrc +0 -1
  162. umap/static/umap/test/Choropleth.js +29 -27
  163. umap/static/umap/test/DataLayer.js +207 -239
  164. umap/static/umap/test/Feature.js +33 -58
  165. umap/static/umap/test/Map.Export.js +11 -11
  166. umap/static/umap/test/Map.js +66 -67
  167. umap/static/umap/test/Marker.js +36 -32
  168. umap/static/umap/test/Polygon.js +95 -95
  169. umap/static/umap/test/Polyline.js +31 -31
  170. umap/static/umap/test/TableEditor.js +29 -25
  171. umap/static/umap/test/_pre.js +2 -7
  172. umap/static/umap/test/index.html +4 -4
  173. umap/storage.py +2 -0
  174. umap/templates/auth/user_form.html +3 -2
  175. umap/templates/base.html +1 -0
  176. umap/templates/registration/login.html +51 -36
  177. umap/templates/umap/about_summary.html +1 -1
  178. umap/templates/umap/branding.html +3 -0
  179. umap/templates/umap/content.html +15 -39
  180. umap/templates/umap/header.html +0 -0
  181. umap/templates/umap/home.html +4 -2
  182. umap/templates/umap/js.html +0 -2
  183. umap/templates/umap/map_detail.html +9 -0
  184. umap/templates/umap/map_init.html +1 -1
  185. umap/templates/umap/map_messages.html +4 -2
  186. umap/templates/umap/map_table.html +130 -69
  187. umap/templates/umap/navigation.html +2 -4
  188. umap/templates/umap/user_dashboard.html +29 -6
  189. umap/tests/base.py +1 -1
  190. umap/tests/integration/conftest.py +18 -0
  191. umap/tests/integration/test_anonymous_owned_map.py +6 -3
  192. umap/tests/integration/test_browser.py +166 -6
  193. umap/tests/integration/test_collaborative_editing.py +23 -5
  194. umap/tests/integration/test_dashboard.py +17 -0
  195. umap/tests/integration/test_edit_datalayer.py +4 -3
  196. umap/tests/integration/test_export_map.py +1 -1
  197. umap/tests/integration/test_import.py +9 -4
  198. umap/tests/integration/test_map.py +64 -0
  199. umap/tests/integration/test_map_preview.py +75 -0
  200. umap/tests/integration/test_owned_map.py +11 -25
  201. umap/tests/integration/test_picto.py +3 -3
  202. umap/tests/integration/test_querystring.py +52 -0
  203. umap/tests/integration/test_share.py +22 -0
  204. umap/tests/test_map_views.py +157 -14
  205. umap/tests/test_views.py +50 -11
  206. umap/urls.py +6 -12
  207. umap/views.py +170 -47
  208. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/METADATA +13 -15
  209. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/RECORD +212 -200
  210. umap/static/umap/js/umap.browser.js +0 -148
  211. umap/static/umap/js/umap.xhr.js +0 -304
  212. umap/static/umap/test/Controls.js +0 -100
  213. umap/static/umap/test/Map.Init.js +0 -46
  214. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/WHEEL +0 -0
  215. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/entry_points.txt +0 -0
  216. {umap_project-1.14.0a5.dist-info → umap_project-2.0.0a1.dist-info}/licenses/LICENSE +0 -0
@@ -37,6 +37,21 @@ input:-moz-placeholder, :-moz-placeholder {
37
37
  /* **************** */
38
38
  /* Login icons */
39
39
  /* **************** */
40
+ body.login {
41
+ width: 320px;
42
+ margin: auto;
43
+ text-align: center;
44
+ }
45
+ body.login header {
46
+ display: flex;
47
+ justify-content: center;
48
+ }
49
+ .login-grid {
50
+ display: grid;
51
+ justify-content: space-between;
52
+ grid-gap: 5px;
53
+ grid-template-columns: repeat(auto-fill,92px);
54
+ }
40
55
  .login-grid li,
41
56
  .login-grid a {
42
57
  display: inline-block;
@@ -131,14 +146,25 @@ h2.section {
131
146
  text-transform: uppercase;
132
147
  color: #666;
133
148
  text-align: center;
149
+ }
150
+ h2.tabs {
151
+ text-transform: uppercase;
152
+ color: #263B58;
153
+ text-align: left;
134
154
  padding-top: 28px;
135
155
  }
136
156
  h2.tabs a {
137
- color: #666;
157
+ color: #263B58;
158
+ text-decoration: underline;
159
+ text-decoration-thickness: 3px;
160
+ text-decoration-skip-ink: none;
161
+ margin-right: 2rem;
138
162
  }
139
163
  h2.tabs a:not(.selected) {
140
164
  font-weight: normal;
141
- color: #666;
165
+ color: #263B58;
166
+ text-decoration: none;
167
+ margin-right: 0;
142
168
  }
143
169
  h2.tabs a:hover {
144
170
  text-decoration: underline;
@@ -177,8 +203,11 @@ body.content #umap-ui-container {
177
203
 
178
204
  input[type="submit"],
179
205
  .button {
180
- background-color: #79c1c0;
181
- color: #323737;
206
+ background-color: #B9F5D2;
207
+ color: #263B58;
208
+ }
209
+ .button-primary {
210
+ font-weight: bold;
182
211
  }
183
212
  .wrapper input[type="submit"]:hover {
184
213
  background-color: #689191;
@@ -295,28 +324,169 @@ ul.umap-autocomplete {
295
324
  /* **************************** */
296
325
  /* Dashboard */
297
326
  /* **************************** */
298
- table.maps {
327
+ /* https://kittygiraudel.com/2020/12/03/a11y-advent-hiding-content/ */
328
+ .sr-only {
329
+ border: 0 !important;
330
+ clip: rect(1px, 1px, 1px, 1px) !important;
331
+ -webkit-clip-path: inset(50%) !important;
332
+ clip-path: inset(50%) !important;
333
+ height: 1px !important;
334
+ overflow: hidden !important;
335
+ margin: -1px !important;
336
+ padding: 0 !important;
337
+ position: absolute !important;
338
+ width: 1px !important;
339
+ white-space: nowrap !important;
340
+ }
341
+ /* https://kittygiraudel.com/2020/12/06/a11y-advent-skip-to-content/ */
342
+ .sr-only.sr-only--focusable:focus,
343
+ .sr-only.sr-only--focusable:active {
344
+ clip: auto !important;
345
+ -webkit-clip-path: auto !important;
346
+ clip-path: auto !important;
347
+ height: auto !important;
348
+ overflow: visible !important;
349
+ width: auto !important;
350
+ white-space: normal !important;
351
+ }
352
+ .icon-dashboard {
353
+ display: inline-block;
354
+ height: 36px;
355
+ width: 36px;
356
+ margin: 3px;
357
+ }
358
+ .icon-view {
359
+ background-image: url('./img/icon-view.svg');
360
+ }
361
+ .icon-share {
362
+ background-image: url('./img/icon-share.svg');
363
+ }
364
+ .icon-edit {
365
+ background-image: url('./img/icon-edit.svg');
366
+ }
367
+ .icon-download {
368
+ background-image: url('./img/icon-download.svg');
369
+ }
370
+ .icon-duplicate {
371
+ background-image: url('./img/icon-duplicate.svg');
372
+ }
373
+ .icon-delete {
374
+ background-image: url('./img/icon-delete.svg');
375
+ }
376
+ .table-header {
377
+ display: flex;
378
+ justify-content: space-between;
379
+ align-items: flex-end;
380
+ margin-bottom: 1rem;
381
+ }
382
+ @media all and (max-width: 640px) {
383
+ .table-header {
384
+ flex-direction: column;
385
+ align-items: center;
386
+ gap: 1rem;
387
+ }
388
+ }
389
+ .table-header form {
390
+ display: flex;
391
+ align-items: flex-end;
392
+ }
393
+ @media all and (max-width: 640px) {
394
+ .table-header form {
395
+ flex-direction: column;
396
+ align-items: center;
397
+ }
398
+ }
399
+ .table-header form input {
400
+ border: 2px solid #263B58;
401
+ border-radius: 0;
402
+ padding: .5rem 1rem;
403
+ margin-bottom: 0;
404
+ line-height: inherit;
405
+ height: 40px;
406
+ }
407
+ .table-header form input[type="search"] {
408
+ width: 30ch;
409
+ }
410
+ .table-header form input[type="submit"] {
411
+ background-color: #263B58;
412
+ color: white;
413
+ font-weight: bold;
414
+ }
415
+
416
+ .table-header .button-download {
417
+ width: inherit;
418
+ display: inline;
419
+ padding: .5rem 1rem;
420
+ border: 2px solid #263B58;
421
+ color: #263B58;
422
+ font-weight: bold;
423
+ background-color: initial;
424
+ margin-bottom: 0;
425
+ line-height: 24px;
426
+ height: 40px;
427
+ }
428
+ .table-wrapper {
429
+ overflow-x: scroll;
430
+ }
431
+ .table-wrapper table {
299
432
  width: 100%;
433
+ min-width: 600px;
434
+ border-collapse: collapse;
300
435
  }
301
- table.maps .map_fragment {
436
+ .table-wrapper table .map_fragment {
302
437
  display: block;
303
438
  height: 80vh;
304
439
  width: 100%;
305
440
  }
306
- table.maps tbody tr:nth-child(odd) {
441
+ .table-wrapper table a,
442
+ .table-wrapper table thead {
443
+ color: #263B58;
444
+ }
445
+ .table-wrapper table thead th:last-of-type {
446
+ min-width: 240px;
447
+ }
448
+
449
+ .table-wrapper table a:not(.icon-link) {
450
+ text-decoration: underline;
451
+ }
452
+ .table-wrapper table button.map-icon {
453
+ padding: 0;
454
+ border: none;
455
+ background: transparent;
456
+ }
457
+ .table-wrapper table form {
458
+ display: inline;
459
+ }
460
+ .table-wrapper table input[type="submit"] {
461
+ display: inline;
462
+ background-color: transparent;
463
+ color: #263B58;
464
+ padding: 0;
465
+ width: inherit;
466
+ height: 1rem;
467
+ margin: 0;
468
+ line-height: inherit;
469
+ }
470
+ .table-wrapper table tbody tr {
471
+ border-bottom: 1px solid #BDC7D4;
472
+ }
473
+ .table-wrapper table tbody tr td {
474
+ padding: 5px 4px;
475
+ }
476
+ .table-wrapper table tbody tr:nth-child(odd) {
307
477
  background-color: #f4f4f4;
308
478
  }
309
- table.maps td {
479
+ .table-wrapper table td {
310
480
  text-align: center;
311
481
  }
312
- table.maps thead tr {
482
+ .table-wrapper table thead tr {
313
483
  line-height: 2em;
314
484
  }
315
- table.maps .button {
485
+ .table-wrapper table .button {
316
486
  margin-bottom: 2px;
317
487
  padding:4px 6px;
318
488
  height: 36px;
319
- line-height: 23px;
489
+ line-height: 26px;
320
490
  }
321
491
 
322
492
  /* **************************** */
@@ -342,12 +512,14 @@ dialog::backdrop {
342
512
  display: flex;
343
513
  flex-direction: row;
344
514
  justify-content: space-around;
345
- margin: 1rem;
346
- border-top: 1px solid gray;
347
515
  }
348
516
  .pagination > * {
349
517
  padding: 1rem;
350
518
  }
519
+ .pagination a {
520
+ color: #263B58;
521
+ text-decoration: underline;
522
+ }
351
523
 
352
524
 
353
525
  /* ************************************************* */
@@ -1,5 +1,5 @@
1
1
  <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
2
2
  <rect x=".3" y=".3" width="15.5" height="15.5" rx="7.8" fill="#F2F2F2" stroke="#F2F2F2" stroke-width=".5"/>
3
- <path d="M5.9 3.5A5 5 0 0 0 8 13C4.1 9.4 3.2 5 5.9 3.5ZM8 13a5 5 0 0 0 2.1-9.5C12.8 4.9 12 9.4 8 13Z" fill="#323E56"/>
4
- <path d="M9.9 5.6a1.9 1.9 0 1 1-3.8 0 1.9 1.9 0 0 1 3.8 0Z" fill="#323E56"/>
3
+ <path d="M5.9 3.5A5 5 0 0 0 8 13C4.1 9.4 3.2 5 5.9 3.5ZM8 13a5 5 0 0 0 2.1-9.5C12.8 4.9 12 9.4 8 13Z" fill="#263B58"/>
4
+ <path d="M9.9 5.6a1.9 1.9 0 1 1-3.8 0 1.9 1.9 0 0 1 3.8 0Z" fill="#263B58"/>
5
5
  </svg>
@@ -1,7 +1,7 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
- <path d="M128 64A64 64 0 1 1 0 64a64 64 0 0 1 128 0z" fill="#323e56"/>
3
- <path d="M94.3 17.3 86 25.5l16.4 16.3 8.1-8.2z" fill="#79c1c0"/>
2
+ <path d="M128 64A64 64 0 1 1 0 64a64 64 0 0 1 128 0z" fill="#263B58"/>
3
+ <path d="M94.3 17.3 86 25.5l16.4 16.3 8.1-8.2z" fill="#B9F5D2"/>
4
4
  <path d="m82 29.5-44.9 45 16.3 16.3 45-45z" fill="#fff"/>
5
- <path d="M37.1 74.5 24.8 103l28.6-12.3z" fill="#79c1c0"/>
5
+ <path d="M37.1 74.5 24.8 103l28.6-12.3z" fill="#B9F5D2"/>
6
6
  <text xml:space="preserve" style="line-height:125%" x="-37.8" y="977.1" font-size="157.6" font-weight="400" letter-spacing="0" word-spacing="0" font-family="Sans" transform="translate(0 -924.4)"/>
7
7
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <path d="M10.5 13h15M14.7 13v-1.7a1.7 1.7 0 0 1 1.6-1.6h3.4a1.7 1.7 0 0 1 1.6 1.6V13m2.5 0v11.7a1.7 1.7 0 0 1-1.6 1.6h-8.4a1.7 1.7 0 0 1-1.6-1.6V13h11.6ZM19.7 17.2v5M16.3 17.2v5" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <g clip-path="url(#a)" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
4
+ <path d="M19.7 10.5v3.3a.8.8 0 0 0 .8.9h3.3"/>
5
+ <path d="M22.2 25.5h-8.4a1.7 1.7 0 0 1-1.6-1.7V12.2a1.7 1.7 0 0 1 1.6-1.7h5.9l4.1 4.2v9.1a1.7 1.7 0 0 1-1.6 1.7ZM18 22.2v-5"/>
6
+ <path d="m16 20 2 2.2 2-2.1"/>
7
+ </g>
8
+ <defs>
9
+ <clipPath id="a">
10
+ <path fill="#fff" d="M8 8h20v20H8z"/>
11
+ </clipPath>
12
+ </defs>
13
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <path d="M24.7 15.5h-7.5c-1 0-1.7.7-1.7 1.7v7.5c0 .9.7 1.6 1.7 1.6h7.5c.9 0 1.6-.7 1.6-1.6v-7.5c0-1-.7-1.7-1.6-1.7Z" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M12.2 20.5h-.9a1.7 1.7 0 0 1-1.6-1.7v-7.5a1.7 1.7 0 0 1 1.6-1.6h7.5a1.7 1.7 0 0 1 1.7 1.6v.9" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <g clip-path="url(#a)" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
4
+ <path d="M13.8 13.8H13a1.7 1.7 0 0 0-1.7 1.7V23a1.7 1.7 0 0 0 1.7 1.7h7.5a1.7 1.7 0 0 0 1.7-1.7v-.8"/>
5
+ <path d="M25 13.5a1.8 1.8 0 0 0-2.5-2.5l-7 7v2.5H18l7-7ZM21.3 12.2l2.5 2.5"/>
6
+ </g>
7
+ <defs>
8
+ <clipPath id="a">
9
+ <path fill="#fff" d="M8 8h20v20H8z"/>
10
+ </clipPath>
11
+ </defs>
12
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <g clip-path="url(#a)" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
4
+ <path d="M10.5 18a2.5 2.5 0 1 0 5 0 2.5 2.5 0 0 0-5 0ZM20.5 13a2.5 2.5 0 1 0 5 0 2.5 2.5 0 0 0-5 0ZM20.5 23a2.5 2.5 0 1 0 5 0 2.5 2.5 0 0 0-5 0ZM15.3 17l5.4-3M15.3 19l5.4 3"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="a">
8
+ <path fill="#fff" d="M8 8h20v20H8z"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>
@@ -0,0 +1,12 @@
1
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36">
2
+ <path fill="#263B58" d="M0 0h36v36H0z"/>
3
+ <g clip-path="url(#a)" stroke="#fff" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
4
+ <path d="M16.3 18a1.7 1.7 0 1 0 3.4 0 1.7 1.7 0 0 0-3.4 0Z"/>
5
+ <path d="M25.5 18c-2 3.3-4.5 5-7.5 5s-5.5-1.7-7.5-5c2-3.3 4.5-5 7.5-5s5.5 1.7 7.5 5Z"/>
6
+ </g>
7
+ <defs>
8
+ <clipPath id="a">
9
+ <path fill="#fff" d="M8 8h20v20H8z"/>
10
+ </clipPath>
11
+ </defs>
12
+ </svg>
@@ -1,4 +1,4 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
- <path d="M36.5 6.2A64 64 0 0 0 64 128C14.5 81.8 3.1 24.8 36.5 6.2zM64 128A64 64 0 0 0 91.5 6.2c33.4 18.6 22 75.6-27.5 121.8z" fill="#323e56"/>
3
- <path d="M87.7 33.8a23.7 23.7 0 1 1-47.4 0 23.7 23.7 0 0 1 47.4 0z" fill="#323e56"/>
2
+ <path d="M36.5 6.2A64 64 0 0 0 64 128C14.5 81.8 3.1 24.8 36.5 6.2zM64 128A64 64 0 0 0 91.5 6.2c33.4 18.6 22 75.6-27.5 121.8z" fill="#263B58"/>
3
+ <path d="M87.7 33.8a23.7 23.7 0 1 1-47.4 0 23.7 23.7 0 0 1 47.4 0z" fill="#263B58"/>
4
4
  </svg>
@@ -3,8 +3,8 @@
3
3
  <sodipodi:namedview id="namedview17" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:showpageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="22.25" inkscape:cx="12.94382" inkscape:cy="17.325843" inkscape:window-width="1920" inkscape:window-height="1019" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="svg15" />
4
4
  <rect x="0" y="0" width="35" height="35" rx="17.5" fill="#f2f2f2" stroke="#F2F2F2" stroke-width="0.5" id="rect2" style="stroke:none" />
5
5
  <g clip-path="url(#clip0_217_11335)" id="g8" transform="translate(0.09990314,-0.7800653)">
6
- <path d="m 12.2438,6.86133 c -2.46004,1.16961 -4.44899,3.14137 -5.63988,5.59127 -1.19088,2.4498 -1.51282,5.232 -0.9129,7.8891 0.59991,2.6571 2.08599,5.031 4.21394,6.7315 2.12794,1.7005 4.77114,2.6265 7.49514,2.6256 -9.28126,-8.6625 -11.41876,-19.35 -5.1563,-22.83747 z m 5.1563,22.83747 c 2.724,9e-4 5.3672,-0.9251 7.4951,-2.6256 2.128,-1.7005 3.6141,-4.0744 4.214,-6.7315 0.5999,-2.6571 0.2779,-5.4393 -0.9129,-7.8891 -1.1909,-2.4499 -3.1799,-4.42166 -5.64,-5.59127 6.2625,3.48747 4.125,14.17497 -5.1562,22.83747 z" fill="#323e56" id="path4" />
7
- <path d="m 21.8439,12.0365 c 0,0.5836 -0.1149,1.1614 -0.3382,1.7006 -0.2234,0.5391 -0.5507,1.029 -0.9633,1.4416 -0.4127,0.4127 -0.9025,0.74 -1.4417,0.9633 -0.5391,0.2233 -1.117,0.3383 -1.7005,0.3383 -0.5836,0 -1.1614,-0.115 -1.7006,-0.3383 -0.5391,-0.2233 -1.029,-0.5506 -1.4416,-0.9633 -0.4127,-0.4126 -0.74,-0.9025 -0.9633,-1.4416 -0.2233,-0.5392 -0.3383,-1.117 -0.3383,-1.7006 0,-1.1785 0.4682,-2.30882 1.3016,-3.14218 0.8333,-0.83337 1.9636,-1.30155 3.1422,-1.30155 1.1785,0 2.3088,0.46818 3.1422,1.30155 0.8333,0.83336 1.3015,1.96368 1.3015,3.14218 z" fill="#323e56" id="path6" />
6
+ <path d="m 12.2438,6.86133 c -2.46004,1.16961 -4.44899,3.14137 -5.63988,5.59127 -1.19088,2.4498 -1.51282,5.232 -0.9129,7.8891 0.59991,2.6571 2.08599,5.031 4.21394,6.7315 2.12794,1.7005 4.77114,2.6265 7.49514,2.6256 -9.28126,-8.6625 -11.41876,-19.35 -5.1563,-22.83747 z m 5.1563,22.83747 c 2.724,9e-4 5.3672,-0.9251 7.4951,-2.6256 2.128,-1.7005 3.6141,-4.0744 4.214,-6.7315 0.5999,-2.6571 0.2779,-5.4393 -0.9129,-7.8891 -1.1909,-2.4499 -3.1799,-4.42166 -5.64,-5.59127 6.2625,3.48747 4.125,14.17497 -5.1562,22.83747 z" fill="#263B58" id="path4" />
7
+ <path d="m 21.8439,12.0365 c 0,0.5836 -0.1149,1.1614 -0.3382,1.7006 -0.2234,0.5391 -0.5507,1.029 -0.9633,1.4416 -0.4127,0.4127 -0.9025,0.74 -1.4417,0.9633 -0.5391,0.2233 -1.117,0.3383 -1.7005,0.3383 -0.5836,0 -1.1614,-0.115 -1.7006,-0.3383 -0.5391,-0.2233 -1.029,-0.5506 -1.4416,-0.9633 -0.4127,-0.4126 -0.74,-0.9025 -0.9633,-1.4416 -0.2233,-0.5392 -0.3383,-1.117 -0.3383,-1.7006 0,-1.1785 0.4682,-2.30882 1.3016,-3.14218 0.8333,-0.83337 1.9636,-1.30155 3.1422,-1.30155 1.1785,0 2.3088,0.46818 3.1422,1.30155 0.8333,0.83336 1.3015,1.96368 1.3015,3.14218 z" fill="#263B58" id="path6" />
8
8
  </g>
9
9
  <defs id="defs13">
10
10
  <clipPath id="clip0_217_11335">
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg version="1.1" id="circle" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
3
+ <path d="M14,7.5c0,3.5899-2.9101,6.5-6.5,6.5S1,11.0899,1,7.5S3.9101,1,7.5,1S14,3.9101,14,7.5z"/>
4
+ </svg>
@@ -1,7 +1,7 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
- <path d="M128 64A64 64 0 1 1 0 64a64 64 0 1 1 128 0z" fill="#323e56"/>
2
+ <path d="M128 64A64 64 0 1 1 0 64a64 64 0 1 1 128 0z" fill="#263B58"/>
3
3
  <g transform="matrix(1.014 0 0 1.014 -4.3 -933.4)">
4
- <circle transform="matrix(.08 0 0 .08 28.3 944.2)" r="440" cy="490" cx="490" fill="none" stroke="#79c1c0" stroke-width="100"/>
4
+ <circle transform="matrix(.08 0 0 .08 28.3 944.2)" r="440" cy="490" cx="490" fill="none" stroke="#B9F5D2" stroke-width="100"/>
5
5
  <path d="M67 961.3c-10.4 0-19 7.3-21.3 17h10.4a12 12 0 1 1 0 10H45.7a21.9 21.9 0 1 0 21.3-27z" fill="#fff"/>
6
6
  </g>
7
7
  </svg>
@@ -1,7 +1,7 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
- <path d="M128 64A64 64 0 1 1 0 64a64 64 0 1 1 128 0z" fill="#2e364f" fill-opacity=".95"/>
2
+ <path d="M128 64A64 64 0 1 1 0 64a64 64 0 1 1 128 0z" fill="#263B58" fill-opacity=".95"/>
3
3
  <g fill="#fff">
4
4
  <path d="M83.5 20.4a30 30 0 0 0-21 8.4A29.5 29.5 0 0 0 60.2 67l-8 7.6 5.4 5.2 7.6-7.5c13 9.1 29 7.6 39.4-2.5a28.3 28.3 0 0 0 0-40.9 30 30 0 0 0-21-8.4zm0 4.8a25 25 0 0 1 17.5 7 23.6 23.6 0 0 1 0 34 25.2 25.2 0 0 1-35 0 23.6 23.6 0 0 1 0-34 25 25 0 0 1 17.5-7zM44 75.6l-23.7 23c-2 1.9-2 5 0 6.8l5.4 5.3a5 5 0 0 0 7 0l23.8-23c2-1.9 2-5 0-6.8l-5.4-5.3a5.3 5.3 0 0 0-7 0z"/>
5
5
  </g>
6
- <path d="m54.8 91.8-14 13.6 19.5-4.5 1.5-6.5c-3-.1-4.8-1.1-7-2.6zm21-7.5c-.7 8.4-4.4 9-11.5 10.2l-1.5 6.3 18.2 4.5 4.4-18.6-9.6-2.4zm-8.7-2-2.3 10.1c8.3-1.3 8.5-4 8.8-8.7L67 82.2zm-2.4-.2c-2 .1-3 .4-5.3 1 .7 1.3 1 4-3 7.2 2.1 1.3 4 1.8 5.8 2 1.7-7.7 2.6-9 2.5-10.2zM24.9 82l-3.6 13.7 12-11.6L25 82zm83.4-.5A1945 1945 0 0 0 88 86.7l-4.5 18.7 19.9-4.8zm-32.5-2.9v3.1c4.2 1 8.4 2 9.2 2l-1-4c-3.6 0-4.8-.2-8.2-1zm-10-4.6 1.4 5.7 6.4 1.5V78c-2.8-1-5.4-2.3-7.9-4zM23 72.2l2 7.3L35.5 82l.5-.5c-7.3-2.7-7.4-8.1-12.9-9.3zm83-1.6a33.3 33.3 0 0 1-19.6 9l1.1 4.1c.1.3 7-1.2 20.7-4.7zm-47.7-3.7c-1-1.3-1.7-2.6-2.4-4-5.4 1.3-14.2 3.3-14.4 3.6a74 74 0 0 0 1.7 7.8 6 6 0 0 1 7.8-.6m7.5 7.2c1.9-.6 4.4-1 6-1.3a15 15 0 0 0-.9-3.9M20.5 61.4l2 7.7c9.8 3.7 10.5 11.2 15.8 10.2l3.4-3.3a76 76 0 0 0-2.6-9.3l-18.6-5.3zM53 44.7l-6.6 1.7L42 63.8c5.4-1.5 6.9-1.8 13-3-2.2-5.2-2.9-10.7-2-16zM25 40.6l-4.7 18.2c7.2 2 11.4 3.2 18.6 4.9 1.6-4.7 3.3-10 4.6-17.5L25 40.6zm35-20.7-18.2 4.5c2.6 11 4.4 19 4.6 19.1l7-1.4c1.7-6.9 3.2-9.2 8.4-14.4L60 19.9zm2.4-.2 1.4 6.1c2.1-1.7 4.4-3 6.8-4.1zm-42.4 0 4.7 18.2a856 856 0 0 0 18.8 5.4l-4.2-19zm83.3-.2L96 21.3c3.4 1.4 6.6 3.4 9.4 6zM63 53.5c1.6 10 12.5 17.5 23.9 16.2 4.2-10 7.2-9.5 8.8-19.5 0-9-11.6-3.4-17-3.1C69.6 46.8 70 36 69 34.4c-2.8 2-7.7 8.6-6 19.2zM73.4 31c3 9.4 3.7 12.6 13.2 9 7.1-2.2 12.8.7 13.8 4 1.5 5-1 12.5-7.6 24a21.6 21.6 0 0 0 10-27 21.2 21.2 0 0 0-29.4-10z" fill="#79c1c0"/>
6
+ <path d="m54.8 91.8-14 13.6 19.5-4.5 1.5-6.5c-3-.1-4.8-1.1-7-2.6zm21-7.5c-.7 8.4-4.4 9-11.5 10.2l-1.5 6.3 18.2 4.5 4.4-18.6-9.6-2.4zm-8.7-2-2.3 10.1c8.3-1.3 8.5-4 8.8-8.7L67 82.2zm-2.4-.2c-2 .1-3 .4-5.3 1 .7 1.3 1 4-3 7.2 2.1 1.3 4 1.8 5.8 2 1.7-7.7 2.6-9 2.5-10.2zM24.9 82l-3.6 13.7 12-11.6L25 82zm83.4-.5A1945 1945 0 0 0 88 86.7l-4.5 18.7 19.9-4.8zm-32.5-2.9v3.1c4.2 1 8.4 2 9.2 2l-1-4c-3.6 0-4.8-.2-8.2-1zm-10-4.6 1.4 5.7 6.4 1.5V78c-2.8-1-5.4-2.3-7.9-4zM23 72.2l2 7.3L35.5 82l.5-.5c-7.3-2.7-7.4-8.1-12.9-9.3zm83-1.6a33.3 33.3 0 0 1-19.6 9l1.1 4.1c.1.3 7-1.2 20.7-4.7zm-47.7-3.7c-1-1.3-1.7-2.6-2.4-4-5.4 1.3-14.2 3.3-14.4 3.6a74 74 0 0 0 1.7 7.8 6 6 0 0 1 7.8-.6m7.5 7.2c1.9-.6 4.4-1 6-1.3a15 15 0 0 0-.9-3.9M20.5 61.4l2 7.7c9.8 3.7 10.5 11.2 15.8 10.2l3.4-3.3a76 76 0 0 0-2.6-9.3l-18.6-5.3zM53 44.7l-6.6 1.7L42 63.8c5.4-1.5 6.9-1.8 13-3-2.2-5.2-2.9-10.7-2-16zM25 40.6l-4.7 18.2c7.2 2 11.4 3.2 18.6 4.9 1.6-4.7 3.3-10 4.6-17.5L25 40.6zm35-20.7-18.2 4.5c2.6 11 4.4 19 4.6 19.1l7-1.4c1.7-6.9 3.2-9.2 8.4-14.4L60 19.9zm2.4-.2 1.4 6.1c2.1-1.7 4.4-3 6.8-4.1zm-42.4 0 4.7 18.2a856 856 0 0 0 18.8 5.4l-4.2-19zm83.3-.2L96 21.3c3.4 1.4 6.6 3.4 9.4 6zM63 53.5c1.6 10 12.5 17.5 23.9 16.2 4.2-10 7.2-9.5 8.8-19.5 0-9-11.6-3.4-17-3.1C69.6 46.8 70 36 69 34.4c-2.8 2-7.7 8.6-6 19.2zM73.4 31c3 9.4 3.7 12.6 13.2 9 7.1-2.2 12.8.7 13.8 4 1.5 5-1 12.5-7.6 24a21.6 21.6 0 0 0 10-27 21.2 21.2 0 0 0-29.4-10z" fill="#B9F5D2"/>
7
7
  </svg>
@@ -1,6 +1,6 @@
1
1
  class UmapFragment extends HTMLElement {
2
2
  connectedCallback() {
3
- new L.U.Map(this.firstElementChild.id, JSON.parse(this.dataset.settings))
3
+ new U.Map(this.firstElementChild.id, JSON.parse(this.dataset.settings))
4
4
  }
5
5
  }
6
6
 
@@ -0,0 +1,159 @@
1
+ // Uses `L._`` from Leaflet.i18n which we cannot import as a module yet
2
+ import { DomUtil, DomEvent } from '../../vendors/leaflet/leaflet-src.esm.js'
3
+
4
+ export default class Browser {
5
+ constructor(map) {
6
+ this.map = map
7
+ this.map.on('moveend', this.onMoveEnd, this)
8
+ this.options = {
9
+ filter: '',
10
+ inBbox: false,
11
+ }
12
+ }
13
+
14
+ addFeature(feature, parent) {
15
+ const filter = this.options.filter
16
+ if (filter && !feature.matchFilter(filter, this.filterKeys)) return
17
+ if (this.options.inBbox && !feature.isOnScreen(this.bounds)) return
18
+ const feature_li = DomUtil.create('li', `${feature.getClassName()} feature`),
19
+ zoom_to = DomUtil.create('i', 'feature-zoom_to', feature_li),
20
+ edit = DomUtil.create('i', 'show-on-edit feature-edit', feature_li),
21
+ del = DomUtil.create('i', 'show-on-edit feature-delete', feature_li),
22
+ colorBox = DomUtil.create('i', 'feature-color', feature_li),
23
+ title = DomUtil.create('span', 'feature-title', feature_li),
24
+ symbol = feature._getIconUrl
25
+ ? U.Icon.prototype.formatUrl(feature._getIconUrl(), feature)
26
+ : null
27
+ zoom_to.title = L._('Bring feature to center')
28
+ edit.title = L._('Edit this feature')
29
+ del.title = L._('Delete this feature')
30
+ title.textContent = feature.getDisplayName() || '—'
31
+ const bgcolor = feature.getDynamicOption('color')
32
+ colorBox.style.backgroundColor = bgcolor
33
+ if (symbol && symbol !== this.map.options.default_iconUrl) {
34
+ const icon = U.Icon.makeIconElement(symbol, colorBox)
35
+ U.Icon.setIconContrast(icon, colorBox, symbol, bgcolor)
36
+ }
37
+ DomEvent.on(
38
+ zoom_to,
39
+ 'click',
40
+ function (e) {
41
+ e.callback = L.bind(this.view, this)
42
+ this.zoomTo(e)
43
+ },
44
+ feature
45
+ )
46
+ DomEvent.on(
47
+ title,
48
+ 'click',
49
+ function (e) {
50
+ e.callback = L.bind(this.view, this)
51
+ this.zoomTo(e)
52
+ },
53
+ feature
54
+ )
55
+ DomEvent.on(edit, 'click', feature.edit, feature)
56
+ DomEvent.on(del, 'click', feature.confirmDelete, feature)
57
+ // HOTFIX. Remove when this is released:
58
+ // https://github.com/Leaflet/Leaflet/pull/9052
59
+ DomEvent.disableClickPropagation(feature_li)
60
+ parent.appendChild(feature_li)
61
+ }
62
+
63
+ datalayerId(datalayer) {
64
+ return `browse_data_datalayer_${L.stamp(datalayer)}`
65
+ }
66
+
67
+ onDataLayerChanged(e) {
68
+ this.updateDatalayer(e.target)
69
+ }
70
+
71
+ addDataLayer(datalayer, parent) {
72
+ const container = DomUtil.create('div', datalayer.getHidableClass(), parent),
73
+ headline = DomUtil.create('h5', '', container),
74
+ counter = DomUtil.create('span', 'datalayer-counter', headline)
75
+ container.id = this.datalayerId(datalayer)
76
+ datalayer.renderToolbox(headline)
77
+ DomUtil.add('span', '', headline, datalayer.options.name)
78
+ const ul = DomUtil.create('ul', '', container)
79
+ this.updateDatalayer(datalayer)
80
+ datalayer.on('datachanged', this.onDataLayerChanged, this)
81
+ this.map.ui.once('panel:closed', () => {
82
+ datalayer.off('datachanged', this.onDataLayerChanged, this)
83
+ })
84
+ }
85
+
86
+ updateDatalayer(datalayer) {
87
+ // Compute once, but use it for each feature later.
88
+ this.bounds = this.map.getBounds()
89
+ const parent = DomUtil.get(this.datalayerId(datalayer))
90
+ // Panel is not open
91
+ if (!parent) return
92
+ DomUtil.classIf(parent, 'off', !datalayer.isVisible())
93
+ const container = parent.querySelector('ul'),
94
+ counter = parent.querySelector('.datalayer-counter')
95
+ container.innerHTML = ''
96
+ datalayer.eachFeature((feature) => this.addFeature(feature, container))
97
+
98
+ let total = datalayer.count(),
99
+ current = container.querySelectorAll('li').length,
100
+ count = total == current ? total : `${current}/${total}`
101
+ counter.textContent = count
102
+ counter.title = L._('Features in this layer: {count}', { count: count })
103
+ }
104
+
105
+ onFormChange() {
106
+ this.map.eachBrowsableDataLayer((datalayer) => {
107
+ datalayer.resetLayer(true)
108
+ this.updateDatalayer(datalayer)
109
+ })
110
+ }
111
+
112
+ onMoveEnd() {
113
+ const isBrowserOpen = !!document.querySelector('.umap-browse-data')
114
+ if (!isBrowserOpen) return
115
+ const isListDynamic = this.options.inBbox
116
+ this.map.eachBrowsableDataLayer((datalayer) => {
117
+ if (!isListDynamic && !datalayer.hasDynamicData()) return
118
+ this.updateDatalayer(datalayer)
119
+ })
120
+ }
121
+
122
+ open() {
123
+ // Get once but use it for each feature later
124
+ this.filterKeys = this.map.getFilterKeys()
125
+ const container = DomUtil.create('div', 'umap-browse-data')
126
+ // HOTFIX. Remove when this is released:
127
+ // https://github.com/Leaflet/Leaflet/pull/9052
128
+ DomEvent.disableClickPropagation(container)
129
+
130
+ const title = DomUtil.add(
131
+ 'h3',
132
+ 'umap-browse-title',
133
+ container,
134
+ this.map.options.name
135
+ )
136
+
137
+ const formContainer = DomUtil.create('div', '', container)
138
+ const dataContainer = DomUtil.create('div', 'umap-browse-features', container)
139
+
140
+ const fields = [
141
+ ['options.filter', { handler: 'Input', placeholder: L._('Filter') }],
142
+ ['options.inBbox', { handler: 'Switch', label: L._('Current map view') }],
143
+ ]
144
+ const builder = new U.FormBuilder(this, fields, {
145
+ makeDirty: false,
146
+ callback: () => this.onFormChange(),
147
+ })
148
+ formContainer.appendChild(builder.build())
149
+
150
+ this.map.ui.openPanel({
151
+ data: { html: container },
152
+ actions: [this.map._aboutLink()],
153
+ })
154
+
155
+ this.map.eachBrowsableDataLayer((datalayer) => {
156
+ this.addDataLayer(datalayer, dataContainer)
157
+ })
158
+ }
159
+ }
@@ -1,8 +1,10 @@
1
1
  import * as L from '../../vendors/leaflet/leaflet-src.esm.js'
2
2
  import URLs from './urls.js'
3
+ import Browser from './browser.js'
4
+ import { Request, ServerRequest, RequestError, HTTPError, NOKError } from './request.js'
3
5
  // Import modules and export them to the global scope.
4
6
  // For the not yet module-compatible JS out there.
5
7
 
6
8
  // Copy the leaflet module, it's expected by leaflet plugins to be writeable.
7
9
  window.L = { ...L }
8
- window.umap = { URLs }
10
+ window.U = { URLs, Request, ServerRequest, RequestError, HTTPError, NOKError, Browser }