Merge master

This commit is contained in:
Pieter Vander Vennet 2024-09-17 02:51:54 +02:00
commit 8f54ec1093
11 changed files with 112 additions and 87 deletions

View file

@ -291,6 +291,23 @@
} }
] ]
}, },
{
"id": "search_not_any",
"options": [
{
"osmTags": "_all_comments!~i~.*{search}.*",
"fields": [
{
"name": "search"
}
],
"question": {
"en": "Should <b>not</b> mention {search} in <b>any</b> comment"
}
}
]
},
{ {
"id": "opened_by", "id": "opened_by",
"options": [ "options": [

View file

@ -5137,14 +5137,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Editat per última vega pel contribuïdor {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Creada abans de {search}" "question": "Creada abans de {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Creada després de {search}" "question": "Creada després de {search}"
@ -5178,26 +5185,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Obert pel contribuïdor {search}" "question": "Obert pel contribuïdor {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>No</b> obert pel contribuïdor {search}" "question": "<b>No</b> obert pel contribuïdor {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Editat per última vega pel contribuïdor {search}"
}
}
} }
}, },
"name": "Notes d'OpenStreetMap", "name": "Notes d'OpenStreetMap",

View file

@ -5363,14 +5363,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Naposledy upravil přispěvatel {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Vytvořeno před {search}" "question": "Vytvořeno před {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Vytvořeno po {search}" "question": "Vytvořeno po {search}"
@ -5404,26 +5411,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Otevřeno přispěvatelem {search}" "question": "Otevřeno přispěvatelem {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>Není</b> otevřeno přispěvatelem {search}" "question": "<b>Není</b> otevřeno přispěvatelem {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Naposledy upravil přispěvatel {search}"
}
}
} }
}, },
"name": "Poznámky OpenStreetMap", "name": "Poznámky OpenStreetMap",

View file

@ -1633,7 +1633,7 @@
}, },
"note": { "note": {
"filter": { "filter": {
"9": { "10": {
"options": { "options": {
"0": { "0": {
"question": "Senest redigeret af bidragsyder {search}" "question": "Senest redigeret af bidragsyder {search}"

View file

@ -5176,9 +5176,6 @@
"4": { "4": {
"then": "Sandwichladen" "then": "Sandwichladen"
}, },
"5": {
"then": "Burgerrestaurant"
},
"6": { "6": {
"then": "Hier wird Sushi serviert" "then": "Hier wird Sushi serviert"
}, },
@ -6773,14 +6770,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Zuletzt bearbeitet von {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Erstellt vor dem {search}" "question": "Erstellt vor dem {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Erstellt nach dem {search}" "question": "Erstellt nach dem {search}"
@ -6814,26 +6818,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Erstellt von {search}" "question": "Erstellt von {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>Nicht</b> erstellt von {search}" "question": "<b>Nicht</b> erstellt von {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Zuletzt bearbeitet von {search}"
}
}
} }
}, },
"name": "OpenStreetMap-Hinweise", "name": "OpenStreetMap-Hinweise",

View file

@ -6786,32 +6786,39 @@
"10": { "10": {
"options": { "options": {
"0": { "0": {
"question": "Not edited as last by {search}" "question": "Last edited by contributor {search}"
} }
} }
}, },
"11": { "11": {
"options": { "options": {
"0": { "0": {
"question": "Created before {search}" "question": "Not edited as last by {search}"
} }
} }
}, },
"12": { "12": {
"options": { "options": {
"0": { "0": {
"question": "Created after {search}" "question": "Created before {search}"
} }
} }
}, },
"13": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Last edited before {search}" "question": "Created after {search}"
} }
} }
}, },
"14": { "14": {
"options": {
"0": {
"question": "Last edited before {search}"
}
}
},
"15": {
"options": { "options": {
"0": { "0": {
"question": "Last edited after {search}" "question": "Last edited after {search}"
@ -6855,28 +6862,28 @@
"6": { "6": {
"options": { "options": {
"0": { "0": {
"question": "Opened by contributor {search}" "question": "Should <b>not</b> mention {search} in <b>any</b> comment"
} }
} }
}, },
"7": { "7": {
"options": { "options": {
"0": { "0": {
"question": "<b>Not</b> opened by contributor {search}" "question": "Opened by contributor {search}"
} }
} }
}, },
"8": { "8": {
"options": { "options": {
"0": { "0": {
"question": "Edited or commented on by any user with name {search}" "question": "<b>Not</b> opened by contributor {search}"
} }
} }
}, },
"9": { "9": {
"options": { "options": {
"0": { "0": {
"question": "Last edited by contributor {search}" "question": "Edited or commented on by any user with name {search}"
} }
} }
} }

View file

@ -3146,14 +3146,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Editada por última vez por el contributor {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Creada antes de {search}" "question": "Creada antes de {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Creada después de {search}" "question": "Creada después de {search}"
@ -3187,26 +3194,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Abierto por el contributor {search}" "question": "Abierto por el contributor {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>No</b> abierto por el contributor {search}" "question": "<b>No</b> abierto por el contributor {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Editada por última vez por el contributor {search}"
}
}
} }
}, },
"name": "Notas de OpenStreetMap", "name": "Notas de OpenStreetMap",

View file

@ -4439,14 +4439,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Dernière modification par {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Créée avant le {search}" "question": "Créée avant le {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Créée après le {search}" "question": "Créée après le {search}"
@ -4460,26 +4467,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Ouverte par {search}" "question": "Ouverte par {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>Exclure</b>les notes ouvertes par {search}" "question": "<b>Exclure</b>les notes ouvertes par {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Dernière modification par {search}"
}
}
} }
}, },
"name": "Notes OpenStreetMap", "name": "Notes OpenStreetMap",

View file

@ -5534,14 +5534,21 @@
} }
} }
}, },
"11": { "10": {
"options": {
"0": {
"question": "Laatst bewerkt door bijdrager {search}"
}
}
},
"12": {
"options": { "options": {
"0": { "0": {
"question": "Aangemaakt voor {search}" "question": "Aangemaakt voor {search}"
} }
} }
}, },
"12": { "13": {
"options": { "options": {
"0": { "0": {
"question": "Aangemaakt na {search}" "question": "Aangemaakt na {search}"
@ -5575,26 +5582,19 @@
} }
} }
}, },
"6": { "7": {
"options": { "options": {
"0": { "0": {
"question": "Geopend door bijdrager {search}" "question": "Geopend door bijdrager {search}"
} }
} }
}, },
"7": { "8": {
"options": { "options": {
"0": { "0": {
"question": "<b>Niet</b> geopend door bijdrager {search}" "question": "<b>Niet</b> geopend door bijdrager {search}"
} }
} }
},
"9": {
"options": {
"0": {
"question": "Laatst bewerkt door bijdrager {search}"
}
}
} }
}, },
"name": "OpenStreetMap Notes", "name": "OpenStreetMap Notes",

