diff --git a/modules/actions/add_member.js b/modules/actions/add_member.js index fd414d0fb..f36104e8d 100644 --- a/modules/actions/add_member.js +++ b/modules/actions/add_member.js @@ -1,4 +1,5 @@ -import { osmJoinWays, osmWay } from '../osm'; +import { osmJoinWays } from '../osm/multipolygon'; +import { osmWay } from '../osm/way'; import { utilArrayGroupBy, utilObjectOmit } from '../util'; diff --git a/modules/actions/circularize.js b/modules/actions/circularize.js index cafb24193..b7f8b4682 100644 --- a/modules/actions/circularize.js +++ b/modules/actions/circularize.js @@ -7,7 +7,7 @@ import { } from 'd3-polygon'; import { geoVecInterp, geoVecLength } from '../geo'; -import { osmNode } from '../osm'; +import { osmNode } from '../osm/node'; import { utilArrayUniq } from '../util'; diff --git a/modules/actions/extract.js b/modules/actions/extract.js index 8b23ddf78..6bbd45850 100644 --- a/modules/actions/extract.js +++ b/modules/actions/extract.js @@ -1,6 +1,6 @@ import { geoPath as d3_geoPath } from 'd3-geo'; -import { osmNode } from '../osm'; +import { osmNode } from '../osm/node'; export function actionExtract(entityID, projection) { @@ -73,7 +73,7 @@ export function actionExtract(entityID, projection) { // remove the tag from the area delete areaTags[key]; } - + if (!isBuilding) { // ensure that the area keeps the area geometry areaTags.area = 'yes'; diff --git a/modules/actions/join.js b/modules/actions/join.js index 8d004efbe..2cd24b793 100644 --- a/modules/actions/join.js +++ b/modules/actions/join.js @@ -1,5 +1,6 @@ import { actionDeleteWay } from './delete_way'; -import { osmIsInterestingTag, osmJoinWays } from '../osm'; +import { osmIsInterestingTag } from '../osm/tags'; +import { osmJoinWays } from '../osm/multipolygon'; import { geoPathIntersections } from '../geo'; import { utilArrayGroupBy, utilArrayIntersection } from '../util'; diff --git a/modules/actions/move.js b/modules/actions/move.js index f5c0367d3..f25259145 100644 --- a/modules/actions/move.js +++ b/modules/actions/move.js @@ -3,7 +3,7 @@ import { geoVecAdd, geoVecEqual, geoVecInterp, geoVecSubtract } from '../geo'; -import { osmNode } from '../osm'; +import { osmNode } from '../osm/node'; import { utilArrayIntersection } from '../util'; diff --git a/modules/actions/restrict_turn.js b/modules/actions/restrict_turn.js index c21ace82c..31cba8839 100644 --- a/modules/actions/restrict_turn.js +++ b/modules/actions/restrict_turn.js @@ -1,4 +1,4 @@ -import { osmRelation } from '../osm'; +import { osmRelation } from '../osm/relation'; // `actionRestrictTurn` creates a turn restriction relation. diff --git a/modules/actions/split.js b/modules/actions/split.js index c3625cdf6..7f78a6bd5 100644 --- a/modules/actions/split.js +++ b/modules/actions/split.js @@ -1,6 +1,8 @@ import { actionAddMember } from './add_member'; import { geoSphericalDistance } from '../geo'; -import { osmIsOldMultipolygonOuterMember, osmRelation, osmWay } from '../osm'; +import { osmIsOldMultipolygonOuterMember } from '../osm/multipolygon'; +import { osmRelation } from '../osm/relation'; +import { osmWay } from '../osm/way'; import { utilArrayIntersection, utilWrap } from '../util'; diff --git a/modules/behavior/add_way.js b/modules/behavior/add_way.js index decb20370..b5ba7784c 100644 --- a/modules/behavior/add_way.js +++ b/modules/behavior/add_way.js @@ -1,7 +1,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { behaviorDraw } from './draw'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { utilRebind } from '../util/rebind'; diff --git a/modules/behavior/copy.js b/modules/behavior/copy.js index c07dff505..8cb5dbae7 100644 --- a/modules/behavior/copy.js +++ b/modules/behavior/copy.js @@ -1,6 +1,6 @@ import { event as d3_event } from 'd3-selection'; -import { uiCmd } from '../ui'; +import { uiCmd } from '../ui/cmd'; import { utilArrayGroupBy } from '../util'; diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index 0827d36c1..abe786b7d 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -4,11 +4,14 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { actionAddMidpoint, actionMoveNode, actionNoop } from '../actions'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionMoveNode } from '../actions/move_node'; +import { actionNoop } from '../actions/noop'; import { behaviorDraw } from './draw'; import { geoChooseEdge, geoHasSelfIntersections } from '../geo'; -import { modeBrowse, modeSelect } from '../modes'; -import { osmNode } from '../osm'; +import { modeBrowse } from '../modes/browse'; +import { modeSelect } from '../modes/select'; +import { osmNode } from '../osm/node'; import { utilKeybinding } from '../util'; export function behaviorDrawWay(context, wayID, index, mode, startGraph, baselineGraph) { diff --git a/modules/behavior/hash.js b/modules/behavior/hash.js index b6713328b..56667f8cd 100644 --- a/modules/behavior/hash.js +++ b/modules/behavior/hash.js @@ -3,7 +3,7 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; import { geoSphericalDistance } from '../geo'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { utilObjectOmit, utilQsString, utilStringQs } from '../util'; diff --git a/modules/behavior/lasso.js b/modules/behavior/lasso.js index 9c9af45bf..a1bdbf7ce 100644 --- a/modules/behavior/lasso.js +++ b/modules/behavior/lasso.js @@ -1,8 +1,8 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { geoExtent, geoPointInPolygon } from '../geo'; -import { modeSelect } from '../modes'; -import { uiLasso } from '../ui'; +import { modeSelect } from '../modes/select'; +import { uiLasso } from '../ui/lasso'; export function behaviorLasso(context) { diff --git a/modules/behavior/operation.js b/modules/behavior/operation.js index 91d61bb4b..49afb121b 100644 --- a/modules/behavior/operation.js +++ b/modules/behavior/operation.js @@ -1,5 +1,5 @@ import { event as d3_event } from 'd3-selection'; -import { uiFlash } from '../ui'; +import { uiFlash } from '../ui/flash'; /* Creates a keybinding behavior for an operation */ diff --git a/modules/behavior/paste.js b/modules/behavior/paste.js index 806b34aa2..b103b4ab5 100644 --- a/modules/behavior/paste.js +++ b/modules/behavior/paste.js @@ -1,9 +1,10 @@ import { event as d3_event } from 'd3-selection'; -import { actionCopyEntities, actionMove } from '../actions'; +import { actionCopyEntities } from '../actions/copy_entities'; +import { actionMove } from '../actions/move'; import { geoExtent, geoPointInPolygon, geoVecSubtract } from '../geo'; -import { modeMove } from '../modes'; -import { uiCmd } from '../ui'; +import { modeMove } from '../modes/move'; +import { uiCmd } from '../ui/cmd'; export function behaviorPaste(context) { diff --git a/modules/behavior/select.js b/modules/behavior/select.js index b7034413e..f079a455c 100644 --- a/modules/behavior/select.js +++ b/modules/behavior/select.js @@ -6,13 +6,11 @@ import { import { geoVecLength } from '../geo'; -import { - modeBrowse, - modeSelect, - modeSelectData, - modeSelectNote, - modeSelectError -} from '../modes'; +import { modeBrowse } from '../modes/browse'; +import { modeSelect } from '../modes/select'; +import { modeSelectData } from '../modes/select_data'; +import { modeSelectNote } from '../modes/select_note'; +import { modeSelectError } from '../modes/select_error'; import { osmEntity, osmNote, qaError } from '../osm'; diff --git a/modules/core/area_keys.js b/modules/core/area_keys.js new file mode 100644 index 000000000..945b098e0 --- /dev/null +++ b/modules/core/area_keys.js @@ -0,0 +1,5 @@ +export var areaKeys = {}; + +export function setAreaKeys(value) { + areaKeys = value; +} diff --git a/modules/core/context.js b/modules/core/context.js index 08e9b02dc..ac683cfc0 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -6,6 +6,8 @@ import { select as d3_select } from 'd3-selection'; import { t, currentLocale, addTranslation, setLocale } from '../util/locale'; +import { setAreaKeys } from './area_keys'; + import { coreHistory } from './history'; import { coreValidator } from './validator'; import { dataLocales, dataEn } from '../../data'; @@ -19,13 +21,6 @@ import { utilDetect } from '../util/detect'; import { utilCallWhenIdle, utilKeybinding, utilRebind, utilStringQs } from '../util'; -export var areaKeys = {}; - -export function setAreaKeys(value) { - areaKeys = value; -} - - export function coreContext() { var dispatch = d3_dispatch('enter', 'exit', 'change'); var context = utilRebind({}, dispatch, 'on'); @@ -554,11 +549,11 @@ export function coreContext() { var external = utilStringQs(window.location.hash).presets; presets.fromExternal(external, function(externalPresets) { context.presets = function() { return externalPresets; }; // default + external presets... - areaKeys = presets.areaKeys(); + setAreaKeys(presets.areaKeys()); }); } else { presets.init(); - areaKeys = presets.areaKeys(); + setAreaKeys(presets.areaKeys()); } return context; diff --git a/modules/core/history.js b/modules/core/history.js index 323200ff5..53b7756dd 100644 --- a/modules/core/history.js +++ b/modules/core/history.js @@ -6,7 +6,7 @@ import { coreDifference } from './difference'; import { coreGraph } from './graph'; import { coreTree } from './tree'; import { osmEntity } from '../osm/entity'; -import { uiLoading } from '../ui'; +import { uiLoading } from '../ui/loading'; import { utilArrayDifference, utilArrayGroupBy, utilArrayUnion, utilObjectOmit, utilRebind, utilSessionMutex diff --git a/modules/core/validation/index.js b/modules/core/validation/index.js new file mode 100644 index 000000000..4184805c8 --- /dev/null +++ b/modules/core/validation/index.js @@ -0,0 +1 @@ +export { validationIssue, validationIssueFix } from './models'; diff --git a/modules/core/validation/models.js b/modules/core/validation/models.js new file mode 100644 index 000000000..74224ce5a --- /dev/null +++ b/modules/core/validation/models.js @@ -0,0 +1,79 @@ +import { geoExtent } from '../../geo'; +import { osmEntity } from '../../osm/entity'; + +export function validationIssue(attrs) { + this.type = attrs.type; // required - name of rule that created the issue (e.g. 'missing_tag') + this.severity = attrs.severity; // required - 'warning' or 'error' + this.message = attrs.message; // required - localized string + this.reference = attrs.reference; // optional - function(selection) to render reference information + this.entities = attrs.entities; // optional - array of entities involved in the issue + this.loc = attrs.loc; // optional - [lon, lat] to zoom in on to see the issue + this.data = attrs.data; // optional - object containing extra data for the fixes + this.fixes = attrs.fixes; // optional - array of validationIssueFix objects + this.hash = attrs.hash; // optional - string to further differentiate the issue + + this.id = generateID.apply(this); // generated - see below + this.autoFix = null; // generated - if autofix exists, will be set below + + // A unique, deterministic string hash. + // Issues with identical id values are considered identical. + function generateID() { + var parts = [this.type]; + + if (this.hash) { // subclasses can pass in their own differentiator + parts.push(this.hash); + } + + // include entities this issue is for + // (sort them so the id is deterministic) + if (this.entities) { + var entityKeys = this.entities.map(osmEntity.key).sort(); + parts.push.apply(parts, entityKeys); + } + + // include loc since two separate issues can have an + // idential type and entities, e.g. in crossing_ways + if (this.loc) { + parts.push.apply(parts, this.loc); + } + + return parts.join(':'); + } + + var _extent; + this.extent = function(resolver) { + if (_extent) return _extent; + + if (this.loc) { + return _extent = geoExtent(this.loc); + } + if (this.entities && this.entities.length) { + return _extent = this.entities.reduce(function(extent, entity) { + return extent.extend(entity.extent(resolver)); + }, geoExtent()); + } + return null; + }; + + + if (this.fixes) { // add a reference in the fixes to the issue for use in fix actions + for (var i = 0; i < this.fixes.length; i++) { + var fix = this.fixes[i]; + fix.issue = this; + if (fix.autoArgs) { + this.autoFix = fix; + } + } + } +} + + +export function validationIssueFix(attrs) { + this.title = attrs.title; // Required + this.onClick = attrs.onClick; // Required + this.icon = attrs.icon; // Optional - shows 'iD-icon-wrench' if not set + this.entityIds = attrs.entityIds || []; // Optional - Used for hover-higlighting. + this.autoArgs = attrs.autoArgs; // Optional - pass [actions, annotation] arglist if this fix can automatically run + + this.issue = null; // Generated link - added by ValidationIssue constructor +} diff --git a/modules/core/validator.js b/modules/core/validator.js index 78f244457..4083bfe04 100644 --- a/modules/core/validator.js +++ b/modules/core/validator.js @@ -1,8 +1,6 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { coreDifference } from './difference'; -import { geoExtent } from '../geo'; -import { osmEntity } from '../osm'; import { utilArrayGroupBy, utilCallWhenIdle, utilRebind } from '../util'; import * as Validations from '../validations/index'; @@ -346,82 +344,3 @@ export function coreValidator(context) { return validator; } - - - -export function validationIssue(attrs) { - this.type = attrs.type; // required - name of rule that created the issue (e.g. 'missing_tag') - this.severity = attrs.severity; // required - 'warning' or 'error' - this.message = attrs.message; // required - localized string - this.reference = attrs.reference; // optional - function(selection) to render reference information - this.entities = attrs.entities; // optional - array of entities involved in the issue - this.loc = attrs.loc; // optional - [lon, lat] to zoom in on to see the issue - this.data = attrs.data; // optional - object containing extra data for the fixes - this.fixes = attrs.fixes; // optional - array of validationIssueFix objects - this.hash = attrs.hash; // optional - string to further differentiate the issue - - this.id = generateID.apply(this); // generated - see below - this.autoFix = null; // generated - if autofix exists, will be set below - - // A unique, deterministic string hash. - // Issues with identical id values are considered identical. - function generateID() { - var parts = [this.type]; - - if (this.hash) { // subclasses can pass in their own differentiator - parts.push(this.hash); - } - - // include entities this issue is for - // (sort them so the id is deterministic) - if (this.entities) { - var entityKeys = this.entities.map(osmEntity.key).sort(); - parts.push.apply(parts, entityKeys); - } - - // include loc since two separate issues can have an - // idential type and entities, e.g. in crossing_ways - if (this.loc) { - parts.push.apply(parts, this.loc); - } - - return parts.join(':'); - } - - var _extent; - this.extent = function(resolver) { - if (_extent) return _extent; - - if (this.loc) { - return _extent = geoExtent(this.loc); - } - if (this.entities && this.entities.length) { - return _extent = this.entities.reduce(function(extent, entity) { - return extent.extend(entity.extent(resolver)); - }, geoExtent()); - } - return null; - }; - - - if (this.fixes) { // add a reference in the fixes to the issue for use in fix actions - for (var i = 0; i < this.fixes.length; i++) { - var fix = this.fixes[i]; - fix.issue = this; - if (fix.autoArgs) { - this.autoFix = fix; - } - } - } -} - - -export function validationIssueFix(attrs) { - this.title = attrs.title; // Required - this.onClick = attrs.onClick; // Required - this.icon = attrs.icon; // Optional - shows 'iD-icon-wrench' if not set - this.entityIds = attrs.entityIds || []; // Optional - Used for hover-higlighting. - this.autoArgs = attrs.autoArgs; // Optional - pass [actions, annotation] arglist if this fix can automatically run - - this.issue = null; // Generated link - added by ValidationIssue constructor -} diff --git a/modules/geo/extent.js b/modules/geo/extent.js index 92c2622a1..bc408b2a9 100644 --- a/modules/geo/extent.js +++ b/modules/geo/extent.js @@ -1,4 +1,4 @@ -import { geoMetersToLat, geoMetersToLon } from './index'; +import { geoMetersToLat, geoMetersToLon } from './geo'; export function geoExtent(min, max) { diff --git a/modules/index.js b/modules/index.js index 3c5abe18b..ae034647a 100644 --- a/modules/index.js +++ b/modules/index.js @@ -24,7 +24,8 @@ export * from './validations/index'; import { services } from './services/index'; var Connection = services.osm; export { Connection }; -export { coreContext as Context, setAreaKeys, areaKeys } from './core/context'; +export { coreContext as Context } from './core/context'; +export { setAreaKeys, areaKeys } from './core/area_keys'; export { coreDifference as Difference } from './core/difference'; export { coreGraph as Graph } from './core/graph'; export { coreHistory as History } from './core/history'; diff --git a/modules/modes/add_area.js b/modules/modes/add_area.js index 891cd0631..ca6da2ee1 100644 --- a/modules/modes/add_area.js +++ b/modules/modes/add_area.js @@ -1,12 +1,10 @@ import { t } from '../util/locale'; -import { - actionAddEntity, - actionAddMidpoint, - actionAddVertex -} from '../actions'; +import { actionAddEntity } from '../actions/add_entity'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionAddVertex } from '../actions/add_vertex'; -import { behaviorAddWay } from '../behavior'; -import { modeDrawArea } from './index'; +import { behaviorAddWay } from '../behavior/add_way'; +import { modeDrawArea } from './draw_area'; import { osmNode, osmWay } from '../osm'; diff --git a/modules/modes/add_line.js b/modules/modes/add_line.js index c4e6801f1..2f44ad8cd 100644 --- a/modules/modes/add_line.js +++ b/modules/modes/add_line.js @@ -1,12 +1,10 @@ import { t } from '../util/locale'; -import { - actionAddEntity, - actionAddMidpoint, - actionAddVertex -} from '../actions'; +import { actionAddEntity } from '../actions/add_entity'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionAddVertex } from '../actions/add_vertex'; -import { behaviorAddWay } from '../behavior'; -import { modeDrawLine } from './index'; +import { behaviorAddWay } from '../behavior/add_way'; +import { modeDrawLine } from './draw_line'; import { osmNode, osmWay } from '../osm'; diff --git a/modules/modes/add_note.js b/modules/modes/add_note.js index d7e105113..81112e85a 100644 --- a/modules/modes/add_note.js +++ b/modules/modes/add_note.js @@ -1,6 +1,7 @@ import { t } from '../util/locale'; -import { behaviorDraw } from '../behavior'; -import { modeBrowse, modeSelectNote } from './index'; +import { behaviorDraw } from '../behavior/draw'; +import { modeBrowse } from './browse'; +import { modeSelectNote } from './select_note'; import { osmNote } from '../osm'; import { services } from '../services'; diff --git a/modules/modes/add_point.js b/modules/modes/add_point.js index e854e3392..d2eb99061 100644 --- a/modules/modes/add_point.js +++ b/modules/modes/add_point.js @@ -1,9 +1,11 @@ import { t } from '../util/locale'; -import { actionAddEntity, actionChangeTags } from '../actions'; -import { behaviorDraw } from '../behavior'; -import { modeBrowse, modeSelect } from './index'; -import { osmNode } from '../osm'; -import { actionAddMidpoint } from '../actions'; +import { behaviorDraw } from '../behavior/draw'; +import { modeBrowse } from './browse'; +import { modeSelect } from './select'; +import { osmNode } from '../osm/node'; +import { actionAddEntity } from '../actions/add_entity'; +import { actionChangeTags } from '../actions/change_tags'; +import { actionAddMidpoint } from '../actions/add_midpoint'; export function modeAddPoint(context, mode) { diff --git a/modules/modes/browse.js b/modules/modes/browse.js index acd9cc6f3..0d7405ba8 100644 --- a/modules/modes/browse.js +++ b/modules/modes/browse.js @@ -1,11 +1,9 @@ import { t } from '../util/locale'; -import { - behaviorHover, - behaviorLasso, - behaviorPaste, - behaviorSelect -} from '../behavior'; +import { behaviorHover } from '../behavior/hover'; +import { behaviorLasso } from '../behavior/lasso'; +import { behaviorPaste } from '../behavior/paste'; +import { behaviorSelect } from '../behavior/select'; import { modeDragNode } from './drag_node'; import { modeDragNote } from './drag_note'; diff --git a/modules/modes/drag_node.js b/modules/modes/drag_node.js index 0dac1444f..8c5eb01d4 100644 --- a/modules/modes/drag_node.js +++ b/modules/modes/drag_node.js @@ -5,18 +5,14 @@ import { import { t } from '../util/locale'; -import { - actionAddMidpoint, - actionConnect, - actionMoveNode, - actionNoop -} from '../actions'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionConnect } from '../actions/connect'; +import { actionMoveNode } from '../actions/move_node'; +import { actionNoop } from '../actions/noop'; -import { - behaviorEdit, - behaviorHover, - behaviorDrag -} from '../behavior'; +import { behaviorDrag } from '../behavior/drag'; +import { behaviorEdit } from '../behavior/edit'; +import { behaviorHover } from '../behavior/hover'; import { geoChooseEdge, @@ -26,9 +22,10 @@ import { geoViewportEdge } from '../geo'; -import { modeBrowse, modeSelect } from './index'; +import { modeBrowse } from './browse'; +import { modeSelect } from './select'; import { osmJoinWays, osmNode } from '../osm'; -import { uiFlash } from '../ui'; +import { uiFlash } from '../ui/flash'; import { utilArrayIntersection, utilKeybinding } from '../util'; diff --git a/modules/modes/drag_note.js b/modules/modes/drag_note.js index 5c9714fc6..33389af6f 100644 --- a/modules/modes/drag_note.js +++ b/modules/modes/drag_note.js @@ -4,10 +4,11 @@ import { } from 'd3-selection'; import { services } from '../services'; -import { actionNoop } from '../actions'; -import { behaviorEdit, behaviorDrag } from '../behavior'; +import { actionNoop } from '../actions/noop'; +import { behaviorDrag } from '../behavior/drag'; +import { behaviorEdit } from '../behavior/edit'; import { geoVecSubtract, geoViewportEdge } from '../geo'; -import { modeSelectNote } from './index'; +import { modeSelectNote } from './select_note'; export function modeDragNote(context) { diff --git a/modules/modes/draw_area.js b/modules/modes/draw_area.js index 7496dd574..2f061b900 100644 --- a/modules/modes/draw_area.js +++ b/modules/modes/draw_area.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { behaviorDrawWay } from '../behavior'; +import { behaviorDrawWay } from '../behavior/draw_way'; export function modeDrawArea(context, wayID, startGraph, baselineGraph, button) { diff --git a/modules/modes/draw_line.js b/modules/modes/draw_line.js index bc63806db..1d8d2ba00 100644 --- a/modules/modes/draw_line.js +++ b/modules/modes/draw_line.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { behaviorDrawWay } from '../behavior'; +import { behaviorDrawWay } from '../behavior/draw_way'; export function modeDrawLine(context, wayID, startGraph, baselineGraph, button, affix, continuing) { diff --git a/modules/modes/move.js b/modules/modes/move.js index 1d9c3ee7c..1405f0d47 100644 --- a/modules/modes/move.js +++ b/modules/modes/move.js @@ -5,23 +5,20 @@ import { import { t } from '../util/locale'; -import { - actionMove, - actionNoop -} from '../actions'; -import { behaviorEdit } from '../behavior'; +import { actionMove } from '../actions/move'; +import { actionNoop } from '../actions/noop'; +import { behaviorEdit } from '../behavior/edit'; import { geoViewportEdge, geoVecSubtract } from '../geo'; -import { modeBrowse, modeSelect } from './index'; +import { modeBrowse } from './browse'; +import { modeSelect } from './select'; import { utilKeybinding } from '../util'; -import { - operationCircularize, - operationDelete, - operationOrthogonalize, - operationReflectLong, - operationReflectShort, - operationRotate -} from '../operations'; + +import { operationCircularize } from '../operations/circularize'; +import { operationDelete } from '../operations/delete'; +import { operationOrthogonalize } from '../operations/orthogonalize'; +import { operationReflectLong, operationReflectShort } from '../operations/reflect'; +import { operationRotate } from '../operations/rotate'; export function modeMove(context, entityIDs, baseGraph) { @@ -178,4 +175,4 @@ export function modeMove(context, entityIDs, baseGraph) { return mode; -} \ No newline at end of file +} diff --git a/modules/modes/rotate.js b/modules/modes/rotate.js index 060b1c25a..11821a002 100644 --- a/modules/modes/rotate.js +++ b/modules/modes/rotate.js @@ -9,22 +9,18 @@ import { } from 'd3-polygon'; import { t } from '../util/locale'; -import { - actionRotate, - actionNoop -} from '../actions'; -import { behaviorEdit } from '../behavior'; +import { actionRotate } from '../actions/rotate'; +import { actionNoop } from '../actions/noop'; +import { behaviorEdit } from '../behavior/edit'; import { geoVecInterp } from '../geo'; -import { modeBrowse, modeSelect } from './index'; +import { modeBrowse } from './browse'; +import { modeSelect } from './select'; -import { - operationCircularize, - operationDelete, - operationMove, - operationOrthogonalize, - operationReflectLong, - operationReflectShort -} from '../operations'; +import { operationCircularize } from '../operations/circularize'; +import { operationDelete } from '../operations/delete'; +import { operationMove } from '../operations/move'; +import { operationOrthogonalize } from '../operations/orthogonalize'; +import { operationReflectLong, operationReflectShort } from '../operations/reflect'; import { utilGetAllNodes, utilKeybinding } from '../util'; @@ -163,4 +159,4 @@ export function modeRotate(context, entityIDs) { return mode; -} \ No newline at end of file +} diff --git a/modules/modes/save.js b/modules/modes/save.js index bf3022c85..9369fade1 100644 --- a/modules/modes/save.js +++ b/modules/modes/save.js @@ -1,11 +1,19 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { actionDiscardTags, actionMergeRemoteChanges, actionNoop, actionRevert } from '../actions'; -import { coreGraph } from '../core'; -import { modeBrowse, modeSelect } from './index'; +import { actionDiscardTags } from '../actions/discard_tags'; +import { actionMergeRemoteChanges } from '../actions/merge_remote_changes'; +import { actionNoop } from '../actions/noop'; +import { actionRevert } from '../actions/revert'; +import { coreGraph } from '../core/graph'; +import { modeBrowse } from './browse'; +import { modeSelect } from './select'; import { services } from '../services'; -import { uiConflicts, uiConfirm, uiCommit, uiLoading, uiSuccess } from '../ui'; +import { uiConflicts } from '../ui/conflicts'; +import { uiConfirm } from '../ui/confirm'; +import { uiCommit } from '../ui/commit'; +import { uiLoading } from '../ui/loading'; +import { uiSuccess } from '../ui/success'; import { utilArrayUnion, utilArrayUniq, utilDisplayName, utilDisplayType, utilKeybinding } from '../util'; diff --git a/modules/modes/select.js b/modules/modes/select.js index b090abf61..5af485984 100644 --- a/modules/modes/select.js +++ b/modules/modes/select.js @@ -2,18 +2,24 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { actionAddMidpoint, actionDeleteRelation } from '../actions'; -import { - behaviorBreathe, behaviorCopy, behaviorHover, - behaviorLasso, behaviorPaste, behaviorSelect -} from '../behavior'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionDeleteRelation } from '../actions/delete_relation'; + +import { behaviorBreathe } from '../behavior/breathe'; +import { behaviorCopy } from '../behavior/copy'; +import { behaviorHover } from '../behavior/hover'; +import { behaviorLasso } from '../behavior/lasso'; +import { behaviorPaste } from '../behavior/paste'; +import { behaviorSelect } from '../behavior/select'; + import { geoExtent, geoChooseEdge, geoPointInPolygon } from '../geo'; import { modeBrowse } from './browse'; import { modeDragNode } from './drag_node'; import { modeDragNote } from './drag_note'; import { osmNode, osmWay } from '../osm'; import * as Operations from '../operations/index'; -import { uiEditMenu, uiSelectionList } from '../ui'; +import { uiEditMenu } from '../ui/edit_menu'; +import { uiSelectionList } from '../ui/selection_list'; import { uiCmd } from '../ui/cmd'; import { utilArrayIntersection, utilEntityOrMemberSelector, @@ -21,7 +27,7 @@ import { } from '../util'; // deprecation warning - Radial Menu to be removed in iD v3 -import { uiRadialMenu } from '../ui'; +import { uiRadialMenu } from '../ui/radial_menu'; var _relatedParent; diff --git a/modules/modes/select_data.js b/modules/modes/select_data.js index a32217175..0a6e3c5da 100644 --- a/modules/modes/select_data.js +++ b/modules/modes/select_data.js @@ -5,18 +5,18 @@ import { select as d3_select } from 'd3-selection'; -import { - behaviorBreathe, - behaviorHover, - behaviorLasso, - behaviorSelect -} from '../behavior'; +import { behaviorBreathe } from '../behavior/breathe'; +import { behaviorHover } from '../behavior/hover'; +import { behaviorLasso } from '../behavior/lasso'; +import { behaviorSelect } from '../behavior/select'; import { t } from '../util/locale'; import { geoExtent } from '../geo'; -import { modeBrowse, modeDragNode, modeDragNote } from '../modes'; -import { uiDataEditor } from '../ui'; +import { modeBrowse } from './browse'; +import { modeDragNode } from './drag_node'; +import { modeDragNote } from './drag_note'; +import { uiDataEditor } from '../ui/data_editor'; import { utilKeybinding } from '../util'; diff --git a/modules/modes/select_error.js b/modules/modes/select_error.js index 3350fcf2a..774822b68 100644 --- a/modules/modes/select_error.js +++ b/modules/modes/select_error.js @@ -3,17 +3,18 @@ import { select as d3_select } from 'd3-selection'; -import { - behaviorBreathe, - behaviorHover, - behaviorLasso, - behaviorSelect -} from '../behavior'; +import { behaviorBreathe } from '../behavior/breathe'; +import { behaviorHover } from '../behavior/hover'; +import { behaviorLasso } from '../behavior/lasso'; +import { behaviorSelect } from '../behavior/select'; import { t } from '../util/locale'; import { services } from '../services'; -import { modeBrowse, modeDragNode, modeDragNote } from '../modes'; -import { uiImproveOsmEditor, uiKeepRightEditor } from '../ui'; +import { modeBrowse } from './browse'; +import { modeDragNode } from './drag_node'; +import { modeDragNote } from './drag_note'; +import { uiImproveOsmEditor } from '../ui/improveOSM_editor'; +import { uiKeepRightEditor } from '../ui/keepRight_editor'; import { utilKeybinding } from '../util'; diff --git a/modules/modes/select_note.js b/modules/modes/select_note.js index cd0187abb..3381f4daf 100644 --- a/modules/modes/select_note.js +++ b/modules/modes/select_note.js @@ -3,18 +3,18 @@ import { select as d3_select } from 'd3-selection'; -import { - behaviorBreathe, - behaviorHover, - behaviorLasso, - behaviorSelect -} from '../behavior'; +import { behaviorBreathe } from '../behavior/breathe'; +import { behaviorHover } from '../behavior/hover'; +import { behaviorLasso } from '../behavior/lasso'; +import { behaviorSelect } from '../behavior/select'; import { t } from '../util/locale'; -import { modeBrowse, modeDragNode, modeDragNote } from '../modes'; +import { modeBrowse } from './browse'; +import { modeDragNode } from './drag_node'; +import { modeDragNote } from './drag_note'; import { services } from '../services'; -import { uiNoteEditor } from '../ui'; +import { uiNoteEditor } from '../ui/note_editor'; import { utilKeybinding } from '../util'; diff --git a/modules/operations/circularize.js b/modules/operations/circularize.js index bd58c4aba..3cccd08c8 100644 --- a/modules/operations/circularize.js +++ b/modules/operations/circularize.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { actionCircularize } from '../actions'; -import { behaviorOperation } from '../behavior'; +import { actionCircularize } from '../actions/circularize'; +import { behaviorOperation } from '../behavior/operation'; import { utilGetAllNodes } from '../util'; diff --git a/modules/operations/continue.js b/modules/operations/continue.js index eb4dcd595..732fa47ea 100644 --- a/modules/operations/continue.js +++ b/modules/operations/continue.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { modeDrawLine } from '../modes'; -import { behaviorOperation } from '../behavior'; +import { modeDrawLine } from '../modes/draw_line'; +import { behaviorOperation } from '../behavior/operation'; import { utilArrayGroupBy } from '../util'; diff --git a/modules/operations/delete.js b/modules/operations/delete.js index 81d12ca2c..fe5806f24 100644 --- a/modules/operations/delete.js +++ b/modules/operations/delete.js @@ -1,9 +1,10 @@ import { t } from '../util/locale'; -import { actionDeleteMultiple } from '../actions'; -import { behaviorOperation } from '../behavior'; +import { actionDeleteMultiple } from '../actions/delete_multiple'; +import { behaviorOperation } from '../behavior/operation'; import { geoExtent, geoSphericalDistance } from '../geo'; -import { modeBrowse, modeSelect } from '../modes'; -import { uiCmd } from '../ui'; +import { modeBrowse } from '../modes/browse'; +import { modeSelect } from '../modes/select'; +import { uiCmd } from '../ui/cmd'; import { utilGetAllNodes } from '../util'; diff --git a/modules/operations/disconnect.js b/modules/operations/disconnect.js index fcba4d080..70450938c 100644 --- a/modules/operations/disconnect.js +++ b/modules/operations/disconnect.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { actionDisconnect } from '../actions/index'; -import { behaviorOperation } from '../behavior/index'; +import { actionDisconnect } from '../actions/disconnect'; +import { behaviorOperation } from '../behavior/operation'; import { utilGetAllNodes } from '../util/index'; diff --git a/modules/operations/downgrade.js b/modules/operations/downgrade.js index 87fc79a34..9e197e4ba 100644 --- a/modules/operations/downgrade.js +++ b/modules/operations/downgrade.js @@ -1,8 +1,8 @@ -import { actionChangeTags } from '../actions'; -import { behaviorOperation } from '../behavior'; -import { modeSelect } from '../modes'; +import { actionChangeTags } from '../actions/change_tags'; +import { behaviorOperation } from '../behavior/operation'; +import { modeSelect } from '../modes/select'; import { t } from '../util/locale'; -import { uiCmd } from '../ui'; +import { uiCmd } from '../ui/cmd'; export function operationDowngrade(selectedIDs, context) { diff --git a/modules/operations/extract.js b/modules/operations/extract.js index 7647d9180..bc44b2dd7 100644 --- a/modules/operations/extract.js +++ b/modules/operations/extract.js @@ -1,6 +1,7 @@ -import { actionExtract, actionMoveNode } from '../actions'; -import { behaviorOperation } from '../behavior'; -import { modeMove } from '../modes'; +import { actionExtract } from '../actions/extract'; +import { actionMoveNode } from '../actions/move_node'; +import { behaviorOperation } from '../behavior/operation'; +import { modeMove } from '../modes/move'; import { t } from '../util/locale'; diff --git a/modules/operations/merge.js b/modules/operations/merge.js index 49154134b..0d80287e3 100644 --- a/modules/operations/merge.js +++ b/modules/operations/merge.js @@ -1,12 +1,13 @@ import { t } from '../util/locale'; -import { - actionChangePreset, actionJoin, actionMerge, - actionMergeNodes, actionMergePolygon -} from '../actions'; +import { actionChangePreset } from '../actions/change_preset'; +import { actionJoin } from '../actions/join'; +import { actionMerge } from '../actions/merge'; +import { actionMergeNodes } from '../actions/merge_nodes'; +import { actionMergePolygon } from '../actions/merge_polygon'; -import { behaviorOperation } from '../behavior'; -import { modeSelect } from '../modes'; +import { behaviorOperation } from '../behavior/operation'; +import { modeSelect } from '../modes/select'; export function operationMerge(selectedIDs, context) { diff --git a/modules/operations/move.js b/modules/operations/move.js index f79b0a4ce..e854f64f4 100644 --- a/modules/operations/move.js +++ b/modules/operations/move.js @@ -1,7 +1,7 @@ import { t } from '../util/locale'; -import { behaviorOperation } from '../behavior'; +import { behaviorOperation } from '../behavior/operation'; import { geoExtent } from '../geo'; -import { modeMove } from '../modes'; +import { modeMove } from '../modes/move'; import { utilGetAllNodes } from '../util'; diff --git a/modules/operations/orthogonalize.js b/modules/operations/orthogonalize.js index 08685885d..74594b9e5 100644 --- a/modules/operations/orthogonalize.js +++ b/modules/operations/orthogonalize.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { actionOrthogonalize } from '../actions/index'; -import { behaviorOperation } from '../behavior/index'; +import { actionOrthogonalize } from '../actions/orthogonalize'; +import { behaviorOperation } from '../behavior/operation'; import { utilGetAllNodes } from '../util'; @@ -16,7 +16,7 @@ export function operationOrthogonalize(selectedIDs, context) { context.validator().validate(); }; } - + var nodes = utilGetAllNodes(selectedIDs, context.graph()); var coords = nodes.map(function(n) { return n.loc; }); diff --git a/modules/operations/reflect.js b/modules/operations/reflect.js index 4fd8cdb92..e6fe52b2d 100644 --- a/modules/operations/reflect.js +++ b/modules/operations/reflect.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { actionReflect } from '../actions'; -import { behaviorOperation } from '../behavior'; +import { actionReflect } from '../actions/reflect'; +import { behaviorOperation } from '../behavior/operation'; import { geoExtent } from '../geo'; import { utilGetAllNodes } from '../util'; diff --git a/modules/operations/reverse.js b/modules/operations/reverse.js index c14c64643..ba2ca84b0 100644 --- a/modules/operations/reverse.js +++ b/modules/operations/reverse.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { actionReverse } from '../actions/index'; -import { behaviorOperation } from '../behavior/index'; +import { actionReverse } from '../actions/reverse'; +import { behaviorOperation } from '../behavior/operation'; export function operationReverse(selectedIDs, context) { diff --git a/modules/operations/rotate.js b/modules/operations/rotate.js index f1fef1b80..e85dc2592 100644 --- a/modules/operations/rotate.js +++ b/modules/operations/rotate.js @@ -1,7 +1,7 @@ import { t } from '../util/locale'; -import { behaviorOperation } from '../behavior'; +import { behaviorOperation } from '../behavior/operation'; import { geoExtent } from '../geo'; -import { modeRotate } from '../modes'; +import { modeRotate } from '../modes/rotate'; import { utilGetAllNodes } from '../util'; diff --git a/modules/operations/split.js b/modules/operations/split.js index b2c583107..1ffd2c3db 100644 --- a/modules/operations/split.js +++ b/modules/operations/split.js @@ -1,7 +1,7 @@ import { t } from '../util/locale'; -import { actionSplit } from '../actions/index'; -import { behaviorOperation } from '../behavior/index'; -import { modeSelect } from '../modes/index'; +import { actionSplit } from '../actions/split'; +import { behaviorOperation } from '../behavior/operation'; +import { modeSelect } from '../modes/select'; export function operationSplit(selectedIDs, context) { diff --git a/modules/operations/straighten.js b/modules/operations/straighten.js index 3aa0ea772..79f91ff2b 100644 --- a/modules/operations/straighten.js +++ b/modules/operations/straighten.js @@ -1,6 +1,7 @@ import { t } from '../util/locale'; -import { actionStraightenNodes, actionStraightenWay } from '../actions/index'; -import { behaviorOperation } from '../behavior/index'; +import { actionStraightenNodes } from '../actions/straighten_nodes'; +import { actionStraightenWay } from '../actions/straighten_way'; +import { behaviorOperation } from '../behavior/operation'; import { utilArrayDifference, utilGetAllNodes } from '../util/index'; diff --git a/modules/osm/intersection.js b/modules/osm/intersection.js index 125e2ccfe..72bbc93dc 100644 --- a/modules/osm/intersection.js +++ b/modules/osm/intersection.js @@ -1,5 +1,7 @@ -import { actionDeleteRelation, actionReverse, actionSplit } from '../actions'; -import { coreGraph } from '../core'; +import { actionDeleteRelation } from '../actions/delete_relation'; +import { actionReverse } from '../actions/reverse'; +import { actionSplit } from '../actions/split'; +import { coreGraph } from '../core/graph'; import { geoAngle, geoSphericalDistance } from '../geo'; import { osmEntity } from './entity'; import { utilArrayDifference, utilArrayUniq } from '../util'; diff --git a/modules/osm/way.js b/modules/osm/way.js index 9dbdcabac..0b4425df9 100644 --- a/modules/osm/way.js +++ b/modules/osm/way.js @@ -4,7 +4,7 @@ import { geoExtent, geoVecCross } from '../geo'; import { osmEntity } from './entity'; import { osmLanes } from './lanes'; import { osmOneWayTags, osmRightSideIsInsideTags } from './tags'; -import { areaKeys } from '../core/context'; +import { areaKeys } from '../core/area_keys'; import { utilArrayUniq } from '../util'; diff --git a/modules/presets/preset.js b/modules/presets/preset.js index 121483873..1416a6a2a 100644 --- a/modules/presets/preset.js +++ b/modules/presets/preset.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { areaKeys } from '../core/context'; +import { areaKeys } from '../core/area_keys'; import { utilArrayUniq, utilObjectOmit } from '../util'; diff --git a/modules/renderer/map.js b/modules/renderer/map.js index df2f58edc..2ea47f1c7 100644 --- a/modules/renderer/map.js +++ b/modules/renderer/map.js @@ -8,9 +8,9 @@ import { zoom as d3_zoom, zoomIdentity as d3_zoomIdentity } from 'd3-zoom'; import { t } from '../util/locale'; import { geoExtent, geoRawMercator, geoScaleToZoom, geoZoomToScale } from '../geo'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { svgAreas, svgLabels, svgLayers, svgLines, svgMidpoints, svgPoints, svgVertices } from '../svg'; -import { uiFlash } from '../ui'; +import { uiFlash } from '../ui/flash'; import { utilFastMouse, utilFunctor, utilRebind, utilSetTransform } from '../util'; import { utilBindOnce } from '../util/bind_once'; import { utilDetect } from '../util/detect'; diff --git a/modules/services/improveOSM.js b/modules/services/improveOSM.js index a4e714238..a3dd76078 100644 --- a/modules/services/improveOSM.js +++ b/modules/services/improveOSM.js @@ -6,7 +6,7 @@ import { request as d3_request } from 'd3-request'; import { geoExtent, geoVecAdd, geoVecScale } from '../geo'; import { qaError } from '../osm'; -import { services } from './index'; +import { serviceOsm } from './index'; import { t } from '../util/locale'; import { utilRebind, utilTiler, utilQsString } from '../util'; @@ -359,7 +359,7 @@ export default { }, postUpdate: function(d, callback) { - if (!services.osm.authenticated()) { // Username required in payload + if (!serviceOsm.authenticated()) { // Username required in payload return callback({ message: 'Not Authenticated', status: -3}, d); } if (_erCache.inflightPost[d.id]) { @@ -369,7 +369,7 @@ export default { var that = this; // Payload can only be sent once username is established - services.osm.userDetails(sendPayload); + serviceOsm.userDetails(sendPayload); function sendPayload(err, user) { if (err) { return callback(err, d); } diff --git a/modules/services/mapillary.js b/modules/services/mapillary.js index 1369b0e30..27ead5541 100644 --- a/modules/services/mapillary.js +++ b/modules/services/mapillary.js @@ -9,7 +9,7 @@ import { import rbush from 'rbush'; import { geoExtent, geoScaleToZoom } from '../geo'; -import { svgDefs } from '../svg'; +import { svgDefs } from '../svg/defs'; import { utilArrayUnion, utilQsString, utilRebind, utilTiler } from '../util'; diff --git a/modules/services/maprules.js b/modules/services/maprules.js index b90b79e26..559969872 100644 --- a/modules/services/maprules.js +++ b/modules/services/maprules.js @@ -1,6 +1,6 @@ -import { areaKeys } from '../core/context'; +import { areaKeys } from '../core/area_keys'; import { utilArrayIntersection } from '../util'; -import { validationIssue } from '../core/validator'; +import { validationIssue } from '../core/validation'; var buildRuleChecks = function() { diff --git a/modules/svg/areas.js b/modules/svg/areas.js index 5f2c19bbc..1de853d35 100644 --- a/modules/svg/areas.js +++ b/modules/svg/areas.js @@ -1,7 +1,8 @@ import { bisector as d3_bisector } from 'd3-array'; import { osmEntity, osmIsOldMultipolygonOuterMember } from '../osm'; -import { svgPath, svgSegmentWay, svgTagClasses } from './index'; +import { svgPath, svgSegmentWay } from './helpers'; +import { svgTagClasses } from './tag_classes'; export function svgAreas(projection, context) { diff --git a/modules/svg/data.js b/modules/svg/data.js index 64a0aacc4..4cf71b947 100644 --- a/modules/svg/data.js +++ b/modules/svg/data.js @@ -17,7 +17,7 @@ import toGeoJSON from '@mapbox/togeojson'; import { geoExtent, geoPolygonIntersectsPolygon } from '../geo'; import { services } from '../services'; -import { svgPath } from './index'; +import { svgPath } from './helpers'; import { utilDetect } from '../util/detect'; import { utilArrayFlatten, utilArrayUnion, utilHashcode } from '../util'; diff --git a/modules/svg/debug.js b/modules/svg/debug.js index a0ef97172..3b042c787 100644 --- a/modules/svg/debug.js +++ b/modules/svg/debug.js @@ -1,7 +1,7 @@ import { select as d3_select } from 'd3-selection'; import { data, dataImperial, dataDriveLeft } from '../../data'; -import { svgPath } from './index'; +import { svgPath } from './helpers'; export function svgDebug(projection, context) { diff --git a/modules/svg/improveOSM.js b/modules/svg/improveOSM.js index 84909085d..1c5540299 100644 --- a/modules/svg/improveOSM.js +++ b/modules/svg/improveOSM.js @@ -1,8 +1,8 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { modeBrowse } from '../modes'; -import { svgPointTransform } from './index'; +import { modeBrowse } from '../modes/browse'; +import { svgPointTransform } from './helpers'; import { services } from '../services'; var _improveOsmEnabled = false; @@ -258,4 +258,4 @@ export function svgImproveOSM(projection, context, dispatch) { return drawImproveOSM; -} \ No newline at end of file +} diff --git a/modules/svg/keepRight.js b/modules/svg/keepRight.js index dffb7bddb..8e19bab42 100644 --- a/modules/svg/keepRight.js +++ b/modules/svg/keepRight.js @@ -1,8 +1,8 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { modeBrowse } from '../modes'; -import { svgPointTransform } from './index'; +import { modeBrowse } from '../modes/browse'; +import { svgPointTransform } from './helpers'; import { services } from '../services'; var _keepRightEnabled = false; @@ -247,4 +247,4 @@ export function svgKeepRight(projection, context, dispatch) { return drawKeepRight; -} \ No newline at end of file +} diff --git a/modules/svg/lines.js b/modules/svg/lines.js index b3f9974ed..b8ab3ed15 100644 --- a/modules/svg/lines.js +++ b/modules/svg/lines.js @@ -1,8 +1,9 @@ import { range as d3_range } from 'd3-array'; import { - svgMarkerSegments, svgPath, svgRelationMemberTags, svgSegmentWay, svgTagClasses -} from './index'; + svgMarkerSegments, svgPath, svgRelationMemberTags, svgSegmentWay +} from './helpers'; +import { svgTagClasses } from './tag_classes'; import { osmEntity, osmOldMultipolygonOuterMember } from '../osm'; import { utilArrayFlatten, utilArrayGroupBy } from '../util'; diff --git a/modules/svg/mapillary_images.js b/modules/svg/mapillary_images.js index 3367139e6..38b048a67 100644 --- a/modules/svg/mapillary_images.js +++ b/modules/svg/mapillary_images.js @@ -1,7 +1,7 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { svgPath, svgPointTransform } from './index'; +import { svgPath, svgPointTransform } from './helpers'; import { services } from '../services'; diff --git a/modules/svg/mapillary_signs.js b/modules/svg/mapillary_signs.js index cffffdce7..b1e1da65a 100644 --- a/modules/svg/mapillary_signs.js +++ b/modules/svg/mapillary_signs.js @@ -1,6 +1,6 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { svgPointTransform } from './index'; +import { svgPointTransform } from './helpers'; import { services } from '../services'; diff --git a/modules/svg/midpoints.js b/modules/svg/midpoints.js index 258818442..278203883 100644 --- a/modules/svg/midpoints.js +++ b/modules/svg/midpoints.js @@ -1,4 +1,5 @@ -import { svgPointTransform, svgTagClasses } from './index'; +import { svgPointTransform } from './helpers'; +import { svgTagClasses } from './tag_classes'; import { geoAngle, geoLineIntersection, geoVecInterp, geoVecLength } from '../geo'; diff --git a/modules/svg/notes.js b/modules/svg/notes.js index 14e42c87d..bc8fc55e7 100644 --- a/modules/svg/notes.js +++ b/modules/svg/notes.js @@ -3,8 +3,8 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; import { dispatch as d3_dispatch } from 'd3-dispatch'; -import { modeBrowse } from '../modes'; -import { svgPointTransform } from './index'; +import { modeBrowse } from '../modes/browse'; +import { svgPointTransform } from './helpers'; import { services } from '../services'; diff --git a/modules/svg/openstreetcam_images.js b/modules/svg/openstreetcam_images.js index 869f5d4d6..d5781e7e1 100644 --- a/modules/svg/openstreetcam_images.js +++ b/modules/svg/openstreetcam_images.js @@ -1,6 +1,6 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { svgPath, svgPointTransform } from './index'; +import { svgPath, svgPointTransform } from './helpers'; import { services } from '../services'; diff --git a/modules/svg/points.js b/modules/svg/points.js index 24d185a50..3a37a0fbc 100644 --- a/modules/svg/points.js +++ b/modules/svg/points.js @@ -1,6 +1,7 @@ import { geoScaleToZoom } from '../geo'; import { osmEntity } from '../osm'; -import { svgPointTransform, svgTagClasses } from './index'; +import { svgPointTransform } from './helpers'; +import { svgTagClasses } from './tag_classes'; export function svgPoints(projection, context) { diff --git a/modules/svg/streetside.js b/modules/svg/streetside.js index b0ef73c12..32c11c938 100644 --- a/modules/svg/streetside.js +++ b/modules/svg/streetside.js @@ -1,6 +1,6 @@ import _throttle from 'lodash-es/throttle'; import { select as d3_select } from 'd3-selection'; -import { svgPath, svgPointTransform } from './index'; +import { svgPath, svgPointTransform } from './helpers'; import { services } from '../services'; diff --git a/modules/svg/vertices.js b/modules/svg/vertices.js index 7163a82ed..1c48a64ae 100644 --- a/modules/svg/vertices.js +++ b/modules/svg/vertices.js @@ -2,7 +2,7 @@ import { select as d3_select } from 'd3-selection'; import { geoScaleToZoom } from '../geo'; import { osmEntity } from '../osm'; -import { svgPassiveVertex, svgPointTransform } from './index'; +import { svgPassiveVertex, svgPointTransform } from './helpers'; export function svgVertices(projection, context) { diff --git a/modules/ui/account.js b/modules/ui/account.js index da45f3986..9f7620e34 100644 --- a/modules/ui/account.js +++ b/modules/ui/account.js @@ -1,7 +1,7 @@ import { event as d3_event } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiAccount(context) { diff --git a/modules/ui/background.js b/modules/ui/background.js index 7efead2f8..34773f479 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -11,7 +11,7 @@ import { } from 'd3-selection'; import { t, textDirection } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiBackgroundDisplayOptions } from './background_display_options'; import { uiBackgroundOffset } from './background_offset'; import { uiCmd } from './cmd'; diff --git a/modules/ui/background_display_options.js b/modules/ui/background_display_options.js index c434e74e9..f22f5d7e8 100644 --- a/modules/ui/background_display_options.js +++ b/modules/ui/background_display_options.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { t, textDirection } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiDisclosure } from './disclosure'; import { utilDetect } from '../util/detect'; diff --git a/modules/ui/background_offset.js b/modules/ui/background_offset.js index 7a765591e..443c90357 100644 --- a/modules/ui/background_offset.js +++ b/modules/ui/background_offset.js @@ -6,7 +6,7 @@ import { import { t, textDirection } from '../util/locale'; import { geoMetersToOffset, geoOffsetToMeters } from '../geo'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiDisclosure } from './disclosure'; diff --git a/modules/ui/changeset_editor.js b/modules/ui/changeset_editor.js index e2e8bb1cf..2c4a41de1 100644 --- a/modules/ui/changeset_editor.js +++ b/modules/ui/changeset_editor.js @@ -1,8 +1,10 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; -import { uiCombobox, uiField, uiFormFields } from './index'; +import { svgIcon } from '../svg/icon'; +import { uiCombobox} from './combobox'; +import { uiField } from './field'; +import { uiFormFields } from './form_fields'; import { utilArrayUniqBy, utilRebind, utilTriggerEvent } from '../util'; diff --git a/modules/ui/commit.js b/modules/ui/commit.js index d8ce64a53..6e25b1b81 100644 --- a/modules/ui/commit.js +++ b/modules/ui/commit.js @@ -3,9 +3,9 @@ import { select as d3_select } from 'd3-selection'; import deepEqual from 'fast-deep-equal'; import { t } from '../util/locale'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { osmChangeset } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { services } from '../services'; import { tooltip } from '../util/tooltip'; import { uiChangesetEditor } from './changeset_editor'; diff --git a/modules/ui/commit_changes.js b/modules/ui/commit_changes.js index 54cfd5898..407db9635 100644 --- a/modules/ui/commit_changes.js +++ b/modules/ui/commit_changes.js @@ -2,9 +2,9 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; import { JXON } from '../util/jxon'; -import { actionDiscardTags } from '../actions'; +import { actionDiscardTags } from '../actions/discard_tags'; import { osmChangeset } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilDetect } from '../util/detect'; import { diff --git a/modules/ui/commit_warnings.js b/modules/ui/commit_warnings.js index bf75f30c6..a335840ca 100644 --- a/modules/ui/commit_warnings.js +++ b/modules/ui/commit_warnings.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; -import { modeSelect } from '../modes'; -import { svgIcon } from '../svg'; +import { modeSelect } from '../modes/select'; +import { svgIcon } from '../svg/icon'; import { tooltip } from '../util/tooltip'; import { utilEntityOrMemberSelector } from '../util'; diff --git a/modules/ui/conflicts.js b/modules/ui/conflicts.js index 6fee72c21..3f7eed771 100644 --- a/modules/ui/conflicts.js +++ b/modules/ui/conflicts.js @@ -9,7 +9,7 @@ import { t } from '../util/locale'; import { JXON } from '../util/jxon'; import { geoExtent } from '../geo'; import { osmChangeset } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilDetect } from '../util/detect'; import { diff --git a/modules/ui/data_editor.js b/modules/ui/data_editor.js index 59d25bb3f..7bf69e7ae 100644 --- a/modules/ui/data_editor.js +++ b/modules/ui/data_editor.js @@ -1,13 +1,11 @@ import { t } from '../util/locale'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; -import { - uiDataHeader, - uiQuickLinks, - uiRawTagEditor, - uiTooltipHtml -} from './index'; +import { uiDataHeader } from './data_header'; +import { uiQuickLinks } from './quick_links'; +import { uiRawTagEditor } from './raw_tag_editor'; +import { uiTooltipHtml } from './tooltipHtml'; export function uiDataEditor(context) { diff --git a/modules/ui/data_header.js b/modules/ui/data_header.js index fec0026af..cacbc198e 100644 --- a/modules/ui/data_header.js +++ b/modules/ui/data_header.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiDataHeader() { diff --git a/modules/ui/disclosure.js b/modules/ui/disclosure.js index 6b9f3f7c7..1c8a6bfa9 100644 --- a/modules/ui/disclosure.js +++ b/modules/ui/disclosure.js @@ -1,7 +1,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { event as d3_event } from 'd3-selection'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilRebind } from '../util/rebind'; import { uiToggle } from './toggle'; import { textDirection } from '../util/locale'; diff --git a/modules/ui/entity_editor.js b/modules/ui/entity_editor.js index a5e8e76f3..9b3ae46e1 100644 --- a/modules/ui/entity_editor.js +++ b/modules/ui/entity_editor.js @@ -4,9 +4,9 @@ import deepEqual from 'fast-deep-equal'; import { t, textDirection } from '../util/locale'; import { tooltip } from '../util/tooltip'; -import { actionChangeTags } from '../actions'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { actionChangeTags } from '../actions/change_tags'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; import { uiPresetFavoriteButton } from './preset_favorite_button'; import { uiPresetIcon } from './preset_icon'; import { uiQuickLinks } from './quick_links'; diff --git a/modules/ui/entity_issues.js b/modules/ui/entity_issues.js index 4b961c4f0..b8122aec8 100644 --- a/modules/ui/entity_issues.js +++ b/modules/ui/entity_issues.js @@ -1,6 +1,6 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { t } from '../util/locale'; import { uiDisclosure } from './disclosure'; import { utilHighlightEntities } from '../util'; diff --git a/modules/ui/feature_list.js b/modules/ui/feature_list.js index 0aefcf253..9ee43b369 100644 --- a/modules/ui/feature_list.js +++ b/modules/ui/feature_list.js @@ -6,12 +6,12 @@ import { import * as sexagesimal from '@mapbox/sexagesimal'; import { t } from '../util/locale'; import { dmsCoordinatePair } from '../util/units'; -import { coreGraph } from '../core'; +import { coreGraph } from '../core/graph'; import { geoExtent, geoChooseEdge } from '../geo'; -import { modeSelect } from '../modes'; -import { osmEntity } from '../osm'; +import { modeSelect } from '../modes/select'; +import { osmEntity } from '../osm/entity'; import { services } from '../services'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiCmd } from './cmd'; import { diff --git a/modules/ui/field.js b/modules/ui/field.js index 3db7f7e2e..6b2813563 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -7,7 +7,7 @@ import { import { t } from '../util/locale'; import { textDirection } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiFieldHelp } from './field_help'; import { uiFields } from './fields'; import { uiTagReference } from './tag_reference'; diff --git a/modules/ui/field_help.js b/modules/ui/field_help.js index fcc54f42d..edd3ab3ab 100644 --- a/modules/ui/field_help.js +++ b/modules/ui/field_help.js @@ -5,7 +5,7 @@ import { import marked from 'marked'; import { t, textDirection } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { icon } from './intro/helper'; diff --git a/modules/ui/fields/access.js b/modules/ui/fields/access.js index 4256313e5..690deadc3 100644 --- a/modules/ui/fields/access.js +++ b/modules/ui/fields/access.js @@ -1,7 +1,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { select as d3_select } from 'd3-selection'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/fields/address.js b/modules/ui/fields/address.js index 554006135..41c1db07f 100644 --- a/modules/ui/fields/address.js +++ b/modules/ui/fields/address.js @@ -4,7 +4,7 @@ import { select as d3_select } from 'd3-selection'; import { dataAddressFormats } from '../../../data'; import { geoExtent, geoChooseEdge, geoSphericalDistance } from '../../geo'; import { services } from '../../services'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilArrayUniqBy, utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/fields/check.js b/modules/ui/fields/check.js index 4c101fd19..f98df7b09 100644 --- a/modules/ui/fields/check.js +++ b/modules/ui/fields/check.js @@ -7,9 +7,9 @@ import { import { utilRebind } from '../../util/rebind'; import { t } from '../../util/locale'; -import { actionReverse } from '../../actions'; +import { actionReverse } from '../../actions/reverse'; import { osmOneWayTags } from '../../osm'; -import { svgIcon } from '../../svg'; +import { svgIcon } from '../../svg/icon'; export { uiFieldCheck as uiFieldDefaultCheck }; export { uiFieldCheck as uiFieldOnewayCheck }; diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index fb6a6f427..dbc76e12d 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -4,7 +4,7 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { osmEntity } from '../../osm/entity'; import { t } from '../../util/locale'; import { services } from '../../services'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilArrayUniq, utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; export { diff --git a/modules/ui/fields/cycleway.js b/modules/ui/fields/cycleway.js index 3058c98c4..d6fbecd51 100644 --- a/modules/ui/fields/cycleway.js +++ b/modules/ui/fields/cycleway.js @@ -1,7 +1,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { select as d3_select } from 'd3-selection'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index 14b2868ea..1870ccc0f 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -11,7 +11,7 @@ import { dataWikipedia } from '../../../data'; import { services } from '../../services'; import { svgIcon } from '../../svg'; import { tooltip } from '../../util/tooltip'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilDetect } from '../../util/detect'; import { utilEditDistance, utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/fields/maxspeed.js b/modules/ui/fields/maxspeed.js index 338cc3541..f59e64d25 100644 --- a/modules/ui/fields/maxspeed.js +++ b/modules/ui/fields/maxspeed.js @@ -3,7 +3,7 @@ import { select as d3_select } from 'd3-selection'; import { dataImperial } from '../../../data'; import { geoPointInPolygon } from '../../geo'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index dbd9df736..6b7d0d5f1 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -2,8 +2,9 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; import { select as d3_select, event as d3_event } from 'd3-selection'; import { t } from '../../util/locale'; -import { actionRestrictTurn, actionUnrestrictTurn } from '../../actions'; -import { behaviorBreathe } from '../../behavior'; +import { actionRestrictTurn } from '../../actions/restrict_turn'; +import { actionUnrestrictTurn } from '../../actions/unrestrict_turn'; +import { behaviorBreathe } from '../../behavior/breathe'; import { geoExtent, geoRawMercator, geoVecScale, geoVecSubtract, geoZoomToScale } from '../../geo'; import { osmIntersection, osmInferRestriction, osmTurn, osmWay } from '../../osm'; import { svgLayers, svgLines, svgTurns, svgVertices } from '../../svg'; diff --git a/modules/ui/fields/wikidata.js b/modules/ui/fields/wikidata.js index 66d1ae53f..0714db37e 100644 --- a/modules/ui/fields/wikidata.js +++ b/modules/ui/fields/wikidata.js @@ -5,12 +5,12 @@ import { event as d3_event } from 'd3-selection'; -import { uiCombobox } from '../index'; +import { uiCombobox } from '../combobox'; -import { actionChangeTags } from '../../actions/index'; +import { actionChangeTags } from '../../actions/change_tags'; import { services } from '../../services/index'; -import { svgIcon } from '../../svg/index'; +import { svgIcon } from '../../svg/icon'; import { utilGetSetValue, utilNoAuto, diff --git a/modules/ui/fields/wikipedia.js b/modules/ui/fields/wikipedia.js index f71b22702..d985d7de1 100644 --- a/modules/ui/fields/wikipedia.js +++ b/modules/ui/fields/wikipedia.js @@ -6,11 +6,11 @@ import { } from 'd3-selection'; import { t } from '../../util/locale'; -import { actionChangeTags } from '../../actions/index'; +import { actionChangeTags } from '../../actions/change_tags'; import { dataWikipedia } from '../../../data/index'; import { services } from '../../services/index'; -import { svgIcon } from '../../svg/index'; -import { uiCombobox } from '../index'; +import { svgIcon } from '../../svg/icon'; +import { uiCombobox } from '../combobox'; import { utilDetect } from '../../util/detect'; import { utilGetSetValue, utilNoAuto, utilRebind } from '../../util'; diff --git a/modules/ui/form_fields.js b/modules/ui/form_fields.js index ee2248e94..a5d3a1cb8 100644 --- a/modules/ui/form_fields.js +++ b/modules/ui/form_fields.js @@ -1,7 +1,7 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { uiCombobox } from './index'; +import { uiCombobox } from './combobox'; import { utilGetSetValue, utilNoAuto } from '../util'; diff --git a/modules/ui/geolocate.js b/modules/ui/geolocate.js index 465fa92e3..765de39f5 100644 --- a/modules/ui/geolocate.js +++ b/modules/ui/geolocate.js @@ -1,8 +1,8 @@ import { t, textDirection } from '../util/locale'; import { tooltip } from '../util/tooltip'; import { geoExtent } from '../geo'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; import { uiLoading } from './loading'; diff --git a/modules/ui/help.js b/modules/ui/help.js index 1a76431cb..87eb0c8c4 100644 --- a/modules/ui/help.js +++ b/modules/ui/help.js @@ -4,9 +4,9 @@ import { } from 'd3-selection'; import marked from 'marked'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiCmd } from './cmd'; -import { uiIntro } from './intro'; +import { uiIntro } from './intro/intro'; import { uiShortcuts } from './shortcuts'; import { uiTooltipHtml } from './tooltipHtml'; diff --git a/modules/ui/improveOSM_comments.js b/modules/ui/improveOSM_comments.js index 47608e0c5..e1ee629b1 100644 --- a/modules/ui/improveOSM_comments.js +++ b/modules/ui/improveOSM_comments.js @@ -1,7 +1,7 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { services } from '../services'; import { utilDetect } from '../util/detect'; @@ -91,4 +91,4 @@ export function uiImproveOsmComments() { }; return errorComments; -} \ No newline at end of file +} diff --git a/modules/ui/improveOSM_details.js b/modules/ui/improveOSM_details.js index e1bc288ab..c7d33a076 100644 --- a/modules/ui/improveOSM_details.js +++ b/modules/ui/improveOSM_details.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { dataEn } from '../../data'; -import { modeSelect } from '../modes'; +import { modeSelect } from '../modes/select'; import { t } from '../util/locale'; import { utilDisplayName, utilEntityOrMemberSelector, utilEntityRoot } from '../util'; diff --git a/modules/ui/improveOSM_editor.js b/modules/ui/improveOSM_editor.js index 14405b538..dd046627d 100644 --- a/modules/ui/improveOSM_editor.js +++ b/modules/ui/improveOSM_editor.js @@ -3,16 +3,14 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; import { services } from '../services'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; -import { - uiImproveOsmComments, - uiImproveOsmDetails, - uiImproveOsmHeader, - uiQuickLinks, - uiTooltipHtml -} from './index'; +import { uiImproveOsmComments } from './improveOSM_comments'; +import { uiImproveOsmDetails } from './improveOSM_details'; +import { uiImproveOsmHeader } from './improveOSM_header'; +import { uiQuickLinks } from './quick_links'; +import { uiTooltipHtml } from './tooltipHtml'; import { utilNoAuto, utilRebind } from '../util'; diff --git a/modules/ui/info.js b/modules/ui/info.js index 3e8bfae27..8ebe45e28 100644 --- a/modules/ui/info.js +++ b/modules/ui/info.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiCmd } from './cmd'; import { uiInfoPanels } from './panels'; diff --git a/modules/ui/init.js b/modules/ui/init.js index 2647580d3..23c34a2aa 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -8,7 +8,7 @@ import { t, textDirection } from '../util/locale'; import { tooltip } from '../util/tooltip'; import { behaviorHash } from '../behavior'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { svgDefs, svgIcon } from '../svg'; import { utilGetDimensions } from '../util/dimensions'; diff --git a/modules/ui/intro/area.js b/modules/ui/intro/area.js index 6f20eea0e..7a3c61971 100644 --- a/modules/ui/intro/area.js +++ b/modules/ui/intro/area.js @@ -10,7 +10,8 @@ import { } from 'd3-interpolate'; import { t } from '../../util/locale'; -import { modeBrowse, modeSelect } from '../../modes'; +import { modeBrowse } from '../../modes/browse'; +import { modeSelect } from '../../modes/select'; import { utilRebind } from '../../util/rebind'; import { uiCmd } from '../cmd'; import { icon, pad, transitionTime } from './helper'; diff --git a/modules/ui/intro/building.js b/modules/ui/intro/building.js index 883706bfe..8e7cfb37e 100644 --- a/modules/ui/intro/building.js +++ b/modules/ui/intro/building.js @@ -6,7 +6,8 @@ import { } from 'd3-selection'; import { t, textDirection } from '../../util/locale'; -import { modeBrowse, modeSelect } from '../../modes'; +import { modeBrowse } from '../../modes/browse'; +import { modeSelect } from '../../modes/select'; import { utilArrayUniq, utilRebind } from '../../util'; import { icon, pad, isMostlySquare, selectMenuItem, transitionTime } from './helper'; diff --git a/modules/ui/intro/line.js b/modules/ui/intro/line.js index 2a3216952..24de37e2e 100644 --- a/modules/ui/intro/line.js +++ b/modules/ui/intro/line.js @@ -7,7 +7,8 @@ import { import { t, textDirection } from '../../util/locale'; import { geoSphericalDistance } from '../../geo'; -import { modeBrowse, modeSelect } from '../../modes'; +import { modeBrowse } from '../../modes/browse'; +import { modeSelect } from '../../modes/select'; import { utilRebind } from '../../util/rebind'; import { icon, pad, selectMenuItem, transitionTime } from './helper'; diff --git a/modules/ui/intro/navigation.js b/modules/ui/intro/navigation.js index 971046081..304bb972c 100644 --- a/modules/ui/intro/navigation.js +++ b/modules/ui/intro/navigation.js @@ -6,7 +6,8 @@ import { } from 'd3-selection'; import { t } from '../../util/locale'; -import { modeBrowse, modeSelect } from '../../modes'; +import { modeBrowse } from '../../modes/browse'; +import { modeSelect } from '../../modes/select'; import { utilRebind } from '../../util/rebind'; import { icon, pointBox, transitionTime } from './helper'; diff --git a/modules/ui/intro/point.js b/modules/ui/intro/point.js index f9a7e89ed..c68bb03fe 100644 --- a/modules/ui/intro/point.js +++ b/modules/ui/intro/point.js @@ -5,8 +5,9 @@ import { } from 'd3-selection'; import { t, textDirection } from '../../util/locale'; -import { actionChangePreset } from '../../actions'; -import { modeBrowse, modeSelect } from '../../modes'; +import { actionChangePreset } from '../../actions/change_preset'; +import { modeBrowse } from '../../modes/browse'; +import { modeSelect } from '../../modes/select'; import { utilRebind } from '../../util/rebind'; import { icon, pointBox, pad, selectMenuItem, transitionTime } from './helper'; diff --git a/modules/ui/issues.js b/modules/ui/issues.js index dd7e675a3..7c41a25f1 100644 --- a/modules/ui/issues.js +++ b/modules/ui/issues.js @@ -5,10 +5,10 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { t, textDirection } from '../util/locale'; import { tooltip } from '../util/tooltip'; -import { actionNoop } from '../actions'; +import { actionNoop } from '../actions/noop'; import { geoSphericalDistance } from '../geo'; -import { modeSelect } from '../modes'; -import { svgIcon } from '../svg'; +import { modeSelect } from '../modes/select'; +import { svgIcon } from '../svg/icon'; import { uiDisclosure } from './disclosure'; import { uiTooltipHtml } from './tooltipHtml'; import { utilCallWhenIdle, utilHighlightEntities } from '../util'; diff --git a/modules/ui/keepRight_details.js b/modules/ui/keepRight_details.js index e28d620a3..c292bf0ae 100644 --- a/modules/ui/keepRight_details.js +++ b/modules/ui/keepRight_details.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { dataEn } from '../../data'; -import { modeSelect } from '../modes'; +import { modeSelect } from '../modes/select'; import { t } from '../util/locale'; import { utilDisplayName, utilEntityOrMemberSelector, utilEntityRoot } from '../util'; diff --git a/modules/ui/keepRight_editor.js b/modules/ui/keepRight_editor.js index c35ea4b5e..f866094aa 100644 --- a/modules/ui/keepRight_editor.js +++ b/modules/ui/keepRight_editor.js @@ -3,16 +3,14 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; import { services } from '../services'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; -import { - uiKeepRightDetails, - uiKeepRightHeader, - uiQuickLinks, - uiTooltipHtml, - uiViewOnKeepRight -} from './index'; +import { uiKeepRightDetails } from './keepRight_details'; +import { uiKeepRightHeader } from './keepRight_header'; +import { uiQuickLinks } from './quick_links'; +import { uiTooltipHtml } from './tooltipHtml'; +import { uiViewOnKeepRight } from './view_on_keepRight'; import { utilNoAuto, utilRebind } from '../util'; diff --git a/modules/ui/keepRight_header.js b/modules/ui/keepRight_header.js index 33a958b75..b2d4130a1 100644 --- a/modules/ui/keepRight_header.js +++ b/modules/ui/keepRight_header.js @@ -1,5 +1,5 @@ import { dataEn } from '../../data'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { t } from '../util/locale'; diff --git a/modules/ui/map_data.js b/modules/ui/map_data.js index ba498083d..3dbc1c7cd 100644 --- a/modules/ui/map_data.js +++ b/modules/ui/map_data.js @@ -3,11 +3,11 @@ import { select as d3_select } from 'd3-selection'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { t, textDirection } from '../util/locale'; import { tooltip } from '../util/tooltip'; import { geoExtent } from '../geo'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { uiDisclosure } from './disclosure'; import { uiSettingsCustomData } from './settings/custom_data'; import { uiTooltipHtml } from './tooltipHtml'; diff --git a/modules/ui/modal.js b/modules/ui/modal.js index 877bafbac..fdf923487 100644 --- a/modules/ui/modal.js +++ b/modules/ui/modal.js @@ -3,7 +3,7 @@ import { select as d3_select } from 'd3-selection'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilKeybinding } from '../util'; diff --git a/modules/ui/note_comments.js b/modules/ui/note_comments.js index cbb004095..9934eee4f 100644 --- a/modules/ui/note_comments.js +++ b/modules/ui/note_comments.js @@ -1,7 +1,7 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { services } from '../services'; import { utilDetect } from '../util/detect'; diff --git a/modules/ui/note_editor.js b/modules/ui/note_editor.js index 7cd4b2511..eeda102e8 100644 --- a/modules/ui/note_editor.js +++ b/modules/ui/note_editor.js @@ -6,20 +6,18 @@ import { import { t } from '../util/locale'; import { services } from '../services'; -import { modeBrowse } from '../modes'; -import { svgIcon } from '../svg'; +import { modeBrowse } from '../modes/browse'; +import { svgIcon } from '../svg/icon'; // import { uiField } from './field'; // import { uiFormFields } from './form_fields'; -import { - uiNoteComments, - uiNoteHeader, - uiNoteReport, - uiQuickLinks, - uiTooltipHtml, - uiViewOnOSM, -} from './index'; +import { uiNoteComments } from './note_comments'; +import { uiNoteHeader } from './note_header'; +import { uiNoteReport } from './note_report'; +import { uiQuickLinks } from './quick_links'; +import { uiTooltipHtml } from './tooltipHtml'; +import { uiViewOnOSM } from './view_on_osm'; import { utilNoAuto, diff --git a/modules/ui/note_header.js b/modules/ui/note_header.js index 59cccebde..7ff59d296 100644 --- a/modules/ui/note_header.js +++ b/modules/ui/note_header.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiNoteHeader() { diff --git a/modules/ui/note_report.js b/modules/ui/note_report.js index 09b78a4e4..05d5f8a90 100644 --- a/modules/ui/note_report.js +++ b/modules/ui/note_report.js @@ -1,7 +1,7 @@ import { t } from '../util/locale'; import { osmNote } from '../osm'; import { services } from '../services'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiNoteReport() { diff --git a/modules/ui/photoviewer.js b/modules/ui/photoviewer.js index c700ddf0d..708292704 100644 --- a/modules/ui/photoviewer.js +++ b/modules/ui/photoviewer.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { dispatch as d3_dispatch } from 'd3-dispatch'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilGetDimensions } from '../util/dimensions'; import { utilRebind } from '../util'; import { services } from '../services'; diff --git a/modules/ui/preset_editor.js b/modules/ui/preset_editor.js index ab85f090f..4761b4abf 100644 --- a/modules/ui/preset_editor.js +++ b/modules/ui/preset_editor.js @@ -6,7 +6,7 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; import { uiDisclosure } from './disclosure'; import { uiField } from './field'; import { uiFormFields } from './form_fields'; diff --git a/modules/ui/preset_favorite_button.js b/modules/ui/preset_favorite_button.js index 06481ad28..fa32c6b93 100644 --- a/modules/ui/preset_favorite_button.js +++ b/modules/ui/preset_favorite_button.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiPresetFavoriteButton(preset, geom, context, klass) { diff --git a/modules/ui/preset_list.js b/modules/ui/preset_list.js index e74404b01..9deb92592 100644 --- a/modules/ui/preset_list.js +++ b/modules/ui/preset_list.js @@ -7,8 +7,8 @@ import { } from 'd3-selection'; import { t, textDirection } from '../util/locale'; -import { actionChangePreset } from '../actions/index'; -import { operationDelete } from '../operations/index'; +import { actionChangePreset } from '../actions/change_preset'; +import { operationDelete } from '../operations/delete'; import { services } from '../services'; import { svgIcon } from '../svg/index'; import { tooltip } from '../util/tooltip'; diff --git a/modules/ui/raw_member_editor.js b/modules/ui/raw_member_editor.js index 52dc9f4aa..eb8bb5a4d 100644 --- a/modules/ui/raw_member_editor.js +++ b/modules/ui/raw_member_editor.js @@ -5,12 +5,16 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { actionChangeMember, actionDeleteMember, actionMoveMember } from '../actions'; -import { modeBrowse, modeSelect } from '../modes'; +import { actionChangeMember } from '../actions/change_member'; +import { actionDeleteMember } from '../actions/delete_member'; +import { actionMoveMember } from '../actions/move_member'; +import { modeBrowse } from '../modes/browse'; +import { modeSelect } from '../modes/select'; import { osmEntity } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { services } from '../services'; -import { uiCombobox, uiDisclosure } from './index'; +import { uiCombobox } from './combobox'; +import { uiDisclosure } from './disclosure'; import { utilDisplayName, utilDisplayType, utilHighlightEntities, utilNoAuto } from '../util'; diff --git a/modules/ui/raw_membership_editor.js b/modules/ui/raw_membership_editor.js index 0d9d1b606..e9f3fd43e 100644 --- a/modules/ui/raw_membership_editor.js +++ b/modules/ui/raw_membership_editor.js @@ -5,18 +5,17 @@ import { import { t, textDirection } from '../util/locale'; -import { - actionAddEntity, - actionAddMember, - actionChangeMember, - actionDeleteMember -} from '../actions'; +import { actionAddEntity } from '../actions/add_entity'; +import { actionAddMember } from '../actions/add_member'; +import { actionChangeMember } from '../actions/change_member'; +import { actionDeleteMember } from '../actions/delete_member'; -import { modeSelect } from '../modes'; +import { modeSelect } from '../modes/select'; import { osmEntity, osmRelation } from '../osm'; import { services } from '../services'; -import { svgIcon } from '../svg'; -import { uiCombobox, uiDisclosure } from './index'; +import { svgIcon } from '../svg/icon'; +import { uiCombobox } from './combobox'; +import { uiDisclosure } from './disclosure'; import { tooltip } from '../util/tooltip'; import { utilArrayGroupBy, utilDisplayName, utilNoAuto, utilHighlightEntities } from '../util'; diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index 318c84663..7842b4089 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -7,8 +7,10 @@ import { import { t } from '../util/locale'; import { services } from '../services'; -import { svgIcon } from '../svg'; -import { uiCombobox, uiDisclosure, uiTagReference } from './index'; +import { svgIcon } from '../svg/icon'; +import { uiCombobox } from './combobox'; +import { uiDisclosure } from './disclosure'; +import { uiTagReference } from './tag_reference'; import { utilGetSetValue, utilNoAuto, utilRebind } from '../util'; diff --git a/modules/ui/selection_list.js b/modules/ui/selection_list.js index 031b75025..07ce9357e 100644 --- a/modules/ui/selection_list.js +++ b/modules/ui/selection_list.js @@ -1,9 +1,9 @@ import { event as d3_event, select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; -import { modeSelect } from '../modes'; +import { modeSelect } from '../modes/select'; import { osmEntity } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { utilDisplayName, utilHighlightEntities } from '../util'; diff --git a/modules/ui/shortcuts.js b/modules/ui/shortcuts.js index eadf1bf17..3b7018be8 100644 --- a/modules/ui/shortcuts.js +++ b/modules/ui/shortcuts.js @@ -5,7 +5,7 @@ import { import { t } from '../util/locale'; import { dataShortcuts } from '../../data'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiCmd } from './cmd'; import { uiModal } from './modal'; import { utilArrayUniq } from '../util'; diff --git a/modules/ui/sidebar.js b/modules/ui/sidebar.js index b33943003..d8f5d9a84 100644 --- a/modules/ui/sidebar.js +++ b/modules/ui/sidebar.js @@ -11,14 +11,12 @@ import { import { osmEntity, osmNote, qaError } from '../osm'; import { services } from '../services'; -import { - uiDataEditor, - uiFeatureList, - uiInspector, - uiNoteEditor, - uiImproveOsmEditor, - uiKeepRightEditor -} from './index'; +import { uiDataEditor } from './data_editor'; +import { uiFeatureList } from './feature_list'; +import { uiInspector } from './inspector'; +import { uiImproveOsmEditor } from './improveOSM_editor'; +import { uiKeepRightEditor } from './keepRight_editor'; +import { uiNoteEditor } from './note_editor'; import { textDirection } from '../util/locale'; diff --git a/modules/ui/source_switch.js b/modules/ui/source_switch.js index fe54f5a67..49d729227 100644 --- a/modules/ui/source_switch.js +++ b/modules/ui/source_switch.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { t } from '../util/locale'; -import { modeBrowse } from '../modes'; +import { modeBrowse } from '../modes/browse'; export function uiSourceSwitch(context) { diff --git a/modules/ui/status.js b/modules/ui/status.js index 767e0e1b8..2a98cdbf0 100644 --- a/modules/ui/status.js +++ b/modules/ui/status.js @@ -1,7 +1,7 @@ import { event as d3_event } from 'd3-selection'; import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiStatus(context) { diff --git a/modules/ui/success.js b/modules/ui/success.js index 0e83853dd..4bf4dc170 100644 --- a/modules/ui/success.js +++ b/modules/ui/success.js @@ -3,8 +3,8 @@ import { select as d3_select } from 'd3-selection'; import { t } from '../util/locale'; import { data } from '../../data'; -import { svgIcon } from '../svg'; -import { uiDisclosure } from '../ui'; +import { svgIcon } from '../svg/icon'; +import { uiDisclosure } from '../ui/disclosure'; import { utilDetect } from '../util/detect'; import { utilRebind } from '../util/rebind'; diff --git a/modules/ui/tag_reference.js b/modules/ui/tag_reference.js index c4c4cdbce..bbca27bb4 100644 --- a/modules/ui/tag_reference.js +++ b/modules/ui/tag_reference.js @@ -5,7 +5,7 @@ import { import { t } from '../util/locale'; import { services } from '../services'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; // Pass `which` object of the form: diff --git a/modules/ui/version.js b/modules/ui/version.js index 673db5b5e..42080a7bb 100644 --- a/modules/ui/version.js +++ b/modules/ui/version.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { tooltip } from '../util/tooltip'; diff --git a/modules/ui/view_on_keepRight.js b/modules/ui/view_on_keepRight.js index 8ac4a7931..62944db5d 100644 --- a/modules/ui/view_on_keepRight.js +++ b/modules/ui/view_on_keepRight.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; import { services } from '../services'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { qaError } from '../osm'; diff --git a/modules/ui/view_on_osm.js b/modules/ui/view_on_osm.js index 7bf265275..63fd10557 100644 --- a/modules/ui/view_on_osm.js +++ b/modules/ui/view_on_osm.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; import { osmEntity, osmNote } from '../osm'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; export function uiViewOnOSM(context) { diff --git a/modules/ui/zoom.js b/modules/ui/zoom.js index baf4b539b..806323242 100644 --- a/modules/ui/zoom.js +++ b/modules/ui/zoom.js @@ -4,7 +4,7 @@ import { } from 'd3-selection'; import { t, textDirection } from '../util/locale'; -import { svgIcon } from '../svg'; +import { svgIcon } from '../svg/icon'; import { uiCmd } from './cmd'; import { uiTooltipHtml } from './tooltipHtml'; import { tooltip } from '../util/tooltip'; diff --git a/modules/util/detect.js b/modules/util/detect.js index c3a98c185..a89531c2e 100644 --- a/modules/util/detect.js +++ b/modules/util/detect.js @@ -1,6 +1,6 @@ import { currentLocale, setTextDirection } from './locale'; import { dataLocales } from '../../data/index'; -import { utilStringQs } from './index'; +import { utilStringQs } from './util'; var detected; diff --git a/modules/util/keybinding.js b/modules/util/keybinding.js index 7c3ccf4ae..02a55e89a 100644 --- a/modules/util/keybinding.js +++ b/modules/util/keybinding.js @@ -3,7 +3,7 @@ import { select as d3_select } from 'd3-selection'; -import { utilArrayUniq } from '../util/index'; +import { utilArrayUniq } from './array'; export function utilKeybinding(namespace) { diff --git a/modules/util/tooltip.js b/modules/util/tooltip.js index 7be587d33..fe43eae96 100644 --- a/modules/util/tooltip.js +++ b/modules/util/tooltip.js @@ -1,5 +1,5 @@ import { select as d3_select } from 'd3-selection'; -import { utilFunctor } from './index'; +import { utilFunctor } from './util'; var _tooltipID = 0; diff --git a/modules/validations/almost_junction.js b/modules/validations/almost_junction.js index b31fb8255..f432f6560 100644 --- a/modules/validations/almost_junction.js +++ b/modules/validations/almost_junction.js @@ -4,10 +4,12 @@ import { geoSphericalClosestNode } from '../geo'; -import { actionAddMidpoint, actionChangeTags, actionMergeNodes } from '../actions'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionChangeTags } from '../actions/change_tags'; +import { actionMergeNodes } from '../actions/merge_nodes'; import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; /** diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index 45f73ce75..a94895157 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -1,9 +1,11 @@ -import { actionAddMidpoint, actionChangeTags, actionMergeNodes } from '../actions'; +import { actionAddMidpoint } from '../actions/add_midpoint'; +import { actionChangeTags } from '../actions/change_tags'; +import { actionMergeNodes } from '../actions/merge_nodes'; import { geoExtent, geoLineIntersection, geoSphericalClosestNode } from '../geo'; -import { osmNode } from '../osm'; +import { osmNode } from '../osm/node'; import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationCrossingWays() { diff --git a/modules/validations/disconnected_way.js b/modules/validations/disconnected_way.js index 7c7b160d0..a17772b96 100644 --- a/modules/validations/disconnected_way.js +++ b/modules/validations/disconnected_way.js @@ -1,8 +1,8 @@ import { t } from '../util/locale'; -import { modeDrawLine } from '../modes'; +import { modeDrawLine } from '../modes/draw_line'; import { operationDelete } from '../operations/index'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationDisconnectedWay() { diff --git a/modules/validations/generic_name.js b/modules/validations/generic_name.js index b433b634e..9677429d3 100644 --- a/modules/validations/generic_name.js +++ b/modules/validations/generic_name.js @@ -2,8 +2,8 @@ import { filters } from 'name-suggestion-index'; import { t } from '../util/locale'; import { utilPreset } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; -import { actionChangeTags } from '../actions'; +import { validationIssue, validationIssueFix } from '../core/validation'; +import { actionChangeTags } from '../actions/change_tags'; export function validationGenericName() { diff --git a/modules/validations/incompatible_source.js b/modules/validations/incompatible_source.js index 78ce75003..23916eb95 100644 --- a/modules/validations/incompatible_source.js +++ b/modules/validations/incompatible_source.js @@ -1,6 +1,6 @@ import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationIncompatibleSource() { diff --git a/modules/validations/missing_role.js b/modules/validations/missing_role.js index f1b0396aa..ec3799f51 100644 --- a/modules/validations/missing_role.js +++ b/modules/validations/missing_role.js @@ -1,7 +1,8 @@ -import { actionChangeMember, actionDeleteMember } from '../actions'; +import { actionChangeMember } from '../actions/change_member'; +import { actionDeleteMember } from '../actions/delete_member'; import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationMissingRole() { diff --git a/modules/validations/missing_tag.js b/modules/validations/missing_tag.js index 31c950a96..1230a2fee 100644 --- a/modules/validations/missing_tag.js +++ b/modules/validations/missing_tag.js @@ -2,7 +2,7 @@ import { operationDelete } from '../operations/index'; import { osmIsInterestingTag } from '../osm/tags'; import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationMissingTag() { diff --git a/modules/validations/old_multipolygon.js b/modules/validations/old_multipolygon.js index 89cef0b5e..773305c71 100644 --- a/modules/validations/old_multipolygon.js +++ b/modules/validations/old_multipolygon.js @@ -1,8 +1,8 @@ import { t } from '../util/locale'; -import { actionChangeTags } from '../actions'; -import { osmIsOldMultipolygonOuterMember, osmOldMultipolygonOuterMemberOfRelation } from '../osm'; +import { actionChangeTags } from '../actions/change_tags'; +import { osmIsOldMultipolygonOuterMember, osmOldMultipolygonOuterMemberOfRelation } from '../osm/multipolygon'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationOldMultipolygon() { diff --git a/modules/validations/outdated_tags.js b/modules/validations/outdated_tags.js index 576c42b42..37f73636e 100644 --- a/modules/validations/outdated_tags.js +++ b/modules/validations/outdated_tags.js @@ -1,7 +1,9 @@ import { t } from '../util/locale'; -import { actionUpgradeTags, actionChangeTags, actionChangePreset } from '../actions'; +import { actionChangePreset } from '../actions/change_preset'; +import { actionChangeTags } from '../actions/change_tags'; +import { actionUpgradeTags } from '../actions/upgrade_tags'; import { utilArrayUnion, utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationOutdatedTags() { diff --git a/modules/validations/private_data.js b/modules/validations/private_data.js index a38f2b10f..3b061e34c 100644 --- a/modules/validations/private_data.js +++ b/modules/validations/private_data.js @@ -1,7 +1,7 @@ -import { actionChangeTags } from '../actions'; +import { actionChangeTags } from '../actions/change_tags'; import { t } from '../util/locale'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationPrivateData() { diff --git a/modules/validations/tag_suggests_area.js b/modules/validations/tag_suggests_area.js index 4a90e8e89..1a2c380ec 100644 --- a/modules/validations/tag_suggests_area.js +++ b/modules/validations/tag_suggests_area.js @@ -1,8 +1,10 @@ -import { actionAddVertex, actionChangeTags, actionMergeNodes } from '../actions'; +import { actionAddVertex } from '../actions/add_vertex'; +import { actionChangeTags } from '../actions/change_tags'; +import { actionMergeNodes } from '../actions/merge_nodes'; import { geoHasSelfIntersections, geoSphericalDistance } from '../geo'; import { t } from '../util/locale'; import { utilDisplayLabel, utilTagText } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationTagSuggestsArea() { diff --git a/modules/validations/unknown_road.js b/modules/validations/unknown_road.js index 33589f97f..7bd8d0fe5 100644 --- a/modules/validations/unknown_road.js +++ b/modules/validations/unknown_road.js @@ -1,7 +1,7 @@ import { t } from '../util/locale'; import { operationDelete } from '../operations/index'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationUnknownRoad() { diff --git a/modules/validations/unsquare_way.js b/modules/validations/unsquare_way.js index 51606983a..7f29f6523 100644 --- a/modules/validations/unsquare_way.js +++ b/modules/validations/unsquare_way.js @@ -2,7 +2,7 @@ import { t } from '../util/locale'; import { operationOrthogonalize } from '../operations'; import { geoOrthoCanOrthogonalize } from '../geo'; import { utilDisplayLabel } from '../util'; -import { validationIssue, validationIssueFix } from '../core/validator'; +import { validationIssue, validationIssueFix } from '../core/validation'; export function validationUnsquareWay() {