umap-project 2.3.1__py3-none-any.whl → 2.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.

Potentially problematic release.


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

Files changed (204) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/en/LC_MESSAGES/django.po +81 -31
  3. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/fr/LC_MESSAGES/django.po +117 -66
  5. umap/management/commands/run_websocket_server.py +23 -0
  6. umap/models.py +6 -1
  7. umap/settings/base.py +11 -3
  8. umap/static/umap/base.css +64 -184
  9. umap/static/umap/content.css +3 -2
  10. umap/static/umap/css/dialog.css +18 -0
  11. umap/static/umap/css/icon.css +8 -0
  12. umap/static/umap/css/importers.css +51 -0
  13. umap/static/umap/css/panel.css +18 -57
  14. umap/static/umap/css/tooltip.css +59 -0
  15. umap/static/umap/css/window.css +35 -0
  16. umap/static/umap/img/16-white.svg +1 -3
  17. umap/static/umap/img/alert-icon-error.svg +8 -0
  18. umap/static/umap/img/alert-icon-info.svg +4 -0
  19. umap/static/umap/img/alert-icon-success.svg +3 -0
  20. umap/static/umap/img/icon-external-link.svg +3 -0
  21. umap/static/umap/img/importers/communesfr.svg +5 -0
  22. umap/static/umap/img/importers/datasets.svg +13 -0
  23. umap/static/umap/img/importers/geodatamine.svg +10 -0
  24. umap/static/umap/img/importers/overpass.svg +7 -0
  25. umap/static/umap/img/importers/random.svg +18 -0
  26. umap/static/umap/img/importers/random1.svg +4 -0
  27. umap/static/umap/img/importers/random2.svg +4 -0
  28. umap/static/umap/img/source/16-white.svg +2 -4
  29. umap/static/umap/js/components/alerts/alert.css +160 -0
  30. umap/static/umap/js/components/alerts/alert.js +169 -0
  31. umap/static/umap/js/components/base.js +54 -0
  32. umap/static/umap/js/modules/autocomplete.js +347 -0
  33. umap/static/umap/js/modules/browser.js +6 -6
  34. umap/static/umap/js/modules/caption.js +5 -4
  35. umap/static/umap/js/modules/global.js +36 -12
  36. umap/static/umap/js/modules/help.js +255 -0
  37. umap/static/umap/js/modules/importer.js +308 -0
  38. umap/static/umap/js/modules/importers/communesfr.js +44 -0
  39. umap/static/umap/js/modules/importers/datasets.js +42 -0
  40. umap/static/umap/js/modules/importers/geodatamine.js +95 -0
  41. umap/static/umap/js/modules/importers/overpass.js +84 -0
  42. umap/static/umap/js/modules/request.js +12 -14
  43. umap/static/umap/js/modules/rules.js +241 -0
  44. umap/static/umap/js/modules/schema.js +63 -14
  45. umap/static/umap/js/modules/sync/engine.js +93 -0
  46. umap/static/umap/js/modules/sync/updaters.js +109 -0
  47. umap/static/umap/js/modules/sync/websocket.js +25 -0
  48. umap/static/umap/js/modules/ui/dialog.js +52 -0
  49. umap/static/umap/js/modules/{panel.js → ui/panel.js} +25 -14
  50. umap/static/umap/js/modules/ui/tooltip.js +116 -0
  51. umap/static/umap/js/modules/utils.js +25 -18
  52. umap/static/umap/js/umap.controls.js +13 -14
  53. umap/static/umap/js/umap.core.js +1 -324
  54. umap/static/umap/js/umap.features.js +77 -29
  55. umap/static/umap/js/umap.forms.js +9 -13
  56. umap/static/umap/js/umap.js +254 -215
  57. umap/static/umap/js/umap.layer.js +152 -74
  58. umap/static/umap/js/umap.permissions.js +5 -9
  59. umap/static/umap/js/umap.popup.js +1 -1
  60. umap/static/umap/js/umap.tableeditor.js +8 -8
  61. umap/static/umap/locale/am_ET.js +51 -16
  62. umap/static/umap/locale/am_ET.json +51 -16
  63. umap/static/umap/locale/ar.js +51 -16
  64. umap/static/umap/locale/ar.json +51 -16
  65. umap/static/umap/locale/ast.js +51 -16
  66. umap/static/umap/locale/ast.json +51 -16
  67. umap/static/umap/locale/bg.js +51 -16
  68. umap/static/umap/locale/bg.json +51 -16
  69. umap/static/umap/locale/br.js +55 -20
  70. umap/static/umap/locale/br.json +55 -20
  71. umap/static/umap/locale/ca.js +51 -16
  72. umap/static/umap/locale/ca.json +51 -16
  73. umap/static/umap/locale/cs_CZ.js +93 -58
  74. umap/static/umap/locale/cs_CZ.json +93 -58
  75. umap/static/umap/locale/da.js +51 -16
  76. umap/static/umap/locale/da.json +51 -16
  77. umap/static/umap/locale/de.js +56 -21
  78. umap/static/umap/locale/de.json +56 -21
  79. umap/static/umap/locale/el.js +51 -16
  80. umap/static/umap/locale/el.json +51 -16
  81. umap/static/umap/locale/en.js +52 -16
  82. umap/static/umap/locale/en.json +52 -16
  83. umap/static/umap/locale/en_US.json +51 -16
  84. umap/static/umap/locale/es.js +51 -16
  85. umap/static/umap/locale/es.json +51 -16
  86. umap/static/umap/locale/et.js +51 -16
  87. umap/static/umap/locale/et.json +51 -16
  88. umap/static/umap/locale/eu.js +51 -16
  89. umap/static/umap/locale/eu.json +51 -16
  90. umap/static/umap/locale/fa_IR.js +51 -16
  91. umap/static/umap/locale/fa_IR.json +51 -16
  92. umap/static/umap/locale/fi.js +51 -16
  93. umap/static/umap/locale/fi.json +51 -16
  94. umap/static/umap/locale/fr.js +61 -25
  95. umap/static/umap/locale/fr.json +61 -25
  96. umap/static/umap/locale/gl.js +51 -16
  97. umap/static/umap/locale/gl.json +51 -16
  98. umap/static/umap/locale/he.js +51 -16
  99. umap/static/umap/locale/he.json +51 -16
  100. umap/static/umap/locale/hr.js +51 -16
  101. umap/static/umap/locale/hr.json +51 -16
  102. umap/static/umap/locale/hu.js +51 -16
  103. umap/static/umap/locale/hu.json +51 -16
  104. umap/static/umap/locale/id.js +51 -16
  105. umap/static/umap/locale/id.json +51 -16
  106. umap/static/umap/locale/is.js +51 -16
  107. umap/static/umap/locale/is.json +51 -16
  108. umap/static/umap/locale/it.js +51 -16
  109. umap/static/umap/locale/it.json +51 -16
  110. umap/static/umap/locale/ja.js +51 -16
  111. umap/static/umap/locale/ja.json +51 -16
  112. umap/static/umap/locale/ko.js +51 -16
  113. umap/static/umap/locale/ko.json +51 -16
  114. umap/static/umap/locale/lt.js +51 -16
  115. umap/static/umap/locale/lt.json +51 -16
  116. umap/static/umap/locale/ms.js +51 -16
  117. umap/static/umap/locale/ms.json +51 -16
  118. umap/static/umap/locale/nl.js +51 -16
  119. umap/static/umap/locale/nl.json +51 -16
  120. umap/static/umap/locale/no.js +51 -16
  121. umap/static/umap/locale/no.json +51 -16
  122. umap/static/umap/locale/pl.js +93 -58
  123. umap/static/umap/locale/pl.json +93 -58
  124. umap/static/umap/locale/pl_PL.json +51 -16
  125. umap/static/umap/locale/pt.js +215 -180
  126. umap/static/umap/locale/pt.json +215 -180
  127. umap/static/umap/locale/pt_BR.js +51 -16
  128. umap/static/umap/locale/pt_BR.json +51 -16
  129. umap/static/umap/locale/pt_PT.js +51 -16
  130. umap/static/umap/locale/pt_PT.json +51 -16
  131. umap/static/umap/locale/ro.js +51 -16
  132. umap/static/umap/locale/ro.json +51 -16
  133. umap/static/umap/locale/ru.js +51 -16
  134. umap/static/umap/locale/ru.json +51 -16
  135. umap/static/umap/locale/si.js +51 -16
  136. umap/static/umap/locale/si.json +51 -16
  137. umap/static/umap/locale/sk_SK.js +51 -16
  138. umap/static/umap/locale/sk_SK.json +51 -16
  139. umap/static/umap/locale/sl.js +51 -16
  140. umap/static/umap/locale/sl.json +51 -16
  141. umap/static/umap/locale/sr.js +51 -16
  142. umap/static/umap/locale/sr.json +51 -16
  143. umap/static/umap/locale/sv.js +51 -16
  144. umap/static/umap/locale/sv.json +51 -16
  145. umap/static/umap/locale/th_TH.js +51 -16
  146. umap/static/umap/locale/th_TH.json +51 -16
  147. umap/static/umap/locale/tr.js +51 -16
  148. umap/static/umap/locale/tr.json +51 -16
  149. umap/static/umap/locale/uk_UA.js +51 -16
  150. umap/static/umap/locale/uk_UA.json +51 -16
  151. umap/static/umap/locale/vi.js +51 -16
  152. umap/static/umap/locale/vi.json +51 -16
  153. umap/static/umap/locale/vi_VN.json +51 -16
  154. umap/static/umap/locale/zh.js +51 -16
  155. umap/static/umap/locale/zh.json +51 -16
  156. umap/static/umap/locale/zh_CN.json +51 -16
  157. umap/static/umap/locale/zh_TW.Big5.json +51 -16
  158. umap/static/umap/locale/zh_TW.js +51 -16
  159. umap/static/umap/locale/zh_TW.json +51 -16
  160. umap/static/umap/map.css +40 -53
  161. umap/static/umap/unittests/sync.js +105 -0
  162. umap/static/umap/unittests/utils.js +78 -36
  163. umap/static/umap/vars.css +19 -1
  164. umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +2 -2
  165. umap/templates/umap/components/alerts/alert.html +89 -0
  166. umap/templates/umap/content.html +4 -3
  167. umap/templates/umap/css.html +4 -0
  168. umap/templates/umap/home.html +3 -0
  169. umap/templates/umap/js.html +0 -3
  170. umap/templates/umap/map_init.html +2 -8
  171. umap/templates/umap/messages.html +9 -11
  172. umap/templates/umap/search.html +3 -0
  173. umap/tests/base.py +2 -0
  174. umap/tests/integration/conftest.py +30 -0
  175. umap/tests/integration/test_anonymous_owned_map.py +8 -13
  176. umap/tests/integration/test_browser.py +77 -4
  177. umap/tests/integration/test_conditional_rules.py +201 -0
  178. umap/tests/integration/test_dashboard.py +1 -1
  179. umap/tests/integration/test_datalayer.py +2 -3
  180. umap/tests/integration/test_edit_datalayer.py +4 -4
  181. umap/tests/integration/test_edit_map.py +1 -1
  182. umap/tests/integration/test_facets_browser.py +3 -3
  183. umap/tests/integration/test_import.py +185 -49
  184. umap/tests/integration/test_map.py +31 -2
  185. umap/tests/integration/{test_collaborative_editing.py → test_optimistic_merge.py} +7 -7
  186. umap/tests/integration/test_owned_map.py +1 -1
  187. umap/tests/integration/test_picto.py +2 -2
  188. umap/tests/integration/test_statics.py +1 -1
  189. umap/tests/integration/test_view_marker.py +2 -2
  190. umap/tests/integration/test_websocket_sync.py +283 -0
  191. umap/tests/settings.py +5 -0
  192. umap/tests/test_datalayer_views.py +0 -1
  193. umap/tests/test_views.py +53 -0
  194. umap/urls.py +5 -0
  195. umap/views.py +40 -11
  196. umap/websocket_server.py +92 -0
  197. {umap_project-2.3.1.dist-info → umap_project-2.4.0.dist-info}/METADATA +10 -8
  198. {umap_project-2.3.1.dist-info → umap_project-2.4.0.dist-info}/RECORD +201 -167
  199. umap/static/umap/js/umap.autocomplete.js +0 -341
  200. umap/static/umap/js/umap.importer.js +0 -187
  201. umap/static/umap/js/umap.ui.js +0 -190
  202. {umap_project-2.3.1.dist-info → umap_project-2.4.0.dist-info}/WHEEL +0 -0
  203. {umap_project-2.3.1.dist-info → umap_project-2.4.0.dist-info}/entry_points.txt +0 -0
  204. {umap_project-2.3.1.dist-info → umap_project-2.4.0.dist-info}/licenses/LICENSE +0 -0
