umap-project 2.4.1__py3-none-any.whl → 2.5.0__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 +1 -1
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +145 -90
- umap/locale/en/LC_MESSAGES/django.po +13 -13
- umap/locale/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/eu/LC_MESSAGES/django.po +145 -89
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +100 -50
- umap/static/umap/base.css +5 -2
- umap/static/umap/content.css +2 -2
- umap/static/umap/css/contextmenu.css +11 -0
- umap/static/umap/css/dialog.css +25 -4
- umap/static/umap/css/importers.css +2 -0
- umap/static/umap/css/panel.css +6 -4
- umap/static/umap/css/slideshow.css +69 -0
- umap/static/umap/css/tableeditor.css +69 -0
- umap/static/umap/css/tooltip.css +3 -3
- umap/static/umap/img/16-white.svg +4 -0
- umap/static/umap/img/source/16-white.svg +5 -1
- umap/static/umap/js/components/alerts/alert.css +11 -11
- umap/static/umap/js/components/alerts/alert.js +1 -1
- umap/static/umap/js/modules/autocomplete.js +27 -5
- umap/static/umap/js/modules/browser.js +20 -14
- umap/static/umap/js/modules/caption.js +4 -4
- umap/static/umap/js/modules/dompurify.js +2 -3
- umap/static/umap/js/modules/facets.js +53 -17
- umap/static/umap/js/modules/formatter.js +153 -0
- umap/static/umap/js/modules/global.js +25 -16
- umap/static/umap/js/modules/help.js +26 -26
- umap/static/umap/js/modules/importer.js +10 -10
- umap/static/umap/js/modules/importers/communesfr.js +3 -1
- umap/static/umap/js/modules/importers/datasets.js +8 -6
- umap/static/umap/js/modules/importers/geodatamine.js +14 -14
- umap/static/umap/js/modules/importers/overpass.js +19 -15
- umap/static/umap/js/modules/orderable.js +2 -2
- umap/static/umap/js/modules/request.js +1 -1
- umap/static/umap/js/modules/rules.js +26 -11
- umap/static/umap/js/modules/schema.js +16 -12
- umap/static/umap/js/{umap.share.js → modules/share.js} +58 -103
- umap/static/umap/js/modules/slideshow.js +141 -0
- umap/static/umap/js/modules/sync/engine.js +3 -3
- umap/static/umap/js/modules/sync/updaters.js +10 -11
- umap/static/umap/js/modules/sync/websocket.js +1 -1
- umap/static/umap/js/modules/tableeditor.js +329 -0
- umap/static/umap/js/modules/ui/base.js +93 -0
- umap/static/umap/js/modules/ui/contextmenu.js +50 -0
- umap/static/umap/js/modules/ui/dialog.js +169 -31
- umap/static/umap/js/modules/ui/panel.js +7 -5
- umap/static/umap/js/modules/ui/tooltip.js +7 -77
- umap/static/umap/js/modules/urls.js +1 -2
- umap/static/umap/js/modules/utils.js +36 -16
- umap/static/umap/js/umap.controls.js +27 -29
- umap/static/umap/js/umap.core.js +19 -15
- umap/static/umap/js/umap.datalayer.permissions.js +15 -18
- umap/static/umap/js/umap.features.js +113 -131
- umap/static/umap/js/umap.forms.js +203 -228
- umap/static/umap/js/umap.icon.js +17 -22
- umap/static/umap/js/umap.js +117 -107
- umap/static/umap/js/umap.layer.js +374 -324
- umap/static/umap/js/umap.permissions.js +7 -10
- umap/static/umap/js/umap.popup.js +20 -20
- umap/static/umap/locale/am_ET.js +22 -5
- umap/static/umap/locale/am_ET.json +22 -5
- umap/static/umap/locale/ar.js +22 -5
- umap/static/umap/locale/ar.json +22 -5
- umap/static/umap/locale/ast.js +22 -5
- umap/static/umap/locale/ast.json +22 -5
- umap/static/umap/locale/bg.js +22 -5
- umap/static/umap/locale/bg.json +22 -5
- umap/static/umap/locale/br.js +22 -5
- umap/static/umap/locale/br.json +22 -5
- umap/static/umap/locale/ca.js +56 -39
- umap/static/umap/locale/ca.json +56 -39
- umap/static/umap/locale/cs_CZ.js +22 -5
- umap/static/umap/locale/cs_CZ.json +22 -5
- umap/static/umap/locale/da.js +22 -5
- umap/static/umap/locale/da.json +22 -5
- umap/static/umap/locale/de.js +22 -5
- umap/static/umap/locale/de.json +22 -5
- umap/static/umap/locale/el.js +27 -10
- umap/static/umap/locale/el.json +27 -10
- umap/static/umap/locale/en.js +22 -6
- umap/static/umap/locale/en.json +22 -6
- umap/static/umap/locale/en_US.json +22 -5
- umap/static/umap/locale/es.js +22 -6
- umap/static/umap/locale/es.json +22 -6
- umap/static/umap/locale/et.js +22 -5
- umap/static/umap/locale/et.json +22 -5
- umap/static/umap/locale/eu.js +167 -150
- umap/static/umap/locale/eu.json +167 -150
- umap/static/umap/locale/fa_IR.js +22 -5
- umap/static/umap/locale/fa_IR.json +22 -5
- umap/static/umap/locale/fi.js +22 -5
- umap/static/umap/locale/fi.json +22 -5
- umap/static/umap/locale/fr.js +22 -6
- umap/static/umap/locale/fr.json +22 -6
- umap/static/umap/locale/gl.js +22 -5
- umap/static/umap/locale/gl.json +22 -5
- umap/static/umap/locale/he.js +22 -5
- umap/static/umap/locale/he.json +22 -5
- umap/static/umap/locale/hr.js +22 -5
- umap/static/umap/locale/hr.json +22 -5
- umap/static/umap/locale/hu.js +89 -72
- umap/static/umap/locale/hu.json +89 -72
- umap/static/umap/locale/id.js +22 -5
- umap/static/umap/locale/id.json +22 -5
- umap/static/umap/locale/is.js +22 -5
- umap/static/umap/locale/is.json +22 -5
- umap/static/umap/locale/it.js +22 -5
- umap/static/umap/locale/it.json +22 -5
- umap/static/umap/locale/ja.js +22 -5
- umap/static/umap/locale/ja.json +22 -5
- umap/static/umap/locale/ko.js +22 -5
- umap/static/umap/locale/ko.json +22 -5
- umap/static/umap/locale/lt.js +22 -5
- umap/static/umap/locale/lt.json +22 -5
- umap/static/umap/locale/ms.js +22 -5
- umap/static/umap/locale/ms.json +22 -5
- umap/static/umap/locale/nl.js +22 -5
- umap/static/umap/locale/nl.json +22 -5
- umap/static/umap/locale/no.js +22 -5
- umap/static/umap/locale/no.json +22 -5
- umap/static/umap/locale/pl.js +22 -5
- umap/static/umap/locale/pl.json +22 -5
- umap/static/umap/locale/pl_PL.json +22 -5
- umap/static/umap/locale/pt.js +22 -6
- umap/static/umap/locale/pt.json +22 -6
- umap/static/umap/locale/pt_BR.js +22 -5
- umap/static/umap/locale/pt_BR.json +22 -5
- umap/static/umap/locale/pt_PT.js +22 -5
- umap/static/umap/locale/pt_PT.json +22 -5
- umap/static/umap/locale/ro.js +22 -5
- umap/static/umap/locale/ro.json +22 -5
- umap/static/umap/locale/ru.js +22 -5
- umap/static/umap/locale/ru.json +22 -5
- umap/static/umap/locale/sk_SK.js +22 -5
- umap/static/umap/locale/sk_SK.json +22 -5
- umap/static/umap/locale/sl.js +22 -5
- umap/static/umap/locale/sl.json +22 -5
- umap/static/umap/locale/sr.js +22 -5
- umap/static/umap/locale/sr.json +22 -5
- umap/static/umap/locale/sv.js +22 -5
- umap/static/umap/locale/sv.json +22 -5
- umap/static/umap/locale/th_TH.js +22 -5
- umap/static/umap/locale/th_TH.json +22 -5
- umap/static/umap/locale/tr.js +22 -5
- umap/static/umap/locale/tr.json +22 -5
- umap/static/umap/locale/uk_UA.js +22 -5
- umap/static/umap/locale/uk_UA.json +22 -5
- umap/static/umap/locale/vi.js +22 -5
- umap/static/umap/locale/vi.json +22 -5
- umap/static/umap/locale/vi_VN.json +22 -5
- umap/static/umap/locale/zh.js +22 -5
- umap/static/umap/locale/zh.json +22 -5
- umap/static/umap/locale/zh_CN.json +22 -5
- umap/static/umap/locale/zh_TW.Big5.json +22 -5
- umap/static/umap/locale/zh_TW.js +22 -5
- umap/static/umap/locale/zh_TW.json +22 -5
- umap/static/umap/map.css +9 -153
- umap/static/umap/vars.css +15 -0
- umap/static/umap/vendors/dompurify/purify.es.js +5 -59
- umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +410 -428
- umap/static/umap/vendors/geojson-to-gpx/index.js +155 -0
- umap/static/umap/vendors/osmtogeojson/osmtogeojson.js +1 -2
- umap/static/umap/vendors/togeojson/togeojson.es.js +1109 -0
- umap/static/umap/vendors/togeojson/{togeojson.umd.js.map → togeojson.es.mjs.map} +1 -1
- umap/static/umap/vendors/tokml/tokml.es.js +895 -0
- umap/static/umap/vendors/tokml/tokml.es.mjs.map +1 -0
- umap/storage.py +6 -2
- umap/templates/umap/components/alerts/alert.html +3 -3
- umap/templates/umap/css.html +3 -0
- umap/templates/umap/js.html +0 -6
- umap/tests/fixtures/categorized_highway.geojson +1 -0
- umap/tests/fixtures/test_import_osm_relation.json +130 -0
- umap/tests/integration/conftest.py +8 -1
- umap/tests/integration/test_browser.py +3 -2
- umap/tests/integration/test_categorized_layer.py +141 -0
- umap/tests/integration/test_conditional_rules.py +21 -0
- umap/tests/integration/test_datalayer.py +9 -4
- umap/tests/integration/test_edit_datalayer.py +1 -0
- umap/tests/integration/test_edit_polygon.py +1 -1
- umap/tests/integration/test_export_map.py +2 -3
- umap/tests/integration/test_import.py +22 -0
- umap/tests/integration/test_map_preview.py +36 -2
- umap/tests/integration/test_tableeditor.py +158 -4
- umap/tests/integration/test_websocket_sync.py +2 -2
- umap/tests/test_views.py +2 -2
- umap/views.py +3 -2
- {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/METADATA +8 -8
- {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/RECORD +194 -184
- umap/static/umap/js/umap.slideshow.js +0 -165
- umap/static/umap/js/umap.tableeditor.js +0 -118
- umap/static/umap/vendors/togeojson/togeojson.umd.js +0 -2
- umap/static/umap/vendors/togpx/togpx.js +0 -547
- umap/static/umap/vendors/tokml/tokml.js +0 -343
- {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/WHEEL +0 -0
- {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.4.1.dist-info → umap_project-2.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,3 +1,153 @@
|
|
|
1
|
+
U.COLORS = [
|
|
2
|
+
'Black',
|
|
3
|
+
'Navy',
|
|
4
|
+
'DarkBlue',
|
|
5
|
+
'MediumBlue',
|
|
6
|
+
'Blue',
|
|
7
|
+
'DarkGreen',
|
|
8
|
+
'Green',
|
|
9
|
+
'Teal',
|
|
10
|
+
'DarkCyan',
|
|
11
|
+
'DeepSkyBlue',
|
|
12
|
+
'DarkTurquoise',
|
|
13
|
+
'MediumSpringGreen',
|
|
14
|
+
'Lime',
|
|
15
|
+
'SpringGreen',
|
|
16
|
+
'Aqua',
|
|
17
|
+
'Cyan',
|
|
18
|
+
'MidnightBlue',
|
|
19
|
+
'DodgerBlue',
|
|
20
|
+
'LightSeaGreen',
|
|
21
|
+
'ForestGreen',
|
|
22
|
+
'SeaGreen',
|
|
23
|
+
'DarkSlateGray',
|
|
24
|
+
'DarkSlateGrey',
|
|
25
|
+
'LimeGreen',
|
|
26
|
+
'MediumSeaGreen',
|
|
27
|
+
'Turquoise',
|
|
28
|
+
'RoyalBlue',
|
|
29
|
+
'SteelBlue',
|
|
30
|
+
'DarkSlateBlue',
|
|
31
|
+
'MediumTurquoise',
|
|
32
|
+
'Indigo',
|
|
33
|
+
'DarkOliveGreen',
|
|
34
|
+
'CadetBlue',
|
|
35
|
+
'CornflowerBlue',
|
|
36
|
+
'MediumAquaMarine',
|
|
37
|
+
'DimGray',
|
|
38
|
+
'DimGrey',
|
|
39
|
+
'SlateBlue',
|
|
40
|
+
'OliveDrab',
|
|
41
|
+
'SlateGray',
|
|
42
|
+
'SlateGrey',
|
|
43
|
+
'LightSlateGray',
|
|
44
|
+
'LightSlateGrey',
|
|
45
|
+
'MediumSlateBlue',
|
|
46
|
+
'LawnGreen',
|
|
47
|
+
'Chartreuse',
|
|
48
|
+
'Aquamarine',
|
|
49
|
+
'Maroon',
|
|
50
|
+
'Purple',
|
|
51
|
+
'Olive',
|
|
52
|
+
'Gray',
|
|
53
|
+
'Grey',
|
|
54
|
+
'SkyBlue',
|
|
55
|
+
'LightSkyBlue',
|
|
56
|
+
'BlueViolet',
|
|
57
|
+
'DarkRed',
|
|
58
|
+
'DarkMagenta',
|
|
59
|
+
'SaddleBrown',
|
|
60
|
+
'DarkSeaGreen',
|
|
61
|
+
'LightGreen',
|
|
62
|
+
'MediumPurple',
|
|
63
|
+
'DarkViolet',
|
|
64
|
+
'PaleGreen',
|
|
65
|
+
'DarkOrchid',
|
|
66
|
+
'YellowGreen',
|
|
67
|
+
'Sienna',
|
|
68
|
+
'Brown',
|
|
69
|
+
'DarkGray',
|
|
70
|
+
'DarkGrey',
|
|
71
|
+
'LightBlue',
|
|
72
|
+
'GreenYellow',
|
|
73
|
+
'PaleTurquoise',
|
|
74
|
+
'LightSteelBlue',
|
|
75
|
+
'PowderBlue',
|
|
76
|
+
'FireBrick',
|
|
77
|
+
'DarkGoldenRod',
|
|
78
|
+
'MediumOrchid',
|
|
79
|
+
'RosyBrown',
|
|
80
|
+
'DarkKhaki',
|
|
81
|
+
'Silver',
|
|
82
|
+
'MediumVioletRed',
|
|
83
|
+
'IndianRed',
|
|
84
|
+
'Peru',
|
|
85
|
+
'Chocolate',
|
|
86
|
+
'Tan',
|
|
87
|
+
'LightGray',
|
|
88
|
+
'LightGrey',
|
|
89
|
+
'Thistle',
|
|
90
|
+
'Orchid',
|
|
91
|
+
'GoldenRod',
|
|
92
|
+
'PaleVioletRed',
|
|
93
|
+
'Crimson',
|
|
94
|
+
'Gainsboro',
|
|
95
|
+
'Plum',
|
|
96
|
+
'BurlyWood',
|
|
97
|
+
'LightCyan',
|
|
98
|
+
'Lavender',
|
|
99
|
+
'DarkSalmon',
|
|
100
|
+
'Violet',
|
|
101
|
+
'PaleGoldenRod',
|
|
102
|
+
'LightCoral',
|
|
103
|
+
'Khaki',
|
|
104
|
+
'AliceBlue',
|
|
105
|
+
'HoneyDew',
|
|
106
|
+
'Azure',
|
|
107
|
+
'SandyBrown',
|
|
108
|
+
'Wheat',
|
|
109
|
+
'Beige',
|
|
110
|
+
'WhiteSmoke',
|
|
111
|
+
'MintCream',
|
|
112
|
+
'GhostWhite',
|
|
113
|
+
'Salmon',
|
|
114
|
+
'AntiqueWhite',
|
|
115
|
+
'Linen',
|
|
116
|
+
'LightGoldenRodYellow',
|
|
117
|
+
'OldLace',
|
|
118
|
+
'Red',
|
|
119
|
+
'Fuchsia',
|
|
120
|
+
'Magenta',
|
|
121
|
+
'DeepPink',
|
|
122
|
+
'OrangeRed',
|
|
123
|
+
'Tomato',
|
|
124
|
+
'HotPink',
|
|
125
|
+
'Coral',
|
|
126
|
+
'DarkOrange',
|
|
127
|
+
'LightSalmon',
|
|
128
|
+
'Orange',
|
|
129
|
+
'LightPink',
|
|
130
|
+
'Pink',
|
|
131
|
+
'Gold',
|
|
132
|
+
'PeachPuff',
|
|
133
|
+
'NavajoWhite',
|
|
134
|
+
'Moccasin',
|
|
135
|
+
'Bisque',
|
|
136
|
+
'MistyRose',
|
|
137
|
+
'BlanchedAlmond',
|
|
138
|
+
'PapayaWhip',
|
|
139
|
+
'LavenderBlush',
|
|
140
|
+
'SeaShell',
|
|
141
|
+
'Cornsilk',
|
|
142
|
+
'LemonChiffon',
|
|
143
|
+
'FloralWhite',
|
|
144
|
+
'Snow',
|
|
145
|
+
'Yellow',
|
|
146
|
+
'LightYellow',
|
|
147
|
+
'Ivory',
|
|
148
|
+
'White',
|
|
149
|
+
]
|
|
150
|
+
|
|
1
151
|
L.FormBuilder.Element.include({
|
|
2
152
|
undefine: function () {
|
|
3
153
|
L.DomUtil.addClass(this.wrapper, 'undefined')
|
|
@@ -61,8 +211,8 @@ L.FormBuilder.Element.include({
|
|
|
61
211
|
|
|
62
212
|
get: function (own) {
|
|
63
213
|
if (!this.options.inheritable || own) return this.builder.getter(this.field)
|
|
64
|
-
const path = this.field.split('.')
|
|
65
|
-
|
|
214
|
+
const path = this.field.split('.')
|
|
215
|
+
const key = path[path.length - 1]
|
|
66
216
|
return this.obj.getOption(key)
|
|
67
217
|
},
|
|
68
218
|
|
|
@@ -115,156 +265,7 @@ L.FormBuilder.CheckBox.include({
|
|
|
115
265
|
})
|
|
116
266
|
|
|
117
267
|
L.FormBuilder.ColorPicker = L.FormBuilder.Input.extend({
|
|
118
|
-
colors:
|
|
119
|
-
'Black',
|
|
120
|
-
'Navy',
|
|
121
|
-
'DarkBlue',
|
|
122
|
-
'MediumBlue',
|
|
123
|
-
'Blue',
|
|
124
|
-
'DarkGreen',
|
|
125
|
-
'Green',
|
|
126
|
-
'Teal',
|
|
127
|
-
'DarkCyan',
|
|
128
|
-
'DeepSkyBlue',
|
|
129
|
-
'DarkTurquoise',
|
|
130
|
-
'MediumSpringGreen',
|
|
131
|
-
'Lime',
|
|
132
|
-
'SpringGreen',
|
|
133
|
-
'Aqua',
|
|
134
|
-
'Cyan',
|
|
135
|
-
'MidnightBlue',
|
|
136
|
-
'DodgerBlue',
|
|
137
|
-
'LightSeaGreen',
|
|
138
|
-
'ForestGreen',
|
|
139
|
-
'SeaGreen',
|
|
140
|
-
'DarkSlateGray',
|
|
141
|
-
'DarkSlateGrey',
|
|
142
|
-
'LimeGreen',
|
|
143
|
-
'MediumSeaGreen',
|
|
144
|
-
'Turquoise',
|
|
145
|
-
'RoyalBlue',
|
|
146
|
-
'SteelBlue',
|
|
147
|
-
'DarkSlateBlue',
|
|
148
|
-
'MediumTurquoise',
|
|
149
|
-
'Indigo',
|
|
150
|
-
'DarkOliveGreen',
|
|
151
|
-
'CadetBlue',
|
|
152
|
-
'CornflowerBlue',
|
|
153
|
-
'MediumAquaMarine',
|
|
154
|
-
'DimGray',
|
|
155
|
-
'DimGrey',
|
|
156
|
-
'SlateBlue',
|
|
157
|
-
'OliveDrab',
|
|
158
|
-
'SlateGray',
|
|
159
|
-
'SlateGrey',
|
|
160
|
-
'LightSlateGray',
|
|
161
|
-
'LightSlateGrey',
|
|
162
|
-
'MediumSlateBlue',
|
|
163
|
-
'LawnGreen',
|
|
164
|
-
'Chartreuse',
|
|
165
|
-
'Aquamarine',
|
|
166
|
-
'Maroon',
|
|
167
|
-
'Purple',
|
|
168
|
-
'Olive',
|
|
169
|
-
'Gray',
|
|
170
|
-
'Grey',
|
|
171
|
-
'SkyBlue',
|
|
172
|
-
'LightSkyBlue',
|
|
173
|
-
'BlueViolet',
|
|
174
|
-
'DarkRed',
|
|
175
|
-
'DarkMagenta',
|
|
176
|
-
'SaddleBrown',
|
|
177
|
-
'DarkSeaGreen',
|
|
178
|
-
'LightGreen',
|
|
179
|
-
'MediumPurple',
|
|
180
|
-
'DarkViolet',
|
|
181
|
-
'PaleGreen',
|
|
182
|
-
'DarkOrchid',
|
|
183
|
-
'YellowGreen',
|
|
184
|
-
'Sienna',
|
|
185
|
-
'Brown',
|
|
186
|
-
'DarkGray',
|
|
187
|
-
'DarkGrey',
|
|
188
|
-
'LightBlue',
|
|
189
|
-
'GreenYellow',
|
|
190
|
-
'PaleTurquoise',
|
|
191
|
-
'LightSteelBlue',
|
|
192
|
-
'PowderBlue',
|
|
193
|
-
'FireBrick',
|
|
194
|
-
'DarkGoldenRod',
|
|
195
|
-
'MediumOrchid',
|
|
196
|
-
'RosyBrown',
|
|
197
|
-
'DarkKhaki',
|
|
198
|
-
'Silver',
|
|
199
|
-
'MediumVioletRed',
|
|
200
|
-
'IndianRed',
|
|
201
|
-
'Peru',
|
|
202
|
-
'Chocolate',
|
|
203
|
-
'Tan',
|
|
204
|
-
'LightGray',
|
|
205
|
-
'LightGrey',
|
|
206
|
-
'Thistle',
|
|
207
|
-
'Orchid',
|
|
208
|
-
'GoldenRod',
|
|
209
|
-
'PaleVioletRed',
|
|
210
|
-
'Crimson',
|
|
211
|
-
'Gainsboro',
|
|
212
|
-
'Plum',
|
|
213
|
-
'BurlyWood',
|
|
214
|
-
'LightCyan',
|
|
215
|
-
'Lavender',
|
|
216
|
-
'DarkSalmon',
|
|
217
|
-
'Violet',
|
|
218
|
-
'PaleGoldenRod',
|
|
219
|
-
'LightCoral',
|
|
220
|
-
'Khaki',
|
|
221
|
-
'AliceBlue',
|
|
222
|
-
'HoneyDew',
|
|
223
|
-
'Azure',
|
|
224
|
-
'SandyBrown',
|
|
225
|
-
'Wheat',
|
|
226
|
-
'Beige',
|
|
227
|
-
'WhiteSmoke',
|
|
228
|
-
'MintCream',
|
|
229
|
-
'GhostWhite',
|
|
230
|
-
'Salmon',
|
|
231
|
-
'AntiqueWhite',
|
|
232
|
-
'Linen',
|
|
233
|
-
'LightGoldenRodYellow',
|
|
234
|
-
'OldLace',
|
|
235
|
-
'Red',
|
|
236
|
-
'Fuchsia',
|
|
237
|
-
'Magenta',
|
|
238
|
-
'DeepPink',
|
|
239
|
-
'OrangeRed',
|
|
240
|
-
'Tomato',
|
|
241
|
-
'HotPink',
|
|
242
|
-
'Coral',
|
|
243
|
-
'DarkOrange',
|
|
244
|
-
'LightSalmon',
|
|
245
|
-
'Orange',
|
|
246
|
-
'LightPink',
|
|
247
|
-
'Pink',
|
|
248
|
-
'Gold',
|
|
249
|
-
'PeachPuff',
|
|
250
|
-
'NavajoWhite',
|
|
251
|
-
'Moccasin',
|
|
252
|
-
'Bisque',
|
|
253
|
-
'MistyRose',
|
|
254
|
-
'BlanchedAlmond',
|
|
255
|
-
'PapayaWhip',
|
|
256
|
-
'LavenderBlush',
|
|
257
|
-
'SeaShell',
|
|
258
|
-
'Cornsilk',
|
|
259
|
-
'LemonChiffon',
|
|
260
|
-
'FloralWhite',
|
|
261
|
-
'Snow',
|
|
262
|
-
'Yellow',
|
|
263
|
-
'LightYellow',
|
|
264
|
-
'Ivory',
|
|
265
|
-
'White',
|
|
266
|
-
],
|
|
267
|
-
|
|
268
|
+
colors: U.COLORS,
|
|
268
269
|
getParentNode: function () {
|
|
269
270
|
L.FormBuilder.CheckBox.prototype.getParentNode.call(this)
|
|
270
271
|
return this.quickContainer
|
|
@@ -296,10 +297,9 @@ L.FormBuilder.ColorPicker = L.FormBuilder.Input.extend({
|
|
|
296
297
|
},
|
|
297
298
|
|
|
298
299
|
onBlur: function () {
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
300
|
+
const closePicker = () => {
|
|
301
|
+
this.container.style.display = 'none'
|
|
302
|
+
}
|
|
303
303
|
// We must leave time for the click to be listened.
|
|
304
304
|
window.setTimeout(closePicker, 100)
|
|
305
305
|
},
|
|
@@ -341,19 +341,20 @@ L.FormBuilder.TextColorPicker = L.FormBuilder.ColorPicker.extend({
|
|
|
341
341
|
})
|
|
342
342
|
|
|
343
343
|
L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
|
|
344
|
-
getOptions:
|
|
344
|
+
getOptions: () => {
|
|
345
345
|
const layer_classes = [
|
|
346
346
|
U.Layer.Default,
|
|
347
347
|
U.Layer.Cluster,
|
|
348
348
|
U.Layer.Heat,
|
|
349
349
|
U.Layer.Choropleth,
|
|
350
|
+
U.Layer.Categorized,
|
|
350
351
|
]
|
|
351
352
|
return layer_classes.map((class_) => [class_.TYPE, class_.NAME])
|
|
352
353
|
},
|
|
353
354
|
})
|
|
354
355
|
|
|
355
356
|
L.FormBuilder.SlideshowDelay = L.FormBuilder.IntSelect.extend({
|
|
356
|
-
getOptions:
|
|
357
|
+
getOptions: () => {
|
|
357
358
|
const options = []
|
|
358
359
|
for (let i = 1; i < 30; i++) {
|
|
359
360
|
options.push([i * 1000, L._('{delay} seconds', { delay: i })])
|
|
@@ -455,13 +456,12 @@ L.FormBuilder.BlurInput.include({
|
|
|
455
456
|
L.FormBuilder.Input.prototype.build.call(this)
|
|
456
457
|
const button = L.DomUtil.create('span', 'button blur-button')
|
|
457
458
|
L.DomUtil.after(this.input, button)
|
|
459
|
+
L.DomEvent.on(this.input, 'focus', this.fetch, this)
|
|
458
460
|
},
|
|
459
461
|
})
|
|
460
462
|
|
|
461
463
|
L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
462
|
-
type:
|
|
463
|
-
return 'hidden'
|
|
464
|
-
},
|
|
464
|
+
type: () => 'hidden',
|
|
465
465
|
|
|
466
466
|
build: function () {
|
|
467
467
|
L.FormBuilder.BlurInput.prototype.build.call(this)
|
|
@@ -517,18 +517,13 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
517
517
|
this
|
|
518
518
|
)
|
|
519
519
|
}
|
|
520
|
-
const symbol = L.DomUtil.add(
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
'button',
|
|
528
|
-
'flat tab-chars',
|
|
529
|
-
this.tabs,
|
|
530
|
-
L._('Emoji & Character')
|
|
531
|
-
)
|
|
520
|
+
const symbol = L.DomUtil.add('button', 'flat tab-symbols', this.tabs, L._('Symbol'))
|
|
521
|
+
const char = L.DomUtil.add(
|
|
522
|
+
'button',
|
|
523
|
+
'flat tab-chars',
|
|
524
|
+
this.tabs,
|
|
525
|
+
L._('Emoji & Character')
|
|
526
|
+
)
|
|
532
527
|
url = L.DomUtil.add('button', 'flat tab-url', this.tabs, L._('URL'))
|
|
533
528
|
L.DomEvent.on(symbol, 'click', L.DomEvent.stop).on(
|
|
534
529
|
symbol,
|
|
@@ -547,10 +542,10 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
547
542
|
|
|
548
543
|
openTab: function (name) {
|
|
549
544
|
const els = this.tabs.querySelectorAll('button')
|
|
550
|
-
for (
|
|
545
|
+
for (const el of els) {
|
|
551
546
|
L.DomUtil.removeClass(el, 'on')
|
|
552
547
|
}
|
|
553
|
-
|
|
548
|
+
const el = this.tabs.querySelector(`.tab-${name}`)
|
|
554
549
|
L.DomUtil.addClass(el, 'on')
|
|
555
550
|
this.body.innerHTML = ''
|
|
556
551
|
},
|
|
@@ -574,15 +569,15 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
574
569
|
},
|
|
575
570
|
|
|
576
571
|
addIconPreview: function (pictogram, parent) {
|
|
577
|
-
const baseClass = 'umap-pictogram-choice'
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
572
|
+
const baseClass = 'umap-pictogram-choice'
|
|
573
|
+
const value = pictogram.src
|
|
574
|
+
const search = U.Utils.normalize(this.searchInput.value)
|
|
575
|
+
const title = pictogram.attribution
|
|
576
|
+
? `${pictogram.name} — © ${pictogram.attribution}`
|
|
577
|
+
: pictogram.name || pictogram.src
|
|
583
578
|
if (search && U.Utils.normalize(title).indexOf(search) === -1) return
|
|
584
|
-
const className = value === this.value() ? `${baseClass} selected` : baseClass
|
|
585
|
-
|
|
579
|
+
const className = value === this.value() ? `${baseClass} selected` : baseClass
|
|
580
|
+
const container = L.DomUtil.create('div', className, parent)
|
|
586
581
|
U.Icon.makeIconElement(value, container)
|
|
587
582
|
container.title = title
|
|
588
583
|
L.DomEvent.on(
|
|
@@ -612,7 +607,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
612
607
|
if (name) L.DomUtil.add('h6', '', parent, name)
|
|
613
608
|
const grid = L.DomUtil.create('div', 'umap-pictogram-grid', parent)
|
|
614
609
|
let status = false
|
|
615
|
-
for (
|
|
610
|
+
for (const item of items) {
|
|
616
611
|
status = this.addIconPreview(item, grid) || status
|
|
617
612
|
}
|
|
618
613
|
if (status) this.grid.appendChild(parent)
|
|
@@ -630,7 +625,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
630
625
|
const sorted = Object.entries(categories).toSorted(([a], [b]) =>
|
|
631
626
|
U.Utils.naturalSort(a, b, L.lang)
|
|
632
627
|
)
|
|
633
|
-
for (
|
|
628
|
+
for (const [name, items] of sorted) {
|
|
634
629
|
this.addCategory(items, name)
|
|
635
630
|
}
|
|
636
631
|
},
|
|
@@ -701,7 +696,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
701
696
|
return input
|
|
702
697
|
},
|
|
703
698
|
|
|
704
|
-
unselectAll:
|
|
699
|
+
unselectAll: (container) => {
|
|
705
700
|
const els = container.querySelectorAll('div.selected')
|
|
706
701
|
for (const el in els) {
|
|
707
702
|
if (els.hasOwnProperty(el)) L.DomUtil.removeClass(els[el], 'selected')
|
|
@@ -710,9 +705,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
|
|
|
710
705
|
})
|
|
711
706
|
|
|
712
707
|
L.FormBuilder.Url = L.FormBuilder.Input.extend({
|
|
713
|
-
type:
|
|
714
|
-
return 'url'
|
|
715
|
-
},
|
|
708
|
+
type: () => 'url',
|
|
716
709
|
})
|
|
717
710
|
|
|
718
711
|
L.FormBuilder.Switch = L.FormBuilder.CheckBox.extend({
|
|
@@ -748,9 +741,9 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
|
|
|
748
741
|
this.container = L.DomUtil.create('fieldset', 'umap-facet', this.parentNode)
|
|
749
742
|
this.container.appendChild(this.label)
|
|
750
743
|
this.ul = L.DomUtil.create('ul', '', this.container)
|
|
751
|
-
this.type = this.options.criteria
|
|
744
|
+
this.type = this.options.criteria.type
|
|
752
745
|
|
|
753
|
-
const choices = this.options.criteria
|
|
746
|
+
const choices = this.options.criteria.choices
|
|
754
747
|
choices.sort()
|
|
755
748
|
choices.forEach((value) => this.buildLi(value))
|
|
756
749
|
},
|
|
@@ -763,7 +756,7 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
|
|
|
763
756
|
|
|
764
757
|
input.type = this.type
|
|
765
758
|
input.name = `${this.type}_${this.name}`
|
|
766
|
-
input.checked = this.get()
|
|
759
|
+
input.checked = this.get().choices.includes(value)
|
|
767
760
|
input.dataset.value = value
|
|
768
761
|
|
|
769
762
|
L.DomEvent.on(input, 'change', (e) => this.sync())
|
|
@@ -780,17 +773,11 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
|
|
|
780
773
|
})
|
|
781
774
|
|
|
782
775
|
L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
|
|
783
|
-
getInputType:
|
|
784
|
-
return type
|
|
785
|
-
},
|
|
776
|
+
getInputType: (type) => type,
|
|
786
777
|
|
|
787
|
-
getLabels:
|
|
788
|
-
return [L._('Min'), L._('Max')]
|
|
789
|
-
},
|
|
778
|
+
getLabels: () => [L._('Min'), L._('Max')],
|
|
790
779
|
|
|
791
|
-
prepareForHTML:
|
|
792
|
-
return value.valueOf()
|
|
793
|
-
},
|
|
780
|
+
prepareForHTML: (value) => value.valueOf(),
|
|
794
781
|
|
|
795
782
|
build: function () {
|
|
796
783
|
this.container = L.DomUtil.create('fieldset', 'umap-facet', this.parentNode)
|
|
@@ -856,13 +843,13 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
|
|
|
856
843
|
isMinModified: function () {
|
|
857
844
|
const default_ = this.minInput.getAttribute('value')
|
|
858
845
|
const current = this.minInput.value
|
|
859
|
-
return current
|
|
846
|
+
return current !== default_
|
|
860
847
|
},
|
|
861
848
|
|
|
862
849
|
isMaxModified: function () {
|
|
863
850
|
const default_ = this.maxInput.getAttribute('value')
|
|
864
851
|
const current = this.maxInput.value
|
|
865
|
-
return current
|
|
852
|
+
return current !== default_
|
|
866
853
|
},
|
|
867
854
|
|
|
868
855
|
toJS: function () {
|
|
@@ -880,39 +867,29 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
|
|
|
880
867
|
})
|
|
881
868
|
|
|
882
869
|
L.FormBuilder.FacetSearchNumber = L.FormBuilder.MinMaxBase.extend({
|
|
883
|
-
prepareForJS:
|
|
884
|
-
return new Number(value)
|
|
885
|
-
},
|
|
870
|
+
prepareForJS: (value) => new Number(value),
|
|
886
871
|
})
|
|
887
872
|
|
|
888
873
|
L.FormBuilder.FacetSearchDate = L.FormBuilder.MinMaxBase.extend({
|
|
889
|
-
prepareForJS:
|
|
890
|
-
return new Date(value)
|
|
891
|
-
},
|
|
874
|
+
prepareForJS: (value) => new Date(value),
|
|
892
875
|
|
|
893
|
-
toLocaleDateTime:
|
|
894
|
-
return new Date(dt.valueOf() - dt.getTimezoneOffset() * 60000)
|
|
895
|
-
},
|
|
876
|
+
toLocaleDateTime: (dt) => new Date(dt.valueOf() - dt.getTimezoneOffset() * 60000),
|
|
896
877
|
|
|
897
878
|
prepareForHTML: function (value) {
|
|
898
879
|
// Value must be in local time
|
|
899
|
-
if (isNaN(value)) return
|
|
880
|
+
if (Number.isNaN(value)) return
|
|
900
881
|
return this.toLocaleDateTime(value).toISOString().substr(0, 10)
|
|
901
882
|
},
|
|
902
883
|
|
|
903
|
-
getLabels:
|
|
904
|
-
return [L._('From'), L._('Until')]
|
|
905
|
-
},
|
|
884
|
+
getLabels: () => [L._('From'), L._('Until')],
|
|
906
885
|
})
|
|
907
886
|
|
|
908
887
|
L.FormBuilder.FacetSearchDateTime = L.FormBuilder.FacetSearchDate.extend({
|
|
909
|
-
getInputType:
|
|
910
|
-
return 'datetime-local'
|
|
911
|
-
},
|
|
888
|
+
getInputType: (type) => 'datetime-local',
|
|
912
889
|
|
|
913
890
|
prepareForHTML: function (value) {
|
|
914
891
|
// Value must be in local time
|
|
915
|
-
if (isNaN(value)) return
|
|
892
|
+
if (Number.isNaN(value)) return
|
|
916
893
|
return this.toLocaleDateTime(value).toISOString().slice(0, -1)
|
|
917
894
|
},
|
|
918
895
|
})
|
|
@@ -927,8 +904,8 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
|
|
|
927
904
|
},
|
|
928
905
|
|
|
929
906
|
fetch: function () {
|
|
930
|
-
this.
|
|
931
|
-
let value = this.
|
|
907
|
+
this.initial = this.toHTML()
|
|
908
|
+
let value = this.initial
|
|
932
909
|
if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) {
|
|
933
910
|
value = this.options.default !== undefined ? this.options.default : this.default
|
|
934
911
|
}
|
|
@@ -1020,9 +997,7 @@ L.FormBuilder.DataLayersControl = L.FormBuilder.TernaryChoices.extend({
|
|
|
1020
997
|
})
|
|
1021
998
|
|
|
1022
999
|
L.FormBuilder.Range = L.FormBuilder.FloatInput.extend({
|
|
1023
|
-
type:
|
|
1024
|
-
return 'range'
|
|
1025
|
-
},
|
|
1000
|
+
type: () => 'range',
|
|
1026
1001
|
|
|
1027
1002
|
value: function () {
|
|
1028
1003
|
return L.DomUtil.hasClass(this.wrapper, 'undefined')
|
|
@@ -1124,7 +1099,7 @@ U.FormBuilder = L.FormBuilder.extend({
|
|
|
1124
1099
|
},
|
|
1125
1100
|
|
|
1126
1101
|
computeDefaultOptions: function () {
|
|
1127
|
-
for (
|
|
1102
|
+
for (const [key, schema] of Object.entries(U.SCHEMA)) {
|
|
1128
1103
|
if (schema.type === Boolean) {
|
|
1129
1104
|
if (schema.nullable) schema.handler = 'NullableChoices'
|
|
1130
1105
|
else schema.handler = 'Switch'
|
|
@@ -1184,7 +1159,7 @@ U.FormBuilder = L.FormBuilder.extend({
|
|
|
1184
1159
|
}
|
|
1185
1160
|
},
|
|
1186
1161
|
|
|
1187
|
-
finish:
|
|
1188
|
-
|
|
1162
|
+
finish: (event) => {
|
|
1163
|
+
event.helper?.input?.blur()
|
|
1189
1164
|
},
|
|
1190
1165
|
})
|