umap-project 2.7.0b2__py3-none-any.whl → 2.7.1__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 (71) hide show
  1. umap/__init__.py +1 -1
  2. umap/asgi.py +15 -0
  3. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  4. umap/locale/es/LC_MESSAGES/django.po +134 -128
  5. umap/models.py +2 -1
  6. umap/settings/base.py +1 -1
  7. umap/static/umap/css/importers.css +4 -0
  8. umap/static/umap/img/16.svg +1 -184
  9. umap/static/umap/img/24-white.svg +1 -0
  10. umap/static/umap/img/24.svg +1 -0
  11. umap/static/umap/img/importers/cadastrefr.svg +23 -0
  12. umap/static/umap/img/source/16.svg +753 -200
  13. umap/static/umap/img/source/24-white.svg +3 -2
  14. umap/static/umap/img/source/24.svg +3 -2
  15. umap/static/umap/js/modules/browser.js +47 -0
  16. umap/static/umap/js/modules/caption.js +10 -4
  17. umap/static/umap/js/modules/data/layer.js +26 -14
  18. umap/static/umap/js/modules/importer.js +3 -0
  19. umap/static/umap/js/modules/importers/cadastrefr.js +62 -0
  20. umap/static/umap/js/modules/importers/communesfr.js +2 -2
  21. umap/static/umap/js/modules/rendering/layers/classified.js +2 -0
  22. umap/static/umap/js/modules/rendering/ui.js +30 -3
  23. umap/static/umap/js/modules/share.js +1 -3
  24. umap/static/umap/js/modules/slideshow.js +1 -1
  25. umap/static/umap/js/modules/sync/engine.js +14 -8
  26. umap/static/umap/js/modules/sync/hlc.js +3 -3
  27. umap/static/umap/js/modules/sync/updaters.js +14 -2
  28. umap/static/umap/js/modules/ui/contextmenu.js +5 -0
  29. umap/static/umap/js/modules/ui/panel.js +12 -1
  30. umap/static/umap/js/modules/utils.js +24 -4
  31. umap/static/umap/js/umap.controls.js +46 -21
  32. umap/static/umap/js/umap.core.js +1 -1
  33. umap/static/umap/js/umap.js +29 -20
  34. umap/static/umap/locale/ca.js +8 -4
  35. umap/static/umap/locale/ca.json +8 -4
  36. umap/static/umap/locale/en.js +5 -1
  37. umap/static/umap/locale/en.json +5 -1
  38. umap/static/umap/locale/es.js +330 -319
  39. umap/static/umap/locale/es.json +330 -319
  40. umap/static/umap/locale/fr.js +5 -1
  41. umap/static/umap/locale/fr.json +5 -1
  42. umap/static/umap/map.css +37 -7
  43. umap/static/umap/unittests/hlc.js +10 -3
  44. umap/static/umap/unittests/utils.js +24 -0
  45. umap/static/umap/vars.css +2 -1
  46. umap/static/umap/vendors/colorbrewer/colorbrewer.js +309 -317
  47. umap/static/umap/vendors/dompurify/purify.es.js +15 -16
  48. umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
  49. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js +2 -2
  50. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js.map +1 -1
  51. umap/static/umap/vendors/simple-statistics/simple-statistics.min.js +1 -1
  52. umap/static/umap/vendors/simple-statistics/simple-statistics.min.js.map +1 -1
  53. umap/templates/umap/js.html +0 -1
  54. umap/templates/umap/map_detail.html +2 -2
  55. umap/tests/fixtures/test_upload_data.csv +2 -2
  56. umap/tests/integration/test_browser.py +69 -7
  57. umap/tests/integration/test_caption.py +3 -3
  58. umap/tests/integration/test_datalayer.py +1 -5
  59. umap/tests/integration/test_edit_datalayer.py +1 -2
  60. umap/tests/integration/test_edit_map.py +1 -1
  61. umap/tests/integration/test_edit_marker.py +1 -1
  62. umap/tests/integration/test_facets_browser.py +3 -3
  63. umap/tests/integration/test_import.py +0 -4
  64. umap/tests/integration/test_map.py +0 -4
  65. umap/tests/integration/test_view_marker.py +63 -0
  66. umap/tests/test_map_views.py +19 -0
  67. {umap_project-2.7.0b2.dist-info → umap_project-2.7.1.dist-info}/METADATA +14 -10
  68. {umap_project-2.7.0b2.dist-info → umap_project-2.7.1.dist-info}/RECORD +71 -68
  69. {umap_project-2.7.0b2.dist-info → umap_project-2.7.1.dist-info}/WHEEL +0 -0
  70. {umap_project-2.7.0b2.dist-info → umap_project-2.7.1.dist-info}/entry_points.txt +0 -0
  71. {umap_project-2.7.0b2.dist-info → umap_project-2.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -513,7 +513,11 @@ const locale = {
513
513
  "Type new owner's username": "Nom d'utilisateur du nouveau propriétaire",
514
514
  "Type editor's username": "Nom d'utilisateur de l'éditeur",
515
515
  "Map": "Carte",
516
- "Manage collaborators": "Gérer les collaborateurs"
516
+ "Manage collaborators": "Gérer les collaborateurs",
517
+ "show/hide all layers": "montrer/masquer les calques",
518
+ "zoom to data extent": "zoomer sur les données",
519
+ "download visible data": "télécharger les données affichées",
520
+ "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} personne(s) actuellement connectée(s) à cette carte"
517
521
  }
518
522
  L.registerLocale("fr", locale)
519
523
  L.setLocale("fr")
@@ -513,5 +513,9 @@
513
513
  "Type new owner's username": "Nom d'utilisateur du nouveau propriétaire",
514
514
  "Type editor's username": "Nom d'utilisateur de l'éditeur",
515
515
  "Map": "Carte",
516
- "Manage collaborators": "Gérer les collaborateurs"
516
+ "Manage collaborators": "Gérer les collaborateurs",
517
+ "show/hide all layers": "montrer/masquer les calques",
518
+ "zoom to data extent": "zoomer sur les données",
519
+ "download visible data": "télécharger les données affichées",
520
+ "{connectedPeers} peer(s) currently connected to this map": "{connectedPeers} personne(s) actuellement connectée(s) à cette carte"
517
521
  }