umap/models.py CHANGED
@@ -251,9 +251,14 @@ class Map(NamedModel):
251
251
  path = reverse("map_anonymous_edit_url", kwargs={"signature": signature})
252
252
  return settings.SITE_URL + path
253
253
 
254
+ def is_owner(self, user=None, request=None):
255
+ if user and self.owner == user:
256
+ return True
257
+ return self.is_anonymous_owner(request)
258
+
254
259
  def is_anonymous_owner(self, request):
255
260
  if not request or self.owner:
256
- # edit cookies are only valid while map hasn't owner
261
+ # edit cookies are only valid while the map doesn't have owner
257
262
  return False
258
263
  key, value = self.signed_cookie_elements
259
264
  try:
umap/settings/base.py CHANGED
@@ -1,11 +1,14 @@
1
1
  """Base settings shared by all environments"""
2
2
 
3
3
  # Import global settings to make it easier to extend settings.
4
+ import os
4
5
  from email.utils import parseaddr
5
6
 
6
7
  import environ
7
8
  from django.conf.locale import LANG_INFO
8
9
 
10
+ import umap as project_module
11
+
9
12
  env = environ.Env()
10
13
 
11
14
  # =============================================================================
@@ -137,9 +140,6 @@ FORM_RENDERER = "django.forms.renderers.DjangoTemplates"
137
140
  # Calculation of directories relative to the project module location
