Skip to content

Commit

Permalink
Merge pull request #4541 from camptocamp/fix-rule
Browse files Browse the repository at this point in the history
Fix types in rule and routing
  • Loading branch information
sbrunner committed Jan 22, 2019
2 parents 45e8b3a + 7ce78d0 commit 3ceaed8
Show file tree
Hide file tree
Showing 126 changed files with 380 additions and 341 deletions.
4 changes: 2 additions & 2 deletions contribs/gmf/apps/appmodule.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/

import angular from 'angular';
import ngeoUtils from 'ngeo/utils.js';
import {decodeQueryString} from 'ngeo/utils.js';

/**
* @type {!angular.IModule}
*/
const module = angular.module('app', []);

module.config(['$compileProvider', function($compileProvider) {
if (!('debug' in ngeoUtils.decodeQueryString(window.location.search))) {
if (!('debug' in decodeQueryString(window.location.search))) {
// Disable the debug info
$compileProvider.debugInfoEnabled(false);
}
Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/apps/desktop/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const module = angular.module('Appdesktop', [

module.value('gmfContextualdatacontentTemplateUrl', 'gmf/contextualdata');
module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
});

Expand Down
5 changes: 2 additions & 3 deletions contribs/gmf/apps/oeedit/Controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/**
*/
/**
* Application entry point.
*
Expand Down Expand Up @@ -91,7 +89,7 @@ function Controller($scope, $injector, $timeout) {
});

/**
* @type {import("ol/collection.js").Collection.<import("ol/Feature.js").default>}
* @type {import("ol/Collection.js").default.<import("ol/Feature.js").default>}
* @export
*/
this.sketchFeatures = new olCollection();
Expand Down Expand Up @@ -228,6 +226,7 @@ const module = angular.module('Appoeedit', [

module.value('gmfContextualdatacontentTemplateUrl', 'gmf/contextualdata');
module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
});

Expand Down
3 changes: 1 addition & 2 deletions contribs/gmf/apps/oeview/Controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/**
*/
/**
* Application entry point.
*
Expand Down Expand Up @@ -118,6 +116,7 @@ const module = angular.module('Appoeview', [

module.value('gmfContextualdatacontentTemplateUrl', 'gmf/contextualdata');
module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
});

Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/examples/displayquerygrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.constant('angularLocaleScript', '../build/angular-locale_{{locale}}.js');
*/
const queryresultComponent = {
controller: 'gmfappQueryresultController',
// @ts-ignore: webpack
template: require('./partials/queryresult.html')
};

Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/examples/displayquerywindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.constant('angularLocaleScript', '../build/angular-locale_{{locale}}.js');
*/
const queryresultComponent = {
controller: 'AppQueryresultController',
// @ts-ignore: webpack
template: require('./partials/queryresult.html')
};

Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/drawfeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.constant('angularLocaleScript', '../build/angular-locale_{{locale}}.js');
/**
* @param {!angular.IScope} $scope Angular scope.
* @param {import("ngeo/misc/FeatureHelper.js").default} ngeoFeatureHelper Gmf feature helper service.
* @param {import("ol/collection.js").Collection.<import("ol/Feature.js").default>} ngeoFeatures Collection of features.
* @param {import("ol/Collection.js").default.<import("ol/Feature.js").default>} ngeoFeatures Collection of features.
* @param {import("ngeo/misc/ToolActivateMgr.js").default} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @param {import("ngeo/map/FeatureOverlayMgr.js").default} ngeoFeatureOverlayMgr Ngeo FeatureOverlay
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/objectediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function MainController(gmfObjectEditingManager, gmfThemes,
});

/**
* @type {import("ol/collection.js").Collection.<import("ol/Feature.js").default>}
* @type {import("ol/Collection.js").default.<import("ol/Feature.js").default>}
* @export
*/
this.sketchFeatures = new olCollection();
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/examples/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function MainController($scope, ngeoFeatureOverlayMgr) {
});

/**
* @type {import("ol/collection.js").Collection.<import("ol/Feature.js").default>}
* @type {import("ol/Collection.js").default.<import("ol/Feature.js").default>}
*/
const features = new olCollection();

Expand Down
8 changes: 4 additions & 4 deletions contribs/gmf/src/authentication/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import olEventsEventTarget from 'ol/events/Target.js';
*/


/**
* @typedef {Object} AuthenticationEventItem
* @property {User} user
*/
/**
* @typedef {Object} AuthenticationEventItem
* @property {User} user
*/

/**
* @typedef {import("ngeo/CustomEvent.js").default.<AuthenticationEventItem>} AuthenticationEvent
Expand Down
1 change: 1 addition & 0 deletions contribs/gmf/src/authentication/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function gmfAuthenticationTemplateUrl_(element, attrs) {


module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/authentication', require('./component.html'));
});

Expand Down
3 changes: 2 additions & 1 deletion contribs/gmf/src/backgroundlayerselector/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.value('gmfBackgroundlayerselectorTemplateUrl',


module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/backgroundlayerselector', require('./component.html'));
});

Expand Down Expand Up @@ -136,7 +137,7 @@ function Controller($scope, ngeoBackgroundLayerMgr, gmfThemes) {
this.gmfThemes_ = gmfThemes;

/**
* @type {!Array.<!import("ol/EventsKey.js").default>}
* @type {!Array.<!import("ol/events.js").EventsKey>}
* @private
*/
this.listenerKeys_ = [];
Expand Down
10 changes: 5 additions & 5 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ import gmfThemeThemes from 'gmf/theme/Themes.js';
* A part of the application config.
* @typedef {Object} Config
* @property {number} srid
* @property {ol.style.Style} [positionFeatureStyle]
* @property {ol.style.Style} [accuracyFeatureStyle]
* @property {import("ol/style/Style.js").default} [positionFeatureStyle]
* @property {import("ol/style/Style.js").default} [accuracyFeatureStyle]
* @property {number} [geolocationZoom]
* @property {string} [autorotate]
* @property {olx.ViewOptions} [mapViewConfig]
* @property {ol.Collection.<ol.control.Control>|Array.<ol.control.Control>} [mapControls]
* @property {ol.Collection.<ol.interaction.Interaction>|Array.<ol.interaction.Interaction>} [mapInteractions]
* @property {import("ol/Collection.js").default.<import("ol/control/Contrimport("ol/js.js").default").default>|Array.<import("ol/control/Contrimport("ol/js.js").default").default>} [mapControls]
* @property {import("ol/Collection.js").default.<import("ol/interaction/Interaction.js").default>|Array.<import("ol/interaction/Interaction.js").default>} [mapInteractions]
* @property {number} [mapPixelRatio]
* }} Config
*/
Expand Down Expand Up @@ -111,7 +111,7 @@ function AbstractAppController(config, $scope, $injector) {

/**
* Collection of features for the draw interaction
* @type {import("ol/collection.js").Collection.<import("ol/Feature.js").default>}
* @type {import("ol/Collection.js").default.<import("ol/Feature.js").default>}
*/
const ngeoFeatures = $injector.get('ngeoFeatures');

Expand Down
4 changes: 2 additions & 2 deletions contribs/gmf/src/controllers/AbstractMobileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ function AbstractMobileController(config, $scope, $injector) {
this.searchOverlayVisible = false;

/**
* @type {SearchDirectiveListeners}
* @type {import('ngeo/search/searchDirective.js').SearchDirectiveListeners}
* @export
*/
this.searchListeners = /** @type {SearchDirectiveListeners} */ ({
this.searchListeners = /** @type {import('ngeo/search/searchDirective.js').SearchDirectiveListeners} */ ({
open: function() {
this.searchOverlayVisible = true;
}.bind(this),
Expand Down
10 changes: 5 additions & 5 deletions contribs/gmf/src/datasource/ExternalDataSourcesManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import olFormatKML from 'ol/format/KML.js';

/**
* @typedef {Object} ExternalDataSourcesManagerWMTSCacheItem
* @property {!ol.layer.Tile} layerObj
* @property {!import("ol/layer/Tile.js").default} layerObj
* @property {Function} unregister
*/

Expand Down Expand Up @@ -129,14 +129,14 @@ class ExternalDatSourcesManager {

/**
* Collection of WMS groups.
* @type {!import("ol/collection.js").Collection.<!import("ngeo/datasource/WMSGroup.js").default>}
* @type {!import("ol/Collection.js").default.<!import("ngeo/datasource/WMSGroup.js").default>}
* @private
*/
this.wmsGroupsCollection_ = new olCollection();

/**
* Collection of groups for WMTS data sources.
* @type {!import("ol/collection.js").Collection.<!import("ngeo/datasource/OGCGroup.js").default>}
* @type {!import("ol/Collection.js").default.<!import("ngeo/datasource/OGCGroup.js").default>}
* @private
*/
this.wmtsGroupsCollection_ = new olCollection();
Expand Down Expand Up @@ -206,7 +206,7 @@ class ExternalDatSourcesManager {
}

/**
* @return {!import("ol/collection.js").Collection.<!import("ngeo/datasource/WMSGroup.js").default>} Collection of WMS
* @return {!import("ol/Collection.js").default.<!import("ngeo/datasource/WMSGroup.js").default>} Collection of WMS
* groups.
* @export
*/
Expand Down Expand Up @@ -258,7 +258,7 @@ class ExternalDatSourcesManager {
}

/**
* @return {!import("ol/collection.js").Collection.<!import("ngeo/datasource/OGCGroup.js").default>} Collection of groups
* @return {!import("ol/Collection.js").default.<!import("ngeo/datasource/OGCGroup.js").default>} Collection of groups
* for WMTS data sources.
* @export
*/
Expand Down
7 changes: 4 additions & 3 deletions contribs/gmf/src/datasource/Manager.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import angular from 'angular';
import gmfDatasourceOGC, {ServerType, WFSOutputFormat, Type} from 'gmf/datasource/OGC.js';
import gmfDatasourceOGC from 'gmf/datasource/OGC.js';
import gmfDatasourceWFSAliases from 'gmf/datasource/WFSAliases.js';
import gmfLayertreeSyncLayertreeMap from 'gmf/layertree/SyncLayertreeMap.js';
import gmfLayertreeTreeManager from 'gmf/layertree/TreeManager.js';
import gmfThemeThemes from 'gmf/theme/Themes.js';

import {ServerType, WFSOutputFormat, Type} from 'ngeo/datasource/OGC.js';
import ngeoDatasourceDataSources from 'ngeo/datasource/DataSources.js';

import ngeoFilterRuleHelper from 'ngeo/filter/RuleHelper.js';
Expand All @@ -22,7 +23,7 @@ import olSourceTileWMS from 'ol/source/TileWMS.js';


/**
* @typedef {import("ol/collection.js").Collection.<import("gmf/datasource/OGC.js").default>} DataSources
* @typedef {import("ol/Collection.js").default.<import("gmf/datasource/OGC.js").default>} DataSources
*/


Expand All @@ -38,7 +39,7 @@ import olSourceTileWMS from 'ol/source/TileWMS.js';
* @property {Function} [timeLowerValueWatcherUnregister]
* @property {Function} [timeUpperValueWatcherUnregister]
* @property {ngeo.layertree.Controller} treeCtrl
* @property {ol.layer.Image} [wmsLayer]
* @property {import("ol/layer/Image.js").default} [wmsLayer]
*/


Expand Down
5 changes: 2 additions & 3 deletions contribs/gmf/src/disclaimer/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {getUid as olUtilGetUid} from 'ol/util.js';
import * as olEvents from 'ol/events.js';
import olLayerBase from 'ol/layer/Base.js';
import olLayerGroup from 'ol/layer/Group.js';
import gmfBase from 'gmf/index.js';
import {DATALAYERGROUP_NAME} from 'gmf/index.js';
import ngeoMapLayerHelper from 'ngeo/map/LayerHelper.js';
import ngeoMessageMessage from 'ngeo/message/Message.js';
import ngeoMessageDisclaimer from 'ngeo/message/Disclaimer.js';
Expand Down Expand Up @@ -137,8 +137,7 @@ function Controller($element, $sce, $timeout, gettextCatalog, ngeoCreatePopup, n
* Initialise the controller.
*/
Controller.prototype.$onInit = function() {
this.dataLayerGroup_ = this.ngeoLayerHelper_.getGroupFromMap(this.map,
gmfBase.DATALAYERGROUP_NAME);
this.dataLayerGroup_ = this.ngeoLayerHelper_.getGroupFromMap(this.map, DATALAYERGROUP_NAME);
this.registerLayer_(this.dataLayerGroup_);
};

Expand Down
16 changes: 7 additions & 9 deletions contribs/gmf/src/drawing/drawFeatureComponent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*/

import angular from 'angular';
import gmfDrawingFeatureStyleComponent from 'gmf/drawing/featureStyleComponent.js';

Expand Down Expand Up @@ -45,6 +42,7 @@ const module = angular.module('GmfDrawFeatureComponent', [


module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/drawing/drawFeatureComponent', require('./drawFeatureComponent.html'));
});

Expand Down Expand Up @@ -89,7 +87,7 @@ module.directive('gmfDrawfeature', component);
* @param {!angular.ITimeoutService} $timeout Angular timeout service.
* @param {!angular.gettext.gettextCatalog} gettextCatalog Gettext catalog.
* @param {!import("ngeo/misc/FeatureHelper.js").default} ngeoFeatureHelper Ngeo feature helper service.
* @param {!import("ol/collection.js").Collection.<!import("ol/Feature.js").default>} ngeoFeatures Collection of features.
* @param {!import("ol/Collection.js").default.<!import("ol/Feature.js").default>} ngeoFeatures Collection of features.
* @param {!import("ngeo/misc/ToolActivateMgr.js").default} ngeoToolActivateMgr Ngeo ToolActivate manager
* service.
* @constructor
Expand Down Expand Up @@ -165,7 +163,7 @@ function Controller($scope, $timeout, gettextCatalog, ngeoFeatureHelper, ngeoFea
this.featureHelper_ = ngeoFeatureHelper;

/**
* @type {!import("ol/collection.js").Collection.<!import("ol/Feature.js").default>}
* @type {!import("ol/Collection.js").default.<!import("ol/Feature.js").default>}
* @export
*/
this.features = ngeoFeatures;
Expand All @@ -183,14 +181,14 @@ function Controller($scope, $timeout, gettextCatalog, ngeoFeatureHelper, ngeoFea
this.selectedFeature = null;

/**
* @type {!import("ol/collection.js").Collection.<!import("ol/Feature.js").default>}
* @type {!import("ol/Collection.js").default.<!import("ol/Feature.js").default>}
* @export
*/
this.selectedFeatures = new olCollection();


/**
* @type {!import("ol/collection.js").Collection}
* @type {!import("ol/Collection.js").default}
* @private
*/
this.interactions_ = new olCollection();
Expand All @@ -212,7 +210,7 @@ function Controller($scope, $timeout, gettextCatalog, ngeoFeatureHelper, ngeoFea
this.menu_ = null;

/**
* @type {?import("ol/EventsKey.js").default}
* @type {?import("ol/events.js").EventsKey}
* @private
*/
this.menuListenerKey_ = null;
Expand Down Expand Up @@ -274,7 +272,7 @@ function Controller($scope, $timeout, gettextCatalog, ngeoFeatureHelper, ngeoFea
this.translateToolActivate = new ngeoMiscToolActivate(this.translate_, 'active');

/**
* @type {!Array.<!import("ol/EventsKey.js").default>}
* @type {!Array.<!import("ol/events.js").EventsKey>}
* @private
*/
this.listenerKeys_ = [];
Expand Down
5 changes: 2 additions & 3 deletions contribs/gmf/src/drawing/featureStyleComponent.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/**
*/
import angular from 'angular';
import {getUid as olUtilGetUid} from 'ol/util.js';
import * as olEvents from 'ol/events.js';
Expand All @@ -19,6 +17,7 @@ const module = angular.module('gmfDrawingFeatureStyle', [


module.run(/* @ngInject */ ($templateCache) => {
// @ts-ignore: webpack
$templateCache.put('gmf/drawing/featureStyleComponent', require('./featureStyleComponent.html'));
});

Expand Down Expand Up @@ -112,7 +111,7 @@ function Controller($scope, ngeoFeatureHelper) {
);

/**
* @type {Array.<import("ol/EventsKey.js").default>}
* @type {Array.<import("ol/events.js").EventsKey>}
* @private
*/
this.featureListenerKeys_ = [];
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/src/editing/Snapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function Snapping($http, $q, $rootScope, $timeout, gmfThemes,
this.cache_ = {};

/**
* @type {!Array.<import("ol/EventsKey.js").default>}
* @type {!Array.<import("ol/events.js").EventsKey>}
* @private
*/
this.listenerKeys_ = [];
Expand Down Expand Up @@ -555,9 +555,9 @@ Snapping.prototype.handleMapMoveEnd_ = function() {
* @property {boolean} active
* @property {string} featureNS
* @property {string} featurePrefix
* @property {ol.Collection.<ol.Feature>} features
* @property {import("ol/Collection.js").default.<import("ol/Feature.js").default>} features
* @property {string} geometryName
* @property {?ol.interaction.Snap} interaction
* @property {?import("ol/interaction/Snap.js").default} interaction
* @property {number} maxFeatures
* @property {?angular.IDeferred} requestDeferred
* @property {gmfThemes.GmfSnappingConfig} snappingConfig
Expand Down

0 comments on commit 3ceaed8

Please sign in to comment.