umap-project 3.6.0__py3-none-any.whl → 3.6.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.
umap/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION = "3.6.0"
1
+ VERSION = "3.6.1"
@@ -69,7 +69,7 @@ class Rule {
69
69
  }
70
70
  // TODO: deal with legacy rules on non typed fields
71
71
  else {
72
- this.cast = this.field.parse
72
+ this.cast = (value) => this.field.parse(value)
73
73
  if (
74
74
  // Special cases where we want to be lousy when checking isNaN without
75
75
  // coercing to a Number first because we handle multiple types.
@@ -0,0 +1,151 @@
1
+ {
2
+ "type": "umap",
3
+ "geometry": {
4
+ "type": "Point",
5
+ "coordinates": [
6
+ 2.243270874023438,
7
+ 47.61958693358351
8
+ ]
9
+ },
10
+ "properties": {
11
+ "name": "Map with Enum",
12
+ "tags": [
13
+ "tourism",
14
+ "cycling"
15
+ ],
16
+ "zoom": 10,
17
+ "center": {
18
+ "lat": 47.61958693358351,
19
+ "lng": 2.243270874023438
20
+ }
21
+ },
22
+ "layers": [
23
+ {
24
+ "type": "FeatureCollection",
25
+ "features": [
26
+ {
27
+ "type": "Feature",
28
+ "geometry": {
29
+ "coordinates": [
30
+ 4.492482,
31
+ 47.539039
32
+ ],
33
+ "type": "Point"
34
+ },
35
+ "properties": {
36
+ "name": "I'm a foo",
37
+ "toilets": true,
38
+ "features": "foo"
39
+ },
40
+ "id": "tAuzC"
41
+ },
42
+ {
43
+ "type": "Feature",
44
+ "geometry": {
45
+ "type": "Point",
46
+ "coordinates": [
47
+ 3.496243506779722,
48
+ 47.86537360504818,
49
+ 133.827948907274
50
+ ]
51
+ },
52
+ "properties": {
53
+ "name": "I'm a bar",
54
+ "toilets": false,
55
+ "features": "bar"
56
+ },
57
+ "id": "tAuzD"
58
+ },
59
+ {
60
+ "type": "Feature",
61
+ "geometry": {
62
+ "type": "Point",
63
+ "coordinates": [
64
+ 0.7150469999999999,
65
+ 49.23001199999999,
66
+ 0
67
+ ]
68
+ },
69
+ "properties": {
70
+ "name": "I'm another foo",
71
+ "toilets": false,
72
+ "features": "foo"
73
+ },
74
+ "id": "tAuzE"
75
+ },
76
+ {
77
+ "type": "Feature",
78
+ "geometry": {
79
+ "coordinates": [
80
+ 4.931327,
81
+ 48.022719
82
+ ],
83
+ "type": "Point"
84
+ },
85
+ "properties": {
86
+ "name": "I've no features"
87
+ },
88
+ "id": "RTaA8"
89
+ }
90
+ ],
91
+ "_umap_options": {
92
+ "name": "van.spots",
93
+ "rank": 0,
94
+ "color": "DodgerBlue",
95
+ "rules": [
96
+ {
97
+ "name": "has toilets",
98
+ "condition": "toilets=true",
99
+ "properties": {
100
+ "color": "green"
101
+ }
102
+ },
103
+ {
104
+ "name": "has foo",
105
+ "condition": "features=foo",
106
+ "properties": {
107
+ "color": "MediumOrchid"
108
+ }
109
+ },
110
+ {
111
+ "name": "has bar",
112
+ "condition": "features=bar",
113
+ "properties": {
114
+ "color": "red"
115
+ }
116
+ }
117
+ ],
118
+ "fields": [
119
+ {
120
+ "key": "name",
121
+ "type": "String"
122
+ },
123
+ {
124
+ "key": "toilets",
125
+ "type": "Boolean"
126
+ },
127
+ {
128
+ "key": "features",
129
+ "type": "Enum"
130
+ }
131
+ ],
132
+ "weight": 12,
133
+ "filters": [
134
+ {
135
+ "widget": "Switch",
136
+ "fieldKey": "toilets"
137
+ },
138
+ {
139
+ "widget": "Checkbox",
140
+ "fieldKey": "features"
141
+ }
142
+ ],
143
+ "editMode": "advanced",
144
+ "browsable": true,
145
+ "iconClass": "LargeCircle",
146
+ "inCaption": true,
147
+ "remoteData": {}
148
+ }
149
+ }
150
+ ]
151
+ }
@@ -1123,3 +1123,17 @@ def test_umap_import_with_iconurl(live_server, tilelayer, page):
1123
1123
  'img[src="https://umap.incubateur.anct.gouv.fr/uploads/pictogram/car-24.png"]'
1124
1124
  )
1125
1125
  ).to_have_count(2)