138
141
  # =============================================================================
139
142
 
140
- import os
141
-
142
- import umap as project_module
143
143
 
144
144
  PROJECT_DIR = os.path.dirname(os.path.realpath(project_module.__file__))
145
145
 
@@ -258,6 +258,7 @@ UMAP_DEFAULT_SHARE_STATUS = None
258
258
  UMAP_DEFAULT_EDIT_STATUS = None
259
259
  UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False
260
260
  UMAP_HOME_FEED = "latest"
261
+ UMAP_IMPORTERS = {}
261
262
 
262
263
  UMAP_READONLY = env("UMAP_READONLY", default=False)
263
264
  UMAP_GZIP = True
@@ -306,3 +307,10 @@ LOGGING = {
306
307
  },
307
308
  },
308
309
  }
310
+
311
+ # WebSocket configuration
312
+
313
+ WEBSOCKET_ENABLED = env.bool("WEBSOCKET_ENABLED", default=False)
314
+ WEBSOCKET_BACK_HOST = env("WEBSOCKET_BACK_HOST", default="localhost")
315
+ WEBSOCKET_BACK_PORT = env.int("WEBSOCKET_BACK_PORT", default=8001)
316
+ WEBSOCKET_FRONT_URI = env("WEBSOCKET_FRONT_URI", default="ws://localhost:8001")
umap/static/umap/base.css CHANGED
@@ -60,6 +60,27 @@ kbd {
60
60
  display: inline-block;
61
61
  white-space: nowrap;
62
62
  }
