Update root JS dependencies

This commit is contained in:
Hugo Alliaume
2026-01-11 00:13:28 +01:00
parent e3f0e6ed77
commit fc64b5cc5f
3 changed files with 27 additions and 10 deletions

View File

@@ -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() {

View File

@@ -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 = [];
}

3
assets/tsconfig.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": "../../../../../../tsconfig.package.json"
}