Skip to content

Commit ce82473

Browse files
feature/DF-680 location maps latlong, E&N and OSGR (#287)
* Import the location styles in the correct file * Add location field map styles * Update the OS API KEY config to inform that it is used by both the maps and postcode lookup plugins * Add class `app-location-field` and dataset attribute to the location field base template * Add the new map plugin and client script * Register the new map plugin * Add defra-map dependency * Sonar fixes (Define a constant instead of duplicating) * Sonar fixes (No magic number) * Sonar fixes (No magic number) * Sonar fixes (use "return" consistently) * Sonar fixes (out scope) * Sonar fixes (No magic number) * Sonar fixes (Explicit return value) * Sonar fixes (Split it into smaller functions) * Sonar fixes ("return" consistently) * Sonar fixes (Split it into smaller functions) * Add location maps client tests * Fix formatting * Add map service tests * Delete map tile proxy routes (because there are other requests e.g. sprites) * Add tests for map plugin routes * Add shared client JS tests * Add map proxy route tests * Map prox test to cover no content type returned * Add tile request transformer client tests * Test to ensure initMaps only applies when there are location components on the page * Test to ensure initMaps only applies when there are supported location components on the page * Fix comment * Sonar fixes (Use `export…from`) * Sonar fixes (Prefer String.fromCodePoint) * Add map routes JsDoc descriptions * Update to latest defra-map * Restructure location map tests * Feature/DF-687 location maps easting & northing (#289) * Add eastingnorthingfield to the list of supported location fields * Add easting northing capability to location maps * Remove unused osgrid * Add easting and northing tests location map client tests * Add map tests with initial field values * Add OS grid reference to the location map * Add OS grid reference to the location map tests * Sonar fixes (Define a constant instead of duplicating this literal) * Sonar fixes (Define a constant instead of duplicating this literal) * Revert "Delete map tile proxy routes (because there are other requests e.g. sprites)" This reverts commit 9bae11a. * Add attribution to the dark and black/white styles * Add VTS 3857 sprites * Refactor to shared centerMap function * Refactor to shared init map config center function * Fix OsGridRef initial values test * Add transformer test for raw.githubusercontent.com * Add map dependency from new repo and stable branch * Remove unused import * Replace @defra/defra-map with @defra/interactive-map * Replace @defra/defra-map with @defra/interactive-map in JSSoc and tests * Update @defra/interactive-map to v0.0.3-alpha * Update the interact plugin to use the new 'enable' method
1 parent da5b984 commit ce82473

40 files changed

Lines changed: 34761 additions & 2245 deletions

jest.config.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ module.exports = {
5151
'@defra/forms-model/.*',
5252
'nanoid', // Supports ESM only
5353
'slug', // Supports ESM only
54-
'@defra/hapi-tracing' // Supports ESM only|
54+
'@defra/hapi-tracing', // Supports ESM only
55+
'geodesy' // Supports ESM only|
5556
].join('|')}/)`
5657
],
5758
testTimeout: 10000,

0 commit comments

Comments
 (0)