63
+ h3 {
64
+ font-size: 1rem;
65
+ }
66
+ h4 {
67
+ font-size: 0.9rem;
68
+ }
69
+ h5 {
70
+ font-size: 0.8rem;
71
+ }
72
+ h6 {
73
+ font-size: 0.7rem;
74
+ }
75
+ hgroup > * {
76
+ margin-bottom: 0;
77
+ }
78
+ hgroup {
79
+ margin-bottom: var(--box-margin);
80
+ }
81
+ hgroup > :not(:first-child):last-child {
82
+ font-weight: normal;
83
+ }
63
84
 
64
85
  /*
65
86
  * List
@@ -69,6 +90,9 @@ ul {
69
90
  list-style-position:inside;
70
91
  list-style-type:none;
71
92
  }
93
+ dt {
94
+ font-weight: bold;
95
+ }
72
96
 
73
97
  /* ************************************************* */
74
98
  /* *********************** GRID ******************** */
@@ -129,14 +153,20 @@ ul {
129
153
  margin-right: auto;
130
154
  float: none;
131
155
  }
132
-
156
+ .grid-container {
157
+ display: grid;
158
+ grid-template-columns: repeat(3, minmax(0, 1fr));
159
+ }
160
+ .grid-container > * {
161
+ text-align: center;
162
+ }
133
163
 
134
164
  /* *********** */
135
165
  /* forms */
136
166
  /* *********** */
137
167
  input[type="text"], input[type="password"], input[type="date"],
138
168
  input[type="datetime-local"], input[type="email"], input[type="number"],
