From 252828bb4be2001e4fe1a30d77fb184625f2e5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 26 Oct 2021 01:08:36 -0700 Subject: [PATCH 01/65] Localize numbers in numeric fields --- ACCESSIBILITY.md | 4 +-- modules/core/localizer.js | 19 +++++++++++++ modules/ui/fields/input.js | 50 ++++++++++++++++++++++----------- modules/ui/fields/roadheight.js | 39 +++++++++++++++++-------- modules/ui/fields/roadspeed.js | 31 ++++++++++++-------- test/spec/core/localizer.js | 34 ++++++++++++++++++++++ 6 files changed, 135 insertions(+), 42 deletions(-) diff --git a/ACCESSIBILITY.md b/ACCESSIBILITY.md index b48557f01..8fd90adc3 100644 --- a/ACCESSIBILITY.md +++ b/ACCESSIBILITY.md @@ -165,12 +165,12 @@ for more info. | ✅ | Browser language preference | iD tries to use the language set in the browser | | ✅ | Base language fallback | E.g. if `pt_BR` is incomplete, `pt` should be tried before `en` | [#7996](https://github.com/openstreetmap/iD/issues/7996) | ✅ | Custom fallback languages | If the preferred language is incomplete, user-specified ones should be tried before `en` (e.g. `kk` → `ru`) | [#7996](https://github.com/openstreetmap/iD/issues/7996) -| 🟠 | [`lang` HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) | Helps with text-to-speech, text formatting, and auto-transliteration, particularly when iD mixes strings from different languages | [#7963](https://github.com/openstreetmap/iD/issues/7963) +| ✅ | [`lang` HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) | Helps with text-to-speech, text formatting, and auto-transliteration, particularly when iD mixes strings from different languages | [#7998](https://github.com/openstreetmap/iD/pull/7998) | ✅ | Locale URL parameters | `locale` and `rtl` can be used to manually set iD's locale preferences. See the [API](API.md#url-parameters) | | ❌ | Language selection in UI | The mapper should be able to view and change iD's language in the interface at any time. Useful for public computers with fixed browser languages | [#3120](https://github.com/openstreetmap/iD/issues/3120) | | 🟩 | Right-to-left layouts | The [`dir` HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) is properly set for languages like Hebrew and Arabic | | ✅ | [Language-specific plurals](https://docs.transifex.com/localization-tips-workflows/plurals-and-genders#how-pluralized-strings-are-handled-by-transifex) | English has two plural forms, but some languages need more to be grammatically correct | [#597](https://github.com/openstreetmap/iD/issues/597), [#7991](https://github.com/openstreetmap/iD/issues/7991) | -| 🟠 | [Localized number formats](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) | Most in-text numbers are localized. Numeric fields are not | [#3615](https://github.com/openstreetmap/iD/issues/3615), [#7993](https://github.com/openstreetmap/iD/issues/7993) | +| ✅ | [Localized number formats](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) | Most in-text numbers are localized, including numeric fields | [#8769](https://github.com/openstreetmap/iD/pull/8769), [#7993](https://github.com/openstreetmap/iD/issues/7993) | | 🟠 | Label icons | Icons should accompany text labels to illustrate the meaning of untranslated terms | ### Translatability diff --git a/modules/core/localizer.js b/modules/core/localizer.js index a072b41ad..21e19aedd 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -424,5 +424,24 @@ export function coreLocalizer() { return code; // if not found, use the code }; + localizer.floatParser = (locale) => { + // https://stackoverflow.com/a/55366435/4585461 + const format = new Intl.NumberFormat(locale); + const parts = format.formatToParts(12345.6); + const numerals = Array.from({ length: 10 }).map((_, i) => format.format(i)); + const index = new Map(numerals.map((d, i) => [d, i])); + const group = new RegExp(`[${parts.find(d => d.type === 'group').value}]`, 'g'); + const decimal = new RegExp(`[${parts.find(d => d.type === 'decimal').value}]`); + const numeral = new RegExp(`[${numerals.join('')}]`, 'g'); + const getIndex = d => index.get(d); + return (string) => { + string = string.trim() + .replace(group, '') + .replace(decimal, '.') + .replace(numeral, getIndex); + return string ? +string : NaN; + }; + }; + return localizer; } diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 0ae46234c..50ac3e6a3 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -32,6 +32,7 @@ export function uiFieldText(field, context) { var _tags; var _phoneFormats = {}; const isDirectionField = field.key.split(':').some(keyPart => keyPart === 'direction'); + const parseLocaleFloat = localizer.floatParser(localizer.languageCode()); if (field.type === 'tel') { fileFetcher.get('phone_formats') @@ -132,7 +133,8 @@ export function uiFieldText(field, context) { var raw_vals = input.node().value || '0'; var vals = raw_vals.split(';'); vals = vals.map(function(v) { - var num = Number(v); + v = v.trim(); + var num = parseLocaleFloat(v); if (isDirectionField) { const compassDir = cardinal[v.trim().toLowerCase()]; if (compassDir !== undefined) { @@ -140,10 +142,10 @@ export function uiFieldText(field, context) { } } - if (!isFinite(num)) { - // do nothing if the value is neither a number, nor a cardinal direction - return v.trim(); - } + // do nothing if the value is neither a number, nor a cardinal direction + if (!isFinite(num)) return v; + num = parseFloat(num, 10); + if (!isFinite(num)) return v; num += d; // clamp to 0..359 degree range if it's a direction field @@ -153,7 +155,7 @@ export function uiFieldText(field, context) { } // make sure no extra decimals are introduced const numDecimals = v.includes('.') ? v.split('.')[1].length : 0; - return clamped(num).toFixed(numDecimals); + return clamped(num).toFixed(numDecimals).toLocaleString(localizer.languageCode()); }); input.node().value = vals.join(';'); change()(); @@ -393,17 +395,20 @@ export function uiFieldText(field, context) { // don't override multiple values with blank string if (!val && Array.isArray(_tags[field.key])) return; - if (!onInput) { - if (field.type === 'number' && val) { - var vals = val.split(';'); - vals = vals.map(function(v) { - var num = Number(v); - return isFinite(num) ? clamped(num) : v.trim(); - }); - val = vals.join(';'); - } - utilGetSetValue(input, val); + var displayVal = val; + if (field.type === 'number' && val) { + var vals = val.split(';'); + vals = vals.map(function(v) { + v = v.trim(); + var num = parseLocaleFloat(v); + if (!isFinite(num)) return v; + num = parseFloat(num, 10); + if (!isFinite(num)) return v; + return clamped(num); + }); + val = vals.join(';'); } + if (!onInput) utilGetSetValue(input, displayVal); t[field.key] = val || undefined; dispatch.call('change', this, t, onInput); }; @@ -422,7 +427,18 @@ export function uiFieldText(field, context) { var isMixed = Array.isArray(tags[field.key]); - utilGetSetValue(input, !isMixed && tags[field.key] ? tags[field.key] : '') + var val = !isMixed && tags[field.key] ? tags[field.key] : ''; + if (field.type === 'number' && val) { + var vals = val.split(';'); + vals = vals.map(function(v) { + v = v.trim(); + var num = parseFloat(v, 10); + if (!isFinite(num)) return v; + return clamped(num).toLocaleString(localizer.languageCode()); + }); + val = vals.join(';'); + } + utilGetSetValue(input, val) .attr('title', isMixed ? tags[field.key].filter(Boolean).join('\n') : undefined) .attr('placeholder', isMixed ? t('inspector.multiple_values') : (field.placeholder() || t('inspector.unknown'))) .classed('mixed', isMixed); diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index 023219db4..182745804 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -3,7 +3,7 @@ import { select as d3_select } from 'd3-selection'; import * as countryCoder from '@ideditor/country-coder'; import { uiCombobox } from '../combobox'; -import { t } from '../../core/localizer'; +import { t, localizer } from '../../core/localizer'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTotalExtent } from '../../util'; @@ -16,6 +16,7 @@ export function uiFieldRoadheight(field, context) { var _entityIDs = []; var _tags; var _isImperial; + var parseLocaleFloat = localizer.floatParser(localizer.languageCode()); var primaryUnits = [ { @@ -129,16 +130,23 @@ export function uiFieldRoadheight(field, context) { if (!primaryValue && !secondaryValue) { tag[field.key] = undefined; - } else if (isNaN(primaryValue) || isNaN(secondaryValue) || !_isImperial) { - tag[field.key] = context.cleanTagValue(primaryValue); } else { - if (primaryValue !== '') { - primaryValue = context.cleanTagValue(primaryValue + '\''); + var rawPrimaryValue = parseLocaleFloat(primaryValue); + if (isNaN(rawPrimaryValue)) rawPrimaryValue = primaryValue; + var rawSecondaryValue = parseLocaleFloat(secondaryValue); + if (isNaN(rawSecondaryValue)) rawSecondaryValue = secondaryValue; + + if (isNaN(rawPrimaryValue) || isNaN(rawSecondaryValue) || !_isImperial) { + tag[field.key] = context.cleanTagValue(rawPrimaryValue); + } else { + if (rawPrimaryValue !== '') { + rawPrimaryValue = context.cleanTagValue(rawPrimaryValue + '\''); + } + if (rawSecondaryValue !== '') { + rawSecondaryValue = context.cleanTagValue(rawSecondaryValue + '"'); + } + tag[field.key] = rawPrimaryValue + rawSecondaryValue; } - if (secondaryValue !== '') { - secondaryValue = context.cleanTagValue(secondaryValue + '"'); - } - tag[field.key] = primaryValue + secondaryValue; } dispatch.call('change', this, tag); @@ -156,26 +164,33 @@ export function uiFieldRoadheight(field, context) { if (primaryValue && (primaryValue.indexOf('\'') >= 0 || primaryValue.indexOf('"') >= 0)) { secondaryValue = primaryValue.match(/(-?[\d.]+)"/); if (secondaryValue !== null) { - secondaryValue = secondaryValue[1]; + secondaryValue = parseFloat(secondaryValue[1], 10).toLocaleString(localizer.languageCode()); } primaryValue = primaryValue.match(/(-?[\d.]+)'/); if (primaryValue !== null) { - primaryValue = primaryValue[1]; + primaryValue = parseFloat(primaryValue[1], 10).toLocaleString(localizer.languageCode()); } _isImperial = true; } else if (primaryValue) { + var rawValue = primaryValue; + primaryValue = parseFloat(rawValue, 10); + if (isNaN(primaryValue)) primaryValue = rawValue; + primaryValue = primaryValue.toLocaleString(localizer.languageCode()); _isImperial = false; } } setUnitSuggestions(); + // If feet are specified but inches are omitted, assume zero inches. + var inchesPlaceholder = (0).toLocaleString(localizer.languageCode()); + utilGetSetValue(primaryInput, typeof primaryValue === 'string' ? primaryValue : '') .attr('title', isMixed ? primaryValue.filter(Boolean).join('\n') : null) .attr('placeholder', isMixed ? t('inspector.multiple_values') : t('inspector.unknown')) .classed('mixed', isMixed); utilGetSetValue(secondaryInput, typeof secondaryValue === 'string' ? secondaryValue : '') - .attr('placeholder', isMixed ? t('inspector.multiple_values') : (_isImperial ? '0' : null)) + .attr('placeholder', isMixed ? t('inspector.multiple_values') : (_isImperial ? inchesPlaceholder : null)) .classed('mixed', isMixed) .classed('disabled', !_isImperial) .attr('readonly', _isImperial ? null : 'readonly'); diff --git a/modules/ui/fields/roadspeed.js b/modules/ui/fields/roadspeed.js index b4c277f3a..637e61255 100644 --- a/modules/ui/fields/roadspeed.js +++ b/modules/ui/fields/roadspeed.js @@ -3,7 +3,7 @@ import { select as d3_select } from 'd3-selection'; import * as countryCoder from '@ideditor/country-coder'; import { uiCombobox } from '../combobox'; -import { t } from '../../core/localizer'; +import { t, localizer } from '../../core/localizer'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTotalExtent } from '../../util'; @@ -14,6 +14,7 @@ export function uiFieldRoadspeed(field, context) { var _entityIDs = []; var _tags; var _isImperial; + var parseLocaleFloat = localizer.floatParser(localizer.languageCode()); var speedCombo = uiCombobox(context, 'roadspeed'); var unitCombo = uiCombobox(context, 'roadspeed-unit') @@ -91,8 +92,8 @@ export function uiFieldRoadspeed(field, context) { function comboValues(d) { return { - value: d.toString(), - title: d.toString() + value: d.toLocaleString(localizer.languageCode()), + title: d.toLocaleString(localizer.languageCode()) }; } @@ -106,10 +107,14 @@ export function uiFieldRoadspeed(field, context) { if (!value) { tag[field.key] = undefined; - } else if (isNaN(value) || !_isImperial) { - tag[field.key] = context.cleanTagValue(value); } else { - tag[field.key] = context.cleanTagValue(value + ' mph'); + var rawValue = parseLocaleFloat(value); + if (isNaN(rawValue)) rawValue = value; + if (isNaN(rawValue) || !_isImperial) { + tag[field.key] = context.cleanTagValue(rawValue); + } else { + tag[field.key] = context.cleanTagValue(rawValue + ' mph'); + } } dispatch.call('change', this, tag); @@ -119,16 +124,20 @@ export function uiFieldRoadspeed(field, context) { roadspeed.tags = function(tags) { _tags = tags; - var value = tags[field.key]; + var rawValue = tags[field.key]; + var value = rawValue; var isMixed = Array.isArray(value); if (!isMixed) { - if (value && value.indexOf('mph') >= 0) { - value = parseInt(value, 10).toString(); - _isImperial = true; - } else if (value) { + if (rawValue && rawValue.indexOf('mph') >= 0) { + _isImperial = rawValue && rawValue.indexOf('mph') >= 0; + } else if (rawValue) { _isImperial = false; } + + value = parseInt(value, 10); + if (isNaN(value)) value = rawValue; + value = value.toLocaleString(localizer.languageCode()); } setUnitSuggestions(); diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index cf30d5ab7..08ef71cec 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -6,4 +6,38 @@ describe('iD.coreLocalizer', function() { expect(selection.selectChild().classed('localized-text')).to.be.true; }); }); + describe('#floatParser', function () { + it('roundtrips English numbers', function () { + var localizer = iD.coreLocalizer(); + var parseFloat = localizer.floatParser('en'); + expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); + expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); + expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); + expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + }); + it('roundtrips Spanish numbers', function () { + var localizer = iD.coreLocalizer(); + var parseFloat = localizer.floatParser('es'); + expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); + expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); + expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); + expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + }); + it('roundtrips Arabic numbers', function () { + var localizer = iD.coreLocalizer(); + var parseFloat = localizer.floatParser('ar-EG'); + expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); + expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); + expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); + expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + }); + it('roundtrips Bengali numbers', function () { + var localizer = iD.coreLocalizer(); + var parseFloat = localizer.floatParser('bn'); + expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); + expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); + expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); + expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + }); + }); }); From 2ba7177080f0bac44fe812bb5890536aa21da68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 26 Oct 2021 18:26:14 -0700 Subject: [PATCH 02/65] Polyfill inadequate Intl support Ensure that formatting is balanced with parsing to avoid truncating numbers. --- modules/core/localizer.js | 11 ++++++++++ modules/ui/fields/input.js | 5 +++-- modules/ui/fields/roadheight.js | 9 +++++---- modules/ui/fields/roadspeed.js | 7 ++++--- test/spec/core/localizer.js | 36 ++++++++++++++++++--------------- 5 files changed, 43 insertions(+), 25 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 21e19aedd..9961dea32 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -424,9 +424,20 @@ export function coreLocalizer() { return code; // if not found, use the code }; + localizer.floatFormatter = (locale) => { + if (!('Intl' in window && 'NumberFormat' in Intl && + 'formatToParts' in Intl.NumberFormat.prototype)) { + return (number) => number.toString(); + } else { + return (number) => number.toLocaleString(locale); + } + }; localizer.floatParser = (locale) => { // https://stackoverflow.com/a/55366435/4585461 + const polyfill = (string) => parseFloat(string, 10); + if (!('Intl' in window && 'NumberFormat' in Intl)) return polyfill; const format = new Intl.NumberFormat(locale); + if (!('formatToParts' in format)) return polyfill; const parts = format.formatToParts(12345.6); const numerals = Array.from({ length: 10 }).map((_, i) => format.format(i)); const index = new Map(numerals.map((d, i) => [d, i])); diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 50ac3e6a3..b444251cd 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -32,6 +32,7 @@ export function uiFieldText(field, context) { var _tags; var _phoneFormats = {}; const isDirectionField = field.key.split(':').some(keyPart => keyPart === 'direction'); + const formatFloat = localizer.floatFormatter(localizer.languageCode()); const parseLocaleFloat = localizer.floatParser(localizer.languageCode()); if (field.type === 'tel') { @@ -155,7 +156,7 @@ export function uiFieldText(field, context) { } // make sure no extra decimals are introduced const numDecimals = v.includes('.') ? v.split('.')[1].length : 0; - return clamped(num).toFixed(numDecimals).toLocaleString(localizer.languageCode()); + return formatFloat(clamped(num).toFixed(numDecimals)); }); input.node().value = vals.join(';'); change()(); @@ -434,7 +435,7 @@ export function uiFieldText(field, context) { v = v.trim(); var num = parseFloat(v, 10); if (!isFinite(num)) return v; - return clamped(num).toLocaleString(localizer.languageCode()); + return formatFloat(clamped(num)); }); val = vals.join(';'); } diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index 182745804..b33c89c8f 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -16,6 +16,7 @@ export function uiFieldRoadheight(field, context) { var _entityIDs = []; var _tags; var _isImperial; + var formatFloat = localizer.floatFormatter(localizer.languageCode()); var parseLocaleFloat = localizer.floatParser(localizer.languageCode()); var primaryUnits = [ @@ -164,18 +165,18 @@ export function uiFieldRoadheight(field, context) { if (primaryValue && (primaryValue.indexOf('\'') >= 0 || primaryValue.indexOf('"') >= 0)) { secondaryValue = primaryValue.match(/(-?[\d.]+)"/); if (secondaryValue !== null) { - secondaryValue = parseFloat(secondaryValue[1], 10).toLocaleString(localizer.languageCode()); + secondaryValue = formatFloat(parseFloat(secondaryValue[1], 10)); } primaryValue = primaryValue.match(/(-?[\d.]+)'/); if (primaryValue !== null) { - primaryValue = parseFloat(primaryValue[1], 10).toLocaleString(localizer.languageCode()); + primaryValue = formatFloat(parseFloat(primaryValue[1], 10)); } _isImperial = true; } else if (primaryValue) { var rawValue = primaryValue; primaryValue = parseFloat(rawValue, 10); if (isNaN(primaryValue)) primaryValue = rawValue; - primaryValue = primaryValue.toLocaleString(localizer.languageCode()); + primaryValue = formatFloat(primaryValue); _isImperial = false; } } @@ -183,7 +184,7 @@ export function uiFieldRoadheight(field, context) { setUnitSuggestions(); // If feet are specified but inches are omitted, assume zero inches. - var inchesPlaceholder = (0).toLocaleString(localizer.languageCode()); + var inchesPlaceholder = formatFloat(0); utilGetSetValue(primaryInput, typeof primaryValue === 'string' ? primaryValue : '') .attr('title', isMixed ? primaryValue.filter(Boolean).join('\n') : null) diff --git a/modules/ui/fields/roadspeed.js b/modules/ui/fields/roadspeed.js index 637e61255..a077c9bf0 100644 --- a/modules/ui/fields/roadspeed.js +++ b/modules/ui/fields/roadspeed.js @@ -14,6 +14,7 @@ export function uiFieldRoadspeed(field, context) { var _entityIDs = []; var _tags; var _isImperial; + var formatFloat = localizer.floatFormatter(localizer.languageCode()); var parseLocaleFloat = localizer.floatParser(localizer.languageCode()); var speedCombo = uiCombobox(context, 'roadspeed'); @@ -92,8 +93,8 @@ export function uiFieldRoadspeed(field, context) { function comboValues(d) { return { - value: d.toLocaleString(localizer.languageCode()), - title: d.toLocaleString(localizer.languageCode()) + value: formatFloat(d), + title: formatFloat(d) }; } @@ -137,7 +138,7 @@ export function uiFieldRoadspeed(field, context) { value = parseInt(value, 10); if (isNaN(value)) value = rawValue; - value = value.toLocaleString(localizer.languageCode()); + value = formatFloat(value); } setUnitSuggestions(); diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index 08ef71cec..0dbe82c71 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -9,35 +9,39 @@ describe('iD.coreLocalizer', function() { describe('#floatParser', function () { it('roundtrips English numbers', function () { var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('en'); var parseFloat = localizer.floatParser('en'); - expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); - expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); - expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); - expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + expect(parseFloat(formatFloat(-0.1))).to.eql(-0.1); + expect(parseFloat(formatFloat(1.234))).to.eql(1.234); + expect(parseFloat(formatFloat(1234))).to.eql(1234); + expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); }); it('roundtrips Spanish numbers', function () { var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('es'); var parseFloat = localizer.floatParser('es'); - expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); - expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); - expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); - expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + expect(parseFloat(formatFloat(-0.1))).to.eql(-0.1); + expect(parseFloat(formatFloat(1.234))).to.eql(1.234); + expect(parseFloat(formatFloat(1234))).to.eql(1234); + expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); }); it('roundtrips Arabic numbers', function () { var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('ar-EG'); var parseFloat = localizer.floatParser('ar-EG'); - expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); - expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); - expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); - expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + expect(parseFloat(formatFloat(-0.1))).to.eql(-0.1); + expect(parseFloat(formatFloat(1.234))).to.eql(1.234); + expect(parseFloat(formatFloat(1234))).to.eql(1234); + expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); }); it('roundtrips Bengali numbers', function () { var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('bn'); var parseFloat = localizer.floatParser('bn'); - expect(parseFloat((-0.1).toLocaleString(localizer.languageCode()))).to.eql(-0.1); - expect(parseFloat((1.234).toLocaleString(localizer.languageCode()))).to.eql(1.234); - expect(parseFloat(1234).toLocaleString(localizer.languageCode())).to.eql(1234); - expect(parseFloat(1234.56).toLocaleString(localizer.languageCode())).to.eql(1234.56); + expect(parseFloat(formatFloat(-0.1))).to.eql(-0.1); + expect(parseFloat(formatFloat(1.234))).to.eql(1.234); + expect(parseFloat(formatFloat(1234))).to.eql(1234); + expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); }); }); }); From 0dadd8b31c710ffaef4d54a20470b1071f246729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 3 Nov 2021 13:00:10 -0700 Subject: [PATCH 03/65] Clean roadheight value after concatenation --- modules/ui/fields/roadheight.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index b33c89c8f..37863be60 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -141,12 +141,12 @@ export function uiFieldRoadheight(field, context) { tag[field.key] = context.cleanTagValue(rawPrimaryValue); } else { if (rawPrimaryValue !== '') { - rawPrimaryValue = context.cleanTagValue(rawPrimaryValue + '\''); + rawPrimaryValue = rawPrimaryValue + '\''; } if (rawSecondaryValue !== '') { - rawSecondaryValue = context.cleanTagValue(rawSecondaryValue + '"'); + rawSecondaryValue = rawSecondaryValue + '"'; } - tag[field.key] = rawPrimaryValue + rawSecondaryValue; + tag[field.key] = context.cleanTagValue(rawPrimaryValue + rawSecondaryValue); } } From 9817894752f55a941b5c2f846dc6824b559433b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 12 Nov 2021 23:00:50 -0800 Subject: [PATCH 04/65] Apply suggestions from code review Co-authored-by: Martin Raifer --- modules/core/localizer.js | 2 +- modules/ui/fields/input.js | 8 ++------ modules/ui/fields/roadspeed.js | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 9961dea32..9c9e656b3 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -434,7 +434,7 @@ export function coreLocalizer() { }; localizer.floatParser = (locale) => { // https://stackoverflow.com/a/55366435/4585461 - const polyfill = (string) => parseFloat(string, 10); + const polyfill = (string) => parseFloat(string.trim()); if (!('Intl' in window && 'NumberFormat' in Intl)) return polyfill; const format = new Intl.NumberFormat(locale); if (!('formatToParts' in format)) return polyfill; diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index b444251cd..086809ff2 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -400,12 +400,8 @@ export function uiFieldText(field, context) { if (field.type === 'number' && val) { var vals = val.split(';'); vals = vals.map(function(v) { - v = v.trim(); var num = parseLocaleFloat(v); - if (!isFinite(num)) return v; - num = parseFloat(num, 10); - if (!isFinite(num)) return v; - return clamped(num); + return isFinite(num)) ? clamped(num) : v; }); val = vals.join(';'); } @@ -433,7 +429,7 @@ export function uiFieldText(field, context) { var vals = val.split(';'); vals = vals.map(function(v) { v = v.trim(); - var num = parseFloat(v, 10); + var num = parseFloat(v); if (!isFinite(num)) return v; return formatFloat(clamped(num)); }); diff --git a/modules/ui/fields/roadspeed.js b/modules/ui/fields/roadspeed.js index a077c9bf0..25b47ea06 100644 --- a/modules/ui/fields/roadspeed.js +++ b/modules/ui/fields/roadspeed.js @@ -131,7 +131,7 @@ export function uiFieldRoadspeed(field, context) { if (!isMixed) { if (rawValue && rawValue.indexOf('mph') >= 0) { - _isImperial = rawValue && rawValue.indexOf('mph') >= 0; + _isImperial = true; } else if (rawValue) { _isImperial = false; } From 74fdf174779aa5cc4b98ec81274072c5d443b09c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 12 Nov 2021 23:05:19 -0800 Subject: [PATCH 05/65] More minor corrections from code review --- modules/core/localizer.js | 1 + modules/ui/fields/input.js | 6 +++--- modules/ui/fields/roadheight.js | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 9c9e656b3..2e100a4eb 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -432,6 +432,7 @@ export function coreLocalizer() { return (number) => number.toLocaleString(locale); } }; + localizer.floatParser = (locale) => { // https://stackoverflow.com/a/55366435/4585461 const polyfill = (string) => parseFloat(string.trim()); diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 086809ff2..45e48d9de 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -137,7 +137,7 @@ export function uiFieldText(field, context) { v = v.trim(); var num = parseLocaleFloat(v); if (isDirectionField) { - const compassDir = cardinal[v.trim().toLowerCase()]; + const compassDir = cardinal[v.toLowerCase()]; if (compassDir !== undefined) { num = compassDir; } @@ -145,7 +145,7 @@ export function uiFieldText(field, context) { // do nothing if the value is neither a number, nor a cardinal direction if (!isFinite(num)) return v; - num = parseFloat(num, 10); + num = parseFloat(num); if (!isFinite(num)) return v; num += d; @@ -401,7 +401,7 @@ export function uiFieldText(field, context) { var vals = val.split(';'); vals = vals.map(function(v) { var num = parseLocaleFloat(v); - return isFinite(num)) ? clamped(num) : v; + return isFinite(num) ? clamped(num) : v; }); val = vals.join(';'); } diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index 37863be60..696d8c119 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -165,16 +165,16 @@ export function uiFieldRoadheight(field, context) { if (primaryValue && (primaryValue.indexOf('\'') >= 0 || primaryValue.indexOf('"') >= 0)) { secondaryValue = primaryValue.match(/(-?[\d.]+)"/); if (secondaryValue !== null) { - secondaryValue = formatFloat(parseFloat(secondaryValue[1], 10)); + secondaryValue = formatFloat(parseFloat(secondaryValue[1])); } primaryValue = primaryValue.match(/(-?[\d.]+)'/); if (primaryValue !== null) { - primaryValue = formatFloat(parseFloat(primaryValue[1], 10)); + primaryValue = formatFloat(parseFloat(primaryValue[1])); } _isImperial = true; } else if (primaryValue) { var rawValue = primaryValue; - primaryValue = parseFloat(rawValue, 10); + primaryValue = parseFloat(rawValue); if (isNaN(primaryValue)) primaryValue = rawValue; primaryValue = formatFloat(primaryValue); _isImperial = false; From ecb7c20bbff5148671c42d972b0ff7b0aa1e2797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 16 Nov 2021 17:04:29 -0800 Subject: [PATCH 06/65] Avoid truncation when formatting numbers --- modules/core/localizer.js | 4 ++-- test/spec/core/localizer.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 2e100a4eb..e87bfde21 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -429,7 +429,7 @@ export function coreLocalizer() { 'formatToParts' in Intl.NumberFormat.prototype)) { return (number) => number.toString(); } else { - return (number) => number.toLocaleString(locale); + return (number) => number.toLocaleString(locale, { maximumFractionDigits: 20 }); } }; @@ -437,7 +437,7 @@ export function coreLocalizer() { // https://stackoverflow.com/a/55366435/4585461 const polyfill = (string) => parseFloat(string.trim()); if (!('Intl' in window && 'NumberFormat' in Intl)) return polyfill; - const format = new Intl.NumberFormat(locale); + const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }); if (!('formatToParts' in format)) return polyfill; const parts = format.formatToParts(12345.6); const numerals = Array.from({ length: 10 }).map((_, i) => format.format(i)); diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index 0dbe82c71..8f773663f 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -15,6 +15,7 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(1.234))).to.eql(1.234); expect(parseFloat(formatFloat(1234))).to.eql(1234); expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); + expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); it('roundtrips Spanish numbers', function () { var localizer = iD.coreLocalizer(); @@ -24,6 +25,7 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(1.234))).to.eql(1.234); expect(parseFloat(formatFloat(1234))).to.eql(1234); expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); + expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); it('roundtrips Arabic numbers', function () { var localizer = iD.coreLocalizer(); @@ -33,6 +35,7 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(1.234))).to.eql(1.234); expect(parseFloat(formatFloat(1234))).to.eql(1234); expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); + expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); it('roundtrips Bengali numbers', function () { var localizer = iD.coreLocalizer(); @@ -42,6 +45,7 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(1.234))).to.eql(1.234); expect(parseFloat(formatFloat(1234))).to.eql(1234); expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); + expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); }); }); From 5d224a41cd4b838cb085ef96e63045d736cbe264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 16 Nov 2021 17:09:27 -0800 Subject: [PATCH 07/65] Strip literal (bidi) characters when parsing numbers --- modules/core/localizer.js | 4 +++- test/spec/core/localizer.js | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index e87bfde21..f840874e1 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -439,15 +439,17 @@ export function coreLocalizer() { if (!('Intl' in window && 'NumberFormat' in Intl)) return polyfill; const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }); if (!('formatToParts' in format)) return polyfill; - const parts = format.formatToParts(12345.6); + const parts = format.formatToParts(-12345.6); const numerals = Array.from({ length: 10 }).map((_, i) => format.format(i)); const index = new Map(numerals.map((d, i) => [d, i])); + const literal = new RegExp(`[${parts.find(d => d.type === 'literal').value}]`, 'g'); const group = new RegExp(`[${parts.find(d => d.type === 'group').value}]`, 'g'); const decimal = new RegExp(`[${parts.find(d => d.type === 'decimal').value}]`); const numeral = new RegExp(`[${numerals.join('')}]`, 'g'); const getIndex = d => index.get(d); return (string) => { string = string.trim() + .replace(literal, '') .replace(group, '') .replace(decimal, '.') .replace(numeral, getIndex); diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index 8f773663f..6a77e0ef8 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -27,6 +27,16 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); + it('roundtrips Hebrew numbers', function () { + var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('he'); + var parseFloat = localizer.floatParser('he'); + expect(parseFloat(formatFloat(-0.1))).to.eql(-0.1); + expect(parseFloat(formatFloat(1.234))).to.eql(1.234); + expect(parseFloat(formatFloat(1234))).to.eql(1234); + expect(parseFloat(formatFloat(1234.56))).to.eql(1234.56); + expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); + }); it('roundtrips Arabic numbers', function () { var localizer = iD.coreLocalizer(); var formatFloat = localizer.floatFormatter('ar-EG'); From 6419def20f584698c41726df0991a5f5efef4c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 21 May 2022 03:25:15 -0700 Subject: [PATCH 08/65] Fixed numeric fields in locales without literals --- modules/core/localizer.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index f840874e1..f8e5a6df9 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -442,17 +442,20 @@ export function coreLocalizer() { const parts = format.formatToParts(-12345.6); const numerals = Array.from({ length: 10 }).map((_, i) => format.format(i)); const index = new Map(numerals.map((d, i) => [d, i])); - const literal = new RegExp(`[${parts.find(d => d.type === 'literal').value}]`, 'g'); - const group = new RegExp(`[${parts.find(d => d.type === 'group').value}]`, 'g'); - const decimal = new RegExp(`[${parts.find(d => d.type === 'decimal').value}]`); + const literalPart = parts.find(d => d.type === 'literal'); + const literal = literalPart && new RegExp(`[${literalPart.value}]`, 'g'); + const groupPart = parts.find(d => d.type === 'group'); + const group = groupPart && new RegExp(`[${groupPart.value}]`, 'g'); + const decimalPart = parts.find(d => d.type === 'decimal'); + const decimal = decimalPart && new RegExp(`[${decimalPart.value}]`); const numeral = new RegExp(`[${numerals.join('')}]`, 'g'); const getIndex = d => index.get(d); return (string) => { - string = string.trim() - .replace(literal, '') - .replace(group, '') - .replace(decimal, '.') - .replace(numeral, getIndex); + string = string.trim(); + if (literal) string = string.replace(literal, ''); + if (group) string = string.replace(group, ''); + if (decimal) string = string.replace(decimal, '.'); + string = string.replace(numeral, getIndex); return string ? +string : NaN; }; }; From 4e1129709ce03bcb13c2f6a5afce87e6e1d2a80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Fri, 3 Mar 2023 22:47:00 -0800 Subject: [PATCH 09/65] Fixed exception formatting nonexistent value Co-authored-by: Martin Raifer --- modules/ui/fields/roadheight.js | 7 +++++-- modules/ui/fields/roadspeed.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index 696d8c119..f04bc0e97 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -175,8 +175,11 @@ export function uiFieldRoadheight(field, context) { } else if (primaryValue) { var rawValue = primaryValue; primaryValue = parseFloat(rawValue); - if (isNaN(primaryValue)) primaryValue = rawValue; - primaryValue = formatFloat(primaryValue); + if (isNaN(primaryValue)) { + primaryValue = rawValue; + } else { + primaryValue = formatFloat(primaryValue); + } _isImperial = false; } } diff --git a/modules/ui/fields/roadspeed.js b/modules/ui/fields/roadspeed.js index 25b47ea06..52799d86a 100644 --- a/modules/ui/fields/roadspeed.js +++ b/modules/ui/fields/roadspeed.js @@ -137,8 +137,11 @@ export function uiFieldRoadspeed(field, context) { } value = parseInt(value, 10); - if (isNaN(value)) value = rawValue; - value = formatFloat(value); + if (isNaN(value)) { + value = rawValue; + } else { + value = formatFloat(value); + } } setUnitSuggestions(); From 023907f9e26797b35e9c8bb91e94ff0d902a2861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 4 Mar 2023 18:36:06 -0800 Subject: [PATCH 10/65] Fixed incrementing/decrementing formatted numbers The float formatter function now takes a number of fraction digits to return. --- modules/core/localizer.js | 44 +++++++++++++++++++++++++++++++++++-- modules/ui/fields/input.js | 4 ++-- test/spec/core/localizer.js | 19 ++++++++++++++++ 3 files changed, 63 insertions(+), 4 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index f8e5a6df9..9e7d9850c 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -424,15 +424,28 @@ export function coreLocalizer() { return code; // if not found, use the code }; + /** + * Returns a function that formats a floating-point number in the given + * locale. + */ localizer.floatFormatter = (locale) => { if (!('Intl' in window && 'NumberFormat' in Intl && 'formatToParts' in Intl.NumberFormat.prototype)) { - return (number) => number.toString(); + return (number, fractionDigits) => { + return fractionDigits === undefined ? number.toString() : number.toFixed(fractionDigits); + }; } else { - return (number) => number.toLocaleString(locale, { maximumFractionDigits: 20 }); + return (number, fractionDigits) => number.toLocaleString(locale, { + minimumFractionDigits: fractionDigits, + maximumFractionDigits: fractionDigits === undefined ? 20 : fractionDigits, + }); } }; + /** + * Returns a function that parses a number formatted according to the given + * locale as a floating-point number. + */ localizer.floatParser = (locale) => { // https://stackoverflow.com/a/55366435/4585461 const polyfill = (string) => parseFloat(string.trim()); @@ -460,5 +473,32 @@ export function coreLocalizer() { }; }; + /** + * Returns a function that returns the number of decimal places in a + * formatted number string. + */ + localizer.decimalPlaceCounter = (locale) => { + var literal, group, decimal; + if ('Intl' in window && 'NumberFormat' in Intl) { + const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }); + if (('formatToParts' in format)) { + const parts = format.formatToParts(-12345.6); + const literalPart = parts.find(d => d.type === 'literal'); + literal = literalPart && new RegExp(`[${literalPart.value}]`, 'g'); + const groupPart = parts.find(d => d.type === 'group'); + group = groupPart && new RegExp(`[${groupPart.value}]`, 'g'); + const decimalPart = parts.find(d => d.type === 'decimal'); + decimal = decimalPart && new RegExp(`[${decimalPart.value}]`); + } + } + return (string) => { + string = string.trim(); + if (literal) string = string.replace(literal, ''); + if (group) string = string.replace(group, ''); + const parts = string.split(decimal || '.'); + return parts && parts[1] && parts[1].length || 0; + }; + }; + return localizer; } diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 45e48d9de..7bbfd5380 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -34,6 +34,7 @@ export function uiFieldText(field, context) { const isDirectionField = field.key.split(':').some(keyPart => keyPart === 'direction'); const formatFloat = localizer.floatFormatter(localizer.languageCode()); const parseLocaleFloat = localizer.floatParser(localizer.languageCode()); + const countDecimalPlaces = localizer.decimalPlaceCounter(localizer.languageCode()); if (field.type === 'tel') { fileFetcher.get('phone_formats') @@ -155,8 +156,7 @@ export function uiFieldText(field, context) { num = ((num % 360) + 360) % 360; } // make sure no extra decimals are introduced - const numDecimals = v.includes('.') ? v.split('.')[1].length : 0; - return formatFloat(clamped(num).toFixed(numDecimals)); + return formatFloat(clamped(num), countDecimalPlaces(v)); }); input.node().value = vals.join(';'); change()(); diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index 6a77e0ef8..01e2f20e7 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -6,6 +6,15 @@ describe('iD.coreLocalizer', function() { expect(selection.selectChild().classed('localized-text')).to.be.true; }); }); + describe('#floatFormatter', function () { + it('uses the specified number of fraction digits', function () { + var localizer = iD.coreLocalizer(); + var formatFloat = localizer.floatFormatter('en'); + expect(formatFloat(-0.1)).to.eql('-0.1'); + expect(formatFloat(-0.1, 0)).to.eql('-0'); + expect(formatFloat(-0.1, 2)).to.eql('-0.10'); + }); + }); describe('#floatParser', function () { it('roundtrips English numbers', function () { var localizer = iD.coreLocalizer(); @@ -58,4 +67,14 @@ describe('iD.coreLocalizer', function() { expect(parseFloat(formatFloat(3.14159))).to.eql(3.14159); }); }); + describe('#decimalPlaceCounter', function () { + it('counts decimal places in English numbers', function () { + var localizer = iD.coreLocalizer(); + var countDecimalPlaces = localizer.decimalPlaceCounter('en'); + expect(countDecimalPlaces('-0')).to.eql(0); + expect(countDecimalPlaces('-0.1')).to.eql(1); + expect(countDecimalPlaces('1.234')).to.eql(3); + expect(countDecimalPlaces('10')).to.eql(0); + }); + }); }); From 653582f26853427d79d49108c732c175d305bd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 4 Mar 2023 18:52:50 -0800 Subject: [PATCH 11/65] Added tests of padding zero --- test/spec/core/localizer.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/spec/core/localizer.js b/test/spec/core/localizer.js index 01e2f20e7..de157710a 100644 --- a/test/spec/core/localizer.js +++ b/test/spec/core/localizer.js @@ -13,6 +13,19 @@ describe('iD.coreLocalizer', function() { expect(formatFloat(-0.1)).to.eql('-0.1'); expect(formatFloat(-0.1, 0)).to.eql('-0'); expect(formatFloat(-0.1, 2)).to.eql('-0.10'); + expect(formatFloat(0.0, 1)).to.eql('0.0'); + }); + it('roundtrips English numbers', function () { + var localizer = iD.coreLocalizer(); + var parseFloat = localizer.floatParser('en'); + var formatFloat = localizer.floatFormatter('en'); + expect(formatFloat(parseFloat('0.1'))).to.eql('0.1'); + expect(formatFloat(parseFloat('.1'))).to.eql('0.1'); + expect(formatFloat(parseFloat('-0.1'))).to.eql('-0.1'); + expect(formatFloat(parseFloat('1.234'))).to.eql('1.234'); + expect(formatFloat(parseFloat('1234'))).to.eql('1,234'); + expect(formatFloat(parseFloat('1234.56'))).to.eql('1,234.56'); + expect(formatFloat(parseFloat('3.14159'))).to.eql('3.14159'); }); }); describe('#floatParser', function () { From ab442b76ac4a61ed12d52e383648e74ece24d0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 4 Mar 2023 23:43:40 -0800 Subject: [PATCH 12/65] Preserve precision in raw tags --- modules/core/localizer.js | 4 ++-- modules/ui/fields/input.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/core/localizer.js b/modules/core/localizer.js index 9e7d9850c..59067f699 100644 --- a/modules/core/localizer.js +++ b/modules/core/localizer.js @@ -448,7 +448,7 @@ export function coreLocalizer() { */ localizer.floatParser = (locale) => { // https://stackoverflow.com/a/55366435/4585461 - const polyfill = (string) => parseFloat(string.trim()); + const polyfill = (string) => +string.trim(); if (!('Intl' in window && 'NumberFormat' in Intl)) return polyfill; const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }); if (!('formatToParts' in format)) return polyfill; @@ -481,7 +481,7 @@ export function coreLocalizer() { var literal, group, decimal; if ('Intl' in window && 'NumberFormat' in Intl) { const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 20 }); - if (('formatToParts' in format)) { + if ('formatToParts' in format) { const parts = format.formatToParts(-12345.6); const literalPart = parts.find(d => d.type === 'literal'); literal = literalPart && new RegExp(`[${literalPart.value}]`, 'g'); diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 7bbfd5380..cc8c84f96 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -401,7 +401,8 @@ export function uiFieldText(field, context) { var vals = val.split(';'); vals = vals.map(function(v) { var num = parseLocaleFloat(v); - return isFinite(num) ? clamped(num) : v; + const fractionDigits = countDecimalPlaces(v); + return isFinite(num) ? clamped(num).toFixed(fractionDigits) : v; }); val = vals.join(';'); } @@ -429,9 +430,10 @@ export function uiFieldText(field, context) { var vals = val.split(';'); vals = vals.map(function(v) { v = v.trim(); - var num = parseFloat(v); + var num = Number(v); if (!isFinite(num)) return v; - return formatFloat(clamped(num)); + const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; + return formatFloat(clamped(num), fractionDigits); }); val = vals.join(';'); } From 0dfb05669d9f8a0cd4274113e1b3f8e83c57fd7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:25:48 +0200 Subject: [PATCH 13/65] Bump osm-community-index from 5.5.0 to 5.5.2 (#9601) Bumps [osm-community-index](https://github.com/osmlab/osm-community-index) from 5.5.0 to 5.5.2. - [Release notes](https://github.com/osmlab/osm-community-index/releases) - [Changelog](https://github.com/osmlab/osm-community-index/blob/main/CHANGELOG.md) - [Commits](https://github.com/osmlab/osm-community-index/compare/v5.5.0...v5.5.2) --- updated-dependencies: - dependency-name: osm-community-index dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e59d15bc..da3ae0aa5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", - "osm-community-index": "~5.5.0", + "osm-community-index": "~5.5.2", "postcss": "^8.4.21", "postcss-selector-prepend": "^0.5.0", "shelljs": "^0.8.0", @@ -6635,9 +6635,10 @@ } }, "node_modules/osm-community-index": { - "version": "5.5.0", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/osm-community-index/-/osm-community-index-5.5.2.tgz", + "integrity": "sha512-76bW4m5jjrm9DnWDc2/lRfknUd1/iDw67HwFUA5Ll/XVPow2iYP4QNej9o6rIGg2iv8T1RUXzx6gLm16HiFu2Q==", "dev": true, - "license": "ISC", "dependencies": { "diacritics": "^1.3.0" }, @@ -13970,7 +13971,9 @@ } }, "osm-community-index": { - "version": "5.5.0", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/osm-community-index/-/osm-community-index-5.5.2.tgz", + "integrity": "sha512-76bW4m5jjrm9DnWDc2/lRfknUd1/iDw67HwFUA5Ll/XVPow2iYP4QNej9o6rIGg2iv8T1RUXzx6gLm16HiFu2Q==", "dev": true, "requires": { "diacritics": "^1.3.0" diff --git a/package.json b/package.json index c468a239c..e207dbee8 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", - "osm-community-index": "~5.5.0", + "osm-community-index": "~5.5.2", "postcss": "^8.4.21", "postcss-selector-prepend": "^0.5.0", "shelljs": "^0.8.0", From ebed2a8fe66bd9467d8f951d9263931838c71245 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:27:24 +0200 Subject: [PATCH 14/65] Bump esbuild from 0.17.10 to 0.17.18 (#9598) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.17.10 to 0.17.18. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.17.10...v0.17.18) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 593 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 542 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index da3ae0aa5..5acaff3fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,7 @@ "d3": "~7.8.1", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", - "esbuild": "^0.17.10", + "esbuild": "^0.17.18", "esbuild-visualizer": "^0.4.0", "eslint": "^8.8.0", "fetch-mock": "^9.11.0", @@ -487,13 +487,126 @@ "kuler": "^2.0.0" } }, - "node_modules/@esbuild/linux-x64": { - "version": "0.17.10", + "node_modules/@esbuild/android-arm": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", + "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", + "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", + "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", + "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", + "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", + "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", + "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", + "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "cpu": [ + "arm" + ], + "dev": true, "optional": true, "os": [ "linux" @@ -502,6 +615,230 @@ "node": ">=12" } }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", + "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", + "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", + "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", + "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", + "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", + "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", + "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", + "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", + "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", + "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", + "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", + "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", + "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", + "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.2", "dev": true, @@ -3180,10 +3517,11 @@ } }, "node_modules/esbuild": { - "version": "0.17.10", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", + "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -3191,28 +3529,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.10", - "@esbuild/android-arm64": "0.17.10", - "@esbuild/android-x64": "0.17.10", - "@esbuild/darwin-arm64": "0.17.10", - "@esbuild/darwin-x64": "0.17.10", - "@esbuild/freebsd-arm64": "0.17.10", - "@esbuild/freebsd-x64": "0.17.10", - "@esbuild/linux-arm": "0.17.10", - "@esbuild/linux-arm64": "0.17.10", - "@esbuild/linux-ia32": "0.17.10", - "@esbuild/linux-loong64": "0.17.10", - "@esbuild/linux-mips64el": "0.17.10", - "@esbuild/linux-ppc64": "0.17.10", - "@esbuild/linux-riscv64": "0.17.10", - "@esbuild/linux-s390x": "0.17.10", - "@esbuild/linux-x64": "0.17.10", - "@esbuild/netbsd-x64": "0.17.10", - "@esbuild/openbsd-x64": "0.17.10", - "@esbuild/sunos-x64": "0.17.10", - "@esbuild/win32-arm64": "0.17.10", - "@esbuild/win32-ia32": "0.17.10", - "@esbuild/win32-x64": "0.17.10" + "@esbuild/android-arm": "0.17.18", + "@esbuild/android-arm64": "0.17.18", + "@esbuild/android-x64": "0.17.18", + "@esbuild/darwin-arm64": "0.17.18", + "@esbuild/darwin-x64": "0.17.18", + "@esbuild/freebsd-arm64": "0.17.18", + "@esbuild/freebsd-x64": "0.17.18", + "@esbuild/linux-arm": "0.17.18", + "@esbuild/linux-arm64": "0.17.18", + "@esbuild/linux-ia32": "0.17.18", + "@esbuild/linux-loong64": "0.17.18", + "@esbuild/linux-mips64el": "0.17.18", + "@esbuild/linux-ppc64": "0.17.18", + "@esbuild/linux-riscv64": "0.17.18", + "@esbuild/linux-s390x": "0.17.18", + "@esbuild/linux-x64": "0.17.18", + "@esbuild/netbsd-x64": "0.17.18", + "@esbuild/openbsd-x64": "0.17.18", + "@esbuild/sunos-x64": "0.17.18", + "@esbuild/win32-arm64": "0.17.18", + "@esbuild/win32-ia32": "0.17.18", + "@esbuild/win32-x64": "0.17.18" } }, "node_modules/esbuild-visualizer": { @@ -9815,8 +10153,157 @@ "kuler": "^2.0.0" } }, + "@esbuild/android-arm": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", + "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", + "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", + "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", + "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", + "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", + "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", + "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", + "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", + "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", + "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", + "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", + "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", + "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", + "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", + "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "dev": true, + "optional": true + }, "@esbuild/linux-x64": { - "version": "0.17.10", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", + "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", + "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", + "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", + "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", + "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", + "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", + "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", "dev": true, "optional": true }, @@ -11655,31 +12142,33 @@ } }, "esbuild": { - "version": "0.17.10", + "version": "0.17.18", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", + "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", "dev": true, "requires": { - "@esbuild/android-arm": "0.17.10", - "@esbuild/android-arm64": "0.17.10", - "@esbuild/android-x64": "0.17.10", - "@esbuild/darwin-arm64": "0.17.10", - "@esbuild/darwin-x64": "0.17.10", - "@esbuild/freebsd-arm64": "0.17.10", - "@esbuild/freebsd-x64": "0.17.10", - "@esbuild/linux-arm": "0.17.10", - "@esbuild/linux-arm64": "0.17.10", - "@esbuild/linux-ia32": "0.17.10", - "@esbuild/linux-loong64": "0.17.10", - "@esbuild/linux-mips64el": "0.17.10", - "@esbuild/linux-ppc64": "0.17.10", - "@esbuild/linux-riscv64": "0.17.10", - "@esbuild/linux-s390x": "0.17.10", - "@esbuild/linux-x64": "0.17.10", - "@esbuild/netbsd-x64": "0.17.10", - "@esbuild/openbsd-x64": "0.17.10", - "@esbuild/sunos-x64": "0.17.10", - "@esbuild/win32-arm64": "0.17.10", - "@esbuild/win32-ia32": "0.17.10", - "@esbuild/win32-x64": "0.17.10" + "@esbuild/android-arm": "0.17.18", + "@esbuild/android-arm64": "0.17.18", + "@esbuild/android-x64": "0.17.18", + "@esbuild/darwin-arm64": "0.17.18", + "@esbuild/darwin-x64": "0.17.18", + "@esbuild/freebsd-arm64": "0.17.18", + "@esbuild/freebsd-x64": "0.17.18", + "@esbuild/linux-arm": "0.17.18", + "@esbuild/linux-arm64": "0.17.18", + "@esbuild/linux-ia32": "0.17.18", + "@esbuild/linux-loong64": "0.17.18", + "@esbuild/linux-mips64el": "0.17.18", + "@esbuild/linux-ppc64": "0.17.18", + "@esbuild/linux-riscv64": "0.17.18", + "@esbuild/linux-s390x": "0.17.18", + "@esbuild/linux-x64": "0.17.18", + "@esbuild/netbsd-x64": "0.17.18", + "@esbuild/openbsd-x64": "0.17.18", + "@esbuild/sunos-x64": "0.17.18", + "@esbuild/win32-arm64": "0.17.18", + "@esbuild/win32-ia32": "0.17.18", + "@esbuild/win32-x64": "0.17.18" } }, "esbuild-visualizer": { diff --git a/package.json b/package.json index e207dbee8..1531f2a73 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "d3": "~7.8.1", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", - "esbuild": "^0.17.10", + "esbuild": "^0.17.18", "esbuild-visualizer": "^0.4.0", "eslint": "^8.8.0", "fetch-mock": "^9.11.0", From 65a9798c1afc0913d32294ffcd06ae1d131f434b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:27:53 +0200 Subject: [PATCH 15/65] Bump karma from 6.4.1 to 6.4.2 (#9599) Bumps [karma](https://github.com/karma-runner/karma) from 6.4.1 to 6.4.2. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v6.4.1...v6.4.2) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5acaff3fd..b8d911f00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -62,7 +62,7 @@ "happen": "^0.3.2", "js-yaml": "^4.0.0", "json-stringify-pretty-compact": "^3.0.0", - "karma": "^6.3.5", + "karma": "^6.4.2", "karma-chrome-launcher": "^3.1.0", "karma-coverage": "2.1.1", "karma-mocha": "^2.0.1", @@ -5619,9 +5619,10 @@ "license": "MIT" }, "node_modules/karma": { - "version": "6.4.1", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", + "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", "dev": true, - "license": "MIT", "dependencies": { "@colors/colors": "1.5.0", "body-parser": "^1.19.0", @@ -13485,7 +13486,9 @@ "dev": true }, "karma": { - "version": "6.4.1", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", + "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", "dev": true, "requires": { "@colors/colors": "1.5.0", diff --git a/package.json b/package.json index 1531f2a73..dacc971b3 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "happen": "^0.3.2", "js-yaml": "^4.0.0", "json-stringify-pretty-compact": "^3.0.0", - "karma": "^6.3.5", + "karma": "^6.4.2", "karma-chrome-launcher": "^3.1.0", "karma-coverage": "2.1.1", "karma-mocha": "^2.0.1", From 789989343cf5972e576df14a09dab8f04e39d9db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:29:17 +0200 Subject: [PATCH 16/65] Bump minimist from 1.2.6 to 1.2.8 (#9602) Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.6 to 1.2.8. - [Release notes](https://github.com/minimistjs/minimist/releases) - [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md) - [Commits](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.8) --- updated-dependencies: - dependency-name: minimist dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 ++++++++++---- package.json | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8d911f00..59ead483c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,7 +69,7 @@ "karma-remap-istanbul": "^0.6.0", "mapillary_sprite_source": "^1.8.0", "mapillary-js": "4.1.1", - "minimist": "^1.2.3", + "minimist": "^1.2.8", "mocha": "^10.0.0", "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", @@ -6256,9 +6256,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "license": "MIT" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minipass": { "version": "4.2.4", @@ -13968,7 +13972,9 @@ } }, "minimist": { - "version": "1.2.6", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "minipass": { diff --git a/package.json b/package.json index dacc971b3..3971f912b 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "karma-remap-istanbul": "^0.6.0", "mapillary_sprite_source": "^1.8.0", "mapillary-js": "4.1.1", - "minimist": "^1.2.3", + "minimist": "^1.2.8", "mocha": "^10.0.0", "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", From f09444c02e7defb1c6c264a2ecd4a8a66fbe3b45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Apr 2023 12:30:59 +0200 Subject: [PATCH 17/65] Bump @tmcw/togeojson from 5.2.2 to 5.6.0 (#9600) Bumps [@tmcw/togeojson](https://github.com/placemark/togeojson) from 5.2.2 to 5.6.0. - [Release notes](https://github.com/placemark/togeojson/releases) - [Changelog](https://github.com/placemark/togeojson/blob/main/CHANGELOG.md) - [Commits](https://github.com/placemark/togeojson/compare/v5.2.2...v5.6.0) --- updated-dependencies: - dependency-name: "@tmcw/togeojson" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59ead483c..b39e7c3af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mapbox/vector-tile": "^1.3.1", "@rapideditor/country-coder": "~5.2.0", "@rapideditor/location-conflation": "~1.2.0", - "@tmcw/togeojson": "^5.2.1", + "@tmcw/togeojson": "^5.6.0", "@turf/bbox": "^6.0.0", "@turf/bbox-clip": "^6.0.0", "abortcontroller-polyfill": "^1.7.5", @@ -1209,8 +1209,9 @@ "license": "MIT" }, "node_modules/@tmcw/togeojson": { - "version": "5.2.2", - "license": "BSD-2-Clause", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@tmcw/togeojson/-/togeojson-5.6.0.tgz", + "integrity": "sha512-p+c0kbSY/tIwd3C0rpmTf3iFAOUYV6bkJbDiq0oQDGROOc7c6uh/X8r/mijY6SIFYIkVuKc8MS2REKhur2e6Jw==", "peerDependencies": { "@types/geojson": "*" } @@ -10559,7 +10560,9 @@ "dev": true }, "@tmcw/togeojson": { - "version": "5.2.2", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/@tmcw/togeojson/-/togeojson-5.6.0.tgz", + "integrity": "sha512-p+c0kbSY/tIwd3C0rpmTf3iFAOUYV6bkJbDiq0oQDGROOc7c6uh/X8r/mijY6SIFYIkVuKc8MS2REKhur2e6Jw==", "requires": {} }, "@transifex/api": { diff --git a/package.json b/package.json index 3971f912b..03a15bbca 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@mapbox/geojson-area": "^0.2.2", "@mapbox/sexagesimal": "1.2.0", "@mapbox/vector-tile": "^1.3.1", - "@tmcw/togeojson": "^5.2.1", + "@tmcw/togeojson": "^5.6.0", "@turf/bbox": "^6.0.0", "@turf/bbox-clip": "^6.0.0", "abortcontroller-polyfill": "^1.7.5", From 453fb424f164b39f3403bd0902543354ea57efba Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 28 Apr 2023 12:31:39 +0200 Subject: [PATCH 18/65] fix small typo --- test/spec/presets/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spec/presets/index.js b/test/spec/presets/index.js index c656cf159..9c3c39efe 100644 --- a/test/spec/presets/index.js +++ b/test/spec/presets/index.js @@ -420,7 +420,7 @@ describe('iD.presetIndex', function () { var graph = iD.coreGraph([surfShop]); var url = 'https://fakemaprules.io/fake.json'; - // no exernal presets yet + // no external presets yet expect(iD.presetIndex().match(surfShop, graph).id).to.eql('point'); // reset graph... From 24e514fa99958eb046655cbcfdf51b928577c145 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 2 May 2023 12:53:30 +0200 Subject: [PATCH 19/65] defer loading of static combo options fixes a bug where `multi/many/semiCombo` options are not selectable immediately after they were removed from a field, when the field does not use taginfo to fetch options --- CHANGELOG.md | 1 + modules/ui/fields/combo.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb805d9a..f44ad0da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :camera: Street-Level #### :white_check_mark: Validation #### :bug: Bugfixes +* Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 1c601dc4a..5fa4b1540 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -167,7 +167,7 @@ export function uiFieldCombo(field, context) { setTaginfoValues('', setPlaceholder); } else { selection.call(_combobox, attachTo); - setStaticValues(setPlaceholder); + setTimeout(() => setStaticValues(setPlaceholder), 0); } } From 140e56768ec4a57f371c1ba32e8ca46aca168280 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 2 May 2023 14:04:22 +0200 Subject: [PATCH 20/65] fix hiding of "Add" input on comboboxes with fixed options the check for this needs to be done after the available options are actually refreshed --- CHANGELOG.md | 1 + modules/ui/fields/combo.js | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f44ad0da5..570570621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :white_check_mark: Validation #### :bug: Bugfixes * Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options +* Fix a bug where the _Add_ input element on comboboxes with a fixed set of allowed options is still hidden after an option of a previously "fully saturated" field is removed #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 5fa4b1540..d4374bd93 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -325,6 +325,12 @@ export function uiFieldCombo(field, context) { _container.selectAll('input') .attr('placeholder', ph); + + // Hide 'Add' button if this field uses fixed set of + // options and they're all currently used + var hideAdd = (!_allowCustomValues && !values.length); + _container.selectAll('.chiplist .input-wrap') + .style('display', hideAdd ? 'none' : null); } @@ -610,20 +616,13 @@ export function uiFieldCombo(field, context) { // a negative maxlength doesn't make sense maxLength = Math.max(0, maxLength); - var allowDragAndDrop = _isSemi // only semiCombo values are ordered - && !Array.isArray(tags[field.key]); - - // Exclude existing multikeys from combo options.. - var available = objectDifference(_comboData, _multiData); - _combobox.data(available); - - // Hide 'Add' button if this field uses fixed set of - // options and they're all currently used, - // or if the field is already at its character limit - var hideAdd = (!_allowCustomValues && !available.length) || maxLength <= 0; + // Hide 'Add' button if this field is already at its character limit + var hideAdd = maxLength <= 0; _container.selectAll('.chiplist .input-wrap') .style('display', hideAdd ? 'none' : null); + var allowDragAndDrop = _isSemi // only semiCombo values are ordered + && !Array.isArray(tags[field.key]); // Render chips var chips = _container.selectAll('.chip') From 25cf4366d171a48479a87682e2fc7bb6af2a0f88 Mon Sep 17 00:00:00 2001 From: Biswajit Kaushik <76483357+biswajit-k@users.noreply.github.com> Date: Wed, 10 May 2023 15:32:37 +0530 Subject: [PATCH 21/65] Fix wrongly flagged "incorrect geometry type" for features with lifecycle-prefixed tags (#9483) --- modules/osm/tags.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/osm/tags.js b/modules/osm/tags.js index 8381d7281..2fcf98cae 100644 --- a/modules/osm/tags.js +++ b/modules/osm/tags.js @@ -76,11 +76,11 @@ export function osmTagSuggestingArea(tags) { var returnTags = {}; for (var realKey in tags) { const key = osmRemoveLifecyclePrefix(realKey); - if (key in osmAreaKeys && !(tags[key] in osmAreaKeys[key])) { + if (key in osmAreaKeys && !(tags[realKey] in osmAreaKeys[key])) { returnTags[realKey] = tags[realKey]; return returnTags; } - if (key in osmAreaKeysExceptions && tags[key] in osmAreaKeysExceptions[key]) { + if (key in osmAreaKeysExceptions && tags[realKey] in osmAreaKeysExceptions[key]) { returnTags[realKey] = tags[realKey]; return returnTags; } From f9aa67563786c28693166388453e5e5e07330b2e Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 10 May 2023 12:04:30 +0200 Subject: [PATCH 22/65] add to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 570570621..34b0d03e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :bug: Bugfixes * Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options * Fix a bug where the _Add_ input element on comboboxes with a fixed set of allowed options is still hidden after an option of a previously "fully saturated" field is removed +* Fix wrongly flagged "incorrect geometry type" warnings for features with lifecycle-prefixed tags ([#9483], thanks [@biswajit-k]) #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) @@ -60,6 +61,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Build icons from configured presets source and also process field value `icons` in `npm run build:data` [#9482]: https://github.com/openstreetmap/iD/pull/9482 +[#9483]: https://github.com/openstreetmap/iD/pull/9483 [#9492]: https://github.com/openstreetmap/iD/pull/9492 [#9493]: https://github.com/openstreetmap/iD/pull/9493 [#9520]: https://github.com/openstreetmap/iD/pull/9520 From a35653d35d07e7d122a77e04489aa23df8dd05e0 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 11 May 2023 15:06:37 +0200 Subject: [PATCH 23/65] use all available option strings when setting value this fixes where tag values of fields with referenced strings can become corrupted when the sub-field has restricted `options`, and an unavailable option is entered manually into the field. important for openstreetmap/id-tagging-schema#891 --- CHANGELOG.md | 1 + modules/ui/fields/combo.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34b0d03e0..19a81babc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options * Fix a bug where the _Add_ input element on comboboxes with a fixed set of allowed options is still hidden after an option of a previously "fully saturated" field is removed * Fix wrongly flagged "incorrect geometry type" warnings for features with lifecycle-prefixed tags ([#9483], thanks [@biswajit-k]) +* Fix corruption of tag values of fields with referenced strings, but restricted `options`, when an unavailable option is entered manually into the field. #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index d4374bd93..45af9aff8 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -73,7 +73,7 @@ export function uiFieldCombo(field, context) { function tagValue(dval) { dval = clean(dval || ''); - var found = getOptions().find(function(o) { + var found = getOptions(true).find(function(o) { return o.key && clean(o.value) === dval; }); if (found) return found.key; @@ -171,11 +171,17 @@ export function uiFieldCombo(field, context) { } } - function getOptions() { + function getOptions(allOptions) { var stringsField = field.resolveReference('stringsCrossReference'); if (!(field.options || stringsField.options)) return []; - return (field.options || stringsField.options).map(function(v) { + let options; + if (allOptions !== true) { + options = field.options || stringsField.options; + } else { + options = [].concat(field.options, stringsField.options).filter(Boolean); + } + return options.map(function(v) { const labelId = getLabelId(stringsField, v); return { key: v, From 9779f320a8368e52a1730630d48cb28d8b0140cd Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 16 May 2023 17:06:39 +0200 Subject: [PATCH 24/65] Properly handle case sensitive tags in taginfo suggestion in raw tag editor, fixes #9640 --- CHANGELOG.md | 2 ++ modules/osm/tags.js | 3 +++ modules/services/taginfo.js | 4 ++-- modules/ui/sections/raw_tag_editor.js | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19a81babc..0205f2ace 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix a bug where the _Add_ input element on comboboxes with a fixed set of allowed options is still hidden after an option of a previously "fully saturated" field is removed * Fix wrongly flagged "incorrect geometry type" warnings for features with lifecycle-prefixed tags ([#9483], thanks [@biswajit-k]) * Fix corruption of tag values of fields with referenced strings, but restricted `options`, when an unavailable option is entered manually into the field. +* Properly handle case sensitive tag values in taginfo suggestions in raw tag editor ([#9640]) #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) @@ -67,6 +68,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9493]: https://github.com/openstreetmap/iD/pull/9493 [#9520]: https://github.com/openstreetmap/iD/pull/9520 [#9501]: https://github.com/openstreetmap/iD/pull/9501 +[#9640]: https://github.com/openstreetmap/iD/issues/9640 [@biswajit-k]: https://github.com/biswajit-k diff --git a/modules/osm/tags.js b/modules/osm/tags.js index 2fcf98cae..af1a2d022 100644 --- a/modules/osm/tags.js +++ b/modules/osm/tags.js @@ -242,3 +242,6 @@ export var osmRailwayTrackTagValues = { export var osmFlowingWaterwayTagValues = { canal: true, ditch: true, drain: true, fish_pass: true, river: true, stream: true, tidal_channel: true }; + +// Tags which values should be considered case sensitive when offering tag suggestions +export const allowUpperCaseTagValues = /network|taxon|genus|species|brand|grape_variety|royal_cypher|listed_status|booth|rating|stars|:output|_hours|_times|_ref|manufacturer|country|target|brewery|cai_scale|traffic_sign/; diff --git a/modules/services/taginfo.js b/modules/services/taginfo.js index bd6903cb4..283772a6d 100644 --- a/modules/services/taginfo.js +++ b/modules/services/taginfo.js @@ -4,6 +4,7 @@ import { json as d3_json } from 'd3-fetch'; import { utilObjectOmit, utilQsString } from '../util'; import { localizer } from '../core/localizer'; +import { allowUpperCaseTagValues } from '../osm/tags'; import { taginfoApiUrl } from '../../config/id.js'; @@ -312,8 +313,7 @@ export default { // A few OSM keys expect values to contain uppercase values (see #3377). // This is not an exhaustive list (e.g. `name` also has uppercase values) // but these are the fields where taginfo value lookup is most useful. - var re = /network|taxon|genus|species|brand|grape_variety|royal_cypher|listed_status|booth|rating|stars|:output|_hours|_times|_ref|manufacturer|country|target|brewery|cai_scale/; - var allowUpperCase = re.test(params.key); + var allowUpperCase = allowUpperCaseTagValues.test(params.key); var f = filterValues(allowUpperCase); var result = d.data.filter(f).map(valKeyDescription); diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index 7d669ed62..f6e769af7 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -11,6 +11,7 @@ import { localizer, t } from '../../core/localizer'; import { utilArrayDifference, utilArrayIdentical } from '../../util/array'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTagDiff } from '../../util'; import { uiTooltip } from '..'; +import { allowUpperCaseTagValues } from '../../osm/tags'; export function uiSectionRawTagEditor(id, context) { @@ -437,7 +438,8 @@ export function uiSectionRawTagEditor(id, context) { }, function(err, data) { if (!err) callback(sort(value, data)); }); - })); + }) + .caseSensitive(allowUpperCaseTagValues.test(utilGetSetValue(key)))); function sort(value, data) { From bd98ff904bb9498ae60fd32548cd2bbcf244bb53 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 16 May 2023 17:10:30 +0200 Subject: [PATCH 25/65] restrict taginfo suggestions in raw tag editor to ones which match the input string this additinoal filtering is needed because of the caching performed by the services/taginfo.js module. --- modules/ui/sections/raw_tag_editor.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index f6e769af7..9220b81a2 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -422,7 +422,9 @@ export function uiSectionRawTagEditor(id, context) { query: value }, function(err, data) { if (!err) { - var filtered = data.filter(function(d) { return _tags[d.value] === undefined; }); + const filtered = data + .filter(d => _tags[d.value] === undefined) + .filter(d => d.value.toLowerCase().includes(value.toLowerCase())); callback(sort(value, filtered)); } }); @@ -436,7 +438,10 @@ export function uiSectionRawTagEditor(id, context) { geometry: geometry, query: value }, function(err, data) { - if (!err) callback(sort(value, data)); + if (!err) { + const filtered = data.filter(d => d.value.toLowerCase().includes(value.toLowerCase())); + callback(sort(value, filtered)); + } }); }) .caseSensitive(allowUpperCaseTagValues.test(utilGetSetValue(key)))); From 559a4ba72855c370e7499248609030b4967045ef Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 23 May 2023 15:22:58 +0200 Subject: [PATCH 26/65] support input fields with multiple tag keys requires upstream changes from tagging-schema v6.3, see https://github.com/openstreetmap/id-tagging-schema/issues/905 --- modules/ui/fields/input.js | 42 +++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 5ad862ba7..7c468f2dd 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -384,6 +384,17 @@ export function uiFieldText(field, context) { } + // returns all values of a (potential) multiselection and/or multi-key field + function getVals(tags) { + if (field.keys) { + return new Set(field.keys.reduce((acc, key) => acc.concat(tags[key]), []) + .filter(Boolean)); + } else { + return new Set([].concat(tags[field.key]).filter(Boolean)); + } + } + + function change(onInput) { return function() { var t = {}; @@ -391,7 +402,7 @@ export function uiFieldText(field, context) { if (!onInput) val = context.cleanTagValue(val); // don't override multiple values with blank string - if (!val && Array.isArray(_tags[field.key])) return; + if (!val && getVals(_tags).size > 1) return; if (!onInput) { if (field.type === 'number' && val) { @@ -405,7 +416,24 @@ export function uiFieldText(field, context) { utilGetSetValue(input, val); } t[field.key] = val || undefined; - dispatch.call('change', this, t, onInput); + if (field.keys) { + // for multi-key fields with: handle alternative tag keys gracefully + // https://github.com/openstreetmap/id-tagging-schema/issues/905 + dispatch.call('change', this, tags => { + if (field.keys.some(key => tags[key])) { + // use exiting key(s) + field.keys.filter(key => tags[key]).forEach(key => { + tags[key] = val || undefined; + }); + } else { + // fall back to default key if none of the `keys` is preset + tags[field.key] = val || undefined; + } + return tags; + }, onInput); + } else { + dispatch.call('change', this, t, onInput); + } }; } @@ -416,14 +444,14 @@ export function uiFieldText(field, context) { return i; }; - i.tags = function(tags) { _tags = tags; - var isMixed = Array.isArray(tags[field.key]); - - utilGetSetValue(input, !isMixed && tags[field.key] ? tags[field.key] : '') - .attr('title', isMixed ? tags[field.key].filter(Boolean).join('\n') : undefined) + const vals = getVals(tags); + const isMixed = vals.size > 1; + const val = vals.size === 1 ? [...vals][0] : ''; + utilGetSetValue(input, val) + .attr('title', isMixed ? [...vals].join('\n') : undefined) .attr('placeholder', isMixed ? t('inspector.multiple_values') : (field.placeholder() || t('inspector.unknown'))) .classed('mixed', isMixed); From 862ca6522a08d194e3fbb30cfd7424290eaf779f Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 23 May 2023 16:04:33 +0200 Subject: [PATCH 27/65] retry wikidata api without lng's region subtag if an error is returned closes #9638 --- CHANGELOG.md | 3 +++ modules/services/wikidata.js | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0205f2ace..ce5ced9ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,8 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix wrongly flagged "incorrect geometry type" warnings for features with lifecycle-prefixed tags ([#9483], thanks [@biswajit-k]) * Fix corruption of tag values of fields with referenced strings, but restricted `options`, when an unavailable option is entered manually into the field. * Properly handle case sensitive tag values in taginfo suggestions in raw tag editor ([#9640]) +* Fix dysfunctional autocomplete of wikidata fields for some languages with country-codes ([#9638]) + #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) @@ -68,6 +70,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9493]: https://github.com/openstreetmap/iD/pull/9493 [#9520]: https://github.com/openstreetmap/iD/pull/9520 [#9501]: https://github.com/openstreetmap/iD/pull/9501 +[#9638]: https://github.com/openstreetmap/iD/pull/9638 [#9640]: https://github.com/openstreetmap/iD/issues/9640 [@biswajit-k]: https://github.com/biswajit-k diff --git a/modules/services/wikidata.js b/modules/services/wikidata.js index 1e242114a..9cf69e84c 100644 --- a/modules/services/wikidata.js +++ b/modules/services/wikidata.js @@ -17,13 +17,13 @@ export default { // Search for Wikidata items matching the query - itemsForSearchQuery: function(query, callback) { + itemsForSearchQuery: function _itemsForSearchQuery(query, callback, language) { if (!query) { if (callback) callback('No query', {}); return; } - var lang = this.languagesToQuery()[0]; + var lang = language || this.languagesToQuery()[0]; var url = apibase + utilQsString({ action: 'wbsearchentities', @@ -42,7 +42,14 @@ export default { d3_json(url) .then(function(result) { if (result && result.error) { - throw new Error(result.error); + if (result.error.code === 'badvalue' && + result.error.info.includes(lang) && + !language && lang.includes('-')) { + // retry without "country suffix" region subtag + _itemsForSearchQuery(query, callback, lang.split('-')[0]); + } else { + throw new Error(result.error); + } } if (callback) callback(null, result.search || {}); }) From 96c2670727db188211f1c4d7c532b964deb67a39 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 23 May 2023 16:15:11 +0200 Subject: [PATCH 28/65] we can still use the full language for output (`uselang`) --- modules/services/wikidata.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/wikidata.js b/modules/services/wikidata.js index 9cf69e84c..a45ff0ac2 100644 --- a/modules/services/wikidata.js +++ b/modules/services/wikidata.js @@ -23,7 +23,7 @@ export default { return; } - var lang = language || this.languagesToQuery()[0]; + var lang = this.languagesToQuery()[0]; var url = apibase + utilQsString({ action: 'wbsearchentities', @@ -32,7 +32,7 @@ export default { search: query, type: 'item', // the language to search - language: lang, + language: language || lang, // the language for the label and description in the result uselang: lang, limit: 10, From 25669b700aa34ebe443669fbb6903f8efbdc3aeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 22:31:53 +0200 Subject: [PATCH 29/65] Bump eslint from 8.24.0 to 8.41.0 (#9644) Bumps [eslint](https://github.com/eslint/eslint) from 8.24.0 to 8.41.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.24.0...v8.41.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 604 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 268 insertions(+), 338 deletions(-) diff --git a/package-lock.json b/package-lock.json index b39e7c3af..3c2a13fc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", "esbuild": "^0.17.18", "esbuild-visualizer": "^0.4.0", - "eslint": "^8.8.0", + "eslint": "^8.41.0", "fetch-mock": "^9.11.0", "gaze": "^1.1.3", "glob": "^9.2.1", @@ -839,15 +839,40 @@ "node": ">=12" } }, - "node_modules/@eslint/eslintrc": { - "version": "1.3.2", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.5.2", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -861,6 +886,15 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/js": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz", + "integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@fortawesome/fontawesome-common-types": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz", @@ -924,27 +958,19 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.10.5", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, - "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, - "node_modules/@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "dev": true, - "license": "Apache-2.0", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "dev": true, @@ -959,8 +985,9 @@ }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", - "dev": true, - "license": "BSD-3-Clause" + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", @@ -1048,8 +1075,9 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1060,16 +1088,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1376,9 +1406,10 @@ } }, "node_modules/acorn": { - "version": "8.8.0", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, - "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -1388,8 +1419,9 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -1429,8 +1461,9 @@ }, "node_modules/ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1536,14 +1569,6 @@ "node": ">=0.10.0" } }, - "node_modules/array-union": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/array-uniq": { "version": "1.0.3", "dev": true, @@ -2079,8 +2104,9 @@ }, "node_modules/callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -3233,17 +3259,6 @@ "dev": true, "license": "MIT" }, - "node_modules/dir-glob": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "dev": true, @@ -3717,38 +3732,40 @@ } }, "node_modules/eslint": { - "version": "8.24.0", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz", + "integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==", "dev": true, - "license": "MIT", "dependencies": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.41.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-sdsl": "^4.1.4", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -3756,7 +3773,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -3772,58 +3788,42 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.3.0", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, - "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/espree": { - "version": "9.4.0", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3845,9 +3845,10 @@ } }, "node_modules/esquery": { - "version": "1.4.0", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -3857,8 +3858,9 @@ }, "node_modules/esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3868,8 +3870,9 @@ }, "node_modules/estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3962,32 +3965,6 @@ "version": "3.1.3", "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.2.12", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "license": "MIT" @@ -4003,9 +3980,10 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.13.0", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -4400,9 +4378,10 @@ } }, "node_modules/globals": { - "version": "13.17.0", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -4413,25 +4392,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby": { - "version": "11.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globule": { "version": "1.3.4", "dev": true, @@ -4491,10 +4451,11 @@ "dev": true, "license": "ISC" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "dev": true, - "license": "MIT" + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/gulp-util": { "version": "3.0.7", @@ -4880,17 +4841,19 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.2.0", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -5198,6 +5161,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "dev": true, @@ -5506,11 +5478,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/js-sdsl": { - "version": "4.1.4", - "dev": true, - "license": "MIT" - }, "node_modules/js-tokens": { "version": "4.0.0", "dev": true, @@ -5545,8 +5512,9 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify": { "version": "0.0.1", @@ -6161,26 +6129,6 @@ "node": ">=0.10.0" } }, - "node_modules/merge2": { - "version": "1.4.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/miller-rabin": { "version": "4.0.1", "dev": true, @@ -7029,8 +6977,9 @@ }, "node_modules/parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -7149,14 +7098,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-type": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/pathval": { "version": "1.1.1", "dev": true, @@ -7500,6 +7441,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -7514,8 +7457,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/quickselect": { "version": "2.0.0", @@ -7805,17 +7747,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/remap-istanbul": { "version": "0.9.6", "dev": true, @@ -7902,8 +7833,9 @@ }, "node_modules/resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -7917,8 +7849,9 @@ }, "node_modules/reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -7978,6 +7911,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -7993,7 +7928,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -8260,14 +8194,6 @@ "sinon": ">=4.0.0" } }, - "node_modules/slash": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/smash": { "version": "0.0.15", "dev": true, @@ -9249,8 +9175,9 @@ }, "node_modules/type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -9387,16 +9314,18 @@ }, "node_modules/uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -10313,14 +10242,31 @@ "dev": true, "optional": true }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true + }, "@eslint/eslintrc": { - "version": "1.3.2", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.15.0", + "espree": "^9.5.2", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -10328,6 +10274,12 @@ "strip-json-comments": "^3.1.1" } }, + "@eslint/js": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz", + "integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==", + "dev": true + }, "@fortawesome/fontawesome-common-types": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.4.0.tgz", @@ -10371,24 +10323,24 @@ } }, "@humanwhocodes/config-array": { - "version": "0.10.5", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, - "@humanwhocodes/gitignore-to-minimatch": { - "version": "1.0.2", - "dev": true - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "dev": true }, "@humanwhocodes/object-schema": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@istanbuljs/schema": { @@ -10449,6 +10401,8 @@ }, "@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -10457,10 +10411,14 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -10677,11 +10635,15 @@ } }, "acorn": { - "version": "8.8.0", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, "acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, @@ -10709,6 +10671,8 @@ }, "ajv": { "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -10770,10 +10734,6 @@ "version": "1.0.2", "dev": true }, - "array-union": { - "version": "2.1.0", - "dev": true - }, "array-uniq": { "version": "1.0.3", "dev": true @@ -11162,6 +11122,8 @@ }, "callsites": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { @@ -11942,13 +11904,6 @@ } } }, - "dir-glob": { - "version": "3.0.1", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, "doctrine": { "version": "3.0.0", "dev": true, @@ -12284,37 +12239,40 @@ } }, "eslint": { - "version": "8.24.0", + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz", + "integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.2", - "@humanwhocodes/config-array": "^0.10.5", - "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.41.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", - "glob-parent": "^6.0.1", - "globals": "^13.15.0", - "globby": "^11.1.0", - "grapheme-splitter": "^1.0.4", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-sdsl": "^4.1.4", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", @@ -12322,44 +12280,36 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" } }, "eslint-scope": { - "version": "7.1.1", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, - "eslint-utils": { - "version": "3.0.0", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "dev": true - } - } - }, "eslint-visitor-keys": { - "version": "3.3.0", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true }, "espree": { - "version": "9.4.0", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.1" } }, "esprima": { @@ -12367,7 +12317,9 @@ "dev": true }, "esquery": { - "version": "1.4.0", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -12375,6 +12327,8 @@ }, "esrecurse": { "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { "estraverse": "^5.2.0" @@ -12382,6 +12336,8 @@ }, "estraverse": { "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -12446,26 +12402,6 @@ "fast-deep-equal": { "version": "3.1.3" }, - "fast-glob": { - "version": "3.2.12", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, "fast-json-stable-stringify": { "version": "2.1.0" }, @@ -12478,7 +12414,9 @@ "dev": true }, "fastq": { - "version": "1.13.0", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -12729,24 +12667,14 @@ } }, "globals": { - "version": "13.17.0", + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, - "globby": { - "version": "11.1.0", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "globule": { "version": "1.3.4", "dev": true, @@ -12788,8 +12716,10 @@ "version": "4.2.10", "dev": true }, - "grapheme-splitter": { - "version": "1.0.4", + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, "gulp-util": { @@ -13032,11 +12962,15 @@ "version": "1.2.1" }, "ignore": { - "version": "5.2.0", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "import-fresh": { "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -13222,6 +13156,12 @@ "version": "1.0.2", "dev": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "2.1.0", "dev": true @@ -13417,10 +13357,6 @@ "version": "2.6.4", "dev": true }, - "js-sdsl": { - "version": "4.1.4", - "dev": true - }, "js-tokens": { "version": "4.0.0", "dev": true @@ -13442,6 +13378,8 @@ }, "json-schema-traverse": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "json-stable-stringify": { @@ -13911,18 +13849,6 @@ } } }, - "merge2": { - "version": "1.4.1", - "dev": true - }, - "micromatch": { - "version": "4.0.5", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, "miller-rabin": { "version": "4.0.1", "dev": true, @@ -14503,6 +14429,8 @@ }, "parent-module": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { "callsites": "^3.0.0" @@ -14580,10 +14508,6 @@ "version": "2.4.0", "dev": true }, - "path-type": { - "version": "4.0.0", - "dev": true - }, "pathval": { "version": "1.1.1", "dev": true @@ -14808,6 +14732,8 @@ }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "quickselect": { @@ -15020,10 +14946,6 @@ "functions-have-names": "^1.2.2" } }, - "regexpp": { - "version": "3.2.0", - "dev": true - }, "remap-istanbul": { "version": "0.9.6", "dev": true, @@ -15091,6 +15013,8 @@ }, "resolve-from": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "resolve-protobuf-schema": { @@ -15101,6 +15025,8 @@ }, "reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rfdc": { @@ -15142,6 +15068,8 @@ }, "run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -15325,10 +15253,6 @@ "dev": true, "requires": {} }, - "slash": { - "version": "3.0.0", - "dev": true - }, "smash": { "version": "0.0.15", "dev": true, @@ -16006,6 +15930,8 @@ }, "type-fest": { "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "type-is": { @@ -16076,13 +16002,17 @@ }, "uri-js": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "requires": { "punycode": "^2.1.0" }, "dependencies": { "punycode": { - "version": "2.1.1", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true } } diff --git a/package.json b/package.json index 03a15bbca..4093db13b 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", "esbuild": "^0.17.18", "esbuild-visualizer": "^0.4.0", - "eslint": "^8.8.0", + "eslint": "^8.41.0", "fetch-mock": "^9.11.0", "gaze": "^1.1.3", "glob": "^9.2.1", From 077d9a510510744cea15a64fe4566e85800aaf44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=E2=84=93e=20Hensel?= Date: Wed, 24 May 2023 09:21:41 +1200 Subject: [PATCH 30/65] fix tag values with whitespace causing css bugs (#9637) --- CHANGELOG.md | 3 ++- modules/svg/tag_classes.js | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce5ced9ce..2ba34802f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Fix corruption of tag values of fields with referenced strings, but restricted `options`, when an unavailable option is entered manually into the field. * Properly handle case sensitive tag values in taginfo suggestions in raw tag editor ([#9640]) * Fix dysfunctional autocomplete of wikidata fields for some languages with country-codes ([#9638]) - +* Prevent certain tag values from corrupting css classes when they contain whitespaces ([#9637], thanks [@k-yle]) #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) @@ -70,6 +70,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9493]: https://github.com/openstreetmap/iD/pull/9493 [#9520]: https://github.com/openstreetmap/iD/pull/9520 [#9501]: https://github.com/openstreetmap/iD/pull/9501 +[#9637]: https://github.com/openstreetmap/iD/pull/9637 [#9638]: https://github.com/openstreetmap/iD/pull/9638 [#9640]: https://github.com/openstreetmap/iD/issues/9640 [@biswajit-k]: https://github.com/biswajit-k diff --git a/modules/svg/tag_classes.js b/modules/svg/tag_classes.js index e358e9903..cf535c34f 100644 --- a/modules/svg/tag_classes.js +++ b/modules/svg/tag_classes.js @@ -159,7 +159,12 @@ export function svgTagClasses() { classes.push('tag-wikidata'); } - return classes.join(' ').trim(); + // ensure that classes for tags keys/values with special characters like spaces + // are not added to the DOM, because it can cause bizarre issues (#9448) + return classes + .filter(klass => /^[-_a-z0-9]+$/.test(klass)) + .join(' ') + .trim(); }; From 61fd3c869318734b2a6feae1599f39e3ca5c6a3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:53:40 +0200 Subject: [PATCH 31/65] Bump socket.io-parser from 4.2.1 to 4.2.3 (#9648) Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3. - [Release notes](https://github.com/socketio/socket.io-parser/releases) - [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3) --- updated-dependencies: - dependency-name: socket.io-parser dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c2a13fc9..27509ba13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8230,9 +8230,10 @@ "license": "MIT" }, "node_modules/socket.io-parser": { - "version": "4.2.1", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz", + "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==", "dev": true, - "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -15278,7 +15279,9 @@ "dev": true }, "socket.io-parser": { - "version": "4.2.1", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz", + "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==", "dev": true, "requires": { "@socket.io/component-emitter": "~3.1.0", From f49bdb4a1501580dfbe16e9e58d8e3e58dd992de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:54:52 +0200 Subject: [PATCH 32/65] Bump mocha from 10.0.0 to 10.2.0 (#9621) Bumps [mocha](https://github.com/mochajs/mocha) from 10.0.0 to 10.2.0. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md) - [Commits](https://github.com/mochajs/mocha/compare/v10.0.0...v10.2.0) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 22 +++++++--------------- package.json | 2 +- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27509ba13..be524f337 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,7 +70,7 @@ "mapillary_sprite_source": "^1.8.0", "mapillary-js": "4.1.1", "minimist": "^1.2.8", - "mocha": "^10.0.0", + "mocha": "^10.2.0", "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", @@ -1370,11 +1370,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "dev": true, - "license": "ISC" - }, "node_modules/@xmldom/xmldom": { "version": "0.8.6", "dev": true, @@ -6234,11 +6229,11 @@ } }, "node_modules/mocha": { - "version": "10.0.0", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, - "license": "MIT", "dependencies": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", @@ -10610,10 +10605,6 @@ "version": "2.1.1", "dev": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "dev": true - }, "@xmldom/xmldom": { "version": "0.8.6", "dev": true @@ -13921,10 +13912,11 @@ } }, "mocha": { - "version": "10.0.0", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", "ansi-colors": "4.1.1", "browser-stdout": "1.3.1", "chokidar": "3.5.3", diff --git a/package.json b/package.json index 4093db13b..92d43ac8b 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "mapillary_sprite_source": "^1.8.0", "mapillary-js": "4.1.1", "minimist": "^1.2.8", - "mocha": "^10.0.0", + "mocha": "^10.2.0", "name-suggestion-index": "~6.0", "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", From 7f2fbad47268eda6d28b65bbffc011d607709923 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:55:20 +0200 Subject: [PATCH 33/65] Bump chai from 4.3.6 to 4.3.7 (#9619) Bumps [chai](https://github.com/chaijs/chai) from 4.3.6 to 4.3.7. - [Release notes](https://github.com/chaijs/chai/releases) - [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md) - [Commits](https://github.com/chaijs/chai/compare/v4.3.6...v4.3.7) --- updated-dependencies: - dependency-name: chai dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 26 ++++++++++++++++---------- package.json | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index be524f337..ae6a03883 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "@rapideditor/temaki": "~5.3.0", "@transifex/api": "^5.2.0", "autoprefixer": "^10.4.14", - "chai": "^4.3.4", + "chai": "^4.3.7", "chalk": "^4.1.2", "cldr-core": "^41.0.0", "cldr-localenames-full": "^41.0.0", @@ -2152,13 +2152,14 @@ ] }, "node_modules/chai": { - "version": "4.3.6", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, - "license": "MIT", "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -3111,14 +3112,15 @@ } }, "node_modules/deep-eql": { - "version": "3.0.1", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, - "license": "MIT", "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-is": { @@ -11141,12 +11143,14 @@ "dev": true }, "chai": { - "version": "4.3.6", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "requires": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", "loupe": "^2.3.1", "pathval": "^1.1.1", @@ -11797,7 +11801,9 @@ "dev": true }, "deep-eql": { - "version": "3.0.1", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "requires": { "type-detect": "^4.0.0" diff --git a/package.json b/package.json index 92d43ac8b..b4fc486a5 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@openstreetmap/id-tagging-schema": "^6.0.0", "@transifex/api": "^5.2.0", "autoprefixer": "^10.4.14", - "chai": "^4.3.4", + "chai": "^4.3.7", "chalk": "^4.1.2", "cldr-core": "^41.0.0", "cldr-localenames-full": "^41.0.0", From 04b80a3244fe2e2378f0e72fc3d372ec217d20ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:55:49 +0200 Subject: [PATCH 34/65] Bump karma-chrome-launcher from 3.1.1 to 3.2.0 (#9618) Bumps [karma-chrome-launcher](https://github.com/karma-runner/karma-chrome-launcher) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/karma-runner/karma-chrome-launcher/releases) - [Changelog](https://github.com/karma-runner/karma-chrome-launcher/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma-chrome-launcher/compare/v3.1.1...v3.2.0) --- updated-dependencies: - dependency-name: karma-chrome-launcher dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae6a03883..a624c74f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "js-yaml": "^4.0.0", "json-stringify-pretty-compact": "^3.0.0", "karma": "^6.4.2", - "karma-chrome-launcher": "^3.1.0", + "karma-chrome-launcher": "^3.2.0", "karma-coverage": "2.1.1", "karma-mocha": "^2.0.1", "karma-remap-istanbul": "^0.6.0", @@ -5623,9 +5623,10 @@ } }, "node_modules/karma-chrome-launcher": { - "version": "3.1.1", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", + "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", "dev": true, - "license": "MIT", "dependencies": { "which": "^1.2.1" } @@ -13475,7 +13476,9 @@ } }, "karma-chrome-launcher": { - "version": "3.1.1", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz", + "integrity": "sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q==", "dev": true, "requires": { "which": "^1.2.1" diff --git a/package.json b/package.json index b4fc486a5..857e3fd0d 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "js-yaml": "^4.0.0", "json-stringify-pretty-compact": "^3.0.0", "karma": "^6.4.2", - "karma-chrome-launcher": "^3.1.0", + "karma-chrome-launcher": "^3.2.0", "karma-coverage": "2.1.1", "karma-mocha": "^2.0.1", "karma-remap-istanbul": "^0.6.0", From 746ed7cd6e7307b2cc548d00918c18ea947e1006 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:57:23 +0200 Subject: [PATCH 35/65] Bump engine.io and socket.io (#9626) Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together. Updates `engine.io` from 6.2.1 to 6.4.2 - [Release notes](https://github.com/socketio/engine.io/releases) - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/engine.io/compare/6.2.1...6.4.2) Updates `socket.io` from 4.5.2 to 4.6.1 - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/4.5.2...4.6.1) --- updated-dependencies: - dependency-name: engine.io dependency-type: indirect - dependency-name: socket.io dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 131 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index a624c74f6..de7d740f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1317,13 +1317,18 @@ }, "node_modules/@types/cookie": { "version": "0.4.1", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true }, "node_modules/@types/cors": { - "version": "2.8.12", + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", "dev": true, - "license": "MIT" + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/earcut": { "version": "2.1.1", @@ -1390,8 +1395,9 @@ }, "node_modules/accepts": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, - "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -1680,8 +1686,9 @@ }, "node_modules/base64id": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true, - "license": "MIT", "engines": { "node": "^4.5.0 || >= 5.9" } @@ -2490,8 +2497,9 @@ }, "node_modules/cookie": { "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2523,8 +2531,9 @@ }, "node_modules/cors": { "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, - "license": "MIT", "dependencies": { "object-assign": "^4", "vary": "^1" @@ -2535,8 +2544,9 @@ }, "node_modules/cors/node_modules/object-assign": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3418,9 +3428,9 @@ } }, "node_modules/engine.io": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", - "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", + "integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==", "dev": true, "dependencies": { "@types/cookie": "^0.4.1", @@ -3432,16 +3442,17 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" }, "engines": { "node": ">=10.0.0" } }, "node_modules/engine.io-parser": { - "version": "5.0.4", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -6453,8 +6464,9 @@ }, "node_modules/negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -8207,25 +8219,30 @@ } }, "node_modules/socket.io": { - "version": "4.5.2", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", + "integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==", "dev": true, - "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.1", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/socket.io-adapter": { - "version": "2.4.0", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", "dev": true, - "license": "MIT" + "dependencies": { + "ws": "~8.11.0" + } }, "node_modules/socket.io-parser": { "version": "4.2.3", @@ -9387,8 +9404,9 @@ }, "node_modules/vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -9677,9 +9695,10 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.2.3", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -10566,11 +10585,18 @@ }, "@types/cookie": { "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", "dev": true }, "@types/cors": { - "version": "2.8.12", - "dev": true + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } }, "@types/earcut": { "version": "2.1.1", @@ -10623,6 +10649,8 @@ }, "accepts": { "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", "dev": true, "requires": { "mime-types": "~2.1.34", @@ -10801,6 +10829,8 @@ }, "base64id": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, "beeper": { @@ -11401,6 +11431,8 @@ }, "cookie": { "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", "dev": true }, "core-js": { @@ -11418,6 +11450,8 @@ }, "cors": { "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, "requires": { "object-assign": "^4", @@ -11426,6 +11460,8 @@ "dependencies": { "object-assign": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true } } @@ -12019,9 +12055,9 @@ "dev": true }, "engine.io": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", - "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz", + "integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==", "dev": true, "requires": { "@types/cookie": "^0.4.1", @@ -12033,11 +12069,13 @@ "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.0.3", - "ws": "~8.2.3" + "ws": "~8.11.0" } }, "engine.io-parser": { - "version": "5.0.4", + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.6.tgz", + "integrity": "sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw==", "dev": true }, "ent": { @@ -14080,6 +14118,8 @@ }, "negotiator": { "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true }, "neo-async": { @@ -15264,20 +15304,27 @@ } }, "socket.io": { - "version": "4.5.2", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.6.1.tgz", + "integrity": "sha512-KMcaAi4l/8+xEjkRICl6ak8ySoxsYG+gG6/XfRCPJPQ/haCRIJBTL4wIl8YCsmtaBovcAXGLOShyVWQ/FG8GZA==", "dev": true, "requires": { "accepts": "~1.3.4", "base64id": "~2.0.0", "debug": "~4.3.2", - "engine.io": "~6.2.0", - "socket.io-adapter": "~2.4.0", - "socket.io-parser": "~4.2.0" + "engine.io": "~6.4.1", + "socket.io-adapter": "~2.5.2", + "socket.io-parser": "~4.2.1" } }, "socket.io-adapter": { - "version": "2.4.0", - "dev": true + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", + "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "dev": true, + "requires": { + "ws": "~8.11.0" + } }, "socket.io-parser": { "version": "4.2.3", @@ -16070,6 +16117,8 @@ }, "vary": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, "vinyl": { @@ -16267,7 +16316,9 @@ "dev": true }, "ws": { - "version": "8.2.3", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "dev": true, "requires": {} }, From d6a4130f42b2db20c4355106a939d5a97c0bf631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 May 2023 13:57:41 +0200 Subject: [PATCH 36/65] Bump postcss from 8.4.21 to 8.4.23 (#9620) Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.23. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.21...8.4.23) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 37 +++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index de7d740f3..1dfd59ec4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,7 +75,7 @@ "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", "osm-community-index": "~5.5.2", - "postcss": "^8.4.21", + "postcss": "^8.4.23", "postcss-selector-prepend": "^0.5.0", "shelljs": "^0.8.0", "shx": "^0.3.0", @@ -6447,9 +6447,16 @@ } }, "node_modules/nanoid": { - "version": "3.3.4", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -7221,9 +7228,9 @@ "license": "ISC" }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", + "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", "dev": true, "funding": [ { @@ -7233,10 +7240,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -14109,7 +14120,9 @@ } }, "nanoid": { - "version": "3.3.4", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true }, "natural-compare": { @@ -14624,12 +14637,12 @@ } }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", + "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", "dev": true, "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } diff --git a/package.json b/package.json index 857e3fd0d..e0d4d47c0 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "node-fetch": "^2.6.9", "npm-run-all": "^4.0.0", "osm-community-index": "~5.5.2", - "postcss": "^8.4.21", + "postcss": "^8.4.23", "postcss-selector-prepend": "^0.5.0", "shelljs": "^0.8.0", "shx": "^0.3.0", From e4641b581f9ea5bb3e2a842432f7afdc616c1d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 25 May 2023 04:17:34 -0700 Subject: [PATCH 37/65] Offer to connect sidewalk to service road without tagging crossing (#9650) --- CHANGELOG.md | 2 ++ data/core.yaml | 2 ++ modules/validations/crossing_ways.js | 29 +++++++++++++++++++++------- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba34802f..aa2784e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :scissors: Operations #### :camera: Street-Level #### :white_check_mark: Validation +* Offer to connect sidewalk to service road without tagging the connection as a crossing ([#9650], thanks [@1ec5]) #### :bug: Bugfixes * Fix `multi/many/semiCombo` options for not being selectable immediately after removing them for fields with predefined options * Fix a bug where the _Add_ input element on comboboxes with a fixed set of allowed options is still hidden after an option of a previously "fully saturated" field is removed @@ -73,6 +74,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9637]: https://github.com/openstreetmap/iD/pull/9637 [#9638]: https://github.com/openstreetmap/iD/pull/9638 [#9640]: https://github.com/openstreetmap/iD/issues/9640 +[#9650]: https://github.com/openstreetmap/iD/pull/9650 [@biswajit-k]: https://github.com/biswajit-k diff --git a/data/core.yaml b/data/core.yaml index ebe5892e4..37e18ea69 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1931,6 +1931,8 @@ en: title: Connect this feature connect_features: title: Connect the features + connect_using_crossing: + title: Connect using a crossing connect_using_ford: title: Connect using a ford continue_from_start: diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index 2195ea8e4..e20210335 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -123,9 +123,8 @@ export function validationCrossingWays(context) { motorway: true, motorway_link: true, trunk: true, trunk_link: true, primary: true, primary_link: true, secondary: true, secondary_link: true }; - var nonCrossingHighways = { track: true }; - function tagsForConnectionNodeIfAllowed(entity1, entity2, graph) { + function tagsForConnectionNodeIfAllowed(entity1, entity2, graph, lessLikelyTags) { var featureType1 = getFeatureType(entity1, graph); var featureType2 = getFeatureType(entity2, graph); @@ -141,11 +140,18 @@ export function validationCrossingWays(context) { // one feature is a path but not both var roadFeature = entity1IsPath ? entity2 : entity1; - if (nonCrossingHighways[roadFeature.tags.highway]) { - // don't mark path connections with certain roads as crossings + var pathFeature = entity1IsPath ? entity1 : entity2; + // don't mark path connections with tracks as crossings + if (roadFeature.tags.highway === 'track') { + return {}; + } + // a sidewalk crossing a driveway is unremarkable and unlikely to be interrupted by the driveway + // a sidewalk crossing another kind of service road may be similarly unremarkable + if (!lessLikelyTags && + roadFeature.tags.highway === 'service' && + pathFeature.tags.highway === 'footway' && pathFeature.tags.footway === 'sidewalk') { return {}; } - var pathFeature = entity1IsPath ? entity1 : entity2; if (['marked', 'unmarked', 'traffic_signals', 'uncontrolled'].indexOf(pathFeature.tags.crossing) !== -1) { // if the path is a crossing, match the crossing type return bothLines ? { highway: 'crossing', crossing: pathFeature.tags.crossing } : {}; @@ -435,6 +441,10 @@ export function validationCrossingWays(context) { if (connectionTags) { fixes.push(makeConnectWaysFix(this.data.connectionTags)); + let lessLikelyConnectionTags = tagsForConnectionNodeIfAllowed(entities[0], entities[1], graph, true); + if (lessLikelyConnectionTags && JSON.stringify(connectionTags) !== JSON.stringify(lessLikelyConnectionTags)) { + fixes.push(makeConnectWaysFix(lessLikelyConnectionTags)); + } } if (isCrossingIndoors) { @@ -692,16 +702,21 @@ export function validationCrossingWays(context) { function makeConnectWaysFix(connectionTags) { var fixTitleID = 'connect_features'; + var fixIcon = 'iD-icon-crossing'; + if (connectionTags.highway === 'crossing') { + fixTitleID = 'connect_using_crossing'; + fixIcon = 'temaki-pedestrian'; + } if (connectionTags.ford) { fixTitleID = 'connect_using_ford'; + fixIcon = 'temaki-pedestrian'; } return new validationIssueFix({ - icon: 'iD-icon-crossing', + icon: fixIcon, title: t.append('issues.fix.' + fixTitleID + '.title'), onClick: function(context) { var loc = this.issue.loc; - var connectionTags = this.issue.data.connectionTags; var edges = this.issue.data.edges; context.perform( From 9517d06d1135badf8c5d9b5f71320d41d915ac6f Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 13:22:39 +0200 Subject: [PATCH 38/65] use lodash for object comparison --- modules/validations/crossing_ways.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index e20210335..91998e616 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -1,3 +1,5 @@ +import { isEqual } from 'lodash'; + import { actionAddMidpoint } from '../actions/add_midpoint'; import { actionChangeTags } from '../actions/change_tags'; import { actionMergeNodes } from '../actions/merge_nodes'; @@ -442,7 +444,7 @@ export function validationCrossingWays(context) { if (connectionTags) { fixes.push(makeConnectWaysFix(this.data.connectionTags)); let lessLikelyConnectionTags = tagsForConnectionNodeIfAllowed(entities[0], entities[1], graph, true); - if (lessLikelyConnectionTags && JSON.stringify(connectionTags) !== JSON.stringify(lessLikelyConnectionTags)) { + if (lessLikelyConnectionTags && !isEqual(connectionTags, lessLikelyConnectionTags)) { fixes.push(makeConnectWaysFix(lessLikelyConnectionTags)); } } @@ -709,7 +711,9 @@ export function validationCrossingWays(context) { } if (connectionTags.ford) { fixTitleID = 'connect_using_ford'; - fixIcon = 'temaki-pedestrian'; + if (connectionTags.highway) { + fixIcon = 'temaki-pedestrian'; + } } return new validationIssueFix({ From f517b867debf8dea00cc09f092f882602d962457 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 15:24:40 +0200 Subject: [PATCH 39/65] add tests for #9650 --- modules/validations/crossing_ways.js | 4 +++- test/spec/validations/crossing_ways.js | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index 91998e616..b66927b99 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -716,7 +716,7 @@ export function validationCrossingWays(context) { } } - return new validationIssueFix({ + const fix = new validationIssueFix({ icon: fixIcon, title: t.append('issues.fix.' + fixTitleID + '.title'), onClick: function(context) { @@ -756,6 +756,8 @@ export function validationCrossingWays(context) { ); } }); + fix._connectionTags = connectionTags; + return fix; } function makeChangeLayerFix(higherOrLower) { diff --git a/test/spec/validations/crossing_ways.js b/test/spec/validations/crossing_ways.js index 57ce0ff95..735b22b88 100644 --- a/test/spec/validations/crossing_ways.js +++ b/test/spec/validations/crossing_ways.js @@ -2,7 +2,12 @@ describe('iD.validations.crossing_ways', function () { var context; beforeEach(function() { - context = iD.coreContext().assetPath('../dist/').init(); + const container = d3.select('body').append('div'); + context = iD.coreContext().assetPath('../dist/').init().container(container); + container + .append('div') + .attr('class', 'main-map') + .call(context.map()); }); function createWaysWithOneCrossingPoint(tags1, tags2) { @@ -253,6 +258,17 @@ describe('iD.validations.crossing_ways', function () { verifySingleCrossingIssue(validate(), {}); }); + it('flags sidewalk crossing service road', function() { + createWaysWithOneCrossingPoint({ highway: 'service' }, { highway: 'footway', footway: 'sidewalk' }); + const issues = validate(); + verifySingleCrossingIssue(issues, {}); + context.enter(iD.modeSelect(context, ['w-1'])); + const dynamicFixes = issues[0].dynamicFixes(context); + expect(dynamicFixes).to.have.lengthOf(5); + expect(dynamicFixes[0]._connectionTags).to.eql({}); + expect(dynamicFixes[1]._connectionTags).to.eql({ highway: 'crossing' }); + }); + it('flags road crossing railway', function() { createWaysWithOneCrossingPoint({ highway: 'residential' }, { railway: 'rail' }); verifySingleCrossingIssue(validate(), { railway: 'level_crossing' }); From 805becfe3b902bd52b8a1e3026351886d89ba807 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 18:05:36 +0200 Subject: [PATCH 40/65] support `no` and "other" states of options of multiCombo/manyCombo fields closes https://github.com/openstreetmap/id-tagging-schema/issues/895 and #7427 --- CHANGELOG.md | 2 ++ css/80_app.css | 6 ++++++ modules/ui/fields/combo.js | 40 ++++++++++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa2784e66..59fb1f624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ _Breaking developer changes, which may affect downstream projects or sites that # Unreleased (2.26.0-dev) #### :tada: New Features +* Combo fields for tags with `yes/no` values now correctly display the `no` state and allow to toggle between the two states ([#7427]) #### :sparkles: Usability & Accessibility * Make it easier to search for OSM objects by id ([#9520], thanks [@k-yle]) #### :scissors: Operations @@ -65,6 +66,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Bundle `package-lock.json` file in repository for faster `clean-install` builds * Build icons from configured presets source and also process field value `icons` in `npm run build:data` +[#7427]: https://github.com/openstreetmap/iD/issues/7427 [#9482]: https://github.com/openstreetmap/iD/pull/9482 [#9483]: https://github.com/openstreetmap/iD/pull/9483 [#9492]: https://github.com/openstreetmap/iD/pull/9492 diff --git a/css/80_app.css b/css/80_app.css index 738d3a268..72c0545b6 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -1676,6 +1676,12 @@ input.date-selector { max-width: 100%; color: #7092ff; } +.form-field-input-multicombo li.chip.negated span { + text-decoration: line-through; +} +.form-field-input-multicombo li.chip input { + width: 1em; +} .ideditor[dir='ltr'] .form-field-input-multicombo li.chip { padding: 2px 0px 2px 5px; } diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 45af9aff8..b3e9975ed 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -416,6 +416,17 @@ export function uiFieldCombo(field, context) { } + function invertMultikey(d3_event, d) { + d3_event.preventDefault(); + d3_event.stopPropagation(); + var t = {}; + if (_isMulti) { + t[d.key] = _tags[d.key] === 'yes' ? 'no' : 'yes'; + } + dispatch.call('change', this, t); + } + + function combo(selection) { _container = selection.selectAll('.form-field-input-wrap') .data([0]); @@ -455,6 +466,11 @@ export function uiFieldCombo(field, context) { .attr('class', 'input-wrap') .merge(_inputWrap); + // Hide 'Add' button if this field uses fixed set of + // options and they're all currently used + var hideAdd = (!_allowCustomValues && !_comboData.length); + _inputWrap.style('display', hideAdd ? 'none' : null); + _input = _inputWrap.selectAll('input') .data([0]); } else { @@ -557,13 +573,13 @@ export function uiFieldCombo(field, context) { if (!field.key && field.keys.indexOf(k) === -1) continue; var v = tags[k]; - if (!v || (typeof v === 'string' && v.toLowerCase() === 'no')) continue; var suffix = field.key ? k.slice(field.key.length) : k; _multiData.push({ key: k, value: displayValue(suffix), display: renderValue(suffix), + state: typeof v === 'string' ? v.toLowerCase() : '', isMixed: Array.isArray(v) }); } @@ -623,7 +639,7 @@ export function uiFieldCombo(field, context) { maxLength = Math.max(0, maxLength); // Hide 'Add' button if this field is already at its character limit - var hideAdd = maxLength <= 0; + var hideAdd = maxLength <= 0 || (!_allowCustomValues && !_comboData.length); _container.selectAll('.chiplist .input-wrap') .style('display', hideAdd ? 'none' : null); @@ -656,8 +672,24 @@ export function uiFieldCombo(field, context) { return d.isMixed; }) .attr('title', function(d) { - return d.isMixed ? t('inspector.unshared_value_tooltip') : null; - }); + if (d.isMixed) { + return t('inspector.unshared_value_tooltip'); + } + if (!['yes', 'no'].includes(d.state)) { + return d.state; + } + return null; + }) + .classed('negated', d => d.state === 'no'); + + if (!_isSemi) { + chips.selectAll('input[type=checkbox]').remove(); + chips.insert('input', 'span') + .attr('type', 'checkbox') + .property('checked', d => d.state === 'yes') + .property('indeterminate', d => d.isMixed || !['yes', 'no'].includes(d.state)) + .on('click', invertMultikey); + } if (allowDragAndDrop) { registerDragAndDrop(chips); From 28630ae9fcba339050a68684564ff974250c8f49 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 18:47:30 +0200 Subject: [PATCH 41/65] don't repeat values from multi-selection in dropdown as their state can now been toggled using the checkbox in the chip --- CHANGELOG.md | 2 +- modules/ui/fields/combo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59fb1f624..bc82db3f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,7 @@ _Breaking developer changes, which may affect downstream projects or sites that # Unreleased (2.26.0-dev) #### :tada: New Features -* Combo fields for tags with `yes/no` values now correctly display the `no` state and allow to toggle between the two states ([#7427]) +* Combo fields for tags with `yes/no` values now also display the `no` state and allow to toggle between the two states ([#7427]) #### :sparkles: Usability & Accessibility * Make it easier to search for OSM objects by id ([#9520], thanks [@k-yle]) #### :scissors: Operations diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index b3e9975ed..06e86ae4a 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -151,7 +151,7 @@ export function uiFieldCombo(field, context) { function objectDifference(a, b) { return a.filter(function(d1) { return !b.some(function(d2) { - return !d2.isMixed && d1.value === d2.value; + return d1.value === d2.value; }); }); } From b7b5b51351ea12fe47bf0c690cec64e890fa3fbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 19:02:47 +0200 Subject: [PATCH 42/65] Bump osm-auth from 2.0.1 to 2.1.0 (#9655) Bumps [osm-auth](https://github.com/osmlab/osm-auth) from 2.0.1 to 2.1.0. - [Release notes](https://github.com/osmlab/osm-auth/releases) - [Changelog](https://github.com/osmlab/osm-auth/blob/main/CHANGELOG.md) - [Commits](https://github.com/osmlab/osm-auth/compare/v2.0.1...v2.1.0) --- updated-dependencies: - dependency-name: osm-auth dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dfd59ec4..68935c8a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "lodash-es": "~4.17.15", "marked": "~4.3.0", "node-diff3": "~3.1.0", - "osm-auth": "~2.0.1", + "osm-auth": "~2.1.0", "pannellum": "2.5.6", "pbf": "^3.2.1", "polygon-clipping": "~0.15.1", @@ -6933,14 +6933,14 @@ "license": "MIT" }, "node_modules/osm-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/osm-auth/-/osm-auth-2.0.1.tgz", - "integrity": "sha512-Uw0hpw7IVlFMqd6hW9kTS1Qah9xh85hwn1xqLgCONGKRtHZ3ZaUzg/obm7WOwheJSmSmkwfiDnPN0imZyNOSbw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/osm-auth/-/osm-auth-2.1.0.tgz", + "integrity": "sha512-C1T6SCPovt7KagqNV4GXtRNlJ2SJ5SjJWRdtLGU72ntYoeXHGP2IgqeExu17cDeqLY1A3mIofmC6fUGkE7RdbA==", "dependencies": { "store": "~2.0.12" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/osm-community-index": { @@ -14445,9 +14445,9 @@ "dev": true }, "osm-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/osm-auth/-/osm-auth-2.0.1.tgz", - "integrity": "sha512-Uw0hpw7IVlFMqd6hW9kTS1Qah9xh85hwn1xqLgCONGKRtHZ3ZaUzg/obm7WOwheJSmSmkwfiDnPN0imZyNOSbw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/osm-auth/-/osm-auth-2.1.0.tgz", + "integrity": "sha512-C1T6SCPovt7KagqNV4GXtRNlJ2SJ5SjJWRdtLGU72ntYoeXHGP2IgqeExu17cDeqLY1A3mIofmC6fUGkE7RdbA==", "requires": { "store": "~2.0.12" } diff --git a/package.json b/package.json index e0d4d47c0..2ad78704d 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "lodash-es": "~4.17.15", "marked": "~4.3.0", "node-diff3": "~3.1.0", - "osm-auth": "~2.0.1", + "osm-auth": "~2.1.0", "pannellum": "2.5.6", "pbf": "^3.2.1", "polygon-clipping": "~0.15.1", From bef45e92211e0091363843ddc76f78437b429a35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 19:03:24 +0200 Subject: [PATCH 43/65] Bump @rapideditor/temaki from 5.3.0 to 5.4.0 (#9653) Bumps [@rapideditor/temaki](https://github.com/rapideditor/temaki) from 5.3.0 to 5.4.0. - [Release notes](https://github.com/rapideditor/temaki/releases) - [Changelog](https://github.com/rapideditor/temaki/blob/main/CHANGELOG.md) - [Commits](https://github.com/rapideditor/temaki/compare/v5.3.0...v5.4.0) --- updated-dependencies: - dependency-name: "@rapideditor/temaki" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 68935c8a9..8e89fde8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "@fortawesome/free-solid-svg-icons": "~6.4.0", "@mapbox/maki": "^8.0.1", "@openstreetmap/id-tagging-schema": "^6.0.0", - "@rapideditor/temaki": "~5.3.0", + "@rapideditor/temaki": "~5.4.0", "@transifex/api": "^5.2.0", "autoprefixer": "^10.4.14", "chai": "^4.3.7", @@ -1142,9 +1142,9 @@ } }, "node_modules/@rapideditor/temaki": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rapideditor/temaki/-/temaki-5.3.0.tgz", - "integrity": "sha512-1BH1MuLjwESgHPK05pgaxaw/2LRQh/hRKzXaVOUU4nJ+AcB+2ZWTft98zgagu4DJrBsde7ZaWzP3f/k+tyjGOw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rapideditor/temaki/-/temaki-5.4.0.tgz", + "integrity": "sha512-3VJ/abQsugyD6ossYFiVjo3l4/OPih3kKigabBN8zLbGdY6Fy2xySFKXlESFHiFf0KciV+0UpujYykMRijPx4Q==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -10482,9 +10482,9 @@ } }, "@rapideditor/temaki": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rapideditor/temaki/-/temaki-5.3.0.tgz", - "integrity": "sha512-1BH1MuLjwESgHPK05pgaxaw/2LRQh/hRKzXaVOUU4nJ+AcB+2ZWTft98zgagu4DJrBsde7ZaWzP3f/k+tyjGOw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@rapideditor/temaki/-/temaki-5.4.0.tgz", + "integrity": "sha512-3VJ/abQsugyD6ossYFiVjo3l4/OPih3kKigabBN8zLbGdY6Fy2xySFKXlESFHiFf0KciV+0UpujYykMRijPx4Q==", "dev": true }, "@resvg/resvg-js": { diff --git a/package.json b/package.json index 2ad78704d..d837abc44 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "@fortawesome/free-brands-svg-icons": "~6.4.0", "@fortawesome/free-regular-svg-icons": "~6.4.0", "@fortawesome/free-solid-svg-icons": "~6.4.0", - "@rapideditor/temaki": "~5.3.0", + "@rapideditor/temaki": "~5.4.0", "@mapbox/maki": "^8.0.1", "@openstreetmap/id-tagging-schema": "^6.0.0", "@transifex/api": "^5.2.0", From 0cd0ef1b5f8830de08cf5116c4cc87777bb9b608 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 19:04:50 +0200 Subject: [PATCH 44/65] Bump d3 from 7.8.2 to 7.8.4 (#9651) Bumps [d3](https://github.com/d3/d3) from 7.8.2 to 7.8.4. - [Release notes](https://github.com/d3/d3/releases) - [Changelog](https://github.com/d3/d3/blob/main/CHANGES.md) - [Commits](https://github.com/d3/d3/compare/v7.8.2...v7.8.4) --- updated-dependencies: - dependency-name: d3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e89fde8c..0d45d1c18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "cldr-core": "^41.0.0", "cldr-localenames-full": "^41.0.0", "concat-files": "^0.1.1", - "d3": "~7.8.1", + "d3": "~7.8.4", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", "esbuild": "^0.17.18", @@ -2700,9 +2700,10 @@ "license": "MIT" }, "node_modules/d3": { - "version": "7.8.2", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.4.tgz", + "integrity": "sha512-q2WHStdhiBtD8DMmhDPyJmXUxr6VWRngKyiJ5EfXMxPw+tqT6BhNjhJZ4w3BHsNm3QoVfZLY8Orq/qPFczwKRA==", "dev": true, - "license": "ISC", "dependencies": { "d3-array": "3", "d3-axis": "3", @@ -11590,7 +11591,9 @@ "dev": true }, "d3": { - "version": "7.8.2", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.4.tgz", + "integrity": "sha512-q2WHStdhiBtD8DMmhDPyJmXUxr6VWRngKyiJ5EfXMxPw+tqT6BhNjhJZ4w3BHsNm3QoVfZLY8Orq/qPFczwKRA==", "dev": true, "requires": { "d3-array": "3", diff --git a/package.json b/package.json index d837abc44..4d609cce4 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "cldr-core": "^41.0.0", "cldr-localenames-full": "^41.0.0", "concat-files": "^0.1.1", - "d3": "~7.8.1", + "d3": "~7.8.4", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", "esbuild": "^0.17.18", From 401910d7e96c9d5e2c7fd6bf375a46ac607f218d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 19:06:11 +0200 Subject: [PATCH 45/65] Bump core-js-bundle from 3.30.1 to 3.30.2 (#9654) Bumps [core-js-bundle](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js-bundle) from 3.30.1 to 3.30.2. - [Release notes](https://github.com/zloirock/core-js/releases) - [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/zloirock/core-js/commits/v3.30.2/packages/core-js-bundle) --- updated-dependencies: - dependency-name: core-js-bundle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d45d1c18..727bcc176 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "abortcontroller-polyfill": "^1.7.5", "aes-js": "^3.1.2", "alif-toolkit": "^1.2.9", - "core-js-bundle": "^3.30.1", + "core-js-bundle": "^3.30.2", "diacritics": "1.3.0", "fast-deep-equal": "~3.1.1", "fast-json-stable-stringify": "2.1.0", @@ -2515,9 +2515,9 @@ } }, "node_modules/core-js-bundle": { - "version": "3.30.1", - "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.30.1.tgz", - "integrity": "sha512-o7bb5+2lllehje8wj8MPNMvGh5fQ3dIWKlyYBflkDUYwYfiq8fKoxegiRJFxWRVme0edjHuXV0vVkS0APHAELg==", + "version": "3.30.2", + "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.30.2.tgz", + "integrity": "sha512-CHPd8RYmUcVfUD+BKf30ocf2M+NmaoQudWSEmQrWguJ6CJzZ9rsidXXV8t56TGRhY7RZlQRKr1dWnYisOS04zA==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -11452,9 +11452,9 @@ "dev": true }, "core-js-bundle": { - "version": "3.30.1", - "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.30.1.tgz", - "integrity": "sha512-o7bb5+2lllehje8wj8MPNMvGh5fQ3dIWKlyYBflkDUYwYfiq8fKoxegiRJFxWRVme0edjHuXV0vVkS0APHAELg==" + "version": "3.30.2", + "resolved": "https://registry.npmjs.org/core-js-bundle/-/core-js-bundle-3.30.2.tgz", + "integrity": "sha512-CHPd8RYmUcVfUD+BKf30ocf2M+NmaoQudWSEmQrWguJ6CJzZ9rsidXXV8t56TGRhY7RZlQRKr1dWnYisOS04zA==" }, "core-util-is": { "version": "1.0.3", diff --git a/package.json b/package.json index 4d609cce4..ec3692ffb 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "abortcontroller-polyfill": "^1.7.5", "aes-js": "^3.1.2", "alif-toolkit": "^1.2.9", - "core-js-bundle": "^3.30.1", + "core-js-bundle": "^3.30.2", "diacritics": "1.3.0", "fast-deep-equal": "~3.1.1", "fast-json-stable-stringify": "2.1.0", From ab8407db5022d5f2470fd175f147a8aaf461cf6a Mon Sep 17 00:00:00 2001 From: bryceco Date: Thu, 25 May 2023 10:09:49 -0700 Subject: [PATCH 46/65] Add address format for Phillipines (#9630) --- data/address_formats.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/address_formats.json b/data/address_formats.json index 26cd5ef6a..cf02c2df3 100644 --- a/data/address_formats.json +++ b/data/address_formats.json @@ -186,5 +186,13 @@ ["city", "postcode"], ["district"] ] + }, + { + "countryCodes": ["ph"], + "format": [ + ["unit", "housenumber", "street"], + ["district", "city"], + ["postcode", "province"] + ] } ] From 732123a4b9a88a37f7e0d4d68ea29a94855b7b63 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 19:14:42 +0200 Subject: [PATCH 47/65] update changelog --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc82db3f2..3d5df8b02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,8 @@ _Breaking developer changes, which may affect downstream projects or sites that * Prevent certain tag values from corrupting css classes when they contain whitespaces ([#9637], thanks [@k-yle]) #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) -* Add Address and Phone Format for India ([#9482], thanks [@biswajit-k]) +* Add Address and Phone format for India ([#9482], thanks [@biswajit-k]) +* Add Address format for the Philippines ([#9482], thanks [@bryceco]) #### :hourglass: Performance #### :mortar_board: Walkthrough / Help #### :rocket: Presets @@ -62,7 +63,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Render "right-side" arrows for features with lifecycle prefixes ([#9493], thanks [@k-yle]) * Render "right-side" arrows for `man_made=quay` features #### :hammer: Development -* Upgrade dependencies: `fortawesome` to v6.4, `which-polygon` to v2.2.1, `glob` to v9.2, `temaki` to v5.3, `marked` to v4.3, `core-js-bundle` to v3.30 +* Upgrade dependencies: `fortawesome` to v6.4, `which-polygon` to v2.2.1, `glob` to v9.2, `temaki` to v5.4, `marked` to v4.3, `core-js-bundle` to v3.30, `osm-auth` to v2.1 * Bundle `package-lock.json` file in repository for faster `clean-install` builds * Build icons from configured presets source and also process field value `icons` in `npm run build:data` @@ -73,11 +74,13 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9493]: https://github.com/openstreetmap/iD/pull/9493 [#9520]: https://github.com/openstreetmap/iD/pull/9520 [#9501]: https://github.com/openstreetmap/iD/pull/9501 +[#9630]: https://github.com/openstreetmap/iD/pull/9630 [#9637]: https://github.com/openstreetmap/iD/pull/9637 [#9638]: https://github.com/openstreetmap/iD/pull/9638 [#9640]: https://github.com/openstreetmap/iD/issues/9640 [#9650]: https://github.com/openstreetmap/iD/pull/9650 [@biswajit-k]: https://github.com/biswajit-k +[@bryceco]: https://github.com/bryceco # 2.25.2 From 43784e2eff766577b0bb39d5f2010c0d8f968903 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 19:19:09 +0200 Subject: [PATCH 48/65] take entity loc into account when resolving fields via parent preset, fixes #9524 this necessary when a regional preset (e.g. from NSI) is supposed to inherit fields from a parent preset, but the direct parent does NOT apply at the location of the entity to be added/edited. In that case we need to search for a potential regional variant of the parent preset. --- CHANGELOG.md | 4 ++- modules/actions/change_preset.js | 7 ++--- modules/modes/add_area.js | 14 +++++----- modules/modes/add_line.js | 13 +++++---- modules/modes/add_point.js | 18 ++++++++----- modules/presets/index.js | 3 --- modules/presets/preset.js | 40 +++++++++++++++++----------- modules/ui/fields/localized.js | 2 +- modules/ui/sections/preset_fields.js | 10 +++++-- 9 files changed, 68 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d5df8b02..52125745d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :rocket: Presets * Render "oneway" arrows for features with `waterway=pressurized`, `waterway=spillway`, `seamark:type=two-way_route` or `seamark:type=recommended_traffic_lane` ([#9492], thanks [@k-yle]) * Render "right-side" arrows for features with lifecycle prefixes ([#9493], thanks [@k-yle]) +* Take regional variants of parent presets into account when resolving preset fields ([#9524]) * Render "right-side" arrows for `man_made=quay` features #### :hammer: Development * Upgrade dependencies: `fortawesome` to v6.4, `which-polygon` to v2.2.1, `glob` to v9.2, `temaki` to v5.4, `marked` to v4.3, `core-js-bundle` to v3.30, `osm-auth` to v2.1 @@ -72,8 +73,9 @@ _Breaking developer changes, which may affect downstream projects or sites that [#9483]: https://github.com/openstreetmap/iD/pull/9483 [#9492]: https://github.com/openstreetmap/iD/pull/9492 [#9493]: https://github.com/openstreetmap/iD/pull/9493 -[#9520]: https://github.com/openstreetmap/iD/pull/9520 [#9501]: https://github.com/openstreetmap/iD/pull/9501 +[#9520]: https://github.com/openstreetmap/iD/pull/9520 +[#9524]: https://github.com/openstreetmap/iD/issues/9524 [#9630]: https://github.com/openstreetmap/iD/pull/9630 [#9637]: https://github.com/openstreetmap/iD/pull/9637 [#9638]: https://github.com/openstreetmap/iD/pull/9638 diff --git a/modules/actions/change_preset.js b/modules/actions/change_preset.js index 13f02596e..09bd4e3f3 100644 --- a/modules/actions/change_preset.js +++ b/modules/actions/change_preset.js @@ -3,6 +3,7 @@ export function actionChangePreset(entityID, oldPreset, newPreset, skipFieldDefa var entity = graph.entity(entityID); var geometry = entity.geometry(graph); var tags = entity.tags; + const loc = entity.extent(graph).center(); // preserve tags that the new preset might care about, if any var preserveKeys; @@ -15,14 +16,14 @@ export function actionChangePreset(entityID, oldPreset, newPreset, skipFieldDefa // only if old preset is not a sub-preset of the new one: // preserve tags for which the new preset has a field // https://github.com/openstreetmap/iD/issues/9372 - newPreset.fields().concat(newPreset.moreFields()) + newPreset.fields(loc).concat(newPreset.moreFields(loc)) .filter(f => f.matchGeometry(geometry)) .map(f => f.key).filter(Boolean) .forEach(key => preserveKeys.push(key)); } } - if (oldPreset) tags = oldPreset.unsetTags(tags, geometry, preserveKeys); - if (newPreset) tags = newPreset.setTags(tags, geometry, skipFieldDefaults); + if (oldPreset) tags = oldPreset.unsetTags(tags, geometry, preserveKeys, loc); + if (newPreset) tags = newPreset.setTags(tags, geometry, skipFieldDefaults, loc); return graph.replace(entity.update({tags: tags})); }; diff --git a/modules/modes/add_area.js b/modules/modes/add_area.js index b253d425f..7932feec0 100644 --- a/modules/modes/add_area.js +++ b/modules/modes/add_area.js @@ -15,9 +15,11 @@ export function modeAddArea(context, mode) { .on('startFromWay', startFromWay) .on('startFromNode', startFromNode); - var defaultTags = { area: 'yes' }; - if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'area'); - + function defaultTags(loc) { + var defaultTags = { area: 'yes' }; + if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'area', false, loc); + return defaultTags; + } function actionClose(wayId) { return function (graph) { @@ -29,7 +31,7 @@ export function modeAddArea(context, mode) { function start(loc) { var startGraph = context.graph(); var node = osmNode({ loc: loc }); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(loc) }); context.perform( actionAddEntity(node), @@ -45,7 +47,7 @@ export function modeAddArea(context, mode) { function startFromWay(loc, edge) { var startGraph = context.graph(); var node = osmNode({ loc: loc }); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(loc) }); context.perform( actionAddEntity(node), @@ -61,7 +63,7 @@ export function modeAddArea(context, mode) { function startFromNode(node) { var startGraph = context.graph(); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(node.loc) }); context.perform( actionAddEntity(way), diff --git a/modules/modes/add_line.js b/modules/modes/add_line.js index 42e9d5db9..426f4ce4b 100644 --- a/modules/modes/add_line.js +++ b/modules/modes/add_line.js @@ -15,14 +15,17 @@ export function modeAddLine(context, mode) { .on('startFromWay', startFromWay) .on('startFromNode', startFromNode); - var defaultTags = {}; - if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'line'); + function defaultTags(loc) { + var defaultTags = {}; + if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'line', false, loc); + return defaultTags; + } function start(loc) { var startGraph = context.graph(); var node = osmNode({ loc: loc }); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(loc) }); context.perform( actionAddEntity(node), @@ -37,7 +40,7 @@ export function modeAddLine(context, mode) { function startFromWay(loc, edge) { var startGraph = context.graph(); var node = osmNode({ loc: loc }); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(loc) }); context.perform( actionAddEntity(node), @@ -52,7 +55,7 @@ export function modeAddLine(context, mode) { function startFromNode(node) { var startGraph = context.graph(); - var way = osmWay({ tags: defaultTags }); + var way = osmWay({ tags: defaultTags(node.loc) }); context.perform( actionAddEntity(way), diff --git a/modules/modes/add_point.js b/modules/modes/add_point.js index 3ad4a301b..deff506a9 100644 --- a/modules/modes/add_point.js +++ b/modules/modes/add_point.js @@ -19,12 +19,15 @@ export function modeAddPoint(context, mode) { .on('cancel', cancel) .on('finish', cancel); - var defaultTags = {}; - if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'point'); + function defaultTags(loc) { + var defaultTags = {}; + if (mode.preset) defaultTags = mode.preset.setTags(defaultTags, 'point', false, loc); + return defaultTags; + } function add(loc) { - var node = osmNode({ loc: loc, tags: defaultTags }); + var node = osmNode({ loc: loc, tags: defaultTags(loc) }); context.perform( actionAddEntity(node), @@ -36,7 +39,7 @@ export function modeAddPoint(context, mode) { function addWay(loc, edge) { - var node = osmNode({ tags: defaultTags }); + var node = osmNode({ tags: defaultTags(loc) }); context.perform( actionAddMidpoint({loc: loc, edge: edge}, node), @@ -54,14 +57,15 @@ export function modeAddPoint(context, mode) { function addNode(node) { - if (Object.keys(defaultTags).length === 0) { + const _defaultTags = defaultTags(node.loc); + if (Object.keys(_defaultTags).length === 0) { enterSelectMode(node); return; } var tags = Object.assign({}, node.tags); // shallow copy - for (var key in defaultTags) { - tags[key] = defaultTags[key]; + for (var key in _defaultTags) { + tags[key] = _defaultTags[key]; } context.perform( diff --git a/modules/presets/index.js b/modules/presets/index.js index 8996aae12..2caf97549 100644 --- a/modules/presets/index.js +++ b/modules/presets/index.js @@ -163,9 +163,6 @@ export function presetIndex() { // Rebuild universal fields array _universal = Object.values(_fields).filter(field => field.universal); - // Reset all the preset fields - they'll need to be resolved again - Object.values(_presets).forEach(preset => preset.resetFields()); - // Rebuild geometry index _geometryIndex = { point: {}, vertex: {}, line: {}, area: {}, relation: {} }; _this.collection.forEach(preset => { diff --git a/modules/presets/preset.js b/modules/presets/preset.js index fbf3b841f..57a0c8b6b 100644 --- a/modules/presets/preset.js +++ b/modules/presets/preset.js @@ -1,7 +1,10 @@ +import { isEqual } from 'lodash'; + import { t } from '../core/localizer'; import { osmAreaKeys, osmAreaKeysExceptions } from '../osm/tags'; import { utilArrayUniq, utilObjectOmit } from '../util'; import { utilSafeClassName } from '../util/util'; +import { locationManager } from '../core/LocationManager'; // @@ -13,8 +16,6 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { allPresets = allPresets || {}; let _this = Object.assign({}, preset); // shallow copy let _addable = addable || false; - let _resolvedFields; // cache - let _resolvedMoreFields; // cache let _searchName; // cache let _searchNameStripped; // cache let _searchAliases; // cache @@ -40,11 +41,9 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { _this.originalMoreFields = (_this.moreFields || []); - _this.fields = () => _resolvedFields || (_resolvedFields = resolveFields('fields')); + _this.fields = loc => resolveFields('fields', loc); - _this.moreFields = () => _resolvedMoreFields || (_resolvedMoreFields = resolveFields('moreFields')); - - _this.resetFields = () => _resolvedFields = _resolvedMoreFields = null; + _this.moreFields = loc => resolveFields('moreFields', loc); _this.tags = _this.tags || {}; @@ -219,13 +218,13 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { }; - _this.unsetTags = (tags, geometry, ignoringKeys, skipFieldDefaults) => { + _this.unsetTags = (tags, geometry, ignoringKeys, skipFieldDefaults, loc) => { // allow manually keeping some tags let removeTags = ignoringKeys ? utilObjectOmit(_this.removeTags, ignoringKeys) : _this.removeTags; tags = utilObjectOmit(tags, Object.keys(removeTags)); if (geometry && !skipFieldDefaults) { - _this.fields().forEach(field => { + _this.fields(loc).forEach(field => { if (field.matchGeometry(geometry) && field.key && field.default === tags[field.key] && (!ignoringKeys || ignoringKeys.indexOf(field.key) === -1)) { @@ -239,7 +238,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { }; - _this.setTags = (tags, geometry, skipFieldDefaults) => { + _this.setTags = (tags, geometry, skipFieldDefaults, loc) => { const addTags = _this.addTags; tags = Object.assign({}, tags); // shallow copy @@ -277,7 +276,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { } if (geometry && !skipFieldDefaults) { - _this.fields().forEach(field => { + _this.fields(loc).forEach(field => { if (field.matchGeometry(geometry) && field.key && !tags[field.key] && field.default) { tags[field.key] = field.default; } @@ -290,14 +289,14 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { // For a preset without fields, use the fields of the parent preset. // Replace {preset} placeholders with the fields of the specified presets. - function resolveFields(which) { + function resolveFields(which, loc) { const fieldIDs = (which === 'fields' ? _this.originalFields : _this.originalMoreFields); let resolved = []; fieldIDs.forEach(fieldID => { const match = fieldID.match(referenceRegex); if (match !== null) { // a presetID wrapped in braces {} - resolved = resolved.concat(inheritFields(match[1], which)); + resolved = resolved.concat(inheritFields(allPresets[match[1]], which)); } else if (allFields[fieldID]) { // a normal fieldID resolved.push(allFields[fieldID]); } else { @@ -310,7 +309,19 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { const endIndex = _this.id.lastIndexOf('/'); const parentID = endIndex && _this.id.substring(0, endIndex); if (parentID) { - resolved = inheritFields(parentID, which); + let parent = allPresets[parentID]; + if (loc) { + const validHere = locationManager.locationSetsAt(loc); + if (!validHere[parent.locationSetID]) { + // this is a preset for which a regional variant of the main preset exists + const candidateIDs = Object.keys(allPresets).filter(k => k.startsWith(parentID)); + parent = allPresets[candidateIDs.find(candidateID => { + const candidate = allPresets[candidateID]; + return validHere[candidate.locationSetID] && isEqual(candidate.tags, parent.tags); + })]; + } + } + resolved = inheritFields(parent, which); } } @@ -318,8 +329,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { // returns an array of fields to inherit from the given presetID, if found - function inheritFields(presetID, which) { - const parent = allPresets[presetID]; + function inheritFields(parent, which) { if (!parent) return []; if (which === 'fields') { diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index 631475823..8726ce8c5 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -96,7 +96,7 @@ export function uiFieldLocalized(field, context) { var preset = presetManager.match(entity, context.graph()); if (preset) { var isSuggestion = preset.suggestion; - var fields = preset.fields(); + var fields = preset.fields(entity.extent(context.graph()).center()); var showsBrandField = fields.some(function(d) { return d.id === 'brand'; }); var showsOperatorField = fields.some(function(d) { return d.id === 'operator'; }); var setsName = preset.addTags.name; diff --git a/modules/ui/sections/preset_fields.js b/modules/ui/sections/preset_fields.js index c694c4b58..4b11edbc4 100644 --- a/modules/ui/sections/preset_fields.js +++ b/modules/ui/sections/preset_fields.js @@ -4,6 +4,7 @@ import { presetManager } from '../../presets'; import { t, localizer } from '../../core/localizer'; import { utilArrayIdentical } from '../../util/array'; import { utilArrayUnion, utilRebind } from '../../util'; +import { geoExtent } from '../../geo/extent'; import { uiField } from '../field'; import { uiFormFields } from '../form_fields'; import { uiSection } from '../section'; @@ -32,6 +33,11 @@ export function uiSectionPresetFields(context) { return geoms; }, {})); + const loc = _entityIDs.reduce(function(extent, entityID) { + var entity = context.graph().entity(entityID); + return extent.extend(entity.extent(context.graph())); + }, geoExtent()).center(); + var presetsManager = presetManager; var allFields = []; @@ -39,8 +45,8 @@ export function uiSectionPresetFields(context) { var sharedTotalFields; _presets.forEach(function(preset) { - var fields = preset.fields(); - var moreFields = preset.moreFields(); + var fields = preset.fields(loc); + var moreFields = preset.moreFields(loc); allFields = utilArrayUnion(allFields, fields); allMoreFields = utilArrayUnion(allMoreFields, moreFields); From 5d80bbc6c3c1b278d96a19a1bbe768d58bde5981 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 12:01:37 +0200 Subject: [PATCH 49/65] Bump esbuild from 0.17.18 to 0.17.19 (#9661) Bumps [esbuild](https://github.com/evanw/esbuild) from 0.17.18 to 0.17.19. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.17.18...v0.17.19) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 366 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 184 insertions(+), 184 deletions(-) diff --git a/package-lock.json b/package-lock.json index 727bcc176..216da6cc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,7 @@ "d3": "~7.8.4", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", - "esbuild": "^0.17.18", + "esbuild": "^0.17.19", "esbuild-visualizer": "^0.4.0", "eslint": "^8.41.0", "fetch-mock": "^9.11.0", @@ -488,9 +488,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "cpu": [ "arm" ], @@ -504,9 +504,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "cpu": [ "arm64" ], @@ -520,9 +520,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "cpu": [ "x64" ], @@ -536,9 +536,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "cpu": [ "arm64" ], @@ -552,9 +552,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "cpu": [ "x64" ], @@ -568,9 +568,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "cpu": [ "arm64" ], @@ -584,9 +584,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "cpu": [ "x64" ], @@ -600,9 +600,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "cpu": [ "arm" ], @@ -616,9 +616,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "cpu": [ "arm64" ], @@ -632,9 +632,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "cpu": [ "ia32" ], @@ -648,9 +648,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "cpu": [ "loong64" ], @@ -664,9 +664,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "cpu": [ "mips64el" ], @@ -680,9 +680,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "cpu": [ "ppc64" ], @@ -696,9 +696,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "cpu": [ "riscv64" ], @@ -712,9 +712,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "cpu": [ "s390x" ], @@ -728,9 +728,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "cpu": [ "x64" ], @@ -744,9 +744,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "cpu": [ "x64" ], @@ -760,9 +760,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "cpu": [ "x64" ], @@ -776,9 +776,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "cpu": [ "x64" ], @@ -792,9 +792,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "cpu": [ "arm64" ], @@ -808,9 +808,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "cpu": [ "ia32" ], @@ -824,9 +824,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "cpu": [ "x64" ], @@ -3542,9 +3542,9 @@ } }, "node_modules/esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "hasInstallScript": true, "bin": { @@ -3554,28 +3554,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "node_modules/esbuild-visualizer": { @@ -10119,156 +10119,156 @@ } }, "@esbuild/android-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", - "integrity": "sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz", - "integrity": "sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.18.tgz", - "integrity": "sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz", - "integrity": "sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz", - "integrity": "sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz", - "integrity": "sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz", - "integrity": "sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz", - "integrity": "sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz", - "integrity": "sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", + "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz", - "integrity": "sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz", - "integrity": "sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz", - "integrity": "sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz", - "integrity": "sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz", - "integrity": "sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz", - "integrity": "sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz", - "integrity": "sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz", - "integrity": "sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz", - "integrity": "sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz", - "integrity": "sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz", - "integrity": "sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz", - "integrity": "sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz", - "integrity": "sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", "dev": true, "optional": true }, @@ -12156,33 +12156,33 @@ } }, "esbuild": { - "version": "0.17.18", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.18.tgz", - "integrity": "sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==", + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", "dev": true, "requires": { - "@esbuild/android-arm": "0.17.18", - "@esbuild/android-arm64": "0.17.18", - "@esbuild/android-x64": "0.17.18", - "@esbuild/darwin-arm64": "0.17.18", - "@esbuild/darwin-x64": "0.17.18", - "@esbuild/freebsd-arm64": "0.17.18", - "@esbuild/freebsd-x64": "0.17.18", - "@esbuild/linux-arm": "0.17.18", - "@esbuild/linux-arm64": "0.17.18", - "@esbuild/linux-ia32": "0.17.18", - "@esbuild/linux-loong64": "0.17.18", - "@esbuild/linux-mips64el": "0.17.18", - "@esbuild/linux-ppc64": "0.17.18", - "@esbuild/linux-riscv64": "0.17.18", - "@esbuild/linux-s390x": "0.17.18", - "@esbuild/linux-x64": "0.17.18", - "@esbuild/netbsd-x64": "0.17.18", - "@esbuild/openbsd-x64": "0.17.18", - "@esbuild/sunos-x64": "0.17.18", - "@esbuild/win32-arm64": "0.17.18", - "@esbuild/win32-ia32": "0.17.18", - "@esbuild/win32-x64": "0.17.18" + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" } }, "esbuild-visualizer": { diff --git a/package.json b/package.json index ec3692ffb..fc3010c36 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "d3": "~7.8.4", "dotenv": "^16.0.3", "editor-layer-index": "github:osmlab/editor-layer-index#gh-pages", - "esbuild": "^0.17.18", + "esbuild": "^0.17.19", "esbuild-visualizer": "^0.4.0", "eslint": "^8.41.0", "fetch-mock": "^9.11.0", From cc768b115b9c8b62bba72c08f2da3ece278a72ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 12:01:54 +0200 Subject: [PATCH 50/65] Bump node-fetch from 2.6.9 to 2.6.11 (#9658) Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.9 to 2.6.11. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.9...v2.6.11) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 216da6cc3..dc6a71a31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,7 @@ "minimist": "^1.2.8", "mocha": "^10.2.0", "name-suggestion-index": "~6.0", - "node-fetch": "^2.6.9", + "node-fetch": "^2.6.11", "npm-run-all": "^4.0.0", "osm-community-index": "~5.5.2", "postcss": "^8.4.23", @@ -6527,9 +6527,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "dev": true, "dependencies": { "whatwg-url": "^5.0.0" @@ -14178,9 +14178,9 @@ "version": "3.1.2" }, "node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", "dev": true, "requires": { "whatwg-url": "^5.0.0" diff --git a/package.json b/package.json index fc3010c36..4d7fdec40 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "minimist": "^1.2.8", "mocha": "^10.2.0", "name-suggestion-index": "~6.0", - "node-fetch": "^2.6.9", + "node-fetch": "^2.6.11", "npm-run-all": "^4.0.0", "osm-community-index": "~5.5.2", "postcss": "^8.4.23", From 71a2ab5c9d49f850e5d7099bf4f5ee61506b982f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 12:11:34 +0200 Subject: [PATCH 51/65] Bump marked from 4.3.0 to 5.0.2 (#9660) Bumps [marked](https://github.com/markedjs/marked) from 4.3.0 to 5.0.2. - [Release notes](https://github.com/markedjs/marked/releases) - [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json) - [Commits](https://github.com/markedjs/marked/compare/v4.3.0...v5.0.2) --- updated-dependencies: - dependency-name: marked dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index dc6a71a31..a1f77d8ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "fast-deep-equal": "~3.1.1", "fast-json-stable-stringify": "2.1.0", "lodash-es": "~4.17.15", - "marked": "~4.3.0", + "marked": "~5.0.2", "node-diff3": "~3.1.0", "osm-auth": "~2.1.0", "pannellum": "2.5.6", @@ -6056,14 +6056,14 @@ "license": "(MIT AND Zlib)" }, "node_modules/marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.2.tgz", + "integrity": "sha512-TXksm9GwqXCRNbFUZmMtqNLvy3K2cQHuWmyBDLOrY1e6i9UvZpOTJXoz7fBjYkJkaUFzV9hBFxMuZSyQt8R6KQ==", "bin": { "marked": "bin/marked.js" }, "engines": { - "node": ">= 12" + "node": ">= 18" } }, "node_modules/martinez-polygon-clipping": { @@ -13840,9 +13840,9 @@ } }, "marked": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", - "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-5.0.2.tgz", + "integrity": "sha512-TXksm9GwqXCRNbFUZmMtqNLvy3K2cQHuWmyBDLOrY1e6i9UvZpOTJXoz7fBjYkJkaUFzV9hBFxMuZSyQt8R6KQ==" }, "martinez-polygon-clipping": { "version": "0.7.3", diff --git a/package.json b/package.json index 4d7fdec40..ffebe8250 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "fast-deep-equal": "~3.1.1", "fast-json-stable-stringify": "2.1.0", "lodash-es": "~4.17.15", - "marked": "~4.3.0", + "marked": "~5.0.2", "node-diff3": "~3.1.0", "osm-auth": "~2.1.0", "pannellum": "2.5.6", From 7520c9b674006cc589828cc026ac64e9fbe76282 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 12:14:26 +0200 Subject: [PATCH 52/65] Bump @openstreetmap/id-tagging-schema from 6.0.0 to 6.2.0 (#9659) Bumps [@openstreetmap/id-tagging-schema](https://github.com/openstreetmap/id-tagging-schema) from 6.0.0 to 6.2.0. - [Release notes](https://github.com/openstreetmap/id-tagging-schema/releases) - [Changelog](https://github.com/openstreetmap/id-tagging-schema/blob/main/CHANGELOG.md) - [Commits](https://github.com/openstreetmap/id-tagging-schema/compare/v6.0.0...v6.2.0) --- updated-dependencies: - dependency-name: "@openstreetmap/id-tagging-schema" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1f77d8ae..69ab1ad13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "@fortawesome/free-regular-svg-icons": "~6.4.0", "@fortawesome/free-solid-svg-icons": "~6.4.0", "@mapbox/maki": "^8.0.1", - "@openstreetmap/id-tagging-schema": "^6.0.0", + "@openstreetmap/id-tagging-schema": "^6.2.0", "@rapideditor/temaki": "~5.4.0", "@transifex/api": "^5.2.0", "autoprefixer": "^10.4.14", @@ -1109,9 +1109,9 @@ } }, "node_modules/@openstreetmap/id-tagging-schema": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@openstreetmap/id-tagging-schema/-/id-tagging-schema-6.0.0.tgz", - "integrity": "sha512-/G7HoAQkNjqyDQy2Fb+Zg1fyWqFGGALhPEydk3yU3khnuqX0ORJC8Bsx8/U2ZIHZebba5VHoYFeouxyy3rOZRg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@openstreetmap/id-tagging-schema/-/id-tagging-schema-6.2.0.tgz", + "integrity": "sha512-v9AX9c7KXqxNDIDpK7XLjvQsOWA8GHXghF7hBzXdOkpkh117PoRKwh9LwN284fbw/WKGh/jBun+6nsCOsp3vVQ==", "dev": true }, "node_modules/@rapideditor/country-coder": { @@ -10456,9 +10456,9 @@ } }, "@openstreetmap/id-tagging-schema": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@openstreetmap/id-tagging-schema/-/id-tagging-schema-6.0.0.tgz", - "integrity": "sha512-/G7HoAQkNjqyDQy2Fb+Zg1fyWqFGGALhPEydk3yU3khnuqX0ORJC8Bsx8/U2ZIHZebba5VHoYFeouxyy3rOZRg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@openstreetmap/id-tagging-schema/-/id-tagging-schema-6.2.0.tgz", + "integrity": "sha512-v9AX9c7KXqxNDIDpK7XLjvQsOWA8GHXghF7hBzXdOkpkh117PoRKwh9LwN284fbw/WKGh/jBun+6nsCOsp3vVQ==", "dev": true }, "@rapideditor/country-coder": { diff --git a/package.json b/package.json index ffebe8250..91cf5029b 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@fortawesome/free-solid-svg-icons": "~6.4.0", "@rapideditor/temaki": "~5.4.0", "@mapbox/maki": "^8.0.1", - "@openstreetmap/id-tagging-schema": "^6.0.0", + "@openstreetmap/id-tagging-schema": "^6.2.0", "@transifex/api": "^5.2.0", "autoprefixer": "^10.4.14", "chai": "^4.3.7", From a18de6b5c3d81c248b039e36582dfbc52762251d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 May 2023 12:55:00 +0200 Subject: [PATCH 53/65] Bump cldr-core and cldr-localenames-full (#9662) Bumps [cldr-core](https://github.com/unicode-cldr/cldr-json) and [cldr-localenames-full](https://github.com/unicode-cldr/cldr-json). These dependencies needed to be updated together. Updates `cldr-core` from 41.0.0 to 43.0.0 - [Release notes](https://github.com/unicode-cldr/cldr-json/releases) - [Commits](https://github.com/unicode-cldr/cldr-json/compare/41.0.0...43.0.0) Updates `cldr-localenames-full` from 41.0.0 to 43.0.0 - [Release notes](https://github.com/unicode-cldr/cldr-json/releases) - [Commits](https://github.com/unicode-cldr/cldr-json/compare/41.0.0...43.0.0) --- updated-dependencies: - dependency-name: cldr-core dependency-type: direct:development update-type: version-update:semver-major - dependency-name: cldr-localenames-full dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martin Raifer --- package-lock.json | 26 ++++++++++++++++---------- package.json | 4 ++-- scripts/language_names.js | 2 +- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69ab1ad13..59587160e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,8 +47,8 @@ "autoprefixer": "^10.4.14", "chai": "^4.3.7", "chalk": "^4.1.2", - "cldr-core": "^41.0.0", - "cldr-localenames-full": "^41.0.0", + "cldr-core": "^43.0.0", + "cldr-localenames-full": "^43.0.0", "concat-files": "^0.1.1", "d3": "~7.8.4", "dotenv": "^16.0.3", @@ -2250,16 +2250,18 @@ "license": "ISC" }, "node_modules/cldr-core": { - "version": "41.0.0", - "dev": true, - "license": "Unicode-DFS-2016" + "version": "43.0.0", + "resolved": "https://registry.npmjs.org/cldr-core/-/cldr-core-43.0.0.tgz", + "integrity": "sha512-dPsV6/yTve1tvK2tyOEVkcugOX1MjIWWOlT/IYcHN33IesBykFR5pzUBpKnco7wZxwNGe3+d3tOVQcN+7i9/iA==", + "dev": true }, "node_modules/cldr-localenames-full": { - "version": "41.0.0", + "version": "43.0.0", + "resolved": "https://registry.npmjs.org/cldr-localenames-full/-/cldr-localenames-full-43.0.0.tgz", + "integrity": "sha512-sTO3eShh8mUhoGf7SQAw/LPR/SSWVrK2jnolhkVr3zKaeBgXyLjAeXTjKdPq9uYXmnV9E5RXDdvfyz6Huf3tYA==", "dev": true, - "license": "Unicode-DFS-2016", "peerDependencies": { - "cldr-core": "41.0.0" + "cldr-core": "43.0.0" } }, "node_modules/cliui": { @@ -11247,11 +11249,15 @@ "version": "2.2.0" }, "cldr-core": { - "version": "41.0.0", + "version": "43.0.0", + "resolved": "https://registry.npmjs.org/cldr-core/-/cldr-core-43.0.0.tgz", + "integrity": "sha512-dPsV6/yTve1tvK2tyOEVkcugOX1MjIWWOlT/IYcHN33IesBykFR5pzUBpKnco7wZxwNGe3+d3tOVQcN+7i9/iA==", "dev": true }, "cldr-localenames-full": { - "version": "41.0.0", + "version": "43.0.0", + "resolved": "https://registry.npmjs.org/cldr-localenames-full/-/cldr-localenames-full-43.0.0.tgz", + "integrity": "sha512-sTO3eShh8mUhoGf7SQAw/LPR/SSWVrK2jnolhkVr3zKaeBgXyLjAeXTjKdPq9uYXmnV9E5RXDdvfyz6Huf3tYA==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index 91cf5029b..1cb83b38e 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ "autoprefixer": "^10.4.14", "chai": "^4.3.7", "chalk": "^4.1.2", - "cldr-core": "^41.0.0", - "cldr-localenames-full": "^41.0.0", + "cldr-core": "^43.0.0", + "cldr-localenames-full": "^43.0.0", "concat-files": "^0.1.1", "d3": "~7.8.4", "dotenv": "^16.0.3", diff --git a/scripts/language_names.js b/scripts/language_names.js index 680ff3731..8bce6e959 100644 --- a/scripts/language_names.js +++ b/scripts/language_names.js @@ -67,7 +67,7 @@ function getLangNamesInNativeLang() { let langDirectoryPaths = fs.readdirSync(cldrMainDir); langDirectoryPaths.forEach(code => { let languagesPath = `${cldrMainDir}${code}/languages.json`; - //if (!fs.existsSync(languagesPath)) return; + if (!fs.existsSync(languagesPath)) return; let languageObj = JSON.parse(fs.readFileSync(languagesPath, 'utf8')).main[code]; let identity = languageObj.identity; From 249771d747b96554b8d6e3b377933d597e5a37a1 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 13:10:06 +0200 Subject: [PATCH 54/65] fix variable declarations --- modules/ui/fields/input.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 84ac21494..a99ee3b19 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -409,13 +409,13 @@ export function uiFieldText(field, context) { var displayVal = val; if (field.type === 'number' && val) { - var vals = val.split(';'); - vals = vals.map(function(v) { + var numbers = val.split(';'); + numbers = numbers.map(function(v) { var num = parseLocaleFloat(v); const fractionDigits = countDecimalPlaces(v); return isFinite(num) ? clamped(num).toFixed(fractionDigits) : v; }); - val = vals.join(';'); + val = numbers.join(';'); } if (!onInput) utilGetSetValue(input, displayVal); t[field.key] = val || undefined; @@ -452,18 +452,18 @@ export function uiFieldText(field, context) { const vals = getVals(tags); const isMixed = vals.size > 1; - const val = vals.size === 1 ? [...vals][0] : ''; + var val = vals.size === 1 ? [...vals][0] : ''; if (field.type === 'number' && val) { - var vals = val.split(';'); - vals = vals.map(function(v) { + var numbers = val.split(';'); + numbers = numbers.map(function(v) { v = v.trim(); var num = Number(v); if (!isFinite(num)) return v; const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; return formatFloat(clamped(num), fractionDigits); }); - val = vals.join(';'); + val = numbers.join(';'); } utilGetSetValue(input, val) .attr('title', isMixed ? [...vals].join('\n') : undefined) From 6d01c05f76363213605fbaa2da42ecc0a02471a4 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 13:39:31 +0200 Subject: [PATCH 55/65] allow numbers to be input in "raw" format --- modules/ui/fields/input.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index a99ee3b19..e6b409ccf 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -411,6 +411,10 @@ export function uiFieldText(field, context) { if (field.type === 'number' && val) { var numbers = val.split(';'); numbers = numbers.map(function(v) { + if (/^\d+\.\d{1}$/.test(v)) { + // ignore numbers entered in "raw" format + return v; + } var num = parseLocaleFloat(v); const fractionDigits = countDecimalPlaces(v); return isFinite(num) ? clamped(num).toFixed(fractionDigits) : v; From b266ec57ad4cf07fcbda269c1c08cd00d6be526e Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 15:00:10 +0200 Subject: [PATCH 56/65] treat "empty" numbers in semicolon separated "list" as invalid --- modules/ui/fields/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index e6b409ccf..51b83b647 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -463,7 +463,7 @@ export function uiFieldText(field, context) { numbers = numbers.map(function(v) { v = v.trim(); var num = Number(v); - if (!isFinite(num)) return v; + if (!isFinite(num) || v === '') return v; const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; return formatFloat(clamped(num), fractionDigits); }); From 14c752548d2899b7411fcc8480ce3e2784df1253 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 17:59:04 +0200 Subject: [PATCH 57/65] keep cursor at edit position while typing in the middle --- CHANGELOG.md | 2 ++ modules/util/get_set_value.js | 12 ++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52125745d..c83345c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Properly handle case sensitive tag values in taginfo suggestions in raw tag editor ([#9640]) * Fix dysfunctional autocomplete of wikidata fields for some languages with country-codes ([#9638]) * Prevent certain tag values from corrupting css classes when they contain whitespaces ([#9637], thanks [@k-yle]) +* Don't move the cursor to the end of (some) input fields while editing in the middle ([#9233]) #### :earth_asia: Localization * Send `Accept-Language` header on Nominatim API calls ([#9501], thanks [@k-yle]) * Add Address and Phone format for India ([#9482], thanks [@biswajit-k]) @@ -69,6 +70,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Build icons from configured presets source and also process field value `icons` in `npm run build:data` [#7427]: https://github.com/openstreetmap/iD/issues/7427 +[#9233]: https://github.com/openstreetmap/iD/issues/9233 [#9482]: https://github.com/openstreetmap/iD/pull/9482 [#9483]: https://github.com/openstreetmap/iD/pull/9483 [#9492]: https://github.com/openstreetmap/iD/pull/9492 diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index 486a3902e..305ae5aad 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -2,7 +2,7 @@ // which can result in layout/repaint thrashing in some situations. /** @returns {string} */ export function utilGetSetValue(selection, value) { - function d3_selection_value(value) { + function setValue(value) { function valueNull() { delete this.value; } @@ -27,9 +27,17 @@ export function utilGetSetValue(selection, value) { ? valueFunction : valueConstant); } + function stickyCursor(func) { + return function() { + const cursor = { start: this.selectionStart, end: this.selectionEnd }; + func.apply(this, arguments); + this.setSelectionRange(cursor.start, cursor.end); + } + } + if (arguments.length === 1) { return selection.property('value'); } - return selection.each(d3_selection_value(value)); + return selection.each(stickyCursor(setValue(value))); } From e0f11af2b253c6ad5290f016ad4a312d30c178c7 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 18:38:16 +0200 Subject: [PATCH 58/65] also allow "raw" numbers to be input in numeric fields when a user enters a decimal number using the "international"/English/OSM-raw-data formatting (e.g. as in `0.5`), it is parsed using the basic, non-localized, number parser. In such cases, the content of the input field should not be overwritten with the localized formatting, as that would cause unexpected glitches and make editing harder (e.g. when thousands-grouping characters seemingly "magically" disappear or appear while typing). see https://github.com/openstreetmap/iD/pull/8769/#pullrequestreview-1324246437 ff. --- modules/ui/fields/input.js | 42 ++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 51b83b647..b5f48049a 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -35,6 +35,7 @@ export function uiFieldText(field, context) { const formatFloat = localizer.floatFormatter(localizer.languageCode()); const parseLocaleFloat = localizer.floatParser(localizer.languageCode()); const countDecimalPlaces = localizer.decimalPlaceCounter(localizer.languageCode()); + const likelyRawNumberFormat = /^-?(0\.\d*|\d*\.\d{0,2}(\d{4,})?|\d{4,}\.\d{3})$/; if (field.type === 'tel') { fileFetcher.get('phone_formats') @@ -136,7 +137,8 @@ export function uiFieldText(field, context) { var vals = raw_vals.split(';'); vals = vals.map(function(v) { v = v.trim(); - var num = parseLocaleFloat(v); + const isRawNumber = likelyRawNumberFormat.test(v); + var num = isRawNumber ? parseFloat(v) : parseLocaleFloat(v); if (isDirectionField) { const compassDir = cardinal[v.toLowerCase()]; if (compassDir !== undefined) { @@ -156,7 +158,9 @@ export function uiFieldText(field, context) { num = ((num % 360) + 360) % 360; } // make sure no extra decimals are introduced - return formatFloat(clamped(num), countDecimalPlaces(v)); + return formatFloat(clamped(num), isRawNumber + ? (v.includes('.') ? v.split('.')[1].length : 0) + : countDecimalPlaces(v)); }); input.node().value = vals.join(';'); change()(); @@ -411,8 +415,8 @@ export function uiFieldText(field, context) { if (field.type === 'number' && val) { var numbers = val.split(';'); numbers = numbers.map(function(v) { - if (/^\d+\.\d{1}$/.test(v)) { - // ignore numbers entered in "raw" format + if (likelyRawNumberFormat.test(v)) { + // input number likely in "raw" format return v; } var num = parseLocaleFloat(v); @@ -457,19 +461,41 @@ export function uiFieldText(field, context) { const vals = getVals(tags); const isMixed = vals.size > 1; var val = vals.size === 1 ? [...vals][0] : ''; + var shouldUpdate = true; if (field.type === 'number' && val) { + // for number fields, we don't want to override the content of the + // input element with the same number using a different formatting + // (e.g. when entering "1234.5", this should not be reformatted to + // "1.234,5" which could otherwise cause the cursor to be in the + // wrong location after the change) + // but if the actual numeric value of the field has changed (e.g. + // by pressing the +/- buttons or using the raw tag editor), we + // can and should update the content of the input element. + shouldUpdate = false; var numbers = val.split(';'); - numbers = numbers.map(function(v) { + var oriNumbers = utilGetSetValue(input).split(';'); + if (numbers.length !== oriNumbers.length) shouldUpdate = true; + numbers = numbers.map(function(v, idx) { v = v.trim(); var num = Number(v); - if (!isFinite(num) || v === '') return v; + var oriNumber = oriNumbers[idx] || ''; + if (!isFinite(num) || v === '') { + if (v !== oriNumber) shouldUpdate = true; + return v; + } + oriNumber = likelyRawNumberFormat.test(oriNumber) ? parseFloat(oriNumber) : parseLocaleFloat(oriNumber); + if (num !== oriNumber) shouldUpdate = true; const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; - return formatFloat(clamped(num), fractionDigits); + return formatFloat(num, fractionDigits); }); val = numbers.join(';'); } - utilGetSetValue(input, val) + + if (shouldUpdate) { + utilGetSetValue(input, val); + } + input .attr('title', isMixed ? [...vals].join('\n') : undefined) .attr('placeholder', isMixed ? t('inspector.multiple_values') : (field.placeholder() || t('inspector.unknown'))) .classed('mixed', isMixed); From ee89f6ae6651f05008a7c2e88cebf1b6b1a46a4d Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 18:46:46 +0200 Subject: [PATCH 59/65] lint --- modules/util/get_set_value.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index 305ae5aad..ee9d5e0c5 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -32,7 +32,7 @@ export function utilGetSetValue(selection, value) { const cursor = { start: this.selectionStart, end: this.selectionEnd }; func.apply(this, arguments); this.setSelectionRange(cursor.start, cursor.end); - } + }; } if (arguments.length === 1) { From 2b64d703523a2856bd41b894dff9fcd5dc4bdc75 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 19:24:10 +0200 Subject: [PATCH 60/65] generalize implementation to skip input value update when contents are "equivalent" in a given context, e.g. for numeric values with potentially different formatting in number fields --- modules/ui/fields/input.js | 46 +++++++++++++++++------------------ modules/util/get_set_value.js | 14 +++++++---- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index b5f48049a..427265461 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -11,6 +11,7 @@ import { svgIcon } from '../../svg/icon'; import { cardinal } from '../../osm/node'; import { uiLengthIndicator } from '..'; import { uiTooltip } from '../tooltip'; +import { isEqual } from 'lodash-es'; export { uiFieldText as uiFieldColour, @@ -461,9 +462,20 @@ export function uiFieldText(field, context) { const vals = getVals(tags); const isMixed = vals.size > 1; var val = vals.size === 1 ? [...vals][0] : ''; - var shouldUpdate = true; + var shouldUpdate; if (field.type === 'number' && val) { + var numbers = val.split(';'); + var oriNumbers = utilGetSetValue(input).split(';'); + if (numbers.length !== oriNumbers.length) shouldUpdate = true; + numbers = numbers.map(function(v) { + v = v.trim(); + var num = Number(v); + if (!isFinite(num) || v === '') return v; + const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; + return formatFloat(num, fractionDigits); + }); + val = numbers.join(';'); // for number fields, we don't want to override the content of the // input element with the same number using a different formatting // (e.g. when entering "1234.5", this should not be reformatted to @@ -472,30 +484,18 @@ export function uiFieldText(field, context) { // but if the actual numeric value of the field has changed (e.g. // by pressing the +/- buttons or using the raw tag editor), we // can and should update the content of the input element. - shouldUpdate = false; - var numbers = val.split(';'); - var oriNumbers = utilGetSetValue(input).split(';'); - if (numbers.length !== oriNumbers.length) shouldUpdate = true; - numbers = numbers.map(function(v, idx) { - v = v.trim(); - var num = Number(v); - var oriNumber = oriNumbers[idx] || ''; - if (!isFinite(num) || v === '') { - if (v !== oriNumber) shouldUpdate = true; - return v; - } - oriNumber = likelyRawNumberFormat.test(oriNumber) ? parseFloat(oriNumber) : parseLocaleFloat(oriNumber); - if (num !== oriNumber) shouldUpdate = true; - const fractionDigits = v.includes('.') ? v.split('.')[1].length : 0; - return formatFloat(num, fractionDigits); - }); - val = numbers.join(';'); + shouldUpdate = (inputValue, setValue) => { + const inputNums = inputValue.split(';').map(setVal => + likelyRawNumberFormat.test(setVal) + ? parseFloat(setVal) + : parseLocaleFloat(setVal) + ); + const setNums = setValue.split(';').map(parseLocaleFloat); + return !isEqual(inputNums, setNums); + }; } - if (shouldUpdate) { - utilGetSetValue(input, val); - } - input + utilGetSetValue(input, val, shouldUpdate) .attr('title', isMixed ? [...vals].join('\n') : undefined) .attr('placeholder', isMixed ? t('inspector.multiple_values') : (field.placeholder() || t('inspector.unknown'))) .classed('mixed', isMixed); diff --git a/modules/util/get_set_value.js b/modules/util/get_set_value.js index ee9d5e0c5..597fa9b7c 100644 --- a/modules/util/get_set_value.js +++ b/modules/util/get_set_value.js @@ -1,14 +1,14 @@ // Like selection.property('value', ...), but avoids no-op value sets, // which can result in layout/repaint thrashing in some situations. /** @returns {string} */ -export function utilGetSetValue(selection, value) { - function setValue(value) { +export function utilGetSetValue(selection, value, shouldUpdate) { + function setValue(value, shouldUpdate) { function valueNull() { delete this.value; } function valueConstant() { - if (this.value !== value) { + if (shouldUpdate(this.value, value)) { this.value = value; } } @@ -17,7 +17,7 @@ export function utilGetSetValue(selection, value) { var x = value.apply(this, arguments); if (x === null || x === undefined) { delete this.value; - } else if (this.value !== x) { + } else if (shouldUpdate(this.value, x)) { this.value = x; } } @@ -39,5 +39,9 @@ export function utilGetSetValue(selection, value) { return selection.property('value'); } - return selection.each(stickyCursor(setValue(value))); + if (shouldUpdate === undefined) { + shouldUpdate = (a, b) => a !== b; + } + + return selection.each(stickyCursor(setValue(value, shouldUpdate))); } From 53f77fb852a46a1863a0b0b753adcaeb14bce73b Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 19:34:32 +0200 Subject: [PATCH 61/65] accept raw number input also for roadspeed/roadheight fields --- modules/ui/fields/input.js | 5 +++-- modules/ui/fields/roadheight.js | 9 +++++++-- modules/ui/fields/roadspeed.js | 5 ++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 427265461..aa8d55225 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -19,9 +19,11 @@ export { uiFieldText as uiFieldIdentifier, uiFieldText as uiFieldNumber, uiFieldText as uiFieldTel, - uiFieldText as uiFieldUrl + uiFieldText as uiFieldUrl, + likelyRawNumberFormat }; +const likelyRawNumberFormat = /^-?(0\.\d*|\d*\.\d{0,2}(\d{4,})?|\d{4,}\.\d{3})$/; export function uiFieldText(field, context) { var dispatch = d3_dispatch('change'); @@ -36,7 +38,6 @@ export function uiFieldText(field, context) { const formatFloat = localizer.floatFormatter(localizer.languageCode()); const parseLocaleFloat = localizer.floatParser(localizer.languageCode()); const countDecimalPlaces = localizer.decimalPlaceCounter(localizer.languageCode()); - const likelyRawNumberFormat = /^-?(0\.\d*|\d*\.\d{0,2}(\d{4,})?|\d{4,}\.\d{3})$/; if (field.type === 'tel') { fileFetcher.get('phone_formats') diff --git a/modules/ui/fields/roadheight.js b/modules/ui/fields/roadheight.js index edadaf2ea..612193073 100644 --- a/modules/ui/fields/roadheight.js +++ b/modules/ui/fields/roadheight.js @@ -5,6 +5,7 @@ import * as countryCoder from '@rapideditor/country-coder'; import { uiCombobox } from '../combobox'; import { t, localizer } from '../../core/localizer'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTotalExtent } from '../../util'; +import { likelyRawNumberFormat } from './input'; export function uiFieldRoadheight(field, context) { @@ -132,9 +133,13 @@ export function uiFieldRoadheight(field, context) { if (!primaryValue && !secondaryValue) { tag[field.key] = undefined; } else { - var rawPrimaryValue = parseLocaleFloat(primaryValue); + var rawPrimaryValue = likelyRawNumberFormat.test(primaryValue) + ? parseFloat(primaryValue) + : parseLocaleFloat(primaryValue); if (isNaN(rawPrimaryValue)) rawPrimaryValue = primaryValue; - var rawSecondaryValue = parseLocaleFloat(secondaryValue); + var rawSecondaryValue = likelyRawNumberFormat.test(secondaryValue) + ? parseFloat(secondaryValue) + : parseLocaleFloat(secondaryValue); if (isNaN(rawSecondaryValue)) rawSecondaryValue = secondaryValue; if (isNaN(rawPrimaryValue) || isNaN(rawSecondaryValue) || !_isImperial) { diff --git a/modules/ui/fields/roadspeed.js b/modules/ui/fields/roadspeed.js index 9f7f90a78..2b0ecc59c 100644 --- a/modules/ui/fields/roadspeed.js +++ b/modules/ui/fields/roadspeed.js @@ -5,6 +5,7 @@ import * as countryCoder from '@rapideditor/country-coder'; import { uiCombobox } from '../combobox'; import { t, localizer } from '../../core/localizer'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTotalExtent } from '../../util'; +import { likelyRawNumberFormat } from './input'; export function uiFieldRoadspeed(field, context) { @@ -109,7 +110,9 @@ export function uiFieldRoadspeed(field, context) { if (!value) { tag[field.key] = undefined; } else { - var rawValue = parseLocaleFloat(value); + var rawValue = likelyRawNumberFormat.test(value) + ? parseFloat(value) + : parseLocaleFloat(value); if (isNaN(rawValue)) rawValue = value; if (isNaN(rawValue) || !_isImperial) { tag[field.key] = context.cleanTagValue(rawValue); From ffab062ca0bf2e1822d92f6b07344042cf028354 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 19:37:32 +0200 Subject: [PATCH 62/65] update assets (`npm run all`) --- data/languages.json | 138 +++++++++++++++++++--------------- data/territory_languages.json | 63 ++++++++-------- 2 files changed, 108 insertions(+), 93 deletions(-) diff --git a/data/languages.json b/data/languages.json index a80a070dd..2bdfc3581 100644 --- a/data/languages.json +++ b/data/languages.json @@ -1,6 +1,6 @@ { "aa": {}, - "ab": {}, + "ab": {"nativeName": "Аԥсшәа"}, "ace": {}, "ach": {}, "ada": {}, @@ -18,12 +18,14 @@ "aln": {}, "alt": {}, "am": {"nativeName": "አማርኛ"}, - "an": {}, + "an": {"nativeName": "aragonés"}, "ang": {}, + "ann": {"nativeName": "Obolo"}, "anp": {}, + "apc": {"nativeName": "العامية"}, "ar": {"nativeName": "العربية"}, "arc": {}, - "arn": {}, + "arn": {"nativeName": "Mapudungun"}, "aro": {}, "arp": {}, "arq": {}, @@ -40,10 +42,13 @@ "awa": {}, "ay": {}, "az": {"nativeName": "azərbaycan"}, + "az-Arab": {"base": "az", "script": "Arab", "nativeName": "تۆرکجه"}, "az-Cyrl": {"base": "az", "script": "Cyrl"}, "az-Latn": {"base": "az", "script": "Latn"}, - "ba": {}, - "bal": {}, + "ba": {"nativeName": "башҡорт теле"}, + "bal": {"nativeName": "بلۆچی"}, + "bal-Arab": {"base": "bal", "script": "Arab"}, + "bal-Latn": {"base": "bal", "script": "Latn"}, "ban": {}, "bar": {}, "bas": {"nativeName": "Ɓàsàa"}, @@ -60,16 +65,17 @@ "bfq": {}, "bft": {"nativeName": "بلتی"}, "bg": {"nativeName": "български"}, - "bgn": {}, + "bgc": {"nativeName": "हरियाणवी"}, + "bgn": {"nativeName": "بلوچی (رخشانی)"}, "bha": {"nativeName": "भरीयाटी"}, - "bho": {}, + "bho": {"nativeName": "भोजपुरी"}, "bi": {}, "bik": {}, "bin": {}, "bjn": {}, "bkm": {}, "bla": {}, - "blt": {}, + "blt": {"nativeName": "ꪼꪕꪒꪾ"}, "bm": {"nativeName": "bamanakan"}, "bn": {"nativeName": "বাংলা"}, "bo": {"nativeName": "བོད་སྐད་"}, @@ -82,7 +88,7 @@ "bs": {"nativeName": "bosanski"}, "bs-Cyrl": {"base": "bs", "script": "Cyrl"}, "bs-Latn": {"base": "bs", "script": "Latn"}, - "bss": {}, + "bss": {"nativeName": "Akoose"}, "bua": {}, "bug": {}, "bum": {}, @@ -92,10 +98,10 @@ "cad": {}, "car": {}, "cay": {}, - "cch": {}, + "cch": {"nativeName": "Atsam"}, "ccp": {"nativeName": "𑄌𑄋𑄴𑄟𑄳𑄦"}, "ce": {"nativeName": "нохчийн"}, - "ceb": {"nativeName": "Binisaya"}, + "ceb": {"nativeName": "Cebuano"}, "cgg": {"nativeName": "Rukiga"}, "ch": {}, "chb": {}, @@ -103,14 +109,14 @@ "chk": {}, "chm": {}, "chn": {}, - "cho": {}, + "cho": {"nativeName": "Chahta"}, "chp": {}, "chr": {"nativeName": "ᏣᎳᎩ"}, "chy": {}, - "cic": {}, + "cic": {"nativeName": "Chikashshanompaʼ"}, "ckb": {"nativeName": "کوردیی ناوەندی"}, "clc": {}, - "co": {}, + "co": {"nativeName": "corsu"}, "cop": {}, "cps": {}, "cr": {}, @@ -126,7 +132,7 @@ "csb": {}, "csw": {}, "cu": {}, - "cv": {}, + "cv": {"nativeName": "чӑваш"}, "cwd": {}, "cy": {"nativeName": "Cymraeg"}, "da": {"nativeName": "dansk"}, @@ -156,8 +162,10 @@ "egy": {}, "eka": {}, "el": {"nativeName": "Ελληνικά"}, + "el-polyton": {}, "elx": {}, "en": {"nativeName": "English"}, + "en-Dsrt": {"base": "en", "script": "Dsrt"}, "enm": {}, "eo": {"nativeName": "esperanto"}, "es": {"nativeName": "español"}, @@ -183,12 +191,12 @@ "frm": {}, "fro": {}, "frp": {}, - "frr": {}, + "frr": {"nativeName": "Nordfriisk"}, "frs": {}, "fur": {"nativeName": "furlan"}, "fy": {"nativeName": "Frysk"}, "ga": {"nativeName": "Gaeilge"}, - "gaa": {}, + "gaa": {"nativeName": "Gã"}, "gag": {}, "gan": {}, "gay": {}, @@ -200,7 +208,7 @@ "gl": {"nativeName": "galego"}, "glk": {}, "gmh": {}, - "gn": {}, + "gn": {"nativeName": "avañe’ẽ"}, "goh": {}, "gom": {}, "gon": {}, @@ -223,12 +231,13 @@ "hdn": {}, "he": {"nativeName": "עברית"}, "hi": {"nativeName": "हिन्दी"}, - "hi-Latn": {"base": "en", "script": "Latn"}, + "hi-Latn": {"base": "en", "script": "Latn", "nativeName": "Hindi (Latin)"}, "hif": {}, "hil": {}, "hit": {}, "hmn": {}, - "hnj": {}, + "hnj": {"nativeName": "𞄀𞄄𞄰𞄩𞄍𞄜𞄰"}, + "hnj-Hmnp": {"base": "hnj", "script": "Hmnp"}, "ho": {}, "hr": {"nativeName": "hrvatski"}, "hsb": {"nativeName": "hornjoserbšćina"}, @@ -251,7 +260,7 @@ "ikt": {}, "ilo": {}, "inh": {}, - "io": {}, + "io": {"nativeName": "Ido"}, "is": {"nativeName": "íslenska"}, "it": {"nativeName": "italiano"}, "iu": {}, @@ -260,7 +269,7 @@ "ja-Hira": {"base": "ja", "script": "Hira"}, "ja-Latn": {"base": "ja", "script": "Latn"}, "jam": {}, - "jbo": {}, + "jbo": {"nativeName": "la .lojban."}, "jgo": {"nativeName": "Ndaꞌa"}, "jmc": {"nativeName": "Kimachame"}, "jpr": {}, @@ -271,15 +280,15 @@ "kaa": {}, "kab": {"nativeName": "Taqbaylit"}, "kac": {}, - "kaj": {}, + "kaj": {"nativeName": "Kaje"}, "kam": {"nativeName": "Kikamba"}, "kaw": {}, "kbd": {}, "kbl": {}, - "kcg": {}, + "kcg": {"nativeName": "Katab"}, "kde": {"nativeName": "Chimakonde"}, "kea": {"nativeName": "kabuverdianu"}, - "ken": {}, + "ken": {"nativeName": "Kɛnyaŋ"}, "kfo": {}, "kg": {}, "kgp": {"nativeName": "kanhgág"}, @@ -303,7 +312,7 @@ "koi": {}, "kok": {"nativeName": "कोंकणी"}, "kos": {}, - "kpe": {}, + "kpe": {"nativeName": "Kpɛlɛɛ"}, "kr": {}, "krc": {}, "kri": {}, @@ -333,7 +342,7 @@ "lfn": {}, "lg": {"nativeName": "Luganda"}, "li": {}, - "lij": {}, + "lij": {"nativeName": "ligure"}, "lil": {}, "liv": {}, "lkt": {"nativeName": "Lakȟólʼiyapi"}, @@ -344,6 +353,7 @@ "lou": {}, "loz": {}, "lrc": {"nativeName": "لۊری شومالی"}, + "lsm": {}, "lt": {"nativeName": "lietuvių"}, "ltg": {}, "lu": {"nativeName": "Tshiluba"}, @@ -364,7 +374,7 @@ "man": {}, "mas": {"nativeName": "Maa"}, "mde": {}, - "mdf": {}, + "mdf": {"nativeName": "мокшень кяль"}, "mdr": {}, "men": {}, "mer": {"nativeName": "Kĩmĩrũ"}, @@ -374,7 +384,7 @@ "mgh": {"nativeName": "Makua"}, "mgo": {"nativeName": "metaʼ"}, "mh": {}, - "mi": {"nativeName": "te reo Māori"}, + "mi": {"nativeName": "Māori"}, "mic": {}, "min": {}, "mk": {"nativeName": "македонски"}, @@ -383,21 +393,22 @@ "mnc": {}, "mni": {"nativeName": "মৈতৈলোন্"}, "mni-Beng": {"base": "mni", "script": "Beng"}, + "mni-Mtei": {"base": "mni", "script": "Mtei"}, "moe": {}, - "moh": {}, + "moh": {"nativeName": "Kanienʼkéha"}, "mos": {}, "mr": {"nativeName": "मराठी"}, "mrj": {}, "ms": {"nativeName": "Melayu"}, "mt": {"nativeName": "Malti"}, "mua": {"nativeName": "MUNDAŊ"}, - "mus": {}, + "mus": {"nativeName": "Mvskoke"}, "mwl": {}, "mwr": {}, "mwv": {}, "my": {"nativeName": "မြန်မာ"}, "mye": {}, - "myv": {}, + "myv": {"nativeName": "эрзянь кель"}, "mzn": {"nativeName": "مازرونی"}, "na": {}, "nan": {}, @@ -405,7 +416,7 @@ "naq": {"nativeName": "Khoekhoegowab"}, "nb": {"nativeName": "norsk bokmål"}, "nd": {"nativeName": "isiNdebele"}, - "nds": {"nativeName": "nds"}, + "nds": {}, "ne": {"nativeName": "नेपाली"}, "new": {}, "ng": {}, @@ -413,20 +424,20 @@ "niu": {}, "njo": {}, "nl": {"nativeName": "Nederlands"}, - "nmg": {"nativeName": "nmg"}, + "nmg": {}, "nn": {"nativeName": "norsk nynorsk"}, "nnh": {"nativeName": "Shwóŋò ngiembɔɔn"}, "no": {"nativeName": "norsk"}, "nog": {}, "non": {}, "nov": {}, - "nqo": {}, + "nqo": {"nativeName": "ߒߞߏ"}, "nr": {}, "nso": {}, "nus": {"nativeName": "Thok Nath"}, - "nv": {}, + "nv": {"nativeName": "Diné Bizaad"}, "nwc": {}, - "ny": {}, + "ny": {"nativeName": "Nyanja"}, "nym": {}, "nyn": {"nativeName": "Runyankore"}, "nyo": {}, @@ -442,13 +453,13 @@ "om": {"nativeName": "Oromoo"}, "or": {"nativeName": "ଓଡ଼ିଆ"}, "os": {"nativeName": "ирон"}, - "osa": {}, + "osa": {"nativeName": "𐓏𐓘𐓻𐓘𐓻𐓟"}, "ota": {}, "pa": {"nativeName": "ਪੰਜਾਬੀ"}, "pag": {}, "pal": {}, "pam": {}, - "pap": {}, + "pap": {"nativeName": "Papiamentu"}, "pau": {}, "pcd": {}, "pcm": {"nativeName": "Naijíriá Píjin"}, @@ -458,25 +469,27 @@ "pfl": {}, "phn": {}, "pi": {}, + "pis": {"nativeName": "Pijin"}, "pl": {"nativeName": "polski"}, "pms": {}, "pnb": {"nativeName": "پنجابی"}, "pnt": {}, "pon": {}, "pqm": {}, - "prg": {}, + "prg": {"nativeName": "prūsiskan"}, "pro": {}, "ps": {"nativeName": "پښتو"}, "pt": {"nativeName": "português"}, "qu": {"nativeName": "Runasimi"}, - "quc": {}, + "quc": {"nativeName": "Kʼicheʼ"}, "qug": {}, - "raj": {}, + "raj": {"nativeName": "राजस्थानी"}, "rap": {}, "rar": {}, "rgn": {}, - "rhg": {}, - "rif": {}, + "rhg": {"nativeName": "𐴌𐴗𐴥𐴝𐴙𐴚𐴒𐴙𐴝"}, + "rhg-Rohg": {"base": "rhg", "script": "Rohg"}, + "rif": {"nativeName": "Tarifit"}, "rm": {"nativeName": "rumantsch"}, "rn": {"nativeName": "Ikirundi"}, "ro": {"nativeName": "română"}, @@ -496,19 +509,20 @@ "saq": {"nativeName": "Kisampur"}, "sas": {}, "sat": {"nativeName": "ᱥᱟᱱᱛᱟᱲᱤ"}, + "sat-Deva": {"base": "sat", "script": "Deva"}, "sat-Olck": {"base": "sat", "script": "Olck"}, "saz": {}, "sba": {}, "sbp": {"nativeName": "Ishisangu"}, "sc": {"nativeName": "sardu"}, "scl": {"nativeName": "ݜݨیاٗ"}, - "scn": {}, + "scn": {"nativeName": "sicilianu"}, "sco": {}, "sd": {"nativeName": "سنڌي"}, "sd-Arab": {"base": "sd", "script": "Arab"}, "sd-Deva": {"base": "sd", "script": "Deva"}, "sdc": {}, - "sdh": {}, + "sdh": {"nativeName": "کوردی خوارگ"}, "se": {"nativeName": "davvisámegiella"}, "see": {}, "seh": {"nativeName": "sena"}, @@ -523,7 +537,7 @@ "shi": {"nativeName": "ⵜⴰⵛⵍⵃⵉⵜ"}, "shi-Latn": {"base": "shi", "script": "Latn"}, "shi-Tfng": {"base": "shi", "script": "Tfng"}, - "shn": {}, + "shn": {"nativeName": "တႆး"}, "shu": {}, "si": {"nativeName": "සිංහල"}, "sid": {}, @@ -534,10 +548,10 @@ "sli": {}, "sly": {}, "sm": {}, - "sma": {}, - "smj": {}, + "sma": {"nativeName": "Åarjelsaemien gïele"}, + "smj": {"nativeName": "julevsámegiella"}, "smn": {"nativeName": "anarâškielâ"}, - "sms": {}, + "sms": {"nativeName": "sääʹmǩiõll"}, "sn": {"nativeName": "chiShona"}, "snk": {}, "so": {"nativeName": "Soomaali"}, @@ -548,9 +562,9 @@ "sr-Latn": {"base": "sr", "script": "Latn"}, "srn": {}, "srr": {}, - "ss": {}, - "ssy": {}, - "st": {}, + "ss": {"nativeName": "siSwati"}, + "ssy": {"nativeName": "Saho"}, + "st": {"nativeName": "Sesotho"}, "stq": {}, "str": {}, "su": {"nativeName": "Basa Sunda"}, @@ -562,8 +576,8 @@ "sw": {"nativeName": "Kiswahili"}, "swb": {}, "syc": {}, - "syr": {}, - "szl": {}, + "syr": {"nativeName": "ܣܘܪܝܝܐ"}, + "szl": {"nativeName": "ślōnski"}, "ta": {"nativeName": "தமிழ்"}, "tce": {}, "tcy": {}, @@ -590,10 +604,11 @@ "tn": {}, "to": {"nativeName": "lea fakatonga"}, "tog": {}, - "tpi": {}, + "tok": {"nativeName": "Toki Pona"}, + "tpi": {"nativeName": "Tok Pisin"}, "tr": {"nativeName": "Türkçe"}, "tru": {}, - "trv": {}, + "trv": {"nativeName": "patas Taroko"}, "trw": {"nativeName": "توروالی"}, "ts": {}, "tsd": {}, @@ -613,7 +628,6 @@ "uga": {}, "uk": {"nativeName": "українська"}, "umb": {}, - "und": {"nativeName": "und"}, "ur": {"nativeName": "اردو"}, "uz": {"nativeName": "o‘zbek"}, "uz-Arab": {"base": "uz", "script": "Arab"}, @@ -623,7 +637,7 @@ "vai-Latn": {"base": "vai", "script": "Latn"}, "vai-Vaii": {"base": "vai", "script": "Vaii"}, "ve": {}, - "vec": {}, + "vec": {"nativeName": "Veneto"}, "vep": {}, "vi": {"nativeName": "Tiếng Việt"}, "vls": {}, @@ -632,17 +646,17 @@ "vot": {}, "vro": {}, "vun": {"nativeName": "Kyivunjo"}, - "wa": {}, + "wa": {"nativeName": "walon"}, "wae": {"nativeName": "Walser"}, "wal": {}, "war": {}, "was": {}, "wbl": {"nativeName": "وخی"}, - "wbp": {}, + "wbp": {"nativeName": "Warlpiri"}, "wo": {"nativeName": "Wolof"}, "wuu": {}, "xal": {}, - "xh": {"nativeName": "isiXhosa"}, + "xh": {"nativeName": "IsiXhosa"}, "xmf": {}, "xog": {"nativeName": "Olusoga"}, "yao": {}, diff --git a/data/territory_languages.json b/data/territory_languages.json index 1025855a1..0d5db48e7 100644 --- a/data/territory_languages.json +++ b/data/territory_languages.json @@ -12,7 +12,7 @@ "ar": ["es", "en", "cy", "gn"], "as": ["sm", "en"], "at": ["de", "bar", "en", "fr", "it", "hr", "sl", "hu"], - "au": ["en", "zh-Hant", "it", "wbp"], + "au": ["en", "zh-Hant", "it", "wbp", "hnj"], "aw": ["nl", "pap", "en"], "ax": ["sv"], "az": ["az", "az-Cyrl", "tly", "ku", "ttt", "tkr"], @@ -30,7 +30,7 @@ "bn": ["ms", "zh-Hant", "ms-Arab", "en"], "bo": ["es", "qu", "ay", "gn", "aro"], "bq": ["pap", "nl"], - "br": ["pt", "en", "de", "it", "ja", "es", "kgp", "ko", "yrl", "gub", "xav"], + "br": ["pt", "en", "de", "it", "vec", "ja", "es", "kgp", "ko", "yrl", "gub", "xav"], "bs": ["en"], "bt": ["dz", "ne", "tsj", "en", "lep"], "bv": ["und"], @@ -46,10 +46,11 @@ "ci": ["fr", "bci", "sef", "dnj", "kfo", "bqv"], "ck": ["en"], "cl": ["es", "en", "arn"], - "cm": ["fr", "en", "bum", "ff", "ewo", "ybb", "bbj", "nnh", "bkm", "bas", "bax", "byv", "mua", "maf", "bfd", "bss", "kkj", "dua", "mgo", "ar", "jgo", "ksf", "agq", "ha-Arab", "nmg", "yav", "ff-Adlm"], - "cn": ["zh", "wuu", "yue-Hans", "hsn", "hak", "nan", "gan", "ii", "ug", "za", "mn-Mong", "bo", "ko", "kk-Arab", "lis", "ky-Arab", "nxq", "khb", "tdd", "lcp", "en", "ru", "vi", "uz-Cyrl", "lzh"], + "cm": ["fr", "en", "bum", "ff", "ewo", "ybb", "bbj", "nnh", "bkm", "bas", "bax", "byv", "mua", "maf", "bfd", "bss", "kkj", "dua", "mgo", "ar", "jgo", "ksf", "ken", "agq", "ha-Arab", "nmg", "yav", "ff-Adlm"], + "cn": ["zh", "wuu", "yue-Hans", "hsn", "hak", "nan", "gan", "ii", "ug", "za", "mn-Mong", "bo", "ko", "kk-Arab", "lis", "ky-Arab", "nxq", "khb", "tdd", "lcp", "en", "hnj", "ru", "vi", "uz-Cyrl", "lzh"], "co": ["es", "guc", "yrl"], "cp": ["und"], + "cq": ["en"], "cr": ["es"], "cu": ["es"], "cv": ["kea", "pt"], @@ -70,19 +71,19 @@ "eg": ["ar", "arz", "en", "el"], "eh": ["ar"], "er": ["ti", "en", "tig", "ar", "aa", "ssy", "byn"], - "es": ["es", "en", "ca", "gl", "eu", "ast", "ext", "an"], - "et": ["en", "am", "om", "so", "ti", "sid", "wal", "aa"], + "es": ["es", "en", "ca", "gl", "eu", "ast", "ext", "an", "oc"], + "et": ["en", "am", "om", "so", "ti", "sid", "wal", "aa", "gez"], "fi": ["fi", "en", "sv", "de", "ru", "et", "rmf", "se", "smn", "sms"], "fj": ["en", "hi", "hif", "fj", "rtm"], "fk": ["en"], "fm": ["en", "chk", "pon", "kos", "yap", "uli"], "fo": ["fo"], - "fr": ["fr", "en", "es", "de", "oc", "it", "pt", "pcd", "gsw", "br", "co", "ca", "eu", "nl", "frp", "ia"], + "fr": ["fr", "en", "es", "de", "oc", "it", "pt", "pcd", "gsw", "br", "co", "hnj", "ca", "eu", "nl", "frp", "ia"], "ga": ["fr", "puu"], - "gb": ["en", "fr", "de", "es", "pl", "pa", "ur", "ta", "gu", "sco", "cy", "bn", "ar", "zh-Hant", "it", "lt", "pt", "so", "tr", "ga", "gd", "kw"], + "gb": ["en", "fr", "de", "es", "pl", "pa", "ur", "ta", "gu", "sco", "cy", "bn", "ar", "zh-Hant", "it", "lt", "pt", "so", "tr", "ga", "gd", "kw", "en-Shaw"], "gd": ["en"], "ge": ["ka", "xmf", "ru", "hy", "ab", "os", "ku"], - "gf": ["fr", "gcr", "zh-Hant"], + "gf": ["fr", "gcr", "zh-Hant", "hnj"], "gg": ["en"], "gh": ["ak", "en", "ee", "abr", "gur", "ada", "gaa", "nzi", "ha", "saf", "ff", "ff-Adlm"], "gi": ["en", "es"], @@ -100,23 +101,23 @@ "hk": ["zh-Hant", "yue", "en", "zh"], "hm": ["und"], "hn": ["es", "en"], - "hr": ["hr", "en", "it"], + "hr": ["hr", "en", "it", "vec"], "ht": ["ht", "fr"], "hu": ["hu", "en", "de", "fr", "ro", "hr", "sk", "sl"], "ic": ["es"], "id": ["id", "jv", "su", "mad", "ms", "min", "bew", "ban", "bug", "bjn", "ace", "ms-Arab", "sas", "bbc", "zh-Hant", "mak", "ljp", "rej", "gor", "nij", "kge", "aoz", "kvr", "lbw", "gay", "rob", "mdr", "sxn", "sly", "mwv"], "ie": ["en", "ga", "fr"], - "il": ["he", "en", "ar", "ru", "ro", "yi", "pl", "lad", "hu", "am", "ti", "ml"], + "il": ["he", "en", "ar", "apc", "ru", "ro", "yi", "pl", "lad", "hu", "am", "ti", "ml"], "im": ["en", "gv"], "in": ["hi", "en", "bn", "te", "mr", "ta", "ur", "gu", "kn", "ml", "or", "pa", "bho", "awa", "as", "bgc", "mag", "mai", "mwr", "hne", "dcc", "bjj", "ne", "sat", "wtm", "rkt", "ks", "kok", "gom", "swv", "gbm", "lmn", "sd", "gon", "kfy", "doi", "kru", "sck", "wbq", "xnr", "khn", "tcy", "wbr", "brx", "sd-Deva", "noe", "bhb", "mni", "hi-Latn", "raj", "hoc", "mtr", "unr", "bhi", "hoj", "kha", "kfr", "grt", "unx", "bfy", "srx", "saz", "ccp", "bfq", "njo", "ria", "bo", "bpy", "bft", "bra", "lep", "btv", "lif", "lah", "sa", "kht", "dv", "dz"], "io": ["en"], "iq": ["ar", "en", "ckb", "az-Arab", "fa", "lrc", "syr"], "ir": ["fa", "az-Arab", "mzn", "glk", "ckb", "sdh", "tk", "lrc", "ar", "bal", "rmt", "bqi", "luz", "lki", "bgn", "prd", "hy", "ps", "ka", "gbz", "kk-Arab"], "is": ["is", "da"], - "it": ["it", "en", "fr", "sc", "de", "vec", "nap", "lij", "scn", "sdc", "sl", "fur", "egl", "ca", "el", "lmo", "pms", "hr", "rgn", "lld"], + "it": ["it", "en", "fr", "lmo", "sc", "de", "vec", "nap", "lij", "scn", "sdc", "sl", "fur", "egl", "ca", "el", "pms", "hr", "rgn", "lld"], "je": ["en"], "jm": ["en", "jam"], - "jo": ["ar", "en"], + "jo": ["ar", "apc", "en"], "jp": ["ja", "ryu", "ko"], "ke": ["sw", "en", "ki", "luy", "luo", "kam", "kln", "guz", "mer", "mas", "ebu", "so", "dav", "teo", "pko", "om", "saq", "ar", "pa", "gu"], "kg": ["ky", "ru"], @@ -129,8 +130,8 @@ "kw": ["ar"], "ky": ["en"], "kz": ["ru", "kk", "en", "de", "ug-Cyrl"], - "la": ["lo", "kjg", "kdt"], - "lb": ["ar", "en", "hy", "ku-Arab", "fr"], + "la": ["lo", "kjg", "hnj", "kdt"], + "lb": ["apc", "ar", "en", "hy", "ku-Arab", "fr"], "lc": ["en"], "li": ["de", "gsw", "wae"], "lk": ["si", "ta", "en"], @@ -140,7 +141,7 @@ "lu": ["fr", "lb", "de", "en", "pt"], "lv": ["lv", "en", "ru", "ltg"], "ly": ["ar"], - "ma": ["ary", "ar", "zgh", "fr", "en", "tzm", "shi", "shi-Latn", "rif", "rif-Latn", "es"], + "ma": ["ary", "ar", "zgh", "fr", "en", "tzm", "shi", "shi-Latn", "rif", "rif-Tfng", "es"], "mc": ["fr"], "md": ["ro", "uk", "bg", "gag", "ru"], "me": ["sr-Latn", "sq", "sr"], @@ -149,7 +150,7 @@ "mh": ["en", "mh"], "mk": ["mk", "sq", "tr"], "ml": ["bm", "fr", "ffm", "snk", "mwk", "ses", "tmh", "bm-Nkoo", "khq", "dtm", "kao", "ar", "bmq", "bze"], - "mm": ["my", "shn", "kac", "rhg", "mnw", "kht"], + "mm": ["my", "shn", "kac", "rhg", "mnw", "hnj", "kht"], "mn": ["mn", "kk-Arab", "zh", "ru", "ug-Cyrl"], "mo": ["zh-Hant", "pt", "zh", "en"], "mp": ["en", "ch"], @@ -160,16 +161,16 @@ "mu": ["mfe", "en", "bho", "ur", "fr", "ta"], "mv": ["dv", "en"], "mw": ["en", "ny", "tum", "tog", "zu"], - "mx": ["es", "en", "yua", "nhe", "nhw", "maz", "nch", "sei"], + "mx": ["es", "en", "yua", "nhe", "nhw", "maz", "nch", "vec", "sei"], "my": ["ms", "en", "zh", "ta", "iba", "jv", "zmi", "dtp", "ml", "bug", "bjn"], "mz": ["pt", "vmw", "ndc", "ts", "ngl", "seh", "mgh", "rng", "ny", "yao", "sw", "zu"], "na": ["af", "kj", "ng", "naq", "hz", "en", "de", "tn"], "nc": ["fr"], "ne": ["ha", "fr", "dje", "fuq", "tmh", "ar", "twq", "ff", "ff-Adlm"], "nf": ["en"], - "ng": ["en", "pcm", "ha", "ig", "yo", "fuv", "tiv", "efi", "ibb", "ha-Arab", "bin", "kaj", "kcg", "ar", "cch", "amo", "ff", "ff-Adlm"], + "ng": ["en", "pcm", "ha", "ig", "yo", "fuv", "tiv", "efi", "ibb", "ha-Arab", "bin", "kaj", "kcg", "ar", "cch", "amo", "ann", "ff", "ff-Adlm"], "ni": ["es"], - "nl": ["nl", "en", "de", "fr", "nds", "li", "fy", "gos", "id", "zea", "rif-Latn", "tr"], + "nl": ["nl", "en", "de", "fr", "nds", "li", "fy", "gos", "id", "zea", "rif", "tr"], "no": ["nb", "no", "nn", "se"], "np": ["ne", "mai", "bho", "new", "jml", "en", "dty", "awa", "thl", "bap", "tdg", "thr", "lif", "mgp", "thq", "mrd", "bfy", "xsr", "rjs", "taj", "hi", "gvr", "bo", "tkt", "tdh", "bn", "unr-Deva", "lep"], "nr": ["en", "na"], @@ -181,12 +182,12 @@ "pf": ["fr", "ty", "zh-Hant"], "pg": ["tpi", "en", "ho"], "ph": ["en", "fil", "es", "ceb", "ilo", "hil", "bik", "war", "fbl", "pam", "pag", "mdh", "tsg", "zh-Hant", "cps", "krj", "bto", "hnn", "tbw", "bku"], - "pk": ["ur", "en", "ps", "sd", "skr", "bal", "brh", "hno", "fa", "bgn", "hnd", "gju", "bft", "kvx", "khw", "mvy", "gjk", "kxp", "ks", "trw", "btv", "pnb", "scl", "trw", "kls"], - "pl": ["pl", "en", "de", "ru", "szl", "be", "uk", "csb", "sli", "lt"], + "pk": ["ur", "en", "ps", "sd", "skr", "bal", "hno", "brh", "fa", "bgn", "hnd", "gju", "bft", "kvx", "khw", "mvy", "gjk", "kxp", "ks", "trw", "btv", "pnb", "scl", "trw", "kls"], + "pl": ["pl", "en", "de", "ru", "szl", "be", "uk", "csb", "sli", "lt", "prg"], "pm": ["fr", "en"], "pn": ["en"], "pr": ["es", "en"], - "ps": ["ar"], + "ps": ["ar", "apc"], "pt": ["pt", "en", "fr", "es", "gl"], "pw": ["pau", "en"], "py": ["gn", "es", "de"], @@ -197,39 +198,39 @@ "ru": ["ru", "tt", "ba", "cv", "hy", "ce", "av", "udm", "chm", "os", "sah", "kbd", "myv", "dar", "bua", "mdf", "kum", "kv", "lez", "krc", "inh", "tyv", "az-Cyrl", "ady", "krl", "lbe", "koi", "mrj", "alt", "fi", "sr-Latn", "vep", "mn", "izh", "cu", "vot"], "rw": ["rw", "en", "fr"], "sa": ["ar", "ars"], - "sb": ["en", "rug"], + "sb": ["en", "pis", "rug"], "sc": ["crs", "fr", "en"], "sd": ["ar", "en", "bej", "fvr", "ha-Arab", "mls", "fia", "zag"], "se": ["sv", "en", "fi", "fit", "se", "rmu", "yi", "smj", "sma", "ia"], "sg": ["en", "zh", "ms", "ta", "ml", "pa"], "sh": ["en"], - "si": ["sl", "hr", "en", "de", "hu", "it"], + "si": ["sl", "hr", "en", "de", "vec", "hu", "it"], "sj": ["nb", "ru"], "sk": ["sk", "cs", "en", "de", "hu", "uk", "pl"], "sl": ["kri", "en", "men", "tem", "ff", "ff-Adlm"], "sm": ["it", "eo"], "sn": ["wo", "fr", "ff", "srr", "dyo", "sav", "mfv", "bjt", "snf", "knf", "bsc", "mey", "tnr", "ff-Adlm"], "so": ["so", "ar", "sw", "om"], - "sr": ["nl", "srn", "zh-Hant"], + "sr": ["nl", "srn", "zh-Hant", "hnj"], "ss": ["ar", "en", "nus"], "st": ["pt"], "sv": ["es"], "sx": ["en", "es", "vic", "nl"], - "sy": ["ar", "ku", "fr", "hy", "syr"], + "sy": ["apc", "ar", "ku", "fr", "hy", "syr"], "sz": ["en", "ss", "zu", "ts"], "ta": ["en"], "tc": ["en"], "td": ["fr", "ar"], "tf": ["fr"], "tg": ["fr", "ee", "ife"], - "th": ["th", "en", "tts", "nod", "sou", "mfa", "zh-Hant", "kxm", "kdt", "mnw", "shn", "lcp", "lwl"], + "th": ["th", "en", "tts", "nod", "sou", "mfa", "zh-Hant", "kxm", "kdt", "mnw", "hnj", "shn", "lcp", "lwl"], "tj": ["tg", "ru", "fa", "ar"], "tk": ["en", "tkl"], "tl": ["pt", "tet"], "tm": ["tk", "ru", "uz", "ku"], "tn": ["aeb", "ar", "fr"], "to": ["to", "en"], - "tr": ["tr", "en", "ku", "zza", "kbd", "az", "az-Arab", "ar", "bgx", "bg", "ady", "kiu", "hy", "ka", "lzz", "sr-Latn", "sq", "ab", "el", "tru", "uz", "ky-Latn", "kk"], + "tr": ["tr", "en", "ku", "apc", "zza", "kbd", "az", "az-Arab", "ar", "bgx", "bg", "ady", "kiu", "hy", "ka", "lzz", "sr-Latn", "sq", "ab", "el", "tru", "uz", "ky-Latn", "kk"], "tt": ["en", "es"], "tv": ["tvl", "en"], "tw": ["zh-Hant", "trv"], @@ -237,7 +238,7 @@ "ua": ["uk", "ru", "pl", "yi", "rue", "be", "crh", "ro", "bg", "tr", "hu", "el"], "ug": ["sw", "lg", "nyn", "cgg", "xog", "en", "teo", "laj", "ach", "myx", "rw", "ttj", "hi"], "um": ["en"], - "us": ["en", "es", "zh-Hant", "fr", "de", "fil", "it", "vi", "ko", "ru", "nv", "yi", "pdc", "haw", "frc", "chr", "esu", "dak", "cho", "lkt", "ik", "mus", "cad", "cic", "osa"], + "us": ["en", "es", "zh-Hant", "fr", "de", "fil", "it", "vi", "ko", "ru", "nv", "yi", "pdc", "hnj", "haw", "frc", "chr", "esu", "dak", "cho", "lkt", "ik", "mus", "cad", "cic", "io", "jbo", "osa"], "uy": ["es"], "uz": ["uz", "uz-Cyrl", "ru", "kaa", "tr"], "va": ["it", "la"], @@ -245,7 +246,7 @@ "ve": ["es", "yrl"], "vg": ["en"], "vi": ["en"], - "vn": ["vi", "zh-Hant", "cjm"], + "vn": ["vi", "zh-Hant", "blt", "hnj", "cjm"], "vu": ["bi", "en", "fr"], "wf": ["wls", "fr", "fud"], "ws": ["sm", "en"], From 5a3a2d876e3a685cfa3391b4f1aeb3c0b4b6e765 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 19:44:27 +0200 Subject: [PATCH 63/65] show inherited fields from global parents fixes regression from 43784e2ef --- modules/presets/preset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/presets/preset.js b/modules/presets/preset.js index 57a0c8b6b..3b025512b 100644 --- a/modules/presets/preset.js +++ b/modules/presets/preset.js @@ -312,7 +312,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) { let parent = allPresets[parentID]; if (loc) { const validHere = locationManager.locationSetsAt(loc); - if (!validHere[parent.locationSetID]) { + if (parent.locationSetID && !validHere[parent.locationSetID]) { // this is a preset for which a regional variant of the main preset exists const candidateIDs = Object.keys(allPresets).filter(k => k.startsWith(parentID)); parent = allPresets[candidateIDs.find(candidateID => { From 140838f4b1aa001b4009483960bd7cf5f04d1a79 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Thu, 25 May 2023 21:03:17 +0200 Subject: [PATCH 64/65] fix accidentally committed code, switch to different ford icon --- modules/validations/crossing_ways.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index b66927b99..e23939e89 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -711,9 +711,7 @@ export function validationCrossingWays(context) { } if (connectionTags.ford) { fixTitleID = 'connect_using_ford'; - if (connectionTags.highway) { - fixIcon = 'temaki-pedestrian'; - } + fixIcon = 'roentgen-ford'; } const fix = new validationIssueFix({ From f19a55fa13001ab34dfc8998a234823b2eb6a925 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 26 May 2023 20:35:12 +0200 Subject: [PATCH 65/65] Add support for icons on multiCombo/semiCombo fields (#9433) --- CHANGELOG.md | 2 ++ css/80_app.css | 36 ++++++++++++++++++++++++------- modules/ui/fields/combo.js | 43 +++++++++++++++++++++++++------------- test/spec/presets/field.js | 1 + 4 files changed, 61 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9219d770b..5e61d4326 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Render "right-side" arrows for features with lifecycle prefixes ([#9493], thanks [@k-yle]) * Take regional variants of parent presets into account when resolving preset fields ([#9524]) * Render "right-side" arrows for `man_made=quay` features +* Add support icons also in `multiCombo` and `semiCombo` fields ([#9433]) #### :hammer: Development * Upgrade dependencies: `fortawesome` to v6.4, `which-polygon` to v2.2.1, `glob` to v9.2, `temaki` to v5.4, `marked` to v4.3, `core-js-bundle` to v3.30, `osm-auth` to v2.1 * Bundle `package-lock.json` file in repository for faster `clean-install` builds @@ -73,6 +74,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [#8769]: https://github.com/openstreetmap/iD/pull/8769 [#7427]: https://github.com/openstreetmap/iD/issues/7427 [#9233]: https://github.com/openstreetmap/iD/issues/9233 +[#9433]: https://github.com/openstreetmap/iD/pull/9433 [#9482]: https://github.com/openstreetmap/iD/pull/9482 [#9483]: https://github.com/openstreetmap/iD/pull/9483 [#9492]: https://github.com/openstreetmap/iD/pull/9492 diff --git a/css/80_app.css b/css/80_app.css index 72c0545b6..9fbf2f341 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -1640,10 +1640,14 @@ input.date-selector { display: none; } -.form-field-input-combo input.raw-value { +.form-field-input-combo input.raw-value, +.form-field-input-semicombo input.raw-value, +.form-field-input-multicombo input.raw-value { font-family: monospace; } -.form-field-input-combo input.known-value { +.form-field-input-combo input.known-value, +.form-field-input-semicombo input.known-value, +.form-field-input-multicombo input.known-value { color: #7092ff; } @@ -1706,7 +1710,7 @@ input.date-selector { font-style: italic; } -.form-field-input-multicombo li.chip span { +.form-field-input-multicombo li.chip > span { display: block; flex: 1 1 auto; overflow: hidden; @@ -1745,7 +1749,9 @@ input.date-selector { width: auto; } -.form-field-input-combo .tag-value-icon { +.form-field-input-combo .tag-value-icon, +.form-field-input-semicombo .input-wrap .tag-value-icon, +.form-field-input-multicombo .input-wrap .tag-value-icon { display: inline-block; position: relative; height: 24px; @@ -1756,7 +1762,9 @@ input.date-selector { z-index: 1; padding-left: 11px; } -.ideditor[dir='rtl'] .form-field-input-combo .tag-value-icon { +.ideditor[dir='rtl'] .form-field-input-combo .tag-value-icon, +.ideditor[dir='rtl'] .form-field-input-semicombo .input-wrap .tag-value-icon, +.ideditor[dir='rtl'] .form-field-input-multicombo .input-wrap .tag-value-icon { margin-right: 0; margin-left: -30px; padding-left: 0; @@ -1767,16 +1775,30 @@ input.date-selector { height: 21px; margin: auto; } -.ideditor[dir='ltr'] .form-field-input-combo .tag-value-icon + input { +.ideditor[dir='ltr'] .form-field-input-combo .tag-value-icon + input, +.ideditor[dir='ltr'] .form-field-input-semicombo .input-wrap .tag-value-icon + input, +.ideditor[dir='ltr'] .form-field-input-multicombo .input-wrap .tag-value-icon + input { padding-left: 40px; } -.ideditor[dir='rtl'] .form-field-input-combo .tag-value-icon + input { +.ideditor[dir='rtl'] .form-field-input-combo .tag-value-icon + input, +.ideditor[dir='rtl'] .form-field-input-semicombo .input-wrap .tag-value-icon + input, +.ideditor[dir='rtl'] .form-field-input-multicombo .input-wrap .tag-value-icon + input { padding-right: 40px; } .combobox-option .tag-value-icon { display: inline-block; width: 28px; } +.form-field-input-multicombo li.chip .tag-value-icon .icon { + margin: 0; + margin-right: 6px; + display: inline-block; + vertical-align: center; +} +.ideditor[dir='rtl'] .form-field-input-multicombo li.chip .tag-value-icon .icon { + margin-right: 6px; + margin-left: 0; +} /* Field - Text / Numeric diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 06e86ae4a..78066bd70 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -543,11 +543,15 @@ export function uiFieldCombo(field, context) { function updateIcon(value) { value = tagValue(value); + let container = _container; + if (field.type === 'multiCombo' || field.type === 'semiCombo') { + container = _container.select('.input-wrap'); + } const iconsField = field.resolveReference('iconsCrossReference'); if (iconsField.icons) { - _container.selectAll('.tag-value-icon').remove(); + container.selectAll('.tag-value-icon').remove(); if (iconsField.icons[value]) { - _container.selectAll('.tag-value-icon') + container.selectAll('.tag-value-icon') .data([value]) .enter() .insert('div', 'input') @@ -561,6 +565,14 @@ export function uiFieldCombo(field, context) { _tags = tags; var stringsField = field.resolveReference('stringsCrossReference'); + var isMixed = Array.isArray(tags[field.key]); + var showsValue = value => !isMixed && value && !(field.type === 'typeCombo' && value === 'yes'); + var isRawValue = value => showsValue(value) + && !stringsField.hasTextForStringId(`options.${value}`) + && !stringsField.hasTextForStringId(`options.${value}.title`); + var isKnownValue = value => showsValue(value) && !isRawValue(value); + var isReadOnly = !_allowCustomValues; + if (_isMulti || _isSemi) { _multiData = []; @@ -578,7 +590,7 @@ export function uiFieldCombo(field, context) { _multiData.push({ key: k, value: displayValue(suffix), - display: renderValue(suffix), + display: addComboboxIcons(renderValue(suffix), suffix), state: typeof v === 'string' ? v.toLowerCase() : '', isMixed: Array.isArray(v) }); @@ -620,7 +632,7 @@ export function uiFieldCombo(field, context) { return { key: v, value: displayValue(v), - display: renderValue(v), + display: addComboboxIcons(renderValue(v), v), isMixed: !commonValues.includes(v) }; }); @@ -711,21 +723,14 @@ export function uiFieldCombo(field, context) { .attr('class', 'remove') .text('×'); + updateIcon(''); } else { - var isMixed = Array.isArray(tags[field.key]); - var mixedValues = isMixed && tags[field.key].map(function(val) { return displayValue(val); }).filter(Boolean); - var showsValue = !isMixed && tags[field.key] && !(field.type === 'typeCombo' && tags[field.key] === 'yes'); - var isRawValue = showsValue && !stringsField.hasTextForStringId(`options.${tags[field.key]}`) - && !stringsField.hasTextForStringId(`options.${tags[field.key]}.title`); - var isKnownValue = showsValue && !isRawValue; - - var isReadOnly = !_allowCustomValues || isKnownValue; - utilGetSetValue(_input, !isMixed ? displayValue(tags[field.key]) : '') + .data([tags[field.key]]) .classed('raw-value', isRawValue) .classed('known-value', isKnownValue) .attr('readonly', isReadOnly ? 'readonly' : undefined) @@ -734,7 +739,7 @@ export function uiFieldCombo(field, context) { .classed('mixed', isMixed) .on('keydown.deleteCapture', function(d3_event) { if (isReadOnly && - isKnownValue && + isKnownValue(tags[field.key]) && (d3_event.keyCode === utilKeybinding.keyCodes['⌫'] || d3_event.keyCode === utilKeybinding.keyCodes['⌦'])) { @@ -755,6 +760,16 @@ export function uiFieldCombo(field, context) { _lengthIndicator.update(tags[field.key]); } } + + const refreshStyles = () => { + _input + .data([tagValue(utilGetSetValue(_input))]) + .classed('raw-value', isRawValue) + .classed('known-value', isKnownValue); + }; + _input.on('input.refreshStyles', refreshStyles); + _combobox.on('update.refreshStyles', refreshStyles); + refreshStyles(); }; function registerDragAndDrop(selection) { diff --git a/test/spec/presets/field.js b/test/spec/presets/field.js index f00236c36..6e3a957bd 100644 --- a/test/spec/presets/field.js +++ b/test/spec/presets/field.js @@ -53,6 +53,7 @@ describe('iD.presetField', function() { var context = iD.coreContext().assetPath('../dist/').init(); var uiField = iD.uiFieldCombo(field, context); + uiField(d3.select(document.createElement('div')).classed('form-field-input-wrap', true)); uiField.tags({k: 'v'}); expect(field.t.append).not.to.have.been.called; expect(other.t.append).to.have.been.called;