umap-project 3.0.5__py3-none-any.whl → 3.1.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/forms.py +1 -1
- umap/locale/br/LC_MESSAGES/django.mo +0 -0
- umap/locale/br/LC_MESSAGES/django.po +219 -72
- umap/locale/ca/LC_MESSAGES/django.mo +0 -0
- umap/locale/ca/LC_MESSAGES/django.po +286 -95
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +211 -65
- umap/locale/da/LC_MESSAGES/django.mo +0 -0
- umap/locale/da/LC_MESSAGES/django.po +394 -202
- umap/locale/de/LC_MESSAGES/django.mo +0 -0
- umap/locale/de/LC_MESSAGES/django.po +146 -75
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +125 -59
- umap/locale/en/LC_MESSAGES/django.mo +0 -0
- umap/locale/en/LC_MESSAGES/django.po +124 -58
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +125 -59
- umap/locale/et/LC_MESSAGES/django.mo +0 -0
- umap/locale/et/LC_MESSAGES/django.po +210 -64
- umap/locale/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/eu/LC_MESSAGES/django.po +212 -65
- umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- umap/locale/fa_IR/LC_MESSAGES/django.po +286 -95
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +125 -59
- umap/locale/gl/LC_MESSAGES/django.mo +0 -0
- umap/locale/gl/LC_MESSAGES/django.po +212 -66
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +148 -78
- umap/locale/is/LC_MESSAGES/django.mo +0 -0
- umap/locale/is/LC_MESSAGES/django.po +130 -60
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.po +219 -73
- umap/locale/ms/LC_MESSAGES/django.mo +0 -0
- umap/locale/ms/LC_MESSAGES/django.po +289 -98
- umap/locale/nl/LC_MESSAGES/django.mo +0 -0
- umap/locale/nl/LC_MESSAGES/django.po +128 -61
- umap/locale/pl/LC_MESSAGES/django.mo +0 -0
- umap/locale/pl/LC_MESSAGES/django.po +287 -96
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +211 -65
- umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh_TW/LC_MESSAGES/django.po +212 -66
- umap/management/commands/migrate_to_S3.py +42 -20
- umap/management/commands/purge_old_versions.py +63 -0
- umap/management/commands/switch_user.py +52 -0
- umap/managers.py +29 -2
- umap/middleware.py +1 -1
- umap/migrations/0028_map_is_template.py +21 -0
- umap/models.py +14 -4
- umap/settings/base.py +22 -0
- umap/static/umap/base.css +4 -2
- umap/static/umap/content.css +1 -1
- umap/static/umap/css/dialog.css +5 -2
- umap/static/umap/css/form.css +19 -12
- umap/static/umap/css/icon.css +6 -0
- umap/static/umap/css/importers.css +4 -0
- umap/static/umap/css/panel.css +2 -0
- umap/static/umap/img/16-white.svg +5 -1
- umap/static/umap/img/16.svg +1 -1
- umap/static/umap/img/24-white.svg +3 -2
- umap/static/umap/img/24.svg +3 -4
- umap/static/umap/img/importers/opendata.svg +1 -0
- umap/static/umap/img/source/16-white.svg +8 -4
- umap/static/umap/img/source/16.svg +1 -1
- umap/static/umap/img/source/24-white.svg +5 -4
- umap/static/umap/img/source/24.svg +5 -6
- umap/static/umap/js/components/modal.js +27 -0
- umap/static/umap/js/modules/caption.js +4 -4
- umap/static/umap/js/modules/data/features.js +40 -4
- umap/static/umap/js/modules/data/layer.js +208 -138
- umap/static/umap/js/modules/form/builder.js +6 -14
- umap/static/umap/js/modules/form/fields.js +2 -2
- umap/static/umap/js/modules/help.js +15 -3
- umap/static/umap/js/modules/importer.js +7 -4
- umap/static/umap/js/modules/importers/opendata.js +142 -0
- umap/static/umap/js/modules/permissions.js +3 -3
- umap/static/umap/js/modules/rendering/controls.js +34 -2
- umap/static/umap/js/modules/rendering/icon.js +2 -2
- umap/static/umap/js/modules/rendering/layers/base.js +1 -1
- umap/static/umap/js/modules/rendering/layers/classified.js +55 -49
- umap/static/umap/js/modules/rendering/layers/cluster.js +16 -9
- umap/static/umap/js/modules/rendering/layers/heat.js +13 -11
- umap/static/umap/js/modules/rendering/map.js +5 -0
- umap/static/umap/js/modules/rendering/ui.js +23 -0
- umap/static/umap/js/modules/rules.js +24 -23
- umap/static/umap/js/modules/schema.js +60 -4
- umap/static/umap/js/modules/sync/updaters.js +7 -3
- umap/static/umap/js/modules/tableeditor.js +7 -30
- umap/static/umap/js/modules/templates.js +122 -0
- umap/static/umap/js/modules/ui/bar.js +13 -3
- umap/static/umap/js/modules/ui/panel.js +1 -1
- umap/static/umap/js/modules/umap.js +28 -13
- umap/static/umap/js/umap.controls.js +11 -4
- umap/static/umap/locale/br.js +51 -18
- umap/static/umap/locale/br.json +51 -18
- umap/static/umap/locale/da.js +343 -310
- umap/static/umap/locale/da.json +343 -310
- umap/static/umap/locale/de.js +40 -7
- umap/static/umap/locale/de.json +40 -7
- umap/static/umap/locale/el.js +31 -4
- umap/static/umap/locale/el.json +31 -4
- umap/static/umap/locale/en.js +34 -1
- umap/static/umap/locale/en.json +34 -1
- umap/static/umap/locale/es.js +37 -4
- umap/static/umap/locale/es.json +37 -4
- umap/static/umap/locale/fr.js +34 -1
- umap/static/umap/locale/fr.json +34 -1
- umap/static/umap/locale/hu.js +44 -17
- umap/static/umap/locale/hu.json +44 -17
- umap/static/umap/locale/it.js +74 -41
- umap/static/umap/locale/it.json +74 -41
- umap/static/umap/locale/nl.js +42 -9
- umap/static/umap/locale/nl.json +42 -9
- umap/static/umap/map.css +3 -23
- umap/static/umap/vendors/textpath/leaflet.textpath.js +184 -0
- umap/storage/fs.py +19 -9
- umap/templates/umap/dashboard_menu.html +5 -0
- umap/templates/umap/design_system.html +9 -0
- umap/templates/umap/js.html +3 -0
- umap/templates/umap/map_init.html +3 -1
- umap/templates/umap/map_list.html +2 -2
- umap/templates/umap/map_table.html +18 -18
- umap/templates/umap/user_dashboard.html +9 -58
- umap/templates/umap/user_map_table.html +36 -0
- umap/templates/umap/user_templates.html +19 -0
- umap/templatetags/umap_tags.py +5 -0
- umap/tests/integration/test_basics.py +9 -1
- umap/tests/integration/test_conditional_rules.py +57 -0
- umap/tests/integration/test_datalayer.py +16 -9
- umap/tests/integration/test_edit_marker.py +11 -0
- umap/tests/integration/test_tableeditor.py +42 -7
- umap/tests/integration/test_templates.py +44 -0
- umap/tests/test_dashboard.py +19 -0
- umap/tests/test_purge_old_versions.py +91 -0
- umap/tests/test_switch_user.py +31 -0
- umap/tests/test_views.py +67 -0
- umap/urls.py +7 -1
- umap/views.py +65 -19
- {umap_project-3.0.5.dist-info → umap_project-3.1.0.dist-info}/METADATA +15 -15
- {umap_project-3.0.5.dist-info → umap_project-3.1.0.dist-info}/RECORD +145 -132
- {umap_project-3.0.5.dist-info → umap_project-3.1.0.dist-info}/WHEEL +0 -0
- {umap_project-3.0.5.dist-info → umap_project-3.1.0.dist-info}/entry_points.txt +0 -0
- {umap_project-3.0.5.dist-info → umap_project-3.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -205,7 +205,7 @@ class Feature {
|
|
|
205
205
|
|
|
206
206
|
edit(event) {
|
|
207
207
|
if (!this._umap.editEnabled || this.isReadOnly()) return
|
|
208
|
-
if (this._umap.editedFeature === this) return
|
|
208
|
+
if (this._umap.editedFeature === this && !event.force) return
|
|
209
209
|
const container = DomUtil.create('div', 'umap-feature-container')
|
|
210
210
|
DomUtil.createTitle(
|
|
211
211
|
container,
|
|
@@ -241,7 +241,15 @@ class Feature {
|
|
|
241
241
|
builder = new MutatingForm(this, properties, {
|
|
242
242
|
id: 'umap-feature-properties',
|
|
243
243
|
})
|
|
244
|
-
|
|
244
|
+
const form = builder.build()
|
|
245
|
+
container.appendChild(form)
|
|
246
|
+
const button = Utils.loadTemplate(
|
|
247
|
+
`<button type="button"><i class="icon icon-16 icon-add"></i>${translate('Add a new property')}</button>`
|
|
248
|
+
)
|
|
249
|
+
button.addEventListener('click', () => {
|
|
250
|
+
this.datalayer.addProperty().then(() => this.edit({ force: true }))
|
|
251
|
+
})
|
|
252
|
+
form.appendChild(button)
|
|
245
253
|
this.appendEditFieldsets(container)
|
|
246
254
|
const advancedActions = DomUtil.createFieldset(
|
|
247
255
|
container,
|
|
@@ -272,6 +280,8 @@ class Feature {
|
|
|
272
280
|
container.appendChild(button)
|
|
273
281
|
}
|
|
274
282
|
|
|
283
|
+
addExtraEditFieldset() {}
|
|
284
|
+
|
|
275
285
|
appendEditFieldsets(container) {
|
|
276
286
|
const optionsFields = this.getShapeOptions()
|
|
277
287
|
let builder = new MutatingForm(this, optionsFields, {
|
|
@@ -283,6 +293,8 @@ class Feature {
|
|
|
283
293
|
)
|
|
284
294
|
shapeProperties.appendChild(builder.build())
|
|
285
295
|
|
|
296
|
+
this.addExtraEditFieldset(container)
|
|
297
|
+
|
|
286
298
|
const advancedOptions = this.getAdvancedOptions()
|
|
287
299
|
builder = new MutatingForm(this, advancedOptions, {
|
|
288
300
|
id: 'umap-feature-advanced-properties',
|
|
@@ -336,7 +348,10 @@ class Feature {
|
|
|
336
348
|
}
|
|
337
349
|
|
|
338
350
|
hasPopupFooter() {
|
|
339
|
-
if (
|
|
351
|
+
if (
|
|
352
|
+
this.datalayer.isRemoteLayer() &&
|
|
353
|
+
this.datalayer.properties.remoteData.dynamic
|
|
354
|
+
) {
|
|
340
355
|
return false
|
|
341
356
|
}
|
|
342
357
|
return this._umap.getProperty('displayPopupFooter')
|
|
@@ -414,7 +429,7 @@ class Feature {
|
|
|
414
429
|
} else if (Utils.usableOption(this.properties._umap_options, option)) {
|
|
415
430
|
value = this.properties._umap_options[option]
|
|
416
431
|
} else if (this.datalayer) {
|
|
417
|
-
value = this.datalayer.
|
|
432
|
+
value = this.datalayer.getProperty(option, this)
|
|
418
433
|
} else {
|
|
419
434
|
value = this._umap.getProperty(option)
|
|
420
435
|
}
|
|
@@ -469,12 +484,16 @@ class Feature {
|
|
|
469
484
|
}
|
|
470
485
|
|
|
471
486
|
deleteProperty(property) {
|
|
487
|
+
const oldValue = this.properties[property]
|
|
472
488
|
delete this.properties[property]
|
|
489
|
+
this.sync.update(`properties.${property}`, undefined, oldValue)
|
|
473
490
|
}
|
|
474
491
|
|
|
475
492
|
renameProperty(from, to) {
|
|
493
|
+
const oldValue = this.properties[from]
|
|
476
494
|
this.properties[to] = this.properties[from]
|
|
477
495
|
this.deleteProperty(from)
|
|
496
|
+
this.sync.update(`properties.${to}`, oldValue, undefined)
|
|
478
497
|
}
|
|
479
498
|
|
|
480
499
|
toGeoJSON() {
|
|
@@ -1100,6 +1119,23 @@ export class LineString extends Path {
|
|
|
1100
1119
|
}
|
|
1101
1120
|
return items
|
|
1102
1121
|
}
|
|
1122
|
+
|
|
1123
|
+
addExtraEditFieldset(container) {
|
|
1124
|
+
const options = [
|
|
1125
|
+
'properties._umap_options.textPath',
|
|
1126
|
+
'properties._umap_options.textPathColor',
|
|
1127
|
+
'properties._umap_options.textPathRepeat',
|
|
1128
|
+
'properties._umap_options.textPathRotate',
|
|
1129
|
+
'properties._umap_options.textPathSize',
|
|
1130
|
+
'properties._umap_options.textPathOffset',
|
|
1131
|
+
'properties._umap_options.textPathPosition',
|
|
1132
|
+
]
|
|
1133
|
+
const builder = new MutatingForm(this, options, {
|
|
1134
|
+
id: 'umap-feature-line-decoration',
|
|
1135
|
+
})
|
|
1136
|
+
const fieldset = DomUtil.createFieldset(container, translate('Line decoration'))
|
|
1137
|
+
fieldset.appendChild(builder.build())
|
|
1138
|
+
}
|
|
1103
1139
|
}
|
|
1104
1140
|
|
|
1105
1141
|
export class Polygon extends Path {
|