139
- input[type="search"], input[type="tel"], input[type="time"],
169
+ input[type="search"], input[type="tel"], input[type="time"], input[type="file"],
140
170
  input[type="url"], textarea {
141
171
  background-color: white;
142
172
  border: 1px solid #CCCCCC;
@@ -145,9 +175,8 @@ input[type="url"], textarea {
145
175
  color: rgba(0, 0, 0, 0.75);
146
176
  display: block;
147
177
  font-family: inherit;
148
- font-size: 14px;
149
- height: 32px;
150
- margin: 0 0 14px;
178
+ margin: 0;
179
+ margin-bottom: var(--box-margin);
151
180
  padding: 7px;
152
181
  width: 100%;
153
182
  }
@@ -156,8 +185,11 @@ input[type="range"] {
156
185
  margin-bottom: 5px;
157
186
  width: 100%;
158
187
  }
188
+ input[type="radio"] {
189
+ margin-right: var(--text-margin);
190
+ }
159
191
  input[type="checkbox"] {
160
- margin: 0 5px;
192
+ margin: 0 var(--text-margin);
161
193
  vertical-align: middle;
162
194
  appearance: none;
163
195
  }
@@ -169,35 +201,12 @@ input[type="checkbox"]:after {
169
201
  border: 1px solid var(--color-lightGray);
170
202
  cursor: pointer;
171
203
  text-align: center;
172
- font-size: 1.3rem;
173
- line-height: 1rem;
204
+ font-size: 1rem;
205
+ line-height: 0.8rem;
174
206
  }
175
207
  input[type=checkbox]:checked:after {
176
208
  background-color: var(--color-lightCyan);
177
209
  content: '✓';
178
- }
179
- label input[type="radio"] {
180
- appearance: none;
181
- margin-right: 10px;
182
- }
183
- input[type="radio"]:after {
184
- display: inline-block;
185
- content: ' ';
186
- width: 12px;
187
- height: 12px;
188
- border-radius: 50%;
189
- border: 1px solid var(--color-lightGray);
190
- cursor: pointer;
191
- text-align: center;
192
- font-size: 1.3rem;
193
- line-height: 1rem;
194
- vertical-align: bottom;
195
- }
196
- label input[type="radio"]:checked:after {
197
- background-color: var(--color-lightCyan);
198
- content: '•';
199
- font-size: 3rem;
200
- line-height: 1.1rem;
201
210
  color: var(--color-darkGray);
202
211
  }
203
212
 
@@ -217,6 +226,7 @@ select {
217
226
  height: 28px;
218
227
  line-height: 28px;
219
228
  margin-top: 5px;
229
+ margin-bottom: var(--box-margin);
220
230
  }
221
231
  .dark select {
222
232
  color: #efefef;
@@ -266,6 +276,11 @@ button.flat,
266
276
  min-height: inherit;
267
277
  width: initial;
268
278
  display: initial;
279
+ line-height: inherit;
280
+ }
281
+ button.flat:hover,
282
+ [type="button"].flat:hover,
283
+ .dark [type="button"].flat:hover {
269
284
  text-decoration: underline;
270
285
  }
271
286
  .help-text, .helptext {
@@ -286,7 +301,6 @@ input + .help-text {
286
301
  }
287
302
  .formbox {
288
303
  min-height: 36px;
289
- line-height: 28px;
290
304
  margin-bottom: 14px;
291
305
  }
292
306
  .formbox.with-switch {
@@ -295,12 +309,19 @@ input + .help-text {
295
309
  .formbox select {
296
310
  width: calc(100% - 14px);
297
311
  }
312
+ fieldset.formbox {
313
+ border: none;
314
+ border-top: 1px solid var(--color-lightGray);
315
+ }
298
316
  label {
299
317
  display: block;
300
318
  font-size: 12px;
301
319
  line-height: 21px;
302
320
  width: 100%;
303
321
  }
322
+ label + label {
323
+ margin-top: var(--box-margin);
324
+ }
304
325
  .content label {
305
326
  font-weight: bold;
306
327
  }
@@ -361,7 +382,7 @@ details summary {
361
382
  border: 1px solid var(--color-darkGray);
362
383
  }
363
384
  fieldset legend {
364
- font-size: 1.1rem;
385
+ font-size: .9rem;
365
386
  padding: 0 5px;
366
387
  }
367
388
 
@@ -384,6 +405,9 @@ fieldset legend {
384
405
  border-radius: 50%;
385
406
  content: attr(data-badge);
386
407
  }
408
+ [hidden] {
409
+ display: none!important;
410
+ }
387
411
 
388
412
  /* Switch */
389
413
  input.switch:empty {
@@ -470,10 +494,13 @@ input.switch:checked ~ label:after {
470
494
  .button-bar.half {
471
495
  grid-template-columns: 1fr 1fr;
472
496
  }
497
+ .button-bar.by3,
498
+ .button-bar.by5,
473
499
  .umap-multiplechoice.by3,
474
500
  .umap-multiplechoice.by5 {
475
501
  grid-template-columns: 1fr 1fr 1fr;
476
502
  }
503
+ .button-bar.by4,
477
504
  .umap-multiplechoice.by4 {
478
505
  grid-template-columns: 1fr 1fr 1fr 1fr;
479
506
  }
@@ -757,148 +784,13 @@ input[type=hidden].blur + [type="button"] {
757
784
 
758
785
 
759
786
  /* *********** */
760
- /* Alerts */
761
- /* *********** */
762
- #umap-alert-container {
763
- min-height: 46px;
764
- line-height: 46px;
765
- padding-left: 10px;
766
- width: calc(100% - 500px);
767
- position: absolute;
768
- top: -46px;
769
- left: 250px; /* Keep save/cancel button accessible. */
770
- right: 250px;
771
- box-shadow: 0 1px 7px #999999;
772
- visibility: hidden;
773
- background: none repeat scroll 0 0 rgba(20, 22, 23, 0.8);
774
- font-weight: bold;
775
- color: #fff;
776
- font-size: 0.8em;
777
- z-index: 1012;
778
- border-radius: 2px;
779
- }
780
- #umap-alert-container.error {
781
- background-color: #c60f13;
782
- }
783
- .umap-alert #umap-alert-container {
784
- visibility: visible;
785
- top: 23px;
786
- }
787
- .umap-alert-container .umap-action {
788
- margin-left: 10px;
789
- background-color: #fff;
790
- color: #000;
791
- padding: 5px;
792
- border-radius: 4px;
793
- }
794
- .umap-alert-container .umap-action:hover {
795
- color: #000;
796
- }
797
- .umap-alert-container .error .umap-action {
798
- background-color: #666;
799
- color: #eee;
800
- }
801
- .umap-alert-container .error .umap-action:hover {
802
- color: #fff;
803
- }
804
- .umap-alert-container input {
805
- padding: 5px;
806
- border-radius: 4px;
807
- width: 100%;
808
- }
809
-
810
- /* *********** */
811
- /* Tooltip */
787
+ /* Various */
812
788
  /* *********** */
813
- #umap-tooltip-container {
814
- line-height: 20px;
815
- padding: 5px 10px;
816
- width: auto;
817
- position: absolute;
818
- box-shadow: 0 1px 7px #999999;
819
- display: none;
820
- background-color: rgba(40, 40, 40, 0.8);
821
- color: #eeeeec;
822
- font-size: 0.8em;
823
- border-radius: 2px;
824
- z-index: 1011;
825
- font-weight: normal;
826
- max-width: 300px;
827
- }
828
- .umap-tooltip #umap-tooltip-container {
829
- display: block;
830
- }
831
- #umap-tooltip-container.tooltip-top:after {
832
- top: 100%;
833
- left: calc(50% - 11px);
834
- border: solid transparent;
835
- content: " ";
836
- height: 0;
837
- width: 0;
838
- position: absolute;
839
- pointer-events: none;
840
- border-top-color: rgba(30, 30, 30, 0.8);
841
- border-width: 11px;
842
- margin-left: calc(-50% + 21px);
843
- }
844
- #umap-tooltip-container.tooltip-bottom:before {
845
- top: -22px;
846
- left: calc(50% - 11px);
847
- border: solid transparent;
848
- content: " ";
849
- height: 0;
850
- width: 0;
851
- position: absolute;
852
- pointer-events: none;
853
- border-top-color: rgba(30, 30, 30, 0.7);
854
- border-width: 11px;
855
- transform: rotate(180deg);
856
- }
857
- #umap-tooltip-container.tooltip.tooltip-left:after {
858
- left: 100%;
859
- top: 50%;
860
- border: solid transparent;
861
- content: " ";
862
- height: 0;
863
- width: 0;
864
- position: absolute;
865
- pointer-events: none;
866
- border-color: rgba(136, 183, 213, 0);
867
- border-left-color: #333;
868
- border-width: 11px;
869
- margin-top: -10px;
870
- }
871
-
872
789
 