View file

@ -131,6 +131,13 @@ export default class FilteredLayer {
return values return values
} }
/**
* import Translations from "../UI/i18n/Translations"
* import { RegexTag } from "../Logic/Tags/RegexTag"
*
* const option: FilterConfigOption = {question: Translations.T("question"), osmTags: undefined, originalTagsSpec: "key~.*{search}.*", fields: [{name: "search", type: "string"}] }
* FilteredLayer.fieldsToTags(option, {search: "value_regex"}) // => new RegexTag("key", /^(.*(value_regex).*)$/)
*/
private static fieldsToTags( private static fieldsToTags(
option: FilterConfigOption, option: FilterConfigOption,
fieldstate: string | Record<string, string> fieldstate: string | Record<string, string>
@ -153,7 +160,7 @@ export default class FilteredLayer {
} }
for (const key in properties) { for (const key in properties) {
v = (<string>v).replace("{" + key + "}", properties[key]) v = (<string>v).replace("{" + key + "}", "(" + properties[key] + ")")
} }
return v return v

View file

@ -8,9 +8,6 @@ import { UIEventSource } from "../../Logic/UIEventSource"
import { QueryParameters } from "../../Logic/Web/QueryParameters" import { QueryParameters } from "../../Logic/Web/QueryParameters"
import { Utils } from "../../Utils" import { Utils } from "../../Utils"
import { RegexTag } from "../../Logic/Tags/RegexTag" import { RegexTag } from "../../Logic/Tags/RegexTag"
import BaseUIElement from "../../UI/BaseUIElement"
import Table from "../../UI/Base/Table"
import Combine from "../../UI/Base/Combine"
import MarkdownUtils from "../../Utils/MarkdownUtils" import MarkdownUtils from "../../Utils/MarkdownUtils"
import Validators, { ValidatorType } from "../../UI/InputElement/Validators" import Validators, { ValidatorType } from "../../UI/InputElement/Validators"
@ -70,12 +67,12 @@ export default class FilterConfig {
} }
return { return {
name: f.name, name: f.name,
type, type
} }
}) })
for (const field of fields) { for (const field of fields) {
for (let ln in question.translations) { for (const ln in question.translations) {
const txt = question.translations[ln] const txt = question.translations[ln]
if (ln.startsWith("_")) { if (ln.startsWith("_")) {
continue continue
@ -111,7 +108,7 @@ export default class FilterConfig {
question: question, question: question,
osmTags: osmTags, osmTags: osmTags,
fields, fields,
originalTagsSpec: option.osmTags, originalTagsSpec: option.osmTags
} }
}) })
@ -223,7 +220,7 @@ export default class FilterConfig {
opt.osmTags?.asHumanString() ?? "", opt.osmTags?.asHumanString() ?? "",
opt.fields?.length > 0 opt.fields?.length > 0
? opt.fields.map((f) => f.name + " (" + f.type + ")").join(" ") ? opt.fields.map((f) => f.name + " (" + f.type + ")").join(" ")
: undefined, : undefined
]) ])
) )
}) })