umap-project 3.3.2__py3-none-any.whl → 3.4.0__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.
Files changed (242) hide show
  1. umap/__init__.py +1 -1
  2. umap/context_processors.py +4 -1
  3. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/cs_CZ/LC_MESSAGES/django.po +43 -33
  5. umap/locale/da/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/da/LC_MESSAGES/django.po +43 -33
  7. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/de/LC_MESSAGES/django.po +64 -53
  9. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/el/LC_MESSAGES/django.po +35 -29
  11. umap/locale/en/LC_MESSAGES/django.po +47 -41
  12. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  13. umap/locale/es/LC_MESSAGES/django.po +43 -33
  14. umap/locale/et/LC_MESSAGES/django.mo +0 -0
  15. umap/locale/et/LC_MESSAGES/django.po +58 -54
  16. umap/locale/eu/LC_MESSAGES/django.mo +0 -0
  17. umap/locale/eu/LC_MESSAGES/django.po +43 -33
  18. umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
  19. umap/locale/fa_IR/LC_MESSAGES/django.po +43 -33
  20. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  21. umap/locale/fr/LC_MESSAGES/django.po +36 -30
  22. umap/locale/gl/LC_MESSAGES/django.mo +0 -0
  23. umap/locale/gl/LC_MESSAGES/django.po +43 -33
  24. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  25. umap/locale/hu/LC_MESSAGES/django.po +35 -29
  26. umap/locale/is/LC_MESSAGES/django.mo +0 -0
  27. umap/locale/is/LC_MESSAGES/django.po +43 -33
  28. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  29. umap/locale/it/LC_MESSAGES/django.po +43 -33
  30. umap/locale/nl/LC_MESSAGES/django.mo +0 -0
  31. umap/locale/nl/LC_MESSAGES/django.po +35 -29
  32. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  33. umap/locale/pl/LC_MESSAGES/django.po +114 -103
  34. umap/locale/pt/LC_MESSAGES/django.mo +0 -0
  35. umap/locale/pt/LC_MESSAGES/django.po +43 -33
  36. umap/locale/th_TH/LC_MESSAGES/django.mo +0 -0
  37. umap/locale/th_TH/LC_MESSAGES/django.po +310 -109
  38. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  39. umap/locale/zh_TW/LC_MESSAGES/django.po +80 -70
  40. umap/management/commands/switch_user.py +2 -2
  41. umap/migrations/0018_datalayer_uuid.py +1 -1
  42. umap/models.py +7 -3
  43. umap/settings/local.py.sample +1 -1
  44. umap/static/umap/base.css +89 -32
  45. umap/static/umap/content.css +129 -33
  46. umap/static/umap/css/bar.css +82 -20
  47. umap/static/umap/css/browser.css +163 -0
  48. umap/static/umap/css/contextmenu.css +15 -0
  49. umap/static/umap/css/dialog.css +36 -16
  50. umap/static/umap/css/form.css +123 -33
  51. umap/static/umap/css/icon.css +46 -3
  52. umap/static/umap/css/panel.css +7 -3
  53. umap/static/umap/css/popup.css +34 -8
  54. umap/static/umap/css/tooltip.css +8 -4
  55. umap/static/umap/img/16-white.svg +26 -8
  56. umap/static/umap/img/16.svg +1 -1
  57. umap/static/umap/img/source/16-white.svg +36 -18
  58. umap/static/umap/img/source/16.svg +1 -1
  59. umap/static/umap/js/components/alerts/alert.css +69 -31
  60. umap/static/umap/js/components/alerts/alert.js +20 -2
  61. umap/static/umap/js/components/base.js +1 -1
  62. umap/static/umap/js/modules/browser.js +69 -61
  63. umap/static/umap/js/modules/caption.js +10 -7
  64. umap/static/umap/js/modules/data/features.js +89 -63
  65. umap/static/umap/js/modules/data/fields.js +446 -0
  66. umap/static/umap/js/modules/data/layer.js +116 -196
  67. umap/static/umap/js/modules/domutils.js +109 -0
  68. umap/static/umap/js/modules/filters.js +780 -0
  69. umap/static/umap/js/modules/form/builder.js +8 -5
  70. umap/static/umap/js/modules/form/fields.js +111 -221
  71. umap/static/umap/js/modules/formatter.js +24 -1
  72. umap/static/umap/js/modules/help.js +4 -3
  73. umap/static/umap/js/modules/i18n.js +1 -1
  74. umap/static/umap/js/modules/importer.js +1 -1
  75. umap/static/umap/js/modules/importers/opendata.js +15 -0
  76. umap/static/umap/js/modules/importers/openrouteservice.js +6 -1
  77. umap/static/umap/js/modules/managers.js +2 -1
  78. umap/static/umap/js/modules/permissions.js +39 -31
  79. umap/static/umap/js/modules/rendering/controls.js +11 -9
  80. umap/static/umap/js/modules/rendering/icon.js +3 -8
  81. umap/static/umap/js/modules/rendering/layers/base.js +3 -3
  82. umap/static/umap/js/modules/rendering/layers/classified.js +18 -11
  83. umap/static/umap/js/modules/rendering/layers/cluster.js +23 -11
  84. umap/static/umap/js/modules/rendering/layers/heat.js +27 -21
  85. umap/static/umap/js/modules/rendering/map.js +1 -0
  86. umap/static/umap/js/modules/rendering/template.js +50 -23
  87. umap/static/umap/js/modules/rendering/ui.js +33 -25
  88. umap/static/umap/js/modules/rules.js +38 -44
  89. umap/static/umap/js/modules/schema.js +3 -6
  90. umap/static/umap/js/modules/share.js +5 -4
  91. umap/static/umap/js/modules/tableeditor.js +50 -38
  92. umap/static/umap/js/modules/templates.js +2 -3
  93. umap/static/umap/js/modules/ui/bar.js +55 -23
  94. umap/static/umap/js/modules/ui/dialog.js +38 -27
  95. umap/static/umap/js/modules/ui/panel.js +23 -8
  96. umap/static/umap/js/modules/ui/tooltip.js +6 -5
  97. umap/static/umap/js/modules/umap.js +158 -51
  98. umap/static/umap/js/modules/utils.js +24 -2
  99. umap/static/umap/js/umap.core.js +1 -110
  100. umap/static/umap/locale/am_ET.js +52 -17
  101. umap/static/umap/locale/am_ET.json +52 -17
  102. umap/static/umap/locale/ar.js +52 -17
  103. umap/static/umap/locale/ar.json +52 -17
  104. umap/static/umap/locale/ast.js +52 -17
  105. umap/static/umap/locale/ast.json +52 -17
  106. umap/static/umap/locale/bg.js +52 -17
  107. umap/static/umap/locale/bg.json +52 -17
  108. umap/static/umap/locale/br.js +48 -22
  109. umap/static/umap/locale/br.json +48 -22
  110. umap/static/umap/locale/ca.js +52 -17
  111. umap/static/umap/locale/ca.json +52 -17
  112. umap/static/umap/locale/cs_CZ.js +52 -17
  113. umap/static/umap/locale/cs_CZ.json +52 -17
  114. umap/static/umap/locale/da.js +54 -17
  115. umap/static/umap/locale/da.json +54 -17
  116. umap/static/umap/locale/de.js +102 -67
  117. umap/static/umap/locale/de.json +102 -67
  118. umap/static/umap/locale/el.js +52 -17
  119. umap/static/umap/locale/el.json +52 -17
  120. umap/static/umap/locale/en.js +54 -16
  121. umap/static/umap/locale/en.json +54 -16
  122. umap/static/umap/locale/en_US.json +52 -17
  123. umap/static/umap/locale/es.js +54 -17
  124. umap/static/umap/locale/es.json +54 -17
  125. umap/static/umap/locale/et.js +91 -56
  126. umap/static/umap/locale/et.json +91 -56
  127. umap/static/umap/locale/eu.js +84 -49
  128. umap/static/umap/locale/eu.json +84 -49
  129. umap/static/umap/locale/fa_IR.js +52 -17
  130. umap/static/umap/locale/fa_IR.json +52 -17
  131. umap/static/umap/locale/fi.js +52 -17
  132. umap/static/umap/locale/fi.json +52 -17
  133. umap/static/umap/locale/fr.js +54 -17
  134. umap/static/umap/locale/fr.json +54 -17
  135. umap/static/umap/locale/gl.js +52 -17
  136. umap/static/umap/locale/gl.json +52 -17
  137. umap/static/umap/locale/he.js +52 -17
  138. umap/static/umap/locale/he.json +52 -17
  139. umap/static/umap/locale/hr.js +52 -17
  140. umap/static/umap/locale/hr.json +52 -17
  141. umap/static/umap/locale/hu.js +59 -24
  142. umap/static/umap/locale/hu.json +59 -24
  143. umap/static/umap/locale/id.js +52 -17
  144. umap/static/umap/locale/id.json +52 -17
  145. umap/static/umap/locale/is.js +52 -17
  146. umap/static/umap/locale/is.json +52 -17
  147. umap/static/umap/locale/it.js +52 -17
  148. umap/static/umap/locale/it.json +52 -17
  149. umap/static/umap/locale/ja.js +52 -17
  150. umap/static/umap/locale/ja.json +52 -17
  151. umap/static/umap/locale/ko.js +52 -17
  152. umap/static/umap/locale/ko.json +52 -17
  153. umap/static/umap/locale/lt.js +52 -17
  154. umap/static/umap/locale/lt.json +52 -17
  155. umap/static/umap/locale/ms.js +52 -17
  156. umap/static/umap/locale/ms.json +52 -17
  157. umap/static/umap/locale/nl.js +52 -17
  158. umap/static/umap/locale/nl.json +52 -17
  159. umap/static/umap/locale/no.js +52 -17
  160. umap/static/umap/locale/no.json +52 -17
  161. umap/static/umap/locale/pl.js +53 -17
  162. umap/static/umap/locale/pl.json +53 -17
  163. umap/static/umap/locale/pl_PL.json +52 -17
  164. umap/static/umap/locale/pt.js +52 -17
  165. umap/static/umap/locale/pt.json +52 -17
  166. umap/static/umap/locale/pt_BR.js +52 -17
  167. umap/static/umap/locale/pt_BR.json +52 -17
  168. umap/static/umap/locale/pt_PT.js +52 -17
  169. umap/static/umap/locale/pt_PT.json +52 -17
  170. umap/static/umap/locale/ro.js +52 -17
  171. umap/static/umap/locale/ro.json +52 -17
  172. umap/static/umap/locale/ru.js +52 -17
  173. umap/static/umap/locale/ru.json +52 -17
  174. umap/static/umap/locale/si.js +1 -1
  175. umap/static/umap/locale/si.json +1 -1
  176. umap/static/umap/locale/sk_SK.js +52 -17
  177. umap/static/umap/locale/sk_SK.json +52 -17
  178. umap/static/umap/locale/sl.js +52 -17
  179. umap/static/umap/locale/sl.json +52 -17
  180. umap/static/umap/locale/sr.js +52 -17
  181. umap/static/umap/locale/sr.json +52 -17
  182. umap/static/umap/locale/sv.js +52 -17
  183. umap/static/umap/locale/sv.json +52 -17
  184. umap/static/umap/locale/th_TH.js +52 -17
  185. umap/static/umap/locale/th_TH.json +52 -17
  186. umap/static/umap/locale/tr.js +52 -17
  187. umap/static/umap/locale/tr.json +52 -17
  188. umap/static/umap/locale/uk_UA.js +52 -17
  189. umap/static/umap/locale/uk_UA.json +52 -17
  190. umap/static/umap/locale/vi.js +52 -17
  191. umap/static/umap/locale/vi.json +52 -17
  192. umap/static/umap/locale/vi_VN.json +52 -17
  193. umap/static/umap/locale/zh.js +52 -17
  194. umap/static/umap/locale/zh.json +52 -17
  195. umap/static/umap/locale/zh_CN.json +52 -17
  196. umap/static/umap/locale/zh_TW.Big5.json +52 -17
  197. umap/static/umap/locale/zh_TW.js +53 -17
  198. umap/static/umap/locale/zh_TW.json +53 -17
  199. umap/static/umap/map.css +63 -226
  200. umap/static/umap/unittests/utils.js +18 -0
  201. umap/static/umap/vars.css +23 -5
  202. umap/templates/umap/components/alerts/alert.html +32 -29
  203. umap/templates/umap/css.html +2 -1
  204. umap/templates/umap/login_popup_end.html +18 -9
  205. umap/templates/umap/user_map_table.html +7 -2
  206. umap/tests/integration/conftest.py +10 -6
  207. umap/tests/integration/test_anonymous_owned_map.py +90 -37
  208. umap/tests/integration/test_basics.py +25 -1
  209. umap/tests/integration/test_browser.py +37 -0
  210. umap/tests/integration/test_cluster.py +110 -0
  211. umap/tests/integration/test_conditional_rules.py +107 -52
  212. umap/tests/integration/test_datalayer.py +9 -16
  213. umap/tests/integration/test_draw_polygon.py +6 -0
  214. umap/tests/integration/test_draw_polyline.py +11 -0
  215. umap/tests/integration/test_edit_marker.py +12 -1
  216. umap/tests/integration/test_export_map.py +19 -0
  217. umap/tests/integration/test_fields.py +541 -0
  218. umap/tests/integration/test_filters.py +616 -0
  219. umap/tests/integration/test_iframe.py +1 -1
  220. umap/tests/integration/test_import.py +38 -42
  221. umap/tests/integration/test_map_preview.py +1 -1
  222. umap/tests/integration/test_picto.py +1 -1
  223. umap/tests/integration/test_popup.py +31 -0
  224. umap/tests/integration/test_remote_data.py +60 -4
  225. umap/tests/integration/test_save.py +1 -1
  226. umap/tests/integration/test_share.py +4 -4
  227. umap/tests/integration/test_tableeditor.py +31 -7
  228. umap/tests/integration/test_websocket_sync.py +71 -20
  229. umap/tests/test_dashboard.py +11 -1
  230. umap/tests/test_statics.py +2 -2
  231. umap/tests/test_utils.py +19 -2
  232. umap/tests/test_views.py +1 -1
  233. umap/urls.py +1 -0
  234. umap/utils.py +8 -1
  235. umap/views.py +5 -0
  236. {umap_project-3.3.2.dist-info → umap_project-3.4.0.dist-info}/METADATA +15 -15
  237. {umap_project-3.3.2.dist-info → umap_project-3.4.0.dist-info}/RECORD +240 -236
  238. umap/static/umap/js/modules/facets.js +0 -164
  239. umap/tests/integration/test_facets_browser.py +0 -279
  240. {umap_project-3.3.2.dist-info → umap_project-3.4.0.dist-info}/WHEEL +0 -0
  241. {umap_project-3.3.2.dist-info → umap_project-3.4.0.dist-info}/entry_points.txt +0 -0
  242. {umap_project-3.3.2.dist-info → umap_project-3.4.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/map.css CHANGED
@@ -24,6 +24,43 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
24
24
  margin-inline-start: 5px;
25
25
  }
