umap-project 3.0.3__py3-none-any.whl → 3.0.5__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 (161) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/el/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/el/LC_MESSAGES/django.po +136 -56
  4. umap/locale/en/LC_MESSAGES/django.po +18 -18
  5. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/es/LC_MESSAGES/django.po +136 -56
  7. umap/locale/nl/LC_MESSAGES/django.mo +0 -0
  8. umap/locale/nl/LC_MESSAGES/django.po +1 -1
  9. umap/models.py +1 -0
  10. umap/settings/base.py +1 -0
  11. umap/static/umap/css/bar.css +1 -1
  12. umap/static/umap/css/form.css +44 -44
  13. umap/static/umap/css/tooltip.css +13 -0
  14. umap/static/umap/js/modules/autocomplete.js +7 -8
  15. umap/static/umap/js/modules/browser.js +89 -94
  16. umap/static/umap/js/modules/caption.js +6 -4
  17. umap/static/umap/js/modules/data/features.js +1 -19
  18. umap/static/umap/js/modules/data/layer.js +100 -61
  19. umap/static/umap/js/modules/facets.js +1 -1
  20. umap/static/umap/js/modules/form/fields.js +1 -1
  21. umap/static/umap/js/modules/importer.js +1 -1
  22. umap/static/umap/js/modules/managers.js +46 -0
  23. umap/static/umap/js/modules/permissions.js +1 -1
  24. umap/static/umap/js/modules/rendering/controls.js +251 -0
  25. umap/static/umap/js/modules/rendering/layers/heat.js +5 -0
  26. umap/static/umap/js/modules/rendering/map.js +21 -10
  27. umap/static/umap/js/modules/rendering/ui.js +0 -1
  28. umap/static/umap/js/modules/rules.js +56 -46
  29. umap/static/umap/js/modules/schema.js +5 -1
  30. umap/static/umap/js/modules/share.js +2 -2
  31. umap/static/umap/js/modules/slideshow.js +1 -1
  32. umap/static/umap/js/modules/sync/engine.js +23 -9
  33. umap/static/umap/js/modules/ui/bar.js +2 -2
  34. umap/static/umap/js/modules/ui/base.js +13 -0
  35. umap/static/umap/js/modules/umap.js +70 -113
  36. umap/static/umap/js/umap.controls.js +0 -310
  37. umap/static/umap/js/umap.core.js +0 -40
  38. umap/static/umap/locale/am_ET.js +8 -3
  39. umap/static/umap/locale/am_ET.json +8 -3
  40. umap/static/umap/locale/ar.js +8 -3
  41. umap/static/umap/locale/ar.json +8 -3
  42. umap/static/umap/locale/ast.js +8 -3
  43. umap/static/umap/locale/ast.json +8 -3
  44. umap/static/umap/locale/bg.js +8 -3
  45. umap/static/umap/locale/bg.json +8 -3
  46. umap/static/umap/locale/br.js +8 -3
  47. umap/static/umap/locale/br.json +8 -3
  48. umap/static/umap/locale/ca.js +27 -22
  49. umap/static/umap/locale/ca.json +27 -22
  50. umap/static/umap/locale/cs_CZ.js +5 -2
  51. umap/static/umap/locale/cs_CZ.json +5 -2
  52. umap/static/umap/locale/da.js +8 -3
  53. umap/static/umap/locale/da.json +8 -3
  54. umap/static/umap/locale/de.js +5 -2
  55. umap/static/umap/locale/de.json +5 -2
  56. umap/static/umap/locale/el.js +92 -87
  57. umap/static/umap/locale/el.json +92 -87
  58. umap/static/umap/locale/en.js +5 -2
  59. umap/static/umap/locale/en.json +5 -2
  60. umap/static/umap/locale/en_US.json +8 -3
  61. umap/static/umap/locale/es.js +18 -15
  62. umap/static/umap/locale/es.json +18 -15
  63. umap/static/umap/locale/et.js +8 -3
  64. umap/static/umap/locale/et.json +8 -3
  65. umap/static/umap/locale/eu.js +5 -2
  66. umap/static/umap/locale/eu.json +5 -2
  67. umap/static/umap/locale/fa_IR.js +5 -2
  68. umap/static/umap/locale/fa_IR.json +5 -2
  69. umap/static/umap/locale/fi.js +8 -3
  70. umap/static/umap/locale/fi.json +8 -3
  71. umap/static/umap/locale/fr.js +5 -2
  72. umap/static/umap/locale/fr.json +5 -2
  73. umap/static/umap/locale/gl.js +5 -2
  74. umap/static/umap/locale/gl.json +5 -2
  75. umap/static/umap/locale/he.js +8 -3
  76. umap/static/umap/locale/he.json +8 -3
  77. umap/static/umap/locale/hr.js +8 -3
  78. umap/static/umap/locale/hr.json +8 -3
  79. umap/static/umap/locale/hu.js +5 -2
  80. umap/static/umap/locale/hu.json +5 -2
  81. umap/static/umap/locale/id.js +8 -3
  82. umap/static/umap/locale/id.json +8 -3
  83. umap/static/umap/locale/is.js +8 -3
  84. umap/static/umap/locale/is.json +8 -3
  85. umap/static/umap/locale/it.js +5 -2
  86. umap/static/umap/locale/it.json +5 -2
  87. umap/static/umap/locale/ja.js +8 -3
  88. umap/static/umap/locale/ja.json +8 -3
  89. umap/static/umap/locale/ko.js +8 -3
  90. umap/static/umap/locale/ko.json +8 -3
  91. umap/static/umap/locale/lt.js +8 -3
  92. umap/static/umap/locale/lt.json +8 -3
  93. umap/static/umap/locale/ms.js +8 -3
  94. umap/static/umap/locale/ms.json +8 -3
  95. umap/static/umap/locale/nl.js +7 -4
  96. umap/static/umap/locale/nl.json +7 -4
  97. umap/static/umap/locale/no.js +8 -3
  98. umap/static/umap/locale/no.json +8 -3
  99. umap/static/umap/locale/pl.js +8 -3
  100. umap/static/umap/locale/pl.json +8 -3
  101. umap/static/umap/locale/pl_PL.json +8 -3
  102. umap/static/umap/locale/pt.js +5 -2
  103. umap/static/umap/locale/pt.json +5 -2
  104. umap/static/umap/locale/pt_BR.js +8 -3
  105. umap/static/umap/locale/pt_BR.json +8 -3
  106. umap/static/umap/locale/pt_PT.js +5 -2
  107. umap/static/umap/locale/pt_PT.json +5 -2
  108. umap/static/umap/locale/ro.js +8 -3
  109. umap/static/umap/locale/ro.json +8 -3
  110. umap/static/umap/locale/ru.js +8 -3
  111. umap/static/umap/locale/ru.json +8 -3
  112. umap/static/umap/locale/sk_SK.js +8 -3
  113. umap/static/umap/locale/sk_SK.json +8 -3
  114. umap/static/umap/locale/sl.js +8 -3
  115. umap/static/umap/locale/sl.json +8 -3
  116. umap/static/umap/locale/sr.js +8 -3
  117. umap/static/umap/locale/sr.json +8 -3
  118. umap/static/umap/locale/sv.js +8 -3
  119. umap/static/umap/locale/sv.json +8 -3
  120. umap/static/umap/locale/th_TH.js +8 -3
  121. umap/static/umap/locale/th_TH.json +8 -3
  122. umap/static/umap/locale/tr.js +8 -3
  123. umap/static/umap/locale/tr.json +8 -3
  124. umap/static/umap/locale/uk_UA.js +8 -3
  125. umap/static/umap/locale/uk_UA.json +8 -3
  126. umap/static/umap/locale/vi.js +8 -3
  127. umap/static/umap/locale/vi.json +8 -3
  128. umap/static/umap/locale/vi_VN.json +8 -3
  129. umap/static/umap/locale/zh.js +8 -3
  130. umap/static/umap/locale/zh.json +8 -3
  131. umap/static/umap/locale/zh_CN.json +8 -3
  132. umap/static/umap/locale/zh_TW.Big5.json +8 -3
  133. umap/static/umap/locale/zh_TW.js +5 -2
  134. umap/static/umap/locale/zh_TW.json +5 -2
  135. umap/static/umap/map.css +11 -33
  136. umap/static/umap/vars.css +4 -0
  137. umap/static/umap/vendors/togeojson/togeojson.es.js +350 -177
  138. umap/static/umap/vendors/togeojson/togeojson.es.mjs.map +1 -1
  139. umap/templates/umap/design_system.html +355 -0
  140. umap/tests/base.py +2 -2
  141. umap/tests/fixtures/heatmap_data.json +1044 -0
  142. umap/tests/integration/test_browser.py +3 -3
  143. umap/tests/integration/test_conditional_rules.py +2 -2
  144. umap/tests/integration/test_datalayer.py +0 -1
  145. umap/tests/integration/test_edit_map.py +7 -7
  146. umap/tests/integration/test_facets_browser.py +2 -2
  147. umap/tests/integration/test_heatmap.py +41 -0
  148. umap/tests/integration/test_iframe.py +25 -0
  149. umap/tests/integration/test_import.py +58 -1
  150. umap/tests/integration/test_map.py +7 -8
  151. umap/tests/integration/test_optimistic_merge.py +12 -4
  152. umap/tests/integration/test_querystring.py +1 -1
  153. umap/tests/integration/test_remote_data.py +79 -0
  154. umap/tests/integration/test_websocket_sync.py +2 -2
  155. umap/urls.py +1 -0
  156. umap/views.py +7 -0
  157. {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/METADATA +8 -8
  158. {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/RECORD +161 -154
  159. {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/WHEEL +0 -0
  160. {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/entry_points.txt +0 -0
  161. {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,355 @@
1
+ {% extends "umap/content.html" %}
2
+
3
+ {% load umap_tags i18n %}
4
+
5
+ {% block messages %}
6
+ {# We don't want to display errors (yet?). #}
7
+ {% endblock messages %}
8
+
9
+ {% block extra_head %}
10
+ {{ block.super }}
11
+ <style type="text/css">
12
+ /* Styles for the design system. */
13
+ .wrapper .row > h3,
14
+ .wrapper .row > h4 {
15
+ margin-top: 2rem;
16
+ border-bottom: 1px solid black;
17
+ clear: both;
18
+ }
19
+ .ds-wrapper {
20
+ margin: 1rem 0;
21
+ min-height: 3rem;
22
+ }
23
+
24
+ /* Styles for generated color boxes. */
25
+ .colors-container {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ }
29
+ .colors-container * {
30
+ width: 20%;
31
+ margin: 1rem;
32
+ border-style: solid;
33
+ border-width: 2rem 1px 1px 1px;
34
+ padding: 4px;
35
+ }
36
+
37
+ /* Styles to reset particular elements (absolute positions for instance). */
38
+ .panel {
39
+ position: initial;
40
+ padding: 0 1rem 1rem;
41
+ }
42
+ .umap-main-edit-toolbox {
43
+ position: initial;
44
+ }
45
+ .umap-dialog fieldset {
46
+ border: 0;
47
+ margin: unset;
48
+ padding: unset;
49
+ }
50
+ .wrapper .dark input {
51
+ font-weight: normal;
52
+ }
53
+ </style>
54
+ {% endblock extra_head %}
55
+
56
+ {% block maincontent %}
57
+ <div class="wrapper">
58
+ <h2 class="section">uMap Design System</h2>
59
+ <div class="row">
60
+ <h3>Navigation</h3>
61
+ <h4>Header</h4>
62
+ <nav class="umap-nav">
63
+ <section>
64
+ <h1>
65
+ <a href="">uMap</a>
66
+ </h1>
67
+ </section>
68
+ <section>
69
+ <ul>
70
+ <li>
71
+ <a href="" class="login">Connexion / Créer un compte</a>
72
+ </li>
73
+ <li>
74
+ <a href="">À propos</a>
75
+ </li>
76
+ <li>
77
+ <a href="https://discover.umap-project.org/">Aide</a>
78
+ </li>
79
+ <li>
80
+ <a href="" class="button button-primary">Créer une carte</a>
81
+ </li>
82
+ </ul>
83
+ </section>
84
+ </nav>
85
+ <h4>Header map</h4>
86
+ <div class="map_detail umap-caption-bar-enabled umap-edit-enabled leaflet-container">
87
+ <div class="umap-main-edit-toolbox with-transition dark">
88
+ <div class="umap-left-edit-toolbox" data-ref="left">
89
+ <div class="logo"><a href="" title="Retour à la page d'accueil">uMap</a></div>
90
+ <button class="map-name flat truncate" type="button" data-ref="name">Carte sans nom</button>
91
+ <button class="share-status flat truncate" type="button" data-ref="share">Visibilité : Tout le monde (public)</button>
92
+ <button class="edit-undo round flat" type="button" data-ref="undo" disabled="">
93
+ <i class="icon icon-16 icon-undo"></i>
94
+ </button>
95
+ <button class="edit-redo round flat" type="button" data-ref="redo" disabled="">
96
+ <i class="icon icon-16 icon-redo"></i>
97
+ </button>
98
+ </div>
99
+ <div class="umap-right-edit-toolbox" data-ref="right">
100
+ <button class="connected-peers round off" type="button" data-ref="peers">
101
+ <i class="icon icon-16 icon-peers icon-black"></i>
102
+ <span>Déconnecté</span>
103
+ </button>
104
+ <button class="umap-user flat" type="button" data-ref="user">
105
+ <i class="icon icon-16 icon-profile"></i>
106
+ <span class="username truncate" data-ref="username">David Larlet</span>
107
+ </button>
108
+ <button class="umap-help-link flat" type="button" title="Aide" data-ref="help">Aide</button>
109
+ <button class="edit-disable round disabled-on-dirty" type="button" data-ref="view">
110
+ <i class="icon icon-16 icon-eye"></i>
111
+ <span>Aperçu</span>
112
+ </button>
113
+ <button class="edit-save button round enabled-on-dirty" type="button" data-ref="save" disabled="">
114
+ <i class="icon icon-16 icon-save-disabled"></i>
115
+ <span data-ref="saveLabel">Enregistrer</span>
116
+ </button>
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <h4>Card</h4>
121
+ <div class="grid-container">
122
+ <div class="card">
123
+ {# djlint:off #}
124
+ <umap-fragment data-settings="{&quot;type&quot;: &quot;Feature&quot;, &quot;geometry&quot;: {&quot;type&quot;: &quot;Point&quot;, &quot;coordinates&quot;: [2, 51]}, &quot;properties&quot;: {&quot;name&quot;: &quot;Une carte pour Aur\u00e9lie avec des tags&quot;, &quot;tags&quot;: [&quot;numerique&quot;, &quot;urbanisme&quot;], &quot;zoom&quot;: 6, &quot;center&quot;: {&quot;lat&quot;: 51, &quot;lng&quot;: 2}, &quot;slideshow&quot;: {}, &quot;limitBounds&quot;: {}, &quot;zoomControl&quot;: true, &quot;fullscreenControl&quot;: true, &quot;tilelayers&quot;: [{&quot;id&quot;: 1, &quot;name&quot;: &quot;Positron&quot;, &quot;url_template&quot;: &quot;https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png&quot;, &quot;minZoom&quot;: 0, &quot;maxZoom&quot;: 18, &quot;attribution&quot;: &quot;&amp;copy; [[http://www.openstreetmap.org/copyright|OpenStreetMap]] contributors, &amp;copy; [[https://carto.com/attributions|CARTO]]&quot;, &quot;rank&quot;: null, &quot;tms&quot;: false}], &quot;datalayers&quot;: [], &quot;urls&quot;: {&quot;map_short_url&quot;: &quot;/m/{pk}/&quot;, &quot;ajax-proxy&quot;: &quot;/ajax-proxy/&quot;, &quot;password_change&quot;: &quot;/change-password/&quot;, &quot;password_change_done&quot;: &quot;/change-password-done/&quot;, &quot;set_language&quot;: &quot;/i18n/setlang/&quot;, &quot;map_oembed&quot;: &quot;/map/oembed/&quot;, &quot;map_download&quot;: &quot;/map/{map_id}/download/&quot;, &quot;home&quot;: &quot;/fr/&quot;, &quot;maps_showcase&quot;: &quot;/fr/showcase/&quot;, &quot;search&quot;: &quot;https://photon.komoot.io/api/?&quot;, &quot;about&quot;: &quot;/fr/about/&quot;, &quot;user_stars&quot;: &quot;/fr/user/{identifier}/stars/&quot;, &quot;user_maps&quot;: &quot;/fr/user/{identifier}/&quot;, &quot;team_maps&quot;: &quot;/fr/team/{pk}/&quot;, &quot;login&quot;: &quot;/fr/login/&quot;, &quot;login_popup_end&quot;: &quot;/fr/login/popup/end/&quot;, &quot;logout&quot;: &quot;/fr/logout/&quot;, &quot;map_geojson&quot;: &quot;/fr/map/{map_id}/geojson/&quot;, &quot;map_anonymous_edit_url&quot;: &quot;/fr/map/anonymous-edit/{signature}&quot;, &quot;pictogram_list_json&quot;: &quot;/fr/pictogram/json/&quot;, &quot;datalayer_view&quot;: &quot;/fr/datalayer/{map_id}/{pk}/&quot;, &quot;datalayer_versions&quot;: &quot;/fr/datalayer/{map_id}/{pk}/versions/&quot;, &quot;datalayer_version&quot;: &quot;/fr/datalayer/{map_id}/{pk}/{ref}&quot;, &quot;map&quot;: &quot;/fr/map/{slug}_{map_id}&quot;, &quot;map_preview&quot;: &quot;/fr/map/&quot;, &quot;map_new&quot;: &quot;/fr/map/new/&quot;, &quot;map_create&quot;: &quot;/fr/map/create/&quot;, &quot;map_star&quot;: &quot;/fr/map/{map_id}/star/&quot;, &quot;user_dashboard&quot;: &quot;/fr/me&quot;, &quot;user_download&quot;: &quot;/fr/me/download&quot;, &quot;user_teams&quot;: &quot;/fr/me/teams&quot;, &quot;team_new&quot;: &quot;/fr/team/create/&quot;, &quot;user_profile&quot;: &quot;/fr/me/profile&quot;, &quot;team_update&quot;: &quot;/fr/team/{pk}/edit/&quot;, &quot;team_delete&quot;: &quot;/fr/team/{pk}/delete/&quot;, &quot;map_update&quot;: &quot;/fr/map/{map_id}/update/settings/&quot;, &quot;map_update_permissions&quot;: &quot;/fr/map/{map_id}/update/permissions/&quot;, &quot;map_attach_owner&quot;: &quot;/fr/map/{map_id}/update/owner/&quot;, &quot;map_delete&quot;: &quot;/fr/map/{map_id}/update/delete/&quot;, &quot;map_clone&quot;: &quot;/fr/map/{map_id}/update/clone/&quot;, &quot;datalayer_create&quot;: &quot;/fr/map/{map_id}/datalayer/create/{pk}/&quot;, &quot;datalayer_delete&quot;: &quot;/fr/map/{map_id}/datalayer/delete/{pk}/&quot;, &quot;datalayer_permissions&quot;: &quot;/fr/map/{map_id}/datalayer/permissions/{pk}/&quot;, &quot;map_websocket_auth_token&quot;: &quot;/fr/map/{map_id}/ws-token/&quot;, &quot;map_send_edit_link&quot;: &quot;/fr/map/{map_id}/send-edit-link/&quot;, &quot;datalayer_update&quot;: &quot;/fr/map/{map_id}/datalayer/update/{pk}/&quot;, &quot;stats&quot;: &quot;/stats/&quot;, &quot;design_system&quot;: &quot;/design_system/&quot;, &quot;routing&quot;: &quot;http://www.openstreetmap.org/directions?engine=osrm_car&amp;route={lat},{lng}&amp;locale={locale}#map={zoom}/{lat}/{lng}&quot;, &quot;ajax_proxy&quot;: &quot;/ajax-proxy/?url={url}&amp;ttl={ttl}&quot;, &quot;edit_in_osm&quot;: &quot;https://www.openstreetmap.org/edit#map={zoom}/{lat}/{lng}&quot;}, &quot;STATIC_URL&quot;: &quot;/static/&quot;, &quot;editMode&quot;: &quot;disabled&quot;, &quot;hash&quot;: false, &quot;scrollWheelZoom&quot;: false, &quot;noControl&quot;: true, &quot;id&quot;: 13, &quot;schema&quot;: {&quot;iconUrl&quot;: {&quot;default&quot;: &quot;/static/umap/img/marker.svg&quot;}, &quot;tags&quot;: {&quot;choices&quot;: [[&quot;culture&quot;, &quot;Culture et patrimoine&quot;], [&quot;ecologie&quot;, &quot;Transition \u00e9cologique&quot;], [&quot;economie&quot;, &quot;D\u00e9veloppement \u00e9conomique, artisanat et commerce&quot;], [&quot;education&quot;, &quot;Education et jeunesse&quot;], [&quot;habitat&quot;, &quot;Habitat&quot;], [&quot;numerique&quot;, &quot;Num\u00e9rique et innovation&quot;], [&quot;sante&quot;, &quot;Acc\u00e8s aux soins et sant\u00e9&quot;], [&quot;securite&quot;, &quot;Tranquillit\u00e9 publique&quot;], [&quot;services&quot;, &quot;Acc\u00e8s aux services&quot;], [&quot;social&quot;, &quot;Lien social et concertation&quot;], [&quot;sports&quot;, &quot;Sports et loisirs&quot;], [&quot;tourisme&quot;, &quot;Tourisme&quot;], [&quot;transports&quot;, &quot;Transports et mobilit\u00e9s&quot;], [&quot;urbanisme&quot;, &quot;Cadre de vie et am\u00e9nagement urbain&quot;]]}}, &quot;prefix&quot;: &quot;&quot;, &quot;page&quot;: &quot;&quot;}}" inert="">
125
+ <div id="map_13" class="map_fragment leaflet-container leaflet-touch leaflet-retina leaflet-fade-anim leaflet-grab leaflet-touch-drag leaflet-touch-zoom" tabindex="0">
126
+ <div class="leaflet-pane leaflet-map-pane" style="transform: translate3d(0px, 0px, 0px);"><div class="leaflet-pane leaflet-tile-pane"><div class="leaflet-layer " style="z-index: 1; opacity: 1;"><div class="leaflet-tile-container leaflet-zoom-animated" style="z-index: 18; transform: translate3d(0px, 0px, 0px) scale(1);"><img alt="" src="https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/6/32/21.png" class="leaflet-tile leaflet-tile-loaded" style="width: 256px; height: 256px; transform: translate3d(82px, -4px, 0px); opacity: 1;"><img alt="" src="https://cartodb-basemaps-b.global.ssl.fastly.net/light_all/6/31/21.png" class="leaflet-tile leaflet-tile-loaded" style="width: 256px; height: 256px; transform: translate3d(-174px, -4px, 0px); opacity: 1;"><img alt="" src="https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/6/33/21.png" class="leaflet-tile leaflet-tile-loaded" style="width: 256px; height: 256px; transform: translate3d(338px, -4px, 0px); opacity: 1;"></div></div></div><div class="leaflet-pane leaflet-overlay-pane"></div><div class="leaflet-pane leaflet-shadow-pane"></div><div class="leaflet-pane leaflet-marker-pane"></div><div class="leaflet-pane leaflet-tooltip-pane"></div><div class="leaflet-pane leaflet-popup-pane"></div><div class="leaflet-proxy leaflet-zoom-animated" style="transform: translate3d(8283.02px, 5484.99px, 0px) scale(32);"></div></div><div class="leaflet-control-container"><div class="leaflet-top leaflet-left"></div><div class="leaflet-top leaflet-right"></div><div class="leaflet-bottom leaflet-left"></div><div class="leaflet-bottom leaflet-right"></div><div class="umap-loader"></div><div></div><div class="umap-tooltip-container"></div></div></div>
127
+ </umap-fragment>
128
+ {# djlint:on #}
129
+ <hgroup>
130
+ <div>
131
+ <ul class="tag-list">
132
+ <li><a href="">Numérique et innovation</a></li>
133
+ <li><a href="">Cadre de vie et aménagement urbain</a></li>
134
+ </ul>
135
+ <h3>Une carte en exemple avec des tags et un titre sur plusieurs lignes</h3>
136
+ <p>par <a href="">David L.</a></p>
137
+ </div>
138
+ <a class="main" href="">Voir la carte</a>
139
+ </hgroup>
140
+ </div>
141
+ </div>
142
+ <h4>Footer</h4>
143
+ <footer>
144
+ <a href="" class="branding">uMap</a>
145
+ <span>Un projet OpenStreetMap
146
+ (version <a href="https://docs.umap-project.org/en/stable/changelog/">3.0.4</a>)</span>
147
+ <a href="https://discover.umap-project.org/">Aide</a>
148
+ <form class="i18n_switch">
149
+ <select name="language">
150
+ <option value="am-et">
151
+ አማርኛ (am-et)
152
+ </option>
153
+ <option value="ar">
154
+ العربيّة (ar)
155
+ </option>
156
+ </select>
157
+ </form>
158
+ </footer>
159
+ <h3>Forms</h3>
160
+ <h4>Buttons</h4>
161
+ <a href="" class="button button-primary">Créer une carte</a>
162
+ <div class="ds-wrapper">
163
+ <div class="edit-enable leaflet-control"><button type="button" title="Éditer">Éditer</button></div>
164
+ </div>
165
+ <div class="ds-wrapper dark">
166
+ <input type="button" class="button primary" name="submit" value="Importer des données">
167
+ </div>
168
+ <div class="ds-wrapper dark">
169
+ <input type="button" class="button primary" name="submit" value="Importer des données" disabled="">
170
+ </div>
171
+ <h4>Search form</h4>
172
+ <div class="row">
173
+ <form class="search-form flex-break">
174
+ <input name="q" type="search" placeholder="Chercher des cartes" aria-label="Chercher des cartes" value="">
175
+ <select name="tags">
176
+ <option value="">Toutes catégories</option>
177
+ <option value="services">Accès aux services</option>
178
+ <option value="numerique">Numérique et innovation</option>
179
+ </select>
180
+ <input type="submit" value="Chercher">
181
+ </form>
182
+ </div>
183
+ <h4>Copiable link</h4>
184
+ <div class="copiable-input">
185
+ <label>Lien vers la carte<input type="text" readonly value="http://example.org"></label><button class="icon icon-24 icon-copy" title="copier" type="button"></button>
186
+ </div>
187
+ <h4>Toggle</h4>
188
+ <div class="formbox">
189
+ <input type="checkbox" class="switch" id="inBbox"><label for="inBbox">Lister seulement les éléments visibles</label>
190
+ </div>
191
+ <h4>Multiple choice</h4>
192
+ <div class="formbox">
193
+ <label title="Afficher les boutons de zoom">Afficher les boutons de zoom</label>
194
+ <div class="umap-multiplechoice by3">
195
+ <input type="radio" name="zoomControl" id="zoomControl.0" value="true" checked><label for="zoomControl.0">toujours</label>
196
+ <input type="radio" name="zoomControl" id="zoomControl.1" value="false"><label for="zoomControl.1">jamais</label>
197
+ <input type="radio" name="zoomControl" id="zoomControl.2" value="null"><label for="zoomControl.2">caché</label>
198
+ </div>
199
+ </div>
200
+ <h4>Select</h4>
201
+ <div class="formbox">
202
+ <label>Voulez-vous afficher un panneau latéral au chargement ?</label>
203
+ <select name="onLoadPanel">
204
+ <option value="none">Aucun</option>
205
+ <option value="caption">Légende</option>
206
+ <option value="databrowser">Explorateur : données</option>
207
+ </select>
208
+ </div>
209
+ <h3>You want it darker…</h3>
210
+ <h4>Panel</h4>
211
+ <div class="panel dark full on">
212
+ <h3><i class="icon icon-16 icon-settings" title=""></i><span>Titre avec icône</span></h3>
213
+ <details open="">
214
+ <summary><span>Options d'interface</span></summary>
215
+ <fieldset>
216
+ <form>
217
+ <div class="formbox">
218
+ <input type="checkbox" name="homeControl" data-ref="input" class="switch" id="homeControl">
219
+ <label title="Afficher le bouton de retour à l'accueil" for="homeControl">Afficher le bouton de retour à l'accueil</label>
220
+ </div>
221
+ <div class="formbox">
222
+ <label title="Afficher les boutons de zoom">Afficher les boutons de zoom</label>
223
+ <div class="umap-multiplechoice by3" data-ref="wrapper">
224
+ <input type="radio" name="zoomControl" id="zoomControl.0" value="true"><label for="zoomControl.0">toujours</label>
225
+ <input type="radio" name="zoomControl" id="zoomControl.1" value="false" checked><label for="zoomControl.1">jamais</label>
226
+ <input type="radio" name="zoomControl" id="zoomControl.2" value="null"><label for="zoomControl.2">caché</label>
227
+ </div>
228
+ </div>
229
+ <div class="formbox">
230
+ <label title="Voulez-vous afficher un panneau latéral au chargement ?">Voulez-vous afficher un panneau latéral au chargement ?</label>
231
+ <select name="onLoadPanel">
232
+ <option value="none">Aucun</option>
233
+ <option value="caption">Légende</option>
234
+ <option value="databrowser">Explorateur : données</option>
235
+ </select>
236
+ </div>
237
+ </form>
238
+ </fieldset>
239
+ </details>
240
+ <details open="">
241
+ <summary><span>Actions avancées</span></summary>
242
+ <fieldset>
243
+ <div class="button-bar half">
244
+ <button class="button" type="button">
245
+ <i class="icon icon-24 icon-delete"></i>Supprimer
246
+ </button>
247
+ <button class="button" type="button">
248
+ <i class="icon icon-24 icon-empty"></i>Effacer les données
249
+ </button>
250
+ <button class="button" type="button">
251
+ <i class="icon icon-24 icon-empty"></i>Supprimer les calques
252
+ </button>
253
+ <button class="button" type="button">
254
+ <i class="icon icon-24 icon-clone"></i>Cloner cette carte
255
+ </button>
256
+ <button class="button" type="button">
257
+ <i class="icon icon-24 icon-download"></i>Ouvrir le panneau de partage
258
+ </button>
259
+ </div>
260
+ </fieldset>
261
+ </details>
262
+ <details open="">
263
+ <summary><span>Propriétés par défaut</span></summary>
264
+ <fieldset>
265
+ <form>
266
+ <div class="umap-field-zoomTo formbox inheritable">
267
+ <div class="header" data-ref="header">
268
+ <label title="Niveau de zoom par défaut" data-ref="label" data-help="zoomTo">Niveau de zoom par défaut<button class="umap-help-button" type="button" title="Aide">Aide</button></label>
269
+ <span class="actions show-on-defined" data-ref="actions"></span>
270
+ <span class="buttons" data-ref="buttons">
271
+ <button type="button" class="button undefine" data-ref="undefine">effacer</button>
272
+ <button type="button" class="button define" data-ref="define">définir</button>
273
+ </span>
274
+ </div>
275
+ <div class="show-on-defined" data-ref="container">
276
+ <input type="number" name="zoomTo" placeholder="Hériter" data-ref="input">
277
+ <small class="help-text" data-ref="helpText" hidden=""></small>
278
+ </div>
279
+ </div>
280
+ <div class="formbox umap-field-easing with-switch" data-ref="container">
281
+ <label title="" data-ref="label" data-help="" hidden=""></label>
282
+ <input type="checkbox" name="easing" data-ref="input" class="switch" id="1744915095061.easing"><label title="Transitions animées" for="1744915095061.easing" data-ref="customLabel" data-help="">Transitions animées</label>
283
+ <small class="help-text" data-ref="helpText" hidden=""></small>
284
+ </div>
285
+ <div class="umap-field-labelKey formbox inheritable">
286
+ <div class="header" data-ref="header">
287
+ <label title="Clé pour le libellé" data-ref="label" data-help="labelKey">Clé pour le libellé<button class="umap-help-button" type="button" title="Aide">Aide</button></label>
288
+ <span class="actions show-on-defined" data-ref="actions"></span>
289
+ <span class="buttons" data-ref="buttons">
290
+ <button type="button" class="button undefine" data-ref="undefine">effacer</button>
291
+ <button type="button" class="button define" data-ref="define">définir</button>
292
+ </span>
293
+ </div>
294
+ <div class="show-on-defined" data-ref="container">
295
+ <div class="blur-container">
296
+ <input type="text" name="labelKey" placeholder="Par défaut : name" data-ref="input" class="blur" list="cyNDY"><button type="button">✔</button><datalist id="cyNDY"></datalist>
297
+ </div>
298
+ <small class="help-text" data-ref="helpText" hidden=""></small>
299
+ </div>
300
+ </div>
301
+ </form>
302
+ </fieldset>
303
+ </details>
304
+ </div>
305
+ <h4>Importers</h4>
306
+ <div class="umap-dialog window importers dark">
307
+ <form>
308
+ <ul class="buttons">
309
+ <li><i class="icon icon-16 icon-close" data-close=""></i></li>
310
+ <li hidden="" data-ref="back"><i class="icon icon-16 icon-back"></i></li>
311
+ </ul>
312
+ <h3 data-ref="message" id="m9low1eq" hidden=""></h3>
313
+ <fieldset data-ref="fieldset" role="document">
314
+ <div data-ref="template">
315
+ <div>
316
+ <h3><i class="icon icon-16 icon-magic"></i>Assistants d'import</h3>
317
+ <p>Les assistants d'import vont renseigner le champ URL pour vous.</p>
318
+ <ul class="grid-container by4" data-ref="grid">
319
+ <li><button type="button" class="cadastrefr">Cadastre France</button></li>
320
+ <li><button type="button" class="communesfr">Communes France</button></li>
321
+ <li><button type="button" class="datasets">Contours nationaux</button></li>
322
+ <li><button type="button" class="geodatamine">GéoDataMine (thèmes OSM)</button></li>
323
+ <li><button type="button" class="overpass">Overpass</button></li>
324
+ </ul>
325
+ </div>
326
+ </div>
327
+ </fieldset>
328
+ <menu>
329
+ <button type="button" data-ref="cancel" data-close="" value="cancel" hidden="">false</button>
330
+ <button type="submit" class="button" data-ref="accept" value="accept" hidden="">false</button>
331
+ </menu>
332
+ </form>
333
+ </div>
334
+ <h3>Colors</h3>
335
+ <div class="grid-container row colors-container"></div>
336
+ </div>
337
+ </div>
338
+ {% endblock maincontent %}
339
+ {% block bottom_js %}
340
+ {{ block.super }}
341
+ <script type="text/javascript">
342
+ const colorsContainer = document.querySelector('.colors-container')
343
+ const styles = getComputedStyle(document.querySelector('html'))
344
+ let html = ""
345
+ for (const style of styles) {
346
+ if (style.startsWith("--") && style.includes("color")) {
347
+ const value = styles.getPropertyValue(style)
348
+ html += `<div style="border-color: ${value};">${style} (${value})</div>`
349
+ }
350
+ }
351
+ const template = document.createElement('template')
352
+ template.innerHTML = html
353
+ colorsContainer.appendChild(template.content)
354
+ </script>
355
+ {% endblock bottom_js %}
umap/tests/base.py CHANGED
@@ -131,8 +131,8 @@ class DataLayerFactory(factory.django.DjangoModelFactory):
131
131
  data.setdefault("_umap_options", {})
132
132
  if "name" in data["_umap_options"] and kwargs["name"] == cls.name:
133
133
  kwargs["name"] = data["_umap_options"]["name"]
134
- if "settings" not in kwargs:
135
- kwargs["settings"] = data.get("_umap_options", {})
134
+ kwargs.setdefault("settings", {})
135
+ kwargs["settings"].update(data.get("_umap_options", {}))
136
136
  else:
137
137
  data = DATALAYER_DATA.copy()
138
138
  data["_umap_options"] = {