umap-project 1.12.2__py3-none-any.whl → 1.13.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 (158) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/br/LC_MESSAGES/django.po +82 -54
  4. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  5. umap/locale/cs_CZ/LC_MESSAGES/django.po +82 -54
  6. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  7. umap/locale/el/LC_MESSAGES/django.po +86 -58
  8. umap/locale/en/LC_MESSAGES/django.po +79 -51
  9. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/es/LC_MESSAGES/django.po +82 -54
  11. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  12. umap/locale/fr/LC_MESSAGES/django.po +84 -56
  13. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  14. umap/locale/hu/LC_MESSAGES/django.po +108 -80
  15. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  16. umap/locale/it/LC_MESSAGES/django.po +82 -54
  17. umap/locale/ms/LC_MESSAGES/django.mo +0 -0
  18. umap/locale/ms/LC_MESSAGES/django.po +82 -54
  19. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  20. umap/locale/pl/LC_MESSAGES/django.po +82 -54
  21. umap/locale/sv/LC_MESSAGES/django.mo +0 -0
  22. umap/locale/sv/LC_MESSAGES/django.po +82 -54
  23. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  24. umap/locale/zh_TW/LC_MESSAGES/django.po +86 -58
  25. umap/models.py +29 -0
  26. umap/static/umap/base.css +33 -5
  27. umap/static/umap/content.css +41 -2
  28. umap/static/umap/img/16.svg +12 -2
  29. umap/static/umap/img/source/16.svg +165 -820
  30. umap/static/umap/js/umap.browser.js +9 -3
  31. umap/static/umap/js/umap.controls.js +45 -217
  32. umap/static/umap/js/umap.core.js +66 -30
  33. umap/static/umap/js/umap.forms.js +18 -31
  34. umap/static/umap/js/umap.icon.js +44 -21
  35. umap/static/umap/js/umap.js +5 -26
  36. umap/static/umap/js/umap.layer.js +68 -25
  37. umap/static/umap/js/umap.popup.js +87 -0
  38. umap/static/umap/js/umap.share.js +254 -0
  39. umap/static/umap/js/umap.ui.js +4 -2
  40. umap/static/umap/locale/am_ET.js +19 -9
  41. umap/static/umap/locale/am_ET.json +19 -9
  42. umap/static/umap/locale/ar.js +19 -9
  43. umap/static/umap/locale/ar.json +19 -9
  44. umap/static/umap/locale/ast.js +19 -9
  45. umap/static/umap/locale/ast.json +19 -9
  46. umap/static/umap/locale/bg.js +19 -9
  47. umap/static/umap/locale/bg.json +19 -9
  48. umap/static/umap/locale/br.js +22 -12
  49. umap/static/umap/locale/br.json +22 -12
  50. umap/static/umap/locale/ca.js +19 -9
  51. umap/static/umap/locale/ca.json +19 -9
  52. umap/static/umap/locale/cs_CZ.js +19 -9
  53. umap/static/umap/locale/cs_CZ.json +19 -9
  54. umap/static/umap/locale/da.js +19 -9
  55. umap/static/umap/locale/da.json +19 -9
  56. umap/static/umap/locale/de.js +19 -9
  57. umap/static/umap/locale/de.json +19 -9
  58. umap/static/umap/locale/el.js +19 -9
  59. umap/static/umap/locale/el.json +19 -9
  60. umap/static/umap/locale/en.js +19 -9
  61. umap/static/umap/locale/en.json +19 -9
  62. umap/static/umap/locale/en_US.json +19 -9
  63. umap/static/umap/locale/es.js +19 -9
  64. umap/static/umap/locale/es.json +19 -9
  65. umap/static/umap/locale/et.js +19 -9
  66. umap/static/umap/locale/et.json +19 -9
  67. umap/static/umap/locale/fa_IR.js +19 -9
  68. umap/static/umap/locale/fa_IR.json +19 -9
  69. umap/static/umap/locale/fi.js +19 -9
  70. umap/static/umap/locale/fi.json +19 -9
  71. umap/static/umap/locale/fr.js +19 -9
  72. umap/static/umap/locale/fr.json +19 -9
  73. umap/static/umap/locale/gl.js +19 -9
  74. umap/static/umap/locale/gl.json +19 -9
  75. umap/static/umap/locale/he.js +19 -9
  76. umap/static/umap/locale/he.json +19 -9
  77. umap/static/umap/locale/hr.js +19 -9
  78. umap/static/umap/locale/hr.json +19 -9
  79. umap/static/umap/locale/hu.js +19 -9
  80. umap/static/umap/locale/hu.json +19 -9
  81. umap/static/umap/locale/id.js +19 -9
  82. umap/static/umap/locale/id.json +19 -9
  83. umap/static/umap/locale/is.js +19 -9
  84. umap/static/umap/locale/is.json +19 -9
  85. umap/static/umap/locale/it.js +19 -9
  86. umap/static/umap/locale/it.json +19 -9
  87. umap/static/umap/locale/ja.js +19 -9
  88. umap/static/umap/locale/ja.json +19 -9
  89. umap/static/umap/locale/ko.js +19 -9
  90. umap/static/umap/locale/ko.json +19 -9
  91. umap/static/umap/locale/lt.js +19 -9
  92. umap/static/umap/locale/lt.json +19 -9
  93. umap/static/umap/locale/ms.js +19 -9
  94. umap/static/umap/locale/ms.json +19 -9
  95. umap/static/umap/locale/nl.js +19 -9
  96. umap/static/umap/locale/nl.json +19 -9
  97. umap/static/umap/locale/no.js +19 -9
  98. umap/static/umap/locale/no.json +19 -9
  99. umap/static/umap/locale/pl.js +19 -9
  100. umap/static/umap/locale/pl.json +19 -9
  101. umap/static/umap/locale/pl_PL.json +19 -9
  102. umap/static/umap/locale/pt.js +19 -9
  103. umap/static/umap/locale/pt.json +19 -9
  104. umap/static/umap/locale/pt_BR.js +19 -9
  105. umap/static/umap/locale/pt_BR.json +19 -9
  106. umap/static/umap/locale/pt_PT.js +19 -9
  107. umap/static/umap/locale/pt_PT.json +19 -9
  108. umap/static/umap/locale/ro.js +19 -9
  109. umap/static/umap/locale/ro.json +19 -9
  110. umap/static/umap/locale/ru.js +19 -9
  111. umap/static/umap/locale/ru.json +19 -9
  112. umap/static/umap/locale/sk_SK.js +19 -9
  113. umap/static/umap/locale/sk_SK.json +19 -9
  114. umap/static/umap/locale/sl.js +19 -9
  115. umap/static/umap/locale/sl.json +19 -9
  116. umap/static/umap/locale/sr.js +19 -9
  117. umap/static/umap/locale/sr.json +19 -9
  118. umap/static/umap/locale/sv.js +19 -9
  119. umap/static/umap/locale/sv.json +19 -9
  120. umap/static/umap/locale/th_TH.js +19 -9
  121. umap/static/umap/locale/th_TH.json +19 -9
  122. umap/static/umap/locale/tr.js +19 -9
  123. umap/static/umap/locale/tr.json +19 -9
  124. umap/static/umap/locale/uk_UA.js +19 -9
  125. umap/static/umap/locale/uk_UA.json +19 -9
  126. umap/static/umap/locale/vi.js +19 -9
  127. umap/static/umap/locale/vi.json +19 -9
  128. umap/static/umap/locale/vi_VN.json +19 -9
  129. umap/static/umap/locale/zh.js +19 -9
  130. umap/static/umap/locale/zh.json +19 -9
  131. umap/static/umap/locale/zh_CN.json +19 -9
  132. umap/static/umap/locale/zh_TW.Big5.json +19 -9
  133. umap/static/umap/locale/zh_TW.js +55 -45
  134. umap/static/umap/locale/zh_TW.json +55 -45
  135. umap/static/umap/map.css +76 -9
  136. umap/static/umap/test/Map.Export.js +3 -3
  137. umap/static/umap/test/Polygon.js +2 -2
  138. umap/static/umap/test/Polyline.js +2 -0
  139. umap/static/umap/test/index.html +1 -0
  140. umap/static/umap/vendors/leaflet/leaflet-src.esm.js +7055 -7054
  141. umap/static/umap/vendors/toolbar/leaflet.toolbar-src.js +1 -1
  142. umap/templates/auth/user_form.html +1 -1
  143. umap/templates/umap/content.html +1 -1
  144. umap/templates/umap/js.html +1 -0
  145. umap/templates/umap/map_list.html +1 -1
  146. umap/templates/umap/map_table.html +67 -35
  147. umap/templates/umap/user_dashboard.html +23 -1
  148. umap/templatetags/umap_tags.py +7 -27
  149. umap/tests/integration/test_edit_datalayer.py +45 -0
  150. umap/tests/integration/test_export_map.py +2 -3
  151. umap/tests/integration/test_facets_browser.py +86 -0
  152. umap/utils.py +17 -0
  153. umap/views.py +7 -18
  154. {umap_project-1.12.2.dist-info → umap_project-1.13.0.dist-info}/METADATA +4 -11
  155. {umap_project-1.12.2.dist-info → umap_project-1.13.0.dist-info}/RECORD +158 -155
  156. {umap_project-1.12.2.dist-info → umap_project-1.13.0.dist-info}/WHEEL +0 -0
  157. {umap_project-1.12.2.dist-info → umap_project-1.13.0.dist-info}/entry_points.txt +0 -0
  158. {umap_project-1.12.2.dist-info → umap_project-1.13.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/map.css CHANGED
@@ -239,6 +239,39 @@ ul.photon-autocomplete {
239
239
 
240
240
 
241
241
 
242
+ /* ***************************** */
243
+ /* Share and download panel */
244
+ /* ***************************** */
245
+ .download-file {
246
+ height: 1.2em;
247
+ min-height: 1.2em;
248
+ padding: 0;
249
+ text-align: left;
250
+ vertical-align: bottom;
251
+ }
252
+ .download-file:before,
253
+ .download-backup:before {
254
+ height: 24px;
255
+ width: 24px;
256
+ background-repeat: no-repeat;
257
+ background-image: url('./img/16.svg');
258
+ background-size: auto auto;
259
+ background-position: -4px -145px;
260
+ content: " ";
261
+ vertical-align: bottom;
262
+ display: inline-block;
263
+ }
264
+ .download-backup:before {
265
+ background-position: -27px -144px;
266
+ }
267
+ .leaflet-container .download-backup {
268
+ color: black;
269
+ display: block;
270
+ }
271
+ .vspace {
272
+ height: 32px;
273
+ }
274
+
242
275
  /* *********** */
243
276
  /* Draw */
244
277
  /* *********** */
@@ -1010,29 +1043,36 @@ a.add-datalayer:hover,
1010
1043
  background-color: #f8f8f3;
1011
1044
  }
1012
1045
  .umap-browse-features .feature-color {
1013
- box-shadow: 0 0 4px 0 black inset;
1014
- background-size: 70% 70%;
1015
- border: 4px solid #f8f8f3;
1046
+ box-shadow: 0 0 2px 0 black inset;
1016
1047
  cursor: inherit;
1017
1048
  -moz-box-sizing:border-box;
1018
1049
  -webkit-box-sizing:border-box;
1019
1050
  box-sizing: border-box;
1020
- background-position: center;
1051
+ background: none;
1021
1052
  display: inline-block;
1022
1053
  padding: 0;
1023
1054
  width: 24px;
1055
+ text-align: center;
1056
+ margin-left: 5px;
1057
+ }
1058
+ .umap-browse-features .feature-color img {
1059
+ width: 24px;
1060
+ }
1061
+ .umap-browse-features .feature-color span {
1062
+ font-style: normal;
1063
+ font-weight: bold;
1024
1064
  }
1025
1065
  .umap-browse-features .polygon .feature-color,
1026
1066
  .umap-browse-features .polyline .feature-color {
1027
- box-shadow: 0 0 4px 0 black inset;
1067
+ box-shadow: 0 0 2px 0 black inset;
1028
1068
  background-image: url('./img/24.svg');
1029
1069
  background-size: 500%;
1030
1070
  }
1031
1071
  .umap-browse-features .polyline .feature-color {
1032
- background-position: -48px -16px;
1072
+ background-position: -72px -23px;
1033
1073
  }
1034
1074
  .umap-browse-features .polygon .feature-color {
1035
- background-position: -32px -16px;
1075
+ background-position: -48px -25px;
1036
1076
  }
1037
1077
  .show-on-edit {
1038
1078
  display: none!important;
@@ -1046,11 +1086,14 @@ a.add-datalayer:hover,
1046
1086
  .umap-edit-enabled .show-on-edit.block {
1047
1087
  display: block!important;
1048
1088
  }
1049
-
1050
1089
  .umap-browse-description {
1051
1090
  font-size: 0.9em;
1052
1091
  margin-bottom: 14px;
1053
1092
  }
1093
+ .datalayer-counter {
1094
+ float: right;
1095
+ margin-right: 5px;
1096
+ }
1054
1097
 
1055
1098
 
1056
1099
  /* ********************************* */
@@ -1266,6 +1309,31 @@ a.add-datalayer:hover,
1266
1309
  .umap-popup a:hover {
1267
1310
  text-decoration: underline;
1268
1311
  }
1312
+ .popup-title {
1313
+ display: flex;
1314
+ align-items: center;
1315
+ }
1316
+ .popup-title .icon {
1317
+ margin: 5px;
1318
+ }
1319
+ a[href^='mailto']::before {
1320
+ content: '🖃 ';
1321
+ }
1322
+ a[href^='tel']::before {
1323
+ content: '🕿 ';
1324
+ }
1325
+ address span {
1326
+ padding-right: 5px;
1327
+ }
1328
+ .osm-link {
1329
+ margin-top: 10px;
1330
+ text-align: right;
1331
+ font-style: italic;
1332
+ }
1333
+ span.popup-icon {
1334
+ padding: 5px;
1335
+ }
1336
+
1269
1337
 
1270
1338
  /* ************* */
1271
1339
  /* Marker's Icon */
@@ -1354,7 +1422,6 @@ a.add-datalayer:hover,
1354
1422
  .umap-div-icon .icon_container span,
1355
1423
  .umap-drop-icon .icon_container span {
1356
1424
  vertical-align: middle;
1357
- color: white;
1358
1425
  font-weight: bold;
1359
1426
  }
1360
1427
  .umap-circle-icon {
@@ -20,7 +20,7 @@ describe('L.U.Map.Export', function () {
20
20
 
21
21
  describe('#formatters()', function () {
22
22
  it('should export to geojson', function () {
23
- const { content, filetype, filename } = this.map.format('geojson')
23
+ const { content, filetype, filename } = this.map.share.format('geojson')
24
24
  assert.equal(filetype, 'application/json')
25
25
  assert.equal(filename, 'name_of_the_map.geojson')
26
26
  assert.deepEqual(JSON.parse(content), {
@@ -86,7 +86,7 @@ describe('L.U.Map.Export', function () {
86
86
  })
87
87
 
88
88
  it('should export to gpx', function () {
89
- const { content, filetype, filename } = this.map.format('gpx')
89
+ const { content, filetype, filename } = this.map.share.format('gpx')
90
90
  assert.equal(filetype, 'application/gpx+xml')
91
91
  assert.equal(filename, 'name_of_the_map.gpx')
92
92
  const expected =
@@ -95,7 +95,7 @@ describe('L.U.Map.Export', function () {
95
95
  })
96
96
 
97
97
  it('should export to kml', function () {
98
- const { content, filetype, filename } = this.map.format('kml')
98
+ const { content, filetype, filename } = this.map.share.format('kml')
99
99
  assert.equal(filetype, 'application/vnd.google-earth.kml+xml')
100
100
  assert.equal(filename, 'name_of_the_map.kml')
101
101
  const expected =
@@ -216,7 +216,7 @@ describe('L.U.Polygon', function () {
216
216
  assert.notOk(qst('Transfer shape to edited feature'))
217
217
  })
218
218
 
219
- it('should allow to transfer shape when another polygon is edited', function (done) {
219
+ it('should allow to transfer shape when another polygon is edited', function () {
220
220
  this.datalayer.empty()
221
221
  var layer = new L.U.Polygon(
222
222
  this.map,
@@ -231,7 +231,7 @@ describe('L.U.Polygon', function () {
231
231
  ).addTo(this.datalayer)
232
232
  happen.once(other._path, { type: 'contextmenu' })
233
233
  assert.equal(qst('Transfer shape to edited feature'), 1)
234
- done()
234
+ layer.remove()
235
235
  })
236
236
  })
237
237
  })
@@ -175,6 +175,8 @@ describe('L.U.Polyline', function () {
175
175
  other.edit()
176
176
  happen.once(layer._path, { type: 'contextmenu' })
177
177
  assert.equal(qst('Transfer shape to edited feature'), 1)
178
+ other.remove()
179
+ layer.remove()
178
180
  })
179
181
 
180
182
  it('should allow to merge lines when multi', function () {
@@ -43,6 +43,7 @@
43
43
  <script src="../js/umap.datalayer.permissions.js"></script>
44
44
  <script src="../js/umap.browser.js"></script>
45
45
  <script src="../js/umap.importer.js"></script>
46
+ <script src="../js/umap.share.js"></script>
46
47
  <script src="../js/umap.js"></script>
47
48
  <script src="../js/umap.ui.js"></script>
48
49
  <link rel="stylesheet" href="../vendors/leaflet/leaflet.css" />