umap-project 2.3.0__py3-none-any.whl → 2.4.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/locale/en/LC_MESSAGES/django.po +81 -31
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +117 -66
- umap/locale/pl/LC_MESSAGES/django.mo +0 -0
- umap/locale/pl/LC_MESSAGES/django.po +83 -78
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +129 -123
- umap/management/commands/run_websocket_server.py +23 -0
- umap/models.py +6 -1
- umap/settings/base.py +11 -3
- umap/static/umap/base.css +68 -186
- umap/static/umap/content.css +3 -2
- umap/static/umap/css/dialog.css +18 -0
- umap/static/umap/css/icon.css +8 -0
- umap/static/umap/css/importers.css +51 -0
- umap/static/umap/css/panel.css +18 -57
- umap/static/umap/css/tooltip.css +59 -0
- umap/static/umap/css/window.css +35 -0
- umap/static/umap/img/16-white.svg +1 -3
- umap/static/umap/img/alert-icon-error.svg +8 -0
- umap/static/umap/img/alert-icon-info.svg +4 -0
- umap/static/umap/img/alert-icon-success.svg +3 -0
- umap/static/umap/img/icon-external-link.svg +3 -0
- umap/static/umap/img/importers/communesfr.svg +5 -0
- umap/static/umap/img/importers/datasets.svg +13 -0
- umap/static/umap/img/importers/geodatamine.svg +10 -0
- umap/static/umap/img/importers/overpass.svg +7 -0
- umap/static/umap/img/importers/random.svg +18 -0
- umap/static/umap/img/importers/random1.svg +4 -0
- umap/static/umap/img/importers/random2.svg +4 -0
- umap/static/umap/img/source/16-white.svg +2 -4
- umap/static/umap/js/components/alerts/alert.css +160 -0
- umap/static/umap/js/components/alerts/alert.js +169 -0
- umap/static/umap/js/components/base.js +54 -0
- umap/static/umap/js/modules/autocomplete.js +347 -0
- umap/static/umap/js/modules/browser.js +14 -21
- umap/static/umap/js/modules/caption.js +119 -0
- umap/static/umap/js/modules/global.js +37 -11
- umap/static/umap/js/modules/help.js +255 -0
- umap/static/umap/js/modules/importer.js +308 -0
- umap/static/umap/js/modules/importers/communesfr.js +44 -0
- umap/static/umap/js/modules/importers/datasets.js +42 -0
- umap/static/umap/js/modules/importers/geodatamine.js +95 -0
- umap/static/umap/js/modules/importers/overpass.js +84 -0
- umap/static/umap/js/modules/request.js +12 -14
- umap/static/umap/js/modules/rules.js +241 -0
- umap/static/umap/js/modules/schema.js +63 -14
- umap/static/umap/js/modules/sync/engine.js +93 -0
- umap/static/umap/js/modules/sync/updaters.js +109 -0
- umap/static/umap/js/modules/sync/websocket.js +25 -0
- umap/static/umap/js/modules/ui/dialog.js +52 -0
- umap/static/umap/js/modules/{panel.js → ui/panel.js} +37 -20
- umap/static/umap/js/modules/ui/tooltip.js +116 -0
- umap/static/umap/js/modules/utils.js +25 -18
- umap/static/umap/js/umap.controls.js +37 -112
- umap/static/umap/js/umap.core.js +1 -327
- umap/static/umap/js/umap.features.js +77 -29
- umap/static/umap/js/umap.forms.js +17 -19
- umap/static/umap/js/umap.js +265 -228
- umap/static/umap/js/umap.layer.js +154 -76
- umap/static/umap/js/umap.permissions.js +5 -9
- umap/static/umap/js/umap.popup.js +2 -1
- umap/static/umap/js/umap.tableeditor.js +8 -8
- umap/static/umap/locale/am_ET.js +51 -16
- umap/static/umap/locale/am_ET.json +51 -16
- umap/static/umap/locale/ar.js +51 -16
- umap/static/umap/locale/ar.json +51 -16
- umap/static/umap/locale/ast.js +51 -16
- umap/static/umap/locale/ast.json +51 -16
- umap/static/umap/locale/bg.js +51 -16
- umap/static/umap/locale/bg.json +51 -16
- umap/static/umap/locale/br.js +55 -20
- umap/static/umap/locale/br.json +55 -20
- umap/static/umap/locale/ca.js +51 -16
- umap/static/umap/locale/ca.json +51 -16
- umap/static/umap/locale/cs_CZ.js +93 -58
- umap/static/umap/locale/cs_CZ.json +93 -58
- umap/static/umap/locale/da.js +51 -16
- umap/static/umap/locale/da.json +51 -16
- umap/static/umap/locale/de.js +56 -21
- umap/static/umap/locale/de.json +56 -21
- umap/static/umap/locale/el.js +51 -16
- umap/static/umap/locale/el.json +51 -16
- umap/static/umap/locale/en.js +52 -16
- umap/static/umap/locale/en.json +52 -16
- umap/static/umap/locale/en_US.json +51 -16
- umap/static/umap/locale/es.js +51 -16
- umap/static/umap/locale/es.json +51 -16
- umap/static/umap/locale/et.js +51 -16
- umap/static/umap/locale/et.json +51 -16
- umap/static/umap/locale/eu.js +51 -16
- umap/static/umap/locale/eu.json +51 -16
- umap/static/umap/locale/fa_IR.js +51 -16
- umap/static/umap/locale/fa_IR.json +51 -16
- umap/static/umap/locale/fi.js +51 -16
- umap/static/umap/locale/fi.json +51 -16
- umap/static/umap/locale/fr.js +61 -25
- umap/static/umap/locale/fr.json +61 -25
- umap/static/umap/locale/gl.js +51 -16
- umap/static/umap/locale/gl.json +51 -16
- umap/static/umap/locale/he.js +51 -16
- umap/static/umap/locale/he.json +51 -16
- umap/static/umap/locale/hr.js +51 -16
- umap/static/umap/locale/hr.json +51 -16
- umap/static/umap/locale/hu.js +51 -16
- umap/static/umap/locale/hu.json +51 -16
- umap/static/umap/locale/id.js +51 -16
- umap/static/umap/locale/id.json +51 -16
- umap/static/umap/locale/is.js +51 -16
- umap/static/umap/locale/is.json +51 -16
- umap/static/umap/locale/it.js +51 -16
- umap/static/umap/locale/it.json +51 -16
- umap/static/umap/locale/ja.js +51 -16
- umap/static/umap/locale/ja.json +51 -16
- umap/static/umap/locale/ko.js +51 -16
- umap/static/umap/locale/ko.json +51 -16
- umap/static/umap/locale/lt.js +51 -16
- umap/static/umap/locale/lt.json +51 -16
- umap/static/umap/locale/ms.js +51 -16
- umap/static/umap/locale/ms.json +51 -16
- umap/static/umap/locale/nl.js +51 -16
- umap/static/umap/locale/nl.json +51 -16
- umap/static/umap/locale/no.js +51 -16
- umap/static/umap/locale/no.json +51 -16
- umap/static/umap/locale/pl.js +93 -58
- umap/static/umap/locale/pl.json +93 -58
- umap/static/umap/locale/pl_PL.json +51 -16
- umap/static/umap/locale/pt.js +215 -180
- umap/static/umap/locale/pt.json +215 -180
- umap/static/umap/locale/pt_BR.js +51 -16
- umap/static/umap/locale/pt_BR.json +51 -16
- umap/static/umap/locale/pt_PT.js +51 -16
- umap/static/umap/locale/pt_PT.json +51 -16
- umap/static/umap/locale/ro.js +51 -16
- umap/static/umap/locale/ro.json +51 -16
- umap/static/umap/locale/ru.js +51 -16
- umap/static/umap/locale/ru.json +51 -16
- umap/static/umap/locale/si.js +51 -16
- umap/static/umap/locale/si.json +51 -16
- umap/static/umap/locale/sk_SK.js +51 -16
- umap/static/umap/locale/sk_SK.json +51 -16
- umap/static/umap/locale/sl.js +51 -16
- umap/static/umap/locale/sl.json +51 -16
- umap/static/umap/locale/sr.js +51 -16
- umap/static/umap/locale/sr.json +51 -16
- umap/static/umap/locale/sv.js +51 -16
- umap/static/umap/locale/sv.json +51 -16
- umap/static/umap/locale/th_TH.js +51 -16
- umap/static/umap/locale/th_TH.json +51 -16
- umap/static/umap/locale/tr.js +51 -16
- umap/static/umap/locale/tr.json +51 -16
- umap/static/umap/locale/uk_UA.js +51 -16
- umap/static/umap/locale/uk_UA.json +51 -16
- umap/static/umap/locale/vi.js +51 -16
- umap/static/umap/locale/vi.json +51 -16
- umap/static/umap/locale/vi_VN.json +51 -16
- umap/static/umap/locale/zh.js +51 -16
- umap/static/umap/locale/zh.json +51 -16
- umap/static/umap/locale/zh_CN.json +51 -16
- umap/static/umap/locale/zh_TW.Big5.json +51 -16
- umap/static/umap/locale/zh_TW.js +51 -16
- umap/static/umap/locale/zh_TW.json +51 -16
- umap/static/umap/map.css +40 -53
- umap/static/umap/unittests/sync.js +105 -0
- umap/static/umap/unittests/utils.js +78 -36
- umap/static/umap/vars.css +19 -1
- umap/static/umap/vendors/dompurify/purify.es.js +50 -15
- umap/static/umap/vendors/dompurify/purify.es.mjs.map +1 -1
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +2 -2
- umap/templates/umap/components/alerts/alert.html +89 -0
- umap/templates/umap/content.html +4 -3
- umap/templates/umap/css.html +4 -0
- umap/templates/umap/home.html +3 -0
- umap/templates/umap/js.html +0 -3
- umap/templates/umap/map_init.html +2 -8
- umap/templates/umap/messages.html +9 -11
- umap/templates/umap/search.html +3 -0
- umap/tests/base.py +3 -0
- umap/tests/integration/conftest.py +30 -0
- umap/tests/integration/test_anonymous_owned_map.py +8 -13
- umap/tests/integration/test_browser.py +81 -6
- umap/tests/integration/test_caption.py +27 -0
- umap/tests/integration/test_conditional_rules.py +201 -0
- umap/tests/integration/test_dashboard.py +1 -1
- umap/tests/integration/test_datalayer.py +2 -3
- umap/tests/integration/test_edit_datalayer.py +32 -3
- umap/tests/integration/test_edit_map.py +1 -1
- umap/tests/integration/test_facets_browser.py +7 -4
- umap/tests/integration/test_import.py +185 -49
- umap/tests/integration/test_map.py +31 -17
- umap/tests/integration/{test_collaborative_editing.py → test_optimistic_merge.py} +7 -7
- umap/tests/integration/test_owned_map.py +1 -1
- umap/tests/integration/test_picto.py +2 -2
- umap/tests/integration/test_statics.py +1 -1
- umap/tests/integration/test_view_marker.py +19 -2
- umap/tests/integration/test_websocket_sync.py +283 -0
- umap/tests/settings.py +5 -0
- umap/tests/test_datalayer_views.py +0 -1
- umap/tests/test_views.py +53 -0
- umap/urls.py +5 -0
- umap/views.py +40 -11
- umap/websocket_server.py +92 -0
- {umap_project-2.3.0.dist-info → umap_project-2.4.0.dist-info}/METADATA +13 -11
- {umap_project-2.3.0.dist-info → umap_project-2.4.0.dist-info}/RECORD +208 -172
- umap/static/umap/js/umap.autocomplete.js +0 -341
- umap/static/umap/js/umap.importer.js +0 -187
- umap/static/umap/js/umap.ui.js +0 -190
- {umap_project-2.3.0.dist-info → umap_project-2.4.0.dist-info}/WHEEL +0 -0
- {umap_project-2.3.0.dist-info → umap_project-2.4.0.dist-info}/entry_points.txt +0 -0
- {umap_project-2.3.0.dist-info → umap_project-2.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @license DOMPurify 3.1.
|
|
1
|
+
/*! @license DOMPurify 3.1.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.3/LICENSE */
|
|
2
2
|
|
|
3
3
|
const {
|
|
4
4
|
entries,
|
|
@@ -48,6 +48,7 @@ const stringTrim = unapply(String.prototype.trim);
|
|
|
48
48
|
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
49
49
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
50
50
|
const typeErrorCreate = unconstruct(TypeError);
|
|
51
|
+
const numberIsNaN = unapply(Number.isNaN);
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
@@ -231,6 +232,24 @@ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
|
|
231
232
|
CUSTOM_ELEMENT: CUSTOM_ELEMENT
|
|
232
233
|
});
|
|
233
234
|
|
|
235
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
236
|
+
const NODE_TYPE = {
|
|
237
|
+
element: 1,
|
|
238
|
+
attribute: 2,
|
|
239
|
+
text: 3,
|
|
240
|
+
cdataSection: 4,
|
|
241
|
+
entityReference: 5,
|
|
242
|
+
// Deprecated
|
|
243
|
+
entityNode: 6,
|
|
244
|
+
// Deprecated
|
|
245
|
+
progressingInstruction: 7,
|
|
246
|
+
comment: 8,
|
|
247
|
+
document: 9,
|
|
248
|
+
documentType: 10,
|
|
249
|
+
documentFragment: 11,
|
|
250
|
+
notation: 12 // Deprecated
|
|
251
|
+
};
|
|
252
|
+
|
|
234
253
|
const getGlobal = function getGlobal() {
|
|
235
254
|
return typeof window === 'undefined' ? null : window;
|
|
236
255
|
};
|
|
@@ -282,14 +301,14 @@ function createDOMPurify() {
|
|
|
282
301
|
* Version label, exposed for easier checks
|
|
283
302
|
* if DOMPurify is up to date or not
|
|
284
303
|
*/
|
|
285
|
-
DOMPurify.version = '3.1.
|
|
304
|
+
DOMPurify.version = '3.1.3';
|
|
286
305
|
|
|
287
306
|
/**
|
|
288
307
|
* Array of elements that DOMPurify removed during sanitation.
|
|
289
308
|
* Empty if nothing was removed.
|
|
290
309
|
*/
|
|
291
310
|
DOMPurify.removed = [];
|
|
292
|
-
if (!window || !window.document || window.document.nodeType !==
|
|
311
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {
|
|
293
312
|
// Not running in a browser, provide a factory function
|
|
294
313
|
// so that you can pass your own Window
|
|
295
314
|
DOMPurify.isSupported = false;
|
|
@@ -1000,13 +1019,13 @@ function createDOMPurify() {
|
|
|
1000
1019
|
}
|
|
1001
1020
|
|
|
1002
1021
|
/* Remove any ocurrence of processing instructions */
|
|
1003
|
-
if (currentNode.nodeType ===
|
|
1022
|
+
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
1004
1023
|
_forceRemove(currentNode);
|
|
1005
1024
|
return true;
|
|
1006
1025
|
}
|
|
1007
1026
|
|
|
1008
1027
|
/* Remove any kind of possibly harmful comments */
|
|
1009
|
-
if (SAFE_FOR_XML && currentNode.nodeType ===
|
|
1028
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
1010
1029
|
_forceRemove(currentNode);
|
|
1011
1030
|
return true;
|
|
1012
1031
|
}
|
|
@@ -1053,7 +1072,7 @@ function createDOMPurify() {
|
|
|
1053
1072
|
}
|
|
1054
1073
|
|
|
1055
1074
|
/* Sanitize element content to be template-safe */
|
|
1056
|
-
if (SAFE_FOR_TEMPLATES && currentNode.nodeType ===
|
|
1075
|
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
1057
1076
|
/* Get the element's text content */
|
|
1058
1077
|
content = currentNode.textContent;
|
|
1059
1078
|
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
@@ -1083,7 +1102,7 @@ function createDOMPurify() {
|
|
|
1083
1102
|
// eslint-disable-next-line complexity
|
|
1084
1103
|
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
1085
1104
|
/* Make sure attribute cannot clobber */
|
|
1086
|
-
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
1105
|
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement || value === '__depth' || value === '__removalCount')) {
|
|
1087
1106
|
return false;
|
|
1088
1107
|
}
|
|
1089
1108
|
|
|
@@ -1187,6 +1206,12 @@ function createDOMPurify() {
|
|
|
1187
1206
|
continue;
|
|
1188
1207
|
}
|
|
1189
1208
|
|
|
1209
|
+
/* Work around a security issue with comments inside attributes */
|
|
1210
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
1211
|
+
_removeAttribute(name, currentNode);
|
|
1212
|
+
continue;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1190
1215
|
/* Sanitize attribute content to be template-safe */
|
|
1191
1216
|
if (SAFE_FOR_TEMPLATES) {
|
|
1192
1217
|
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
@@ -1237,7 +1262,11 @@ function createDOMPurify() {
|
|
|
1237
1262
|
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1238
1263
|
currentNode.setAttribute(name, value);
|
|
1239
1264
|
}
|
|
1240
|
-
|
|
1265
|
+
if (_isClobbered(currentNode)) {
|
|
1266
|
+
_forceRemove(currentNode);
|
|
1267
|
+
} else {
|
|
1268
|
+
arrayPop(DOMPurify.removed);
|
|
1269
|
+
}
|
|
1241
1270
|
} catch (_) {}
|
|
1242
1271
|
}
|
|
1243
1272
|
|
|
@@ -1267,7 +1296,7 @@ function createDOMPurify() {
|
|
|
1267
1296
|
const parentNode = getParentNode(shadowNode);
|
|
1268
1297
|
|
|
1269
1298
|
/* Set the nesting depth of an element */
|
|
1270
|
-
if (shadowNode.nodeType ===
|
|
1299
|
+
if (shadowNode.nodeType === NODE_TYPE.element) {
|
|
1271
1300
|
if (parentNode && parentNode.__depth) {
|
|
1272
1301
|
/*
|
|
1273
1302
|
We want the depth of the node in the original tree, which can
|
|
@@ -1279,8 +1308,11 @@ function createDOMPurify() {
|
|
|
1279
1308
|
}
|
|
1280
1309
|
}
|
|
1281
1310
|
|
|
1282
|
-
/*
|
|
1283
|
-
|
|
1311
|
+
/*
|
|
1312
|
+
* Remove an element if nested too deeply to avoid mXSS
|
|
1313
|
+
* or if the __depth might have been tampered with
|
|
1314
|
+
*/
|
|
1315
|
+
if (shadowNode.__depth >= MAX_NESTING_DEPTH || shadowNode.__depth < 0 || numberIsNaN(shadowNode.__depth)) {
|
|
1284
1316
|
_forceRemove(shadowNode);
|
|
1285
1317
|
}
|
|
1286
1318
|
|
|
@@ -1362,7 +1394,7 @@ function createDOMPurify() {
|
|
|
1362
1394
|
elements being stripped by the parser */
|
|
1363
1395
|
body = _initDocument('<!---->');
|
|
1364
1396
|
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
1365
|
-
if (importedNode.nodeType ===
|
|
1397
|
+
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
|
|
1366
1398
|
/* Node is already a body, use as is */
|
|
1367
1399
|
body = importedNode;
|
|
1368
1400
|
} else if (importedNode.nodeName === 'HTML') {
|
|
@@ -1405,7 +1437,7 @@ function createDOMPurify() {
|
|
|
1405
1437
|
const parentNode = getParentNode(currentNode);
|
|
1406
1438
|
|
|
1407
1439
|
/* Set the nesting depth of an element */
|
|
1408
|
-
if (currentNode.nodeType ===
|
|
1440
|
+
if (currentNode.nodeType === NODE_TYPE.element) {
|
|
1409
1441
|
if (parentNode && parentNode.__depth) {
|
|
1410
1442
|
/*
|
|
1411
1443
|
We want the depth of the node in the original tree, which can
|
|
@@ -1417,8 +1449,11 @@ function createDOMPurify() {
|
|
|
1417
1449
|
}
|
|
1418
1450
|
}
|
|
1419
1451
|
|
|
1420
|
-
/*
|
|
1421
|
-
|
|
1452
|
+
/*
|
|
1453
|
+
* Remove an element if nested too deeply to avoid mXSS
|
|
1454
|
+
* or if the __depth might have been tampered with
|
|
1455
|
+
*/
|
|
1456
|
+
if (currentNode.__depth >= MAX_NESTING_DEPTH || currentNode.__depth < 0 || numberIsNaN(currentNode.__depth)) {
|
|
1422
1457
|
_forceRemove(currentNode);
|
|
1423
1458
|
}
|
|
1424
1459
|
|