26
26
 
27
+ /* *********** */
28
+ /* Generic */
29
+ /* *********** */
30
+ .with-transition {
31
+ transition: all var(--transition);
32
+ }
33
+
34
+ .draft {
35
+ background: repeating-linear-gradient(-45deg,
36
+ var(--color-darkGray),
37
+ var(--color-darkGray) 10px,
38
+ var(--color-darkerGray) 10px,
39
+ var(--color-darkerGray) 20px);
40
+ }
41
+
42
+ .show-on-draft {
43
+ display: none;
44
+ }
45
+
46
+ .draft .show-on-draft {
47
+ display: inline-block;
48
+ }
49
+
50
+ .aplat {
51
+ padding: var(--medium-box-padding);
52
+ margin-bottom: var(--box-margin);
53
+ background-color: var(--color-mediumGray);
54
+ border: 1px solid var(--color-accent);
55
+ }
56
+
57
+ .with-toolbox {
58
+ display: flex;
59
+ justify-content: space-between;
60
+ align-items: center;
61
+ padding: 0;
62
+ }
63
+
27
64
  /* *********** */
28
65
  /* Map details */
29
66
  /* *********** */
@@ -39,7 +76,7 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
39
76
  * Same as leaflet background, to work around screen blincking
40
77
  * between DOM is loaded and JS is read to render the map.
