umap-project 2.1.3__py3-none-any.whl → 2.2.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.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/context_processors.py +1 -0
- umap/locale/br/LC_MESSAGES/django.mo +0 -0
- umap/locale/en/LC_MESSAGES/django.po +32 -32
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/ms/LC_MESSAGES/django.mo +0 -0
- umap/migrations/0020_alter_tilelayer_url_template.py +19 -0
- umap/migrations/0021_remove_map_description.py +16 -0
- umap/models.py +8 -6
- umap/settings/base.py +1 -0
- umap/static/umap/base.css +43 -156
- umap/static/umap/content.css +7 -25
- umap/static/umap/css/icon.css +112 -0
- umap/static/umap/css/panel.css +140 -0
- umap/static/umap/img/16-white.svg +5 -1
- umap/static/umap/img/16.svg +7 -4
- umap/static/umap/img/24-white.svg +3 -1
- umap/static/umap/img/24.svg +3 -4
- umap/static/umap/img/source/16-white.svg +176 -940
- umap/static/umap/img/source/16.svg +8 -5
- umap/static/umap/img/source/24-white.svg +5 -3
- umap/static/umap/img/source/24.svg +6 -7
- umap/static/umap/js/modules/browser.js +97 -73
- umap/static/umap/js/modules/dompurify.js +12 -0
- umap/static/umap/js/modules/facets.js +149 -0
- umap/static/umap/js/modules/global.js +9 -1
- umap/static/umap/js/modules/i18n.js +7 -0
- umap/static/umap/js/modules/orderable.js +84 -0
- umap/static/umap/js/modules/panel.js +76 -0
- umap/static/umap/js/modules/request.js +0 -1
- umap/static/umap/js/modules/schema.js +324 -223
- umap/static/umap/js/modules/urls.js +1 -16
- umap/static/umap/js/modules/utils.js +340 -0
- umap/static/umap/js/umap.autocomplete.js +40 -25
- umap/static/umap/js/umap.controls.js +227 -369
- umap/static/umap/js/umap.core.js +77 -366
- umap/static/umap/js/umap.datalayer.permissions.js +1 -1
- umap/static/umap/js/umap.features.js +62 -42
- umap/static/umap/js/umap.forms.js +128 -36
- umap/static/umap/js/umap.icon.js +11 -4
- umap/static/umap/js/umap.importer.js +78 -57
- umap/static/umap/js/umap.js +179 -156
- umap/static/umap/js/umap.layer.js +79 -40
- umap/static/umap/js/umap.permissions.js +13 -9
- umap/static/umap/js/umap.popup.js +26 -30
- umap/static/umap/js/umap.share.js +12 -9
- umap/static/umap/js/umap.tableeditor.js +4 -6
- umap/static/umap/js/umap.ui.js +10 -60
- umap/static/umap/locale/am_ET.js +243 -227
- umap/static/umap/locale/am_ET.json +21 -9
- umap/static/umap/locale/ar.js +243 -227
- umap/static/umap/locale/ar.json +21 -9
- umap/static/umap/locale/ast.js +243 -227
- umap/static/umap/locale/ast.json +21 -9
- umap/static/umap/locale/bg.js +243 -227
- umap/static/umap/locale/bg.json +21 -9
- umap/static/umap/locale/br.js +253 -237
- umap/static/umap/locale/br.json +25 -13
- umap/static/umap/locale/ca.js +243 -227
- umap/static/umap/locale/ca.json +21 -9
- umap/static/umap/locale/cs_CZ.js +243 -227
- umap/static/umap/locale/cs_CZ.json +21 -9
- umap/static/umap/locale/da.js +243 -227
- umap/static/umap/locale/da.json +21 -9
- umap/static/umap/locale/de.js +243 -227
- umap/static/umap/locale/de.json +21 -9
- umap/static/umap/locale/el.js +243 -227
- umap/static/umap/locale/el.json +21 -9
- umap/static/umap/locale/en.js +243 -234
- umap/static/umap/locale/en.json +22 -10
- umap/static/umap/locale/en_US.json +21 -9
- umap/static/umap/locale/es.js +243 -227
- umap/static/umap/locale/es.json +21 -9
- umap/static/umap/locale/et.js +243 -227
- umap/static/umap/locale/et.json +21 -9
- umap/static/umap/locale/eu.js +227 -199
- umap/static/umap/locale/eu.json +1 -1
- umap/static/umap/locale/fa_IR.js +243 -227
- umap/static/umap/locale/fa_IR.json +21 -9
- umap/static/umap/locale/fi.js +243 -227
- umap/static/umap/locale/fi.json +21 -9
- umap/static/umap/locale/fr.js +243 -234
- umap/static/umap/locale/fr.json +21 -9
- umap/static/umap/locale/gl.js +243 -227
- umap/static/umap/locale/gl.json +21 -9
- umap/static/umap/locale/he.js +243 -227
- umap/static/umap/locale/he.json +21 -9
- umap/static/umap/locale/hr.js +243 -227
- umap/static/umap/locale/hr.json +21 -9
- umap/static/umap/locale/hu.js +243 -234
- umap/static/umap/locale/hu.json +21 -9
- umap/static/umap/locale/id.js +243 -227
- umap/static/umap/locale/id.json +21 -9
- umap/static/umap/locale/is.js +243 -227
- umap/static/umap/locale/is.json +21 -9
- umap/static/umap/locale/it.js +243 -234
- umap/static/umap/locale/it.json +21 -9
- umap/static/umap/locale/ja.js +243 -227
- umap/static/umap/locale/ja.json +21 -9
- umap/static/umap/locale/ko.js +243 -227
- umap/static/umap/locale/ko.json +21 -9
- umap/static/umap/locale/lt.js +243 -227
- umap/static/umap/locale/lt.json +21 -9
- umap/static/umap/locale/ms.js +243 -234
- umap/static/umap/locale/ms.json +22 -10
- umap/static/umap/locale/nl.js +246 -230
- umap/static/umap/locale/nl.json +21 -9
- umap/static/umap/locale/no.js +243 -227
- umap/static/umap/locale/no.json +21 -9
- umap/static/umap/locale/pl.js +243 -227
- umap/static/umap/locale/pl.json +21 -9
- umap/static/umap/locale/pl_PL.json +21 -9
- umap/static/umap/locale/pt.js +243 -227
- umap/static/umap/locale/pt.json +21 -9
- umap/static/umap/locale/pt_BR.js +243 -227
- umap/static/umap/locale/pt_BR.json +21 -9
- umap/static/umap/locale/pt_PT.js +243 -227
- umap/static/umap/locale/pt_PT.json +21 -9
- umap/static/umap/locale/ro.js +243 -227
- umap/static/umap/locale/ro.json +21 -9
- umap/static/umap/locale/ru.js +243 -227
- umap/static/umap/locale/ru.json +21 -9
- umap/static/umap/locale/si.js +1 -1
- umap/static/umap/locale/si.json +1 -1
- umap/static/umap/locale/sk_SK.js +243 -227
- umap/static/umap/locale/sk_SK.json +21 -9
- umap/static/umap/locale/sl.js +243 -227
- umap/static/umap/locale/sl.json +21 -9
- umap/static/umap/locale/sr.js +243 -227
- umap/static/umap/locale/sr.json +21 -9
- umap/static/umap/locale/sv.js +243 -227
- umap/static/umap/locale/sv.json +21 -9
- umap/static/umap/locale/th_TH.js +243 -227
- umap/static/umap/locale/th_TH.json +21 -9
- umap/static/umap/locale/tr.js +243 -227
- umap/static/umap/locale/tr.json +21 -9
- umap/static/umap/locale/uk_UA.js +243 -227
- umap/static/umap/locale/uk_UA.json +21 -9
- umap/static/umap/locale/vi.js +243 -227
- umap/static/umap/locale/vi.json +21 -9
- umap/static/umap/locale/vi_VN.json +21 -9
- umap/static/umap/locale/zh.js +243 -227
- umap/static/umap/locale/zh.json +21 -9
- umap/static/umap/locale/zh_CN.json +21 -9
- umap/static/umap/locale/zh_TW.Big5.json +21 -9
- umap/static/umap/locale/zh_TW.js +243 -234
- umap/static/umap/locale/zh_TW.json +21 -9
- umap/static/umap/map.css +124 -264
- umap/static/umap/test/DataLayer.js +463 -0
- umap/static/umap/test/Feature.js +0 -226
- umap/static/umap/test/TableEditor.js +104 -0
- umap/static/umap/test/Util.js +0 -521
- umap/static/umap/test/index.html +0 -1
- umap/static/umap/unittests/URLs.js +1 -1
- umap/static/umap/unittests/utils.js +610 -0
- umap/static/umap/vars.css +9 -0
- umap/static/umap/vendors/dompurify/purify.es.mjs +1525 -0
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +1 -0
- umap/static/umap/vendors/iconlayers/iconLayers.js +1 -1
- umap/templates/umap/css.html +2 -0
- umap/templates/umap/js.html +0 -1
- umap/templates/umap/map_detail.html +4 -0
- umap/templates/umap/map_table.html +12 -10
- umap/templatetags/umap_tags.py +5 -0
- umap/tests/integration/conftest.py +12 -1
- umap/tests/integration/test_anonymous_owned_map.py +27 -5
- umap/tests/integration/test_basics.py +21 -0
- umap/tests/integration/test_browser.py +12 -25
- umap/tests/integration/test_choropleth.py +1 -1
- umap/tests/integration/test_dashboard.py +10 -0
- umap/tests/integration/test_datalayer.py +8 -6
- umap/tests/integration/test_edit_datalayer.py +24 -19
- umap/tests/integration/test_edit_map.py +189 -2
- umap/tests/integration/test_edit_marker.py +120 -0
- umap/tests/integration/test_edit_polygon.py +122 -0
- umap/tests/integration/test_facets_browser.py +104 -14
- umap/tests/integration/test_import.py +72 -20
- umap/tests/integration/test_map.py +19 -17
- umap/tests/integration/test_map_list.py +28 -0
- umap/tests/integration/test_owned_map.py +10 -10
- umap/tests/integration/test_picto.py +5 -5
- umap/tests/integration/test_querystring.py +9 -15
- umap/tests/integration/test_slideshow.py +0 -5
- umap/tests/integration/test_statics.py +3 -2
- umap/tests/integration/test_tableeditor.py +1 -5
- umap/tests/integration/test_tilelayer.py +10 -0
- umap/tests/integration/test_view_marker.py +64 -0
- umap/tests/integration/test_view_polygon.py +59 -0
- umap/tests/integration/test_view_polyline.py +51 -0
- umap/tests/test_map_views.py +13 -0
- {umap_project-2.1.3.dist-info → umap_project-2.2.0.dist-info}/METADATA +12 -12
- {umap_project-2.1.3.dist-info → umap_project-2.2.0.dist-info}/RECORD +198 -182
- {umap_project-2.1.3.dist-info → umap_project-2.2.0.dist-info}/WHEEL +1 -1
- umap/static/umap/vendors/dompurify/purify.min.js +0 -3
- umap/static/umap/vendors/dompurify/purify.min.js.map +0 -1
- /umap/tests/integration/{test_polygon.py → test_draw_polygon.py} +0 -0
- /umap/tests/integration/{test_polyline.py → test_draw_polyline.py} +0 -0
- {umap_project-2.1.3.dist-info → umap_project-2.2.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.1.3.dist-info → umap_project-2.2.0.dist-info}/licenses/LICENSE +0 -0
umap/static/umap/js/umap.ui.js
CHANGED
|
@@ -13,63 +13,12 @@ U.UI = L.Evented.extend({
|
|
|
13
13
|
L.DomEvent.on(this.container, 'contextmenu', L.DomEvent.stopPropagation) // Do not activate our custom context menu.
|
|
14
14
|
L.DomEvent.on(this.container, 'wheel', L.DomEvent.stopPropagation)
|
|
15
15
|
L.DomEvent.on(this.container, 'MozMousePixelScroll', L.DomEvent.stopPropagation)
|
|
16
|
-
this._panel = L.DomUtil.create('div', '', this.container)
|
|
17
|
-
this._panel.id = 'umap-ui-container'
|
|
18
16
|
this._alert = L.DomUtil.create('div', 'with-transition', this.container)
|
|
19
17
|
this._alert.id = 'umap-alert-container'
|
|
20
18
|
this._tooltip = L.DomUtil.create('div', '', this.container)
|
|
21
19
|
this._tooltip.id = 'umap-tooltip-container'
|
|
22
20
|
},
|
|
23
21
|
|
|
24
|
-
resetPanelClassName: function () {
|
|
25
|
-
this._panel.className = 'with-transition'
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
openPanel: function (e) {
|
|
29
|
-
this.fire('panel:open')
|
|
30
|
-
// We reset all because we can't know which class has been added
|
|
31
|
-
// by previous ui processes...
|
|
32
|
-
this.resetPanelClassName()
|
|
33
|
-
this._panel.innerHTML = ''
|
|
34
|
-
const actionsContainer = L.DomUtil.create('ul', 'toolbox', this._panel)
|
|
35
|
-
const body = L.DomUtil.create('div', 'body', this._panel)
|
|
36
|
-
if (e.data.html.nodeType && e.data.html.nodeType === 1)
|
|
37
|
-
body.appendChild(e.data.html)
|
|
38
|
-
else body.innerHTML = e.data.html
|
|
39
|
-
const closeLink = L.DomUtil.create('li', 'umap-close-link', actionsContainer)
|
|
40
|
-
L.DomUtil.add('i', 'umap-close-icon', closeLink)
|
|
41
|
-
const label = L.DomUtil.create('span', '', closeLink)
|
|
42
|
-
label.title = label.textContent = L._('Close')
|
|
43
|
-
if (e.actions) {
|
|
44
|
-
for (let i = 0; i < e.actions.length; i++) {
|
|
45
|
-
actionsContainer.appendChild(e.actions[i])
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (e.className) L.DomUtil.addClass(this._panel, e.className)
|
|
49
|
-
if (L.DomUtil.hasClass(this.parent, 'umap-ui')) {
|
|
50
|
-
// Already open.
|
|
51
|
-
this.fire('panel:ready')
|
|
52
|
-
} else {
|
|
53
|
-
L.DomEvent.once(
|
|
54
|
-
this._panel,
|
|
55
|
-
'transitionend',
|
|
56
|
-
function (e) {
|
|
57
|
-
this.fire('panel:ready')
|
|
58
|
-
},
|
|
59
|
-
this
|
|
60
|
-
)
|
|
61
|
-
L.DomUtil.addClass(this.parent, 'umap-ui')
|
|
62
|
-
}
|
|
63
|
-
L.DomEvent.on(closeLink, 'click', this.closePanel, this)
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
closePanel: function () {
|
|
67
|
-
if (L.DomUtil.hasClass(this.parent, 'umap-ui')) {
|
|
68
|
-
L.DomUtil.removeClass(this.parent, 'umap-ui')
|
|
69
|
-
this.fire('panel:closed')
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
22
|
alert: function (e) {
|
|
74
23
|
if (L.DomUtil.hasClass(this.parent, 'umap-alert')) this.ALERTS.push(e)
|
|
75
24
|
else this.popAlert(e)
|
|
@@ -102,21 +51,22 @@ U.UI = L.Evented.extend({
|
|
|
102
51
|
close,
|
|
103
52
|
this
|
|
104
53
|
)
|
|
105
|
-
L.DomUtil.
|
|
54
|
+
L.DomUtil.create('i', 'umap-close-icon', closeButton)
|
|
106
55
|
const label = L.DomUtil.create('span', '', closeButton)
|
|
107
56
|
label.title = label.textContent = L._('Close')
|
|
108
|
-
L.DomUtil.
|
|
57
|
+
L.DomUtil.element({ tagName: 'div', innerHTML: e.content, parent: this._alert })
|
|
109
58
|
if (e.actions) {
|
|
110
59
|
let action, el, input
|
|
111
|
-
const form = L.DomUtil.
|
|
60
|
+
const form = L.DomUtil.create('div', 'umap-alert-actions', this._alert)
|
|
112
61
|
for (let i = 0; i < e.actions.length; i++) {
|
|
113
62
|
action = e.actions[i]
|
|
114
63
|
if (action.input) {
|
|
115
|
-
input = L.DomUtil.element(
|
|
116
|
-
'input',
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
64
|
+
input = L.DomUtil.element({
|
|
65
|
+
tagName: 'input',
|
|
66
|
+
parent: form,
|
|
67
|
+
className: 'umap-alert-input',
|
|
68
|
+
placeholder: action.input,
|
|
69
|
+
})
|
|
120
70
|
}
|
|
121
71
|
el = L.DomUtil.createButton(
|
|
122
72
|
'umap-action',
|
|
@@ -148,7 +98,7 @@ U.UI = L.Evented.extend({
|
|
|
148
98
|
this.anchorTooltipAbsolute()
|
|
149
99
|
}
|
|
150
100
|
L.DomUtil.addClass(this.parent, 'umap-tooltip')
|
|
151
|
-
this._tooltip.innerHTML = opts.content
|
|
101
|
+
this._tooltip.innerHTML = U.Utils.escapeHTML(opts.content)
|
|
152
102
|
}
|
|
153
103
|
this.TOOLTIP_ID = window.setTimeout(L.bind(showIt, this), opts.delay || 0)
|
|
154
104
|
const id = this.TOOLTIP_ID
|