This was taking a lot of time at app startup.
Instad now we resolve and index only the include and exclude parts.
We can still determine the valid locationSets at runtime in `locationSetsAt()`
by checking the `_locationIncludedIn` and `_locationExcludedIn` caches.
This also upgrades the locationManger to an ES6 class.
This also includes some hacky code in nsi.js so that the NSI will continue to work.
The NSI matcher can build its own location index, but it doesn't need to do this.
We monkeypatch a few of the matcher collections to work with the new LocationManager.
- Before it wasn't actually loading the intro graph because assetPath not set
- The test for Three Rivers City Hall was using the wrong nodeid
- All these test errors were being ignored because of the use of .finally(done)
- To actually make an error happen, we can call `done(err)` with the Error
- implements a validation work queue, jobs are run during browser idle callbacks
- when merging base entities, don't run validations 2x on both base and head graphs (this was wasteful)
- keep track of resolved issues in a separate set (it's not a simple compare of base/head anymore)
this happens after validation queue is empty and avoids race conditions and inaccurate resolved counts
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
We have http://openstreetmap.community now for this, and it eliminates
another place in the code where that data would have been needed.
This commit also ES6ifies svgDebug.
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.
Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle. Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
Also dist/data/* contains minified files now
These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';