umap-project 2.7.3__py3-none-any.whl → 2.8.0a0__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 (279) hide show
  1. umap/__init__.py +1 -1
  2. umap/forms.py +4 -14
  3. umap/locale/am_ET/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/am_ET/LC_MESSAGES/django.po +278 -151
  5. umap/locale/ar/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/ar/LC_MESSAGES/django.po +335 -141
  7. umap/locale/bg/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/bg/LC_MESSAGES/django.po +279 -152
  9. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/br/LC_MESSAGES/django.po +95 -79
  11. umap/locale/ca/LC_MESSAGES/django.mo +0 -0
  12. umap/locale/ca/LC_MESSAGES/django.po +85 -68
  13. umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
  14. umap/locale/cs_CZ/LC_MESSAGES/django.po +78 -66
  15. umap/locale/da/LC_MESSAGES/django.mo +0 -0
  16. umap/locale/da/LC_MESSAGES/django.po +280 -153
  17. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  18. umap/locale/de/LC_MESSAGES/django.po +80 -64
  19. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  20. umap/locale/el/LC_MESSAGES/django.po +82 -66
  21. umap/locale/en/LC_MESSAGES/django.po +73 -61
  22. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  23. umap/locale/es/LC_MESSAGES/django.po +75 -63
  24. umap/locale/et/LC_MESSAGES/django.mo +0 -0
  25. umap/locale/et/LC_MESSAGES/django.po +280 -153
  26. umap/locale/eu/LC_MESSAGES/django.mo +0 -0
  27. umap/locale/eu/LC_MESSAGES/django.po +82 -66
  28. umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
  29. umap/locale/fa_IR/LC_MESSAGES/django.po +80 -64
  30. umap/locale/fi/LC_MESSAGES/django.mo +0 -0
  31. umap/locale/fi/LC_MESSAGES/django.po +278 -151
  32. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  33. umap/locale/fr/LC_MESSAGES/django.po +75 -63
  34. umap/locale/gl/LC_MESSAGES/django.mo +0 -0
  35. umap/locale/gl/LC_MESSAGES/django.po +280 -153
  36. umap/locale/he/LC_MESSAGES/django.mo +0 -0
  37. umap/locale/he/LC_MESSAGES/django.po +281 -154
  38. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  39. umap/locale/hu/LC_MESSAGES/django.po +80 -64
  40. umap/locale/is/LC_MESSAGES/django.mo +0 -0
  41. umap/locale/is/LC_MESSAGES/django.po +280 -153
  42. umap/locale/it/LC_MESSAGES/django.mo +0 -0
  43. umap/locale/it/LC_MESSAGES/django.po +82 -66
  44. umap/locale/ja/LC_MESSAGES/django.mo +0 -0
  45. umap/locale/ja/LC_MESSAGES/django.po +280 -153
  46. umap/locale/ko/LC_MESSAGES/django.mo +0 -0
  47. umap/locale/ko/LC_MESSAGES/django.po +280 -153
  48. umap/locale/lt/LC_MESSAGES/django.mo +0 -0
  49. umap/locale/lt/LC_MESSAGES/django.po +280 -153
  50. umap/locale/ms/LC_MESSAGES/django.mo +0 -0
  51. umap/locale/ms/LC_MESSAGES/django.po +82 -66
  52. umap/locale/nl/LC_MESSAGES/django.mo +0 -0
  53. umap/locale/nl/LC_MESSAGES/django.po +280 -153
  54. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  55. umap/locale/pl/LC_MESSAGES/django.po +82 -66
  56. umap/locale/pt/LC_MESSAGES/django.mo +0 -0
  57. umap/locale/pt/LC_MESSAGES/django.po +75 -63
  58. umap/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  59. umap/locale/pt_BR/LC_MESSAGES/django.po +280 -153
  60. umap/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  61. umap/locale/pt_PT/LC_MESSAGES/django.po +280 -153
  62. umap/locale/ru/LC_MESSAGES/django.mo +0 -0
  63. umap/locale/ru/LC_MESSAGES/django.po +280 -153
  64. umap/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  65. umap/locale/sk_SK/LC_MESSAGES/django.po +280 -153
  66. umap/locale/sl/LC_MESSAGES/django.mo +0 -0
  67. umap/locale/sl/LC_MESSAGES/django.po +280 -153
  68. umap/locale/sr/LC_MESSAGES/django.mo +0 -0
  69. umap/locale/sr/LC_MESSAGES/django.po +280 -153
  70. umap/locale/sv/LC_MESSAGES/django.mo +0 -0
  71. umap/locale/sv/LC_MESSAGES/django.po +81 -65
  72. umap/locale/th_TH/LC_MESSAGES/django.mo +0 -0
  73. umap/locale/th_TH/LC_MESSAGES/django.po +257 -185
  74. umap/locale/tr/LC_MESSAGES/django.mo +0 -0
  75. umap/locale/tr/LC_MESSAGES/django.po +280 -153
  76. umap/locale/uk_UA/LC_MESSAGES/django.mo +0 -0
  77. umap/locale/uk_UA/LC_MESSAGES/django.po +280 -153
  78. umap/locale/vi/LC_MESSAGES/django.mo +0 -0
  79. umap/locale/vi/LC_MESSAGES/django.po +278 -151
  80. umap/locale/zh/LC_MESSAGES/django.mo +0 -0
  81. umap/locale/zh/LC_MESSAGES/django.po +278 -151
  82. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  83. umap/locale/zh_TW/LC_MESSAGES/django.po +97 -81
  84. umap/management/commands/empty_trash.py +32 -0
  85. umap/management/commands/migrate_to_S3.py +29 -0
  86. umap/migrations/0023_alter_datalayer_uuid.py +19 -0
  87. umap/migrations/0024_alter_map_share_status.py +30 -0
  88. umap/migrations/0025_alter_datalayer_geojson.py +24 -0
  89. umap/models.py +68 -116
  90. umap/settings/base.py +22 -2
  91. umap/static/umap/base.css +3 -603
  92. umap/static/umap/content.css +5 -3
  93. umap/static/umap/css/bar.css +202 -0
  94. umap/static/umap/css/form.css +617 -0
  95. umap/static/umap/css/icon.css +21 -1
  96. umap/static/umap/css/popup.css +125 -0
  97. umap/static/umap/img/16-white.svg +16 -4
  98. umap/static/umap/img/16.svg +1 -1
  99. umap/static/umap/img/source/16-white.svg +46 -45
  100. umap/static/umap/img/source/16.svg +1 -753
  101. umap/static/umap/js/components/fragment.js +3 -1
  102. umap/static/umap/js/modules/browser.js +20 -19
  103. umap/static/umap/js/modules/caption.js +21 -22
  104. umap/static/umap/js/modules/data/features.js +101 -74
  105. umap/static/umap/js/modules/data/layer.js +157 -137
  106. umap/static/umap/js/modules/facets.js +9 -9
  107. umap/static/umap/js/modules/formatter.js +5 -5
  108. umap/static/umap/js/modules/global.js +4 -52
  109. umap/static/umap/js/modules/help.js +18 -21
  110. umap/static/umap/js/modules/importer.js +71 -39
  111. umap/static/umap/js/modules/importers/cadastrefr.js +4 -0
  112. umap/static/umap/js/modules/importers/geodatamine.js +3 -3
  113. umap/static/umap/js/modules/importers/overpass.js +5 -0
  114. umap/static/umap/js/modules/permissions.js +85 -87
  115. umap/static/umap/js/modules/rendering/layers/base.js +15 -15
  116. umap/static/umap/js/modules/rendering/layers/classified.js +1 -1
  117. umap/static/umap/js/modules/rendering/layers/cluster.js +1 -1
  118. umap/static/umap/js/modules/rendering/layers/heat.js +1 -1
  119. umap/static/umap/js/modules/rendering/map.js +390 -0
  120. umap/static/umap/js/modules/rendering/popup.js +10 -9
  121. umap/static/umap/js/modules/rendering/template.js +35 -12
  122. umap/static/umap/js/modules/rendering/ui.js +57 -12
  123. umap/static/umap/js/modules/rules.js +22 -25
  124. umap/static/umap/js/modules/saving.js +47 -0
  125. umap/static/umap/js/modules/schema.js +5 -0
  126. umap/static/umap/js/modules/share.js +21 -24
  127. umap/static/umap/js/modules/slideshow.js +24 -20
  128. umap/static/umap/js/modules/sync/updaters.js +7 -9
  129. umap/static/umap/js/modules/tableeditor.js +20 -19
  130. umap/static/umap/js/modules/ui/bar.js +196 -0
  131. umap/static/umap/js/modules/ui/panel.js +10 -9
  132. umap/static/umap/js/modules/umap.js +1668 -0
  133. umap/static/umap/js/modules/urls.js +2 -2
  134. umap/static/umap/js/modules/utils.js +20 -6
  135. umap/static/umap/js/umap.controls.js +74 -301
  136. umap/static/umap/js/umap.core.js +29 -50
  137. umap/static/umap/js/umap.forms.js +34 -27
  138. umap/static/umap/keycloak.png +0 -0
  139. umap/static/umap/locale/am_ET.js +26 -10
  140. umap/static/umap/locale/am_ET.json +26 -10
  141. umap/static/umap/locale/ar.js +26 -10
  142. umap/static/umap/locale/ar.json +26 -10
  143. umap/static/umap/locale/ast.js +26 -10
  144. umap/static/umap/locale/ast.json +26 -10
  145. umap/static/umap/locale/bg.js +26 -10
  146. umap/static/umap/locale/bg.json +26 -10
  147. umap/static/umap/locale/br.js +27 -20
  148. umap/static/umap/locale/br.json +27 -20
  149. umap/static/umap/locale/ca.js +32 -29
  150. umap/static/umap/locale/ca.json +32 -29
  151. umap/static/umap/locale/cs_CZ.js +24 -17
  152. umap/static/umap/locale/cs_CZ.json +24 -17
  153. umap/static/umap/locale/da.js +26 -10
  154. umap/static/umap/locale/da.json +26 -10
  155. umap/static/umap/locale/de.js +21 -14
  156. umap/static/umap/locale/de.json +21 -14
  157. umap/static/umap/locale/el.js +28 -12
  158. umap/static/umap/locale/el.json +28 -12
  159. umap/static/umap/locale/en.js +12 -9
  160. umap/static/umap/locale/en.json +12 -9
  161. umap/static/umap/locale/en_US.json +26 -10
  162. umap/static/umap/locale/es.js +16 -13
  163. umap/static/umap/locale/es.json +16 -13
  164. umap/static/umap/locale/et.js +26 -10
  165. umap/static/umap/locale/et.json +26 -10
  166. umap/static/umap/locale/eu.js +16 -9
  167. umap/static/umap/locale/eu.json +16 -9
  168. umap/static/umap/locale/fa_IR.js +16 -9
  169. umap/static/umap/locale/fa_IR.json +16 -9
  170. umap/static/umap/locale/fi.js +26 -10
  171. umap/static/umap/locale/fi.json +26 -10
  172. umap/static/umap/locale/fr.js +12 -9
  173. umap/static/umap/locale/fr.json +12 -9
  174. umap/static/umap/locale/gl.js +26 -10
  175. umap/static/umap/locale/gl.json +26 -10
  176. umap/static/umap/locale/he.js +26 -10
  177. umap/static/umap/locale/he.json +26 -10
  178. umap/static/umap/locale/hr.js +26 -10
  179. umap/static/umap/locale/hr.json +26 -10
  180. umap/static/umap/locale/hu.js +16 -9
  181. umap/static/umap/locale/hu.json +16 -9
  182. umap/static/umap/locale/id.js +26 -10
  183. umap/static/umap/locale/id.json +26 -10
  184. umap/static/umap/locale/is.js +26 -10
  185. umap/static/umap/locale/is.json +26 -10
  186. umap/static/umap/locale/it.js +26 -10
  187. umap/static/umap/locale/it.json +26 -10
  188. umap/static/umap/locale/ja.js +26 -10
  189. umap/static/umap/locale/ja.json +26 -10
  190. umap/static/umap/locale/ko.js +26 -10
  191. umap/static/umap/locale/ko.json +26 -10
  192. umap/static/umap/locale/lt.js +26 -10
  193. umap/static/umap/locale/lt.json +26 -10
  194. umap/static/umap/locale/ms.js +28 -12
  195. umap/static/umap/locale/ms.json +28 -12
  196. umap/static/umap/locale/nl.js +28 -12
  197. umap/static/umap/locale/nl.json +28 -12
  198. umap/static/umap/locale/no.js +26 -10
  199. umap/static/umap/locale/no.json +26 -10
  200. umap/static/umap/locale/pl.js +28 -12
  201. umap/static/umap/locale/pl.json +28 -12
  202. umap/static/umap/locale/pl_PL.json +26 -10
  203. umap/static/umap/locale/pt.js +16 -9
  204. umap/static/umap/locale/pt.json +16 -9
  205. umap/static/umap/locale/pt_BR.js +26 -10
  206. umap/static/umap/locale/pt_BR.json +26 -10
  207. umap/static/umap/locale/pt_PT.js +16 -9
  208. umap/static/umap/locale/pt_PT.json +16 -9
  209. umap/static/umap/locale/ro.js +26 -10
  210. umap/static/umap/locale/ro.json +26 -10
  211. umap/static/umap/locale/ru.js +26 -10
  212. umap/static/umap/locale/ru.json +26 -10
  213. umap/static/umap/locale/si.js +7 -7
  214. umap/static/umap/locale/si.json +7 -7
  215. umap/static/umap/locale/sk_SK.js +26 -10
  216. umap/static/umap/locale/sk_SK.json +26 -10
  217. umap/static/umap/locale/sl.js +26 -10
  218. umap/static/umap/locale/sl.json +26 -10
  219. umap/static/umap/locale/sr.js +26 -10
  220. umap/static/umap/locale/sr.json +26 -10
  221. umap/static/umap/locale/sv.js +27 -11
  222. umap/static/umap/locale/sv.json +27 -11
  223. umap/static/umap/locale/th_TH.js +28 -12
  224. umap/static/umap/locale/th_TH.json +28 -12
  225. umap/static/umap/locale/tr.js +26 -10
  226. umap/static/umap/locale/tr.json +26 -10
  227. umap/static/umap/locale/uk_UA.js +26 -10
  228. umap/static/umap/locale/uk_UA.json +26 -10
  229. umap/static/umap/locale/vi.js +26 -10
  230. umap/static/umap/locale/vi.json +26 -10
  231. umap/static/umap/locale/vi_VN.json +26 -10
  232. umap/static/umap/locale/zh.js +26 -10
  233. umap/static/umap/locale/zh.json +26 -10
  234. umap/static/umap/locale/zh_CN.json +26 -10
  235. umap/static/umap/locale/zh_TW.Big5.json +26 -10
  236. umap/static/umap/locale/zh_TW.js +34 -27
  237. umap/static/umap/locale/zh_TW.json +34 -27
  238. umap/static/umap/map.css +5 -364
  239. umap/static/umap/unittests/URLs.js +15 -15
  240. umap/static/umap/unittests/utils.js +23 -1
  241. umap/static/umap/vars.css +2 -0
  242. umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +5 -1
  243. umap/storage.py +152 -0
  244. umap/templates/registration/login.html +7 -6
  245. umap/templates/umap/css.html +3 -0
  246. umap/templates/umap/js.html +1 -2
  247. umap/templates/umap/map_init.html +4 -5
  248. umap/templates/umap/user_dashboard.html +18 -19
  249. umap/tests/base.py +5 -1
  250. umap/tests/integration/conftest.py +2 -1
  251. umap/tests/integration/test_anonymous_owned_map.py +18 -10
  252. umap/tests/integration/test_browser.py +16 -1
  253. umap/tests/integration/test_dashboard.py +1 -1
  254. umap/tests/integration/test_edit_datalayer.py +18 -7
  255. umap/tests/integration/test_import.py +8 -5
  256. umap/tests/integration/test_optimistic_merge.py +31 -8
  257. umap/tests/integration/test_owned_map.py +22 -16
  258. umap/tests/integration/test_popup.py +44 -0
  259. umap/tests/integration/test_save.py +35 -0
  260. umap/tests/integration/test_view_marker.py +12 -0
  261. umap/tests/integration/test_view_polyline.py +257 -0
  262. umap/tests/integration/test_websocket_sync.py +81 -9
  263. umap/tests/test_datalayer.py +6 -7
  264. umap/tests/test_datalayer_s3.py +135 -0
  265. umap/tests/test_datalayer_views.py +28 -10
  266. umap/tests/test_empty_trash.py +34 -0
  267. umap/tests/test_map.py +12 -3
  268. umap/tests/test_map_views.py +69 -37
  269. umap/tests/test_views.py +53 -0
  270. umap/urls.py +3 -3
  271. umap/views.py +107 -76
  272. {umap_project-2.7.3.dist-info → umap_project-2.8.0a0.dist-info}/METADATA +16 -13
  273. {umap_project-2.7.3.dist-info → umap_project-2.8.0a0.dist-info}/RECORD +276 -262
  274. umap/management/commands/purge_purgatory.py +0 -28
  275. umap/static/umap/js/umap.js +0 -1903
  276. umap/tests/test_purge_purgatory.py +0 -25
  277. {umap_project-2.7.3.dist-info → umap_project-2.8.0a0.dist-info}/WHEEL +0 -0
  278. {umap_project-2.7.3.dist-info → umap_project-2.8.0a0.dist-info}/entry_points.txt +0 -0
  279. {umap_project-2.7.3.dist-info → umap_project-2.8.0a0.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
- "(area: {measure})": "(area: {measure})",
3
- "(length: {measure})": "(length: {measure})",
2
+ "(area: {measure})": "(面積:{measure})",
3
+ "(length: {measure})": "(長度:{measure})",
4
4
  "# one hash for main heading": "單個 # 代表主標題",
5
5
  "## two hashes for second heading": "兩個 # 代表次標題",
6
6
  "### three hashes for third heading": "三個 # 代表第三標題",
@@ -183,12 +183,12 @@
183
183
  "Icon shape": "圖示圖形",
184
184
  "Icon symbol": "圖示標誌",
185
185
  "If false, the polygon or line will act as a part of the underlying map.": "選擇「否」時,多邊形物件會被當成為底圖的一部分。",
186
- "Iframe with custom height (in px): {{{http://iframe.url.com|height}}}": "自訂 iframe 高度 ( px 為單位): {{{http://iframe.url.com|height}}}",
187
- "Iframe with custom height and width (in px): {{{http://iframe.url.com|height*width}}}": "自訂 iframe 高度和寬度 ( px 為單位):{{{http://iframe.url.com|height*width}}}",
186
+ "Iframe with custom height (in px): {{{https://iframe.url.com|height}}}": "Iframe with custom height (in px): {{{https://iframe.url.com|height}}}",
187
+ "Iframe with custom height and width (in px): {{{https://iframe.url.com|height*width}}}": "Iframe with custom height and width (in px): {{{https://iframe.url.com|height*width}}}",
188
188
  "iframe": "iframe",
189
- "Iframe: {{{http://iframe.url.com}}}": "Iframe: {{{http://iframe.url.com}}}",
190
- "Image with custom width (in px): {{http://image.url.com|width}}": "自訂圖像的寬度(像素): {{http://image.url.com|width}}",
191
- "Image: {{http://image.url.com}}": "圖像: {{http://image.url.com}}",
189
+ "Iframe: {{{https://iframe.url.com}}}": "Iframe: {{{https://iframe.url.com}}}",
190
+ "Image with custom width (in px): {{https://image.url.com|width}}": "Image with custom width (in px): {{https://image.url.com|width}}",
191
+ "Image: {{https://image.url.com}}": "Image: {{https://image.url.com}}",
192
192
  "Import data": "匯入資料",
193
193
  "Import in a new layer": "匯入至新圖層",
194
194
  "Imports all umap data, including layers and settings.": "匯入所有 umap 資料,包含圖層與設定。",
@@ -216,7 +216,7 @@
216
216
  "Limit bounds": "限制範圍",
217
217
  "Link to view the map": "檢視地圖的連結",
218
218
  "Link to…": "連結至...",
219
- "Link with text: [[http://example.com|text of the link]]": "帶有超連結的文字: [[http://example.com|text of the link]]",
219
+ "Link with text: [[https://example.com|text of the link]]": "Link with text: [[https://example.com|text of the link]]",
220
220
  "Long credits": "詳細工作人員名單",
221
221
  "Longitude": "經度",
222
222
  "Make main shape": "設為主要外形",
@@ -320,7 +320,7 @@
320
320
  "Show this layer in the caption": "在標題顯示此圖層",
321
321
  "Show/hide layer": "顯示/隱藏圖層",
322
322
  "Side panel": "側邊框",
323
- "Simple link: [[http://example.com]]": "簡單連結: [[http://example.com]]",
323
+ "Simple link: [[https://example.com]]": "Simple link: [[https://example.com]]",
324
324
  "Simplify": "簡化",
325
325
  "Skipping unknown geometry.type: {type}": "略過不明的 geometry.type: {type}",
326
326
  "Slideshow": "投影片",
@@ -445,7 +445,6 @@
445
445
  "More info about Overpass syntax": "更多 Overpass 語法資訊",
446
446
  "For more complex needs, see": "而更多複雜的需求,請見",
447
447
  "Choose data": "選擇日期",
448
- "Import helpers:": "匯入幫手:",
449
448
  "Choose the format": "選擇格式",
450
449
  "Choose the layer": "選擇圖層",
451
450
  "Layer name": "圖層名稱",
@@ -497,21 +496,29 @@
497
496
  "Expression is empty": "表示式為空白",
498
497
  "OK": "確認",
499
498
  "Cancel": "取消",
500
- "Attach map to a team": "Attach map to a team",
501
- "Display the polygon inverted": "Display the polygon inverted",
502
- "Proportional circles": "Proportional circles",
503
- "Property name to compute circles": "Property name to compute circles",
504
- "Min circle radius": "Min circle radius",
505
- "Max circle radius": "Max circle radius",
506
- "Display the open browser control": "Display the open browser control",
507
- "Copy as GeoJSON": "Copy as GeoJSON",
508
- "Please zoom in to edit the geometry": "Please zoom in to edit the geometry",
509
- "New map": "New map",
510
- "My maps": "My maps",
511
- "My teams": "My teams",
512
- "My profile": "My profile",
513
- "Type new owner's username": "Type new owner's username",
514
- "Type editor's username": "Type editor's username",
515
- "Map": "Map",
516
- "Manage collaborators": "Manage collaborators"
499
+ "Attach map to a team": "指定地圖到團隊",
500
+ "Display the polygon inverted": "顯示反向選擇的多邊形",
501
+ "Proportional circles": "部分圓圈",
502
+ "Property name to compute circles": "來計算圓圈的屬性名稱",
503
+ "Min circle radius": "最小圓圈半徑",
504
+ "Max circle radius": "最大圓圈半徑",
505
+ "Display the open browser control": "顯示開啟的瀏覽器控制",
506
+ "Copy as GeoJSON": " GeoJSON 複製",
507
+ "Please zoom in to edit the geometry": "請切換到編輯的幾何",
508
+ "New map": "新地圖",
509
+ "My maps": "我的地圖",
510
+ "My teams": "我的團隊",
511
+ "My profile": "我的個人檔案",
512
+ "Type new owner's username": "輸入新擁有者名稱",
513
+ "Type editor's username": "輸入編輯者名稱",
514
+ "Map": "地圖",
515
+ "Manage collaborators": "管理共編者",
516
+ "show/hide all layers": "顯示/隱藏所有圖層",
517
+ "zoom to data extent": "切換至資料範圍",
518
+ "download visible data": "下載可視資料",
519
+ "{connectedPeers} peer(s) currently connected to this map": "這份地圖已經有 {connectedPeers} 伙伴連線",
520
+ "Import helpers": "Import helpers",
521
+ "Import helpers will fill the URL field for you.": "Import helpers will fill the URL field for you.",
522
+ "Wikipedia": "Wikipedia",
523
+ "Save draft": "Save draft"
517
524
  }