873
-
874
- /* *********** */
875
- /* Close link */
876
- /* *********** */
877
- #umap-alert-container .umap-close-link {
878
- color: #fff;
879
- float: right;
880
- padding-right: 10px;
881
- width: 100px;
882
- line-height: 1;
883
- margin: .5rem;
884
- background-color: #202425;
885
- font-size: .7rem;
886
- }
887
- #umap-alert-container .umap-close-icon {
888
- background-position: -74px -55px;
889
- }
890
- #umap-alert-container .umap-alert-actions {
891
- display: flex;
892
- margin: 1rem;
790
+ .text {
791
+ word-break: break-word;
792
+ white-space: pre-line;
893
793
  }
894
- #umap-alert-container .umap-alert-actions .umap-action {
895
- margin-bottom: 0;
896
- }
897
-
898
-
899
- /* *********** */
900
- /* Various */
901
- /* *********** */
902
794
 
903
795
  .umap-dragover:before {
904
796
  content: ' ';
@@ -913,15 +805,3 @@ input[type=hidden].blur + [type="button"] {
913
805
  height: 100vh;
914
806
  opacity: 0.5;
915
807
  }
916
-
917
-
918
- /* *********** */
919
- /* Mobile */
920
- /* *********** */
921
- @media all and (orientation:portrait) {
922
- #umap-alert-container {
923
- width: 100%;
924
- left: 0;
925
- right: 0;
926
- }
927
- }
@@ -248,7 +248,7 @@ input[type="submit"],
248
248
  ul.umap-autocomplete {
249
249
  position: absolute;
250
250
  background-color: white;
251
- z-index: 1010;
251
+ z-index: 10100;
252
252
  box-shadow: 0 4px 9px #999999;
253
253
  }
