umap-project 2.7.0__py3-none-any.whl → 2.7.0b0__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 (72) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/es/LC_MESSAGES/django.po +128 -134
  4. umap/settings/base.py +1 -1
  5. umap/static/umap/css/contextmenu.css +1 -1
  6. umap/static/umap/css/importers.css +0 -4
  7. umap/static/umap/img/16.svg +184 -1
  8. umap/static/umap/img/24-white.svg +0 -1
  9. umap/static/umap/img/24.svg +0 -1
  10. umap/static/umap/img/source/16.svg +200 -753
  11. umap/static/umap/img/source/24-white.svg +2 -3
  12. umap/static/umap/img/source/24.svg +2 -3
  13. umap/static/umap/js/modules/browser.js +0 -47
  14. umap/static/umap/js/modules/caption.js +4 -10
  15. umap/static/umap/js/modules/data/layer.js +14 -26
  16. umap/static/umap/js/modules/importer.js +0 -3
  17. umap/static/umap/js/modules/importers/communesfr.js +2 -2
  18. umap/static/umap/js/modules/rendering/layers/classified.js +0 -2
  19. umap/static/umap/js/modules/rendering/ui.js +6 -28
  20. umap/static/umap/js/modules/share.js +3 -1
  21. umap/static/umap/js/modules/slideshow.js +1 -1
  22. umap/static/umap/js/modules/sync/engine.js +8 -14
  23. umap/static/umap/js/modules/sync/hlc.js +3 -3
  24. umap/static/umap/js/modules/sync/updaters.js +2 -14
  25. umap/static/umap/js/modules/tableeditor.js +1 -1
  26. umap/static/umap/js/modules/ui/contextmenu.js +2 -18
  27. umap/static/umap/js/modules/utils.js +4 -24
  28. umap/static/umap/js/umap.controls.js +10 -31
  29. umap/static/umap/js/umap.core.js +1 -1
  30. umap/static/umap/js/umap.js +23 -31
  31. umap/static/umap/locale/ca.js +4 -8
  32. umap/static/umap/locale/ca.json +4 -8
  33. umap/static/umap/locale/en.js +1 -5
  34. umap/static/umap/locale/en.json +1 -5
  35. umap/static/umap/locale/es.js +319 -330
  36. umap/static/umap/locale/es.json +319 -330
  37. umap/static/umap/locale/fr.js +1 -5
  38. umap/static/umap/locale/fr.json +1 -5
  39. umap/static/umap/map.css +7 -37
  40. umap/static/umap/unittests/hlc.js +3 -10
  41. umap/static/umap/unittests/utils.js +0 -24
  42. umap/static/umap/vars.css +1 -2
  43. umap/static/umap/vendors/colorbrewer/colorbrewer.js +317 -309
  44. umap/static/umap/vendors/dompurify/purify.es.js +16 -15
  45. umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
  46. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js +2 -2
  47. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js.map +1 -1
  48. umap/static/umap/vendors/simple-statistics/simple-statistics.min.js +1 -1
  49. umap/static/umap/vendors/simple-statistics/simple-statistics.min.js.map +1 -1
  50. umap/templates/umap/css.html +2 -0
  51. umap/templates/umap/js.html +1 -0
  52. umap/templates/umap/map_detail.html +2 -2
  53. umap/tests/fixtures/test_upload_data.csv +2 -2
  54. umap/tests/integration/test_browser.py +7 -69
  55. umap/tests/integration/test_caption.py +3 -3
  56. umap/tests/integration/test_datalayer.py +5 -1
  57. umap/tests/integration/test_edit_datalayer.py +2 -1
  58. umap/tests/integration/test_edit_map.py +1 -1
  59. umap/tests/integration/test_edit_marker.py +1 -1
  60. umap/tests/integration/test_facets_browser.py +3 -3
  61. umap/tests/integration/test_import.py +4 -0
  62. umap/tests/integration/test_map.py +4 -0
  63. umap/tests/integration/test_view_marker.py +0 -63
  64. umap/tests/test_map_views.py +0 -19
  65. {umap_project-2.7.0.dist-info → umap_project-2.7.0b0.dist-info}/METADATA +10 -14
  66. {umap_project-2.7.0.dist-info → umap_project-2.7.0b0.dist-info}/RECORD +69 -72
  67. umap/asgi.py +0 -15
  68. umap/static/umap/img/importers/cadastrefr.svg +0 -23
  69. umap/static/umap/js/modules/importers/cadastrefr.js +0 -62
  70. {umap_project-2.7.0.dist-info → umap_project-2.7.0b0.dist-info}/WHEEL +0 -0
  71. {umap_project-2.7.0.dist-info → umap_project-2.7.0b0.dist-info}/entry_points.txt +0 -0
  72. {umap_project-2.7.0.dist-info → umap_project-2.7.0b0.dist-info}/licenses/LICENSE +0 -0