41
78
  */
42
- background-color: var(--color-lightGray);
79
+ background-color: var(--color-veryLightGray);
43
80
  }
44
81
 
45
82
  .print-portrait,
@@ -233,7 +270,7 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
233
270
  width: 38px;
234
271
  height: 38px;
235
272
  box-shadow: none;
236
- border: 1px solid var(--color-lightGray);
273
+ border: 1px solid var(--color-veryLightGray);
237
274
  border-radius: 4px;
238
275
  }
239
276
 
@@ -274,11 +311,11 @@ html[dir="rtl"] .leaflet-tooltip-pane>* {
274
311
  line-height: 100%;
275
312
  border-radius: var(--border-radius);
276
313
  margin-bottom: 0;
277
- border: 1px solid var(--color-lightGray);
314
+ border: 1px solid var(--color-veryLightGray);
278
315
  }
279
316
 
280
317
  .leaflet-iconLayers-layerCell-plus:hover {
281
- background-color: var(--color-lightGray);
318
+ background-color: var(--color-veryLightGray);
282
319
  }
283
320
 
284
321
  .leaflet-iconLayers:hover .leaflet-iconLayers-layerCell-plus {
@@ -320,7 +357,7 @@ ul.photon-autocomplete {
320
357
  overflow: hidden;
321
358
  white-space: nowrap;
322
359
  font-size: 1em;
323
- border-inline-start: 4px solid var(--color-lightGray);
360
+ border-inline-start: 4px solid var(--color-veryLightGray);
324
361
  }
325
362
 
326
363
  .photon-autocomplete li strong {
@@ -332,7 +369,7 @@ ul.photon-autocomplete {
332
369
  margin: 0;
333
370
  }
334
371
 
335
- .photon-autocomplete button:hover {
372
+ .photon-autocomplete button[type="button"]:hover {
336
373
  background-color: var(--color-darkCyan);
337
374
  }
338
375
 
@@ -368,8 +405,8 @@ ul.photon-autocomplete {
368
405
  display: none;
369
406
  }
370
407
 
371
- .search-result-tools button {
372
- padding: 8px;
408
+ .search-result-tools button[type="button"] {
409
+ padding: var(--text-margin);
373
410
  background-color: var(--background-color);
374
411
  }
375
412
 
@@ -420,60 +457,6 @@ ul.photon-autocomplete {
420
457
  margin-top: 0;
421
458
  }
422
459
 
423
- .update-map-extent,
424
- .leaflet-container .umap-toolbar .update-map-extent {
425
- background-position: 0 -36px;
426
- }
427
-
428
- .umap-toolbar .update-map-tilelayers,
429
- .update-map-tilelayers {
430
- background-position: -72px 0;
431
- }
432
-
433
- .manage-datalayers {
434
- background-position: -36px -72px;
435
- }
436
-
437
- .umap-toolbar .update-map-permissions,
438
- .update-map-permissions {
439
- background-position: -36px -36px;
440
- }
441
-
442
- .umap-toolbar .upload-data,
443
- .upload-data {
444
- background-position: -144px 0;
445
- }
446
-
447
- .umap-toolbar .update-map-settings,
448
- .update-map-settings {
449
- background-position: -108px 0;
450
- }
451
-
452
- .umap-draw-marker,
453
- .umap-toolbar .umap-draw-marker {
454
- background-position: -144px -36px;
455
- }
456
-
457
- .umap-draw-polyline,
458
- .umap-toolbar .umap-draw-polyline {
459
- background-position: -108px -36px;
460
- }
461
-
462
- .umap-draw-polyline-multi,
463
- .umap-toolbar .umap-draw-polyline-multi {
464
- background-position: -36px -106px;
465
- }
466
-
467
- .umap-draw-polygon,
468
- .umap-toolbar .umap-draw-polygon {
469
- background-position: -72px -36px;
470
- }
471
-
472
- .umap-draw-polygon-multi,
473
- .umap-toolbar .umap-draw-polygon-multi {
474
- background-position: 0 -108px;
475
- }
476
-
477
460
  .umap-edit-enabled .umap-toolbar a {
478
461
  display: block;
479
462
  }
@@ -518,7 +501,7 @@ ul.photon-autocomplete {
518
501
  /* ********************************* */
519
502
  /* Help Lightbox */
520
503
  /* ********************************* */
521
- .umap-help-button {
504
+ .umap-help-button[type="button"] {
522
505
  display: inline-block;
523
506
  width: 16px;
524
507
  height: 16px;
@@ -589,17 +572,6 @@ ul.photon-autocomplete {
589
572
  background-position: -122px -121px;
590
573
  }
591
574
 
592
- .umap-browser .feature-title {
593
- width: inherit;
594
- cursor: inherit;
595
- padding-inline-start: 6px;
596
- }
597
-
598
- .umap-browser .feature-title {
599
- font-size: 12px;
600
- cursor: pointer;
601
- }
602
-
603
575
  .show-on-edit {
604
576
  display: none !important;
605
577
  }
@@ -620,7 +592,6 @@ ul.photon-autocomplete {
620
592
  display: none !important;
621
593
  }
622
594
 
623
-
624
595
  /* ********************************* */
625
596
  /* Browser panel */
626
597
  /* ********************************* */
@@ -636,143 +607,6 @@ ul.photon-autocomplete {
636
607
  vertical-align: middle;
637
608
  }
638
609
 
639
- .umap-browser .datalayer i {
640
- cursor: pointer;
641
- }
642
-
643
- .umap-browser .off .feature {
644
- display: none;
645
- }
646
-
647
- .umap-browser .datalayer {
648
- margin-bottom: 2px;
649
- border-radius: 2px;
650
- }
651
-
652
- .umap-browser .datalayer ul {
653
- border: 1px solid #d3d3d3;
654
- }
655
-
656
- .umap-browser.dark .datalayer ul {
657
- border: 1px solid #232729;
658
- }
659
-
660
- .umap-browser .datalayer summary {
661
- margin-bottom: 0;
662
- overflow: hidden;
663
- padding-inline-start: 5px;
664
- height: 30px;
665
- background-color: var(--color-lightGray);
666
- font-weight: bold;
667
- }
668
-
669
- .umap-browser .off summary {
670
- color: #b3b3b3;
671
- }
672
-
673
- .umap-browser li {
674
- padding: 2px 0;
675
- white-space: nowrap;
676
- overflow: hidden;
677
- text-overflow: ellipsis;
678
- }
679
-
680
- .umap-browser .datalayer li:nth-child(even) {
681
- background-color: #efefef;
682
- }
683
-
684
- .umap-browser.dark .datalayer li:nth-child(even) {
685
- background-color: #2c3233;
686
- }
687
-
688
- .umap-browser .datalayer .feature-color {
689
- box-shadow: 0 0 2px 0 black inset;
690
- cursor: inherit;
691
- -moz-box-sizing: border-box;
692
- -webkit-box-sizing: border-box;
693
- box-sizing: border-box;
694
- display: inline-block;
695
- padding: 0;
696
- width: 24px;
697
- text-align: center;
698
- margin-inline-start: 5px;
699
- }
700
-
701
- .umap-browser .marker .feature-color {
702
- background: none;
703
- }
704
-
705
- .umap-browser.dark .datalayer .feature-color {
706
- box-shadow: 0 0 2px 0 #999 inset;
707
- }
708
-
709
- .umap-browser .datalayer .feature-color img {
710
- width: 24px;
711
- }
712
-
713
- .umap-browser .datalayer .feature-color span {
714
- font-style: normal;
715
- font-weight: bold;
716
- }
717
-
718
- .umap-browser .datalayer-toggle-list {
719
- float: inline-end;
720
- margin-inline-end: 5px;
721
- background-position: -145px -70px;
722
- }
723
-
724
- .umap-browser .filters summary {
725
- background: none;
726
- border: 1px solid var(--color-lightGray);
727
- width: fit-content;
728
- padding: 0 10px;
729
- margin-bottom: var(--block-margin);
730
- }
731
-
732
- .umap-browser .filters summary {
733
- list-style: none;
734
- display: inline-block;
735
- }
736
-
737
- .umap-browser details[open].filters summary {
738
- margin-bottom: -1px;
739
- border-bottom: 1px solid var(--background-color);
740
- }
741
-
742
- .datalayer-name {
743
- cursor: pointer;
744
- }
745
-
746
- .umap-caption .dates {
747
- color: var(--color-mediumGray);
748
- }
749
-
750
- .umap-caption .header {
751
- display: flex;
752
- }
753
-
754
- .umap-caption .header i.icon {
755
- flex-shrink: 0;
756
- }
757
-
758
- .umap-caption button {
759
- background-color: var(--background-color);
760
- color: var(--text-color);
761
- }
762
-
763
- .umap-browser .main-toolbox {
764
- padding-left: 1.3rem;
765
- /* Align with toolbox below */
766
- border-top: 1px solid var(--color-mediumGray);
767
- margin-top: var(--box-margin);
768
- padding-top: 3px;
769
- padding-bottom: 3px;
770
- }
771
-
772
- .umap-browser .main-toolbox i {
773
- cursor: pointer;
774
- }
775
-
776
610
 
777
611
  /* ********************************* */
778
612
  /* Tilelayer switcher */
@@ -833,10 +667,10 @@ ul.photon-autocomplete {
833
667
  }
834
668
 
835
669
  .caption-item {
836
- color: #555;
837
- padding: 6px 8px;
670
+ padding: var(--text-margin);
838
671
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
839
- border-radius: 1px;
672
+ border-radius: var(--border-radius);
673
+ margin-bottom: var(--box-margin);
840
674
  }
841
675
 
842
676
  .caption-item ul {
@@ -998,6 +832,13 @@ ul.photon-autocomplete {
998
832
  box-shadow: black 0px 0px 1px;
999
833
  display: flex;
1000
834
  align-content: center;
835
+ justify-content: center;
836
+ }
837
+
838
+ .umap-large-circle-icon span {
839
+ display: flex;
840
+ align-items: center;
841
+ text-align: center;
1001
842
  }
1002
843
 
1003
844
  .umap-large-circle-icon.umap-icon-active {
@@ -1069,7 +910,7 @@ ul.photon-autocomplete {
1069
910
  font-weight: bold;
1070
911
  }
1071
912
 
1072
- .leaflet-overlay-pane > svg {
913
+ .leaflet-overlay-pane>svg {
1073
914
  z-index: var(--zindex-orphan-marker);
1074
915
  }
1075
916
 
@@ -1128,8 +969,13 @@ ul.photon-autocomplete {
1128
969
  line-height: var(--control-size);
1129
970
  }
1130
971
 
972
+ .leaflet-left .leaflet-control {
973
+ margin-left: var(--panel-gutter);
974
+ margin-top: var(--panel-gutter);
975
+ }
976
+
1131
977
  .leaflet-container .leaflet-control-zoom {
1132
- margin-inline-start: 10px;
978
+ margin-inline-start: var(--panel-gutter);
1133
979
  }
1134
980
 
1135
981
  .leaflet-top,
@@ -1204,15 +1050,6 @@ ul.photon-autocomplete {
1204
1050
  }
1205
1051
 
1206
1052
  @media all and (max-width: 480px) {
1207
-
1208
- .umap-main-edit-toolbox .share-status {
1209
- display: none;
1210
- }
1211
-
1212
- .umap-main-edit-toolbox .map-name {
1213
- max-width: 100px;
1214
- }
1215
-
1216
1053
  .leaflet-control-layers-expanded label {
1217
1054
  display: inline-block;
1218
1055
  margin-inline-end: 10px;
@@ -838,6 +838,24 @@ describe('Utils', () => {
838
838
  '2024-03-03T00:00:00.000Z'
839
839
  )
840
840
  })
841
+ it('should parse a French date', () => {
842
+ assert.equal(
843
+ Utils.parseNaiveDate('14/09/2020').toISOString(),
844
+ '2020-09-14T00:00:00.000Z'
845
+ )
846
+ })
847
+ it('should parse a French date with ambiguous day number', () => {
848
+ assert.equal(
849
+ Utils.parseNaiveDate('08/09/2020').toISOString(),
850
+ '2020-09-08T00:00:00.000Z'
851
+ )
852
+ })
853
+ it('should parse a US date', () => {
854
+ assert.equal(
855
+ Utils.parseNaiveDate('1/14/2020').toISOString(),
856
+ '2020-01-14T00:00:00.000Z'
857
+ )
858
+ })
841
859
  })
842
860
 
843
861
  describe('#isObject', () => {
umap/static/umap/vars.css CHANGED
@@ -2,7 +2,8 @@
2
2
  /* Colors. */
3
3
  --color-darkBlue: #263B58;
4
4
  --color-lighterGray: #f6f6f6;
5
- --color-lightGray: #ddd;
5
+ --color-veryLightGray: #ddd;
6
+ --color-lightGray: #d3d3d3;
6
7
  --color-mediumGray: #3e4444;
7
8
  --color-darkGray: #323737;
8
9
  --color-darkerGray: #2a2e30;
@@ -16,7 +17,11 @@
16
17
  --color-darkCyan: #009099;
17
18
  --color-veryDarkCyan: #046460;
18
19
  --color-red: #c60f13;
20
+ --color-darkOrange: #b36200;
19
21
  --color-darkRed: #5b2a2a;
22
+ --color-lightViolet: #c043ff;
23
+ --color-veryDarkerViolet: #472e54;
24
+ --color-veryDarkViolet: #562f6b;
20
25
 
21
26
  --background-color: var(--color-light);
22
27
  --color-accent: var(--color-brightCyan);
@@ -26,7 +31,7 @@
26
31
  /* Buttons. */
27
32
  --button-primary-background: var(--color-limeGreen);
28
33
  --button-primary-color: var(--color-darkBlue);
29
- --button-neutral-background: var(--color-lightGray);
34
+ --button-neutral-background: var(--color-veryLightGray);
30
35
  --button-neutral-color: var(--color-darkGray);
31
36
  --button-padding: 8px 16px;
32
37
  --button-padding-small: 2px 8px;
@@ -44,27 +49,30 @@
44
49
  --control-size: 36px;
45
50
  --border-radius: 4px;
46
51
  --box-padding: 20px;
47
- --small-box-padding: 4px;
52
+ --medium-box-padding: calc(var(--box-padding) / 2);
53
+ --small-box-padding: calc(var(--box-padding) / 4);
48
54
  --box-margin: 14px;
49
55
  --text-margin: 7px;
50
56
  --dialog-width: 40vw;
51
57
  --map-fragment-height: 210px;
52
58
 
53
59
  /* z-indexes (leaflet CSS sets the map at 400 by default) */
60
+ --zindex-tooltip: 510;
54
61
  --zindex-alert: 500;
55
62
  --zindex-loader: 490;
56
63
  --zindex-toolbar: 480;
57
64
  --zindex-autocomplete: 470;
58
65
  --zindex-dialog: 460;
59
- --zindex-contextmenu: 455;
60
- --zindex-tooltip: 445;
66
+ --zindex-contextmenu: 450;
61
67
  --zindex-panels: 440;
62
68
  --zindex-controls: 430;
63
69
  --zindex-dragover: 410;
64
70
  --zindex-orphan-marker: 401;
65
71
 
66
72
  --block-shadow: 0 1px 7px var(--color-mediumGray);
73
+ --transition: 300ms;
67
74
  }
75
+
68
76
  .dark {
69
77
  --background-color: var(--color-darkGray);
70
78
  --text-color: #efefef;
@@ -77,3 +85,13 @@
77
85
  --box-margin: 7px;
78
86
  }
79
87
  }
88
+
89
+ @media all and (max-width: 480px) {
90
+ :root {
91
+ --panel-gutter: 4px;
92
+ }
93
+
94
+ .umap-edit-enabled {
95
+ --header-height: 80px;
96
+ }
97
+ }
@@ -28,36 +28,39 @@
28
28
  <h3 role="alert">
29
29
  </h3>
30
30
  {% url "login" as login_url %}
31
- <p>
32
- <em>{% blocktranslate %}Pro-tip: to easily find back your maps, <a href="{{ login_url }}" target="_blank">create an account</a> or <a href="{{ login_url }}" target="_blank">log in</a>.{% endblocktranslate %}</em>
31
+ <p class="aplat">
32
+ {% blocktranslate %}Oops, I didn't mean it, I want to <a href="{{ login_url }}" class="login">create an account</a> or <a href="{{ login_url }}" class="login">log in</a> (no worry, we'll attach the map to your account).{% endblocktranslate %}
33
33
  </p>
34
- <div id="link-wrapper">
35
- <form>
36
- <label for="url">
37
- {% translate "Here is your secret link to edit the map, please keep it safe:" %}
38
- </label>
39
- <fieldset role="group">
40
- <input type="url" name="url" id="url">
41
- <input type="button" value="{% translate "Copy link" %}">
42
- </fieldset>
43
- </form>
44
- </div>
45
- <div id="form-wrapper" hidden>
46
- <form>
47
- <label for="email">
48
- {% translate "Enter your email address to receive the secret link:" %}
49
- </label>
50
- <fieldset role="group">
51
- <input type="email"
52
- name="email"
53
- id="email"
54
- placeholder="{% translate "Email" %}"
55
- required>
56
- <input type="submit"
57
- value="{% translate "Send me the link" %}"
58
- class="umap-action">
59
- </fieldset>
60
- </form>
34
+ <div class="anonymous soft-rounded aplat">
35
+ <h4><i class="icon icon-16 icon-anonymous"></i> {% trans "Yes, I want to continue editing anonymously, I will save the secret edit link to be able to edit this map later or on another device" %}</h4>
36
+ <div id="link-wrapper">
37
+ <form>
38
+ <label for="url">
39
+ {% translate "Here is your secret link to edit the map, please keep it safe:" %}
40
+ </label>
41
+ <fieldset role="group">
42
+ <input type="url" name="url" id="url">
43
+ <input type="button" value="{% translate "Copy link" %}">
44
+ </fieldset>
45
+ </form>
46
+ </div>
47
+ <div id="form-wrapper" hidden>
48
+ <form>
49
+ <label for="email">
50
+ {% translate "Enter your email address to receive the secret link:" %}
51
+ </label>
52
+ <fieldset role="group">
53
+ <input type="email"
54
+ name="email"
55
+ id="email"
56
+ placeholder="{% translate "Email" %}"
57
+ required>
58
+ <input type="submit"
59
+ value="{% translate "Send me the link" %}"
60
+ class="umap-action">
61
+ </fieldset>
62
+ </form>
63
+ </div>
61
64
  </div>
62
65
  </div>
63
66
  <ul class="buttons">
@@ -18,10 +18,10 @@
18
18
  href="{% static 'umap/vendors/iconlayers/iconLayers.css' %}" />
19
19
  <link rel="stylesheet" href="{% static 'umap/vars.css' %}" />
20
20
  <link rel="stylesheet" href="{% static 'umap/font.css' %}" />
21
- <link rel="stylesheet" href="{% static 'umap/css/icon.css' %}" />
22
21
  <link rel="stylesheet" href="{% static 'umap/base.css' %}" />
23
22
  <link rel="stylesheet" href="{% static 'umap/css/popup.css' %}" />
24
23
  <link rel="stylesheet" href="{% static 'umap/css/form.css' %}" />
24
+ <link rel="stylesheet" href="{% static 'umap/css/icon.css' %}" />
25
25
  <link rel="stylesheet" href="{% static 'umap/content.css' %}" />
26
26
  <link rel="stylesheet" href="{% static 'umap/nav.css' %}" />
27
27
  <link rel="stylesheet" href="{% static 'umap/map.css' %}" />
@@ -34,5 +34,6 @@
34
34
  <link rel="stylesheet" href="{% static 'umap/css/importers.css' %}" />
35
35
  <link rel="stylesheet" href="{% static 'umap/css/tableeditor.css' %}" />
36
36
  <link rel="stylesheet" href="{% static 'umap/css/bar.css' %}" />
37
+ <link rel="stylesheet" href="{% static 'umap/css/browser.css' %}" />
37
38
  <link rel="stylesheet" href="{% static 'umap/theme.css' %}" />
38
39
  {% endautoescape %}
@@ -5,19 +5,28 @@
5
5
  </h3>
6
6
  <script type="text/javascript">
7
7
  function proceed() {
8
- if (window.opener?.onLogin) {
9
- // We are in the normal process login
10
- window.opener.onLogin()
11
- window.close()
12
- } else {
13
- // we may be in login process that includes a magic link, so user
14
- // has opened a new window from this link, and we cannot close it then.
15
- window.location.href = '{% url "user_dashboard" %}'
8
+ if (window.BroadcastChannel) {
9
+ const bc = new BroadcastChannel('auth')
10
+ bc.onmessage = (event) => {
11
+ if (event.data === 'auth:close') {
12
+ window.close()
13
+ }
14
+ }
15
+ bc.postMessage('auth:ok')
16
16
  }
17
+ // In case the login was started in Javascript, the broadcasting would close this
18
+ // window, so we wait for the broadcasting to have a chance to finish the communication
19
+ // before trying to load the dashboard.
20
+ window.setTimeout(() => {
21
+ // We should arrive here in three situations:
22
+ // - the browser is older than 2022 and does not have BroadcastChannel API
23
+ // - the login process has opened another page/tab (like using a magic link)
24
+ // - the login was started from a content page (so not from the map page, and not in JS)
25
+ window.location.href = '{% url "user_dashboard" %}'
26
+ }, 1000)
17
27
  }
18
28
 
19
29
  proceed()
20
30
  // To handle errors, this template should be integrated into your authentication error message page
21
- // Note that you can call any window.opener function like window.opener.func
22
31
 
23
32
  </script>
@@ -1,8 +1,8 @@
1
+ {% load i18n %}
1
2
  <div class="wrapper">
2
3
  <div class="row">
3
4
  <div class="table-header">
4
5
  <form action="{{ request.get_full_path }}" method="get">
5
- <span>
6
6
  <label class="sr-only" for="q">
7
7
  {{ label_title }}
8
8
  </label>
@@ -11,7 +11,12 @@
11
11
  type="search"
12
12
  placeholder="{{ label_title }}"
13
13
  value="{{ request.GET.q|default:"" }}" />
14
- </span>
14
+ <select name="tags">
15
+ <option value="">{% trans "Any category" %}</option>
16
+ {% for value, label in UMAP_TAGS %}
17
+ <option value="{{ value }}" {% if request.GET.tags == value %}selected{% endif %}>{{ label }}</option>
18
+ {% endfor %}
19
+ </select>
15
20
  <input type="submit" value="{{ submit_label }}" />
16
21
  </form>
17
22
  {% if maps.object_list|length > 1 %}
@@ -24,12 +24,6 @@ def set_timeout(context):
24
24
  expect.set_options(timeout=timeout)
25
25
 
26
26
 
27
- @pytest.fixture(autouse=True)
28
- def mock_osm_tiles(page):
29
- if not bool(os.environ.get("PWDEBUG", False)):
30
- page.route(re.compile(r".*tile\..*"), mock_tiles)
31
-
32
-
33
27
  @pytest.fixture
34
28
  def new_page(context):
35
29
  def make_page(prefix="console"):
@@ -41,6 +35,8 @@ def new_page(context):
41
35
  else None,
42
36
  )
43
37
  page.on("pageerror", lambda exc: print(f"{prefix} uncaught exception: {exc}"))
38
+ if not bool(os.environ.get("PWDEBUG", os.environ.get("FORCE_TILES", False))):
39
+ page.route(re.compile(r".*tile\..*"), mock_tiles)
44
40
  return page
45
41
 
46
42
  yield make_page
@@ -51,6 +47,14 @@ def page(new_page):
51
47
  return new_page()
52
48
 
53
49
 
50
+ @pytest.fixture
51
+ def wait_for_loaded():
52
+ def _(page):
53
+ page.wait_for_function("() => U.MAP.dataloaded === true")
54
+
55
+ return _
56
+
57
+
54
58
  @pytest.fixture
55
59
  def login(new_page, settings, live_server):
56
60
  def do_login(user, **kwargs):