umap-project 2.1.2__py3-none-any.whl → 2.1.3__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 (41) hide show
  1. umap/__init__.py +1 -1
  2. umap/models.py +2 -0
  3. umap/static/umap/js/umap.controls.js +29 -0
  4. umap/static/umap/js/umap.features.js +3 -1
  5. umap/static/umap/js/umap.importer.js +4 -5
  6. umap/static/umap/js/umap.js +27 -36
  7. umap/static/umap/js/umap.layer.js +7 -6
  8. umap/static/umap/test/Map.js +0 -304
  9. umap/static/umap/test/Polygon.js +0 -256
  10. umap/static/umap/test/Polyline.js +0 -116
  11. umap/static/umap/test/index.html +1 -4
  12. umap/tests/conftest.py +9 -0
  13. umap/tests/fixtures/test_upload_data.csv +2 -1
  14. umap/tests/fixtures/test_upload_data.umap +171 -0
  15. umap/tests/fixtures/test_upload_data_osm.json +33 -0
  16. umap/tests/integration/conftest.py +5 -0
  17. umap/tests/integration/test_anonymous_owned_map.py +3 -0
  18. umap/tests/integration/test_browser.py +4 -11
  19. umap/tests/integration/test_choropleth.py +89 -0
  20. umap/tests/integration/test_collaborative_editing.py +30 -1
  21. umap/tests/integration/test_datalayer.py +130 -0
  22. umap/tests/integration/test_edit_datalayer.py +134 -0
  23. umap/tests/integration/test_edit_map.py +15 -0
  24. umap/tests/integration/test_facets_browser.py +31 -0
  25. umap/tests/integration/test_import.py +347 -2
  26. umap/tests/integration/test_map.py +17 -37
  27. umap/tests/integration/test_owned_map.py +18 -0
  28. umap/tests/integration/test_picto.py +20 -33
  29. umap/tests/integration/test_polygon.py +363 -0
  30. umap/tests/integration/test_polyline.py +325 -0
  31. umap/tests/integration/test_tableeditor.py +27 -0
  32. {umap_project-2.1.2.dist-info → umap_project-2.1.3.dist-info}/METADATA +4 -4
  33. {umap_project-2.1.2.dist-info → umap_project-2.1.3.dist-info}/RECORD +36 -33
  34. umap/static/umap/test/Choropleth.js +0 -245
  35. umap/static/umap/test/DataLayer.js +0 -463
  36. umap/static/umap/test/Permissions.js +0 -74
  37. umap/static/umap/test/TableEditor.js +0 -104
  38. umap/tests/integration/test_drawing.py +0 -243
  39. {umap_project-2.1.2.dist-info → umap_project-2.1.3.dist-info}/WHEEL +0 -0
  40. {umap_project-2.1.2.dist-info → umap_project-2.1.3.dist-info}/entry_points.txt +0 -0
  41. {umap_project-2.1.2.dist-info → umap_project-2.1.3.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,27 @@
1
+ import json
2
+ import re
3
+ from pathlib import Path
4
+
5
+ from playwright.sync_api import expect
6
+
7
+ from umap.models import DataLayer
8
+
9
+
10
+ def test_table_editor(live_server, openmap, datalayer, page):
11
+ page.goto(f"{live_server.url}{openmap.get_absolute_url()}?edit")
12
+ page.get_by_role("link", name="Manage layers").click()
13
+ page.locator("#umap-ui-container").get_by_title(
14
+ "Edit properties in a table"
15
+ ).click()
16
+ page.once("dialog", lambda dialog: dialog.accept(prompt_text="newprop"))
17
+ page.get_by_text("Add a new property").click()
18
+ page.locator('input[name="newprop"]').fill("newvalue")
19
+ page.once("dialog", lambda dialog: dialog.accept())
20
+ page.hover(".umap-table-editor .tcell")
21
+ page.get_by_title("Delete this property on all").first.click()
22
+ with page.expect_response(re.compile(r".*/datalayer/update/.*")):
23
+ page.get_by_role("button", name="Save").click()
24
+ saved = DataLayer.objects.last()
25
+ data = json.loads(Path(saved.geojson.path).read_text())
26
+ assert data["features"][0]["properties"]["newprop"] == "newvalue"
27
+ assert "name" not in data["features"][0]["properties"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: umap-project
3
- Version: 2.1.2
3
+ Version: 2.1.3
4
4
  Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
5
5
  Author-email: Yohan Boniface <yb@enix.org>
6
6
  Maintainer-email: David Larlet <david@larlet.fr>
@@ -31,10 +31,10 @@ Provides-Extra: dev
31
31
  Requires-Dist: djlint==1.34.1; extra == 'dev'
32
32
  Requires-Dist: hatch==1.9.4; extra == 'dev'
33
33
  Requires-Dist: isort==5.13.2; extra == 'dev'
34
- Requires-Dist: mkdocs-material==9.5.14; extra == 'dev'
34
+ Requires-Dist: mkdocs-material==9.5.15; extra == 'dev'
35
35
  Requires-Dist: mkdocs==1.5.3; extra == 'dev'
36
36
  Requires-Dist: pymdown-extensions==10.7.1; extra == 'dev'
37
- Requires-Dist: ruff==0.3.3; extra == 'dev'
37
+ Requires-Dist: ruff==0.3.4; extra == 'dev'
38
38
  Requires-Dist: vermin==1.6.0; extra == 'dev'
39
39
  Provides-Extra: docker
40
40
  Requires-Dist: uwsgi==2.0.24; extra == 'docker'
@@ -44,7 +44,7 @@ Requires-Dist: playwright>=1.39; extra == 'test'
44
44
  Requires-Dist: pytest-django==4.8.0; extra == 'test'
45
45
  Requires-Dist: pytest-playwright==0.4.4; extra == 'test'
46
46
  Requires-Dist: pytest-xdist<4,>=3.5.0; extra == 'test'
47
- Requires-Dist: pytest==8.0.2; extra == 'test'
47
+ Requires-Dist: pytest==8.1.1; extra == 'test'
48
48
  Description-Content-Type: text/markdown
49
49
 
50
50
  # uMap project
@@ -1,4 +1,4 @@
1
- umap/__init__.py,sha256=g3cxz98sq2sH94EJfsXt9vgetLlENXp3IEKtEY6wMyg,18
1
+ umap/__init__.py,sha256=quW0BmC9Yqv06BNR-W3csWrRaFrAXIft7Gu-vCG69z0,18
2
2
  umap/admin.py,sha256=gL6zrexmDbIKIqOKHCuAM5wtqr8FIQkRtjbcXcNyBrs,749
3
3
  umap/apps.py,sha256=5ssKqPUuNJlapaBmr4LY_HDb7J1NFCT3wzythxQOOfs,109
4
4
  umap/autocomplete.py,sha256=WUsbsVBl_KzzEzxB4g3rAoS5-eEvCZGtelVzXeOFV90,444
@@ -8,7 +8,7 @@ umap/fields.py,sha256=c32tKWKF8aThrCXDJblwo0n9n2ET6hxBYzEupfr0B4o,900
8
8
  umap/forms.py,sha256=bpNLMSsB1sHUcaf24MmUpwVdEz_SHy_ohfhQMoKwDzI,3128
9
9
  umap/managers.py,sha256=-lBK0xYFRDfX76qDRdLnZOA8jEPYseEwIj8QOiHVM4w,243
10
10
  umap/middleware.py,sha256=p8EPW_gYW8Wh2lk0DNIAkZQbYlBZugW7Yq4iiA7L4aE,514
11
- umap/models.py,sha256=uraqRRDec7h0DWALb2yMJxaGgYIAN4BZTv8OYnktaWc,17519
11
+ umap/models.py,sha256=HZjDiK46y6D6ZRzKlqqJMBmv20a6M_pn_W6ubYDTrG0,17583
12
12
  umap/storage.py,sha256=bdjjdn768fZJYsyDNBxgwLvSu6rhde_Cc6yzyZZDmSg,2282
13
13
  umap/urls.py,sha256=frMCdfDQ2QB39xxqI8I12EeT-yChn5KDwDp-kQxp930,6876
14
14
  umap/utils.py,sha256=19i8ibi-1IXxafT4k_yOHMhD-DsPH74Ll9qw-UrUkM4,5856
@@ -186,15 +186,15 @@ umap/static/umap/img/source/16.svg,sha256=OHwbeoiEMXfGLSzCauzOdBEkNzCr_sC4sNB1sT
186
186
  umap/static/umap/img/source/24-white.svg,sha256=31n0rwyxcoJ69Mm2hvSAifQV0x00px0z-Jkf__UetnA,29369
187
187
  umap/static/umap/img/source/24.svg,sha256=rocP2xyMQdigy8noiipCM8hJNOc9tvF4uoXUPFBAjxY,38901
188
188
  umap/static/umap/js/umap.autocomplete.js,sha256=h3Ap9towVTChGSSZaMCrhWjQUPCrGcvW6fD46dD3pTs,7740
189
- umap/static/umap/js/umap.controls.js,sha256=LnfUQ4bGc5NojBx9o-BzAjPCvCE_8NuJ_RZYs7hQjxA,43967
189
+ umap/static/umap/js/umap.controls.js,sha256=1LWARSx_CzxOAfMoyg8FfwW5vOV8xKKPoWoWgATnChU,44898
190
190
  umap/static/umap/js/umap.core.js,sha256=aiTfkNI8Z13OiblpYEis6YrRNOObhVn70uikgBkkCIc,26116
191
191
  umap/static/umap/js/umap.datalayer.permissions.js,sha256=kpGb7sZKdcSj0QhmGZ56LFtubysc68S48e3YzeXQNNs,1947
192
- umap/static/umap/js/umap.features.js,sha256=S6WYoRy63H5cvDpxOESWu6xkGksWpSYGbYyOXkWNuUQ,34677
192
+ umap/static/umap/js/umap.features.js,sha256=iMsmunpxNWFITEzVFBm3lqI5r1fuFHMod-6JWf-gMxs,34680
193
193
  umap/static/umap/js/umap.forms.js,sha256=KOtUkqVA7rmwi7O5PPqj_t3QusCqkRRbEbc2lcIENY0,26940
194
194
  umap/static/umap/js/umap.icon.js,sha256=woRRVru2jSOl0Ah5DAl2vZCTg3rsPeNSoTt57IIcUOg,7546
195
- umap/static/umap/js/umap.importer.js,sha256=B4kzV0VWrQK7ovIb2LDDdyaDK6tY7Q6TQejXtR8IakM,5305
196
- umap/static/umap/js/umap.js,sha256=TjWMc3Ardf7wjr895lKM7ZmvoVG8F78_FhtF8VC2rt0,55950
197
- umap/static/umap/js/umap.layer.js,sha256=nvAihcDr6XFIZ-eSWgKkqXM5GJWmOeuKZBJnL28lkS4,47423
195
+ umap/static/umap/js/umap.importer.js,sha256=1tNOyFguvH4Q9f2WBvmndVYJa-9wocKqrCaDxmpT4a0,5375
196
+ umap/static/umap/js/umap.js,sha256=XbabOc0tBc2sNujYg7IntXwFENuiH-VBZCALs_n15D4,55572
197
+ umap/static/umap/js/umap.layer.js,sha256=ZRdb90lR8fvp4Kq07qWGla6eZAA8SeTfiCKOt_CvSIg,47538
198
198
  umap/static/umap/js/umap.permissions.js,sha256=d7M3aoQ4QliSD7lFnCWgoUN4pHax1-6JnerH8BjvubY,6097
199
199
  umap/static/umap/js/umap.popup.js,sha256=jZzwRbH3iIJlq35XiZa5Ugnw3KkplWckEgJmW7CAOWY,10108
200
200
  umap/static/umap/js/umap.share.js,sha256=36IjZW9Gd_b-1OMD95-hJaKc2etPazILCDNS4iZJqCA,7774
@@ -310,18 +310,14 @@ umap/static/umap/locale/zh_TW.Big5.json,sha256=d4VV9je7iQ8Qz4-gD71uGFHMte4Y26uc8
310
310
  umap/static/umap/locale/zh_TW.js,sha256=ulTuzsMAtFe44WMJEzyhnza0Q0qU00_gEl4xSYEhk-A,25141
311
311
  umap/static/umap/locale/zh_TW.json,sha256=yBJE01xj58EXPwVZXndmH4lJOae6sbiJZoh5-LdUqOc,24580
312
312
  umap/static/umap/test/.eslintrc,sha256=lsy_EQL70iOehznbw1QtRqN858VT9vQAZXg9h2aTX2w,444
313
- umap/static/umap/test/Choropleth.js,sha256=3iTkpcmaXhfSQzf3A4wZTKITOVBBkpXEHve0aGObV8U,5266
314
- umap/static/umap/test/DataLayer.js,sha256=8dOWcOAg1N-Q7ppN9PatFxk43NbdSB1vXAF8CBgSSdM,14224
315
313
  umap/static/umap/test/Feature.js,sha256=NIW3FD156wwo6UZHbKf56lQfQ3dG9fHBWGPc1DN_XAE,11766
316
- umap/static/umap/test/Map.js,sha256=7VrgxQ_0uS7kLQe5TsCn7qSDwwDKJ_zYsE7Y_7xwOKc,17448
314
+ umap/static/umap/test/Map.js,sha256=LWCyIKxgUXBM61i3QIPkDubTXGlRhy6N2NdlAnaM_mQ,919
317
315
  umap/static/umap/test/Marker.js,sha256=pzMBY-l1xD35OgVCd2FNxEDrBMAhafAyZPAFsV2Gd34,4111
318
- umap/static/umap/test/Permissions.js,sha256=D2zw97L1bqIwZSG30r0NnbS1YLxGiCNQIKWmRuYuSGM,2239
319
- umap/static/umap/test/Polygon.js,sha256=3g0pdU05ITImNb7PrS6v1ZorwG-pT7AQEbE_82inaEI,12094
320
- umap/static/umap/test/Polyline.js,sha256=P3NNlyHYv2wvhreSfI7TWawetPMgiBqA3l1iRQf-FJM,13964
321
- umap/static/umap/test/TableEditor.js,sha256=NXjGGNzVa5A6SQHuY_uhvu1_EqAFEftFp4cODBSJhMo,3192
316
+ umap/static/umap/test/Polygon.js,sha256=Jrflfe76wmfu8_E3bDLMGG11w-iUmrgL9Oiv4CcCsb8,2320
317
+ umap/static/umap/test/Polyline.js,sha256=5VxRW-b6bnNgyIzDsHM6g5lPci-Td1wY5VPg_umpId0,9374
322
318
  umap/static/umap/test/Util.js,sha256=yhcmnlugm-D7ECvyw_RVdsn7sFdnR1XHnMgNiNCZ-XI,17972
323
319
  umap/static/umap/test/_pre.js,sha256=O3qaQf-M2SLQ6c7AGIrRwdPm3iULiSTt-KkmAIQnAGg,12960
324
- umap/static/umap/test/index.html,sha256=24lW8t4Trr1T33bKKmSVivckJ2NxKni4qphlT5BMWCQ,6803
320
+ umap/static/umap/test/index.html,sha256=kWkQbao_Hb1XW23PDzlKn-oTMV6lGgTIsaW5X3COaQE,6685
325
321
  umap/static/umap/unittests/URLs.js,sha256=IOifAKSNuCTtmEGdfV6lHBkg6CT0LftgxWlXWLa5_1U,1886
326
322
  umap/static/umap/vendors/colorbrewer/colorbrewer.js,sha256=FebyRte_vQrD_CLC8Xjc2cI_bR694S6hDSIu26tDnZ8,24622
327
323
  umap/static/umap/vendors/contextmenu/leaflet.contextmenu.min.css,sha256=_pRTmdgpDxfu1Oxb7DnP_DTdA44G-k3kf0otWP8gEnc,990
@@ -427,7 +423,7 @@ umap/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
427
423
  umap/templatetags/umap_tags.py,sha256=2eOMT_6lGHRNSarfUpVTXggg6E0SN_rjrJKDCt__gF8,1671
428
424
  umap/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
429
425
  umap/tests/base.py,sha256=WcrRnmgcTvx9hHekIJsGyVhFwvyNrgT7PYQ6DPwuAZU,4200
430
- umap/tests/conftest.py,sha256=hlUPzNq7JakJnT2k5LOp7a8CKhHBWhz3v9EwioPOVUg,1367
426
+ umap/tests/conftest.py,sha256=yLFE5sqz61tw_EoZp1nrH-8S49_aStA5Lt1JtZXd-Hg,1498
431
427
  umap/tests/settings.py,sha256=qzKYcWzVXUVYxNdv8m7lLV-xkNrV8A8-LWliTJagHOE,716
432
428
  umap/tests/test_datalayer.py,sha256=HJYSQ11LVQe47nnsXdFeX5Ny4WMDPUYg3frnM5G1IzQ,6888
433
429
  umap/tests/test_datalayer_views.py,sha256=AJ-0YBorAgKZaKGd8rSYDguqy8acrz54EaQdfkNOH48,22111
@@ -442,38 +438,45 @@ umap/tests/fixtures/choropleth_region_chomage.geojson,sha256=mVVbYlf92Sr3wWH9ETm
442
438
  umap/tests/fixtures/circle.svg,sha256=P37vV2PhFPecAtY8qR3VlRuB79_wFaMeqKm2tX-2tkA,254
443
439
  umap/tests/fixtures/display_on_load.umap,sha256=eo4ecB3QUeCVu1u7COp7mZ8sCPkf2j4gGERE7N1v8GU,1845
444
440
  umap/tests/fixtures/star.svg,sha256=zIi-j16L1Fzxtqz2rV2NDDm1NDHBWQfM5O6MIeoxgEU,256
445
- umap/tests/fixtures/test_upload_data.csv,sha256=b4RQw68ixs9UMj8TlTucV5YSfbactWhLLuE1yCKUTAY,109
441
+ umap/tests/fixtures/test_upload_data.csv,sha256=KZOO-DcXhdTgx2FrIYZz_ZNZAKOp8zpN_jCyfDw3PcQ,186
446
442
  umap/tests/fixtures/test_upload_data.gpx,sha256=sIfeKEGxYikzg121qBdkBIVTFpuYh8q2-yWZOZwbu38,674
447
443
  umap/tests/fixtures/test_upload_data.json,sha256=t4PmJtVDhyI1x-E1a36jD8YVSa87T-Vtg8eBmHfQ4KQ,5650
448
444
  umap/tests/fixtures/test_upload_data.kml,sha256=t66ms8oNI3999bhRJx01mn-UuHeqWoVY5LfXnChBaP8,1102
445
+ umap/tests/fixtures/test_upload_data.umap,sha256=WUmcwcQ4o5_rYw0SOqjnszbk2TOzfynrK3psyApSWsk,5463
446
+ umap/tests/fixtures/test_upload_data_osm.json,sha256=ekOwBHdp7qHQ-JUGlb-kGUXcVepdMsBqr7k51pVaCbA,916
449
447
  umap/tests/fixtures/test_upload_empty_coordinates.json,sha256=-mJ_1orzUAROfE4PXchHXyqxjS-q4tDfvEFPllJiHFU,786
450
448
  umap/tests/fixtures/test_upload_missing_name.json,sha256=klSMHb6laTghzU4AdIG1_p5UZ1LbAJCCKnJea0qEFAI,4566
451
449
  umap/tests/fixtures/test_upload_non_linear_ring.json,sha256=WOR0NnJHNUUW6VKzZyIxU7WL1llnAmEVJwCWla6XOds,1525
452
450
  umap/tests/integration/__init__.py,sha256=nqQ2miDnSZOKDuFhQ5saFN3qQuK73Cs6xL9Od-mEKG4,57
453
- umap/tests/integration/conftest.py,sha256=XuOKbABI1ugTJyPlJzjSK-6L-_vSs3NaQJdYJbyU-6k,607
454
- umap/tests/integration/test_anonymous_owned_map.py,sha256=dfx4SQ-K7Un98H1fyeSvv4T573VKgh5gP2Oyvk1ZIIQ,8415
451
+ umap/tests/integration/conftest.py,sha256=yV16s_9uzsMt-myJ4nhzbCzCcefElApCq68daQTjxmw,703
452
+ umap/tests/integration/test_anonymous_owned_map.py,sha256=OMieSBsR5yvB_Wk-cxB6G5NxJy72mHOHmDjmXJtp8E0,8628
455
453
  umap/tests/integration/test_basics.py,sha256=1FesSkjNBWi5pEqN0MQlC3kIXTFZzuILq7A5ac9L-3g,1598
456
- umap/tests/integration/test_browser.py,sha256=p1MvBuojYRh2k2sqVPGEiVKHxo5CbG1PE-ZcALc4Et4,14076
457
- umap/tests/integration/test_collaborative_editing.py,sha256=KsGmfVt4bkTc5uCOibnXIWlxIudn7wUYE_hy9v8Kiik,9493
454
+ umap/tests/integration/test_browser.py,sha256=YF2U5f0g4RQPCaBFBTrBaLy0dDusy3gQG3dRDORQvaQ,13929
455
+ umap/tests/integration/test_choropleth.py,sha256=6zeqgY6JTtFF7K5vIVXuE37zuN6JJPn_1ccAZLGZZew,3803
456
+ umap/tests/integration/test_collaborative_editing.py,sha256=auvyoGbUJ-xe3HpITrQoCby_X_OZC5tQKUsXASJwtqc,10959
458
457
  umap/tests/integration/test_dashboard.py,sha256=k--MGBZsek4ebjCoHbUyv-XNkPbc55aOwxH6a7WuIL0,1173
459
- umap/tests/integration/test_drawing.py,sha256=tgtUcvHEwbSbC1Up9OtkVguJYmQKZMxXH3CgZmz8jBQ,8825
460
- umap/tests/integration/test_edit_datalayer.py,sha256=TouE4gFzUuA3tMLSi5tUpvtz0kpGyHXf_feD4UdKQI4,1621
458
+ umap/tests/integration/test_datalayer.py,sha256=ttoR41XDlEfS1z4fZtpHAi0SHnnFD6N_8g-9BRHm8fk,5136
459
+ umap/tests/integration/test_edit_datalayer.py,sha256=LHGaHoAbztnilLytV8c2cTqxk2om9fKT4WfdxZ-2uNU,7872
460
+ umap/tests/integration/test_edit_map.py,sha256=fOc95CtjYNDZuu6hiId9MAP3GizYS75AE96y1fmASRc,500
461
461
  umap/tests/integration/test_export_map.py,sha256=Y_sgsT7ZTrrDCx5dLegioJ40GN_PtzK7yRFHTxtIb-4,12738
462
- umap/tests/integration/test_facets_browser.py,sha256=wRh5h2kQg-ORfHqZKoumeNJ-JSC8CtgNZG7EvJW5SLc,2670
462
+ umap/tests/integration/test_facets_browser.py,sha256=w-7wCLzkcDgzxKfDBekVMl33ajvi3WzjGbede01bydE,3579
463
463
  umap/tests/integration/test_features_id_generation.py,sha256=e99_8AxeMAi53JjVGlsI32zlrXGAU19FHJfTuYdiBVQ,1511
464
- umap/tests/integration/test_import.py,sha256=ufbJl0M5rqGVGmHBZjMhioI9uVETSajevtpnQNJCFOI,2005
465
- umap/tests/integration/test_map.py,sha256=IY7J47cDhPSylaEh35k9LPx_K8U2Tll_J1JXtyBQPJs,8764
464
+ umap/tests/integration/test_import.py,sha256=2XDbzCxrBMqvwkGEMB44E7QbiU2SHEFwZk_Il5BHzpE,15481
465
+ umap/tests/integration/test_map.py,sha256=Ekj1I7d1y14pkoCrtq8OEhoxXsBNjmyNIAs4E4q07m8,8088
466
466
  umap/tests/integration/test_map_preview.py,sha256=4rPQF1zfiwqN7PvwFeB3OagR1wLEMbug0Omcd6zQShQ,2702
467
- umap/tests/integration/test_owned_map.py,sha256=3Ls3vnHgYtHVsUkeWuS71GtuQCD7nA_12hncWSn5n4A,9029
468
- umap/tests/integration/test_picto.py,sha256=PKZ7R0XQnNzJodNtmx2R7iDqq0xD2ArHRV8eD6o96k0,9348
467
+ umap/tests/integration/test_owned_map.py,sha256=E5J7wNPkYuWJMkbbTpVCheyRgJ9NVtBzE5SZNDZZiyw,9905
468
+ umap/tests/integration/test_picto.py,sha256=ShQnpiA1yHTYd_BV9kmG3VZ2p2v2COi4Vf3xNwKC_8M,9034
469
+ umap/tests/integration/test_polygon.py,sha256=sL4sOpNAs1h09W455NY8UunVHQHDogS_eGWWfHqOT9s,14335
470
+ umap/tests/integration/test_polyline.py,sha256=FNMXL4a67Qo-Yhr1V0XCGl6kWsiAJLsoFlJJAg7mOxE,12426
469
471
  umap/tests/integration/test_querystring.py,sha256=zTEs6S01G7t4MYrxmMyZqS7G8LmDoUAjmkhYeSV32h8,2649
470
472
  umap/tests/integration/test_share.py,sha256=gDna-wFedwJ_-8HLBw_G5IO3zA3l96p1FGBSZ15g_7g,1813
471
473
  umap/tests/integration/test_slideshow.py,sha256=uLPw4SyhLgpqU4-jrTu5vKSqYuZG7hXjfY8JlEt1JkM,2020
472
474
  umap/tests/integration/test_star.py,sha256=icB5SbFbXe4KYp3DIJ0xAwCrSQS2rweqIaQTAng3CfY,842
473
475
  umap/tests/integration/test_statics.py,sha256=UqaN2O56yHwn1tEE9I8B1lGnyztDLC0p7_rG6J7vLIs,1494
476
+ umap/tests/integration/test_tableeditor.py,sha256=QIxuMmb1YtibJEgaY92s5Q4Yf7q1Jo974IWsHBord5U,1124
474
477
  umap/tests/integration/test_tilelayer.py,sha256=3Jn1KdOM39DuDkLG-P3heDrsCiYvD6_FEnt0EKGjj5g,4141
475
- umap_project-2.1.2.dist-info/METADATA,sha256=pEqfRBAX0YjxA4wm2SBm7eYsska6n0IjIwwjU0GnoKQ,2559
476
- umap_project-2.1.2.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
477
- umap_project-2.1.2.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
478
- umap_project-2.1.2.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
479
- umap_project-2.1.2.dist-info/RECORD,,
478
+ umap_project-2.1.3.dist-info/METADATA,sha256=ia2_saR7oUpY52jT0joF8VL8Q7vFazXJnCmCgp2XM_E,2559
479
+ umap_project-2.1.3.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
480
+ umap_project-2.1.3.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
481
+ umap_project-2.1.3.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
482
+ umap_project-2.1.3.dist-info/RECORD,,
@@ -1,245 +0,0 @@
1
- const POLYGONS = {
2
- _umap_options: defaultDatalayerData(),
3
- type: 'FeatureCollection',
4
- features: [
5
- {
6
- type: 'Feature',
7
- properties: {
8
- name: 'number 1',
9
- value: 45,
10
- },
11
- geometry: {
12
- type: 'Polygon',
13
- coordinates: [
14
- [
15
- [0, 49],
16
- [-2, 47],
17
- [1, 46],
18
- [3, 47],
19
- [0, 49],
20
- ],
21
- ],
22
- },
23
- },
24
- {
25
- type: 'Feature',
26
- properties: {
27
- name: 'number 2',
28
- value: 87,
29
- },
30
- geometry: {
31
- type: 'Polygon',
32
- coordinates: [
33
- [
34
- [0, 49],
35
- [2, 50],
36
- [6, 49],
37
- [4, 47],
38
- [0, 49],
39
- ],
40
- ],
41
- },
42
- },
43
- {
44
- type: 'Feature',
45
- properties: {
46
- name: 'number 3',
47
- value: 673,
48
- },
49
- geometry: {
50
- type: 'Polygon',
51
- coordinates: [
52
- [
53
- [4, 47],
54
- [6, 49],
55
- [11, 47],
56
- [9, 45],
57
- [4, 47],
58
- ],
59
- ],
60
- },
61
- },
62
- {
63
- type: 'Feature',
64
- properties: {
65
- name: 'number 4',
66
- value: 674,
67
- },
68
- geometry: {
69
- type: 'Polygon',
70
- coordinates: [
71
- [
72
- [2, 46],
73
- [4, 47],
74
- [8, 45],
75
- [6, 43],
76
- [2, 46],
77
- ],
78
- ],
79
- },
80
- },
81
- {
82
- type: 'Feature',
83
- properties: {
84
- name: 'number 5',
85
- value: 839,
86
- },
87
- geometry: {
88
- type: 'Polygon',
89
- coordinates: [
90
- [
91
- [-2, 47],
92
- [1, 46],
93
- [0, 44],
94
- [-4, 45],
95
- [-2, 47],
96
- ],
97
- ],
98
- },
99
- },
100
- {
101
- type: 'Feature',
102
- properties: {
103
- name: 'number 6',
104
- value: 3829,
105
- },
106
- geometry: {
107
- type: 'Polygon',
108
- coordinates: [
109
- [
110
- [1, 45],
111
- [5, 43],
112
- [4, 42],
113
- [0, 44],
114
- [1, 45],
115
- ],
116
- ],
117
- },
118
- },
119
- {
120
- type: 'Feature',
121
- properties: {
122
- name: 'number 7',
123
- value: 4900,
124
- },
125
- geometry: {
126
- type: 'Polygon',
127
- coordinates: [
128
- [
129
- [9, 45],
130
- [12, 47],
131
- [15, 45],
132
- [13, 43],
133
- [9, 45],
134
- ],
135
- ],
136
- },
137
- },
138
- {
139
- type: 'Feature',
140
- properties: {
141
- name: 'number 8',
142
- value: 4988,
143
- },
144
- geometry: {
145
- type: 'Polygon',
146
- coordinates: [
147
- [
148
- [7, 43],
149
- [9, 45],
150
- [12, 43],
151
- [10, 42],
152
- [7, 43],
153
- ],
154
- ],
155
- },
156
- },
157
- {
158
- type: 'Feature',
159
- properties: {
160
- name: 'number 9',
161
- value: 9898,
162
- },
163
- geometry: {
164
- type: 'Polygon',
165
- coordinates: [
166
- [
167
- [4, 42],
168
- [6, 43],
169
- [9, 41],
170
- [7, 40],
171
- [4, 42],
172
- ],
173
- ],
174
- },
175
- },
176
- ],
177
- }
178
-
179
- describe('U.Choropleth', () => {
180
- let path = '/map/99/datalayer/edit/62/',
181
- poly1,
182
- poly4,
183
- poly9,
184
- map,
185
- datalayer
186
-
187
- before(async () => {
188
- fetchMock.mock(/\/datalayer\/62\/\?.*/, JSON.stringify(POLYGONS))
189
- map = initMap({ umap_id: 99 })
190
- const datalayer_options = defaultDatalayerData()
191
- await map.initDataLayers([datalayer_options])
192
- datalayer = map.getDataLayerByUmapId(62)
193
- datalayer.options.type = 'Choropleth'
194
- datalayer.options.choropleth = {
195
- property: 'value',
196
- }
197
- enableEdit()
198
- datalayer.eachLayer(function (layer) {
199
- if (layer.properties.name === 'number 1') {
200
- poly1 = layer
201
- } else if (layer.properties.name === 'number 4') {
202
- poly4 = layer
203
- } else if (layer.properties.name === 'number 9') {
204
- poly9 = layer
205
- }
206
- })
207
- })
208
- after(() => {
209
- fetchMock.restore()
210
- resetMap()
211
- })
212
-
213
- describe('#init()', () => {
214
- it('datalayer should have 9 features', () => {
215
- assert.equal(datalayer._index.length, 9)
216
- })
217
- })
218
- describe('#compute()', () => {
219
- it('choropleth should compute default colors', () => {
220
- datalayer.resetLayer(true)
221
- assert.deepEqual(
222
- datalayer.layer.options.breaks,
223
- [45, 673, 3829, 4900, 9898, 9898]
224
- )
225
- assert.equal(poly1._path.attributes.fill.value, '#eff3ff')
226
- assert.equal(poly4._path.attributes.fill.value, '#bdd7e7')
227
- assert.equal(poly9._path.attributes.fill.value, '#3182bd')
228
- })
229
- it('can change brewer scheme', () => {
230
- datalayer.options.choropleth.brewer = 'Reds'
231
- datalayer.resetLayer(true)
232
- assert.equal(poly1._path.attributes.fill.value, '#fee5d9')
233
- assert.equal(poly4._path.attributes.fill.value, '#fcae91')
234
- assert.equal(poly9._path.attributes.fill.value, '#de2d26')
235
- })
236
- it('choropleth should allow to change steps', () => {
237
- datalayer.options.choropleth.brewer = 'Blues'
238
- datalayer.options.choropleth.classes = 6
239
- datalayer.resetLayer(true)
240
- assert.equal(poly1._path.attributes.fill.value, '#eff3ff')
241
- assert.equal(poly4._path.attributes.fill.value, '#c6dbef')
242
- assert.equal(poly9._path.attributes.fill.value, '#3182bd')
243
- })
244
- })
245
- })