From fc64b5cc5f981a899caea972547ec70758471a25 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Sun, 11 Jan 2026 00:13:28 +0100 Subject: [PATCH] Update root JS dependencies --- assets/dist/map_controller.js | 26 +++++++++++++++++++------- assets/src/map_controller.ts | 8 +++++--- assets/tsconfig.json | 3 +++ 3 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 assets/tsconfig.json diff --git a/assets/dist/map_controller.js b/assets/dist/map_controller.js index edd7e37..81168e4 100644 --- a/assets/dist/map_controller.js +++ b/assets/dist/map_controller.js @@ -36,11 +36,21 @@ var abstract_map_controller_default = class extends Controller { this.createCircle = this.createDrawingFactory("circle", this.circles, this.doCreateCircle.bind(this)); this.createRectangle = this.createDrawingFactory("rectangle", this.rectangles, this.doCreateRectangle.bind(this)); this.map = this.doCreateMap({ definition: mapDefinition }); - this.markersValue.forEach((definition) => this.createMarker({ definition })); - this.polygonsValue.forEach((definition) => this.createPolygon({ definition })); - this.polylinesValue.forEach((definition) => this.createPolyline({ definition })); - this.circlesValue.forEach((definition) => this.createCircle({ definition })); - this.rectanglesValue.forEach((definition) => this.createRectangle({ definition })); + this.markersValue.forEach((definition) => { + this.createMarker({ definition }); + }); + this.polygonsValue.forEach((definition) => { + this.createPolygon({ definition }); + }); + this.polylinesValue.forEach((definition) => { + this.createPolyline({ definition }); + }); + this.circlesValue.forEach((definition) => { + this.createCircle({ definition }); + }); + this.rectanglesValue.forEach((definition) => { + this.createRectangle({ definition }); + }); if (this.fitBoundsToMarkersValue) { this.doFitBoundsToMarkers(); } @@ -174,7 +184,7 @@ var map_controller_default = class extends abstract_map_controller_default { const loader = new Loader(loaderOptions); libraries = ["core", ...libraries.filter((library) => library !== "core")]; const librariesImplementations = await Promise.all(libraries.map((library) => loader.importLibrary(library))); - librariesImplementations.map((libraryImplementation, index) => { + librariesImplementations.forEach((libraryImplementation, index) => { if (typeof libraryImplementation !== "object" || libraryImplementation === null) { return; } @@ -188,7 +198,9 @@ var map_controller_default = class extends abstract_map_controller_default { _loading = false; _loaded = true; onLoaded(); - _onLoadedCallbacks.forEach((callback) => callback()); + _onLoadedCallbacks.forEach((callback) => { + callback(); + }); _onLoadedCallbacks = []; } centerValueChanged() { diff --git a/assets/src/map_controller.ts b/assets/src/map_controller.ts index 64a4e8e..ca055c0 100644 --- a/assets/src/map_controller.ts +++ b/assets/src/map_controller.ts @@ -94,7 +94,7 @@ export default class extends AbstractMapController< // see https://github.com/googlemaps/js-api-loader/issues/837 for more information. libraries = ['core', ...libraries.filter((library) => library !== 'core')]; // Ensure 'core' is loaded first const librariesImplementations = await Promise.all(libraries.map((library) => loader.importLibrary(library))); - librariesImplementations.map((libraryImplementation, index) => { + librariesImplementations.forEach((libraryImplementation, index) => { if (typeof libraryImplementation !== 'object' || libraryImplementation === null) { return; } @@ -103,7 +103,7 @@ export default class extends AbstractMapController< // The following libraries are in a sub-namespace if (['marker', 'places', 'geometry', 'journeySharing', 'drawing', 'visualization'].includes(library)) { - // @ts-ignore + // @ts-expect-error _google.maps[library] = libraryImplementation as any; } else { _google.maps = { ..._google.maps, ...libraryImplementation }; @@ -113,7 +113,9 @@ export default class extends AbstractMapController< _loading = false; _loaded = true; onLoaded(); - _onLoadedCallbacks.forEach((callback) => callback()); + _onLoadedCallbacks.forEach((callback) => { + callback(); + }); _onLoadedCallbacks = []; } diff --git a/assets/tsconfig.json b/assets/tsconfig.json new file mode 100644 index 0000000..cf2552b --- /dev/null +++ b/assets/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../../../../tsconfig.package.json" +}