From 3a19b921a7cf021f72f23d0900c7bf06da1480b7 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 16 May 2024 12:17:17 +0200 Subject: [PATCH] chore: prettier --- umap/static/umap/js/modules/browser.js | 6 +++++- umap/static/umap/js/modules/caption.js | 5 +++-- umap/static/umap/js/umap.core.js | 4 +++- umap/static/umap/js/umap.forms.js | 8 +++----- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/umap/static/umap/js/modules/browser.js b/umap/static/umap/js/modules/browser.js index 3c147a37..24700a6f 100644 --- a/umap/static/umap/js/modules/browser.js +++ b/umap/static/umap/js/modules/browser.js @@ -201,7 +201,11 @@ export default class Browser { if (filtersBuilder) filtersBuilder.form.reset() }) DomUtil.createIcon(reset, 'icon-restore') - DomUtil.element({ tagName: 'span', parent: reset, textContent: translate('Reset all') }) + DomUtil.element({ + tagName: 'span', + parent: reset, + textContent: translate('Reset all'), + }) this.map.panel.open({ content: container, diff --git a/umap/static/umap/js/modules/caption.js b/umap/static/umap/js/modules/caption.js index 9ebe01ce..1dd25966 100644 --- a/umap/static/umap/js/modules/caption.js +++ b/umap/static/umap/js/modules/caption.js @@ -20,7 +20,9 @@ export default class Caption { }) } const datalayerContainer = DomUtil.create('div', 'datalayer-container', container) - this.map.eachDataLayer((datalayer) => this.addDataLayer(datalayer, datalayerContainer)) + this.map.eachDataLayer((datalayer) => + this.addDataLayer(datalayer, datalayerContainer) + ) const creditsContainer = DomUtil.create('div', 'credits-container', container) this.addCredits(creditsContainer) this.map.panel.open({ content: container }) @@ -103,6 +105,5 @@ export default class Caption { urls ) DomUtil.element({ tagName: 'p', innerHTML: creditHTML, parent: credits }) - } } diff --git a/umap/static/umap/js/umap.core.js b/umap/static/umap/js/umap.core.js index 2180b05c..17aa324b 100644 --- a/umap/static/umap/js/umap.core.js +++ b/umap/static/umap/js/umap.core.js @@ -556,7 +556,9 @@ U.Help = L.Class.extend({ 'Comma separated list of properties to use for sorting features. To reverse the sort, put a minus sign (-) before. Eg. mykey,-otherkey.' ), slugKey: L._('The name of the property to use as feature unique identifier.'), - filterKey: L._('Comma separated list of properties to use when filtering features by text input'), + filterKey: L._( + 'Comma separated list of properties to use when filtering features by text input' + ), facetKey: L._( 'Comma separated list of properties to use for filters (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key). To control input field type, add it after another | (eg.: mykey|My Key|checkbox,otherkey|Other Key|datetime). Allowed values for the input field type are checkbox (default), radio, number, date and datetime.' ), diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 3297ff7f..bb38aebe 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -745,14 +745,12 @@ L.FormBuilder.Switch = L.FormBuilder.CheckBox.extend({ }) L.FormBuilder.FacetSearchBase = L.FormBuilder.Element.extend({ - buildLabel: function () { this.label = L.DomUtil.element({ tagName: 'legend', textContent: this.options.label, }) - } - + }, }) L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({ build: function () { @@ -865,13 +863,13 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({ }, isMinModified: function () { - const default_ = this.minInput.getAttribute("value") + const default_ = this.minInput.getAttribute('value') const current = this.minInput.value return current != default_ }, isMaxModified: function () { - const default_ = this.maxInput.getAttribute("value") + const default_ = this.maxInput.getAttribute('value') const current = this.maxInput.value return current != default_ },