254
254
  .umap-autocomplete li {
@@ -262,6 +262,7 @@ ul.umap-autocomplete {
262
262
  }
263
263
  .umap-singleresult {
264
264
  margin-bottom: 10px;
265
+ clear: both;
265
266
  }
266
267
  .umap-singleresult div,
267
268
  .umap-multiresult li {
@@ -300,7 +301,7 @@ ul.umap-autocomplete {
300
301
  }
301
302
 
302
303
  .messages .error {
303
- background-color: #c60f13;
304
+ background-color: var(--color-red);
304
305
  }
305
306
 
306
307
 
@@ -0,0 +1,18 @@
1
+ .umap-dialog {
2
+ z-index: 10001;
3
+ margin: auto;
4
+ margin-top: 100px;
5
+ width: 40vw;
6
+ max-width: 100vw;
7
+ max-height: 50vh;
8
+ padding: 20px;
9
+ border: 1px solid #222;
10
+ background-color: var(--background-color);
11
+ color: var(--text-color);
12
+ border-radius: 5px;
13
+ overflow-y: auto;
14
+ }
15
+ .umap-dialog .umap-close-link {
16
+ float: right;
17
+ width: 100px;
18
+ }
@@ -16,6 +16,14 @@
16
16
  .icon + span {
17
17
  margin-left: 10px;
18
18
  }
19
+ .icon-block {
20
+ display: block;
21
+ float: left;
22
+ margin-right: 10px;
23
+ }
24
+ .icon-block + span {
25
+ margin-left: 0;
26
+ }
19
27
  .dark .icon-16 {
20
28
  background-image: url('../img/16-white.svg');
21
29
  }
@@ -0,0 +1,51 @@
1
+ .importers h3 {
2
+ font-size: 1rem;
3
+ }
4
+ .importers h4 {
5
+ font-size: .9rem;
6
+ }
7
+
8
+ .importers ul [type=button] {
9
+ background: none;
10
+ font-size: 0.75rem;
11
+ border: none;
12
+ width: initial;
13
+ display: inline-block;
14
+ }
15
+ .importer h3:before {
16
+ background-image: url(../img/importers/random.svg);
17
+ background-repeat: no-repeat;
18
+ background-position: center;
19
+ content: '';
20
+ width: 36px;
21
+ height: 36px;
22
+ display: inline-block;
23
+ margin-right: 10px;
24
+ background-size: 100%;
25
+ vertical-align: -10px;
26
+ }
27
+ .importers ul [type=button]:before {
28
+ background-image: url(../img/importers/random.svg);
29
+ background-repeat: no-repeat;
30
+ background-position: center;
31
+ content: '';
32
+ width: 100%;
33
+ height: 50px;
34
+ display: block;
35
+ }
36
+ .importer.geodatamine h3:before,
37
+ .importers ul .geodatamine:before {
38
+ background-image: url(../img/importers/geodatamine.svg);
39
+ }
40
+ .importer.communesfr h3:before,
41
+ .importers ul .communesfr:before {
42
+ background-image: url(../img/importers/communesfr.svg);
43
+ }
44
+ .importer.overpass h3:before,
45
+ .importers ul .overpass:before {
46
+ background-image: url(../img/importers/overpass.svg);
47
+ }
48
+ .importer.datasets h3:before,
49
+ .importers ul .datasets:before {
50
+ background-image: url(../img/importers/datasets.svg);
51
+ }
@@ -7,14 +7,17 @@
7
7
  overflow-x: auto;
8
8
  z-index: 1010;
9
9
  background-color: var(--background-color);
10
+ color: var(--text-color);
10
11
  opacity: 0.98;
11
12
  cursor: initial;
12
13
  border-radius: 5px;
13
14
  border: 1px solid var(--color-lightGray);
15
+ bottom: calc(var(--current-footer-height) + var(--panel-bottom));
16
+ box-sizing: border-box;
17
+ counter-reset: step;
14
18
  }
15
19
  .panel.dark {
16
20
  border: 1px solid #222;
17
- color: #efefef;
18
21
  }
19
22
  .panel.full {
20
23
  width: initial;
@@ -23,18 +26,11 @@
23
26
  }
24
27
  .panel.full.on {
25
28
  visibility: visible;
26
- right: var(--panel-gutter);
29
+ right: calc(var(--panel-gutter) * 2 + var(--control-size));
27
30
  left: var(--panel-gutter);
28
- top: var(--header-height);
29
31
  height: initial;
30
32
  max-height: initial;
31
33
  }
32
- .umap-caption-bar-enabled .panel {
33
- bottom: calc(var(--footer-height) + var(--panel-bottom));
34
- }
35
- .panel {
36
- box-sizing: border-box;
37
- }
38
34
  .panel .umap-popup-content img {
39
35
  /* See https://github.com/Leaflet/Leaflet/commit/61d746818b99d362108545c151a27f09d60960ee#commitcomment-6061847 */
40
36
  max-width: 99% !important;
@@ -46,53 +42,26 @@
46
42
  height: calc(100% - var(--panel-header-height)); /* Minus size of toolbox */
47
43
  padding: var(--panel-gutter);
48
44
  }
49
- .panel .toolbox {
50
- padding: 5px 10px;
51
- overflow: hidden;
52
- display: flex;
53
- flex-direction: row-reverse;
54
- font-size: 10px;
55
- justify-content: flex-start;
56
- gap: 5px;
57
- line-height: 2.2em;
58
- background-color: #fff;
59
- position: sticky;
60
- top: 0;
61
- height: var(--panel-header-height);
62
- }
63
- .panel.dark .toolbox {
64
- background-color: var(--color-darkGray);
65
- }
66
- .panel .toolbox li {
67
- cursor: pointer;
68
- display: inline;
69
- padding: 0 2px;
70
- border: 1px solid #b6b6b3;
71
- border-radius: 2px;
72
- }
73
- .panel.dark .toolbox
74
- .panel.dark .toolbox li {
75
- color: #d3dfeb;
76
- border: 1px solid #202425;
77
- }
78
- .panel .toolbox li:hover {
79
- background-color: #d4d4d2;
45
+ .panel h3 {
46
+ line-height: 120%;
80
47
  }
81
- .panel.dark .toolbox li:hover {
82
- background-color: #353c3e;
48
+ .panel .counter::before {
49
+ counter-increment: step;
50
+ content: counter(step) ". ";
83
51
  }
84
- .panel h3 {
85
- line-height: 3;
52
+ .panel .counter {
53
+ display: block;
54
+ margin-top: var(--panel-gutter);
86
55
  }
87
56
  @media all and (orientation:landscape) {
88
57
  .panel {
89
- top: 0;
58
+ top: var(--current-header-height);
90
59
  margin-top: var(--panel-gutter);
91
60
  width: var(--panel-width);
92
61
  max-width: calc(100% - var(--panel-gutter) * 2 - var(--control-size))
93
62
  }
94
63
  .panel.condensed {
95
- max-height: 500px;
64
+ max-height: calc(min(500px, 100% - var(--current-header-height) - var(--current-footer-height) - var(--panel-gutter) * 2));
96
65
  bottom: initial;
97
66
  }
98
67
  .panel.right {
@@ -109,16 +78,13 @@
109
78
  right: calc(var(--panel-gutter) * 2 + var(--control-size));
110
79
  visibility: visible;
111
80
  }
112
- .umap-edit-enabled .panel {
113
- top: var(--header-height);
114
- }
115
81
  }
116
82
  @media all and (orientation:portrait) {
117
83
  .panel {
118
84
  height: 50%;
119
85
  max-height: 400px;
120
86
  width: 100%;
121
- bottom: 0;
87
+ bottom: var(--current-footer-height);
122
88
  right: -100%;
123
89
  }
124
90
  .panel.left {
@@ -130,16 +96,11 @@
130
96
  visibility: visible;
131
97
  }
132
98
  .panel.expanded {
133
- height: 100%;
134
- max-height: 100%;
99
+ height: calc(100% - var(--current-footer-height));
100
+ max-height: calc(100% - var(--current-footer-height));
135
101
  }
136
102
  .umap-caption-bar-enabled .panel {
137
- bottom: var(--footer-height);
138
103
  border-bottom-left-radius: 0;
139
104
  border-bottom-right-radius: 0;
140
105
  }
141
- .umap-caption-bar-enabled .panel.expanded {
142
- height: calc(100% - var(--footer-height));
143
- max-height: calc(100% - var(--footer-height));
144
- }
145
106
  }