diff --git a/Docs/TagInfo/mapcomplete_charging_stations.json b/Docs/TagInfo/mapcomplete_charging_stations.json index 0306d72849..22ca1d0a4b 100644 --- a/Docs/TagInfo/mapcomplete_charging_stations.json +++ b/Docs/TagInfo/mapcomplete_charging_stations.json @@ -106,84 +106,84 @@ }, { "key": "socket:schuko", - "description": "Layer 'Charging stations' shows socket:schuko=1 with a fixed text, namely ' Schuko wall plug without ground pin (CEE7/4 type F)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:schuko=1 with a fixed text, namely ' Schuko wall plug without ground pin (CEE7/4 type F)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:schuko", - "description": "Layer 'Charging stations' shows socket:schuko~^..*$&socket:schuko!~^1$ with a fixed text, namely ' Schuko wall plug without ground pin (CEE7/4 type F)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:schuko~^..*$&socket:schuko!~^1$ with a fixed text, namely ' Schuko wall plug without ground pin (CEE7/4 type F)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:typee", - "description": "Layer 'Charging stations' shows socket:typee=1 with a fixed text, namely ' European wall plug with ground pin (CEE7/4 type E)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:typee=1 with a fixed text, namely ' European wall plug with ground pin (CEE7/4 type E)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:typee", - "description": "Layer 'Charging stations' shows socket:typee~^..*$&socket:typee!~^1$ with a fixed text, namely ' European wall plug with ground pin (CEE7/4 type E)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:typee~^..*$&socket:typee!~^1$ with a fixed text, namely ' European wall plug with ground pin (CEE7/4 type E)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:chademo", - "description": "Layer 'Charging stations' shows socket:chademo=1 with a fixed text, namely ' Chademo' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:chademo=1 with a fixed text, namely ' Chademo' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:chademo", - "description": "Layer 'Charging stations' shows socket:chademo~^..*$&socket:chademo!~^1$ with a fixed text, namely ' Chademo' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:chademo~^..*$&socket:chademo!~^1$ with a fixed text, namely ' Chademo' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:type1_cable", - "description": "Layer 'Charging stations' shows socket:type1_cable=1 with a fixed text, namely ' Type 1 with cable (J1772)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:type1_cable=1 with a fixed text, namely ' Type 1 with cable (J1772)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:type1_cable", - "description": "Layer 'Charging stations' shows socket:type1_cable~^..*$&socket:type1_cable!~^1$ with a fixed text, namely ' Type 1 with cable (J1772)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:type1_cable~^..*$&socket:type1_cable!~^1$ with a fixed text, namely ' Type 1 with cable (J1772)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:type1", - "description": "Layer 'Charging stations' shows socket:type1=1 with a fixed text, namely ' Type 1 without cable (J1772)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:type1=1 with a fixed text, namely ' Type 1 without cable (J1772)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:type1", - "description": "Layer 'Charging stations' shows socket:type1~^..*$&socket:type1!~^1$ with a fixed text, namely ' Type 1 without cable (J1772)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:type1~^..*$&socket:type1!~^1$ with a fixed text, namely ' Type 1 without cable (J1772)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:type1_combo", - "description": "Layer 'Charging stations' shows socket:type1_combo=1 with a fixed text, namely ' Type 1 CCS (aka Type 1 Combo)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:type1_combo=1 with a fixed text, namely ' Type 1 CCS (aka Type 1 Combo)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:type1_combo", - "description": "Layer 'Charging stations' shows socket:type1_combo~^..*$&socket:type1_combo!~^1$ with a fixed text, namely ' Type 1 CCS (aka Type 1 Combo)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:type1_combo~^..*$&socket:type1_combo!~^1$ with a fixed text, namely ' Type 1 CCS (aka Type 1 Combo)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:tesla_supercharger", - "description": "Layer 'Charging stations' shows socket:tesla_supercharger=1 with a fixed text, namely ' Tesla Supercharger' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:tesla_supercharger=1 with a fixed text, namely ' Tesla Supercharger' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:tesla_supercharger", - "description": "Layer 'Charging stations' shows socket:tesla_supercharger~^..*$&socket:tesla_supercharger!~^1$ with a fixed text, namely ' Tesla Supercharger' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:tesla_supercharger~^..*$&socket:tesla_supercharger!~^1$ with a fixed text, namely ' Tesla Supercharger' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:type2", - "description": "Layer 'Charging stations' shows socket:type2=1 with a fixed text, namely ' Type 2 (mennekes)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:type2=1 with a fixed text, namely ' Type 2 (mennekes)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:type2", - "description": "Layer 'Charging stations' shows socket:type2~^..*$&socket:type2!~^1$ with a fixed text, namely ' Type 2 (mennekes)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:type2~^..*$&socket:type2!~^1$ with a fixed text, namely ' Type 2 (mennekes)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:type2_combo", - "description": "Layer 'Charging stations' shows socket:type2_combo=1 with a fixed text, namely ' Type 2 CCS (mennekes)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", + "description": "Layer 'Charging stations' shows socket:type2_combo=1 with a fixed text, namely ' Type 2 CCS (mennekes)' and allows to pick this as a default answer (in the MapComplete.osm.be theme 'Charging stations')", "value": "1" }, { "key": "socket:type2_combo", - "description": "Layer 'Charging stations' shows socket:type2_combo~^..*$&socket:type2_combo!~^1$ with a fixed text, namely ' Type 2 CCS (mennekes)' (in the MapComplete.osm.be theme 'Charging stations')" + "description": "Layer 'Charging stations' shows socket:type2_combo~^..*$&socket:type2_combo!~^1$ with a fixed text, namely ' Type 2 CCS (mennekes)' (in the MapComplete.osm.be theme 'Charging stations')" }, { "key": "socket:schuko", @@ -793,4 +793,4 @@ "value": "yes" } ] -} \ No newline at end of file +} diff --git a/UI/BaseUIElement.ts b/UI/BaseUIElement.ts index a11db93192..a18b259724 100644 --- a/UI/BaseUIElement.ts +++ b/UI/BaseUIElement.ts @@ -99,6 +99,8 @@ export default abstract class BaseUIElement { if (this.InnerConstructElement === undefined) { throw "ERROR! This is not a correct baseUIElement: " + this.constructor.name } + + try { const el = this.InnerConstructElement(); @@ -130,8 +132,7 @@ export default abstract class BaseUIElement { // @ts-ignore e.consumed = true; } - el.style.pointerEvents = "all"; - el.style.cursor = "pointer"; + el.classList.add("pointer-events-none", "cursor-pointer"); } if (this._onHover !== undefined) { @@ -161,4 +162,4 @@ export default abstract class BaseUIElement { } protected abstract InnerConstructElement(): HTMLElement; -} \ No newline at end of file +} diff --git a/UI/Input/Checkboxes.ts b/UI/Input/Checkboxes.ts index 15aa758322..affad21920 100644 --- a/UI/Input/Checkboxes.ts +++ b/UI/Input/Checkboxes.ts @@ -31,7 +31,7 @@ export default class CheckBoxes extends InputElement { } protected InnerConstructElement(): HTMLElement { - const el = document.createElement("form"); + const formTag = document.createElement("form"); const value = this.value; const elements = this._elements; @@ -57,18 +57,18 @@ export default class CheckBoxes extends InputElement { "bg-red" ); - const wrapper = document.createElement("span"); + const wrapper = document.createElement("div"); wrapper.classList.add( "wrapper", "flex", "w-full", "border", "border-gray-400", - "m-1" + "mb-1" ); wrapper.appendChild(input); wrapper.appendChild(label); - el.appendChild(wrapper); + formTag.appendChild(wrapper); value.addCallbackAndRunD((selectedValues) => { if (selectedValues.indexOf(i) >= 0) { @@ -97,6 +97,6 @@ export default class CheckBoxes extends InputElement { }; } - return el; + return formTag; } } diff --git a/UI/Input/FixedInputElement.ts b/UI/Input/FixedInputElement.ts index d82f795d43..ee2e8d9506 100644 --- a/UI/Input/FixedInputElement.ts +++ b/UI/Input/FixedInputElement.ts @@ -41,6 +41,4 @@ export class FixedInputElement extends InputElement { protected InnerConstructElement(): HTMLElement { return this._el; } - - -} \ No newline at end of file +} diff --git a/UI/Input/InputElement.ts b/UI/Input/InputElement.ts index aadc6d9ee1..f9920b1d6a 100644 --- a/UI/Input/InputElement.ts +++ b/UI/Input/InputElement.ts @@ -10,4 +10,3 @@ export abstract class InputElement extends BaseUIElement { abstract IsValid(t: T): boolean; } - diff --git a/assets/layers/charging_station/csvToJson.ts b/assets/layers/charging_station/csvToJson.ts index 1d0bab2f78..2bd8d787a5 100644 --- a/assets/layers/charging_station/csvToJson.ts +++ b/assets/layers/charging_station/csvToJson.ts @@ -68,8 +68,8 @@ function run(file, protojson) { for (let i = 0; i < entries.length; i++){ const e = entries[i]; const txt = { - en: `
${e.description.get("en")}
`, - nl: `
${e.description.get("nl")} ${e.description.get("en")}
`, + nl: `
${e.description.get("nl")}
` } const json = { if: `${e.key}=1`, @@ -258,8 +258,8 @@ function run(file, protojson) { options: filterOptions }) - - + + const extraUnits = [ { appliesToKey: entries.map(e => e.key + ":voltage"), @@ -311,10 +311,7 @@ function run(file, protojson) { proto["units"] = [] } proto["units"].push(...extraUnits) - - // mergeTranslations("charging_station.json",proto) - - writeFileSync("charging_station.json", JSON.stringify(proto, undefined, " ")) + writeFileSync("charging_station.json", JSON.stringify(proto, undefined, " ")) } diff --git a/css/index-tailwind-output.css b/css/index-tailwind-output.css index 568e2072f8..4cbe196aed 100644 --- a/css/index-tailwind-output.css +++ b/css/index-tailwind-output.css @@ -839,6 +839,11 @@ video { margin-bottom: 0.75rem; } +.mx-4 { + margin-left: 1rem; + margin-right: 1rem; +} + .-ml-1 { margin-left: -0.25rem; } @@ -907,6 +912,10 @@ video { margin-right: 0px; } +.mb-1 { + margin-bottom: 0.25rem; +} + .mb-4 { margin-bottom: 1rem; } @@ -1147,14 +1156,14 @@ video { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; } -.cursor-wait { - cursor: wait; -} - .cursor-pointer { cursor: pointer; } +.cursor-wait { + cursor: wait; +} + .resize { resize: both; } diff --git a/langs/layers/en.json b/langs/layers/en.json index c107bdc35e..8900f0068d 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -888,7 +888,7 @@ "question": "Has a European wall plug with ground pin (CEE7/4 type E) connector" }, "3": { - "question": "Has a Chademo connector" + "question": "Has a Chademo connector" }, "4": { "question": "Has a Type 1 with cable (J1772) connector" @@ -900,7 +900,7 @@ "question": "Has a Type 1 CCS (aka Type 1 Combo) connector" }, "7": { - "question": "Has a Tesla Supercharger connector" + "question": "Has a Tesla Supercharger connector" }, "8": { "question": "Has a Type 2 (mennekes) connector" @@ -966,55 +966,55 @@ "Available_charging_stations (generated)": { "mappings": { "0": { - "then": " Schuko wall plug without ground pin (CEE7/4 type F)" + "then": "

Schuko wall plug without ground pin (CEE7/4 type F)

" }, "1": { - "then": " Schuko wall plug without ground pin (CEE7/4 type F)" + "then": "

Schuko wall plug without ground pin (CEE7/4 type F)

" }, "2": { - "then": " European wall plug with ground pin (CEE7/4 type E)" + "then": "

European wall plug with ground pin (CEE7/4 type E)

" }, "3": { - "then": " European wall plug with ground pin (CEE7/4 type E)" + "then": "

European wall plug with ground pin (CEE7/4 type E)

" }, "4": { - "then": " Chademo" + "then": "

Chademo

" }, "5": { - "then": " Chademo" + "then": "

Chademo

" }, "6": { - "then": " Type 1 with cable (J1772)" + "then": "

Type 1 with cable (J1772)

" }, "7": { - "then": " Type 1 with cable (J1772)" + "then": "

Type 1 with cable (J1772)

" }, "8": { - "then": " Type 1 without cable (J1772)" + "then": "

Type 1 without cable (J1772)

" }, "9": { - "then": " Type 1 without cable (J1772)" + "then": "

Type 1 without cable (J1772)

" }, "10": { - "then": " Type 1 CCS (aka Type 1 Combo)" + "then": "

Type 1 CCS (aka Type 1 Combo)

" }, "11": { - "then": " Type 1 CCS (aka Type 1 Combo)" + "then": "

Type 1 CCS (aka Type 1 Combo)

" }, "12": { - "then": " Tesla Supercharger" + "then": "

Tesla Supercharger

" }, "13": { - "then": " Tesla Supercharger" + "then": "

Tesla Supercharger

" }, "14": { - "then": " Type 2 (mennekes)" + "then": "

Type 2 (mennekes)

" }, "15": { - "then": " Type 2 (mennekes)" + "then": "

Type 2 (mennekes)

" }, "16": { - "then": " Type 2 CCS (mennekes)" + "then": "

Type 2 CCS (mennekes)

" }, "17": { "then": " Type 2 CCS (mennekes)" @@ -1042,6 +1042,7 @@ }, "25": { "then": " Tesla supercharger (destination (A Type 2 with cable branded as tesla)" + } }, "question": "Which charging stations are available here?" @@ -1126,22 +1127,18 @@ }, "question": "Which vehicles are allowed to charge here?" }, - "access": { - "question": "Who is allowed to use this charging station?", - "render": "Access is {access}" - }, - "capacity": { - "question": "How much vehicles can be charged here at the same time?", - "render": "{capacity} vehicles can be charged here at the same time" + "13": { + "question": "How much plugs of type Chademo are available here?", + "render": "There are Chademo plugs of type Chademo available here" }, "current-0": { "mappings": { "0": { - "then": "Schuko wall plug without ground pin (CEE7/4 type F) outputs at most 16 A" + "then": "Chademo outputs 500 volt" } }, - "question": "What current do the plugs with Schuko wall plug without ground pin (CEE7/4 type F) offer?", - "render": "Schuko wall plug without ground pin (CEE7/4 type F) outputs at most {socket:schuko:current}A" + "question": "What voltage do the plugs with Chademo offer?", + "render": "Chademo outputs {socket:chademo:voltage} volt" }, "current-1": { "mappings": { @@ -1155,6 +1152,7 @@ "current-10": { "mappings": { "0": { + "then": "Tesla Supercharger CCS (a branded type2_css) outputs at most 125 A" }, "1": { diff --git a/langs/layers/nl.json b/langs/layers/nl.json index b7a918c9ce..0ba838cc7d 100644 --- a/langs/layers/nl.json +++ b/langs/layers/nl.json @@ -1029,55 +1029,55 @@ "Available_charging_stations (generated)": { "mappings": { "0": { - "then": " Schuko stekker zonder aardingspin (CEE7/4 type F)" + "then": "

Schuko stekker zonder aardingspin (CEE7/4 type F)

" }, "1": { - "then": " Schuko stekker zonder aardingspin (CEE7/4 type F)" + "then": "

Schuko stekker zonder aardingspin (CEE7/4 type F)

" }, "2": { - "then": " Europese stekker met aardingspin (CEE7/4 type E)" + "then": "

Europese stekker met aardingspin (CEE7/4 type E)

" }, "3": { - "then": " Europese stekker met aardingspin (CEE7/4 type E)" + "then": "

Europese stekker met aardingspin (CEE7/4 type E)

" }, "4": { - "then": " " + "then": "

" }, "5": { - "then": " " + "then": "

" }, "6": { - "then": " Type 1 met kabel (J1772)" + "then": "

Type 1 met kabel (J1772)

" }, "7": { - "then": " Type 1 met kabel (J1772)" + "then": "

Type 1 met kabel (J1772)

" }, "8": { - "then": " Type 1 zonder kabel (J1772)" + "then": "

Type 1 zonder kabel (J1772)

" }, "9": { - "then": " Type 1 zonder kabel (J1772)" + "then": "

Type 1 zonder kabel (J1772)

" }, "10": { - "then": " " + "then": "

" }, "11": { - "then": " " + "then": "

" }, "12": { - "then": " " + "then": "

" }, "13": { - "then": " " + "then": "

" }, "14": { - "then": " " + "then": "

" }, "15": { - "then": " " + "then": "

" }, "16": { - "then": " " + "then": "

" }, "17": { "then": " "