1126
+
1127
+
1128
+ def test_umap_import_with_enum_and_filter(live_server, tilelayer, page):
1129
+ page.goto(f"{live_server.url}/map/new/")
1130
+ page.get_by_title("Import data").click()
1131
+ file_input = page.locator("input[type='file']")
1132
+ with page.expect_file_chooser() as fc_info:
1133
+ file_input.click()
1134
+ file_chooser = fc_info.value
1135
+ path = Path(__file__).parent.parent / "fixtures/test_upload_data_with_enum.umap"
1136
+ file_chooser.set_files(path)
1137
+ page.get_by_role("button", name="Import data", exact=True).click()
1138
+ markers = page.locator(".umap-large-circle-icon")
1139
+ expect(markers).to_have_count(4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umap-project
3
- Version: 3.6.0
3
+ Version: 3.6.1
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>
@@ -1,4 +1,4 @@
1
- umap/__init__.py,sha256=hT6veETpVNpRqhpKNh8-nn9DTHHxeJX2gMeYNPF1jGk,18
1
+ umap/__init__.py,sha256=37OYpJUHRvLjldqeNdOMaDCSbtPoVQINs3afAvFR3LQ,18
2
2
  umap/admin.py,sha256=YlK4CgEWb2eFYRKiklsKouxeiQ8z_b-H2Fv2XCaiGFQ,3014
3
3
  umap/apps.py,sha256=5ssKqPUuNJlapaBmr4LY_HDb7J1NFCT3wzythxQOOfs,109
4
4
  umap/asgi.py,sha256=sJkGqDLgMoPkq2nMRyRE_Hz3ZLJm1X5lgXiQJu6rYt0,660
@@ -257,7 +257,7 @@ umap/static/umap/js/modules/orderable.js,sha256=zDtcElZ_MVPoGba8Iv9bxOzk4vuN7C-5
257
257
  umap/static/umap/js/modules/permissions.js,sha256=PKQrlyFRxwfdkF2hcKThVnWKsJD0TnMNmBO5FkheXoM,9299
258
258
  umap/static/umap/js/modules/printer.js,sha256=fvb44tLBiYR7TyBdXJdroYsjQOrnbzw7-6F0dBCUEGg,3607
259
259
  umap/static/umap/js/modules/request.js,sha256=9GRJoOPbdkHL9OFP6Joaf5wzsJckPyiG2O7AxQciTik,3885
260
- umap/static/umap/js/modules/rules.js,sha256=GVxnWN8VH8LDQdrozFPzG4t8RMlXRlHjp3UyRbOH3Nk,10113
260
+ umap/static/umap/js/modules/rules.js,sha256=yKPeJ9XurW43ecsNj9GtQfy1pZ9walWfLQfIK97oiP4,10131
261
261
  umap/static/umap/js/modules/schema.js,sha256=hTWHwdnWkEWZrpI1cJMdYqtEnub-40DnL3VG_8OCHNU,15299
262
262
  umap/static/umap/js/modules/share.js,sha256=vlDQbGLtsvHy95Z3oDk-5vU-NHgullO7t13mAToA3iA,7071
263
263
  umap/static/umap/js/modules/slideshow.js,sha256=hnxFW4vzya9ddZ-eUTvTSQZjnKhv7s_EAlrQERANXqo,3590
@@ -545,6 +545,7 @@ umap/tests/fixtures/test_upload_data.json,sha256=t4PmJtVDhyI1x-E1a36jD8YVSa87T-V
545
545
  umap/tests/fixtures/test_upload_data.kml,sha256=t66ms8oNI3999bhRJx01mn-UuHeqWoVY5LfXnChBaP8,1102
546
546
  umap/tests/fixtures/test_upload_data.umap,sha256=WUmcwcQ4o5_rYw0SOqjnszbk2TOzfynrK3psyApSWsk,5463
547
547
  umap/tests/fixtures/test_upload_data_osm.json,sha256=ekOwBHdp7qHQ-JUGlb-kGUXcVepdMsBqr7k51pVaCbA,916
548
+ umap/tests/fixtures/test_upload_data_with_enum.umap,sha256=V-Rm8o5i-pdDI4_bESY30X0C3CYDwX8lN3fCsmA83RM,3251
548
549
  umap/tests/fixtures/test_upload_data_with_iconurl.umap,sha256=eMjat_diYHMCPRyOF5Br1bJWNi9vNsKJerfehIjwILo,3334
549
550
  umap/tests/fixtures/test_upload_empty_coordinates.json,sha256=-mJ_1orzUAROfE4PXchHXyqxjS-q4tDfvEFPllJiHFU,786
550
551
  umap/tests/fixtures/test_upload_georss.xml,sha256=lfmVA0qGDakCG48jjsLmSIE1U6iZ9yyFuqqX6Srt8Js,1160
@@ -578,7 +579,7 @@ umap/tests/integration/test_fields.py,sha256=Rx197Q49-XGUPQ9Jakcp3pkAf2Q9Gtxs6wm
578
579
  umap/tests/integration/test_filters.py,sha256=LdIW1uYNxfKzy7EnNVphhJFA_nXpm3V5Z6xWGzCOWfw,25383
579
580
  umap/tests/integration/test_heatmap.py,sha256=N4CH5cRrI8tNsCOqQAqhQR2eKV0bHV2uwF5apml_DCs,1627
580
581
  umap/tests/integration/test_iframe.py,sha256=fwwX9QVBR_zaMHAvfKQSiNGzFJ4Lu3BJlH8asz1nIUc,901
581
- umap/tests/integration/test_import.py,sha256=kao40VbF3qxS8eb8ccgOkD1yROqGT8UDBxfYmeOo9Lk,44035
582
+ umap/tests/integration/test_import.py,sha256=tf7dqrEUBP7CRq657LU2YOqa2OwTWez5Oys6ggf9BKQ,44640
582
583
  umap/tests/integration/test_map.py,sha256=cZSDVVK7e6WB2IBscyKWx2MH-UG5gyRiPtVIYDHU2Ag,8787
583
584
  umap/tests/integration/test_map_list.py,sha256=l1FImKnJkY7DupYX8waKaUZqhnORR20L8dzaqu-eF8E,1280
584
585
  umap/tests/integration/test_map_preview.py,sha256=lmHiF7lk_2qkgXlhTHUkAWrUEEGzzbi80_QR7Xuqwho,3541
@@ -602,8 +603,8 @@ umap/tests/integration/test_view_marker.py,sha256=NFCwNez__E_WsE1DuW5RuB0HVKDP4C
602
603
  umap/tests/integration/test_view_polygon.py,sha256=NMJC6Nt9VpQ8FIU9Pqq2OspHv49xsWlsoXCr8iBa0VA,2060
603
604
  umap/tests/integration/test_view_polyline.py,sha256=aJoXKmLhJaN0yhPdDCVskZNGx3q3mLDkjVPhZ30cadA,13959
604
605
  umap/tests/integration/test_websocket_sync.py,sha256=WEJQL7FU28UFxz7YfA0kOQFDqV_-dofxqF7D955iIM0,29790
605
- umap_project-3.6.0.dist-info/METADATA,sha256=pQnzV4hRZRXiMIuP4tuHOenOI9esNRLXWHivPCeO3XQ,6039
606
- umap_project-3.6.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
607
- umap_project-3.6.0.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
608
- umap_project-3.6.0.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
609
- umap_project-3.6.0.dist-info/RECORD,,
606
+ umap_project-3.6.1.dist-info/METADATA,sha256=rn_G1hDEVAIuCVWXKs6594ABW8xFw_gKMXulwXzOG8M,6039
607
+ umap_project-3.6.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
608
+ umap_project-3.6.1.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
609
+ umap_project-3.6.1.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
610
+ umap_project-3.6.1.dist-info/RECORD,,