@@ -143,7 +143,7 @@ L.DomUtil.createButtonIcon = (parent, className, title, callback, size = 16) =>
143
143
 
144
144
  L.DomUtil.createTitle = (parent, text, iconClassName, className = '', tag = 'h3') => {
145
145
  const title = L.DomUtil.create(tag, '', parent)
146
- if (iconClassName) L.DomUtil.createIcon(title, iconClassName)
146
+ if (className) L.DomUtil.createIcon(title, iconClassName)
147
147
  L.DomUtil.add('span', className, title, text)
148
148
  return title
149
149
  }
@@ -191,17 +191,15 @@ U.Map = L.Map.extend({
191
191
  this.renderEditToolbar()
192
192
  }
193
193
 
194
- if (!this.options.noControl) {
195
- this.initShortcuts()
196
- this.initCaptionBar()
197
- this.on('contextmenu', this.onContextMenu)
198
- this.onceDataLoaded(this.setViewFromQueryString)
199
- this.on('click', this.closeInplaceToolbar)
200
- this.propagate()
201
- }
194
+ this.initShortcuts()
195
+ if (!this.options.noControl) this.initCaptionBar()
196
+ this.onceDataLoaded(this.setViewFromQueryString)
202
197
 
203
198
  window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
204
199
  this.backup()
200
+ this.on('click', this.closeInplaceToolbar)
201
+ this.on('contextmenu', this.onContextMenu)
202
+ this.propagate()
205
203
  },
206
204
 
