From 82d0235db0b7bce994586ba1066676a7d9cdbef8 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 8 May 2019 09:21:50 +0200 Subject: [PATCH] Tranform to ES6 modules ./node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --legacy true jsapi/src/ ./node_modules/.bin/jscodeshift --transform=node_modules/googshift/transforms/goog_module_to_es6_module.js --legacy true geoportailv3/static/js/ --- geoportailv3/static/js/Activetool.js | 12 +- .../static/js/CoordinateStringService.js | 19 +- geoportailv3/static/js/ExclusionManager.js | 27 +- geoportailv3/static/js/Export.js | 25 +- geoportailv3/static/js/Geocoding.js | 15 +- geoportailv3/static/js/GetDevice.js | 13 +- geoportailv3/static/js/GetElevationService.js | 14 +- .../js/GetLayerForCatalogNodeFactory.js | 12 +- geoportailv3/static/js/GetProfileService.js | 13 +- geoportailv3/static/js/GetShorturlService.js | 12 +- geoportailv3/static/js/GetWmsLayerFactory.js | 20 +- geoportailv3/static/js/GetWmtsLayerFactory.js | 28 +- geoportailv3/static/js/LayerOpacityManager.js | 17 +- .../static/js/LayerPermalinkManager.js | 24 +- geoportailv3/static/js/LocationControl.js | 33 +-- geoportailv3/static/js/LotChasse.js | 13 +- geoportailv3/static/js/MainController.js | 55 ++-- geoportailv3/static/js/Map.js | 12 +- geoportailv3/static/js/Mymaps.js | 46 ++-- geoportailv3/static/js/MymapsOffline.js | 14 +- geoportailv3/static/js/NotifyFactory.js | 14 +- .../static/js/NotifyNotificationType.js | 12 +- geoportailv3/static/js/OfflineDownloader.js | 15 +- geoportailv3/static/js/OfflineRestorer.js | 16 +- geoportailv3/static/js/Piwik.js | 11 +- geoportailv3/static/js/Routing.js | 21 +- geoportailv3/static/js/ScalesService.js | 16 +- geoportailv3/static/js/StateManager.js | 17 +- geoportailv3/static/js/Theme.js | 12 +- geoportailv3/static/js/Themes.js | 22 +- geoportailv3/static/js/UserManager.js | 16 +- geoportailv3/static/js/WmsHelper.js | 34 +-- geoportailv3/static/js/WmtsHelper.js | 28 +- .../js/askredirect/AskredirectController.js | 13 +- .../js/askredirect/askredirectDirective.js | 14 +- .../AuthenticationController.js | 14 +- .../authentication/authenticationDirective.js | 14 +- .../BackgroundlayerController.js | 15 +- .../static/js/backgroundlayer/BlankLayer.js | 15 +- .../backgroundlayerDirective.js | 13 +- .../static/js/catalog/CatalogController.js | 21 +- .../static/js/catalog/catalogDirective.js | 13 +- geoportailv3/static/js/draw/DrawController.js | 57 ++-- geoportailv3/static/js/draw/DrawnFeatures.js | 26 +- geoportailv3/static/js/draw/FeatureHash.js | 53 ++-- geoportailv3/static/js/draw/FeaturePopup.js | 32 +-- .../static/js/draw/FeaturePopupController.js | 37 +-- geoportailv3/static/js/draw/RouteControl.js | 20 +- .../static/js/draw/SelectedFeaturesService.js | 15 +- .../static/js/draw/StyleEditingController.js | 16 +- .../js/draw/SymbolSelectorController.js | 14 +- geoportailv3/static/js/draw/drawDirective.js | 14 +- .../static/js/draw/featurePopupDirective.js | 13 +- .../static/js/draw/styleEditingDirective.js | 14 +- .../static/js/draw/symbolSelectorDirective.js | 14 +- .../static/js/events/ThemesEventType.js | 12 +- .../js/externaldata/ExternalDataController.js | 13 +- .../js/externaldata/externalDataDirective.js | 13 +- .../static/js/feedback/FeedbackController.js | 16 +- .../static/js/feedback/feedbackDirective.js | 13 +- .../js/feedbackanf/FeedbackanfController.js | 44 +-- .../js/feedbackanf/feedbackanfDirective.js | 13 +- .../js/imageupload/ImguploadController.js | 16 +- .../js/imageupload/ImguploadDirective.js | 15 +- .../static/js/infobar/ElevationController.js | 60 +++-- .../static/js/infobar/InfobarController.js | 13 +- .../infobar/ProjectionselectorController.js | 60 +++-- .../static/js/infobar/ScalelineController.js | 15 +- .../js/infobar/ScaleselectorController.js | 14 +- .../static/js/infobar/elevationDirective.js | 13 +- .../static/js/infobar/infobarDirective.js | 13 +- .../js/infobar/projectionselectorDirective.js | 13 +- .../static/js/infobar/scalelineDirective.js | 13 +- .../js/infobar/scaleselectorDirective.js | 14 +- .../static/js/interaction/ClipLine.js | 48 ++-- .../static/js/interaction/DrawRoute.js | 51 ++-- .../static/js/interaction/ModifyCircle.js | 49 ++-- .../js/layerinfo/LayerinfoController.js | 14 +- .../js/layerinfo/ShowLayerinfoFactory.js | 13 +- .../static/js/layerinfo/layerinfoDirective.js | 14 +- .../js/layerlegends/LayerlegendsController.js | 13 +- .../js/layerlegends/layerlegendsDirective.js | 13 +- .../js/layermanager/LayermanagerController.js | 14 +- .../js/layermanager/layermanagerDirective.js | 12 +- .../js/locationinfo/LocationInfoOverlay.js | 16 +- .../js/locationinfo/LocationinfoController.js | 38 +-- .../js/locationinfo/locationinfoDirective.js | 14 +- geoportailv3/static/js/main.js | 250 +++++++++--------- geoportailv3/static/js/map/MapController.js | 17 +- geoportailv3/static/js/map/mapDirective.js | 13 +- .../static/js/measure/MeasureController.js | 37 +-- .../static/js/measure/MeasureDirective.js | 12 +- geoportailv3/static/js/misc/file.js | 10 +- geoportailv3/static/js/module.js | 60 +++-- .../static/js/mymaps/MymapsController.js | 27 +- .../static/js/mymaps/filereaderDirective.js | 14 +- .../static/js/mymaps/mymapsDirective.js | 13 +- .../static/js/offline/Configuration.js | 20 +- geoportailv3/static/js/olcs/Extent.js | 14 +- geoportailv3/static/js/olcs/Lux3DManager.js | 14 +- geoportailv3/static/js/olcs/ZoomToExtent.js | 14 +- geoportailv3/static/js/olcs/toggle3d.js | 9 +- .../static/js/print/PrintController.js | 28 +- geoportailv3/static/js/print/Printservice.js | 20 +- .../static/js/print/printDirective.js | 14 +- .../static/js/profile/ProfileController.js | 35 +-- .../static/js/profile/profileDirective.js | 13 +- geoportailv3/static/js/projections.js | 12 +- .../static/js/query/CasiporeportController.js | 16 +- .../static/js/query/PagreportController.js | 17 +- .../static/js/query/PdsreportController.js | 16 +- .../static/js/query/QueryController.js | 40 +-- geoportailv3/static/js/query/ShowProfile.js | 10 +- .../static/js/query/casiporeportDirective.js | 15 +- .../static/js/query/pagreportDirective.js | 16 +- .../static/js/query/pdsreportDirective.js | 16 +- .../static/js/query/queryDirective.js | 14 +- geoportailv3/static/js/resizemapDirective.js | 16 +- .../static/js/routing/RoutingController.js | 31 ++- .../static/js/routing/routingDirective.js | 13 +- .../js/search/BackgroundLayerSuggestion.js | 10 +- .../static/js/search/SearchController.js | 41 +-- .../static/js/search/searchDirective.js | 14 +- .../static/js/share/ShareController.js | 15 +- .../static/js/share/ShareDirective.js | 13 +- .../static/js/share/ShorturlController.js | 13 +- .../static/js/share/shorturlDirective.js | 13 +- .../static/js/slider/SliderController.js | 16 +- .../static/js/slider/SliderDirective.js | 14 +- .../js/streetview/StreetviewController.js | 21 +- .../js/streetview/streetviewDirective.js | 13 +- .../themeswitcher/ThemeswitcherController.js | 19 +- .../themeswitcher/themeswitcherDirective.js | 13 +- jsapi/src/LayerManager.js | 22 +- jsapi/src/Map.js | 81 +++--- jsapi/src/MyMap.js | 72 ++--- jsapi/src/Piwik.js | 10 +- jsapi/src/PrintManager.js | 58 ++-- jsapi/src/StateManager.js | 20 +- jsapi/src/index.js | 32 ++- 140 files changed, 1799 insertions(+), 1384 deletions(-) diff --git a/geoportailv3/static/js/Activetool.js b/geoportailv3/static/js/Activetool.js index 5c89557ad..3c291edfa 100644 --- a/geoportailv3/static/js/Activetool.js +++ b/geoportailv3/static/js/Activetool.js @@ -1,18 +1,19 @@ +/** + * @module app.Activetool + */ /** * @fileoverview This file provides an Angular service to share which tool is * active. */ -goog.module('app.Activetool'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from './module.js'; /** * @param {app.draw.SelectedFeatures} appSelectedFeatures Selected features service. * @constructor * @ngInject */ -exports = function(appSelectedFeatures) { +const exports = function(appSelectedFeatures) { /** * @type {ol.Collection} @@ -46,3 +47,6 @@ exports.prototype.isActive = function() { }; appModule.service('appActivetool', exports); + + +export default exports; diff --git a/geoportailv3/static/js/CoordinateStringService.js b/geoportailv3/static/js/CoordinateStringService.js index 6bb769cb5..1c8427fd4 100644 --- a/geoportailv3/static/js/CoordinateStringService.js +++ b/geoportailv3/static/js/CoordinateStringService.js @@ -1,15 +1,17 @@ +/** + * @module app.CoordinateStringService + */ +let exports = {}; + /** * @fileoverview Provides a coordinate string output service, useful for * correctly formatted coordinate strings in different projections. */ -goog.module('app.CoordinateStringService'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olCoordinate = goog.require('ol.coordinate'); -const olProj = goog.require('ol.proj'); -const olString = goog.require('ol.string'); +import appModule from './module.js'; +import olCoordinate from 'ol/coordinate.js'; +import olProj from 'ol/proj.js'; +import olString from 'ol/string.js'; /** @@ -136,3 +138,6 @@ function service() { appModule.service('appCoordinateString', service); + + +export default exports; diff --git a/geoportailv3/static/js/ExclusionManager.js b/geoportailv3/static/js/ExclusionManager.js index 33eecbda9..6b0979c8b 100644 --- a/geoportailv3/static/js/ExclusionManager.js +++ b/geoportailv3/static/js/ExclusionManager.js @@ -1,19 +1,19 @@ +/** + * @module app.ExclusionManager + */ /** * @fileoverview This file defines the Exclusion service. This service manages * the exclusion between layers. */ -goog.module('app.ExclusionManager'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olBase = goog.require('ol'); -const olObservable = goog.require('ol.Observable'); -const olObject = goog.require('ol.Object'); -const olEvents = goog.require('ol.events'); -const olLayerProperty = goog.require('ol.layer.Property'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; +import olBase from 'ol.js'; +import olObservable from 'ol/Observable.js'; +import olObject from 'ol/Object.js'; +import olEvents from 'ol/events.js'; +import olLayerProperty from 'ol/layer/Property.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; /** * @param {angularGettext.Catalog} gettextCatalog Gettext catalog. @@ -24,7 +24,7 @@ const olCollectionEventType = goog.require('ol.CollectionEventType'); * @constructor * @ngInject */ -exports = function(gettextCatalog, ngeoBackgroundLayerMgr, +const exports = function(gettextCatalog, ngeoBackgroundLayerMgr, appBlankLayer, appNotify) { /** @@ -193,3 +193,6 @@ exports.prototype.init = function(map) { }; appModule.service('appExclusionManager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/Export.js b/geoportailv3/static/js/Export.js index 38e899c4c..7d7e1b1c5 100644 --- a/geoportailv3/static/js/Export.js +++ b/geoportailv3/static/js/Export.js @@ -1,18 +1,18 @@ +/** + * @module app.Export + */ /** * @fileoverview This file provides an Angular service for interacting * with the "export" web service. */ -goog.module('app.Export'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const appMiscFile = goog.require('app.misc.file'); -const olFormatGPX = goog.require('ol.format.GPX'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olFormatKML = goog.require('ol.format.KML'); -const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); +import appModule from './module.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import appMiscFile from './misc/file.js'; +import olFormatGPX from 'ol/format/GPX.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olFormatKML from 'ol/format/KML.js'; +import olGeomMultiLineString from 'ol/geom/MultiLineString.js'; /** * @constructor @@ -20,7 +20,7 @@ const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); * @param {string} exportgpxkmlUrl URL to echo web service. * @ngInject */ -exports = function($document, exportgpxkmlUrl) { +const exports = function($document, exportgpxkmlUrl) { /** * @type {ol.Map} @@ -296,3 +296,6 @@ exports.prototype.exportFeatures_ = }; appModule.service('appExport', exports); + + +export default exports; diff --git a/geoportailv3/static/js/Geocoding.js b/geoportailv3/static/js/Geocoding.js index 55b39328d..01bcce8c0 100644 --- a/geoportailv3/static/js/Geocoding.js +++ b/geoportailv3/static/js/Geocoding.js @@ -1,13 +1,13 @@ +/** + * @module app.Geocoding + */ /** * @fileoverview This file provides an Angular service for interacting * with the "geocoding" web service. */ -goog.module('app.Geocoding'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olProj = goog.require('ol.proj'); +import appModule from './module.js'; +import olProj from 'ol/proj.js'; /** * @constructor @@ -16,7 +16,7 @@ const olProj = goog.require('ol.proj'); * @param {string} geocodingServiceUrl The url of the service. * @ngInject */ -exports = function($http, reverseGeocodingServiceUrl, geocodingServiceUrl) { +const exports = function($http, reverseGeocodingServiceUrl, geocodingServiceUrl) { /** * @type {angular.$http} * @private @@ -84,3 +84,6 @@ exports.prototype.geocode = function(address) { appModule.service('appGeocoding', exports); + + +export default exports; diff --git a/geoportailv3/static/js/GetDevice.js b/geoportailv3/static/js/GetDevice.js index 904c39c00..fab2255ed 100644 --- a/geoportailv3/static/js/GetDevice.js +++ b/geoportailv3/static/js/GetDevice.js @@ -1,12 +1,12 @@ +/** + * @module app.GetDevice + */ /** * @fileoverview This file provides an Angular service for interacting * with the "elevation" web service. */ -goog.module('app.GetDevice'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from './module.js'; /** * @constructor @@ -15,7 +15,7 @@ const appModule = goog.require('app.module'); * @private * @ngInject */ -exports = function($document, $window) { +const exports = function($document, $window) { /** * @type {Document} * @private @@ -71,3 +71,6 @@ exports.prototype.isHiDpi = function() { }; appModule.service('appGetDevice', exports); + + +export default exports; diff --git a/geoportailv3/static/js/GetElevationService.js b/geoportailv3/static/js/GetElevationService.js index 244f9f46a..eccad6c2c 100644 --- a/geoportailv3/static/js/GetElevationService.js +++ b/geoportailv3/static/js/GetElevationService.js @@ -1,12 +1,15 @@ +/** + * @module app.GetElevationService + */ +let exports = {}; + /** * @fileoverview This file provides an Angular service for interacting * with the "elevation" web service. */ -goog.module('app.GetElevationService'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olProj = goog.require('ol.proj'); +import appModule from './module.js'; +import olProj from 'ol/proj.js'; /** @@ -51,3 +54,6 @@ function service($http, gettextCatalog, elevationServiceUrl) { appModule.service('appGetElevation', service); + + +export default exports; diff --git a/geoportailv3/static/js/GetLayerForCatalogNodeFactory.js b/geoportailv3/static/js/GetLayerForCatalogNodeFactory.js index cdbff71bb..c470e2802 100644 --- a/geoportailv3/static/js/GetLayerForCatalogNodeFactory.js +++ b/geoportailv3/static/js/GetLayerForCatalogNodeFactory.js @@ -1,11 +1,14 @@ +/** + * @module app.GetLayerForCatalogNodeFactory + */ +let exports = {}; + /** * @fileoverview This file defines Angular services to use to get OpenLayers * layers for the application. */ -goog.module('app.GetLayerForCatalogNodeFactory'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from './module.js'; /** @@ -76,3 +79,6 @@ function factory(appGetWmtsLayer, appGetWmsLayer, appModule.factory('appGetLayerForCatalogNode', factory); + + +export default exports; diff --git a/geoportailv3/static/js/GetProfileService.js b/geoportailv3/static/js/GetProfileService.js index 00137d438..c35bac19a 100644 --- a/geoportailv3/static/js/GetProfileService.js +++ b/geoportailv3/static/js/GetProfileService.js @@ -1,13 +1,15 @@ +/** + * @module app.GetProfileService + */ +let exports = {}; /** * @fileoverview This file provides an Angular service for interacting * with the "profile" web service. */ -goog.module('app.GetProfileService'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); +import appModule from './module.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; /** @@ -74,3 +76,6 @@ function service($http, profileServiceUrl) { } appModule.service('appGetProfile', service); + + +export default exports; diff --git a/geoportailv3/static/js/GetShorturlService.js b/geoportailv3/static/js/GetShorturlService.js index 2df14bad9..b209d936c 100644 --- a/geoportailv3/static/js/GetShorturlService.js +++ b/geoportailv3/static/js/GetShorturlService.js @@ -1,11 +1,14 @@ +/** + * @module app.GetShorturlService + */ +let exports = {}; + /** * @fileoverview This file provides an Angular service for interacting * with the "shorturl" web service. */ -goog.module('app.GetShorturlService'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from './module.js'; /** @@ -48,3 +51,6 @@ function service($http, ngeoLocation, shorturlServiceUrl) { appModule.service('appGetShorturl', service); + + +export default exports; diff --git a/geoportailv3/static/js/GetWmsLayerFactory.js b/geoportailv3/static/js/GetWmsLayerFactory.js index e2f7accba..9a6ecbdc0 100644 --- a/geoportailv3/static/js/GetWmsLayerFactory.js +++ b/geoportailv3/static/js/GetWmsLayerFactory.js @@ -1,15 +1,18 @@ +/** + * @module app.GetWmsLayerFactory + */ +let exports = {}; + /** * @fileoverview This file defines Angular services to use to get OpenLayers * layers for the application. */ -goog.module('app.GetWmsLayerFactory'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appOlcsExtent = goog.require('app.olcs.Extent'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const olLayerImage = goog.require('ol.layer.Image'); -const olSourceImageWMS = goog.require('ol.source.ImageWMS'); +import appModule from './module.js'; +import appOlcsExtent from './olcs/Extent.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import olLayerImage from 'ol/layer/Image.js'; +import olSourceImageWMS from 'ol/source/ImageWMS.js'; /** @@ -62,3 +65,6 @@ function factory(proxyWmsUrl, remoteProxyWms, appModule.factory('appGetWmsLayer', factory); + + +export default exports; diff --git a/geoportailv3/static/js/GetWmtsLayerFactory.js b/geoportailv3/static/js/GetWmtsLayerFactory.js index aa2b2e7d0..98099f843 100644 --- a/geoportailv3/static/js/GetWmtsLayerFactory.js +++ b/geoportailv3/static/js/GetWmtsLayerFactory.js @@ -1,19 +1,22 @@ +/** + * @module app.GetWmtsLayerFactory + */ +let exports = {}; + /** * @fileoverview This file defines Angular services to use to get OpenLayers * layers for the application. */ -goog.module('app.GetWmtsLayerFactory'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appOlcsExtent = goog.require('app.olcs.Extent'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const olExtent = goog.require('ol.extent'); -const olProj = goog.require('ol.proj'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olSourceWMTS = goog.require('ol.source.WMTS'); -const olSourceWMTSRequestEncoding = goog.require('ol.source.WMTSRequestEncoding'); -const olTilegridWMTS = goog.require('ol.tilegrid.WMTS'); +import appModule from './module.js'; +import appOlcsExtent from './olcs/Extent.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import olExtent from 'ol/extent.js'; +import olProj from 'ol/proj.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olSourceWMTS from 'ol/source/WMTS.js'; +import olSourceWMTSRequestEncoding from 'ol/source/WMTSRequestEncoding.js'; +import olTilegridWMTS from 'ol/tilegrid/WMTS.js'; /** @@ -100,3 +103,6 @@ function factory(requestScheme) { appModule.factory('appGetWmtsLayer', factory); + + +export default exports; diff --git a/geoportailv3/static/js/LayerOpacityManager.js b/geoportailv3/static/js/LayerOpacityManager.js index 3911b5235..1bd6fe59a 100644 --- a/geoportailv3/static/js/LayerOpacityManager.js +++ b/geoportailv3/static/js/LayerOpacityManager.js @@ -1,3 +1,6 @@ +/** + * @module app.LayerOpacityManager + */ /** * @fileoverview This file defines the "appLayerOpacityManager" service. This * service (re-)sets the opacity of layers added to the map. The opacity is @@ -10,19 +13,16 @@ * appLayerOpacityManager.init(map); * */ -goog.module('app.LayerOpacityManager'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); -const olEvents = goog.require('ol.events'); +import appModule from './module.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; +import olEvents from 'ol/events.js'; /** * @constructor * @ngInject */ -exports = function() { +const exports = function() { }; @@ -47,3 +47,6 @@ exports.prototype.init = function(map) { appModule.service('appLayerOpacityManager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/LayerPermalinkManager.js b/geoportailv3/static/js/LayerPermalinkManager.js index eba0ec9c8..4bd8a3cb2 100644 --- a/geoportailv3/static/js/LayerPermalinkManager.js +++ b/geoportailv3/static/js/LayerPermalinkManager.js @@ -1,18 +1,17 @@ +/** + * @module app.LayerPermalinkManager + */ /** * @fileoverview This files defines an Angular Service for managing the * selected layers permalinks */ -goog.module('app.LayerPermalinkManager'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); -const olEvents = goog.require('ol.events'); -const olObjectEventType = goog.require('ol.ObjectEventType'); -const olArray = goog.require('ol.array'); - +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; +import appEventsThemesEventType from './events/ThemesEventType.js'; +import olEvents from 'ol/events.js'; +import olObjectEventType from 'ol/ObjectEventType.js'; +import olArray from 'ol/array.js'; /** * @constructor @@ -30,7 +29,7 @@ const olArray = goog.require('ol.array'); * @param {angularGettext.Catalog} gettextCatalog Gettext service. * @ngInject */ -exports = function(appStateManager, +const exports = function(appStateManager, appGetLayerForCatalogNode, appThemes, appTheme, ngeoBackgroundLayerMgr, ngeoLocation, appWmsHelper, appWmtsHelper, appNotify, gettextCatalog) { /** @@ -639,3 +638,6 @@ exports.prototype.init = }; appModule.service('appLayerPermalinkManager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/LocationControl.js b/geoportailv3/static/js/LocationControl.js index 4fb99243f..4e52e3146 100644 --- a/geoportailv3/static/js/LocationControl.js +++ b/geoportailv3/static/js/LocationControl.js @@ -1,22 +1,21 @@ +/** + * @module app.LocationControl + */ /** * @fileoverview This file defines the geolocation control. * */ -goog.module('app.LocationControl'); - - -goog.module.declareLegacyNamespace(); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olBase = goog.require('ol'); -const olCss = goog.require('ol.css'); -const olControlControl = goog.require('ol.control.Control'); -const olEvents = goog.require('ol.events'); -const olFeature = goog.require('ol.Feature'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeolocation = goog.require('ol.Geolocation'); -const olGeolocationProperty = goog.require('ol.GeolocationProperty'); -const olObject = goog.require('ol.Object'); +import appNotifyNotificationType from './NotifyNotificationType.js'; +import olBase from 'ol.js'; +import olCss from 'ol/css.js'; +import olControlControl from 'ol/control/Control.js'; +import olEvents from 'ol/events.js'; +import olFeature from 'ol/Feature.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeolocation from 'ol/Geolocation.js'; +import olGeolocationProperty from 'ol/GeolocationProperty.js'; +import olObject from 'ol/Object.js'; /** * @constructor @@ -25,7 +24,7 @@ const olObject = goog.require('ol.Object'); * options. * @ngInject */ -exports = function(options) { +const exports = function(options) { var className = (options.className !== undefined) ? options.className : 'location-button'; /** @@ -107,6 +106,7 @@ exports = function(options) { }); }; + olBase.inherits(exports, olControlControl); @@ -227,3 +227,6 @@ exports.prototype.initFeatureOverlay_ = function() { exports.prototype.clearFeatureOverlay_ = function() { this.featureOverlay_.clear(); }; + + +export default exports; diff --git a/geoportailv3/static/js/LotChasse.js b/geoportailv3/static/js/LotChasse.js index 02b90fde4..d47b02458 100644 --- a/geoportailv3/static/js/LotChasse.js +++ b/geoportailv3/static/js/LotChasse.js @@ -1,18 +1,18 @@ -goog.module('app.LotChasse'); +/** + * @module app.LotChasse + */ /** * @fileoverview This file defines the Blank Layer service. This service * creates an empty layer and the corresponding spec. */ -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +import appModule from './module.js'; /** * @constructor * @ngInject */ -exports = function() { +const exports = function() { /** * @typedef {String} * @private @@ -39,3 +39,6 @@ exports.prototype.getLotChasse = function() { }; appModule.service('appLotChasse', exports); + + +export default exports; diff --git a/geoportailv3/static/js/MainController.js b/geoportailv3/static/js/MainController.js index 7bdbcee92..fcad3c7b7 100644 --- a/geoportailv3/static/js/MainController.js +++ b/geoportailv3/static/js/MainController.js @@ -1,3 +1,6 @@ +/** + * @module app.MainController + */ /** * @fileoverview This file defines the controller class for the application's * main controller (created using "ng-controller" in the page). @@ -7,32 +10,29 @@ * application. It also defines the behavior of elements of the HTML page (the * management of the sidebar for example). */ -goog.module('app.MainController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appLocationControl = goog.require('app.LocationControl'); -const appMap = goog.require('app.Map'); -const olFeature = goog.require('ol.Feature'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olMapProperty = goog.require('ol.MapProperty'); -const olInteraction = goog.require('ol.interaction'); -const olLayerVector = goog.require('ol.layer.Vector'); -const ngeoMiscSyncArrays = goog.require('ngeo.misc.syncArrays'); -const olEvents = goog.require('ol.events'); -const olObject = goog.require('ol.Object'); -const olView = goog.require('ol.View'); -const olControlAttribution = goog.require('ol.control.Attribution'); -const olControlFullScreen = goog.require('ol.control.FullScreen'); -const olControlOverviewMap = goog.require('ol.control.OverviewMap'); -const olControlZoom = goog.require('ol.control.Zoom'); -const appOlcsZoomToExtent = goog.require('app.olcs.ZoomToExtent'); -const appOlcsLux3DManager = goog.require('app.olcs.Lux3DManager'); -const olProj = goog.require('ol.proj'); -const olMath = goog.require('ol.math'); -const appOfflineDownloader = goog.require('app.OfflineDownloader'); -const appOfflineRestorer = goog.require('app.OfflineRestorer'); +import appModule from './module.js'; +import appLocationControl from './LocationControl.js'; +import appMap from './Map.js'; +import olFeature from 'ol/Feature.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olMapProperty from 'ol/MapProperty.js'; +import olInteraction from 'ol/interaction.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import ngeoMiscSyncArrays from 'ngeo/misc/syncArrays.js'; +import olEvents from 'ol/events.js'; +import olObject from 'ol/Object.js'; +import olView from 'ol/View.js'; +import olControlAttribution from 'ol/control/Attribution.js'; +import olControlFullScreen from 'ol/control/FullScreen.js'; +import olControlOverviewMap from 'ol/control/OverviewMap.js'; +import olControlZoom from 'ol/control/Zoom.js'; +import appOlcsZoomToExtent from './olcs/ZoomToExtent.js'; +import appOlcsLux3DManager from './olcs/Lux3DManager.js'; +import olProj from 'ol/proj.js'; +import olMath from 'ol/math.js'; +import appOfflineDownloader from './OfflineDownloader.js'; +import appOfflineRestorer from './OfflineRestorer.js'; /** * @param {angular.Scope} $scope Scope. @@ -79,7 +79,7 @@ const appOfflineRestorer = goog.require('app.OfflineRestorer'); * @export * @ngInject */ -exports = function( +const exports = function( $scope, ngeoFeatureOverlayMgr, ngeoBackgroundLayerMgr, ngeoOfflineServiceManager, gettextCatalog, appExclusionManager, appLayerOpacityManager, appLayerPermalinkManager, appMymaps, appStateManager, appThemes, appTheme, @@ -972,3 +972,6 @@ exports.prototype.isDisconnectedOrOffline = function() { }; appModule.controller('MainController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/Map.js b/geoportailv3/static/js/Map.js index 27488b8f6..11b18d68d 100644 --- a/geoportailv3/static/js/Map.js +++ b/geoportailv3/static/js/Map.js @@ -1,13 +1,14 @@ +/** + * @module app.Map + */ /** * @fileoverview This file provides the "app.Map" class. * it extends "ol.Map" to support 3D in `getCoordinateFromPixel` method. */ -goog.module('app.Map'); -goog.module.declareLegacyNamespace(); -const olMap = goog.require('ol.Map'); +import olMap from 'ol/Map.js'; -exports = class extends olMap { +const exports = class extends olMap { /** * Currently the zIndex is used to order the layers. @@ -53,3 +54,6 @@ exports = class extends olMap { return [cartesian.x, cartesian.y, cartesian.z]; } }; + + +export default exports; diff --git a/geoportailv3/static/js/Mymaps.js b/geoportailv3/static/js/Mymaps.js index 4fd476da4..215f543c1 100644 --- a/geoportailv3/static/js/Mymaps.js +++ b/geoportailv3/static/js/Mymaps.js @@ -1,30 +1,29 @@ +/** + * @module app.Mymaps + */ /** * @fileoverview This file defines the mymaps webservice. this service * interacts with the Geoportail MyMaps webservice and exposes functions that * return objects representing maps and features. */ -goog.module('app.Mymaps'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olObj = goog.require('ol.obj'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomMultiPoint = goog.require('ol.geom.MultiPoint'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olProj = goog.require('ol.proj'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleIcon = goog.require('ol.style.Icon'); -const olStyleRegularShape = goog.require('ol.style.RegularShape'); -const olStyleText = goog.require('ol.style.Text'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); - +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; +import olObj from 'ol/obj.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomMultiPoint from 'ol/geom/MultiPoint.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olProj from 'ol/proj.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleIcon from 'ol/style/Icon.js'; +import olStyleRegularShape from 'ol/style/RegularShape.js'; +import olStyleText from 'ol/style/Text.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; /** * @constructor @@ -46,7 +45,7 @@ const olStyleStyle = goog.require('ol.style.Style'); * @param {string} arrowModelUrl URL to the Cesium arrow model. * @ngInject */ -exports = function($http, mymapsMapsUrl, mymapsUrl, appStateManager, +const exports = function($http, mymapsMapsUrl, mymapsUrl, appStateManager, appUserManager, appNotify, appGetLayerForCatalogNode, gettextCatalog, appThemes, appTheme, ngeoBackgroundLayerMgr, ngeoNetworkStatus, arrowUrl, arrowModelUrl) { /** @@ -1476,3 +1475,6 @@ exports.prototype.createStyleFunction = function(curMap) { }; appModule.service('appMymaps', exports); + + +export default exports; diff --git a/geoportailv3/static/js/MymapsOffline.js b/geoportailv3/static/js/MymapsOffline.js index cabc912ea..82d12e698 100644 --- a/geoportailv3/static/js/MymapsOffline.js +++ b/geoportailv3/static/js/MymapsOffline.js @@ -1,8 +1,7 @@ -goog.module('app.MymapsOffline'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.MymapsOffline + */ +import appModule from './module.js'; /** * @constructor @@ -11,7 +10,7 @@ const appModule = goog.require('app.module'); * @param {ngeo.offline.Configuration} ngeoOfflineConfiguration ngeo Offline Configuration * @ngInject */ -exports = function(appMymaps, appDrawnFeatures, ngeoOfflineConfiguration) { +const exports = function(appMymaps, appDrawnFeatures, ngeoOfflineConfiguration) { /** * @type {app.Mymaps} * @private @@ -84,3 +83,6 @@ exports.prototype.restore = function() { }; appModule.service('appMymapsOffline', exports); + + +export default exports; diff --git a/geoportailv3/static/js/NotifyFactory.js b/geoportailv3/static/js/NotifyFactory.js index 7ffa3526d..c6fa8f02f 100644 --- a/geoportailv3/static/js/NotifyFactory.js +++ b/geoportailv3/static/js/NotifyFactory.js @@ -1,12 +1,15 @@ +/** + * @module app.NotifyFactory + */ +let exports = {}; + /** * @fileoverview Provides a flash message service. That service helps * displaying general messages. */ -goog.module('app.NotifyFactory'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; /** * @return {app.Notify} The notify function. @@ -41,3 +44,6 @@ function factory() { } appModule.factory('appNotify', factory); + + +export default exports; diff --git a/geoportailv3/static/js/NotifyNotificationType.js b/geoportailv3/static/js/NotifyNotificationType.js index 56fd6f5da..38cde19b4 100644 --- a/geoportailv3/static/js/NotifyNotificationType.js +++ b/geoportailv3/static/js/NotifyNotificationType.js @@ -1,12 +1,14 @@ -goog.module('app.NotifyNotificationType'); - -goog.module.declareLegacyNamespace(); - +/** + * @module app.NotifyNotificationType + */ /** * @enum {string} */ -exports = { +const exports = { INFO: 'alert-info', WARNING: 'alert-warning', ERROR: 'alert-danger' }; + + +export default exports; diff --git a/geoportailv3/static/js/OfflineDownloader.js b/geoportailv3/static/js/OfflineDownloader.js index b96153c9a..4525354d6 100644 --- a/geoportailv3/static/js/OfflineDownloader.js +++ b/geoportailv3/static/js/OfflineDownloader.js @@ -1,8 +1,8 @@ -goog.module('app.OfflineDownloader'); -goog.module.declareLegacyNamespace(); - -const appModule = goog.require('app.module'); -const downloader = goog.require('ngeo.offline.Downloader'); +/** + * @module app.OfflineDownloader + */ +import appModule from './module.js'; +import downloader from 'ngeo/offline/Downloader.js'; /** * @extends {ngeo.offline.Downloader} @@ -47,4 +47,7 @@ const OfflineDownloader = class extends downloader { }; appModule.service('appOfflineDownloader', OfflineDownloader); -exports = OfflineDownloader; +const exports = OfflineDownloader; + + +export default exports; diff --git a/geoportailv3/static/js/OfflineRestorer.js b/geoportailv3/static/js/OfflineRestorer.js index 79e39738a..3e72db05c 100644 --- a/geoportailv3/static/js/OfflineRestorer.js +++ b/geoportailv3/static/js/OfflineRestorer.js @@ -1,9 +1,8 @@ -goog.module('app.OfflineRestorer'); -goog.module.declareLegacyNamespace(); - -const appModule = goog.require('app.module'); - -const restorer = goog.require('ngeo.offline.Restorer'); +/** + * @module app.OfflineRestorer + */ +import appModule from './module.js'; +import restorer from 'ngeo/offline/Restorer.js'; /** * @extends {ngeo.offline.Restorer} @@ -62,4 +61,7 @@ const OfflineRestorer = class extends restorer { }; appModule.service('appOfflineRestorer', OfflineRestorer); -exports = OfflineRestorer; +const exports = OfflineRestorer; + + +export default exports; diff --git a/geoportailv3/static/js/Piwik.js b/geoportailv3/static/js/Piwik.js index 0f8d8cb97..cc1c63f55 100644 --- a/geoportailv3/static/js/Piwik.js +++ b/geoportailv3/static/js/Piwik.js @@ -1,10 +1,13 @@ -goog.module('app.Piwik'); - - -goog.module.declareLegacyNamespace(); +/** + * @module app.Piwik + */ +let exports = {}; /** * @typedef {{push: function(Array)}} */ exports; + + +export default exports; diff --git a/geoportailv3/static/js/Routing.js b/geoportailv3/static/js/Routing.js index f1f0f4b9b..fa9f0b655 100644 --- a/geoportailv3/static/js/Routing.js +++ b/geoportailv3/static/js/Routing.js @@ -1,16 +1,16 @@ +/** + * @module app.Routing + */ /** * @fileoverview This file provides an Angular service for interacting * with the "routing" web service. */ -goog.module('app.Routing'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olBase = goog.require('ol'); -const olStyle = goog.require('ol.style'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); +import appModule from './module.js'; +import olBase from 'ol.js'; +import olStyle from 'ol/style.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; /** * @constructor @@ -21,7 +21,7 @@ const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); * @param {app.StateManager} appStateManager The state manager service. * @ngInject */ -exports = function($http, routingServiceUrl, gettextCatalog, +const exports = function($http, routingServiceUrl, gettextCatalog, ngeoFeatureOverlayMgr, appStateManager) { /** * @type {app.StateManager} @@ -324,3 +324,6 @@ exports.prototype.getRoute = function() { appModule.service('appRouting', exports); + + +export default exports; diff --git a/geoportailv3/static/js/ScalesService.js b/geoportailv3/static/js/ScalesService.js index 208b99930..b62d51912 100644 --- a/geoportailv3/static/js/ScalesService.js +++ b/geoportailv3/static/js/ScalesService.js @@ -1,21 +1,20 @@ - +/** + * @module app.ScalesService + */ /** * @fileoverview This file provides a scale service to display scales * with ngeoScaleselector */ -goog.module('app.ScalesService'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olObj = goog.require('ol.obj'); +import appModule from './module.js'; +import olObj from 'ol/obj.js'; /** * @constructor * @param {angular.$sce} $sce Angular sce service. * @ngInject */ -exports = function($sce) { +const exports = function($sce) { /** * The zoom level/scale map object for the ngeoScaleselector directive. * The values need to be trusted as HTML. @@ -73,3 +72,6 @@ exports.prototype.setMaxZoomLevel = function(maxScale) { }; appModule.service('appScalesService', exports); + + +export default exports; diff --git a/geoportailv3/static/js/StateManager.js b/geoportailv3/static/js/StateManager.js index 097294e35..71f262b93 100644 --- a/geoportailv3/static/js/StateManager.js +++ b/geoportailv3/static/js/StateManager.js @@ -1,15 +1,15 @@ +/** + * @module app.StateManager + */ /** * @fileoverview This files provides a service for managing the application * state. The application state is written to both the URL and the local * storage. */ -goog.module('app.StateManager'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olMath = goog.require('ol.math'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); +import appModule from './module.js'; +import olMath from 'ol/math.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; /** * @constructor @@ -18,7 +18,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @param {angularGettext.Catalog} gettextCatalog Gettext service. * @ngInject */ -exports = function(ngeoLocation, appNotify, gettextCatalog) { +const exports = function(ngeoLocation, appNotify, gettextCatalog) { /** * @type {angularGettext.Catalog} * @private @@ -208,3 +208,6 @@ exports.prototype.deleteParam = function(key) { }; appModule.service('appStateManager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/Theme.js b/geoportailv3/static/js/Theme.js index df998739e..cb4cad6ce 100644 --- a/geoportailv3/static/js/Theme.js +++ b/geoportailv3/static/js/Theme.js @@ -1,10 +1,11 @@ +/** + * @module app.Theme + */ /** * @fileoverview This service keeps and share the state of the theme. */ -goog.module('app.Theme'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from './module.js'; /** * @constructor @@ -13,7 +14,7 @@ const appModule = goog.require('app.module'); * @param {app.Themes} appThemes The themes services. * @ngInject */ -exports = function($window, ngeoLocation, appThemes) { +const exports = function($window, ngeoLocation, appThemes) { /** * @const @@ -148,3 +149,6 @@ exports.prototype.themeInUrl = function(pathElements) { exports.DEFAULT_THEME_ = 'main'; appModule.service('appTheme', exports); + + +export default exports; diff --git a/geoportailv3/static/js/Themes.js b/geoportailv3/static/js/Themes.js index 71fd33f67..8d922e287 100644 --- a/geoportailv3/static/js/Themes.js +++ b/geoportailv3/static/js/Themes.js @@ -1,17 +1,17 @@ +/** + * @module app.Themes + */ /** * @fileoverview This file defines the Themes service. This service interacts * with c2cgeoportal's "themes" web service and exposes functions that return * objects in the tree returned by the "themes" web service. */ -goog.module('app.Themes'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olBase = goog.require('ol'); -const olArray = goog.require('ol.array'); -const olEventsEventTarget = goog.require('ol.events.EventTarget'); -const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); +import appModule from './module.js'; +import olBase from 'ol.js'; +import olArray from 'ol/array.js'; +import olEventsEventTarget from 'ol/events/EventTarget.js'; +import appEventsThemesEventType from './events/ThemesEventType.js'; /** * @constructor @@ -25,7 +25,7 @@ const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); * @param {app.GetDevice} appGetDevice The device service. * @ngInject */ -exports = function($window, $http, treeUrl, isThemePrivateUrl, +const exports = function($window, $http, treeUrl, isThemePrivateUrl, appGetWmtsLayer, appBlankLayer, appGetDevice) { olEventsEventTarget.call(this); @@ -71,6 +71,7 @@ exports = function($window, $http, treeUrl, isThemePrivateUrl, */ this.promise_ = null; }; + olBase.inherits(exports, olEventsEventTarget); @@ -255,3 +256,6 @@ exports.prototype.getFlatCatalog = function() { }; appModule.service('appThemes', exports); + + +export default exports; diff --git a/geoportailv3/static/js/UserManager.js b/geoportailv3/static/js/UserManager.js index 7ff85e45a..4b7b44e22 100644 --- a/geoportailv3/static/js/UserManager.js +++ b/geoportailv3/static/js/UserManager.js @@ -1,15 +1,14 @@ +/** + * @module app.UserManager + */ /** * @fileoverview This file defines the user manager service. this service * interacts with the Geoportail webservice to login logout and keep the state * of the user. */ -goog.module('app.UserManager'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); - +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; /** * @constructor @@ -22,7 +21,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @param {string} appAuthtktCookieName The authentication cookie name. * @ngInject */ -exports = function($http, loginUrl, logoutUrl, +const exports = function($http, loginUrl, logoutUrl, getuserinfoUrl, appNotify, gettextCatalog, appAuthtktCookieName) { /** * @type {string} @@ -301,3 +300,6 @@ exports.prototype.hasCookie = function(cname) { appModule.service('appUserManager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/WmsHelper.js b/geoportailv3/static/js/WmsHelper.js index 278223df0..563b20b70 100644 --- a/geoportailv3/static/js/WmsHelper.js +++ b/geoportailv3/static/js/WmsHelper.js @@ -1,23 +1,22 @@ +/** + * @module app.WmsHelper + */ /** * @fileoverview Provides a wms helper iservice. That service is a function used * to retrieve and display the info (metadata) for a layer. */ -goog.module('app.WmsHelper'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appOlcsExtent = goog.require('app.olcs.Extent'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const olFormatWMSCapabilities = goog.require('ol.format.WMSCapabilities'); -const olLayerImage = goog.require('ol.layer.Image'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olProj = goog.require('ol.proj'); -const olSourceImageWMS = goog.require('ol.source.ImageWMS'); -const olSourceTileWMS = goog.require('ol.source.TileWMS'); -const olBase = goog.require('ol'); - +import appModule from './module.js'; +import appOlcsExtent from './olcs/Extent.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import olFormatWMSCapabilities from 'ol/format/WMSCapabilities.js'; +import olLayerImage from 'ol/layer/Image.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olProj from 'ol/proj.js'; +import olSourceImageWMS from 'ol/source/ImageWMS.js'; +import olSourceTileWMS from 'ol/source/TileWMS.js'; +import olBase from 'ol.js'; /** * @constructor @@ -29,7 +28,7 @@ const olBase = goog.require('ol'); * @param {string} httpsProxyUrl URL to https proxy. * @ngInject */ -exports = function($sce, $http, appNotify, gettextCatalog, +const exports = function($sce, $http, appNotify, gettextCatalog, $window, httpsProxyUrl) { /** @@ -520,3 +519,6 @@ exports.prototype.proxyIfNeeded = function(url) { }; appModule.service('appWmsHelper', exports); + + +export default exports; diff --git a/geoportailv3/static/js/WmtsHelper.js b/geoportailv3/static/js/WmtsHelper.js index 498b0d527..b6d290d75 100644 --- a/geoportailv3/static/js/WmtsHelper.js +++ b/geoportailv3/static/js/WmtsHelper.js @@ -1,20 +1,19 @@ +/** + * @module app.WmtsHelper + */ /** * @fileoverview Provides a wmts helper iservice. That service is a function used * to retrieve and display the info (metadata) for a layer. */ -goog.module('app.WmtsHelper'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const appOlcsExtent = goog.require('app.olcs.Extent'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const olFormatWMTSCapabilities = goog.require('ol.format.WMTSCapabilities'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olSourceWMTS = goog.require('ol.source.WMTS'); -const olBase = goog.require('ol'); - +import appModule from './module.js'; +import appNotifyNotificationType from './NotifyNotificationType.js'; +import appOlcsExtent from './olcs/Extent.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import olFormatWMTSCapabilities from 'ol/format/WMTSCapabilities.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olSourceWMTS from 'ol/source/WMTS.js'; +import olBase from 'ol.js'; /** * @constructor @@ -26,7 +25,7 @@ const olBase = goog.require('ol'); * @param {string} httpsProxyUrl URL to https proxy. * @ngInject */ -exports = function($sce, $http, appNotify, gettextCatalog, +const exports = function($sce, $http, appNotify, gettextCatalog, $window, httpsProxyUrl) { /** @@ -390,3 +389,6 @@ exports.prototype.proxyIfNeeded = function(url) { }; appModule.service('appWmtsHelper', exports); + + +export default exports; diff --git a/geoportailv3/static/js/askredirect/AskredirectController.js b/geoportailv3/static/js/askredirect/AskredirectController.js index c3d99a5a5..d7e30175d 100644 --- a/geoportailv3/static/js/askredirect/AskredirectController.js +++ b/geoportailv3/static/js/askredirect/AskredirectController.js @@ -1,7 +1,7 @@ -goog.module('app.askredirect.AskredirectController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +/** + * @module app.askredirect.AskredirectController + */ +import appModule from '../module.js'; /** * @constructor @@ -10,7 +10,7 @@ const appModule = goog.require('app.module'); * @export * @ngInject */ -exports = function($window, ngeoLocation) { +const exports = function($window, ngeoLocation) { /** * @type {angular.$window} * @private @@ -44,3 +44,6 @@ exports.prototype.redirect = function() { appModule.controller('AppAskredirectController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/askredirect/askredirectDirective.js b/geoportailv3/static/js/askredirect/askredirectDirective.js index 39c72d863..abbe19f70 100644 --- a/geoportailv3/static/js/askredirect/askredirectDirective.js +++ b/geoportailv3/static/js/askredirect/askredirectDirective.js @@ -1,14 +1,14 @@ -goog.module('app.askredirect.askredirectDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +/** + * @module app.askredirect.askredirectDirective + */ +import appModule from '../module.js'; /** * @param {string} appAskredirectTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appAskredirectTemplateUrl) { +const exports = function(appAskredirectTemplateUrl) { return { restrict: 'E', scope: { @@ -20,4 +20,8 @@ exports = function(appAskredirectTemplateUrl) { templateUrl: appAskredirectTemplateUrl }; }; + appModule.directive('appAskredirect', exports); + + +export default exports; diff --git a/geoportailv3/static/js/authentication/AuthenticationController.js b/geoportailv3/static/js/authentication/AuthenticationController.js index c13dec757..a7ece0d29 100644 --- a/geoportailv3/static/js/authentication/AuthenticationController.js +++ b/geoportailv3/static/js/authentication/AuthenticationController.js @@ -1,8 +1,7 @@ -goog.module('app.authentication.AuthenticationController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.authentication.AuthenticationController + */ +import appModule from '../module.js'; /** * @param {app.UserManager} appUserManager The usermanager service. @@ -10,7 +9,7 @@ const appModule = goog.require('app.module'); * @export * @ngInject */ -exports = function(appUserManager) { +const exports = function(appUserManager) { /** * @type {app.UserManager} @@ -91,3 +90,6 @@ exports.prototype.getUsername = function() { appModule.controller('AppAuthenticationController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/authentication/authenticationDirective.js b/geoportailv3/static/js/authentication/authenticationDirective.js index 1c0d8e6cf..993fd702b 100644 --- a/geoportailv3/static/js/authentication/authenticationDirective.js +++ b/geoportailv3/static/js/authentication/authenticationDirective.js @@ -1,15 +1,14 @@ -goog.module('app.authentication.authenticationDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.authentication.authenticationDirective + */ +import appModule from '../module.js'; /** * @param {string} appAuthenticationTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appAuthenticationTemplateUrl) { +const exports = function(appAuthenticationTemplateUrl) { return { restrict: 'E', scope: { @@ -24,3 +23,6 @@ exports = function(appAuthenticationTemplateUrl) { }; appModule.directive('appAuthentication', exports); + + +export default exports; diff --git a/geoportailv3/static/js/backgroundlayer/BackgroundlayerController.js b/geoportailv3/static/js/backgroundlayer/BackgroundlayerController.js index d7a386894..3b37e8081 100644 --- a/geoportailv3/static/js/backgroundlayer/BackgroundlayerController.js +++ b/geoportailv3/static/js/backgroundlayer/BackgroundlayerController.js @@ -1,3 +1,6 @@ +/** + * @module app.backgroundlayer.BackgroundlayerController + */ /** * @fileoverview This file provides the "backgroundlayer" directive. This * directive is used to create a dropdown for selecting the map's background @@ -13,12 +16,9 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.backgroundlayer.BackgroundlayerController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olEvents = goog.require('ol.events'); +import appModule from '../module.js'; +import olEvents from 'ol/events.js'; /** * @constructor @@ -28,7 +28,7 @@ const olEvents = goog.require('ol.events'); * @export * @ngInject */ -exports = function(ngeoBackgroundLayerMgr, appThemes) { +const exports = function(ngeoBackgroundLayerMgr, appThemes) { /** * @type {ngeo.map.BackgroundLayerMgr} @@ -65,3 +65,6 @@ exports.prototype.setLayer = function(layer) { appModule.controller('AppBackgroundlayerController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/backgroundlayer/BlankLayer.js b/geoportailv3/static/js/backgroundlayer/BlankLayer.js index e72683e13..e628971e4 100644 --- a/geoportailv3/static/js/backgroundlayer/BlankLayer.js +++ b/geoportailv3/static/js/backgroundlayer/BlankLayer.js @@ -1,20 +1,20 @@ +/** + * @module app.backgroundlayer.BlankLayer + */ /** * @fileoverview This file defines the Blank Layer service. This service * creates an empty layer and the corresponding spec. */ -goog.module('app.backgroundlayer.BlankLayer'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olLayerTile = goog.require('ol.layer.Tile'); +import appModule from '../module.js'; +import olLayerTile from 'ol/layer/Tile.js'; /** * @constructor * @param {angularGettext.Catalog} gettextCatalog Gettext service. * @ngInject */ -exports = function(gettextCatalog) { +const exports = function(gettextCatalog) { /** * @typedef {ol.layer.Tile} @@ -35,3 +35,6 @@ exports.prototype.getLayer = function() { }; appModule.service('appBlankLayer', exports); + + +export default exports; diff --git a/geoportailv3/static/js/backgroundlayer/backgroundlayerDirective.js b/geoportailv3/static/js/backgroundlayer/backgroundlayerDirective.js index d47dbd842..016f8c299 100644 --- a/geoportailv3/static/js/backgroundlayer/backgroundlayerDirective.js +++ b/geoportailv3/static/js/backgroundlayer/backgroundlayerDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.backgroundlayer.backgroundlayerDirective + */ /** * @fileoverview This file provides the "backgroundlayer" directive. This * directive is used to create a dropdown for selecting the map's background @@ -13,11 +16,8 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.backgroundlayer.backgroundlayerDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appBackgroundlayerTemplateUrl URL to backgroundlayer @@ -25,7 +25,7 @@ const appModule = goog.require('app.module'); * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appBackgroundlayerTemplateUrl) { +const exports = function(appBackgroundlayerTemplateUrl) { return { restrict: 'E', scope: { @@ -40,3 +40,6 @@ exports = function(appBackgroundlayerTemplateUrl) { appModule.directive('appBackgroundlayer', exports); + + +export default exports; diff --git a/geoportailv3/static/js/catalog/CatalogController.js b/geoportailv3/static/js/catalog/CatalogController.js index 01fcaf1a0..729ecfc07 100644 --- a/geoportailv3/static/js/catalog/CatalogController.js +++ b/geoportailv3/static/js/catalog/CatalogController.js @@ -1,3 +1,6 @@ +/** + * @module app.catalog.CatalogController + */ /** * @fileoverview This file provides the "catalog" directive. That directive is * used to create the catalog tree in the page. It is based on the @@ -13,15 +16,12 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.catalog.CatalogController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); -const olEvents = goog.require('ol.events'); -const olProj = goog.require('ol.proj'); -const olView = goog.require('ol.View'); +import appModule from '../module.js'; +import appEventsThemesEventType from '../events/ThemesEventType.js'; +import olEvents from 'ol/events.js'; +import olProj from 'ol/proj.js'; +import olView from 'ol/View.js'; /** * @constructor @@ -36,7 +36,7 @@ const olView = goog.require('ol.View'); * @export * @ngInject */ -exports = function($scope, appThemes, appTheme, +const exports = function($scope, appThemes, appTheme, appGetLayerForCatalogNode, appScalesService, maxExtent, appStateManager) { /** * @type {app.StateManager} @@ -175,3 +175,6 @@ exports.prototype.toggle = function(node) { appModule.controller('AppCatalogController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/catalog/catalogDirective.js b/geoportailv3/static/js/catalog/catalogDirective.js index b434e63a2..fb4e054bb 100644 --- a/geoportailv3/static/js/catalog/catalogDirective.js +++ b/geoportailv3/static/js/catalog/catalogDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.catalog.catalogDirective + */ /** * @fileoverview This file provides the "catalog" directive. That directive is * used to create the catalog tree in the page. It is based on the @@ -13,16 +16,13 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.catalog.catalogDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Definition Object. */ -exports = function() { +const exports = function() { return { restrict: 'E', scope: { @@ -40,3 +40,6 @@ exports = function() { appModule.directive('appCatalog', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/DrawController.js b/geoportailv3/static/js/draw/DrawController.js index bd58501c8..4cbd29721 100644 --- a/geoportailv3/static/js/draw/DrawController.js +++ b/geoportailv3/static/js/draw/DrawController.js @@ -1,3 +1,6 @@ +/** + * @module app.draw.DrawController + */ /** * @fileoverview This file provides a draw directive. This directive is used * to create a draw panel in the page. @@ -11,33 +14,30 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.draw.DrawController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appInteractionDrawRoute = goog.require('app.interaction.DrawRoute'); -const appInteractionClipLine = goog.require('app.interaction.ClipLine'); -const appInteractionModifyCircle = goog.require('app.interaction.ModifyCircle'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const ngeoInteractionMeasure = goog.require('ngeo.interaction.Measure'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); -const olFeature = goog.require('ol.Feature'); -const olObject = goog.require('ol.Object'); -const olObservable = goog.require('ol.Observable'); -const olOverlay = goog.require('ol.Overlay'); -const olEvents = goog.require('ol.events'); -const olExtent = goog.require('ol.extent'); -const olProj = goog.require('ol.proj'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olInteraction = goog.require('ol.interaction'); -const olInteractionDraw = goog.require('ol.interaction.Draw'); -const olInteractionModify = goog.require('ol.interaction.Modify'); -const olInteractionSelect = goog.require('ol.interaction.Select'); -const olInteractionTranslate = goog.require('ol.interaction.Translate'); +import appModule from '../module.js'; +import appInteractionDrawRoute from '../interaction/DrawRoute.js'; +import appInteractionClipLine from '../interaction/ClipLine.js'; +import appInteractionModifyCircle from '../interaction/ModifyCircle.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import ngeoInteractionMeasure from 'ngeo/interaction/Measure.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; +import olFeature from 'ol/Feature.js'; +import olObject from 'ol/Object.js'; +import olObservable from 'ol/Observable.js'; +import olOverlay from 'ol/Overlay.js'; +import olEvents from 'ol/events.js'; +import olExtent from 'ol/extent.js'; +import olProj from 'ol/proj.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olInteraction from 'ol/interaction.js'; +import olInteractionDraw from 'ol/interaction/Draw.js'; +import olInteractionModify from 'ol/interaction/Modify.js'; +import olInteractionSelect from 'ol/interaction/Select.js'; +import olInteractionTranslate from 'ol/interaction/Translate.js'; /** * @param {!angular.Scope} $scope Scope. @@ -57,7 +57,7 @@ const olInteractionTranslate = goog.require('ol.interaction.Translate'); * @export * @ngInject */ -exports = function($scope, +const exports = function($scope, appFeaturePopup, appDrawnFeatures, appSelectedFeatures, appMymaps, gettextCatalog, $compile, appNotify, $anchorScroll, appActivetool, appGetDevice, $http, getRouteUrl) { @@ -1047,3 +1047,6 @@ exports.prototype.keyboardHandler_ = function(mapBrowserEvent) { }; appModule.controller('AppDrawController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/DrawnFeatures.js b/geoportailv3/static/js/draw/DrawnFeatures.js index ef3d6bef7..c2a3945bd 100644 --- a/geoportailv3/static/js/draw/DrawnFeatures.js +++ b/geoportailv3/static/js/draw/DrawnFeatures.js @@ -1,19 +1,18 @@ +/** + * @module app.draw.DrawnFeatures + */ /** * @fileoverview Provides a drawn features service useful to share * information about the drawn features throughout the application. */ -goog.module('app.draw.DrawnFeatures'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appDrawFeatureHash = goog.require('app.draw.FeatureHash'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olSourceVector = goog.require('ol.source.Vector'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olExtent = goog.require('ol.extent'); -const olCollection = goog.require('ol.Collection'); - +import appModule from '../module.js'; +import appDrawFeatureHash from '../draw/FeatureHash.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olExtent from 'ol/extent.js'; +import olCollection from 'ol/Collection.js'; /** * @constructor @@ -23,7 +22,7 @@ const olCollection = goog.require('ol.Collection'); * manager * @ngInject */ -exports = function(ngeoLocation, appMymaps, ngeoFeatureOverlayMgr) { +const exports = function(ngeoLocation, appMymaps, ngeoFeatureOverlayMgr) { /** * @type {ngeo.map.FeatureOverlayMgr} @@ -482,3 +481,6 @@ exports.prototype.getLayer = function() { }; appModule.service('appDrawnFeatures', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/FeatureHash.js b/geoportailv3/static/js/draw/FeatureHash.js index f599e753a..3afe41cbc 100644 --- a/geoportailv3/static/js/draw/FeatureHash.js +++ b/geoportailv3/static/js/draw/FeatureHash.js @@ -1,26 +1,27 @@ -goog.module('app.draw.FeatureHash'); -goog.module.declareLegacyNamespace(); -const ngeoFormatFeatureProperties = goog.require('ngeo.format.FeatureProperties'); -const ngeoUtils = goog.require('ngeo.utils'); -const olBase = goog.require('ol'); -const olFeature = goog.require('ol.Feature'); -const olArray = goog.require('ol.array'); -const olColor = goog.require('ol.color'); -const olFormatTextFeature = goog.require('ol.format.TextFeature'); -const olFormatFeature = goog.require('ol.format.Feature'); -const olGeomGeometryLayout = goog.require('ol.geom.GeometryLayout'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); -const olGeomMultiPoint = goog.require('ol.geom.MultiPoint'); -const olGeomMultiPolygon = goog.require('ol.geom.MultiPolygon'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); -const olStyleText = goog.require('ol.style.Text'); +/** + * @module app.draw.FeatureHash + */ +import ngeoFormatFeatureProperties from 'ngeo/format/FeatureProperties.js'; +import ngeoUtils from 'ngeo/utils.js'; +import olBase from 'ol.js'; +import olFeature from 'ol/Feature.js'; +import olArray from 'ol/array.js'; +import olColor from 'ol/color.js'; +import olFormatTextFeature from 'ol/format/TextFeature.js'; +import olFormatFeature from 'ol/format/Feature.js'; +import olGeomGeometryLayout from 'ol/geom/GeometryLayout.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomMultiLineString from 'ol/geom/MultiLineString.js'; +import olGeomMultiPoint from 'ol/geom/MultiPoint.js'; +import olGeomMultiPolygon from 'ol/geom/MultiPolygon.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olStyleText from 'ol/style/Text.js'; /** @@ -85,7 +86,7 @@ let FeatureHashLegacyProperties = {}; * @param {ngeox.format.FeatureHashOptions=} opt_options Options. * @export */ -exports = function(opt_options) { +const exports = function(opt_options) { olFormatTextFeature.call(this); @@ -133,6 +134,7 @@ exports = function(opt_options) { FeatureHashLegacyProperties = (options.propertiesType !== undefined) && options.propertiesType; }; + olBase.inherits(exports, olFormatTextFeature); @@ -1228,3 +1230,6 @@ exports.prototype.writeGeometryText = function(geometry, opt_options) { this.prevY_ = 0; return geometryWriter.call(this, transformedGeometry); }; + + +export default exports; diff --git a/geoportailv3/static/js/draw/FeaturePopup.js b/geoportailv3/static/js/draw/FeaturePopup.js index 74d23bda4..731ba990b 100644 --- a/geoportailv3/static/js/draw/FeaturePopup.js +++ b/geoportailv3/static/js/draw/FeaturePopup.js @@ -1,21 +1,20 @@ +/** + * @module app.draw.FeaturePopup + */ /** * @fileoverview Provides a feature popup service. */ -goog.module('app.draw.FeaturePopup'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olOverlay = goog.require('ol.Overlay'); -const olObservable = goog.require('ol.Observable'); -const olEvents = goog.require('ol.events'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const ngeoInteractionMeasure = goog.require('ngeo.interaction.Measure'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); - +import appModule from '../module.js'; +import olOverlay from 'ol/Overlay.js'; +import olObservable from 'ol/Observable.js'; +import olEvents from 'ol/events.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import ngeoInteractionMeasure from 'ngeo/interaction/Measure.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; /** * @param {angular.$compile} $compile The compile provider. @@ -27,7 +26,7 @@ const olGeomPolygon = goog.require('ol.geom.Polygon'); * @constructor * @ngInject */ -exports = function($compile, $rootScope, $injector, $document, +const exports = function($compile, $rootScope, $injector, $document, appGetElevation, appGetProfile) { /** * @type {ngeox.unitPrefix} @@ -314,3 +313,6 @@ exports.prototype.getProfile = function(linestring) { appModule.service('appFeaturePopup', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/FeaturePopupController.js b/geoportailv3/static/js/draw/FeaturePopupController.js index 9f7f1b593..f77a9b97e 100644 --- a/geoportailv3/static/js/draw/FeaturePopupController.js +++ b/geoportailv3/static/js/draw/FeaturePopupController.js @@ -1,23 +1,23 @@ +/** + * @module app.draw.FeaturePopupController + */ /** * @fileoverview Provides a feature popup directive. */ -goog.module('app.draw.FeaturePopupController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appMiscFile = goog.require('app.misc.file'); -const olEvents = goog.require('ol.events'); -const olExtent = goog.require('ol.extent'); -const olProj = goog.require('ol.proj'); -const olFormatKML = goog.require('ol.format.KML'); -const olGeomCircle = goog.require('ol.geom.Circle'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olInteraction = goog.require('ol.interaction'); -const ngeoInteractionMeasure = goog.require('ngeo.interaction.Measure'); +import appModule from '../module.js'; +import appMiscFile from '../misc/file.js'; +import olEvents from 'ol/events.js'; +import olExtent from 'ol/extent.js'; +import olProj from 'ol/proj.js'; +import olFormatKML from 'ol/format/KML.js'; +import olGeomCircle from 'ol/geom/Circle.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olInteraction from 'ol/interaction.js'; +import ngeoInteractionMeasure from 'ngeo/interaction/Measure.js'; /** * @constructor @@ -36,7 +36,7 @@ const ngeoInteractionMeasure = goog.require('ngeo.interaction.Measure'); * @export * @ngInject */ -exports = function($scope, $sce, appFeaturePopup, +const exports = function($scope, $sce, appFeaturePopup, appDrawnFeatures, appMymaps, appSelectedFeatures, appUserManager, ngeoNetworkStatus, mymapsImageUrl, exportgpxkmlUrl, $document, appExport) { @@ -796,3 +796,6 @@ exports.prototype.isDocked = function() { }; appModule.controller('AppFeaturePopupController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/RouteControl.js b/geoportailv3/static/js/draw/RouteControl.js index 65e0c63d8..12f4ed11c 100644 --- a/geoportailv3/static/js/draw/RouteControl.js +++ b/geoportailv3/static/js/draw/RouteControl.js @@ -1,15 +1,15 @@ +/** + * @module app.draw.RouteControl + */ /** * @fileoverview This file defines the geolocation control. * */ -goog.module('app.draw.RouteControl'); - -goog.module.declareLegacyNamespace(); -const olBase = goog.require('ol'); -const olCss = goog.require('ol.css'); -const olControlControl = goog.require('ol.control.Control'); -const olEvents = goog.require('ol.events'); +import olBase from 'ol.js'; +import olCss from 'ol/css.js'; +import olControlControl from 'ol/control/Control.js'; +import olEvents from 'ol/events.js'; /** * @constructor @@ -18,7 +18,7 @@ const olEvents = goog.require('ol.events'); * options. * @ngInject */ -exports = function(options) { +const exports = function(options) { var className = options.className !== undefined ? options.className : 'route-button'; @@ -60,6 +60,7 @@ exports = function(options) { }); }; + olBase.inherits(exports, olControlControl); @@ -72,3 +73,6 @@ exports.prototype.handleClick_ = function(event) { this.drawLineInteraction_.toggleMapMatching(); this.element.classList.toggle('route-on'); }; + + +export default exports; diff --git a/geoportailv3/static/js/draw/SelectedFeaturesService.js b/geoportailv3/static/js/draw/SelectedFeaturesService.js index 44ed929c2..e0dfceb66 100644 --- a/geoportailv3/static/js/draw/SelectedFeaturesService.js +++ b/geoportailv3/static/js/draw/SelectedFeaturesService.js @@ -1,12 +1,14 @@ /** - * @fileoverview Provides a drawn features service. + * @module app.draw.SelectedFeaturesService */ +let exports = {}; -goog.module('app.draw.SelectedFeaturesService'); +/** + * @fileoverview Provides a drawn features service. + */ -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olCollection = goog.require('ol.Collection'); +import appModule from '../module.js'; +import olCollection from 'ol/Collection.js'; /** @@ -16,3 +18,6 @@ const olCollection = goog.require('ol.Collection'); const value = new olCollection(); appModule.value('appSelectedFeatures', value); + + +export default exports; diff --git a/geoportailv3/static/js/draw/StyleEditingController.js b/geoportailv3/static/js/draw/StyleEditingController.js index 0fd2587d0..811734fcd 100644 --- a/geoportailv3/static/js/draw/StyleEditingController.js +++ b/geoportailv3/static/js/draw/StyleEditingController.js @@ -1,9 +1,8 @@ -goog.module('app.draw.StyleEditingController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olGeomLineString = goog.require('ol.geom.LineString'); - +/** + * @module app.draw.StyleEditingController + */ +import appModule from '../module.js'; +import olGeomLineString from 'ol/geom/LineString.js'; /** * @param {angular.Scope} $scope The scope. @@ -13,7 +12,7 @@ const olGeomLineString = goog.require('ol.geom.LineString'); * @constructor * @ngInject */ -exports = function($scope, appDrawnFeatures, +const exports = function($scope, appDrawnFeatures, appUserManager, mymapsUrl) { /** * @type {string} @@ -298,3 +297,6 @@ exports.prototype.isAuthenticated = function() { }; appModule.controller('AppStyleEditingController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/SymbolSelectorController.js b/geoportailv3/static/js/draw/SymbolSelectorController.js index 340bee445..d5ade270b 100644 --- a/geoportailv3/static/js/draw/SymbolSelectorController.js +++ b/geoportailv3/static/js/draw/SymbolSelectorController.js @@ -1,8 +1,7 @@ -goog.module('app.draw.SymbolSelectorController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.draw.SymbolSelectorController + */ +import appModule from '../module.js'; /** * The constructor. @@ -13,7 +12,7 @@ const appModule = goog.require('app.module'); * @constructor * @ngInject */ -exports = function($scope, $http, appUserManager, +const exports = function($scope, $http, appUserManager, mymapsUrl) { /** @@ -264,3 +263,6 @@ exports.prototype.isHTML5ColorSupported = function() { appModule.controller('AppSymbolSelectorController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/drawDirective.js b/geoportailv3/static/js/draw/drawDirective.js index b747bdd5a..31eaf50cd 100644 --- a/geoportailv3/static/js/draw/drawDirective.js +++ b/geoportailv3/static/js/draw/drawDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.draw.drawDirective + */ /** * @fileoverview This file provides a draw directive. This directive is used * to create a draw panel in the page. @@ -11,19 +14,15 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.draw.drawDirective'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appDrawTemplateUrl Url to draw template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appDrawTemplateUrl) { +const exports = function(appDrawTemplateUrl) { return { restrict: 'E', scope: { @@ -42,3 +41,6 @@ exports = function(appDrawTemplateUrl) { appModule.directive('appDraw', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/featurePopupDirective.js b/geoportailv3/static/js/draw/featurePopupDirective.js index 108165503..1b5041a09 100644 --- a/geoportailv3/static/js/draw/featurePopupDirective.js +++ b/geoportailv3/static/js/draw/featurePopupDirective.js @@ -1,18 +1,18 @@ +/** + * @module app.draw.featurePopupDirective + */ /** * @fileoverview Provides a feature popup directive. */ -goog.module('app.draw.featurePopupDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appFeaturePopupTemplateUrl URL to the directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appFeaturePopupTemplateUrl) { +const exports = function(appFeaturePopupTemplateUrl) { return { restrict: 'A', scope: { @@ -27,3 +27,6 @@ exports = function(appFeaturePopupTemplateUrl) { }; appModule.directive('appFeaturePopup', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/styleEditingDirective.js b/geoportailv3/static/js/draw/styleEditingDirective.js index 9ea2376d1..801aa8436 100644 --- a/geoportailv3/static/js/draw/styleEditingDirective.js +++ b/geoportailv3/static/js/draw/styleEditingDirective.js @@ -1,15 +1,14 @@ -goog.module('app.draw.styleEditingDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.draw.styleEditingDirective + */ +import appModule from '../module.js'; /** * @param {string} appStyleEditingTemplateUrl Url to style editing partial. * @return {angular.Directive} Directive Definition Object. * @ngInject */ -exports = function(appStyleEditingTemplateUrl) { +const exports = function(appStyleEditingTemplateUrl) { return { restrict: 'E', scope: { @@ -24,3 +23,6 @@ exports = function(appStyleEditingTemplateUrl) { }; appModule.directive('appStyleediting', exports); + + +export default exports; diff --git a/geoportailv3/static/js/draw/symbolSelectorDirective.js b/geoportailv3/static/js/draw/symbolSelectorDirective.js index 1e2810bfb..9a0bd84b9 100644 --- a/geoportailv3/static/js/draw/symbolSelectorDirective.js +++ b/geoportailv3/static/js/draw/symbolSelectorDirective.js @@ -1,15 +1,14 @@ -goog.module('app.draw.symbolSelectorDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.draw.symbolSelectorDirective + */ +import appModule from '../module.js'; /** * @param {string} appSymbolSelectorTemplateUrl Url to style editing partial. * @return {angular.Directive} Directive Definition Object. * @ngInject */ -exports = function(appSymbolSelectorTemplateUrl) { +const exports = function(appSymbolSelectorTemplateUrl) { return { restrict: 'E', scope: { @@ -24,3 +23,6 @@ exports = function(appSymbolSelectorTemplateUrl) { }; appModule.directive('appSymbolSelector', exports); + + +export default exports; diff --git a/geoportailv3/static/js/events/ThemesEventType.js b/geoportailv3/static/js/events/ThemesEventType.js index 64589d14f..5aa9a893a 100644 --- a/geoportailv3/static/js/events/ThemesEventType.js +++ b/geoportailv3/static/js/events/ThemesEventType.js @@ -1,10 +1,12 @@ -goog.module('app.events.ThemesEventType'); - -goog.module.declareLegacyNamespace(); - +/** + * @module app.events.ThemesEventType + */ /** * @enum {string} */ -exports = { +const exports = { LOAD: 'load' }; + + +export default exports; diff --git a/geoportailv3/static/js/externaldata/ExternalDataController.js b/geoportailv3/static/js/externaldata/ExternalDataController.js index 3520492f0..30eb57a8c 100644 --- a/geoportailv3/static/js/externaldata/ExternalDataController.js +++ b/geoportailv3/static/js/externaldata/ExternalDataController.js @@ -1,3 +1,6 @@ +/** + * @module app.externaldata.ExternalDataController + */ /** * @fileoverview This file provides a external data directive. This directive * is used to create a external data panel in the page. @@ -10,11 +13,8 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.externaldata.ExternalDataController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {angularGettext.Catalog} gettextCatalog Gettext service. @@ -29,7 +29,7 @@ const appModule = goog.require('app.module'); * @export * @ngInject */ -exports = function(gettextCatalog, $http, appWmsHelper, +const exports = function(gettextCatalog, $http, appWmsHelper, appWmtsHelper, appShowLayerinfo, predefinedWmsUrl, appWmsTreeTemplateUrl, appWmtsTreeTemplateUrl) { /** @@ -424,3 +424,6 @@ exports.prototype.getInfo = function(rawLayer, type) { appModule.controller('AppExternalDataController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/externaldata/externalDataDirective.js b/geoportailv3/static/js/externaldata/externalDataDirective.js index 29064da8f..700870cf9 100644 --- a/geoportailv3/static/js/externaldata/externalDataDirective.js +++ b/geoportailv3/static/js/externaldata/externalDataDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.externaldata.externalDataDirective + */ /** * @fileoverview This file provides a external data directive. This directive * is used to create a external data panel in the page. @@ -10,18 +13,15 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.externaldata.externalDataDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appExternalDataTemplateUrl Url to measure template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appExternalDataTemplateUrl) { +const exports = function(appExternalDataTemplateUrl) { return { restrict: 'E', scope: { @@ -36,3 +36,6 @@ exports = function(appExternalDataTemplateUrl) { appModule.directive('appExternalData', exports); + + +export default exports; diff --git a/geoportailv3/static/js/feedback/FeedbackController.js b/geoportailv3/static/js/feedback/FeedbackController.js index 5646eecc7..ee092aee6 100644 --- a/geoportailv3/static/js/feedback/FeedbackController.js +++ b/geoportailv3/static/js/feedback/FeedbackController.js @@ -1,9 +1,8 @@ -goog.module('app.feedback.FeedbackController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); - +/** + * @module app.feedback.FeedbackController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; /** * @constructor @@ -19,7 +18,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @ngInject * @export */ -exports = function($scope, $http, appNotify, appUserManager, +const exports = function($scope, $http, appNotify, appUserManager, gettextCatalog, ngeoLocation, ngeoBackgroundLayerMgr, postFeedbackUrl) { /** @@ -176,3 +175,6 @@ exports.prototype.sendReport = function() { }; appModule.controller('AppFeedbackController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/feedback/feedbackDirective.js b/geoportailv3/static/js/feedback/feedbackDirective.js index 0de2eca28..3ae3f9e11 100644 --- a/geoportailv3/static/js/feedback/feedbackDirective.js +++ b/geoportailv3/static/js/feedback/feedbackDirective.js @@ -1,14 +1,14 @@ -goog.module('app.feedback.feedbackDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +/** + * @module app.feedback.feedbackDirective + */ +import appModule from '../module.js'; /** * @param {string} appFeedbackTemplateUrl Url to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appFeedbackTemplateUrl) { +const exports = function(appFeedbackTemplateUrl) { return { restrict: 'E', scope: { @@ -26,3 +26,6 @@ exports = function(appFeedbackTemplateUrl) { }; appModule.directive('appFeedback', exports); + + +export default exports; diff --git a/geoportailv3/static/js/feedbackanf/FeedbackanfController.js b/geoportailv3/static/js/feedbackanf/FeedbackanfController.js index d8ca7ccc9..8fcbf782e 100644 --- a/geoportailv3/static/js/feedbackanf/FeedbackanfController.js +++ b/geoportailv3/static/js/feedbackanf/FeedbackanfController.js @@ -1,10 +1,9 @@ -goog.module('app.feedbackanf.FeedbackanfController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); - +/** + * @module app.feedbackanf.FeedbackanfController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; /** * @constructor @@ -22,7 +21,7 @@ const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); * @ngInject * @export */ -exports = function($scope, $http, appNotify, appUserManager, +const exports = function($scope, $http, appNotify, appUserManager, gettextCatalog, ngeoLocation, ngeoBackgroundLayerMgr, postFeedbackAnfUrl, appDrawnFeatures, appLotChasse) { /** @@ -152,31 +151,31 @@ exports = function($scope, $http, appNotify, appUserManager, }, this)); }; - /** - * @private - */ +/** +* @private +*/ exports.prototype.setUrl_ = function() { this.url = this.ngeoLocation_.getUriString(); }; - /** - * @export - */ +/** +* @export +*/ exports.prototype.activateDrawingTools = function() { this['drawingTools'] = true; }; - /** - * @param {ol.layer.Layer} layer Layer. - * @export - */ +/** +* @param {ol.layer.Layer} layer Layer. +* @export +*/ exports.prototype.setConcernedLayer = function(layer) { this.concernedLayer = /** @type {string} */ (layer.get('label')); }; - /** - * @export - */ +/** +* @export +*/ exports.prototype.sendReport = function() { var features = this.drawnFeatures_.getCollection().getArray(); if (features.length === 0) { @@ -217,3 +216,6 @@ exports.prototype.sendReport = function() { appModule.controller('AppFeedbackanfController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/feedbackanf/feedbackanfDirective.js b/geoportailv3/static/js/feedbackanf/feedbackanfDirective.js index ac5899df0..27c6c0c5b 100644 --- a/geoportailv3/static/js/feedbackanf/feedbackanfDirective.js +++ b/geoportailv3/static/js/feedbackanf/feedbackanfDirective.js @@ -1,14 +1,14 @@ -goog.module('app.feedbackanf.feedbackanfDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +/** + * @module app.feedbackanf.feedbackanfDirective + */ +import appModule from '../module.js'; /** * @param {string} appFeedbackanfTemplateUrl Url to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appFeedbackanfTemplateUrl) { +const exports = function(appFeedbackanfTemplateUrl) { return { restrict: 'E', scope: { @@ -26,3 +26,6 @@ exports = function(appFeedbackanfTemplateUrl) { }; appModule.directive('appFeedbackanf', exports); + + +export default exports; diff --git a/geoportailv3/static/js/imageupload/ImguploadController.js b/geoportailv3/static/js/imageupload/ImguploadController.js index feb6088a9..6855b09e2 100644 --- a/geoportailv3/static/js/imageupload/ImguploadController.js +++ b/geoportailv3/static/js/imageupload/ImguploadController.js @@ -1,7 +1,6 @@ -goog.module('app.imageupload.ImguploadController'); - -goog.module.declareLegacyNamespace(); - +/** + * @module app.imageupload.ImguploadController + */ /** * @fileoverview This file provides a "mymaps" directive. This directive is * used to insert a MyMaps block into the HTML page. @@ -11,10 +10,9 @@ goog.module.declareLegacyNamespace(); * */ -const appModule = goog.require('app.module'); - -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; /** * @param {angular.$parse} $parse The parse service. @@ -25,7 +23,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @constructor * @ngInject */ -exports = function($parse, $http, appNotify, gettextCatalog, +const exports = function($parse, $http, appNotify, gettextCatalog, mymapsUrl) { /** @@ -94,3 +92,5 @@ exports.prototype.uploadFileToUrl = function(file, scope, appModule.controller('AppImguploadController', exports); + +export default exports; diff --git a/geoportailv3/static/js/imageupload/ImguploadDirective.js b/geoportailv3/static/js/imageupload/ImguploadDirective.js index 969dad5b2..6c070b230 100644 --- a/geoportailv3/static/js/imageupload/ImguploadDirective.js +++ b/geoportailv3/static/js/imageupload/ImguploadDirective.js @@ -1,7 +1,6 @@ -goog.module('app.imageupload.ImguploadDirective'); - -goog.module.declareLegacyNamespace(); - +/** + * @module app.imageupload.ImguploadDirective + */ /** * @fileoverview This file provides a "mymaps" directive. This directive is * used to insert a MyMaps block into the HTML page. @@ -11,14 +10,13 @@ goog.module.declareLegacyNamespace(); * */ -const appModule = goog.require('app.module'); - +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @ngInject */ -exports = function() { +const exports = function() { return { restrict: 'A', link: @@ -41,3 +39,6 @@ exports = function() { appModule.directive('appImgupload', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/ElevationController.js b/geoportailv3/static/js/infobar/ElevationController.js index a4c2e7b89..a2f835785 100644 --- a/geoportailv3/static/js/infobar/ElevationController.js +++ b/geoportailv3/static/js/infobar/ElevationController.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.ElevationController + */ /** * @fileoverview This file provides a "elevation" directive. This directive is * used to insert Elevation information into the HTML page. @@ -11,11 +14,8 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.ElevationController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @ngInject @@ -24,32 +24,34 @@ const appModule = goog.require('app.module'); * @param {ngeox.miscDebounce} ngeoDebounce ngeoDebounce service. * @param {app.GetElevation} appGetElevation Elevation service. */ -exports = - function($http, ngeoDebounce, appGetElevation) { - var map = this['map']; - - /** - * @type {app.GetElevation} - * @private - */ - this.getElevation_ = appGetElevation; - - /** - * @type {string} - */ - this['elevation'] = ''; - - // 2D - map.on('pointermove', ngeoDebounce(function(e) { - if (!this['active'] || !e.coordinate) { - return; - } - this.getElevation_(e.coordinate).then( - (elevation) => (this['elevation'] = elevation['formattedElevation']) - ); - }, 300, true), this); - }; +const exports = function($http, ngeoDebounce, appGetElevation) { + var map = this['map']; + + /** + * @type {app.GetElevation} + * @private + */ + this.getElevation_ = appGetElevation; + + /** + * @type {string} + */ + this['elevation'] = ''; + + // 2D + map.on('pointermove', ngeoDebounce(function(e) { + if (!this['active'] || !e.coordinate) { + return; + } + this.getElevation_(e.coordinate).then( + (elevation) => (this['elevation'] = elevation['formattedElevation']) + ); + }, 300, true), this); +}; appModule.controller('AppElevationController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/InfobarController.js b/geoportailv3/static/js/infobar/InfobarController.js index a932a685e..49cd75f93 100644 --- a/geoportailv3/static/js/infobar/InfobarController.js +++ b/geoportailv3/static/js/infobar/InfobarController.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.InfobarController + */ /** * @fileoverview This file provides a "infobar" directive. This directive is * used to insert an Info Bar into the HTML page. @@ -10,11 +13,8 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.InfobarController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {ngeo.offline.NetworkStatus} ngeoNetworkStatus ngeo Network Status. @@ -22,7 +22,7 @@ const appModule = goog.require('app.module'); * @constructor * @export */ -exports = function(ngeoNetworkStatus) { +const exports = function(ngeoNetworkStatus) { /** * @type {boolean} */ @@ -45,3 +45,6 @@ exports.prototype.infobarSwitch = function() { appModule.controller('AppInfobarController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/ProjectionselectorController.js b/geoportailv3/static/js/infobar/ProjectionselectorController.js index 361189d8f..8e3b4fa92 100644 --- a/geoportailv3/static/js/infobar/ProjectionselectorController.js +++ b/geoportailv3/static/js/infobar/ProjectionselectorController.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.ProjectionselectorController + */ /** * @fileoverview This file provides a "projectionselector" directive * This directive is used to insert an Projection Selector and @@ -12,12 +15,9 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.ProjectionselectorController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olControlMousePosition = goog.require('ol.control.MousePosition'); +import appModule from '../module.js'; +import olControlMousePosition from 'ol/control/MousePosition.js'; /** * @ngInject @@ -27,32 +27,31 @@ const olControlMousePosition = goog.require('ol.control.MousePosition'); * @param {angular.$sce} $sce Angular sce service. * @param {app.CoordinateString} appCoordinateString The coordinate string. */ -exports = - function($document, $sce, appCoordinateString) { - /** - * @type {app.CoordinateString} - * @private - */ - this.coordinateString_ = appCoordinateString; - +const exports = function($document, $sce, appCoordinateString) { /** - * @type {Array.} + * @type {app.CoordinateString} + * @private */ - this['projectionOptions'] = [ - {'label': $sce.trustAsHtml('LUREF'), 'value': 'EPSG:2169'}, - {'label': $sce.trustAsHtml('Lon/Lat WGS84'), 'value': 'EPSG:4326'}, - {'label': $sce.trustAsHtml('Lon/Lat WGS84 DMS'), 'value': 'EPSG:4326:DMS'}, - {'label': $sce.trustAsHtml('Lon/Lat WGS84 DM'), 'value': 'EPSG:4326:DMm'}, - {'label': $sce.trustAsHtml('WGS84 UTM 32|31'), 'value': 'EPSG:3263*'} - ]; - this['projection'] = this['projectionOptions'][0]; - /** @type {ol.control.MousePostion} */ - this['mousePositionControl'] = new olControlMousePosition({ - className: 'custom-mouse-coordinates', - coordinateFormat: /** @type {ol.CoordinateFormatType} */ - (this.mouseCoordinateFormat_.bind(this)) - }); - }; + this.coordinateString_ = appCoordinateString; + +/** +* @type {Array.} +*/ + this['projectionOptions'] = [ +{'label': $sce.trustAsHtml('LUREF'), 'value': 'EPSG:2169'}, +{'label': $sce.trustAsHtml('Lon/Lat WGS84'), 'value': 'EPSG:4326'}, +{'label': $sce.trustAsHtml('Lon/Lat WGS84 DMS'), 'value': 'EPSG:4326:DMS'}, +{'label': $sce.trustAsHtml('Lon/Lat WGS84 DM'), 'value': 'EPSG:4326:DMm'}, +{'label': $sce.trustAsHtml('WGS84 UTM 32|31'), 'value': 'EPSG:3263*'} + ]; + this['projection'] = this['projectionOptions'][0]; + /** @type {ol.control.MousePostion} */ + this['mousePositionControl'] = new olControlMousePosition({ + className: 'custom-mouse-coordinates', + coordinateFormat: /** @type {ol.CoordinateFormatType} */ + (this.mouseCoordinateFormat_.bind(this)) + }); +}; /** @@ -93,3 +92,6 @@ exports.prototype.switchProjection = appModule.controller('AppProjectionselectorController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/ScalelineController.js b/geoportailv3/static/js/infobar/ScalelineController.js index 75729ce0b..8c9f2716a 100644 --- a/geoportailv3/static/js/infobar/ScalelineController.js +++ b/geoportailv3/static/js/infobar/ScalelineController.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.ScalelineController + */ /** * @fileoverview This file provides a "scaleline" directive. This directive is * used to insert an OpenLayers ScaleLine control into the HTML page. It is @@ -12,18 +15,15 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.ScalelineController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olControlScaleLine = goog.require('ol.control.ScaleLine'); +import appModule from '../module.js'; +import olControlScaleLine from 'ol/control/ScaleLine.js'; /** * @ngInject * @constructor */ -exports = function() { +const exports = function() { /** * @type {ol.control.ScaleLine} */ @@ -33,3 +33,6 @@ exports = function() { appModule.controller('AppScalelineController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/ScaleselectorController.js b/geoportailv3/static/js/infobar/ScaleselectorController.js index f28aa46ed..f8206691f 100644 --- a/geoportailv3/static/js/infobar/ScaleselectorController.js +++ b/geoportailv3/static/js/infobar/ScaleselectorController.js @@ -1,8 +1,7 @@ -goog.module('app.infobar.ScaleselectorController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.infobar.ScaleselectorController + */ +import appModule from '../module.js'; // Use the default "scale selector" template. //app.module.value('ngeoScaleselectorTemplateUrl', @@ -14,7 +13,7 @@ const appModule = goog.require('app.module'); * @param {app.ScalesService} appScalesService Service returning scales. * @ngInject */ -exports = function(appScalesService) { +const exports = function(appScalesService) { /** * @type {app.ScalesService} @@ -33,3 +32,6 @@ exports = function(appScalesService) { appModule.controller('AppScaleselectorController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/elevationDirective.js b/geoportailv3/static/js/infobar/elevationDirective.js index 3a9aa6031..a73b76df4 100644 --- a/geoportailv3/static/js/infobar/elevationDirective.js +++ b/geoportailv3/static/js/infobar/elevationDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.elevationDirective + */ /** * @fileoverview This file provides a "elevation" directive. This directive is * used to insert Elevation information into the HTML page. @@ -11,17 +14,14 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.elevationDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @ngInject */ -exports = function() { +const exports = function() { return { restrict: 'E', scope: { @@ -38,3 +38,6 @@ exports = function() { appModule.directive('appElevation', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/infobarDirective.js b/geoportailv3/static/js/infobar/infobarDirective.js index 27426103e..eb255d675 100644 --- a/geoportailv3/static/js/infobar/infobarDirective.js +++ b/geoportailv3/static/js/infobar/infobarDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.infobarDirective + */ /** * @fileoverview This file provides a "infobar" directive. This directive is * used to insert an Info Bar into the HTML page. @@ -10,18 +13,15 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.infobarDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @param {string} appInfobarTemplateUrl The template url. * @ngInject */ -exports = function(appInfobarTemplateUrl) { +const exports = function(appInfobarTemplateUrl) { return { restrict: 'E', scope: { @@ -36,3 +36,6 @@ exports = function(appInfobarTemplateUrl) { appModule.directive('appInfobar', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/projectionselectorDirective.js b/geoportailv3/static/js/infobar/projectionselectorDirective.js index b4be9b90e..d02ed4236 100644 --- a/geoportailv3/static/js/infobar/projectionselectorDirective.js +++ b/geoportailv3/static/js/infobar/projectionselectorDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.projectionselectorDirective + */ /** * @fileoverview This file provides a "projectionselector" directive * This directive is used to insert an Projection Selector and @@ -12,18 +15,15 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.projectionselectorDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @param {string} appProjectionselectorTemplateUrl The template url. * @ngInject */ -exports = function(appProjectionselectorTemplateUrl) { +const exports = function(appProjectionselectorTemplateUrl) { return { restrict: 'E', scope: { @@ -38,3 +38,6 @@ exports = function(appProjectionselectorTemplateUrl) { appModule.directive('appProjectionselector', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/scalelineDirective.js b/geoportailv3/static/js/infobar/scalelineDirective.js index ada2ccc23..393666acd 100644 --- a/geoportailv3/static/js/infobar/scalelineDirective.js +++ b/geoportailv3/static/js/infobar/scalelineDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.infobar.scalelineDirective + */ /** * @fileoverview This file provides a "scaleline" directive. This directive is * used to insert an OpenLayers ScaleLine control into the HTML page. It is @@ -12,17 +15,14 @@ * during the lifetime of the application. * */ -goog.module('app.infobar.scalelineDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @ngInject */ -exports = function() { +const exports = function() { return { restrict: 'E', scope: { @@ -38,3 +38,6 @@ exports = function() { appModule.directive('appScaleline', exports); + + +export default exports; diff --git a/geoportailv3/static/js/infobar/scaleselectorDirective.js b/geoportailv3/static/js/infobar/scaleselectorDirective.js index 3230176ea..1988d01da 100644 --- a/geoportailv3/static/js/infobar/scaleselectorDirective.js +++ b/geoportailv3/static/js/infobar/scaleselectorDirective.js @@ -1,8 +1,7 @@ -goog.module('app.infobar.scaleselectorDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.infobar.scaleselectorDirective + */ +import appModule from '../module.js'; // Use the default "scale selector" template. //app.module.value('ngeoScaleselectorTemplateUrl', @@ -15,7 +14,7 @@ const appModule = goog.require('app.module'); * * @return {angular.Directive} Directive Definition Object. */ -exports = function() { +const exports = function() { return { restrict: 'E', scope: { @@ -32,3 +31,6 @@ exports = function() { appModule.directive('appScaleselector', exports); + + +export default exports; diff --git a/geoportailv3/static/js/interaction/ClipLine.js b/geoportailv3/static/js/interaction/ClipLine.js index 1263254e2..ae23378f5 100644 --- a/geoportailv3/static/js/interaction/ClipLine.js +++ b/geoportailv3/static/js/interaction/ClipLine.js @@ -1,24 +1,24 @@ -goog.module('app.interaction.ClipLine'); -goog.module.declareLegacyNamespace(); -const olBase = goog.require('ol'); -const olCollection = goog.require('ol.Collection'); -const olFeature = goog.require('ol.Feature'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olMapBrowserPointerEvent = goog.require('ol.MapBrowserPointerEvent'); -const olCoordinate = goog.require('ol.coordinate'); -const olEvents = goog.require('ol.events'); -const olExtent = goog.require('ol.extent'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olInteractionInteraction = goog.require('ol.interaction.Interaction'); -const olInteractionModify = goog.require('ol.interaction.Modify'); -const olInteractionPointer = goog.require('ol.interaction.Pointer'); -const olInteractionModifyEventType = goog.require('ol.interaction.ModifyEventType'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olSourceVector = goog.require('ol.source.Vector'); -const olStructsRBush = goog.require('ol.structs.RBush'); -const olStyleStyle = goog.require('ol.style.Style'); - +/** + * @module app.interaction.ClipLine + */ +import olBase from 'ol.js'; +import olCollection from 'ol/Collection.js'; +import olFeature from 'ol/Feature.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olMapBrowserPointerEvent from 'ol/MapBrowserPointerEvent.js'; +import olCoordinate from 'ol/coordinate.js'; +import olEvents from 'ol/events.js'; +import olExtent from 'ol/extent.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olInteractionInteraction from 'ol/interaction/Interaction.js'; +import olInteractionModify from 'ol/interaction/Modify.js'; +import olInteractionPointer from 'ol/interaction/Pointer.js'; +import olInteractionModifyEventType from 'ol/interaction/ModifyEventType.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olStructsRBush from 'ol/structs/RBush.js'; +import olStyleStyle from 'ol/style/Style.js'; /** * @classdesc @@ -30,7 +30,7 @@ const olStyleStyle = goog.require('ol.style.Style'); * @fires app.interaction.ModifyCircleEvent * @api */ -exports = function(options) { +const exports = function(options) { olInteractionPointer.call(this, { handleDownEvent: exports.handleDownEvent_, @@ -113,6 +113,7 @@ exports = function(options) { this.handleFeatureRemove_, this); }; + olBase.inherits(exports, olInteractionPointer); @@ -448,3 +449,6 @@ exports.getDefaultStyleFunction = function() { return style[olGeomGeometryType.POINT]; }; }; + + +export default exports; diff --git a/geoportailv3/static/js/interaction/DrawRoute.js b/geoportailv3/static/js/interaction/DrawRoute.js index eafe062f6..6e934cddd 100644 --- a/geoportailv3/static/js/interaction/DrawRoute.js +++ b/geoportailv3/static/js/interaction/DrawRoute.js @@ -1,26 +1,25 @@ -goog.module('app.interaction.DrawRoute'); - -goog.module.declareLegacyNamespace(); -const olBase = goog.require('ol'); -const olFeature = goog.require('ol.Feature'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olObject = goog.require('ol.Object'); -const olEvents = goog.require('ol.events'); -const olEventsEvent = goog.require('ol.events.Event'); -const olEventsCondition = goog.require('ol.events.condition'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olFunctions = goog.require('ol.functions'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olInteractionDrawEventType = goog.require('ol.interaction.DrawEventType'); -const olInteractionPointer = goog.require('ol.interaction.Pointer'); -const olInteractionProperty = goog.require('ol.interaction.Property'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olSourceVector = goog.require('ol.source.Vector'); -const olStyleStyle = goog.require('ol.style.Style'); - +/** + * @module app.interaction.DrawRoute + */ +import olBase from 'ol.js'; +import olFeature from 'ol/Feature.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olObject from 'ol/Object.js'; +import olEvents from 'ol/events.js'; +import olEventsEvent from 'ol/events/Event.js'; +import olEventsCondition from 'ol/events/condition.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olFunctions from 'ol/functions.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olInteractionDrawEventType from 'ol/interaction/DrawEventType.js'; +import olInteractionPointer from 'ol/interaction/Pointer.js'; +import olInteractionProperty from 'ol/interaction/Property.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olStyleStyle from 'ol/style/Style.js'; /** * @classdesc @@ -32,7 +31,7 @@ const olStyleStyle = goog.require('ol.style.Style'); * @param {olx.interaction.DrawOptions} options Options. * @api */ -exports = function(options) { +const exports = function(options) { olInteractionPointer.call(this, { handleDownEvent: exports.handleDownEvent_, @@ -284,6 +283,7 @@ exports = function(options) { this.updateState_, this); }; + olBase.inherits(exports, olInteractionPointer); @@ -874,3 +874,6 @@ exports.Event = function(type, feature) { }; olBase.inherits(exports.Event, olEventsEvent); + + +export default exports; diff --git a/geoportailv3/static/js/interaction/ModifyCircle.js b/geoportailv3/static/js/interaction/ModifyCircle.js index 551d1bb2d..7792365c7 100644 --- a/geoportailv3/static/js/interaction/ModifyCircle.js +++ b/geoportailv3/static/js/interaction/ModifyCircle.js @@ -1,24 +1,25 @@ -goog.module('app.interaction.ModifyCircle'); -goog.module.declareLegacyNamespace(); -const olBase = goog.require('ol'); -const olFeature = goog.require('ol.Feature'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olMapBrowserPointerEvent = goog.require('ol.MapBrowserPointerEvent'); -const olCoordinate = goog.require('ol.coordinate'); -const olEvents = goog.require('ol.events'); -const olExtent = goog.require('ol.extent'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomCircle = goog.require('ol.geom.Circle'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olInteraction = goog.require('ol.interaction'); -const olInteractionModify = goog.require('ol.interaction.Modify'); -const olInteractionPointer = goog.require('ol.interaction.Pointer'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olSourceVector = goog.require('ol.source.Vector'); -const olStructsRBush = goog.require('ol.structs.RBush'); -const olStyleStyle = goog.require('ol.style.Style'); +/** + * @module app.interaction.ModifyCircle + */ +import olBase from 'ol.js'; +import olFeature from 'ol/Feature.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olMapBrowserPointerEvent from 'ol/MapBrowserPointerEvent.js'; +import olCoordinate from 'ol/coordinate.js'; +import olEvents from 'ol/events.js'; +import olExtent from 'ol/extent.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomCircle from 'ol/geom/Circle.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olInteraction from 'ol/interaction.js'; +import olInteractionModify from 'ol/interaction/Modify.js'; +import olInteractionPointer from 'ol/interaction/Pointer.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olStructsRBush from 'ol/structs/RBush.js'; +import olStyleStyle from 'ol/style/Style.js'; /** @@ -41,7 +42,7 @@ olInteraction.SegmentDataType; * @fires app.interaction.ModifyCircleEvent * @api */ -exports = function(options) { +const exports = function(options) { olInteractionPointer.call(this, { handleDownEvent: exports.handleDownEvent_, @@ -133,6 +134,7 @@ exports = function(options) { this.handleFeatureRemove_, this); }; + olBase.inherits(exports, olInteractionPointer); @@ -519,3 +521,6 @@ exports.getDefaultStyleFunction = function() { return style[olGeomGeometryType.POINT]; }; }; + + +export default exports; diff --git a/geoportailv3/static/js/layerinfo/LayerinfoController.js b/geoportailv3/static/js/layerinfo/LayerinfoController.js index b3d82e5f7..997e4d5b9 100644 --- a/geoportailv3/static/js/layerinfo/LayerinfoController.js +++ b/geoportailv3/static/js/layerinfo/LayerinfoController.js @@ -1,8 +1,7 @@ -goog.module('app.layerinfo.LayerinfoController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.layerinfo.LayerinfoController + */ +import appModule from '../module.js'; /** * @constructor @@ -10,7 +9,7 @@ const appModule = goog.require('app.module'); * @ngInject * @export */ -exports = function(appShowLayerinfo) { +const exports = function(appShowLayerinfo) { /** * @private */ @@ -27,3 +26,6 @@ exports.prototype.getInfo = function() { appModule.controller('AppLayerinfoController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/layerinfo/ShowLayerinfoFactory.js b/geoportailv3/static/js/layerinfo/ShowLayerinfoFactory.js index bc4722499..04a267bec 100644 --- a/geoportailv3/static/js/layerinfo/ShowLayerinfoFactory.js +++ b/geoportailv3/static/js/layerinfo/ShowLayerinfoFactory.js @@ -1,12 +1,14 @@ +/** + * @module app.layerinfo.ShowLayerinfoFactory + */ +let exports = {}; + /** * @fileoverview Provides a layer info service. That service is a function used * to retrieve and display the info (metadata) for a layer. */ -goog.module('app.layerinfo.ShowLayerinfoFactory'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** @@ -133,3 +135,6 @@ function factory($http, $sce, $rootScope, } appModule.factory('appShowLayerinfo', factory); + + +export default exports; diff --git a/geoportailv3/static/js/layerinfo/layerinfoDirective.js b/geoportailv3/static/js/layerinfo/layerinfoDirective.js index 45029ce34..9f141ba3e 100644 --- a/geoportailv3/static/js/layerinfo/layerinfoDirective.js +++ b/geoportailv3/static/js/layerinfo/layerinfoDirective.js @@ -1,15 +1,14 @@ -goog.module('app.layerinfo.layerinfoDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.layerinfo.layerinfoDirective + */ +import appModule from '../module.js'; /** * @param {string} appLayerinfoTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appLayerinfoTemplateUrl) { +const exports = function(appLayerinfoTemplateUrl) { return { restrict: 'E', scope: { @@ -23,3 +22,6 @@ exports = function(appLayerinfoTemplateUrl) { }; appModule.directive('appLayerinfo', exports); + + +export default exports; diff --git a/geoportailv3/static/js/layerlegends/LayerlegendsController.js b/geoportailv3/static/js/layerlegends/LayerlegendsController.js index 482b894c9..aeed63be0 100644 --- a/geoportailv3/static/js/layerlegends/LayerlegendsController.js +++ b/geoportailv3/static/js/layerlegends/LayerlegendsController.js @@ -1,3 +1,6 @@ +/** + * @module app.layerlegends.LayerlegendsController + */ /** * @fileoverview This file provides the layer manager directive. That directive * is used to create the list of selected layers in the page. @@ -13,11 +16,8 @@ * of layers are not going to change during the lifetime of the application. * The content of the array of layers may change, but not the array itself. */ -goog.module('app.layerlegends.LayerlegendsController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {angular.$http} $http The angular http service. @@ -31,7 +31,7 @@ const appModule = goog.require('app.module'); * @ngInject * @export */ -exports = function($http, $sce, gettextCatalog, +const exports = function($http, $sce, gettextCatalog, getPngLegendUrl, getHtmlLegendUrl, ngeoBackgroundLayerMgr) { /** * @type {ol.Map} @@ -216,3 +216,6 @@ exports.prototype.getLegendHtml = function(layer) { }; appModule.controller('AppLayerlegendsController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/layerlegends/layerlegendsDirective.js b/geoportailv3/static/js/layerlegends/layerlegendsDirective.js index 74843f592..5b3e2801e 100644 --- a/geoportailv3/static/js/layerlegends/layerlegendsDirective.js +++ b/geoportailv3/static/js/layerlegends/layerlegendsDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.layerlegends.layerlegendsDirective + */ /** * @fileoverview This file provides the layer manager directive. That directive * is used to create the list of selected layers in the page. @@ -13,18 +16,15 @@ * of layers are not going to change during the lifetime of the application. * The content of the array of layers may change, but not the array itself. */ -goog.module('app.layerlegends.layerlegendsDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appLayerlegendsTemplateUrl Url to layerlegends template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appLayerlegendsTemplateUrl) { +const exports = function(appLayerlegendsTemplateUrl) { return { restrict: 'E', scope: { @@ -40,3 +40,6 @@ exports = function(appLayerlegendsTemplateUrl) { appModule.directive('appLayerlegends', exports); + + +export default exports; diff --git a/geoportailv3/static/js/layermanager/LayermanagerController.js b/geoportailv3/static/js/layermanager/LayermanagerController.js index 55fad8adb..6cf99e413 100644 --- a/geoportailv3/static/js/layermanager/LayermanagerController.js +++ b/geoportailv3/static/js/layermanager/LayermanagerController.js @@ -1,3 +1,6 @@ +/** + * @module app.layermanager.LayermanagerController + */ /** * @fileoverview This file provides the layer manager directive. That directive * is used to create the list of selected layers in the page. @@ -13,11 +16,9 @@ * of layers are not going to change during the lifetime of the application. * The content of the array of layers may change, but not the array itself. */ -goog.module('app.layermanager.LayermanagerController'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olBase = goog.require('ol'); +import appModule from '../module.js'; +import olBase from 'ol.js'; /** * @param {ngeo.statemanager.Location} ngeoLocation Location service. @@ -25,7 +26,7 @@ const olBase = goog.require('ol'); * @ngInject * @export */ -exports = function(ngeoLocation) { +const exports = function(ngeoLocation) { /** * @type {ngeo.statemanager.Location} * @private @@ -109,3 +110,6 @@ exports.prototype.toggleLayersComparator = function() { appModule.controller('AppLayermanagerController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/layermanager/layermanagerDirective.js b/geoportailv3/static/js/layermanager/layermanagerDirective.js index 0e2398944..5d83bd97d 100644 --- a/geoportailv3/static/js/layermanager/layermanagerDirective.js +++ b/geoportailv3/static/js/layermanager/layermanagerDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.layermanager.layermanagerDirective + */ /** * @fileoverview This file provides the layer manager directive. That directive * is used to create the list of selected layers in the page. @@ -13,17 +16,15 @@ * of layers are not going to change during the lifetime of the application. * The content of the array of layers may change, but not the array itself. */ -goog.module('app.layermanager.layermanagerDirective'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appLayermanagerTemplateUrl Url to layermanager template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appLayermanagerTemplateUrl) { +const exports = function(appLayermanagerTemplateUrl) { return { restrict: 'E', scope: { @@ -40,3 +41,6 @@ exports = function(appLayermanagerTemplateUrl) { appModule.directive('appLayermanager', exports); + + +export default exports; diff --git a/geoportailv3/static/js/locationinfo/LocationInfoOverlay.js b/geoportailv3/static/js/locationinfo/LocationInfoOverlay.js index e6ba8cfbc..790fd8d55 100644 --- a/geoportailv3/static/js/locationinfo/LocationInfoOverlay.js +++ b/geoportailv3/static/js/locationinfo/LocationInfoOverlay.js @@ -1,14 +1,13 @@ +/** + * @module app.locationinfo.LocationInfoOverlay + */ /** * @fileoverview Provides a location features service useful to share * information about the drawn features throughout the application. */ -goog.module('app.locationinfo.LocationInfoOverlay'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olStyle = goog.require('ol.style'); - +import appModule from '../module.js'; +import olStyle from 'ol/style.js'; /** * @constructor @@ -16,7 +15,7 @@ const olStyle = goog.require('ol.style'); * manager * @ngInject */ -exports = function(ngeoFeatureOverlayMgr) { +const exports = function(ngeoFeatureOverlayMgr) { /** * @type {ngeo.map.FeatureOverlay} @@ -66,3 +65,6 @@ exports.prototype.addFeature = function(feature) { }; appModule.service('appLocationInfoOverlay', exports); + + +export default exports; diff --git a/geoportailv3/static/js/locationinfo/LocationinfoController.js b/geoportailv3/static/js/locationinfo/LocationinfoController.js index afc75997e..b5f533371 100644 --- a/geoportailv3/static/js/locationinfo/LocationinfoController.js +++ b/geoportailv3/static/js/locationinfo/LocationinfoController.js @@ -1,24 +1,23 @@ +/** + * @module app.locationinfo.LocationinfoController + */ /** * @fileoverview This file provides a "location information" directive. */ -goog.module('app.locationinfo.LocationinfoController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olFeature = goog.require('ol.Feature'); -const olEvents = goog.require('ol.events'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olProj = goog.require('ol.proj'); -const olSourceVector = goog.require('ol.source.Vector'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olExtent = goog.require('ol.extent'); - +import appModule from '../module.js'; +import olFeature from 'ol/Feature.js'; +import olEvents from 'ol/events.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olProj from 'ol/proj.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olExtent from 'ol/extent.js'; /** * @constructor @@ -46,7 +45,7 @@ const olExtent = goog.require('ol.extent'); * @param {app.Activetool} appActivetool The activetool service. * @ngInject */ -exports = function( +const exports = function( $scope, $timeout, appGetShorturl, appGetElevation, appCoordinateString, appStateManager, qrServiceUrl, appLocationinfoTemplateUrl, appSelectedFeatures, @@ -571,3 +570,6 @@ exports.prototype.toggleStreetview = function() { appModule.controller('AppLocationinfoController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/locationinfo/locationinfoDirective.js b/geoportailv3/static/js/locationinfo/locationinfoDirective.js index 7a96d6fb2..4cfc9479d 100644 --- a/geoportailv3/static/js/locationinfo/locationinfoDirective.js +++ b/geoportailv3/static/js/locationinfo/locationinfoDirective.js @@ -1,19 +1,18 @@ +/** + * @module app.locationinfo.locationinfoDirective + */ /** * @fileoverview This file provides a "location information" directive. */ -goog.module('app.locationinfo.locationinfoDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +import appModule from '../module.js'; /** * @param {string} appLocationinfoTemplateUrl The template. * @return {angular.Directive} The directive. * @ngInject */ -exports = function(appLocationinfoTemplateUrl) { +const exports = function(appLocationinfoTemplateUrl) { return { restrict: 'E', scope: { @@ -31,3 +30,6 @@ exports = function(appLocationinfoTemplateUrl) { }; appModule.directive('appLocationinfo', exports); + + +export default exports; diff --git a/geoportailv3/static/js/main.js b/geoportailv3/static/js/main.js index 875013899..44150f266 100644 --- a/geoportailv3/static/js/main.js +++ b/geoportailv3/static/js/main.js @@ -1,3 +1,8 @@ +/** + * @module app.main + */ +let exports = {}; + /** * @fileoverview Application entry point. * @@ -7,140 +12,141 @@ * This file includes `goog.require`'s for all the components/directives used * by the HTML page. */ -goog.module('app.main'); -goog.module.declareLegacyNamespace(); -const appAskredirectAskredirectDirective = goog.require('app.askredirect.askredirectDirective'); -const appAskredirectAskredirectController = goog.require('app.askredirect.AskredirectController'); -const appAuthenticationAuthenticationDirective = goog.require('app.authentication.authenticationDirective'); -const appAuthenticationAuthenticationController = goog.require('app.authentication.AuthenticationController'); -const appBackgroundlayerBackgroundlayerDirective = goog.require('app.backgroundlayer.backgroundlayerDirective'); -const appBackgroundlayerBackgroundlayerController = goog.require('app.backgroundlayer.BackgroundlayerController'); -const appBackgroundlayerBlankLayer = goog.require('app.backgroundlayer.BlankLayer'); -const appCatalogCatalogController = goog.require('app.catalog.CatalogController'); -const appCatalogCatalogDirective = goog.require('app.catalog.catalogDirective'); -const appImageuploadImguploadController = goog.require('app.imageupload.ImguploadController'); -const appImageuploadImguploadDirective = goog.require('app.imageupload.ImguploadDirective'); -const appDrawDrawDirective = goog.require('app.draw.drawDirective'); -const appDrawDrawController = goog.require('app.draw.DrawController'); -const appDrawDrawnFeatures = goog.require('app.draw.DrawnFeatures'); -const appDrawFeatureHash = goog.require('app.draw.FeatureHash'); -const appDrawFeaturePopup = goog.require('app.draw.FeaturePopup'); -const appDrawFeaturePopupController = goog.require('app.draw.FeaturePopupController'); -const appDrawFeaturePopupDirective = goog.require('app.draw.featurePopupDirective'); -const appDrawRouteControl = goog.require('app.draw.RouteControl'); +import appAskredirectAskredirectDirective from './askredirect/askredirectDirective.js'; +import appAskredirectAskredirectController from './askredirect/AskredirectController.js'; +import appAuthenticationAuthenticationDirective from './authentication/authenticationDirective.js'; +import appAuthenticationAuthenticationController from './authentication/AuthenticationController.js'; +import appBackgroundlayerBackgroundlayerDirective from './backgroundlayer/backgroundlayerDirective.js'; +import appBackgroundlayerBackgroundlayerController from './backgroundlayer/BackgroundlayerController.js'; +import appBackgroundlayerBlankLayer from './backgroundlayer/BlankLayer.js'; +import appCatalogCatalogController from './catalog/CatalogController.js'; +import appCatalogCatalogDirective from './catalog/catalogDirective.js'; +import appImageuploadImguploadController from './imageupload/ImguploadController.js'; +import appImageuploadImguploadDirective from './imageupload/ImguploadDirective.js'; +import appDrawDrawDirective from './draw/drawDirective.js'; +import appDrawDrawController from './draw/DrawController.js'; +import appDrawDrawnFeatures from './draw/DrawnFeatures.js'; +import appDrawFeatureHash from './draw/FeatureHash.js'; +import appDrawFeaturePopup from './draw/FeaturePopup.js'; +import appDrawFeaturePopupController from './draw/FeaturePopupController.js'; +import appDrawFeaturePopupDirective from './draw/featurePopupDirective.js'; +import appDrawRouteControl from './draw/RouteControl.js'; //const appDrawRouteControlOptions = goog.require('app.draw.RouteControlOptions'); -const appDrawSelectedFeaturesService = goog.require('app.draw.SelectedFeaturesService'); +import appDrawSelectedFeaturesService from './draw/SelectedFeaturesService.js'; -const appDrawStyleEditingController = goog.require('app.draw.StyleEditingController'); -const appDrawStyleEditingDirective = goog.require('app.draw.styleEditingDirective'); -const appDrawSymbolSelectorController = goog.require('app.draw.SymbolSelectorController'); -const appDrawSymbolSelectorDirective = goog.require('app.draw.symbolSelectorDirective'); -const appExclusionManager = goog.require('app.ExclusionManager'); -const appExternaldataExternalDataDirective = goog.require('app.externaldata.externalDataDirective'); -const appExternaldataExternalDataController = goog.require('app.externaldata.ExternalDataController'); -const appFeedbackFeedbackDirective = goog.require('app.feedback.feedbackDirective'); -const appFeedbackFeedbackController = goog.require('app.feedback.FeedbackController'); -const appFeedbackanfFeedbackanfDirective = goog.require('app.feedbackanf.feedbackanfDirective'); -const appFeedbackanfFeedbackanfController = goog.require('app.feedbackanf.FeedbackanfController'); -const appInfobarElevationDirective = goog.require('app.infobar.elevationDirective'); -const appInfobarElevationController = goog.require('app.infobar.ElevationController'); -const appInfobarInfobarController = goog.require('app.infobar.InfobarController'); -const appInfobarInfobarDirective = goog.require('app.infobar.infobarDirective'); -const appInfobarProjectionselectorDirective = goog.require('app.infobar.projectionselectorDirective'); -const appInfobarProjectionselectorController = goog.require('app.infobar.ProjectionselectorController'); -const appInfobarScalelineDirective = goog.require('app.infobar.scalelineDirective'); -const appInfobarScalelineController = goog.require('app.infobar.ScalelineController'); -const appInfobarScaleselectorDirective = goog.require('app.infobar.scaleselectorDirective'); -const appInfobarScaleselectorController = goog.require('app.infobar.ScaleselectorController'); -const appLayerinfoLayerinfoDirective = goog.require('app.layerinfo.layerinfoDirective'); -const appLayerinfoLayerinfoController = goog.require('app.layerinfo.LayerinfoController'); -const appLocationinfoLocationInfoOverlay = goog.require('app.locationinfo.LocationInfoOverlay'); -const appLayerinfoShowLayerinfoFactory = goog.require('app.layerinfo.ShowLayerinfoFactory'); -const appLayermanagerLayermanagerDirective = goog.require('app.layermanager.layermanagerDirective'); -const appLayermanagerLayermanagerController = goog.require('app.layermanager.LayermanagerController'); -const appLayerlegendsLayerlegendsDirective = goog.require('app.layerlegends.layerlegendsDirective'); -const appLayerlegendsLayerlegendsController = goog.require('app.layerlegends.LayerlegendsController'); -const appLocationinfoLocationinfoDirective = goog.require('app.locationinfo.locationinfoDirective'); -const appLocationinfoLocationinfoController = goog.require('app.locationinfo.LocationinfoController'); -const appMapMapDirective = goog.require('app.map.mapDirective'); -const appMapMapController = goog.require('app.map.MapController'); -const appMainController = goog.require('app.MainController'); -const appMymapsFilereaderDirective = goog.require('app.mymaps.filereaderDirective'); -const appMeasureMeasureController = goog.require('app.measure.MeasureController'); -const appMeasureMeasureDirective = goog.require('app.measure.MeasureDirective'); -const appMymapsMymapsDirective = goog.require('app.mymaps.mymapsDirective'); -const appMymapsMymapsController = goog.require('app.mymaps.MymapsController'); -const appNotifyFactory = goog.require('app.NotifyFactory'); -const appPrintPrintDirective = goog.require('app.print.printDirective'); -const appPrintPrintController = goog.require('app.print.PrintController'); -const appPrintPrintservice = goog.require('app.print.Printservice'); -const appProfileProfileDirective = goog.require('app.profile.profileDirective'); -const appProfileProfileController = goog.require('app.profile.ProfileController'); -const appQueryPagreportDirective = goog.require('app.query.pagreportDirective'); -const appQueryPagreportController = goog.require('app.query.PagreportController'); -const appQueryCasiporeportDirective = goog.require('app.query.casiporeportDirective'); -const appQueryCasiporeportController = goog.require('app.query.CasiporeportController'); -const appQueryPdsreportDirective = goog.require('app.query.pdsreportDirective'); -const appQueryPdsreportController = goog.require('app.query.PdsreportController'); +import appDrawStyleEditingController from './draw/StyleEditingController.js'; +import appDrawStyleEditingDirective from './draw/styleEditingDirective.js'; +import appDrawSymbolSelectorController from './draw/SymbolSelectorController.js'; +import appDrawSymbolSelectorDirective from './draw/symbolSelectorDirective.js'; +import appExclusionManager from './ExclusionManager.js'; +import appExternaldataExternalDataDirective from './externaldata/externalDataDirective.js'; +import appExternaldataExternalDataController from './externaldata/ExternalDataController.js'; +import appFeedbackFeedbackDirective from './feedback/feedbackDirective.js'; +import appFeedbackFeedbackController from './feedback/FeedbackController.js'; +import appFeedbackanfFeedbackanfDirective from './feedbackanf/feedbackanfDirective.js'; +import appFeedbackanfFeedbackanfController from './feedbackanf/FeedbackanfController.js'; +import appInfobarElevationDirective from './infobar/elevationDirective.js'; +import appInfobarElevationController from './infobar/ElevationController.js'; +import appInfobarInfobarController from './infobar/InfobarController.js'; +import appInfobarInfobarDirective from './infobar/infobarDirective.js'; +import appInfobarProjectionselectorDirective from './infobar/projectionselectorDirective.js'; +import appInfobarProjectionselectorController from './infobar/ProjectionselectorController.js'; +import appInfobarScalelineDirective from './infobar/scalelineDirective.js'; +import appInfobarScalelineController from './infobar/ScalelineController.js'; +import appInfobarScaleselectorDirective from './infobar/scaleselectorDirective.js'; +import appInfobarScaleselectorController from './infobar/ScaleselectorController.js'; +import appLayerinfoLayerinfoDirective from './layerinfo/layerinfoDirective.js'; +import appLayerinfoLayerinfoController from './layerinfo/LayerinfoController.js'; +import appLocationinfoLocationInfoOverlay from './locationinfo/LocationInfoOverlay.js'; +import appLayerinfoShowLayerinfoFactory from './layerinfo/ShowLayerinfoFactory.js'; +import appLayermanagerLayermanagerDirective from './layermanager/layermanagerDirective.js'; +import appLayermanagerLayermanagerController from './layermanager/LayermanagerController.js'; +import appLayerlegendsLayerlegendsDirective from './layerlegends/layerlegendsDirective.js'; +import appLayerlegendsLayerlegendsController from './layerlegends/LayerlegendsController.js'; +import appLocationinfoLocationinfoDirective from './locationinfo/locationinfoDirective.js'; +import appLocationinfoLocationinfoController from './locationinfo/LocationinfoController.js'; +import appMapMapDirective from './map/mapDirective.js'; +import appMapMapController from './map/MapController.js'; +import appMainController from './MainController.js'; +import appMymapsFilereaderDirective from './mymaps/filereaderDirective.js'; +import appMeasureMeasureController from './measure/MeasureController.js'; +import appMeasureMeasureDirective from './measure/MeasureDirective.js'; +import appMymapsMymapsDirective from './mymaps/mymapsDirective.js'; +import appMymapsMymapsController from './mymaps/MymapsController.js'; +import appNotifyFactory from './NotifyFactory.js'; +import appPrintPrintDirective from './print/printDirective.js'; +import appPrintPrintController from './print/PrintController.js'; +import appPrintPrintservice from './print/Printservice.js'; +import appProfileProfileDirective from './profile/profileDirective.js'; +import appProfileProfileController from './profile/ProfileController.js'; +import appQueryPagreportDirective from './query/pagreportDirective.js'; +import appQueryPagreportController from './query/PagreportController.js'; +import appQueryCasiporeportDirective from './query/casiporeportDirective.js'; +import appQueryCasiporeportController from './query/CasiporeportController.js'; +import appQueryPdsreportDirective from './query/pdsreportDirective.js'; +import appQueryPdsreportController from './query/PdsreportController.js'; //const appQueryQueryStyles = goog.require('app.query.QueryStyles'); -const appQueryQueryDirective = goog.require('app.query.queryDirective'); +import appQueryQueryDirective from './query/queryDirective.js'; -const appQueryQueryController = goog.require('app.query.QueryController'); -const appResizemapDirective = goog.require('app.resizemapDirective'); -const appRoutingRoutingController = goog.require('app.routing.RoutingController'); -const appRoutingRoutingDirective = goog.require('app.routing.routingDirective'); -const appSearchSearchDirective = goog.require('app.search.searchDirective'); -const appSearchSearchController = goog.require('app.search.SearchController'); -const appShareShareDirective = goog.require('app.share.ShareDirective'); -const appShareShareController = goog.require('app.share.ShareController'); -const appShareShorturlDirective = goog.require('app.share.shorturlDirective'); -const appShareShorturlController = goog.require('app.share.ShorturlController'); -const appSliderSliderDirective = goog.require('app.slider.SliderDirective'); -const appSliderSliderController = goog.require('app.slider.SliderController'); -const appStreetviewStreetviewDirective = goog.require('app.streetview.streetviewDirective'); -const appStreetviewStreetviewController = goog.require('app.streetview.StreetviewController'); -const appThemeswitcherThemeswitcherDirective = goog.require('app.themeswitcher.themeswitcherDirective'); -const appThemeswitcherThemeswitcherController = goog.require('app.themeswitcher.ThemeswitcherController'); -const appActivetool = goog.require('app.Activetool'); -const appCoordinateStringService = goog.require('app.CoordinateStringService'); -const appExport = goog.require('app.Export'); -const appGeocoding = goog.require('app.Geocoding'); -const appGetDevice = goog.require('app.GetDevice'); -const appGetElevationService = goog.require('app.GetElevationService'); -const appGetLayerForCatalogNodeFactory = goog.require('app.GetLayerForCatalogNodeFactory'); -const appGetProfileService = goog.require('app.GetProfileService'); -const appGetShorturlService = goog.require('app.GetShorturlService'); -const appGetWmsLayerFactory = goog.require('app.GetWmsLayerFactory'); -const appGetWmtsLayerFactory = goog.require('app.GetWmtsLayerFactory'); -const appLayerOpacityManager = goog.require('app.LayerOpacityManager'); -const appLayerPermalinkManager = goog.require('app.LayerPermalinkManager'); -const appLocationControl = goog.require('app.LocationControl'); +import appQueryQueryController from './query/QueryController.js'; +import appResizemapDirective from './resizemapDirective.js'; +import appRoutingRoutingController from './routing/RoutingController.js'; +import appRoutingRoutingDirective from './routing/routingDirective.js'; +import appSearchSearchDirective from './search/searchDirective.js'; +import appSearchSearchController from './search/SearchController.js'; +import appShareShareDirective from './share/ShareDirective.js'; +import appShareShareController from './share/ShareController.js'; +import appShareShorturlDirective from './share/shorturlDirective.js'; +import appShareShorturlController from './share/ShorturlController.js'; +import appSliderSliderDirective from './slider/SliderDirective.js'; +import appSliderSliderController from './slider/SliderController.js'; +import appStreetviewStreetviewDirective from './streetview/streetviewDirective.js'; +import appStreetviewStreetviewController from './streetview/StreetviewController.js'; +import appThemeswitcherThemeswitcherDirective from './themeswitcher/themeswitcherDirective.js'; +import appThemeswitcherThemeswitcherController from './themeswitcher/ThemeswitcherController.js'; +import appActivetool from './Activetool.js'; +import appCoordinateStringService from './CoordinateStringService.js'; +import appExport from './Export.js'; +import appGeocoding from './Geocoding.js'; +import appGetDevice from './GetDevice.js'; +import appGetElevationService from './GetElevationService.js'; +import appGetLayerForCatalogNodeFactory from './GetLayerForCatalogNodeFactory.js'; +import appGetProfileService from './GetProfileService.js'; +import appGetShorturlService from './GetShorturlService.js'; +import appGetWmsLayerFactory from './GetWmsLayerFactory.js'; +import appGetWmtsLayerFactory from './GetWmtsLayerFactory.js'; +import appLayerOpacityManager from './LayerOpacityManager.js'; +import appLayerPermalinkManager from './LayerPermalinkManager.js'; +import appLocationControl from './LocationControl.js'; // const appLocationControlOptions = goog.require('app.LocationControlOptions'); -const appMap = goog.require('app.Map'); +import appMap from './Map.js'; //const appMapsResponse = goog.require('app.MapsResponse'); -const appMymaps = goog.require('app.Mymaps'); +import appMymaps from './Mymaps.js'; -const appMymapsOffline = goog.require('app.MymapsOffline'); -const appOlcsToggle3d = goog.require('app.olcs.toggle3d'); -const appOlcsLux3DManager = goog.require('app.olcs.Lux3DManager'); -const appOlcsExtent = goog.require('app.olcs.Extent'); -const appOlcsZoomToExtent = goog.require('app.olcs.ZoomToExtent'); -const appProjections = goog.require('app.projections'); -const appRouting = goog.require('app.Routing'); -const appScalesService = goog.require('app.ScalesService'); -const appStateManager = goog.require('app.StateManager'); -const appTheme = goog.require('app.Theme'); -const appThemes = goog.require('app.Themes'); +import appMymapsOffline from './MymapsOffline.js'; +import appOlcsToggle3d from './olcs/toggle3d.js'; +import appOlcsLux3DManager from './olcs/Lux3DManager.js'; +import appOlcsExtent from './olcs/Extent.js'; +import appOlcsZoomToExtent from './olcs/ZoomToExtent.js'; +import appProjections from './projections.js'; +import appRouting from './Routing.js'; +import appScalesService from './ScalesService.js'; +import appStateManager from './StateManager.js'; +import appTheme from './Theme.js'; +import appThemes from './Themes.js'; //const appThemesResponse = goog.require('app.ThemesResponse'); -const appUserManager = goog.require('app.UserManager'); +import appUserManager from './UserManager.js'; + +import appWmsHelper from './WmsHelper.js'; +import appWmtsHelper from './WmtsHelper.js'; +import appMiscFile from './misc/file.js'; +import appLotChasse from './LotChasse.js'; + -const appWmsHelper = goog.require('app.WmsHelper'); -const appWmtsHelper = goog.require('app.WmtsHelper'); -const appMiscFile = goog.require('app.misc.file'); -const appLotChasse = goog.require('app.LotChasse'); +export default exports; diff --git a/geoportailv3/static/js/map/MapController.js b/geoportailv3/static/js/map/MapController.js index becdfd471..6b76f2a18 100644 --- a/geoportailv3/static/js/map/MapController.js +++ b/geoportailv3/static/js/map/MapController.js @@ -1,3 +1,6 @@ +/** + * @module app.map.MapController + */ /** * @fileoverview This file provides the "map" directive. * @@ -5,13 +8,10 @@ * * */ -goog.module('app.map.MapController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olMapProperty = goog.require('ol.MapProperty'); -const olProj = goog.require('ol.proj'); +import appModule from '../module.js'; +import olMapProperty from 'ol/MapProperty.js'; +import olProj from 'ol/proj.js'; /** * @param {app.StateManager} appStateManager State manager service. @@ -19,7 +19,7 @@ const olProj = goog.require('ol.proj'); * @constructor * @ngInject */ -exports = function(appStateManager, ngeoDebounce) { +const exports = function(appStateManager, ngeoDebounce) { var lurefToWebMercatorFn = olProj.getTransform('EPSG:2169', 'EPSG:3857'); /** @type {ol.Map} */ @@ -119,3 +119,6 @@ exports.updateState_ = function(appStateManager, view) { appModule.controller('AppMapController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/map/mapDirective.js b/geoportailv3/static/js/map/mapDirective.js index cdb6cb23f..ee7a495db 100644 --- a/geoportailv3/static/js/map/mapDirective.js +++ b/geoportailv3/static/js/map/mapDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.map.mapDirective + */ /** * @fileoverview This file provides the "map" directive. * @@ -5,18 +8,15 @@ * * */ -goog.module('app.map.mapDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appMapTemplateUrl URL to map template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appMapTemplateUrl) { +const exports = function(appMapTemplateUrl) { return { scope: { 'map': '=appMapMap' @@ -30,3 +30,6 @@ exports = function(appMapTemplateUrl) { appModule.directive('appMap', exports); + + +export default exports; diff --git a/geoportailv3/static/js/measure/MeasureController.js b/geoportailv3/static/js/measure/MeasureController.js index 2a7cecd47..7f46c8cdb 100644 --- a/geoportailv3/static/js/measure/MeasureController.js +++ b/geoportailv3/static/js/measure/MeasureController.js @@ -1,3 +1,6 @@ +/** + * @module app.measure.MeasureController + */ /** * @fileoverview This file provides a measure directive. This directive is used * to create a measure panel in the page. @@ -10,23 +13,20 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.measure.MeasureController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const ngeoMiscDecorate = goog.require('ngeo.misc.decorate'); -const ngeoInteractionMeasureArea = goog.require('ngeo.interaction.MeasureArea'); -const ngeoInteractionMeasureAzimut = goog.require('ngeo.interaction.MeasureAzimut'); -const ngeoInteractionMeasureLength = goog.require('ngeo.interaction.MeasureLength'); -const olObject = goog.require('ol.Object'); -const olEvents = goog.require('ol.events'); -const olInteractionProperty = goog.require('ol.interaction.Property'); -const olProj = goog.require('ol.proj'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); +import appModule from '../module.js'; +import ngeoMiscDecorate from 'ngeo/misc/decorate.js'; +import ngeoInteractionMeasureArea from 'ngeo/interaction/MeasureArea.js'; +import ngeoInteractionMeasureAzimut from 'ngeo/interaction/MeasureAzimut.js'; +import ngeoInteractionMeasureLength from 'ngeo/interaction/MeasureLength.js'; +import olObject from 'ol/Object.js'; +import olEvents from 'ol/events.js'; +import olInteractionProperty from 'ol/interaction/Property.js'; +import olProj from 'ol/proj.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; /** * @param {!angular.Scope} $scope Scope. @@ -43,7 +43,7 @@ const olStyleStyle = goog.require('ol.style.Style'); * @export * @ngInject */ -exports = function($scope, $q, $http, $compile, gettext, +const exports = function($scope, $q, $http, $compile, gettext, appGetProfile, elevationServiceUrl, appActivetool, $filter) { @@ -305,3 +305,6 @@ exports.prototype.getElevation_ = function(coordinates) { }; appModule.controller('AppMeasureController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/measure/MeasureDirective.js b/geoportailv3/static/js/measure/MeasureDirective.js index 9fb5f6bca..32bb4f141 100644 --- a/geoportailv3/static/js/measure/MeasureDirective.js +++ b/geoportailv3/static/js/measure/MeasureDirective.js @@ -1,3 +1,8 @@ +/** + * @module app.measure.MeasureDirective + */ +let exports = {}; + /** * @fileoverview This file provides a measure directive. This directive is used * to create a measure panel in the page. @@ -10,10 +15,8 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.measure.MeasureDirective'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** @@ -37,3 +40,6 @@ function measureDirective(appMeasureTemplateUrl) { appModule.directive('appMeasure', measureDirective); + + +export default exports; diff --git a/geoportailv3/static/js/misc/file.js b/geoportailv3/static/js/misc/file.js index 35266f25d..fbb858cc1 100644 --- a/geoportailv3/static/js/misc/file.js +++ b/geoportailv3/static/js/misc/file.js @@ -1,6 +1,7 @@ -goog.module('app.misc.file'); - -goog.module.declareLegacyNamespace(); +/** + * @module app.misc.file + */ +let exports = {}; /** * @param {string} name The string to sanitize. @@ -10,3 +11,6 @@ exports.sanitizeFilename = function(name) { name = name.replace(/\s+/g, '_'); // Replace white space with _. return name.replace(/[^a-z0-9\-\_]/gi, ''); // Strip any special character. }; + + +export default exports; diff --git a/geoportailv3/static/js/module.js b/geoportailv3/static/js/module.js index a2712424a..24f56178f 100644 --- a/geoportailv3/static/js/module.js +++ b/geoportailv3/static/js/module.js @@ -1,42 +1,42 @@ +/** + * @module app.module + */ /** * @fileoverview This file provides the "app" namespace, which is the * application's main namespace. And it defines the application's Angular * module. */ -goog.module('app.module'); - -goog.module.declareLegacyNamespace(); -const olHas = goog.require('ol.has'); -const ngeoBase = goog.require('ngeo'); -const ngeoDatasourceModule = goog.require('ngeo.datasource.module'); -const ngeoDownloadModule = goog.require('ngeo.download.module'); -const ngeoDrawModule = goog.require('ngeo.draw.module'); -const ngeoEditingModule = goog.require('ngeo.editing.module'); -const ngeoFilterModule = goog.require('ngeo.filter.module'); -const ngeoGooglestreetviewModule = goog.require('ngeo.googlestreetview.module'); -const ngeoGridModule = goog.require('ngeo.grid.module'); -const ngeoLayertreeModule = goog.require('ngeo.layertree.module'); -const ngeoMapModule = goog.require('ngeo.map.module'); -const ngeoMapExtraModule = goog.require('ngeo.map.extraModule'); -const ngeoMiscExtraModule = goog.require('ngeo.misc.extraModule'); -const ngeoMeasureModule = goog.require('ngeo.measure.module'); -const ngeoMessageExtraModule = goog.require('ngeo.message.extraModule'); -const appOfflineConfiguration = goog.require('app.offline.Configuration'); -const ngeoOfflineModule = goog.require('ngeo.offline.module'); -const ngeoOlcsOlcsModule = goog.require('ngeo.olcs.olcsModule'); -const ngeoPrintModule = goog.require('ngeo.print.module'); -const ngeoProfileModule = goog.require('ngeo.profile.module'); -const ngeoQueryModule = goog.require('ngeo.query.module'); -const ngeoSearchModule = goog.require('ngeo.search.module'); -const ngeoStatemanagerLocation = goog.require('ngeo.statemanager.Location'); -const ngeoStatemanagerModule = goog.require('ngeo.statemanager.module'); -const ngeoStatemanagerWfsPermalink = goog.require('ngeo.statemanager.WfsPermalink'); +import olHas from 'ol/has.js'; +import ngeoBase from 'ngeo.js'; +import ngeoDatasourceModule from 'ngeo/datasource/module.js'; +import ngeoDownloadModule from 'ngeo/download/module.js'; +import ngeoDrawModule from 'ngeo/draw/module.js'; +import ngeoEditingModule from 'ngeo/editing/module.js'; +import ngeoFilterModule from 'ngeo/filter/module.js'; +import ngeoGooglestreetviewModule from 'ngeo/googlestreetview/module.js'; +import ngeoGridModule from 'ngeo/grid/module.js'; +import ngeoLayertreeModule from 'ngeo/layertree/module.js'; +import ngeoMapModule from 'ngeo/map/module.js'; +import ngeoMapExtraModule from 'ngeo/map/extraModule.js'; +import ngeoMiscExtraModule from 'ngeo/misc/extraModule.js'; +import ngeoMeasureModule from 'ngeo/measure/module.js'; +import ngeoMessageExtraModule from 'ngeo/message/extraModule.js'; +import appOfflineConfiguration from './offline/Configuration.js'; +import ngeoOfflineModule from 'ngeo/offline/module.js'; +import ngeoOlcsOlcsModule from 'ngeo/olcs/olcsModule.js'; +import ngeoPrintModule from 'ngeo/print/module.js'; +import ngeoProfileModule from 'ngeo/profile/module.js'; +import ngeoQueryModule from 'ngeo/query/module.js'; +import ngeoSearchModule from 'ngeo/search/module.js'; +import ngeoStatemanagerLocation from 'ngeo/statemanager/Location.js'; +import ngeoStatemanagerModule from 'ngeo/statemanager/module.js'; +import ngeoStatemanagerWfsPermalink from 'ngeo/statemanager/WfsPermalink.js'; /** * @type {!angular.Module} */ -exports = angular.module('app', [ +const exports = angular.module('app', [ ngeoDatasourceModule.name, ngeoDownloadModule.name, ngeoDrawModule.name, @@ -105,3 +105,5 @@ exports.config(['$httpProvider', function($httpProvider) { }}; }); + +export default exports; diff --git a/geoportailv3/static/js/mymaps/MymapsController.js b/geoportailv3/static/js/mymaps/MymapsController.js index b3fc88e26..33aeeeb1c 100644 --- a/geoportailv3/static/js/mymaps/MymapsController.js +++ b/geoportailv3/static/js/mymaps/MymapsController.js @@ -1,3 +1,6 @@ +/** + * @module app.mymaps.MymapsController + */ /** * @fileoverview This file provides a "mymaps" directive. This directive is * used to insert a MyMaps block into the HTML page. @@ -6,18 +9,15 @@ * * */ -goog.module('app.mymaps.MymapsController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appMiscFile = goog.require('app.misc.file'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olExtent = goog.require('ol.extent'); -const olFormatGPX = goog.require('ol.format.GPX'); -const olFormatKML = goog.require('ol.format.KML'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomLineString = goog.require('ol.geom.LineString'); +import appModule from '../module.js'; +import appMiscFile from '../misc/file.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import olExtent from 'ol/extent.js'; +import olFormatGPX from 'ol/format/GPX.js'; +import olFormatKML from 'ol/format/KML.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomLineString from 'ol/geom/LineString.js'; /** * @param {!angular.Scope} $scope Scope. @@ -41,7 +41,7 @@ const olGeomLineString = goog.require('ol.geom.LineString'); * @ngInject */ -exports = function($scope, $compile, $sce, +const exports = function($scope, $compile, $sce, gettextCatalog, ngeoBackgroundLayerMgr, appMymaps, appNotify, appFeaturePopup, appSelectedFeatures, appTheme, appUserManager, appDrawnFeatures, $document, exportgpxkmlUrl, appExport) { @@ -1648,3 +1648,6 @@ exports.prototype.setDragHandler = function() { }; appModule.controller('AppMymapsController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/mymaps/filereaderDirective.js b/geoportailv3/static/js/mymaps/filereaderDirective.js index b36a00fb9..c3d21df85 100644 --- a/geoportailv3/static/js/mymaps/filereaderDirective.js +++ b/geoportailv3/static/js/mymaps/filereaderDirective.js @@ -1,8 +1,7 @@ -goog.module('app.mymaps.filereaderDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.mymaps.filereaderDirective + */ +import appModule from '../module.js'; /** * @param {angular.$window} $window The Angular $window service. @@ -11,7 +10,7 @@ const appModule = goog.require('app.module'); * @ngdoc directive * @ngname appFilereader */ -exports = function($window) { +const exports = function($window) { return { restrict: 'A', scope: { @@ -65,3 +64,6 @@ exports = function($window) { appModule.directive('appFilereader', exports); + + +export default exports; diff --git a/geoportailv3/static/js/mymaps/mymapsDirective.js b/geoportailv3/static/js/mymaps/mymapsDirective.js index ce296d4e6..ddc07314d 100644 --- a/geoportailv3/static/js/mymaps/mymapsDirective.js +++ b/geoportailv3/static/js/mymaps/mymapsDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.mymaps.mymapsDirective + */ /** * @fileoverview This file provides a "mymaps" directive. This directive is * used to insert a MyMaps block into the HTML page. @@ -6,18 +9,15 @@ * * */ -goog.module('app.mymaps.mymapsDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @return {angular.Directive} The Directive Object Definition. * @param {string} appMymapsTemplateUrl The template url. * @ngInject */ -exports = function(appMymapsTemplateUrl) { +const exports = function(appMymapsTemplateUrl) { return { restrict: 'E', scope: { @@ -39,3 +39,6 @@ exports = function(appMymapsTemplateUrl) { appModule.directive('appMymaps', exports); + + +export default exports; diff --git a/geoportailv3/static/js/offline/Configuration.js b/geoportailv3/static/js/offline/Configuration.js index 04c03d0c4..19bd7ece6 100644 --- a/geoportailv3/static/js/offline/Configuration.js +++ b/geoportailv3/static/js/offline/Configuration.js @@ -1,15 +1,14 @@ -goog.module('app.offline.Configuration'); -goog.module.declareLegacyNamespace(); - -const olBase = goog.require('ol'); -const olLayerVector = goog.require('ol.layer.Vector'); - -const ngeoOfflineModule = goog.require('ngeo.offline.module'); -const NgeoConfiguration = goog.require('ngeo.offline.Configuration'); +/** + * @module app.offline.Configuration + */ +import olBase from 'ol.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import ngeoOfflineModule from 'ngeo/offline/module.js'; +import NgeoConfiguration from 'ngeo/offline/Configuration.js'; /** */ -exports = class extends NgeoConfiguration { +const exports = class extends NgeoConfiguration { /** * @ngInject @@ -150,3 +149,6 @@ exports = class extends NgeoConfiguration { return layer === this.backgroundLayerMgr_.get(map); } }; + + +export default exports; diff --git a/geoportailv3/static/js/olcs/Extent.js b/geoportailv3/static/js/olcs/Extent.js index 69180bc90..a33ab9426 100644 --- a/geoportailv3/static/js/olcs/Extent.js +++ b/geoportailv3/static/js/olcs/Extent.js @@ -1,11 +1,13 @@ -goog.module('app.olcs.Extent'); - -goog.module.declareLegacyNamespace(); -const olProj = goog.require('ol.proj'); - +/** + * @module app.olcs.Extent + */ +import olProj from 'ol/proj.js'; /** * The OpenLayers extent used in 3D to restrict the area rendered by Cesium. * @type {ol.Extent} */ -exports = olProj.transformExtent([5.31, 49.38, 6.64, 50.21], 'EPSG:4326', 'EPSG:3857'); +const exports = olProj.transformExtent([5.31, 49.38, 6.64, 50.21], 'EPSG:4326', 'EPSG:3857'); + + +export default exports; diff --git a/geoportailv3/static/js/olcs/Lux3DManager.js b/geoportailv3/static/js/olcs/Lux3DManager.js index 3448f8b17..f3eb18702 100644 --- a/geoportailv3/static/js/olcs/Lux3DManager.js +++ b/geoportailv3/static/js/olcs/Lux3DManager.js @@ -1,10 +1,9 @@ -goog.module('app.olcs.Lux3DManager'); +/** + * @module app.olcs.Lux3DManager + */ +import ngeoOlcsManager from 'ngeo/olcs/Manager.js'; -goog.module.declareLegacyNamespace(); -const ngeoOlcsManager = goog.require('ngeo.olcs.Manager'); - - -exports = class extends ngeoOlcsManager { +const exports = class extends ngeoOlcsManager { /** * * @param {string} cesiumUrl Cesium URL. @@ -155,3 +154,6 @@ exports = class extends ngeoOlcsManager { super.setHeading(super.getHeading()); } }; + + +export default exports; diff --git a/geoportailv3/static/js/olcs/ZoomToExtent.js b/geoportailv3/static/js/olcs/ZoomToExtent.js index 2f31ed859..40878d735 100644 --- a/geoportailv3/static/js/olcs/ZoomToExtent.js +++ b/geoportailv3/static/js/olcs/ZoomToExtent.js @@ -1,10 +1,9 @@ -goog.module('app.olcs.ZoomToExtent'); +/** + * @module app.olcs.ZoomToExtent + */ +import olControlZoomToExtent from 'ol/control/ZoomToExtent.js'; -goog.module.declareLegacyNamespace(); -const olControlZoomToExtent = goog.require('ol.control.ZoomToExtent'); - - -exports = class extends olControlZoomToExtent { +const exports = class extends olControlZoomToExtent { /** * @param {ol.Extent} extent Extent * @param {app.olcs.Lux3DManager} ol3dm Manager getter @@ -31,3 +30,6 @@ exports = class extends olControlZoomToExtent { } } }; + + +export default exports; diff --git a/geoportailv3/static/js/olcs/toggle3d.js b/geoportailv3/static/js/olcs/toggle3d.js index ebdaef65b..0b805c67a 100644 --- a/geoportailv3/static/js/olcs/toggle3d.js +++ b/geoportailv3/static/js/olcs/toggle3d.js @@ -1,3 +1,8 @@ +/** + * @module app.olcs.toggle3d + */ +let exports = {}; + /** * @fileoverview This file provides the "app-toggle-3d" component. * @@ -5,7 +10,6 @@ * * */ -goog.module('app.olcs.toggle3d'); class Controller { @@ -32,3 +36,6 @@ const toggle3d = { }; angular.module('app').component('appToggle3d', toggle3d); + + +export default exports; diff --git a/geoportailv3/static/js/print/PrintController.js b/geoportailv3/static/js/print/PrintController.js index f972534de..cadcd60df 100644 --- a/geoportailv3/static/js/print/PrintController.js +++ b/geoportailv3/static/js/print/PrintController.js @@ -1,3 +1,6 @@ +/** + * @module app.print.PrintController + */ /** * @fileoverview This file provides a print directive. This directive is used * to create a print form panel in the page. @@ -9,19 +12,15 @@ * app-print-layers="mainCtrl.selectedLayers"> * */ -goog.module('app.print.PrintController'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appPrintPrintservice = goog.require('app.print.Printservice'); -const olArray = goog.require('ol.array'); -const olEasing = goog.require('ol.easing'); -const olEvents = goog.require('ol.events'); -const olObservable = goog.require('ol.Observable'); -const olProj = goog.require('ol.proj'); -const olRenderEventType = goog.require('ol.render.EventType'); +import appModule from '../module.js'; +import appPrintPrintservice from '../print/Printservice.js'; +import olArray from 'ol/array.js'; +import olEasing from 'ol/easing.js'; +import olEvents from 'ol/events.js'; +import olObservable from 'ol/Observable.js'; +import olProj from 'ol/proj.js'; +import olRenderEventType from 'ol/render/EventType.js'; /** * @param {angular.Scope} $scope Scope. @@ -46,7 +45,7 @@ const olRenderEventType = goog.require('ol.render.EventType'); * @export * @ngInject */ -exports = function($scope, $window, $timeout, $q, gettextCatalog, +const exports = function($scope, $window, $timeout, $q, gettextCatalog, ngeoFeatureOverlayMgr, ngeoPrintUtils, appThemes, appTheme, appFeaturePopup, appGetShorturl, printServiceUrl, qrServiceUrl, appSelectedFeatures, @@ -903,3 +902,6 @@ exports.prototype.getCSSStyles_ = function(parentElement) { }; appModule.controller('AppPrintController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/print/Printservice.js b/geoportailv3/static/js/print/Printservice.js index b0dcf1019..345a386c7 100644 --- a/geoportailv3/static/js/print/Printservice.js +++ b/geoportailv3/static/js/print/Printservice.js @@ -1,13 +1,12 @@ -goog.module('app.print.Printservice'); +/** + * @module app.print.Printservice + */ +import ngeoPrintService from 'ngeo/print/Service.js'; +import olArray from 'ol/array.js'; +import olObj from 'ol/obj.js'; +import olMath from 'ol/math.js'; -goog.module.declareLegacyNamespace(); -const ngeoPrintService = goog.require('ngeo.print.Service'); -const olArray = goog.require('ol.array'); -const olObj = goog.require('ol.obj'); -const olMath = goog.require('ol.math'); - - -exports = class extends ngeoPrintService { +const exports = class extends ngeoPrintService { /** * @param {string} url URL to MapFish print web service. * @param {angular.$http} $http Angular $http service. @@ -85,3 +84,6 @@ exports = class extends ngeoPrintService { }); } }; + + +export default exports; diff --git a/geoportailv3/static/js/print/printDirective.js b/geoportailv3/static/js/print/printDirective.js index b799f37d3..9c2f57625 100644 --- a/geoportailv3/static/js/print/printDirective.js +++ b/geoportailv3/static/js/print/printDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.print.printDirective + */ /** * @fileoverview This file provides a print directive. This directive is used * to create a print form panel in the page. @@ -9,19 +12,15 @@ * app-print-layers="mainCtrl.selectedLayers"> * */ -goog.module('app.print.printDirective'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appPrintTemplateUrl Url to print template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appPrintTemplateUrl) { +const exports = function(appPrintTemplateUrl) { return { restrict: 'E', scope: { @@ -40,3 +39,6 @@ exports = function(appPrintTemplateUrl) { appModule.directive('appPrint', exports); + + +export default exports; diff --git a/geoportailv3/static/js/profile/ProfileController.js b/geoportailv3/static/js/profile/ProfileController.js index 1022546f2..895074c41 100644 --- a/geoportailv3/static/js/profile/ProfileController.js +++ b/geoportailv3/static/js/profile/ProfileController.js @@ -1,3 +1,6 @@ +/** + * @module app.profile.ProfileController + */ /** * @fileoverview This file provides a profile directive. This directive is used * to create a profile panel in the page. @@ -12,22 +15,19 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.profile.ProfileController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olEvents = goog.require('ol.events'); -const olFeature = goog.require('ol.Feature'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olOverlay = goog.require('ol.Overlay'); -const olGeomGeometryLayout = goog.require('ol.geom.GeometryLayout'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStyle = goog.require('ol.style.Style'); -const olProj = goog.require('ol.proj'); +import appModule from '../module.js'; +import olEvents from 'ol/events.js'; +import olFeature from 'ol/Feature.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olOverlay from 'ol/Overlay.js'; +import olGeomGeometryLayout from 'ol/geom/GeometryLayout.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olProj from 'ol/proj.js'; /** * @constructor @@ -39,7 +39,7 @@ const olProj = goog.require('ol.proj'); * @export * @ngInject */ -exports = function($scope, ngeoFeatureOverlayMgr, echocsvUrl, +const exports = function($scope, ngeoFeatureOverlayMgr, echocsvUrl, $document) { /** @@ -396,3 +396,6 @@ exports.prototype.exportCSV = function() { }; appModule.controller('AppProfileController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/profile/profileDirective.js b/geoportailv3/static/js/profile/profileDirective.js index 7dcc479cd..1c6796e36 100644 --- a/geoportailv3/static/js/profile/profileDirective.js +++ b/geoportailv3/static/js/profile/profileDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.profile.profileDirective + */ /** * @fileoverview This file provides a profile directive. This directive is used * to create a profile panel in the page. @@ -12,18 +15,15 @@ * One-time binding is used because we know the map is not going to change * during the lifetime of the application. */ -goog.module('app.profile.profileDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appProfileTemplateUrl Url to layermanager template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appProfileTemplateUrl) { +const exports = function(appProfileTemplateUrl) { return { restrict: 'E', scope: { @@ -40,3 +40,6 @@ exports = function(appProfileTemplateUrl) { }; appModule.directive('appProfile', exports); + + +export default exports; diff --git a/geoportailv3/static/js/projections.js b/geoportailv3/static/js/projections.js index 31b401f4e..7287f14dc 100644 --- a/geoportailv3/static/js/projections.js +++ b/geoportailv3/static/js/projections.js @@ -1,7 +1,8 @@ -goog.module('app.projections'); - -goog.module.declareLegacyNamespace(); -const olProj = goog.require('ol.proj'); +/** + * @module app.projections + */ +let exports = {}; +import olProj from 'ol/proj.js'; proj4.defs('EPSG:32632', '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs'); olProj.get('EPSG:32632').setExtent([166021.44, 0.00, 833978.55, 9329005.18]); @@ -15,3 +16,6 @@ proj4.defs('EPSG:2169', '+towgs84=-189.681,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0.4598 ' + '+units=m +no_defs"'); olProj.get('EPSG:2169').setExtent([48225.17, 56225.60, 105842.04, 139616.40]); + + +export default exports; diff --git a/geoportailv3/static/js/query/CasiporeportController.js b/geoportailv3/static/js/query/CasiporeportController.js index 47fe44712..2dd704658 100644 --- a/geoportailv3/static/js/query/CasiporeportController.js +++ b/geoportailv3/static/js/query/CasiporeportController.js @@ -1,9 +1,8 @@ -goog.module('app.query.CasiporeportController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); - +/** + * @module app.query.CasiporeportController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; /** * @constructor @@ -15,7 +14,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @export * @ngInject */ -exports = function($http, appNotify, gettextCatalog, +const exports = function($http, appNotify, gettextCatalog, appUserManager, casipoUrl) { /** * @type {app.UserManager} @@ -123,3 +122,6 @@ exports.prototype.generateRepport = function() { appModule.controller('AppCasiporeportController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/PagreportController.js b/geoportailv3/static/js/query/PagreportController.js index 15d2262cc..206376ce3 100644 --- a/geoportailv3/static/js/query/PagreportController.js +++ b/geoportailv3/static/js/query/PagreportController.js @@ -1,10 +1,8 @@ -goog.module('app.query.PagreportController'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); - +/** + * @module app.query.PagreportController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; /** * @constructor @@ -16,7 +14,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @export * @ngInject */ -exports = function($http, appNotify, gettextCatalog, +const exports = function($http, appNotify, gettextCatalog, appUserManager, pagUrl) { /** * @type {app.UserManager} @@ -124,3 +122,6 @@ exports.prototype.generateRepport = function() { appModule.controller('AppPagreportController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/PdsreportController.js b/geoportailv3/static/js/query/PdsreportController.js index 8194b408f..688d39553 100644 --- a/geoportailv3/static/js/query/PdsreportController.js +++ b/geoportailv3/static/js/query/PdsreportController.js @@ -1,10 +1,8 @@ -goog.module('app.query.PdsreportController'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); - +/** + * @module app.query.PdsreportController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; /** * @constructor @@ -16,7 +14,7 @@ const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); * @export * @ngInject */ -exports = function($http, appNotify, gettextCatalog, +const exports = function($http, appNotify, gettextCatalog, appUserManager, pdsUrl) { /** * @type {app.UserManager} @@ -122,3 +120,5 @@ exports.prototype.generateRepport = function() { appModule.controller('AppPdsreportController', exports); + +export default exports; diff --git a/geoportailv3/static/js/query/QueryController.js b/geoportailv3/static/js/query/QueryController.js index 3e817871d..22597db7a 100644 --- a/geoportailv3/static/js/query/QueryController.js +++ b/geoportailv3/static/js/query/QueryController.js @@ -1,21 +1,20 @@ -goog.module('app.query.QueryController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const olBase = goog.require('ol'); -const olExtent = goog.require('ol.extent'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olProj = goog.require('ol.proj'); -const olSourceVector = goog.require('ol.source.Vector'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); - +/** + * @module app.query.QueryController + */ +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import olBase from 'ol.js'; +import olExtent from 'ol/extent.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olGeomMultiLineString from 'ol/geom/MultiLineString.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olProj from 'ol/proj.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; /** * @constructor @@ -50,7 +49,7 @@ const olStyleStyle = goog.require('ol.style.Style'); * @export * @ngInject */ -exports = function($sce, $timeout, $scope, $http, +const exports = function($sce, $timeout, $scope, $http, appGetProfile, ngeoLocation, appQueryTemplatesPath, getInfoServiceUrl, getRemoteTemplateServiceUrl, downloadmeasurementUrl, downloadsketchUrl, gettextCatalog, appThemes, @@ -1333,3 +1332,6 @@ exports.prototype.showGeom = function(geom, color) { appModule.controller('AppQueryController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/ShowProfile.js b/geoportailv3/static/js/query/ShowProfile.js index f09328cd4..503ea387d 100644 --- a/geoportailv3/static/js/query/ShowProfile.js +++ b/geoportailv3/static/js/query/ShowProfile.js @@ -1,8 +1,12 @@ -goog.module('app.query.ShowProfile'); - -goog.module.declareLegacyNamespace(); +/** + * @module app.query.ShowProfile + */ +let exports = {}; /** * @typedef {{active: boolean}} */ exports; + + +export default exports; diff --git a/geoportailv3/static/js/query/casiporeportDirective.js b/geoportailv3/static/js/query/casiporeportDirective.js index d2a2dcbba..42ce88b16 100644 --- a/geoportailv3/static/js/query/casiporeportDirective.js +++ b/geoportailv3/static/js/query/casiporeportDirective.js @@ -1,15 +1,14 @@ -goog.module('app.query.casiporeportDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.query.casiporeportDirective + */ +import appModule from '../module.js'; /** * @param {string} appCasiporeportTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appCasiporeportTemplateUrl) { +const exports = function(appCasiporeportTemplateUrl) { return { restrict: 'E', scope: { @@ -22,4 +21,8 @@ exports = function(appCasiporeportTemplateUrl) { templateUrl: appCasiporeportTemplateUrl }; }; + appModule.directive('appCasiporeport', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/pagreportDirective.js b/geoportailv3/static/js/query/pagreportDirective.js index fa15a5d6e..2a1c5bd78 100644 --- a/geoportailv3/static/js/query/pagreportDirective.js +++ b/geoportailv3/static/js/query/pagreportDirective.js @@ -1,16 +1,14 @@ -goog.module('app.query.pagreportDirective'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.query.pagreportDirective + */ +import appModule from '../module.js'; /** * @param {string} appPagreportTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appPagreportTemplateUrl) { +const exports = function(appPagreportTemplateUrl) { return { restrict: 'E', scope: { @@ -23,4 +21,8 @@ exports = function(appPagreportTemplateUrl) { templateUrl: appPagreportTemplateUrl }; }; + appModule.directive('appPagreport', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/pdsreportDirective.js b/geoportailv3/static/js/query/pdsreportDirective.js index 7755652c1..0f54725ea 100644 --- a/geoportailv3/static/js/query/pdsreportDirective.js +++ b/geoportailv3/static/js/query/pdsreportDirective.js @@ -1,16 +1,14 @@ -goog.module('app.query.pdsreportDirective'); - - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.query.pdsreportDirective + */ +import appModule from '../module.js'; /** * @param {string} appPdsreportTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appPdsreportTemplateUrl) { +const exports = function(appPdsreportTemplateUrl) { return { restrict: 'E', scope: { @@ -23,4 +21,8 @@ exports = function(appPdsreportTemplateUrl) { templateUrl: appPdsreportTemplateUrl }; }; + appModule.directive('appPdsreport', exports); + + +export default exports; diff --git a/geoportailv3/static/js/query/queryDirective.js b/geoportailv3/static/js/query/queryDirective.js index 9db2ad969..96f703903 100644 --- a/geoportailv3/static/js/query/queryDirective.js +++ b/geoportailv3/static/js/query/queryDirective.js @@ -1,15 +1,14 @@ -goog.module('app.query.queryDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.query.queryDirective + */ +import appModule from '../module.js'; /** * @param {string} appQueryTemplateUrl URL to directive template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appQueryTemplateUrl) { +const exports = function(appQueryTemplateUrl) { return { restrict: 'E', scope: { @@ -31,3 +30,6 @@ exports = function(appQueryTemplateUrl) { }; appModule.directive('appQuery', exports); + + +export default exports; diff --git a/geoportailv3/static/js/resizemapDirective.js b/geoportailv3/static/js/resizemapDirective.js index e2a8a43d2..2687c7413 100644 --- a/geoportailv3/static/js/resizemapDirective.js +++ b/geoportailv3/static/js/resizemapDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.resizemapDirective + */ /** * @fileoverview Provides a directive that resizes the map in an animation * loop during 2 second when the value of "state" changes. @@ -9,19 +12,15 @@ *
*/ -goog.module('app.resizemapDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olMap = goog.require('ol.Map'); - +import appModule from './module.js'; +import olMap from 'ol/Map.js'; /** * @param {angular.$window} $window Angular window service. * @return {angular.Directive} The directive specs. * @ngInject */ -exports = function($window) { +const exports = function($window) { var /** @type {number} */ duration = 2000; return { restrict: 'A', @@ -69,3 +68,6 @@ exports = function($window) { appModule.directive('appResizemap', exports); + + +export default exports; diff --git a/geoportailv3/static/js/routing/RoutingController.js b/geoportailv3/static/js/routing/RoutingController.js index 29cb450ae..349a71cf4 100644 --- a/geoportailv3/static/js/routing/RoutingController.js +++ b/geoportailv3/static/js/routing/RoutingController.js @@ -1,3 +1,6 @@ +/** + * @module app.routing.RoutingController + */ /** * @fileoverview This file provides the routing directive. That directive * is used to create the routing panel in the side panel. @@ -8,20 +11,17 @@ * * */ -goog.module('app.routing.RoutingController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const ngeoSearchCreateGeoJSONBloodhound = goog.require('ngeo.search.createGeoJSONBloodhound'); -const olBase = goog.require('ol'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olStyle = goog.require('ol.style'); -const olInteraction = goog.require('ol.interaction'); -const olEvents = goog.require('ol.events'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import ngeoSearchCreateGeoJSONBloodhound from 'ngeo/search/createGeoJSONBloodhound.js'; +import olBase from 'ol.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olStyle from 'ol/style.js'; +import olInteraction from 'ol/interaction.js'; +import olEvents from 'ol/events.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; /** * @param {angular.Scope} $scope Angular root scope. @@ -45,7 +45,7 @@ const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); * @ngInject * @export */ -exports = function($scope, gettextCatalog, poiSearchServiceUrl, +const exports = function($scope, gettextCatalog, poiSearchServiceUrl, $compile, appRouting, appGetProfile, ngeoFeatureOverlayMgr, appExport, appCoordinateString, maxExtent, $window, appGeocoding, appUserManager, appNotify, appMymaps, $filter) { @@ -1147,3 +1147,6 @@ function secondsToHHmmss($filter) { } appModule.filter('appSecondsToHHmmss', secondsToHHmmss); + + +export default exports; diff --git a/geoportailv3/static/js/routing/routingDirective.js b/geoportailv3/static/js/routing/routingDirective.js index 0d1e69954..737085beb 100644 --- a/geoportailv3/static/js/routing/routingDirective.js +++ b/geoportailv3/static/js/routing/routingDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.routing.routingDirective + */ /** * @fileoverview This file provides the routing directive. That directive * is used to create the routing panel in the side panel. @@ -8,18 +11,15 @@ * * */ -goog.module('app.routing.routingDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appRoutingTemplateUrl Url to routing template. * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appRoutingTemplateUrl) { +const exports = function(appRoutingTemplateUrl) { return { restrict: 'E', scope: { @@ -36,3 +36,6 @@ exports = function(appRoutingTemplateUrl) { appModule.directive('appRouting', exports); + + +export default exports; diff --git a/geoportailv3/static/js/search/BackgroundLayerSuggestion.js b/geoportailv3/static/js/search/BackgroundLayerSuggestion.js index 19b048692..f6f90b752 100644 --- a/geoportailv3/static/js/search/BackgroundLayerSuggestion.js +++ b/geoportailv3/static/js/search/BackgroundLayerSuggestion.js @@ -1,8 +1,12 @@ -goog.module('app.search.BackgroundLayerSuggestion'); - -goog.module.declareLegacyNamespace(); +/** + * @module app.search.BackgroundLayerSuggestion + */ +let exports = {}; /** * @typedef {{bgLayer: ol.layer.Layer, translatedName: string}} */ exports; + + +export default exports; diff --git a/geoportailv3/static/js/search/SearchController.js b/geoportailv3/static/js/search/SearchController.js index 603485d0b..f7447c27e 100644 --- a/geoportailv3/static/js/search/SearchController.js +++ b/geoportailv3/static/js/search/SearchController.js @@ -1,3 +1,6 @@ +/** + * @module app.search.SearchController + */ /** * @fileoverview This file provides a "search" directive. This directive is * used to insert a Search bar into a HTML page. @@ -10,25 +13,22 @@ * during the lifetime of the application. * */ -goog.module('app.search.SearchController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); -const ngeoSearchCreateGeoJSONBloodhound = goog.require('ngeo.search.createGeoJSONBloodhound'); -const olArray = goog.require('ol.array'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); -const olEvents = goog.require('ol.events'); -const olExtent = goog.require('ol.extent'); -const olProj = goog.require('ol.proj'); -const olFeature = goog.require('ol.Feature'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStyle = goog.require('ol.style.Style'); -const olStyleStroke = goog.require('ol.style.Stroke'); +import appModule from '../module.js'; +import appEventsThemesEventType from '../events/ThemesEventType.js'; +import ngeoSearchCreateGeoJSONBloodhound from 'ngeo/search/createGeoJSONBloodhound.js'; +import olArray from 'ol/array.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; +import olEvents from 'ol/events.js'; +import olExtent from 'ol/extent.js'; +import olProj from 'ol/proj.js'; +import olFeature from 'ol/Feature.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olStyleStroke from 'ol/style/Stroke.js'; /** * @ngInject @@ -59,7 +59,7 @@ const olStyleStroke = goog.require('ol.style.Stroke'); * @param {app.Routing} appRouting The routing service. * @export */ -exports = function($scope, $window, $compile, +const exports = function($scope, $window, $compile, gettextCatalog, ngeoBackgroundLayerMgr, ngeoFeatureOverlayMgr, appCoordinateString, ngeoSearchCreateGeoJSONBloodhound, appThemes, appTheme, appGetLayerForCatalogNode, appShowLayerinfo, maxExtent, @@ -967,3 +967,6 @@ exports.prototype.addLastSuggestedFeature = function() { appModule.controller('AppSearchController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/search/searchDirective.js b/geoportailv3/static/js/search/searchDirective.js index 3ab0c9188..1199bc6b0 100644 --- a/geoportailv3/static/js/search/searchDirective.js +++ b/geoportailv3/static/js/search/searchDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.search.searchDirective + */ /** * @fileoverview This file provides a "search" directive. This directive is * used to insert a Search bar into a HTML page. @@ -10,11 +13,9 @@ * during the lifetime of the application. * */ -goog.module('app.search.searchDirective'); -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const ngeoSearchCreateGeoJSONBloodhound = goog.require('ngeo.search.createGeoJSONBloodhound'); +import appModule from '../module.js'; +import ngeoSearchCreateGeoJSONBloodhound from 'ngeo/search/createGeoJSONBloodhound.js'; // Add dependency into Angular module @@ -26,7 +27,7 @@ appModule.requires.push(ngeoSearchCreateGeoJSONBloodhound.module.name); * @param {string} appSearchTemplateUrl The template url. * @ngInject */ -exports = function(appSearchTemplateUrl) { +const exports = function(appSearchTemplateUrl) { return { restrict: 'E', scope: { @@ -82,3 +83,6 @@ exports = function(appSearchTemplateUrl) { appModule.directive('appSearch', exports); + + +export default exports; diff --git a/geoportailv3/static/js/share/ShareController.js b/geoportailv3/static/js/share/ShareController.js index d9b24fdfa..160e4b722 100644 --- a/geoportailv3/static/js/share/ShareController.js +++ b/geoportailv3/static/js/share/ShareController.js @@ -1,3 +1,6 @@ +/** + * @module app.share.ShareController + */ /** * @fileoverview This file provides a list of social sharing options. * This directive is used @@ -8,12 +11,9 @@ * * */ -goog.module('app.share.ShareController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const ngeoUtils = goog.require('ngeo.utils'); +import appModule from '../module.js'; +import ngeoUtils from 'ngeo/utils.js'; /** * @ngInject @@ -23,7 +23,7 @@ const ngeoUtils = goog.require('ngeo.utils'); * @param {angularGettext.Catalog} gettextCatalog Gettext catalog. * @export */ -exports = function($window, gettext, gettextCatalog) { +const exports = function($window, gettext, gettextCatalog) { /** * @type {Object} * @private @@ -118,3 +118,6 @@ exports.prototype.openMailLink = function() { }; appModule.controller('AppShareController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/share/ShareDirective.js b/geoportailv3/static/js/share/ShareDirective.js index e04d1eae1..ce845bab8 100644 --- a/geoportailv3/static/js/share/ShareDirective.js +++ b/geoportailv3/static/js/share/ShareDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.share.ShareDirective + */ /** * @fileoverview This file provides a list of social sharing options. * This directive is used @@ -8,18 +11,15 @@ * * */ -goog.module('app.share.ShareDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appShareTemplateUrl Url to share template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appShareTemplateUrl) { +const exports = function(appShareTemplateUrl) { return { restrict: 'E', scope: { @@ -35,3 +35,6 @@ exports = function(appShareTemplateUrl) { }; appModule.directive('appShare', exports); + + +export default exports; diff --git a/geoportailv3/static/js/share/ShorturlController.js b/geoportailv3/static/js/share/ShorturlController.js index 26b5b3017..8d6c4920c 100644 --- a/geoportailv3/static/js/share/ShorturlController.js +++ b/geoportailv3/static/js/share/ShorturlController.js @@ -1,3 +1,6 @@ +/** + * @module app.share.ShorturlController + */ /** * @fileoverview This file provides a shorturl directive * This directive is used to create a short url panel in the page. @@ -7,11 +10,8 @@ * * */ -goog.module('app.share.ShorturlController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @ngInject @@ -22,7 +22,7 @@ const appModule = goog.require('app.module'); * @param {app.Mymaps} appMymaps Mymaps service. * @export */ -exports = function($scope, ngeoLocation, +const exports = function($scope, ngeoLocation, appGetShorturl, appMymaps) { /** * @type {app.Mymaps} @@ -110,3 +110,6 @@ exports.prototype.isMymapsSelected = }; appModule.controller('AppShorturlController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/share/shorturlDirective.js b/geoportailv3/static/js/share/shorturlDirective.js index fa844cead..cce784987 100644 --- a/geoportailv3/static/js/share/shorturlDirective.js +++ b/geoportailv3/static/js/share/shorturlDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.share.shorturlDirective + */ /** * @fileoverview This file provides a shorturl directive * This directive is used to create a short url panel in the page. @@ -7,18 +10,15 @@ * * */ -goog.module('app.share.shorturlDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appShorturlTemplateUrl Url to share template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appShorturlTemplateUrl) { +const exports = function(appShorturlTemplateUrl) { return { restrict: 'E', scope: { @@ -34,3 +34,6 @@ exports = function(appShorturlTemplateUrl) { }; appModule.directive('appShorturl', exports); + + +export default exports; diff --git a/geoportailv3/static/js/slider/SliderController.js b/geoportailv3/static/js/slider/SliderController.js index b385819f5..2759b20ef 100644 --- a/geoportailv3/static/js/slider/SliderController.js +++ b/geoportailv3/static/js/slider/SliderController.js @@ -1,9 +1,8 @@ -goog.module('app.slider.SliderController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olBase = goog.require('ol'); - +/** + * @module app.slider.SliderController + */ +import appModule from '../module.js'; +import olBase from 'ol.js'; /** * @param {angular.JQLite} $element Element. @@ -13,7 +12,7 @@ const olBase = goog.require('ol'); * @constructor * @ngInject */ -exports = function($element, ngeoLocation, $document, $scope) { +const exports = function($element, ngeoLocation, $document, $scope) { /** * @type {angular.Scope} @@ -216,3 +215,6 @@ exports.prototype.drag_ = function(event) { }; appModule.controller('AppSliderController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/slider/SliderDirective.js b/geoportailv3/static/js/slider/SliderDirective.js index bb78fddcb..8c12e48ae 100644 --- a/geoportailv3/static/js/slider/SliderDirective.js +++ b/geoportailv3/static/js/slider/SliderDirective.js @@ -1,15 +1,14 @@ -goog.module('app.slider.SliderDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); - +/** + * @module app.slider.SliderDirective + */ +import appModule from '../module.js'; /** * @param {string} appSliderTemplateUrl Url to slider template. * @return {angular.Directive} The directive specs. * @ngInject */ -exports = function(appSliderTemplateUrl) { +const exports = function(appSliderTemplateUrl) { return { restrict: 'A', scope: { @@ -25,3 +24,6 @@ exports = function(appSliderTemplateUrl) { appModule.directive('appSlider', exports); + + +export default exports; diff --git a/geoportailv3/static/js/streetview/StreetviewController.js b/geoportailv3/static/js/streetview/StreetviewController.js index 741f03485..6a96c492e 100644 --- a/geoportailv3/static/js/streetview/StreetviewController.js +++ b/geoportailv3/static/js/streetview/StreetviewController.js @@ -1,3 +1,6 @@ +/** + * @module app.streetview.StreetviewController + */ /** * @fileoverview This file provides a streetview overview. * @@ -8,15 +11,12 @@ * * */ -goog.module('app.streetview.StreetviewController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const olBase = goog.require('ol'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olInteraction = goog.require('ol.interaction'); -const olStyle = goog.require('ol.style'); +import appModule from '../module.js'; +import olBase from 'ol.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olInteraction from 'ol/interaction.js'; +import olStyle from 'ol/style.js'; /** * @ngInject @@ -31,7 +31,7 @@ const olStyle = goog.require('ol.style'); * @param {angular.$window} $window Window. * @export */ -exports = function($element, $scope, ngeoFeatureOverlayMgr, +const exports = function($element, $scope, ngeoFeatureOverlayMgr, appImagesPath, appLocationInfoOverlay, appActivetool, $window) { /** * @type {angular.$window} @@ -539,3 +539,6 @@ exports.prototype.loadGoogleapis_ = function() { }.bind(this)); }; appModule.controller('AppStreetviewController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/streetview/streetviewDirective.js b/geoportailv3/static/js/streetview/streetviewDirective.js index 270649737..b73532779 100644 --- a/geoportailv3/static/js/streetview/streetviewDirective.js +++ b/geoportailv3/static/js/streetview/streetviewDirective.js @@ -1,3 +1,6 @@ +/** + * @module app.streetview.streetviewDirective + */ /** * @fileoverview This file provides a streetview overview. * @@ -8,18 +11,15 @@ * * */ -goog.module('app.streetview.streetviewDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appStreetviewTemplateUrl Url to streetview template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appStreetviewTemplateUrl) { +const exports = function(appStreetviewTemplateUrl) { return { restrict: 'E', scope: { @@ -34,3 +34,6 @@ exports = function(appStreetviewTemplateUrl) { }; appModule.directive('appStreetview', exports); + + +export default exports; diff --git a/geoportailv3/static/js/themeswitcher/ThemeswitcherController.js b/geoportailv3/static/js/themeswitcher/ThemeswitcherController.js index f35986b96..1af56157a 100644 --- a/geoportailv3/static/js/themeswitcher/ThemeswitcherController.js +++ b/geoportailv3/static/js/themeswitcher/ThemeswitcherController.js @@ -1,16 +1,16 @@ +/** + * @module app.themeswitcher.ThemeswitcherController + */ /** * @fileoverview This file provides the "themeswitcher" directive. * That directive is used to create the theme switcher in the page. * */ -goog.module('app.themeswitcher.ThemeswitcherController'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); -const appNotifyNotificationType = goog.require('app.NotifyNotificationType'); -const appEventsThemesEventType = goog.require('app.events.ThemesEventType'); -const olEvents = goog.require('ol.events'); +import appModule from '../module.js'; +import appNotifyNotificationType from '../NotifyNotificationType.js'; +import appEventsThemesEventType from '../events/ThemesEventType.js'; +import olEvents from 'ol/events.js'; /** * @constructor @@ -23,7 +23,7 @@ const olEvents = goog.require('ol.events'); * @export * @ngInject */ -exports = function(gettextCatalog, ngeoLocation, +const exports = function(gettextCatalog, ngeoLocation, appThemes, appTheme, appNotify, gettext) { /** @@ -152,3 +152,6 @@ exports.prototype.switchTheme = function(themeId) { appModule.controller('AppThemeswitcherController', exports); + + +export default exports; diff --git a/geoportailv3/static/js/themeswitcher/themeswitcherDirective.js b/geoportailv3/static/js/themeswitcher/themeswitcherDirective.js index d1351613b..e64fe2ea7 100644 --- a/geoportailv3/static/js/themeswitcher/themeswitcherDirective.js +++ b/geoportailv3/static/js/themeswitcher/themeswitcherDirective.js @@ -1,20 +1,20 @@ +/** + * @module app.themeswitcher.themeswitcherDirective + */ /** * @fileoverview This file provides the "themeswitcher" directive. * That directive is used to create the theme switcher in the page. * */ -goog.module('app.themeswitcher.themeswitcherDirective'); - -goog.module.declareLegacyNamespace(); -const appModule = goog.require('app.module'); +import appModule from '../module.js'; /** * @param {string} appThemeswitcherTemplateUrl Url to themes template * @return {angular.Directive} The Directive Definition Object. * @ngInject */ -exports = function(appThemeswitcherTemplateUrl) { +const exports = function(appThemeswitcherTemplateUrl) { return { restrict: 'E', controller: 'AppThemeswitcherController', @@ -30,3 +30,6 @@ exports = function(appThemeswitcherTemplateUrl) { appModule.directive('appThemeswitcher', exports); + + +export default exports; diff --git a/jsapi/src/LayerManager.js b/jsapi/src/LayerManager.js index 2a1eb0536..b200c1e6d 100644 --- a/jsapi/src/LayerManager.js +++ b/jsapi/src/LayerManager.js @@ -1,12 +1,11 @@ -goog.module('lux.LayerManager'); - -goog.module.declareLegacyNamespace(); -const luxBase = goog.require('lux'); -const olBase = goog.require('ol'); -const olControlControl = goog.require('ol.control.Control'); -const olEvents = goog.require('ol.events'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); - +/** + * @module lux.LayerManager + */ +import luxBase from './index.js'; +import olBase from 'ol.js'; +import olControlControl from 'ol/control/Control.js'; +import olEvents from 'ol/events.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; /** * @constructor @@ -14,7 +13,7 @@ const olCollectionEventType = goog.require('ol.CollectionEventType'); * @param {olx.control.ControlOptions} options Layer manager options. * @export */ -exports = function(options) { +const exports = function(options) { var element = document.createElement('UL'); element.classList.add('lux-layer-manager'); @@ -80,3 +79,6 @@ exports.prototype.update = function() { this.element.appendChild(li); }, this); }; + + +export default exports; diff --git a/jsapi/src/Map.js b/jsapi/src/Map.js index e4f8bdfb2..d79418acf 100644 --- a/jsapi/src/Map.js +++ b/jsapi/src/Map.js @@ -1,41 +1,41 @@ -goog.module('lux.Map'); - -goog.module.declareLegacyNamespace(); -const luxBase = goog.require('lux'); -const luxLayerManager = goog.require('lux.LayerManager'); -const luxMyMap = goog.require('lux.MyMap'); -const luxPrintManager = goog.require('lux.PrintManager'); -const luxStateManager = goog.require('lux.StateManager'); -const olBase = goog.require('ol'); -const olArray = goog.require('ol.array'); -const olMap = goog.require('ol.Map'); -const olOverlay = goog.require('ol.Overlay'); -const olView = goog.require('ol.View'); -const olControlMousePosition = goog.require('ol.control.MousePosition'); -const olEvents = goog.require('ol.events'); -const olFormatGPX = goog.require('ol.format.GPX'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olFormatKML = goog.require('ol.format.KML'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olInteractionSelect = goog.require('ol.interaction.Select'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olExtent = goog.require('ol.extent'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleStyle = goog.require('ol.style.Style'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olSourceVector = goog.require('ol.source.Vector'); -const olProj = goog.require('ol.proj'); -const olCollection = goog.require('ol.Collection'); -const olAsserts = goog.require('ol.asserts'); -const olControlAttribution = goog.require('ol.control.Attribution'); -const olControl = goog.require('ol.control'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olFeature = goog.require('ol.Feature'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olSourceVectorEventType = goog.require('ol.source.VectorEventType'); +/** + * @module lux.Map + */ +import luxBase from './index.js'; +import luxLayerManager from './LayerManager.js'; +import luxMyMap from './MyMap.js'; +import luxPrintManager from './PrintManager.js'; +import luxStateManager from './StateManager.js'; +import olBase from 'ol.js'; +import olArray from 'ol/array.js'; +import olMap from 'ol/Map.js'; +import olOverlay from 'ol/Overlay.js'; +import olView from 'ol/View.js'; +import olControlMousePosition from 'ol/control/MousePosition.js'; +import olEvents from 'ol/events.js'; +import olFormatGPX from 'ol/format/GPX.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olFormatKML from 'ol/format/KML.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olInteractionSelect from 'ol/interaction/Select.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olExtent from 'ol/extent.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olProj from 'ol/proj.js'; +import olCollection from 'ol/Collection.js'; +import olAsserts from 'ol/asserts.js'; +import olControlAttribution from 'ol/control/Attribution.js'; +import olControl from 'ol/control.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olFeature from 'ol/Feature.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olSourceVectorEventType from 'ol/source/VectorEventType.js'; proj4.defs('EPSG:2169', '+proj=tmerc +lat_0=49.83333333333334 +lon_0=6.166666666666667 +k=1 +x_0=80000 +y_0=100000 +ellps=intl +towgs84=-189.681,18.3463,-42.7695,-0.33746,-3.09264,2.53861,0.4598 +units=m +no_defs'); @@ -77,7 +77,7 @@ _paq.push(['setSiteId', 22]); * @export * @api stable */ -exports = function(options) { +const exports = function(options) { /** * @private * @type {Array} @@ -1870,3 +1870,6 @@ exports.prototype.handleSingleclickEvent_ = function(evt) { }.bind(this)); }; + + +export default exports; diff --git a/jsapi/src/MyMap.js b/jsapi/src/MyMap.js index 1f9d82007..c11199988 100644 --- a/jsapi/src/MyMap.js +++ b/jsapi/src/MyMap.js @@ -1,37 +1,36 @@ -goog.module('lux.MyMap'); - -goog.module.declareLegacyNamespace(); -const luxBase = goog.require('lux'); -const ngeoInteractionMeasure = goog.require('ngeo.interaction.Measure'); -const ngeoProfileD3Elevation = goog.require('ngeo.profile.d3Elevation'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olInteractionSelect = goog.require('ol.interaction.Select'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olStyleFill = goog.require('ol.style.Fill'); -const olStyleIcon = goog.require('ol.style.Icon'); -const olStyleRegularShape = goog.require('ol.style.RegularShape'); -const olStyleStyle = goog.require('ol.style.Style'); -const olStyleStroke = goog.require('ol.style.Stroke'); -const olStyleText = goog.require('ol.style.Text'); -const olSourceVector = goog.require('ol.source.Vector'); -const olFormatKML = goog.require('ol.format.KML'); -const olFormatGPX = goog.require('ol.format.GPX'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olEvents = goog.require('ol.events'); -const olObj = goog.require('ol.obj'); -const olOverlay = goog.require('ol.Overlay'); -const olEventsEventType = goog.require('ol.events.EventType'); -const olGeomLineString = goog.require('ol.geom.LineString'); -const olGeomPolygon = goog.require('ol.geom.Polygon'); -const olGeomMultiPoint = goog.require('ol.geom.MultiPoint'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olMapBrowserEventType = goog.require('ol.MapBrowserEventType'); -const olGeomGeometryLayout = goog.require('ol.geom.GeometryLayout'); -const olFeature = goog.require('ol.Feature'); -const olExtent = goog.require('ol.extent'); -const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); - +/** + * @module lux.MyMap + */ +import luxBase from './index.js'; +import ngeoInteractionMeasure from 'ngeo/interaction/Measure.js'; +import ngeoProfileD3Elevation from 'ngeo/profile/d3Elevation.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olInteractionSelect from 'ol/interaction/Select.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olStyleFill from 'ol/style/Fill.js'; +import olStyleIcon from 'ol/style/Icon.js'; +import olStyleRegularShape from 'ol/style/RegularShape.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olStyleStroke from 'ol/style/Stroke.js'; +import olStyleText from 'ol/style/Text.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olFormatKML from 'ol/format/KML.js'; +import olFormatGPX from 'ol/format/GPX.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olEvents from 'ol/events.js'; +import olObj from 'ol/obj.js'; +import olOverlay from 'ol/Overlay.js'; +import olEventsEventType from 'ol/events/EventType.js'; +import olGeomLineString from 'ol/geom/LineString.js'; +import olGeomPolygon from 'ol/geom/Polygon.js'; +import olGeomMultiPoint from 'ol/geom/MultiPoint.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olMapBrowserEventType from 'ol/MapBrowserEventType.js'; +import olGeomGeometryLayout from 'ol/geom/GeometryLayout.js'; +import olFeature from 'ol/Feature.js'; +import olExtent from 'ol/extent.js'; +import olGeomMultiLineString from 'ol/geom/MultiLineString.js'; /** * @classdesc @@ -41,7 +40,7 @@ const olGeomMultiLineString = goog.require('ol.geom.MultiLineString'); * @param {luxx.MyMapOptions} options The options. * @api stable */ -exports = function(options) { +const exports = function(options) { /** * @type {string} @@ -1194,3 +1193,6 @@ exports.prototype.orderFeaturesForGpx_ = function(features) { return points.concat(lines, others); }; + + +export default exports; diff --git a/jsapi/src/Piwik.js b/jsapi/src/Piwik.js index 6368e7496..9d9d7a25a 100644 --- a/jsapi/src/Piwik.js +++ b/jsapi/src/Piwik.js @@ -1,8 +1,12 @@ -goog.module('lux.Piwik'); - -goog.module.declareLegacyNamespace(); +/** + * @module lux.Piwik + */ +let exports = {}; /** * @typedef {{push: function(Array)}} */ exports; + + +export default exports; diff --git a/jsapi/src/PrintManager.js b/jsapi/src/PrintManager.js index 841146f46..8ba2f9843 100644 --- a/jsapi/src/PrintManager.js +++ b/jsapi/src/PrintManager.js @@ -1,30 +1,29 @@ -goog.module('lux.PrintManager'); - -goog.module.declareLegacyNamespace(); -const googColorAlpha = goog.require('goog.color.alpha'); -const olBase = goog.require('ol'); -const olColor = goog.require('ol.color'); -const olFormatGeoJSON = goog.require('ol.format.GeoJSON'); -const olGeomGeometryType = goog.require('ol.geom.GeometryType'); -const olLayerImage = goog.require('ol.layer.Image'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olLayerVector = goog.require('ol.layer.Vector'); -const olMath = goog.require('ol.math'); -const olSize = goog.require('ol.size'); -const olSourceImageWMS = goog.require('ol.source.ImageWMS'); -const olSourceTileWMS = goog.require('ol.source.TileWMS'); -const olSourceVector = goog.require('ol.source.Vector'); -const olSourceWMTS = goog.require('ol.source.WMTS'); -const olStyleCircle = goog.require('ol.style.Circle'); -const olStyleRegularShape = goog.require('ol.style.RegularShape'); -const olStyleStyle = goog.require('ol.style.Style'); -const olTilegridWMTS = goog.require('ol.tilegrid.WMTS'); -const olObj = goog.require('ol.obj'); -const olFeature = goog.require('ol.Feature'); -const olGeomPoint = goog.require('ol.geom.Point'); -const olStyleIcon = goog.require('ol.style.Icon'); -const olLayerGroup = goog.require('ol.layer.Group'); - +/** + * @module lux.PrintManager + */ +import googColorAlpha from 'goog/color/alpha.js'; +import olBase from 'ol.js'; +import olColor from 'ol/color.js'; +import olFormatGeoJSON from 'ol/format/GeoJSON.js'; +import olGeomGeometryType from 'ol/geom/GeometryType.js'; +import olLayerImage from 'ol/layer/Image.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olLayerVector from 'ol/layer/Vector.js'; +import olMath from 'ol/math.js'; +import olSize from 'ol/size.js'; +import olSourceImageWMS from 'ol/source/ImageWMS.js'; +import olSourceTileWMS from 'ol/source/TileWMS.js'; +import olSourceVector from 'ol/source/Vector.js'; +import olSourceWMTS from 'ol/source/WMTS.js'; +import olStyleCircle from 'ol/style/Circle.js'; +import olStyleRegularShape from 'ol/style/RegularShape.js'; +import olStyleStyle from 'ol/style/Style.js'; +import olTilegridWMTS from 'ol/tilegrid/WMTS.js'; +import olObj from 'ol/obj.js'; +import olFeature from 'ol/Feature.js'; +import olGeomPoint from 'ol/geom/Point.js'; +import olStyleIcon from 'ol/style/Icon.js'; +import olLayerGroup from 'ol/layer/Group.js'; /** * @classdesc @@ -33,7 +32,7 @@ const olLayerGroup = goog.require('ol.layer.Group'); * @constructor * @export */ -exports = function(url, map) { +const exports = function(url, map) { /** * @type {lux.Map} * @private @@ -978,3 +977,6 @@ exports.prototype.rgbArrayToHex = function(rgb) { exports.prototype.colorZeroPadding = function(hex) { return hex.length == 1 ? '0' + hex : hex; }; + + +export default exports; diff --git a/jsapi/src/StateManager.js b/jsapi/src/StateManager.js index a8b082bf5..c1df98555 100644 --- a/jsapi/src/StateManager.js +++ b/jsapi/src/StateManager.js @@ -1,17 +1,16 @@ -goog.module('lux.StateManager'); - -goog.module.declareLegacyNamespace(); -const luxBase = goog.require('lux'); -const olCollectionEventType = goog.require('ol.CollectionEventType'); -const olEvents = goog.require('ol.events'); -const olObj = goog.require('ol.obj'); - +/** + * @module lux.StateManager + */ +import luxBase from './index.js'; +import olCollectionEventType from 'ol/CollectionEventType.js'; +import olEvents from 'ol/events.js'; +import olObj from 'ol/obj.js'; /** * @classdesc * @constructor */ -exports = function() { +const exports = function() { /** * @type {lux.Map} @@ -136,3 +135,6 @@ exports.prototype.updateState = function(object) { exports.prototype.getUrl = function() { return this.url_; }; + + +export default exports; diff --git a/jsapi/src/index.js b/jsapi/src/index.js index 257969243..efaa07cfb 100644 --- a/jsapi/src/index.js +++ b/jsapi/src/index.js @@ -1,17 +1,18 @@ -goog.module('lux'); - -goog.module.declareLegacyNamespace(); -const olEvents = goog.require('ol.events'); -const olEventsEventType = goog.require('ol.events.EventType'); -const olProj = goog.require('ol.proj'); -const olLayerTile = goog.require('ol.layer.Tile'); -const olSourceWMTS = goog.require('ol.source.WMTS'); -const olSourceWMTSRequestEncoding = goog.require('ol.source.WMTSRequestEncoding'); -const olString = goog.require('ol.string'); -const olTilegridWMTS = goog.require('ol.tilegrid.WMTS'); -const olLayerImage = goog.require('ol.layer.Image'); -const olSourceImageWMS = goog.require('ol.source.ImageWMS'); -const olCoordinate = goog.require('ol.coordinate'); +/** + * @module lux + */ +let exports = {}; +import olEvents from 'ol/events.js'; +import olEventsEventType from 'ol/events/EventType.js'; +import olProj from 'ol/proj.js'; +import olLayerTile from 'ol/layer/Tile.js'; +import olSourceWMTS from 'ol/source/WMTS.js'; +import olSourceWMTSRequestEncoding from 'ol/source/WMTSRequestEncoding.js'; +import olString from 'ol/string.js'; +import olTilegridWMTS from 'ol/tilegrid/WMTS.js'; +import olLayerImage from 'ol/layer/Image.js'; +import olSourceImageWMS from 'ol/source/ImageWMS.js'; +import olCoordinate from 'ol/coordinate.js'; /** * @type {string} @@ -638,3 +639,6 @@ exports.generatePagRepport = function(ids, mail, eula) { exports.notify(msg); } }; + + +export default exports;