umap/static/umap/map.css CHANGED
@@ -500,7 +500,9 @@ ul.photon-autocomplete {
500
500
  }
501
501
  .leaflet-container .leaflet-control-edit-save,
502
502
  .leaflet-container .leaflet-control-edit-cancel,
503
- .leaflet-container .leaflet-control-edit-disable {
503
+ .leaflet-container .leaflet-control-edit-disable,
504
+ .leaflet-container .leaflet-control-connected-peers
505
+ {
504
506
  display: block;
505
507
  border: none;
506
508
  font-size: 12px;
@@ -510,9 +512,17 @@ ul.photon-autocomplete {
510
512
  line-height: 30px;
511
513
  padding: 0 20px;
512
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
+
513
522
  .leaflet-container .leaflet-control-edit-disable:before,
514
523
  .leaflet-container .leaflet-control-edit-save:before,
515
- .leaflet-container .leaflet-control-edit-cancel:before {
524
+ .leaflet-container .leaflet-control-edit-cancel:before,
525
+ .leaflet-container .leaflet-control-connected-peers:before {
516
526
  display: inline-block;
517
527
  width: 19px;
518
528
  height: 24px;
@@ -523,9 +533,15 @@ ul.photon-autocomplete {
523
533
  content: ' ';
524
534
  text-align: center;
525
535
  }
536
+
537
+ .leaflet-container .leaflet-control-connected-peers:before {
538
+ background-image: url('./img/16.svg');
539
+ }
540
+
526
541
  .leaflet-container .leaflet-control-edit-disable span,
527
542
  .leaflet-container .leaflet-control-edit-save span,
528
- .leaflet-container .leaflet-control-edit-cancel span {
543
+ .leaflet-container .leaflet-control-edit-cancel span,
544
+ .leaflet-container .leaflet-control-connected-peers span{
529
545
  margin-inline-start: 10px;
530
546
  }
531
547
  .leaflet-container .leaflet-control-edit-save:before {
@@ -534,8 +550,12 @@ ul.photon-autocomplete {
534
550
  .leaflet-container .leaflet-control-edit-disable:before {
535
551
  background-position: -50px -25px;
536
552
  }
553
+ .leaflet-container .leaflet-control-connected-peers:before {
554
+ background-position: -2px -95px;
555
+ }
537
556
  .leaflet-container .leaflet-control-edit-cancel,
538
- .leaflet-container .leaflet-control-edit-disable {
557
+ .leaflet-container .leaflet-control-edit-disable,
558
+ .leaflet-container .leaflet-control-connected-peers{
539
559
  border: 0.5px solid rgba(153, 153, 153, 0.40);
540
560
  }
541
561
  .leaflet-container .leaflet-control-edit-cancel:hover,
@@ -913,6 +933,16 @@ a.umap-control-caption,
913
933
  .umap-caption .umap-map-author {
914
934
  padding-inline-start: 31px;
915
935
  }
936
+ .umap-browser .main-toolbox {
937
+ padding-left: 4px; /* Align with toolbox below */
938
+ border-top: 1px solid var(--color-mediumGray);
939
+ margin-top: var(--box-margin);
940
+ padding-top: 3px;
941
+ padding-bottom: 3px;
942
+ }
943
+ .umap-browser .main-toolbox i {
944
+ cursor: pointer;
945
+ }
916
946
 
917
947
 
918
948
  /* ********************************* */
@@ -970,18 +1000,18 @@ a.umap-control-caption,
970
1000
  vertical-align: middle;
971
1001
  }
972
1002
 
973
- .datalayer-legend {
1003
+ .caption-item {
974
1004
  color: #555;
975
1005
  padding: 6px 8px;
976
1006
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
977
1007
  border-radius: 1px;
978
1008
  }
979
- .datalayer-legend ul {
1009
+ .caption-item ul {
980
1010
  list-style-type: none;
981
1011
  padding: 0;
982
1012
  margin: 0;
983
1013
  }
984
- .datalayer-legend .circles-layer-legend {
1014
+ .caption-item .circles-layer-legend {
985
1015
  padding: var(--box-padding);
986
1016
  }
987
1017
  .circles-layer-legend li {
@@ -79,9 +79,11 @@ describe('HybridLogicalClock', () => {
79
79
 
80
80
  it('should increment nn when local and remote times are equal', () => {
81
81
  const now = Date.now()
82
+ // mock the clock to be the same time
83
+ sinon.useFakeTimers(now)
82
84
  clock = new HybridLogicalClock(now, 5, 'local')
83
85
  const result = clock.receive(`${now}:7:remote`)
84
- expect(result.walltime).to.equal(now)
86
+ expect(result.walltime).to.be.at.least(now)
85
87
  expect(result.nn).to.equal(8)
86
88
  expect(result.id).to.equal('local')
87
89
  })
@@ -100,7 +102,12 @@ describe('HybridLogicalClock', () => {
100
102
  clock = new HybridLogicalClock(now, 5, 'local')
101
103
  const result = clock.receive(`${now - 1000}:7:remote`)
102
104
  expect(result.walltime).to.be.least(now)
103
- expect(result.nn).to.equal(6)
105
+ if (result.walltime > now) {
106
+ expect(result.nn).to.equal(5)
107
+ }
108
+ else {
109
+ expect(result.nn).to.equal(6)
110
+ }
104
111
  expect(result.id).to.equal('local')
105
112
  })
106
113
  })
@@ -117,7 +124,7 @@ describe('HybridLogicalClock', () => {
117
124
  const event2 = hlc.tick()
118
125
 
119
126
  // Simulate receiving a message from another node
120
- const remoteEvent = hlc.receive(`${Date.now() - 50}:5:remote-id`)
127
+ hlc.receive(`${Date.now() - 50}:5:remote-id`)
121
128
 
122
129
  const event3 = hlc.tick()
123
130
 
@@ -747,6 +747,30 @@ describe('Utils', () => {
747
747
  })
748
748
  })
749
749
 
750
+ describe('#fieldInSchema', () => {
751
+ it('should return true if the field is in the schema', () => {
752
+ assert.equal(Utils.fieldInSchema('foo', { foo: {} }), true)
753
+ })
754
+ it('should return false if the field is not in the schema', () => {
755
+ assert.equal(Utils.fieldInSchema('foo', { bar: {} }), false)
756
+ })
757
+ it('should return false if the schema is not provided', () => {
758
+ assert.equal(Utils.fieldInSchema('foo', {}), false)
759
+ })
760
+ it('should return false if the field is undefined', () => {
761
+ assert.equal(Utils.fieldInSchema(undefined, {}), false)
762
+ })
763
+ // check that options. is removed
764
+ it('should remove options. from the field', () => {
765
+ assert.equal(Utils.fieldInSchema('options.foo', { foo: {} }), true)
766
+ })
767
+
768
+ // check that subfields are removed
769
+ it('should remove subfields from the field', () => {
770
+ assert.equal(Utils.fieldInSchema('options.foo.bar', { foo: { bar: {} } }), true)
771
+ })
772
+ })
773
+
750
774
  describe('#parseNaiveDate', () => {
751
775
  it('should parse a date', () => {
752
776
  assert.equal(
umap/static/umap/vars.css CHANGED
@@ -6,6 +6,7 @@
6
6
  --color-mediumGray: #3e4444;
7
7
  --color-darkGray: #323737;
8
8
  --color-light: white;
9
+ --color-dark: black;
9
10
  --color-limeGreen: #b9f5d2;
10
11
  --color-brightCyan: #46ece6;
11
12
  --color-lightCyan: #d4fbf9;
@@ -14,7 +15,7 @@
14
15
 
15
16
  --background-color: var(--color-light);
16
17
  --color-accent: var(--color-brightCyan);
17
- --text-color: black;
18
+ --text-color: var(--color-dark);
18
19
 
19
20
  /* Buttons. */
20
21
  --button-primary-background: var(--color-waterMint);