207
205
  initSyncEngine: async function () {
@@ -224,12 +222,8 @@ U.Map = L.Map.extend({
224
222
  },
225
223
 
226
224
  render: function (fields) {
227
- if (fields.includes('numberOfConnectedPeers')) {
228
- this.renderEditToolbar()
229
- this.propagate()
230
- }
231
-
232
225
  const impacts = U.Utils.getImpactsFromSchema(fields)
226
+
233
227
  for (const impact of impacts) {
234
228
  switch (impact) {
235
229
  case 'ui':
@@ -1053,6 +1047,7 @@ U.Map = L.Map.extend({
1053
1047
  return
1054
1048
  }
1055
1049
  this.options.user = data.user
1050
+ this.renderEditToolbar()
1056
1051
  if (!this.options.umap_id) {
1057
1052
  this.options.umap_id = data.id
1058
1053
  this.permissions.setOptions(data.permissions)
@@ -1090,6 +1085,7 @@ U.Map = L.Map.extend({
1090
1085
  } else {
1091
1086
  window.location = data.url
1092
1087
  }
1088
+ this.propagate()
1093
1089
  return true
1094
1090
  },
1095
1091
 
@@ -1108,10 +1104,7 @@ U.Map = L.Map.extend({
1108
1104
  if (datalayer.isDirty) await datalayer.save()
1109
1105
  }
1110
1106
  this.isDirty = false
1111
- // Do a blind render for now, as we are not sure what could
1112
- // have changed, we'll be more subtil when we'll remove the
1113
- // save action
1114
- this.render(['name', 'user', 'permissions'])
1107
+ this.renderEditToolbar()
1115
1108
  this.fire('saved')
1116
1109
  },
1117
1110
 
@@ -1599,7 +1592,7 @@ U.Map = L.Map.extend({
1599
1592
  'umap-caption-bar',
1600
1593
  this._controlContainer
1601
1594
  )
1602
- const name = L.DomUtil.create('h3', 'map-name', container)
1595
+ const name = L.DomUtil.create('h3', '', container)
1603
1596
  L.DomEvent.disableClickPropagation(container)
1604
1597
  this.addAuthorLink('span', container)
1605
1598
  if (this.getOption('captionMenus')) {
@@ -1625,6 +1618,11 @@ U.Map = L.Map.extend({
1625
1618
  )
1626
1619
  }
1627
1620
  }
1621
+ const setName = function () {
1622
+ name.textContent = this.getDisplayName()
1623
+ }
1624
+ L.bind(setName, this)()
1625
+ this.on('postsync', L.bind(setName, this))
1628
1626
  this.onceDatalayersLoaded(function () {
1629
1627
  this.slideshow.renderToolbox(container)
1630
1628
  })
@@ -1688,7 +1686,7 @@ U.Map = L.Map.extend({
1688
1686
  this.loader.onAdd(this)
1689
1687
  },
1690
1688
 
1691
- getOwnContextMenuItems: function (event) {
1689
+ getContextMenuItems: function (event) {
1692
1690
  const items = []
1693
1691
  if (this.hasEditMode()) {
1694
1692
  if (this.editEnabled) {
@@ -1728,10 +1726,8 @@ U.Map = L.Map.extend({
1728
1726
  })
1729
1727
  }
1730
1728
  }
1731
- if (items.length) {
1732
- items.push('-')
1733
- }
1734
1729
  items.push(
1730
+ '-',
1735
1731
  {
1736
1732
  label: L._('Open browser'),
1737
1733
  action: () => this.openBrowser('layers'),
@@ -1754,14 +1750,9 @@ U.Map = L.Map.extend({
1754
1750
  },
1755
1751
  {
1756
1752
  label: this.help.displayLabel('SEARCH'),
1757
- action: () => this.search(),
1753
+ action: () => this.search(event),
1758
1754
  }
1759
1755
  )
1760
- return items
1761
- },
1762
-
1763
- getContextMenuItems: function (event) {
1764
- const items = []
1765
1756
  if (this.options.urls.routing) {
1766
1757
  items.push('-', {
1767
1758
  label: L._('Directions from here'),
@@ -1778,10 +1769,11 @@ U.Map = L.Map.extend({
1778
1769
  },
1779
1770
 
1780
1771
  onContextMenu: function (event) {
1781
- const items = this.getOwnContextMenuItems(event).concat(
1782
- this.getContextMenuItems(event)
1772
+ const items = this.getContextMenuItems(event)
1773
+ this.contextmenu.open(
1774
+ [event.originalEvent.clientX, event.originalEvent.clientY],
1775
+ items
1783
1776
  )
1784
- this.contextmenu.open(event.originalEvent, items)
1785
1777
  },
1786
1778
 
1787
1779
  editInOSM: function (e) {
@@ -102,7 +102,7 @@ const locale = {
102
102
  "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.",
103
103
  "define": "definir",
104
104
  "Delay between two transitions when in play mode": "Delay between two transitions when in play mode",
105
- "Delete layer": "Suprimeix la capa",
105
+ "Delete layer": "Delete layer",
106
106
  "Delete this feature": "Suprimeix aquesta característica",
107
107
  "Delete this shape": "Delete this shape",
108
108
  "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)",
@@ -456,8 +456,8 @@ const locale = {
456
456
  "key=value or key!=value": "key=value or key!=value",
457
457
  "Are you sure you want to delete this rule?": "Are you sure you want to delete this rule?",
458
458
  "empty rule": "empty rule",
459
- "Conditional style rules": "Regles d'estil condicional",
460
- "Add rule": "Afegeix una regla",
459
+ "Conditional style rules": "Conditional style rules",
460
+ "Add rule": "Add rule",
461
461
  "Browser: data": "Navegador: dades",
462
462
  "Browser: layers": "Navegador: capes",
463
463
  "Browser: filters": "Navegador: filtres",
@@ -513,11 +513,7 @@ const locale = {
513
513
  "Type new owner's username": "Type new owner's username",
514
514
  "Type editor's username": "Type editor's username",
515
515
  "Map": "Map",
516
- "Manage collaborators": "Manage collaborators",
517
- "show/hide all layers": "show/hide all layers",
518
- "zoom to data extent": "zoom to data extent",
519
- "download visible data": "download visible data",
520
- "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} peer(s) currently connected to this map"
516
+ "Manage collaborators": "Manage collaborators"
521
517
  }
522
518
  L.registerLocale("ca", locale)
523
519
  L.setLocale("ca")
@@ -102,7 +102,7 @@
102
102
  "Define link to open in a new window on polygon click.": "Define link to open in a new window on polygon click.",
103
103
  "define": "definir",
104
104
  "Delay between two transitions when in play mode": "Delay between two transitions when in play mode",
105
- "Delete layer": "Suprimeix la capa",
105
+ "Delete layer": "Delete layer",
106
106
  "Delete this feature": "Suprimeix aquesta característica",
107
107
  "Delete this shape": "Delete this shape",
108
108
  "Delete this vertex (Alt+Click)": "Delete this vertex (Alt+Click)",
@@ -456,8 +456,8 @@
456
456
  "key=value or key!=value": "key=value or key!=value",
457
457
  "Are you sure you want to delete this rule?": "Are you sure you want to delete this rule?",
458
458
  "empty rule": "empty rule",
459
- "Conditional style rules": "Regles d'estil condicional",
460
- "Add rule": "Afegeix una regla",
459
+ "Conditional style rules": "Conditional style rules",
460
+ "Add rule": "Add rule",
461
461
  "Browser: data": "Navegador: dades",
462
462
  "Browser: layers": "Navegador: capes",
463
463
  "Browser: filters": "Navegador: filtres",
@@ -513,9 +513,5 @@
513
513
  "Type new owner's username": "Type new owner's username",
514
514
  "Type editor's username": "Type editor's username",
515
515
  "Map": "Map",
516
- "Manage collaborators": "Manage collaborators",
517
- "show/hide all layers": "show/hide all layers",
518
- "zoom to data extent": "zoom to data extent",
519
- "download visible data": "download visible data",
520
- "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} peer(s) currently connected to this map"
516
+ "Manage collaborators": "Manage collaborators"
521
517
  }
@@ -513,11 +513,7 @@ const locale = {
513
513
  "Type new owner's username": "Type new owner's username",
514
514
  "Type editor's username": "Type editor's username",
515
515
  "Map": "Map",
516
- "Manage collaborators": "Manage collaborators",
517
- "show/hide all layers": "show/hide all layers",
518
- "zoom to data extent": "zoom to data extent",
519
- "download visible data": "download visible data",
520
- "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} peer(s) currently connected to this map"
516
+ "Manage collaborators": "Manage collaborators"
521
517
  }
522
518
  L.registerLocale("en", locale)
523
519
  L.setLocale("en")
@@ -513,9 +513,5 @@
513
513
  "Type new owner's username": "Type new owner's username",
514
514
  "Type editor's username": "Type editor's username",
515
515
  "Map": "Map",
516
- "Manage collaborators": "Manage collaborators",
517
- "show/hide all layers": "show/hide all layers",
518
- "zoom to data extent": "zoom to data extent",
519
- "download visible data": "download visible data",
520
- "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} peer(s) currently connected to this map"
516
+ "Manage collaborators": "Manage collaborators"
521
517
  }