Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237)

This commit is contained in:
Quincy Morgan
2019-04-24 13:45:59 -07:00
parent 862eca9ddd
commit d01bb78707
158 changed files with 503 additions and 472 deletions
+5 -7
View File
@@ -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';
+5 -7
View File
@@ -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';
+3 -2
View File
@@ -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';
+7 -5
View File
@@ -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) {
+4 -6
View File
@@ -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';
+10 -13
View File
@@ -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';
+4 -3
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -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) {
+12 -15
View File
@@ -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;
}
}
+11 -15
View File
@@ -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;
}
}
+12 -4
View File
@@ -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';
+13 -7
View File
@@ -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;
+8 -8
View File
@@ -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';
+9 -8
View File
@@ -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';
+8 -8
View File
@@ -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';