umap/static/umap/map.css CHANGED
@@ -45,9 +45,6 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
45
45
  .umap-edit-enabled {
46
46
  --current-header-height: var(--header-height);
47
47
  }
48
- .umap-caption-bar-enabled {
49
- --current-footer-height: var(--footer-height);
50
- }
51
48
  .leaflet-top {
52
49
  top: var(--current-header-height);
53
50
  }
@@ -166,7 +163,7 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
166
163
  min-height: 23px;
167
164
  height: 23px;
168
165
  }
169
- .leaflet-control-edit-enable [type="button"]:before {
166
+ .edit-enable [type="button"]:before {
170
167
  content: ' ';
171
168
  width: 24px;
172
169
  height: 24px;
@@ -175,7 +172,7 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
175
172
  background-image: url('./img/16-white.svg');
176
173
  background-position: -48px -48px;
177
174
  }
178
- .leaflet-control-edit-enable [type="button"] {
175
+ .edit-enable [type="button"] {
179
176
  width: initial;
180
177
  padding: 0 20px;
181
178
  background-color: #353c3e;
@@ -187,7 +184,7 @@ html[dir="rtl"] .leaflet-tooltip-pane > * {
187
184
  display: block;
188
185
  }
189
186
  .leaflet-control-toolbar .leaflet-toolbar-icon.dark:hover,
190
- .leaflet-control-edit-enable [type="button"]:hover {
187
+ .edit-enable [type="button"]:hover {
191
188
  background-color: #4d5759;
192
189
  }
193
190
  .umap-permanent-credits-container {
@@ -476,245 +473,12 @@ ul.photon-autocomplete {
476
473
  .umap-edit-actions li:hover {
477
474
  background-color: #353c3e;
478
475
  }
479
-
480
-
481
- /* ********************************* */
482
- /* Edit main toolbox */
483
- /* ********************************* */
484
- .umap-main-edit-toolbox [type="button"] {
485
- color: #fff;
486
- font-size: 1.2em;
487
- border: none;
488
- background-color: var(--color-darkGray);
489
- width: auto;
490
- margin-bottom: 0;
491
- }
492
- .umap-main-edit-toolbox [type="button"]:hover {
493
- text-decoration: underline;
494
- }
495
-
496
- .leaflet-container [type="button"].umap-help-link {
497
- font-size: 12px;
498
- padding-bottom: 3px;
499
- background-color: inherit;
500
- }
501
- .leaflet-container .leaflet-control-edit-save,
502
- .leaflet-container .leaflet-control-edit-cancel,
503
- .leaflet-container .leaflet-control-edit-disable,
504
- .leaflet-container .leaflet-control-connected-peers
505
- {
506
- display: block;
507
- border: none;
508
- font-size: 12px;
509
- border-radius: 20px;
510
- color: #f8f8f8;
511
- height: 32px;
512
- line-height: 30px;
513
- padding: 0 20px;
514
- }
515
- .leaflet-container .leaflet-control-connected-peers,
516
- .dark [type="button"].leaflet-control-connected-peers:hover
517
- {
518
- background-color: var(--color-lightCyan);
519
- color: var(--color-dark);
520
- }
521
-
522
- .leaflet-container .leaflet-control-edit-disable:before,
523
- .leaflet-container .leaflet-control-edit-save:before,
524
- .leaflet-container .leaflet-control-edit-cancel:before,
525
- .leaflet-container .leaflet-control-connected-peers:before {
526
- display: inline-block;
527
- width: 19px;
528
- height: 24px;
529
- background-position: -50px -122px;
530
- background-repeat: no-repeat;
531
- background-image: url('./img/16-white.svg');
532
- vertical-align: middle;
533
- content: ' ';
534
- text-align: center;
535
- }
536
-
537
- .leaflet-container .leaflet-control-connected-peers:before {
538
- background-image: url('./img/16.svg');
539
- }
540
-
541
- .leaflet-container .leaflet-control-edit-disable span,
542
- .leaflet-container .leaflet-control-edit-save span,
543
- .leaflet-container .leaflet-control-edit-cancel span,
544
- .leaflet-container .leaflet-control-connected-peers span{
545
- margin-inline-start: 10px;
546
- }
547
- .leaflet-container .leaflet-control-edit-save:before {
548
- background-position: -148px -2px;
549
- }
550
- .leaflet-container .leaflet-control-edit-disable:before {
551
- background-position: -50px -25px;
552
- }
553
- .leaflet-container .leaflet-control-connected-peers:before {
554
- background-position: -2px -95px;
555
- }
556
- .leaflet-container .leaflet-control-edit-cancel,
557
- .leaflet-container .leaflet-control-edit-disable,
558
- .leaflet-container .leaflet-control-connected-peers{
559
- border: 0.5px solid rgba(153, 153, 153, 0.40);
560
- }
561
- .leaflet-container .leaflet-control-edit-cancel:hover,
562
- .leaflet-container .leaflet-control-edit-disable:hover {
563
- border: 0.5px solid rgba(153, 153, 153, 0.80);
564
- text-decoration: none;
565
- }
566
- .leaflet-container .leaflet-control-edit-save {
567
- opacity: 0.5;
568
- cursor: not-allowed;
569
- border-radius: 16px;
570
- border: 0.5px solid rgba(153, 153, 153, 0.40);
571
- background: rgba(153, 153, 153, 0.10);
572
- }
573
- .dark [type="button"].leaflet-control-edit-save:hover {
574
- background: rgba(153, 153, 153, 0.10);
575
- text-decoration: none;
576
- }
577
- .umap-is-dirty .leaflet-control-edit-save {
578
- opacity: 1;
579
- cursor: pointer;
580
- border: 0.5px solid rgba(66, 236, 230, 0.40);
581
- background: rgba(66, 236, 230, 0.10);
582
- color: #42ECE6;
583
- }
584
- .umap-is-dirty .leaflet-control-edit-save:before {
585
- background-position: -148px -26px;
586
- }
587
- .umap-is-dirty .dark [type="button"].leaflet-control-edit-save:hover {
588
- border-color: rgba(66, 236, 230, 0.80);
589
- background: rgba(66, 236, 230, 0.10);
590
- }
591
- .leaflet-container .leaflet-control-edit-save,
592
- .leaflet-container .leaflet-control-edit-cancel,
593
- .leaflet-container .leaflet-control-edit-disable,
594
- .umap-edit-enabled .leaflet-control-edit-enable {
595
- display: none;
596
- }
597
- .umap-edit-enabled .leaflet-control-edit-save,
598
- .umap-edit-enabled .leaflet-control-edit-disable,
599
- .umap-edit-enabled .umap-is-dirty .leaflet-control-edit-cancel {
600
- display: inline-block;
601
- }
602
- .umap-is-dirty .leaflet-control-edit-disable {
603
- display: none;
604
- }
605
- .umap-caption-bar {
606
- display: none;
607
- }
608
- .umap-main-edit-toolbox {
609
- top: -46px;
610
- position: absolute;
611
- width: 100%;
612
- left: 0;
613
- right: 0;
614
- height: 46px;
615
- padding: 0 10px;
616
- text-align: start;
617
- line-height: var(--control-size);
618
- cursor: auto;
619
- border-bottom: 1px solid #222;
620
- z-index: var(--zindex-panels);
621
- display: flex;
622
- justify-content: space-between;
623
- background-color: var(--background-color);
624
- color: var(--text-color);
625
- }
626
- .umap-left-edit-toolbox,
627
- .umap-right-edit-toolbox {
628
- display: flex;
629
- column-gap: 10px;
630
- }
631
- .umap-right-edit-toolbox {
632
- align-items: baseline;
633
- }
634
-
635
- .umap-main-edit-toolbox .logo {
636
- width: 39px;
637
- height: 100%;
638
- }
639
- .umap-main-edit-toolbox .logo a {
640
- background-image: url('./img/logo_small.svg');
641
- background-position: 0 center;
642
- background-repeat: no-repeat;
643
- display: inline-block;
644
- width: 39px;
645
- height: 100%;
646
- vertical-align: middle;
647
- text-indent: -9999px;
648
- }
649
- .umap-main-edit-toolbox .map-name {
650
- display: inline-block;
651
- overflow: hidden;
652
- white-space: nowrap;
653
- text-overflow: ellipsis;
654
- font-weight: bold;
655
- text-align: start;
656
- }
657
- .umap-main-edit-toolbox .share-status {
658
- font-size: 1em;
659
- font-style: italic;
660
- overflow: hidden;
661
- text-overflow: ellipsis;
662
- }
663
- .map-name:after {
664
- content: '\00a0';
665
- padding-inline-start: 3px;
666
- width: 1ch;
667
- display: inline-block;
668
- }
669
- .umap-is-dirty .map-name:after {
670
- content: '*';
671
- }
672
- .umap-edit-enabled .umap-main-edit-toolbox {
673
- top: 0;
674
- }
675
- .umap-caption-bar h3,
676
- .umap-main-edit-toolbox h3 {
677
- display: inline;
678
- }
679
- .umap-caption-bar button {
680
- margin-inline-start: 10px;
681
- }
682
- .umap-caption-bar button + button:before {
683
- content: '|';
684
- padding-inline-end: 10px;
685
- }
686
- .umap-main-edit-toolbox .umap-user {
687
- color: #fff;
688
- }
689
- .umap-main-edit-toolbox .umap-user:hover {
690
- text-decoration: underline;
691
- }
692
- .umap-main-edit-toolbox .umap-user:after {
693
- content: '|';
694
- padding-inline-start: 20px;
695
- display: inline-block; /* Prevents underline on hover. */
696
- }
697
- .umap-caption-bar-enabled .umap-caption-bar {
698
- display: block;
699
- height: var(--footer-height);
700
- background-color: #fff;
701
- width: 100%;
702
- position: absolute;
703
- left: 0;
704
- bottom: 0;
705
- right: 0;
706
- padding: var(--gutter);
707
- text-align: start;
708
- line-height: 100%;
709
- cursor: auto;
710
- border-top: 1px solid var(--color-lightGray);
711
- opacity: 0.93;
712
- z-index: var(--zindex-panels);
713
- }
714
476
  .umap-help {
715
477
  font-style: italic;
716
478
  }
717
479
 
480
+
481
+
718
482
  .umap-datalayer-version {
719
483
  padding: 5px 0;
720
484
  border-bottom: 1px solid #202425;
@@ -1025,54 +789,6 @@ a.umap-control-caption,
1025
789
  text-align: center;
1026
790
  }
1027
791
 
1028
- /* ********************************* */
1029
- /* Popup */
1030
- /* ********************************* */
1031
- .umap-popup {
1032
- display: flex;
1033
- flex-flow: column nowrap;
1034
- height:100%;
1035
- }
1036
-
1037
- .umap-popup-footer {
1038
- position: relative;
1039
- background-color: rgb(68, 68, 68);
1040
- color: white;
1041
- display: flex;
1042
- width: 100%;
1043
- margin-top: auto;
1044
- min-width: 99px;
1045
- border-radius: 2px;
1046
- max-height: 24px;
1047
- justify-content: space-around;
1048
- }
1049
- .umap-popup a:hover {
1050
- text-decoration: underline;
1051
- }
1052
- .popup-title {
1053
- display: flex;
1054
- align-items: center;
1055
- }
1056
- .popup-title .icon {
1057
- margin: 5px;
1058
- }
1059
- a[href^='mailto']::before {
1060
- content: '✉︎ ';
1061
- }
1062
- a[href^='tel']::before {
1063
- content: '☎︎ ';
1064
- }
1065
- address span {
1066
- padding-inline-end: 5px;
1067
- }
1068
- .osm-link {
1069
- margin-top: 10px;
1070
- text-align: end;
1071
- font-style: italic;
1072
- }
1073
- span.popup-icon {
1074
- padding: 5px;
1075
- }
1076
792
 
1077
793
 
1078
794
  /* ************* */
@@ -1403,75 +1119,6 @@ span.popup-icon {
1403
1119
  .leaflet-top, .leaflet-bottom {
1404
1120
  z-index: var(--zindex-controls);
1405
1121
  }
1406
- .leaflet-popup-content {
1407
- min-width: 200px;
1408
- line-height: inherit;
1409
- }
1410
- .leaflet-popup-content-wrapper, .leaflet-popup-tip {
1411
- box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
1412
- }
1413
- .leaflet-popup-content-wrapper {
1414
- border-radius: 4px;
1415
- }
1416
- .umap-popup-content {
1417
- max-height: 500px;
1418
- flex-grow: 1;
1419
- margin-bottom: 4px;
1420
- display: flex;
1421
- flex-direction: column;
1422
- overflow-y: auto;
1423
- overflow-x: hidden;
1424
- }
1425
- .umap-popup-content iframe {
1426
- min-width: 300px;
1427
- max-width: 100%;
1428
- }
1429
- .umap-popup-content tr:nth-child(odd) {
1430
- background-color: #f6f6f6;
1431
- }
1432
- .umap-popup-content th {
1433
- text-align: start;
1434
- }
1435
- .umap-popup-content td {
1436
- word-break: break-word;
1437
- }
1438
- .umap-popup-content th,
1439
- .umap-popup-content td {
1440
- padding: 1px 3px;
1441
- }
1442
- .umap-popup-container {
1443
- flex-grow: 1;
1444
- margin-bottom: 10px;
1445
- }
1446
- .umap-popup-container ul {
1447
- list-style-type: disc;
1448
- }
1449
- .leaflet-control-toolbar,
1450
- .leaflet-bar {
1451
- box-shadow: none;
1452
- }
1453
- .marker-cluster {
1454
- background-color: white;
1455
- width: 40px;
1456
- height: 40px;
1457
- }
1458
- .leaflet-contextmenu-icon {
1459
- display: none;
1460
- }
1461
- .umap-popup-large iframe {
1462
- /* See https://github.com/Leaflet/Leaflet/commit/61d746818b99d362108545c151a27f09d60960ee#commitcomment-6061847 */
1463
- max-width: 100% !important;
1464
- min-width: 500px;
1465
- }
1466
- .umap-popup-large .umap-popup-content {
1467
- width: 500px;
1468
- }
1469
- .umap-popup-content img {
1470
- max-width: 100%;
1471
- }
1472
- .umap-georss-link .popup-title {
1473
- text-align: center;
1474
- }
1475
1122
  .leaflet-inplace-toolbar {
1476
1123
  z-index: var(--zindex-toolbar)!important;
1477
1124
  }
@@ -1547,12 +1194,6 @@ span.popup-icon {
1547
1194
  .umap-permanent-credits-container {
1548
1195
  max-width: 100%;
1549
1196
  }
1550
- .umap-popup-large iframe {
1551
- min-width: 300px;
1552
- }
1553
- .umap-popup-large .umap-popup-content {
1554
- width: 300px;
1555
- }
1556
1197
 
1557
1198
  .attribution-toggle {
1558
1199
  display: inline-block;
@@ -8,10 +8,10 @@ import URLs from '../js/modules/urls.js'
8
8
  describe('URLs', () => {
9
9
  // Mock server URLs that will be used for testing
10
10
  const mockServerUrls = {
11
- map_create: '/maps/create',
12
- map_update: '/maps/{map_id}/update',
13
- datalayer_create: '/maps/{map_id}/datalayers/create',
14
- datalayer_update: '/maps/{map_id}/datalayers/{pk}/update',
11
+ map_create: '/maps/create/',
12
+ map_update: '/maps/{map_id}/update/',
13
+ datalayer_create: '/maps/{map_id}/datalayers/{pk}/create/',
14
+ datalayer_update: '/maps/{map_id}/datalayers/{pk}/update/',
15
15
  }
16
16
 
17
17
  let urls = new URLs(mockServerUrls)
@@ -22,37 +22,37 @@ describe('URLs', () => {
22
22
  })
23
23
 
24
24
  it('should return the correct templated URL for known urlNames', () => {
25
- expect(urls.get('map_create')).to.be.equal('/maps/create')
26
- expect(urls.get('map_update', { map_id: '123' })).to.be.equal('/maps/123/update')
25
+ expect(urls.get('map_create')).to.be.equal('/maps/create/')
26
+ expect(urls.get('map_update', { map_id: '123' })).to.be.equal('/maps/123/update/')
27
27
  })
28
28
 
29
29
  it('should return the correct templated URL when provided with parameters', () => {
30
30
  expect(urls.get('datalayer_update', { map_id: '123', pk: '456' })).to.be.equal(
31
- '/maps/123/datalayers/456/update'
31
+ '/maps/123/datalayers/456/update/'
32
32
  )
33
33
  })
34
34
  })
35
35
 
36
36
  describe('map_save()', () => {
37
37
  it('should return the create URL if no map_id is provided', () => {
38
- expect(urls.map_save({})).to.be.equal('/maps/create')
38
+ expect(urls.map_save({})).to.be.equal('/maps/create/')
39
39
  })
40
40
 
41
41
  it('should return the update URL if a map_id is provided', () => {
42
- expect(urls.map_save({ map_id: '123' })).to.be.equal('/maps/123/update')
42
+ expect(urls.map_save({ map_id: '123' })).to.be.equal('/maps/123/update/')
43
43
  })
44
44
  })
45
45
 
46
46
  describe('datalayer_save()', () => {
47
- it('should return the create URL if no pk is provided', () => {
48
- expect(urls.datalayer_save({ map_id: '123' })).to.be.equal(
49
- '/maps/123/datalayers/create'
47
+ it('should return the create URL if created is false', () => {
48
+ expect(urls.datalayer_save({ map_id: '123', pk: '00000000-0000-0000-0000-000000000000', created: false })).to.be.equal(
49
+ '/maps/123/datalayers/00000000-0000-0000-0000-000000000000/create/'
50
50
  )
51
51
  })
52
52
 
53
- it('should return the update URL if a pk is provided', () => {
54
- expect(urls.datalayer_save({ map_id: '123', pk: '456' })).to.be.equal(
55
- '/maps/123/datalayers/456/update'
53
+ it('should return the update URL if created is true', () => {
54
+ expect(urls.datalayer_save({ map_id: '123', pk: '00000000-0000-0000-0000-000000000000', created: true })).to.be.equal(
55
+ '/maps/123/datalayers/00000000-0000-0000-0000-000000000000/update/'
56
56
  )
57
57
  })
58
58
  })
@@ -147,7 +147,7 @@ describe('Utils', () => {
147
147
  )
148
148
  })
149
149
 
150
- it('should handle iframe with height with px', () => {
150
+ it('should handle double iframe', () => {
151
151
  assert.equal(
152
152
  Utils.toHTML(
153
153
  'A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}'
@@ -156,6 +156,15 @@ describe('Utils', () => {
156
156
  )
157
157
  })
158
158
 
159
+ it('should handle iframe with query string and space', () => {
160
+ assert.equal(
161
+ Utils.toHTML(
162
+ 'An iframe with query string: {{{https://osm.org/pouet.html?name=foobar&description=baz baz}}}'
163
+ ),
164
+ 'An iframe with query string: <div><iframe height="300px" width="100%" src="https://osm.org/pouet.html?name=foobar&amp;description=baz baz" frameborder="0"></iframe></div>'
165
+ )
166
+ })
167
+
159
168
  it('http link with http link as parameter as variable', () => {
160
169
  assert.equal(
161
170
  Utils.toHTML('A phrase with a [[http://iframeurl.com?to=http://another.com]].'),
@@ -263,6 +272,19 @@ describe('Utils', () => {
263
272
  )
264
273
  })
265
274
 
275
+ it('should process variables in http links', () => {
276
+ assert.equal(
277
+ Utils.greedyTemplate(
278
+ 'A phrase with a {{{https://osm.org/pouet?name={name}&description={description}}}}.',
279
+ {
280
+ name: 'foobar',
281
+ description: 'bazbaz',
282
+ }
283
+ ),
284
+ 'A phrase with a {{{https://osm.org/pouet?name=foobar&description=bazbaz}}}.'
285
+ )
286
+ })
287
+
266
288
  it('should not accept dash', () => {
267
289
  assert.equal(
268
290
  Utils.greedyTemplate('A phrase with a {var-iable}.', { 'var-iable': 'value' }),
umap/static/umap/vars.css CHANGED
@@ -2,9 +2,11 @@
2
2
  /* Colors. */
3
3
  --color-waterMint: #B9F5D2;
4
4
  --color-darkBlue: #263B58;
5
+ --color-lighterGray: #f6f6f6;
5
6
  --color-lightGray: #ddd;
6
7
  --color-mediumGray: #3e4444;
7
8
  --color-darkGray: #323737;
9
+ --color-darkerGray: #2a2e30;
8
10
  --color-light: white;
9
11
  --color-dark: black;
10
12
  --color-limeGreen: #b9f5d2;
@@ -63,7 +63,11 @@ L.FormBuilder = L.Evented.extend({
63
63
  const path = field.split('.')
64
64
  let value = this.obj
65
65
  for (const sub of path) {
66
- value = value[sub]
66
+ try {
67
+ value = value[sub]
68
+ } catch {
69
+ console.log(field)
70
+ }
67
71
  }
68
72
  return value
69
73
  },