umap-project 2.4.2__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/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +100 -50
- umap/static/umap/base.css +4 -1
- umap/static/umap/css/contextmenu.css +11 -0
- umap/static/umap/css/dialog.css +24 -3
- umap/static/umap/css/panel.css +4 -2
- 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 +10 -10
- umap/static/umap/js/modules/autocomplete.js +23 -1
- umap/static/umap/js/modules/browser.js +14 -8
- umap/static/umap/js/modules/facets.js +40 -10
- umap/static/umap/js/modules/formatter.js +153 -0
- umap/static/umap/js/modules/global.js +10 -1
- umap/static/umap/js/modules/help.js +25 -25
- umap/static/umap/js/modules/importer.js +4 -4
- 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 +10 -10
- umap/static/umap/js/modules/importers/overpass.js +18 -14
- umap/static/umap/js/modules/rules.js +13 -1
- umap/static/umap/js/modules/schema.js +16 -12
- umap/static/umap/js/{umap.share.js → modules/share.js} +60 -99
- umap/static/umap/js/modules/slideshow.js +141 -0
- 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 +6 -4
- umap/static/umap/js/modules/ui/tooltip.js +5 -75
- umap/static/umap/js/modules/utils.js +20 -0
- umap/static/umap/js/umap.controls.js +1 -1
- umap/static/umap/js/umap.features.js +22 -14
- umap/static/umap/js/umap.forms.js +157 -154
- umap/static/umap/js/umap.js +48 -34
- umap/static/umap/js/umap.layer.js +232 -164
- umap/static/umap/js/umap.permissions.js +1 -1
- umap/static/umap/js/umap.popup.js +1 -1
- umap/static/umap/locale/am_ET.js +22 -5
- umap/static/umap/locale/am_ET.json +19 -5
- umap/static/umap/locale/ar.js +22 -5
- umap/static/umap/locale/ar.json +19 -5
- umap/static/umap/locale/ast.js +22 -5
- umap/static/umap/locale/ast.json +19 -5
- umap/static/umap/locale/bg.js +22 -5
- umap/static/umap/locale/bg.json +19 -5
- umap/static/umap/locale/br.js +22 -5
- umap/static/umap/locale/br.json +19 -5
- umap/static/umap/locale/ca.js +56 -39
- umap/static/umap/locale/ca.json +53 -39
- umap/static/umap/locale/cs_CZ.js +22 -5
- umap/static/umap/locale/cs_CZ.json +19 -5
- umap/static/umap/locale/da.js +22 -5
- umap/static/umap/locale/da.json +19 -5
- umap/static/umap/locale/de.js +22 -5
- umap/static/umap/locale/de.json +19 -5
- umap/static/umap/locale/el.js +27 -10
- umap/static/umap/locale/el.json +19 -5
- umap/static/umap/locale/en.js +22 -6
- umap/static/umap/locale/en.json +19 -5
- umap/static/umap/locale/en_US.json +19 -5
- umap/static/umap/locale/es.js +22 -6
- umap/static/umap/locale/es.json +19 -5
- umap/static/umap/locale/et.js +22 -5
- umap/static/umap/locale/et.json +19 -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 +19 -5
- umap/static/umap/locale/fi.js +22 -5
- umap/static/umap/locale/fi.json +19 -5
- umap/static/umap/locale/fr.js +22 -6
- umap/static/umap/locale/fr.json +19 -5
- umap/static/umap/locale/gl.js +22 -5
- umap/static/umap/locale/gl.json +19 -5
- umap/static/umap/locale/he.js +22 -5
- umap/static/umap/locale/he.json +19 -5
- umap/static/umap/locale/hr.js +22 -5
- umap/static/umap/locale/hr.json +19 -5
- umap/static/umap/locale/hu.js +89 -72
- umap/static/umap/locale/hu.json +89 -75
- umap/static/umap/locale/id.js +22 -5
- umap/static/umap/locale/id.json +19 -5
- umap/static/umap/locale/is.js +22 -5
- umap/static/umap/locale/is.json +19 -5
- umap/static/umap/locale/it.js +22 -5
- umap/static/umap/locale/it.json +19 -5
- umap/static/umap/locale/ja.js +22 -5
- umap/static/umap/locale/ja.json +19 -5
- umap/static/umap/locale/ko.js +22 -5
- umap/static/umap/locale/ko.json +19 -5
- umap/static/umap/locale/lt.js +22 -5
- umap/static/umap/locale/lt.json +19 -5
- umap/static/umap/locale/ms.js +22 -5
- umap/static/umap/locale/ms.json +19 -5
- umap/static/umap/locale/nl.js +22 -5
- umap/static/umap/locale/nl.json +19 -5
- umap/static/umap/locale/no.js +22 -5
- umap/static/umap/locale/no.json +19 -5
- umap/static/umap/locale/pl.js +22 -5
- umap/static/umap/locale/pl.json +19 -5
- umap/static/umap/locale/pl_PL.json +19 -5
- umap/static/umap/locale/pt.js +22 -6
- umap/static/umap/locale/pt.json +21 -7
- umap/static/umap/locale/pt_BR.js +22 -5
- umap/static/umap/locale/pt_BR.json +19 -5
- umap/static/umap/locale/pt_PT.js +22 -5
- umap/static/umap/locale/pt_PT.json +19 -5
- umap/static/umap/locale/ro.js +22 -5
- umap/static/umap/locale/ro.json +19 -5
- umap/static/umap/locale/ru.js +22 -5
- umap/static/umap/locale/ru.json +19 -5
- umap/static/umap/locale/sk_SK.js +22 -5
- umap/static/umap/locale/sk_SK.json +19 -5
- umap/static/umap/locale/sl.js +22 -5
- umap/static/umap/locale/sl.json +19 -5
- umap/static/umap/locale/sr.js +22 -5
- umap/static/umap/locale/sr.json +19 -5
- umap/static/umap/locale/sv.js +22 -5
- umap/static/umap/locale/sv.json +19 -5
- umap/static/umap/locale/th_TH.js +22 -5
- umap/static/umap/locale/th_TH.json +19 -5
- umap/static/umap/locale/tr.js +22 -5
- umap/static/umap/locale/tr.json +19 -5
- umap/static/umap/locale/uk_UA.js +22 -5
- umap/static/umap/locale/uk_UA.json +19 -5
- umap/static/umap/locale/vi.js +22 -5
- umap/static/umap/locale/vi.json +19 -5
- umap/static/umap/locale/vi_VN.json +19 -5
- umap/static/umap/locale/zh.js +22 -5
- umap/static/umap/locale/zh.json +19 -5
- umap/static/umap/locale/zh_CN.json +19 -5
- umap/static/umap/locale/zh_TW.Big5.json +19 -5
- umap/static/umap/locale/zh_TW.js +22 -5
- umap/static/umap/locale/zh_TW.json +19 -5
- umap/static/umap/map.css +2 -145
- umap/static/umap/vars.css +5 -0
- 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 +5 -1
- 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_tableeditor.py +158 -4
- umap/tests/integration/test_websocket_sync.py +2 -2
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/METADATA +8 -8
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/RECORD +172 -162
- umap/static/umap/js/umap.slideshow.js +0 -163
- 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.2.dist-info → umap_project-2.5.0.dist-info}/WHEEL +0 -0
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.4.2.dist-info → umap_project-2.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -9,7 +9,7 @@ export class Panel {
|
|
|
9
9
|
// This will be set once according to the panel configurated at load
|
|
10
10
|
// or by using panels as popups
|
|
11
11
|
this.mode = null
|
|
12
|
-
this.
|
|
12
|
+
this.className = 'left'
|
|
13
13
|
DomEvent.disableClickPropagation(this.container)
|
|
14
14
|
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
|
15
15
|
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
|
@@ -25,9 +25,10 @@ export class Panel {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
open({ content, className, actions = [] } = {}) {
|
|
28
|
-
this.container.className = `with-transition panel window ${this.
|
|
28
|
+
this.container.className = `with-transition panel window ${this.className} ${
|
|
29
29
|
this.mode || ''
|
|
30
30
|
}`
|
|
31
|
+
document.body.classList.add(`panel-${this.className.split(' ')[0]}-on`)
|
|
31
32
|
this.container.innerHTML = ''
|
|
32
33
|
const actionsContainer = DomUtil.create('ul', 'buttons', this.container)
|
|
33
34
|
const body = DomUtil.create('div', 'body', this.container)
|
|
@@ -69,6 +70,7 @@ export class Panel {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
close() {
|
|
73
|
+
document.body.classList.remove(`panel-${this.className.split(' ')[0]}-on`)
|
|
72
74
|
if (DomUtil.hasClass(this.container, 'on')) {
|
|
73
75
|
DomUtil.removeClass(this.container, 'on')
|
|
74
76
|
this.map.invalidateSize({ pan: false })
|
|
@@ -80,14 +82,14 @@ export class Panel {
|
|
|
80
82
|
export class EditPanel extends Panel {
|
|
81
83
|
constructor(map) {
|
|
82
84
|
super(map)
|
|
83
|
-
this.
|
|
85
|
+
this.className = 'right dark'
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export class FullPanel extends Panel {
|
|
88
90
|
constructor(map) {
|
|
89
91
|
super(map)
|
|
90
|
-
this.
|
|
92
|
+
this.className = 'full dark'
|
|
91
93
|
this.mode = 'expanded'
|
|
92
94
|
}
|
|
93
95
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DomEvent, DomUtil } from '../../../vendors/leaflet/leaflet-src.esm.js'
|
|
2
2
|
import { translate } from '../i18n.js'
|
|
3
|
+
import { Positioned } from './base.js'
|
|
3
4
|
|
|
4
|
-
export default class Tooltip {
|
|
5
|
+
export default class Tooltip extends Positioned {
|
|
5
6
|
constructor(parent) {
|
|
7
|
+
super()
|
|
6
8
|
this.parent = parent
|
|
7
9
|
this.container = DomUtil.create('div', 'with-transition', this.parent)
|
|
8
10
|
this.container.id = 'umap-tooltip-container'
|
|
@@ -13,16 +15,8 @@ export default class Tooltip {
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
open(opts) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.anchorTop(opts.anchor)
|
|
19
|
-
} else if (opts.anchor && opts.position === 'left') {
|
|
20
|
-
this.anchorLeft(opts.anchor)
|
|
21
|
-
} else if (opts.anchor && opts.position === 'bottom') {
|
|
22
|
-
this.anchorBottom(opts.anchor)
|
|
23
|
-
} else {
|
|
24
|
-
this.anchorAbsolute()
|
|
25
|
-
}
|
|
18
|
+
const showIt = () => {
|
|
19
|
+
this.openAt(opts)
|
|
26
20
|
L.DomUtil.addClass(this.parent, 'umap-tooltip')
|
|
27
21
|
this.container.innerHTML = U.Utils.escapeHTML(opts.content)
|
|
28
22
|
}
|
|
@@ -39,43 +33,6 @@ export default class Tooltip {
|
|
|
39
33
|
}
|
|
40
34
|
}
|
|
41
35
|
|
|
42
|
-
anchorAbsolute() {
|
|
43
|
-
this.container.className = ''
|
|
44
|
-
const left =
|
|
45
|
-
this.parent.offsetLeft +
|
|
46
|
-
this.parent.clientWidth / 2 -
|
|
47
|
-
this.container.clientWidth / 2
|
|
48
|
-
const top = this.parent.offsetTop + 75
|
|
49
|
-
this.setPosition({ top: top, left: left })
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
anchorTop(el) {
|
|
53
|
-
this.container.className = 'tooltip-top'
|
|
54
|
-
const coords = this.getPosition(el)
|
|
55
|
-
this.setPosition({
|
|
56
|
-
left: coords.left - 10,
|
|
57
|
-
bottom: this.getDocHeight() - coords.top + 11,
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
anchorBottom(el) {
|
|
62
|
-
this.container.className = 'tooltip-bottom'
|
|
63
|
-
const coords = this.getPosition(el)
|
|
64
|
-
this.setPosition({
|
|
65
|
-
left: coords.left,
|
|
66
|
-
top: coords.bottom + 11,
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
anchorLeft(el) {
|
|
71
|
-
this.container.className = 'tooltip-left'
|
|
72
|
-
const coords = this.getPosition(el)
|
|
73
|
-
this.setPosition({
|
|
74
|
-
top: coords.top,
|
|
75
|
-
right: document.documentElement.offsetWidth - coords.left + 11,
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
|
|
79
36
|
close(id) {
|
|
80
37
|
// Clear timetout even if a new tooltip has been added
|
|
81
38
|
// in the meantime. Eg. after a mouseout from the anchor.
|
|
@@ -86,31 +43,4 @@ export default class Tooltip {
|
|
|
86
43
|
this.setPosition({})
|
|
87
44
|
L.DomUtil.removeClass(this.parent, 'umap-tooltip')
|
|
88
45
|
}
|
|
89
|
-
|
|
90
|
-
getPosition(el) {
|
|
91
|
-
return el.getBoundingClientRect()
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
setPosition(coords) {
|
|
95
|
-
if (coords.left) this.container.style.left = `${coords.left}px`
|
|
96
|
-
else this.container.style.left = 'initial'
|
|
97
|
-
if (coords.right) this.container.style.right = `${coords.right}px`
|
|
98
|
-
else this.container.style.right = 'initial'
|
|
99
|
-
if (coords.top) this.container.style.top = `${coords.top}px`
|
|
100
|
-
else this.container.style.top = 'initial'
|
|
101
|
-
if (coords.bottom) this.container.style.bottom = `${coords.bottom}px`
|
|
102
|
-
else this.container.style.bottom = 'initial'
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
getDocHeight() {
|
|
106
|
-
const D = document
|
|
107
|
-
return Math.max(
|
|
108
|
-
D.body.scrollHeight,
|
|
109
|
-
D.documentElement.scrollHeight,
|
|
110
|
-
D.body.offsetHeight,
|
|
111
|
-
D.documentElement.offsetHeight,
|
|
112
|
-
D.body.clientHeight,
|
|
113
|
-
D.documentElement.clientHeight
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
46
|
}
|
|
@@ -377,3 +377,23 @@ export function toggleBadge(element, value) {
|
|
|
377
377
|
if (value) element.dataset.badge = value === true ? ' ' : value
|
|
378
378
|
else delete element.dataset.badge
|
|
379
379
|
}
|
|
380
|
+
|
|
381
|
+
export function loadTemplate(html) {
|
|
382
|
+
const template = document.createElement('template')
|
|
383
|
+
template.innerHTML = html
|
|
384
|
+
.split('\n')
|
|
385
|
+
.map((line) => line.trim())
|
|
386
|
+
.join('')
|
|
387
|
+
return template.content.firstElementChild
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export class WithTemplate {
|
|
391
|
+
loadTemplate(html) {
|
|
392
|
+
this.element = loadTemplate(html)
|
|
393
|
+
this.elements = {}
|
|
394
|
+
for (const element of this.element.querySelectorAll('[data-ref]')) {
|
|
395
|
+
this.elements[element.dataset.ref] = element
|
|
396
|
+
}
|
|
397
|
+
return this.element
|
|
398
|
+
}
|
|
399
|
+
}
|
|
@@ -751,7 +751,7 @@ const ControlsMixin = {
|
|
|
751
751
|
this.options.user.url
|
|
752
752
|
)
|
|
753
753
|
}
|
|
754
|
-
this.help.
|
|
754
|
+
this.help.getStartedLink(rightContainer)
|
|
755
755
|
const controlEditCancel = L.DomUtil.createButton(
|
|
756
756
|
'leaflet-control-edit-cancel',
|
|
757
757
|
rightContainer,
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
U.FeatureMixin = {
|
|
2
2
|
staticOptions: { mainColor: 'color' },
|
|
3
3
|
|
|
4
|
+
getPreviewColor: function () {
|
|
5
|
+
return this.getDynamicOption(this.staticOptions.mainColor)
|
|
6
|
+
},
|
|
7
|
+
|
|
4
8
|
getSyncMetadata: function () {
|
|
5
9
|
return {
|
|
6
10
|
subject: 'feature',
|
|
@@ -194,16 +198,9 @@ U.FeatureMixin = {
|
|
|
194
198
|
},
|
|
195
199
|
|
|
196
200
|
getAdvancedEditActions: function (container) {
|
|
197
|
-
L.DomUtil.createButton(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
L._('Delete'),
|
|
201
|
-
function (e) {
|
|
202
|
-
L.DomEvent.stop(e)
|
|
203
|
-
if (this.confirmDelete()) this.map.editPanel.close()
|
|
204
|
-
},
|
|
205
|
-
this
|
|
206
|
-
)
|
|
201
|
+
L.DomUtil.createButton('button umap-delete', container, L._('Delete'), (e) => {
|
|
202
|
+
this.confirmDelete().then(() => this.map.editPanel.close())
|
|
203
|
+
})
|
|
207
204
|
},
|
|
208
205
|
|
|
209
206
|
appendEditFieldsets: function (container) {
|
|
@@ -272,8 +269,11 @@ U.FeatureMixin = {
|
|
|
272
269
|
this.bindPopup(new Class(this))
|
|
273
270
|
},
|
|
274
271
|
|
|
275
|
-
confirmDelete: function () {
|
|
276
|
-
|
|
272
|
+
confirmDelete: async function () {
|
|
273
|
+
const confirmed = await this.map.dialog.confirm(
|
|
274
|
+
L._('Are you sure you want to delete the feature?')
|
|
275
|
+
)
|
|
276
|
+
if (confirmed) {
|
|
277
277
|
this.del()
|
|
278
278
|
return true
|
|
279
279
|
}
|
|
@@ -759,8 +759,8 @@ U.Marker = L.Marker.extend({
|
|
|
759
759
|
callback: function () {
|
|
760
760
|
if (!this._latlng.isValid()) {
|
|
761
761
|
U.Alert.error(L._('Invalid latitude or longitude'))
|
|
762
|
-
builder.
|
|
763
|
-
builder.
|
|
762
|
+
builder.restoreField('_latlng.lat')
|
|
763
|
+
builder.restoreField('_latlng.lng')
|
|
764
764
|
}
|
|
765
765
|
this.zoomTo({ easing: false })
|
|
766
766
|
},
|
|
@@ -1207,6 +1207,14 @@ U.Polygon = L.Polygon.extend({
|
|
|
1207
1207
|
return options
|
|
1208
1208
|
},
|
|
1209
1209
|
|
|
1210
|
+
getPreviewColor: function () {
|
|
1211
|
+
// If user set a fillColor, use it, otherwise default to color
|
|
1212
|
+
// which is usually the only one set
|
|
1213
|
+
const color = this.getDynamicOption(this.staticOptions.mainColor)
|
|
1214
|
+
if (color && color !== U.SCHEMA.color.default) return color
|
|
1215
|
+
return this.getDynamicOption('color')
|
|
1216
|
+
},
|
|
1217
|
+
|
|
1210
1218
|
getInteractionOptions: () => {
|
|
1211
1219
|
const options = U.FeatureMixin.getInteractionOptions()
|
|
1212
1220
|
options.push('properties._umap_options.interactive')
|
|
@@ -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')
|
|
@@ -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
|
|
@@ -346,6 +347,7 @@ L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
|
|
|
346
347
|
U.Layer.Cluster,
|
|
347
348
|
U.Layer.Heat,
|
|
348
349
|
U.Layer.Choropleth,
|
|
350
|
+
U.Layer.Categorized,
|
|
349
351
|
]
|
|
350
352
|
return layer_classes.map((class_) => [class_.TYPE, class_.NAME])
|
|
351
353
|
},
|
|
@@ -454,6 +456,7 @@ L.FormBuilder.BlurInput.include({
|
|
|
454
456
|
L.FormBuilder.Input.prototype.build.call(this)
|
|
455
457
|
const button = L.DomUtil.create('span', 'button blur-button')
|
|
456
458
|
L.DomUtil.after(this.input, button)
|
|
459
|
+
L.DomEvent.on(this.input, 'focus', this.fetch, this)
|
|
457
460
|
},
|
|
458
461
|
})
|
|
459
462
|
|
|
@@ -901,8 +904,8 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
|
|
|
901
904
|
},
|
|
902
905
|
|
|
903
906
|
fetch: function () {
|
|
904
|
-
this.
|
|
905
|
-
let value = this.
|
|
907
|
+
this.initial = this.toHTML()
|
|
908
|
+
let value = this.initial
|
|
906
909
|
if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) {
|
|
907
910
|
value = this.options.default !== undefined ? this.options.default : this.default
|
|
908
911
|
}
|
|
@@ -1156,7 +1159,7 @@ U.FormBuilder = L.FormBuilder.extend({
|
|
|
1156
1159
|
}
|
|
1157
1160
|
},
|
|
1158
1161
|
|
|
1159
|
-
finish:
|
|
1160
|
-
|
|
1162
|
+
finish: (event) => {
|
|
1163
|
+
event.helper?.input?.blur()
|
|
1161
1164
|
},
|
|
1162
1165
|
})
|