diff --git a/demo/src/app/geo/layer/layer.component.html b/demo/src/app/geo/layer/layer.component.html index 3ebadfa624..5a66e26cac 100644 --- a/demo/src/app/geo/layer/layer.component.html +++ b/demo/src/app/geo/layer/layer.component.html @@ -17,7 +17,6 @@ diff --git a/demo/src/app/geo/time-filter/time-filter.component.html b/demo/src/app/geo/time-filter/time-filter.component.html index 689f8842a2..1792751626 100644 --- a/demo/src/app/geo/time-filter/time-filter.component.html +++ b/demo/src/app/geo/time-filter/time-filter.component.html @@ -3,7 +3,7 @@ Time filter
  • npm install --save moment@2.22.2
  • -
  • npm install --save @mat-datetimepicker/core@2.0.1
  • +
  • npm install --save @mat-datetimepicker/core@3.0.0-beta.0
  • Dependencies: LanguageService

  • @@ -16,9 +16,7 @@ - - - + diff --git a/package-lock.json b/package-lock.json index a19bfdcf87..1924ae1f20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1028,6 +1028,14 @@ } } }, + "@mat-datetimepicker/core": { + "version": "3.0.0-beta.0", + "resolved": "https://registry.npmjs.org/@mat-datetimepicker/core/-/core-3.0.0-beta.0.tgz", + "integrity": "sha512-bsEziG0qmzVmg5PoBYqdaoUm58M1m6Qf0JIS0xHMFkvuRtLKJsA4G1LJ9Up5ZruKMW1rmtE3wuBeZmyln4vsQQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "@mdi/angular-material": { "version": "3.9.97", "resolved": "https://registry.npmjs.org/@mdi/angular-material/-/angular-material-3.9.97.tgz", @@ -1552,7 +1560,7 @@ }, "acorn-globals": { "version": "1.0.9", - "resolved": "http://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", "requires": { "acorn": "^2.1.0" @@ -1721,7 +1729,7 @@ "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -1865,7 +1873,7 @@ "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true }, "archy": { @@ -1917,7 +1925,7 @@ "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", "dev": true }, "arr-map": { @@ -1949,7 +1957,7 @@ }, "array-equal": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" }, "array-filter": { @@ -2453,7 +2461,7 @@ "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha1-e95c7RRbbVUakNuH+DxVi060io8=", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { "cache-base": "^1.0.1", @@ -2654,7 +2662,7 @@ "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha1-LN4J617jQfSEdGuwMJsyU7GxRC8=", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", "dev": true }, "body-parser": { @@ -3001,7 +3009,7 @@ "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha1-Uvq8xqYG0aADAoAmSO9o9jnaJow=", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", "dev": true }, "buffer-xor": { @@ -3058,7 +3066,7 @@ "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, "requires": { "collection-visit": "^1.0.0", @@ -3263,7 +3271,7 @@ "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha1-h2Dk7MJy9MNjUy+SbYdKriwTl94=", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -3687,7 +3695,7 @@ "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha1-4TjMdeBAxyexlm/l5fjJruJW/js=", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", "dev": true }, "conventional-changelog": { @@ -4436,7 +4444,7 @@ "copy-concurrently": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", - "integrity": "sha1-kilzmMrjSTf8r9bsgTnBgFHwteA=", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", "dev": true, "requires": { "aproba": "^1.1.1", @@ -5662,7 +5670,7 @@ "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha1-f8vbGY3HGVlDLv4ThCaE4FJaywI=", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "dev": true, "requires": { "md5.js": "^1.3.4", @@ -6952,7 +6960,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "gauge": { @@ -7533,7 +7541,7 @@ "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo=", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", "dev": true }, "globby": { @@ -8808,7 +8816,7 @@ "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha1-LBY7P6+xtgbZ0Xko8FwqHDjgdnc=", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "requires": { "isobject": "^3.0.1" @@ -9317,7 +9325,7 @@ }, "jsdom": { "version": "8.5.0", - "resolved": "http://registry.npmjs.org/jsdom/-/jsdom-8.5.0.tgz", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-8.5.0.tgz", "integrity": "sha1-1Nj12/J2hjW2KmKCO5R89wcevJg=", "requires": { "abab": "^1.0.0", @@ -10478,7 +10486,7 @@ "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha1-8IA1HIZbDcViqEYpZtqlNUPHik0=", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, "requires": { "bn.js": "^4.0.0", @@ -10542,7 +10550,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -10672,9 +10680,9 @@ "dev": true }, "moment": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", - "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" }, "morgan": { "version": "1.9.1", @@ -11296,7 +11304,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -11686,7 +11694,7 @@ "p-map": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha1-5OlPMR6rvIYzoeeZCBZfyiYkG2s=", + "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", "dev": true }, "p-try": { @@ -12036,7 +12044,7 @@ }, "pause-stream": { "version": "0.0.11", - "resolved": "http://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=", "dev": true, "requires": { @@ -12046,7 +12054,7 @@ "pbf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.1.0.tgz", - "integrity": "sha1-9wAEutyygXYeq7HnbJLxefCBiek=", + "integrity": "sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w==", "requires": { "ieee754": "^1.1.6", "resolve-protobuf-schema": "^2.0.0" @@ -12514,7 +12522,7 @@ "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "optional": true, "requires": { @@ -13272,7 +13280,7 @@ "replacestream": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", - "integrity": "sha1-PuV5gJK+Nksc2xSEMISSyz3/LzY=", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", "dev": true, "requires": { "escape-string-regexp": "^1.0.3", @@ -14216,7 +14224,7 @@ "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha1-bBdfhv8UvbByRWPo88GwIaKGhTs=", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { "define-property": "^1.0.0", @@ -14267,7 +14275,7 @@ "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, "requires": { "kind-of": "^3.2.0" @@ -16237,7 +16245,7 @@ "vlq": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha1-jz5DKM9jsVQMDWfhsneDhviXWyY=", + "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", "dev": true }, "vm-browserify": { diff --git a/package.json b/package.json index b82377e285..18bb70b025 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "@angular/platform-browser": "^7.2.6", "@angular/platform-browser-dynamic": "^7.2.6", "@angular/router": "^7.2.6", + "@mat-datetimepicker/core": "^3.0.0-beta.0", "@mdi/angular-material": "^3.6.95", "@ngx-translate/core": "^10.0.1", "@turf/helpers": "^6.1.4", @@ -91,7 +92,7 @@ "jspdf": "^1.5.3", "jszip": "^3.1.5", "jwt-decode": "^2.2.0", - "moment": "^2.24.0", + "moment": "^2.22.2", "ngx-cacheable": "^1.0.9", "ol": "^5.3.0", "proj4": "^2.5.0", diff --git a/packages/context/src/lib/context-manager/context-item/context-item.component.html b/packages/context/src/lib/context-manager/context-item/context-item.component.html index 54e8516829..b4c968f601 100644 --- a/packages/context/src/lib/context-manager/context-item/context-item.component.html +++ b/packages/context/src/lib/context-manager/context-item/context-item.component.html @@ -2,7 +2,7 @@ = new BehaviorSubject(''); + + get title(): string { + return this.title$.getValue(); + } + + constructor( + @Inject('options') options: SearchSourceOptions, + private languageService: LanguageService + ) { super(options); + this.languageService.translate + .get(this.options.title) + .subscribe(title => this.title$.next(title)); } getId(): string { @@ -38,7 +50,7 @@ export class CoordinatesReverseSearchSource extends SearchSource protected getDefaultOptions(): SearchSourceOptions { return { - title: 'Coordinates', + title: 'igo.geo.search.coordinates.name', order: 1 }; } diff --git a/packages/geo/src/lib/search/shared/sources/icherche.ts b/packages/geo/src/lib/search/shared/sources/icherche.ts index d8defa5e39..64e23a7294 100644 --- a/packages/geo/src/lib/search/shared/sources/icherche.ts +++ b/packages/geo/src/lib/search/shared/sources/icherche.ts @@ -101,7 +101,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { // enabled: true // }, { - title: 'mrc', + title: 'MRC', value: 'mrc', enabled: true }, @@ -165,7 +165,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { }, { type: 'radiobutton', - title: 'trust level', + title: 'ecmax', name: 'ecmax', values: [ { @@ -285,10 +285,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { ); if (data.geometry === undefined) { - return Object.assign( - { type: data.index }, - properties - ); + return Object.assign({ type: data.index }, properties); } const googleLinksProperties: { diff --git a/packages/geo/src/locale/en.geo.json b/packages/geo/src/locale/en.geo.json index 9707d01a6a..c8785315ef 100644 --- a/packages/geo/src/locale/en.geo.json +++ b/packages/geo/src/locale/en.geo.json @@ -90,6 +90,7 @@ "hideLayer": "Hide Layer", "lowerLayer": "Bring layer backward", "loadingLegendText": "Loading legend", + "filterPlaceholder": "Filter", "noLegendText": "No legend available for this layer", "opacity": "Opacity", "raiseLayer": "Bring layer forward", @@ -210,6 +211,9 @@ "metadataUrl": "Metadata" } }, + "coordinates": { + "name": "Coordinates" + }, "menu.tooltip": "Search Options", "settings": { "title": "Settings" @@ -217,8 +221,8 @@ "searchSources": { "settings": { "results type": "Results type", - "trust level": "Trust level", - "results limit": "Limit", + "ecmax": "Maximum deviation", + "results limit": "Number of results", "multiple object": "Multiple object", "country limitation": "Limitation (country)" } diff --git a/packages/geo/src/locale/fr.geo.json b/packages/geo/src/locale/fr.geo.json index ed9cbfe06f..b063ebea72 100644 --- a/packages/geo/src/locale/fr.geo.json +++ b/packages/geo/src/locale/fr.geo.json @@ -89,6 +89,7 @@ "hideLayer": "Masquer la couche", "lowerLayer": "Mettre en arrière", "loadingLegendText": "Chargement de la légende", + "filterPlaceholder": "Filtre", "noLegendText": "Aucune légende disponible pour cette couche", "opacity": "Opacité", "raiseLayer": "Mettre en avant", @@ -98,10 +99,10 @@ "subsetLayersListKeyword": "Limiter l'affichage de la liste selon le titre ou par type (wms, wfs,...)", "deleteKeyword": "Supprimer le mot-clé", "subsetLayersListKeywordPlaceholder": "Filtre", - "subsetLayersListOnlyVisible": "Conserver que les couches qui sont visible", - "subsetLayersListOnlyInRange": "Conserver que les couches qui sont dans la plage de résolution active", - "sortAlphabetically": "Trier la liste des couches alphabétiquement.", - "sortMapOrder": "Replacer les couches selon l'ordre cartographique.", + "subsetLayersListOnlyVisible": "Conserver les couches visibles", + "subsetLayersListOnlyInRange": "Conserver les couches qui sont dans la plage de résolution active", + "sortAlphabetically": "Trier la liste des couches alphabétiquement", + "sortMapOrder": "Replacer les couches selon l'ordre cartographique", "resetLayersList": "Supprimer le filtre appliqué à la liste" }, "download": { @@ -209,6 +210,9 @@ "metadataUrl": "Métadonnées" } }, + "coordinates": { + "name": "Coordonnées" + }, "menu.tooltip": "Options de recherche", "settings": { "title": "Paramètres" @@ -216,8 +220,8 @@ "searchSources": { "settings": { "results type": "Type de résultat", - "trust level": "Niveau de confiance", - "results limit": "Limite", + "ecmax": "Écart maximal", + "results limit": "Nombre de résultats", "multiple object": "Objet multiple", "country limitation": "Limitation (pays)" } diff --git a/packages/integration/src/lib/context/context.state.ts b/packages/integration/src/lib/context/context.state.ts index 789d713570..8c975b859b 100644 --- a/packages/integration/src/lib/context/context.state.ts +++ b/packages/integration/src/lib/context/context.state.ts @@ -77,6 +77,7 @@ export class ContextState { * @param context Detailed context */ private onContextChange(context: DetailedContext) { + console.log(context); if (context === undefined) { return; } diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html index 2907b499bf..5c93eda2d8 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html @@ -1,4 +1,10 @@ +
    +

    {{ 'igo.integration.searchResultsTool.noResults' | translate }}

    +

    {{ 'igo.integration.searchResultsTool.doSearch' | translate }}

    +
    + { this.feature = element ? (element.entity.data as Feature) : undefined; - if (!this.feature) { + if (!this.feature && this.store.stateView.empty) { this.topPanelState = 'initial'; } return this.feature; @@ -96,7 +96,8 @@ export class SearchResultsToolComponent { private mapState: MapState, private layerService: LayerService, private searchState: SearchState - ) {} + ) { + } /** * Try to add a feature to the map when it's being focused @@ -104,10 +105,10 @@ export class SearchResultsToolComponent { * @param result A search result that could be a feature */ onResultFocus(result: SearchResult) { + this.tryAddFeatureToMap(result); if (this.topPanelState === 'initial') { this.toggleTopPanel(); } - this.tryAddFeatureToMap(result); } /** @@ -116,11 +117,11 @@ export class SearchResultsToolComponent { * @param result A search result that could be a feature or some layer options */ onResultSelect(result: SearchResult) { + this.tryAddFeatureToMap(result); + this.tryAddLayerToMap(result); if (this.topPanelState === 'initial') { this.toggleTopPanel(); } - this.tryAddFeatureToMap(result); - this.tryAddLayerToMap(result); } toggleTopPanel() { diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.module.ts b/packages/integration/src/lib/search/search-results-tool/search-results-tool.module.ts index 4f4095d07c..642bec6a4d 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.module.ts +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.module.ts @@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common'; import { MatIconModule, MatButtonModule } from '@angular/material'; +import { IgoLanguageModule } from '@igo2/core'; import { IgoFlexibleModule, IgoPanelModule } from '@igo2/common'; import { IgoFeatureModule, @@ -20,6 +21,7 @@ import { SearchResultsToolComponent } from './search-results-tool.component'; CommonModule, MatIconModule, MatButtonModule, + IgoLanguageModule, IgoFeatureModule, IgoSearchModule, IgoFlexibleModule, diff --git a/packages/integration/src/locale/en.tools.json b/packages/integration/src/locale/en.integration.json similarity index 78% rename from packages/integration/src/locale/en.tools.json rename to packages/integration/src/locale/en.integration.json index 0c21057e53..e22812b2a8 100644 --- a/packages/integration/src/locale/en.tools.json +++ b/packages/integration/src/locale/en.integration.json @@ -14,6 +14,10 @@ "shareMap": "Share", "timeAnalysis": "Time Analysis", "about": "About" + }, + "searchResultsTool": { + "noResults": "No results", + "doSearch": "Do a search in the search bar" } } } diff --git a/packages/integration/src/locale/fr.tools.json b/packages/integration/src/locale/fr.integration.json similarity index 79% rename from packages/integration/src/locale/fr.tools.json rename to packages/integration/src/locale/fr.integration.json index 74a4ca9d16..79cf121557 100644 --- a/packages/integration/src/locale/fr.tools.json +++ b/packages/integration/src/locale/fr.integration.json @@ -14,6 +14,10 @@ "shareMap": "Partager", "timeAnalysis": "Analyse Temporelle", "about": "À propos" + }, + "searchResultsTool": { + "noResults": "Aucun résultat", + "doSearch": "Veuillez effectuer une recherche" } } }