From 20de3627039bfc1a0e92a79879f23adec54f4138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Mon, 30 Sep 2019 07:50:07 -0400 Subject: [PATCH 01/18] locale(geolocate): rename geolocate locale --- packages/geo/src/locale/fr.geo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/geo/src/locale/fr.geo.json b/packages/geo/src/locale/fr.geo.json index 06d20f1b79..d4dae14ac2 100644 --- a/packages/geo/src/locale/fr.geo.json +++ b/packages/geo/src/locale/fr.geo.json @@ -128,7 +128,7 @@ }, "mapButtons": { "baselayerSwitcher": "Changer le fond de carte", - "geolocate": "Positionnement GPS", + "geolocate": "Afficher votre position", "zoomIn": "Zoomer ({{zoom}})", "zoomOut": "Dézoomer ({{zoom}})", "resetRotation": "Réinitialiser la carte vers le nord", From b95789df40af4c3f8d14b3870565ae97e2bf3037 Mon Sep 17 00:00:00 2001 From: cbourget Date: Mon, 30 Sep 2019 09:10:46 -0400 Subject: [PATCH 02/18] fix(geometry): fix geometry form field drawGuide and geometryType model --- .../geometry-form-field/geometry-form-field.component.html | 4 ++-- .../geometry-form-field/geometry-form-field.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html index 613ac1cca7..b5789d2cf4 100644 --- a/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html +++ b/packages/geo/src/lib/geometry/geometry-form-field/geometry-form-field.component.html @@ -11,7 +11,7 @@
+ [(ngModel)]="geometryType"> @@ -35,7 +35,7 @@ matInput type="number" [placeholder]="drawGuidePlaceholder" - [ngModel]="drawGuide"> + [(ngModel)]="drawGuide"> = new BehaviorSubject(0); - + /** * Draw guide placeholder */ From 9c592b2b4e3fb2411019a8eebb4320c20a5eaa80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= Date: Tue, 1 Oct 2019 13:05:13 -0400 Subject: [PATCH 03/18] fix(search-result)Use the complete available space --- .../search-results-tool/search-results-tool.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts index fc01373c31..8fea03a1b7 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts @@ -71,9 +71,7 @@ export class SearchResultsToolComponent { .pipe( map(element => { this.feature = element ? (element.entity.data as Feature) : undefined; - if (!this.feature && this.store.stateView.empty) { - this.topPanelState = 'initial'; - } + !this.feature ? this.topPanelState = 'initial': this.topPanelState = 'expanded'; return this.feature; }) ); From 311fb6df0a7f200ce32302860a6d88f3b953e662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Tue, 1 Oct 2019 14:59:17 -0400 Subject: [PATCH 04/18] feat(icherche): add "anciennes-adresses" --- package-lock.json | 6 ++--- package.json | 2 +- .../src/lib/search/shared/sources/icherche.ts | 22 ++++++++++--------- .../search-results-tool.component.ts | 4 +++- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index f33d9af973..b2201b9173 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1071,9 +1071,9 @@ } }, "@mdi/angular-material": { - "version": "3.9.97", - "resolved": "https://registry.npmjs.org/@mdi/angular-material/-/angular-material-3.9.97.tgz", - "integrity": "sha512-KULwJmBTMvBufX59UqcEYlzUK+H9CcpBayR3eV1TW9sm8bHiBl4TPiuc+XK+g2l604wvXftfTn5H8ucbDvH+Mw==" + "version": "4.4.95", + "resolved": "https://registry.npmjs.org/@mdi/angular-material/-/angular-material-4.4.95.tgz", + "integrity": "sha512-WegEz+DtBlsI6Kxq2BSFa/r+teZJHuP4adq/MB+Rurp8xDg0yaoDnG4bh4GY8I+1nl7kY53BSpOTH67ak0qtQA==" }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", diff --git a/package.json b/package.json index d1e215a898..ad4f9a1eaa 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "@ionic-native/network": "^5.12.0", "@ionic/angular": "^4.6.2", "@mat-datetimepicker/core": "^3.0.0-beta.0", - "@mdi/angular-material": "^3.6.95", + "@mdi/angular-material": "^4.4.95", "@ngx-translate/core": "^10.0.1", "@turf/helpers": "^6.1.4", "@turf/line-intersect": "^6.0.2", diff --git a/packages/geo/src/lib/search/shared/sources/icherche.ts b/packages/geo/src/lib/search/shared/sources/icherche.ts index 02f95be41e..5fae00dabc 100644 --- a/packages/geo/src/lib/search/shared/sources/icherche.ts +++ b/packages/geo/src/lib/search/shared/sources/icherche.ts @@ -102,7 +102,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { { title: 'Route', value: 'routes', - enabled: false, + enabled: true, available: false, hashtags: ['route'] }, @@ -112,11 +112,11 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { enabled: true, hashtags: ['municipalité', 'mun'] }, - // { - // title: 'Ancienne municipalité', - // value: 'ancienne_municipalite', - // enabled: true - // }, + { + title: 'Ancienne municipalité', + value: 'anciennes-municipalites', + enabled: false + }, { title: 'MRC', value: 'mrc', @@ -519,18 +519,20 @@ export class IChercheReverseSearchSource extends SearchSource return ''; } let subtitle = ''; - switch(data.properties.type) { + switch (data.properties.type) { case 'arrondissements': subtitle = data.properties.municipalite + ' (Arrondissement)'; break; default: const typeSetting = this.settings.find(s => s.name === 'type'); - const type = typeSetting.values.find(t => t.value === data.properties.type); + const type = typeSetting.values.find( + t => t.value === data.properties.type + ); if (type) { subtitle = type.title; } - } - return subtitle; + } + return subtitle; } private dataToResult(data: IChercheReverseData): SearchResult { diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts index 8fea03a1b7..60334411e4 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts @@ -71,7 +71,9 @@ export class SearchResultsToolComponent { .pipe( map(element => { this.feature = element ? (element.entity.data as Feature) : undefined; - !this.feature ? this.topPanelState = 'initial': this.topPanelState = 'expanded'; + !this.feature + ? (this.topPanelState = 'initial') + : (this.topPanelState = 'expanded'); return this.feature; }) ); From 1da1cb020712022d52d08764b9b894bc5ac01bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Tue, 1 Oct 2019 15:08:25 -0400 Subject: [PATCH 05/18] fix(icherche): route is avaibled --- packages/geo/src/lib/search/shared/sources/icherche.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/geo/src/lib/search/shared/sources/icherche.ts b/packages/geo/src/lib/search/shared/sources/icherche.ts index 5fae00dabc..558de6558b 100644 --- a/packages/geo/src/lib/search/shared/sources/icherche.ts +++ b/packages/geo/src/lib/search/shared/sources/icherche.ts @@ -103,7 +103,6 @@ export class IChercheSearchSource extends SearchSource implements TextSearch { title: 'Route', value: 'routes', enabled: true, - available: false, hashtags: ['route'] }, { From 56e45cdb030d39d1637ddfaf81f07e65345dcd89 Mon Sep 17 00:00:00 2001 From: hugbe8 Date: Tue, 1 Oct 2019 15:11:27 -0400 Subject: [PATCH 06/18] fix(ogc-filter): display ogc-filter-button (#446) - fix ie11: .mat-button-toggle { display: inline-flex; } .igo-layer-button-group { max-width: 100%; } - ajust style (space saving): .mat-list-item { height: auto; } - ajust style (space saving): .igo-layer-button-group { contents; } /* Note: ie11 equivalent: display: ruby-base; */ --- .../ogc-filter-toggle-button.component.scss | 3 ++- .../ogc-filterable-item/ogc-filterable-item.component.scss | 4 ++++ .../geo/src/lib/layer/layer-item/layer-item.component.scss | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/geo/src/lib/filter/ogc-filter-toggle-button/ogc-filter-toggle-button.component.scss b/packages/geo/src/lib/filter/ogc-filter-toggle-button/ogc-filter-toggle-button.component.scss index 45e7c04642..ce9fba85b0 100644 --- a/packages/geo/src/lib/filter/ogc-filter-toggle-button/ogc-filter-toggle-button.component.scss +++ b/packages/geo/src/lib/filter/ogc-filter-toggle-button/ogc-filter-toggle-button.component.scss @@ -1,10 +1,11 @@ .mat-button-toggle-group { margin: 5px 5px 5px 5px; + flex-wrap: wrap; } .mat-button-toggle { - width: 100%; + display: inline-flex; } ::ng-deep .material-tooltip { diff --git a/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.scss b/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.scss index c636f2940f..09892ee686 100644 --- a/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.scss +++ b/packages/geo/src/lib/filter/ogc-filterable-item/ogc-filterable-item.component.scss @@ -8,6 +8,10 @@ display: inline-block; } +.mat-list-item { + height: auto; +} + mat-icon.disabled { color: rgba(0,0,0,.38); } diff --git a/packages/geo/src/lib/layer/layer-item/layer-item.component.scss b/packages/geo/src/lib/layer/layer-item/layer-item.component.scss index bcf3985821..f1a9427d04 100644 --- a/packages/geo/src/lib/layer/layer-item/layer-item.component.scss +++ b/packages/geo/src/lib/layer/layer-item/layer-item.component.scss @@ -34,6 +34,8 @@ .igo-layer-button-group { float: right; padding: 0 $igo-list-item-padding; + display: contents; /* ie11: display: ruby-base; */ + max-width: 100%; @include mobile { float: none; From af5058d0f175422d100782d3ddd55130ae2260e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Wed, 2 Oct 2019 09:00:52 -0400 Subject: [PATCH 07/18] fix(search-results-details): fix flexible state --- .../search-results-tool.component.html | 2 +- .../search-results-tool/search-results-tool.component.ts | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) 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 6cbb9834ae..0c575fa3fe 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 @@ -12,7 +12,7 @@

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

collapsedMobile="calc(100% - 58px)" expanded="60%" expandedMobile="60%" - [state]="topPanelState"> + [state]="(feature$ | async) ? topPanelState : 'initial'">
e.state.focused) .pipe( - map(element => { - this.feature = element ? (element.entity.data as Feature) : undefined; - !this.feature - ? (this.topPanelState = 'initial') - : (this.topPanelState = 'expanded'); - return this.feature; - }) + map(element => (element ? (element.entity.data as Feature) : undefined)) ); } From a85281cec4e1270f13454b2cc5a8b3d404f46216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Wed, 2 Oct 2019 14:49:08 -0400 Subject: [PATCH 08/18] feat(matomo): it's now possible to define the file names --- .../core/src/lib/analytics/shared/analytics.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/src/lib/analytics/shared/analytics.service.ts b/packages/core/src/lib/analytics/shared/analytics.service.ts index 791d0bebbd..b90a4cf8e8 100644 --- a/packages/core/src/lib/analytics/shared/analytics.service.ts +++ b/packages/core/src/lib/analytics/shared/analytics.service.ts @@ -22,20 +22,24 @@ export class AnalyticsService { if (!this.options.url || !this.options.id) { return; } + const url = + this.options.url.substr(-1) === '/' + ? this.options.url + 'matomo' + : this.options.url; (window as any)._paq = (window as any)._paq || []; const paq: any = (window as any)._paq; paq.push(['trackPageView']); paq.push(['enableLinkTracking']); (() => { - paq.push(['setTrackerUrl', this.options.url + 'matomo.php']); + paq.push(['setTrackerUrl', url + '.php']); paq.push(['setSiteId', this.options.id]); const g = document.createElement('script'); const s = document.getElementsByTagName('script')[0]; g.type = 'text/javascript'; g.async = true; g.defer = true; - g.src = this.options.url + 'matomo.js'; + g.src = url + '.js'; s.parentNode.insertBefore(g, s); })(); } From 58b89c223a49ad6483e9152913ecef95c3fc186e Mon Sep 17 00:00:00 2001 From: hugbe8 Date: Thu, 3 Oct 2019 14:18:26 -0400 Subject: [PATCH 09/18] fix(filter): collapse not available on the push button when the layer is not inResolutionRange (#449) --- .../lib/filter/ogc-filter-button/ogc-filter-button.component.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts index 717f4c4cd9..6fcd2d618f 100644 --- a/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-button/ogc-filter-button.component.ts @@ -32,8 +32,6 @@ export class OgcFilterButtonComponent { constructor() {} toggleOgcFilter() { - if (this.layer.isInResolutionsRange) { this.ogcFilterCollapse = !this.ogcFilterCollapse; - } } } From 981f9a1028e8fbb9553b465bdd2a3b97645d1496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Thu, 3 Oct 2019 16:26:16 -0400 Subject: [PATCH 10/18] fix(language) Get/set language is desynchronized(#453) * fix(language) Get/set language is desynchronized * --- .../core/src/lib/language/shared/language.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/core/src/lib/language/shared/language.service.ts b/packages/core/src/lib/language/shared/language.service.ts index 18f3d7da5d..b88f9df2f0 100644 --- a/packages/core/src/lib/language/shared/language.service.ts +++ b/packages/core/src/lib/language/shared/language.service.ts @@ -5,18 +5,20 @@ import { TranslateService } from '@ngx-translate/core'; providedIn: 'root' }) export class LanguageService { + private language: string = this.translate.getBrowserLang(); + constructor(public translate: TranslateService) { const lang = this.getLanguage(); this.translate.setDefaultLang(lang); } public getLanguage(): string { - const browserLang = this.translate.getBrowserLang(); - return browserLang.match(/en|fr/) ? browserLang : 'en'; + return this.language.match(/en|fr/) ? this.language : 'en'; } public setLanguage(language: string) { - this.translate.use(language); - this.translate.reloadLang(language); + this.language = language.match(/en|fr/) ? language : 'en'; + this.translate.use(this.language); + this.translate.reloadLang(this.language); } } From 95c50b8a9b134dca115ddc563127a077ec11ad42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Trottier?= Date: Thu, 3 Oct 2019 17:57:37 -0400 Subject: [PATCH 11/18] fix(demo.geo.query) features are queryable --- demo/src/app/geo/query/query.component.html | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/src/app/geo/query/query.component.html b/demo/src/app/geo/query/query.component.html index 3a16403e41..600c071706 100644 --- a/demo/src/app/geo/query/query.component.html +++ b/demo/src/app/geo/query/query.component.html @@ -14,6 +14,7 @@ [view]="view" igoOverlay igoQuery + [queryFeatures]="true" (query)="handleQueryResults($event)"> From 183ad4a4c25d4ea99054bf868be76198f2e83c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Trottier?= Date: Thu, 3 Oct 2019 17:44:48 -0400 Subject: [PATCH 12/18] feat(geo.import/export) add CSV to Export format --- packages/geo/src/lib/import-export/shared/export.service.ts | 3 ++- packages/geo/src/lib/import-export/shared/export.type.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/geo/src/lib/import-export/shared/export.service.ts b/packages/geo/src/lib/import-export/shared/export.service.ts index 4006205c80..4a8ecc5881 100644 --- a/packages/geo/src/lib/import-export/shared/export.service.ts +++ b/packages/geo/src/lib/import-export/shared/export.service.ts @@ -22,7 +22,8 @@ export class ExportService { GML: 'gml', GPX: 'gpx', KML: 'kml', - Shapefile: 'ESRI Shapefile' + Shapefile: 'ESRI Shapefile', + CSV: 'CSV' }; static noOgreFallbacks = ['GML', 'GPX', 'KML']; diff --git a/packages/geo/src/lib/import-export/shared/export.type.ts b/packages/geo/src/lib/import-export/shared/export.type.ts index 0748322c6d..78d07ec6da 100644 --- a/packages/geo/src/lib/import-export/shared/export.type.ts +++ b/packages/geo/src/lib/import-export/shared/export.type.ts @@ -1,4 +1,4 @@ import { strEnum } from '@igo2/utils'; -export const ExportFormat = strEnum(['GeoJSON', 'GML', 'GPX', 'KML', 'Shapefile']); +export const ExportFormat = strEnum(['GeoJSON', 'GML', 'GPX', 'KML', 'Shapefile', 'CSV']); export type ExportFormat = keyof typeof ExportFormat; From 66da71a3ff2253fe6f9ee596b58f3c7fa06b1f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Trottier?= Date: Thu, 3 Oct 2019 17:46:55 -0400 Subject: [PATCH 13/18] fix(integration.map.tool) add button when track a feature --- demo/src/app/geo/layer/layer.component.html | 1 + .../src/lib/map/map-details-tool/map-details-tool.component.html | 1 + .../integration/src/lib/map/map-tool/map-tool.component.html | 1 + 3 files changed, 3 insertions(+) diff --git a/demo/src/app/geo/layer/layer.component.html b/demo/src/app/geo/layer/layer.component.html index 5a66e26cac..dbfb31c76d 100644 --- a/demo/src/app/geo/layer/layer.component.html +++ b/demo/src/app/geo/layer/layer.component.html @@ -24,6 +24,7 @@ + diff --git a/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.html b/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.html index 132b85e180..339480fed3 100644 --- a/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.html +++ b/packages/integration/src/lib/map/map-details-tool/map-details-tool.component.html @@ -12,6 +12,7 @@ + diff --git a/packages/integration/src/lib/map/map-tool/map-tool.component.html b/packages/integration/src/lib/map/map-tool/map-tool.component.html index c493c84605..cc1bdb24e3 100644 --- a/packages/integration/src/lib/map/map-tool/map-tool.component.html +++ b/packages/integration/src/lib/map/map-tool/map-tool.component.html @@ -15,6 +15,7 @@ + From 2973ec561747fdabf4b96f135f920a3441340daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Fri, 4 Oct 2019 07:56:03 -0400 Subject: [PATCH 14/18] feat(directions): improve the directions tool (#452) * fix(direction)Now get the first coord of line/poly * fix(direction) handle search term subscription * refactor(routing) handling search result and title * refactor(direction) Coord rounded to 5 decimal * feat(direction) keep stop's title on component change. * fix(directions) Trigger and show route results on component change * refactor(direction) show coordinates as string * lint * typo * i18n(routing) Wrong language. * refactor(directions) keep stop's title on component change * refactor(directions) Stop interface --- .../routing-form-binding.directive.ts | 24 +-- .../routing-form/routing-form.component.ts | 171 ++++++++---------- .../routing-form/routing-form.service.ts | 19 +- .../lib/routing/shared/routing.interface.ts | 7 + packages/geo/src/locale/en.geo.json | 8 +- 5 files changed, 110 insertions(+), 119 deletions(-) diff --git a/packages/geo/src/lib/routing/routing-form/routing-form-binding.directive.ts b/packages/geo/src/lib/routing/routing-form/routing-form-binding.directive.ts index e83041d1b5..ea0398bdff 100644 --- a/packages/geo/src/lib/routing/routing-form/routing-form-binding.directive.ts +++ b/packages/geo/src/lib/routing/routing-form/routing-form-binding.directive.ts @@ -22,10 +22,9 @@ export class RoutingFormBindingDirective implements AfterViewInit { ) {} ngAfterViewInit(): void { - const storedStopsCoordinates = this.routingFormService.getStopsCoordinates(); + const storedStops = this.routingFormService.getStops(); if ( - !storedStopsCoordinates && - this.route && + !storedStops && this.route && this.route.options.routingCoordKey ) { this.route.queryParams.subscribe(params => { @@ -61,22 +60,17 @@ export class RoutingFormBindingDirective implements AfterViewInit { } } }); - } else if (storedStopsCoordinates) { - for (let i = 0; i < storedStopsCoordinates.length; i++) { - if (i !== 0 && i !== storedStopsCoordinates.length - 1) { + } else if (storedStops) { + for (let i = 0; i < storedStops.length; i++) { + if (i !== 0 && i !== storedStops.length - 1) { this.component.stops.insert(i, this.component.createStop()); } - if (storedStopsCoordinates[i] instanceof Array) { - this.component.addStopOverlay(storedStopsCoordinates[i], i); - this.component.stops - .at(i) - .patchValue({ stopCoordinates: storedStopsCoordinates[i] }); - this.component.stops - .at(i) - .patchValue({ stopPoint: storedStopsCoordinates[i] }); - this.component.handleLocationProposals(storedStopsCoordinates[i], i); + if (storedStops[i].stopCoordinates instanceof Array) { + this.component.addStopOverlay(storedStops[i].stopCoordinates, i); + this.component.stops.at(i).patchValue(storedStops[i] ); } } } + this.component.onFormChange(); } } diff --git a/packages/geo/src/lib/routing/routing-form/routing-form.component.ts b/packages/geo/src/lib/routing/routing-form/routing-form.component.ts index e76df32e4e..800710233d 100644 --- a/packages/geo/src/lib/routing/routing-form/routing-form.component.ts +++ b/packages/geo/src/lib/routing/routing-form/routing-form.component.ts @@ -58,6 +58,7 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { public projection = 'EPSG:4326'; public currentStopIndex: number; private routesQueries$$: Subscription[] = []; + private search$$: Subscription; private stream$ = new Subject(); @@ -65,6 +66,8 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { public RoutingOverlayStyle: olstyle.Style; public routingStopsOverlayDataSource: FeatureDataSource; public routingRoutesOverlayDataSource: FeatureDataSource; + private stopsLayer; + private routesLayer; public routesResults: Routing[] | Message[]; public activeRoute: Routing; @@ -77,40 +80,13 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { // https://stackoverflow.com/questions/46364852/create-input-fields-dynamically-in-angular-2 - @Input() - get term() { - return this._term; - } - set term(value: string) { - this._term = value; - } - private _term = ''; + @Input() term: string; - get debounce() { - return this._debounce; - } - set debounce(value: number) { - this._debounce = value; - } - private _debounce = 200; + @Input() debounce: number = 200; - @Input() - get length() { - return this._length; - } - set length(value: number) { - this._length = value; - } - private _length = 3; + @Input() length: number = 2; - @Input() - get map(): IgoMap { - return this._map; - } - set map(value: IgoMap) { - this._map = value; - } - private _map: IgoMap; + @Input() map: IgoMap; @Output() submit: EventEmitter = new EventEmitter(); @@ -138,14 +114,13 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { this.unsubscribeRoutesQueries(); this.unlistenSingleClick(); this.queryService.queryEnabled = true; - const stopCoordinates = []; - this.stops.value.forEach(stop => { - stopCoordinates.push(stop.stopCoordinates); - }); + this.writeStopsToFormService(); this.routingRoutesOverlayDataSource.ol.clear(); this.routingStopsOverlayDataSource.ol.clear(); - this.routingFormService.setStopsCoordinates(stopCoordinates); + this.map.removeLayer(this.stopsLayer); + this.map.removeLayer(this.routesLayer); + } ngOnInit() { @@ -168,14 +143,14 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { ngAfterViewInit(): void { this.queryService.queryEnabled = false; this.focusOnStop = false; - const stopsLayer = new VectorLayer({ + this.stopsLayer = new VectorLayer({ title: 'routingStopOverlay', zIndex: 999, id: 'routingStops', source: this.routingStopsOverlayDataSource, showInLayerList: false }); - const routesLayer = new VectorLayer({ + this.routesLayer = new VectorLayer({ title: 'routingRoutesOverlay', zIndex: 999, id: 'routingRoutes', @@ -184,31 +159,31 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { showInLayerList: false }); - this.map.addLayer(routesLayer); - this.map.addLayer(stopsLayer); + this.map.addLayer(this.routesLayer); + this.map.addLayer(this.stopsLayer); let selectedStopFeature; const selectStops = new olinteraction.Select({ - layers: [stopsLayer.ol], + layers: [this.stopsLayer.ol], condition: olcondition.pointerMove, hitTolerance: 7 }); const translateStop = new olinteraction.Translate({ - layers: [stopsLayer.ol], + layers: [this.stopsLayer.ol], features: selectedStopFeature }); // TODO: Check to disable pointermove IF a stop is already selected const selectRouteHover = new olinteraction.Select({ - layers: [routesLayer.ol], + layers: [this.routesLayer.ol], condition: olcondition.pointerMove, hitTolerance: 7 }); this.selectRoute = new olinteraction.Select({ - layers: [routesLayer.ol], + layers: [this.routesLayer.ol], hitTolerance: 7 }); @@ -235,7 +210,7 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { this.routesQueries$$.push( this.stopsForm.statusChanges - .pipe(debounceTime(this._debounce)) + .pipe(debounceTime(this.debounce)) .subscribe(val => this.onFormChange()) ); @@ -277,7 +252,7 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { this.routesQueries$$.push( this.stream$ .pipe( - debounceTime(this._debounce), + debounceTime(this.debounce), distinctUntilChanged() ) .subscribe((term: string) => this.handleTermChanged(term)) @@ -286,6 +261,8 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { handleLocationProposals(coordinates: [number, number], stopIndex: number) { const groupedLocations = []; + const roundedCoordinates = [coordinates[0].toFixed(5), coordinates[1].toFixed(5)]; + this.stops.at(stopIndex).patchValue({ stopPoint: roundedCoordinates.join(',') }); this.searchService .reverseSearch(coordinates, { zoom: this.map.getZoom() }) .map(res => @@ -328,9 +305,24 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { } else { // Not moving the translated point Only to suggest value into the UI. } + } else if (results[0].source.getId() === 'coordinatesreverse') { + this.stops.at(stopIndex).patchValue({ + stopPoint: [ + results[0].data.geometry.coordinates[0].toFixed(5), + results[0].data.geometry.coordinates[1].toFixed(5) + ].join(',') + }); + if (results[0].data.geometry.type === 'Point') { + this.stops.at(stopIndex).patchValue({ + stopCoordinates: + results[0].data.geometry.coordinates + }); + } else { + // Not moving the translated point Only to suggest value into the UI. + } } } else { - this.stops.at(stopIndex).patchValue({ stopPoint: coordinates }); + this.stops.at(stopIndex).patchValue({ stopPoint: roundedCoordinates.join(',') }); this.stops.at(stopIndex).patchValue({ stopProposals: [] }); } this.changeDetectorRefs.detectChanges(); @@ -384,15 +376,14 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { return this.stopsForm.get('stops') as FormArray; } - getStopsCoordinates(): [number, number][] { - const stopCoordinates = []; + private writeStopsToFormService() { + const stops = []; this.stops.value.forEach(stop => { if (stop.stopCoordinates instanceof Array) { - stopCoordinates.push(stop.stopCoordinates); + stops.push(stop); } }); - this.routingFormService.setStopsCoordinates(stopCoordinates); - return stopCoordinates; + this.routingFormService.setStops(stops); } addStop(): void { @@ -439,7 +430,8 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { onFormChange() { if (this.stopsForm.valid) { this.routingRoutesOverlayDataSource.ol.clear(); - const coords = this.getStopsCoordinates(); + this.writeStopsToFormService(); + const coords = this.routingFormService.getStopsCoordinates(); if (coords.length >= 2) { this.getRoutes(coords); } else { @@ -923,30 +915,32 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { private handleTermChanged(term: string) { if (term !== undefined || term.length !== 0) { const searchProposals = []; + if (this.search$$) { + this.search$$.unsubscribe(); + } const researches = this.searchService.search(term, {searchType: 'Feature'}); researches.map(res => - this.routesQueries$$.push( - res.request.subscribe(results => { - results - .filter(r => r.data.geometry) - .forEach(element => { - if ( - searchProposals.filter(r => r.source === element.source) - .length === 0 - ) { - searchProposals.push({ - source: element.source, - meta: element.meta, - results: results.map(r => r.data) - }); - } - }); - this.stops - .at(this.currentStopIndex) - .patchValue({ stopProposals: searchProposals }); - this.changeDetectorRefs.detectChanges(); - }) - ) + this.search$$ = + res.request.subscribe(results => { + results + .filter(r => r.data.geometry) + .forEach(element => { + if ( + searchProposals.filter(r => r.source === element.source) + .length === 0 + ) { + searchProposals.push({ + source: element.source, + meta: element.meta, + results: results.map(r => r.data) + }); + } + }); + this.stops + .at(this.currentStopIndex) + .patchValue({ stopProposals: searchProposals }); + this.changeDetectorRefs.detectChanges(); + }) ); } } @@ -988,28 +982,13 @@ export class RoutingFormComponent implements OnInit, AfterViewInit, OnDestroy { if (geom.type === 'Point') { geomCoord = geom.coordinates; } else if (geom.type.search('Line') >= 0) { - let coordArray = []; - if (geom.coordinates instanceof Array) { - // Middle segment of multilinestring - coordArray = - geom.coordinates[Math.floor(geom.coordinates.length / 2)]; - } else { - coordArray = geom.coordinates; - } - // middle point of coords - geomCoord = coordArray[Math.floor(coordArray.length / 2)]; - } else if (geom.type.search('Polygon') >= 0 && proposal.extent) { - const polygonExtent = proposal.extent; - const long = - polygonExtent[0] + (polygonExtent[2] - polygonExtent[0]) / 2; - const lat = - polygonExtent[1] + (polygonExtent[3] - polygonExtent[1]) / 2; - geomCoord = [long, lat]; - } else if (geom.type.search('Polygon') >= 0 && !proposal.extent) { + const line = (new OlGeoJSON()).readFeatures(geom); + geomCoord = line[0].getGeometry().getFirstCoordinate(); + geomCoord = [geomCoord[0], geomCoord[1]]; + } else if (geom.type.search('Polygon') >= 0) { const poly = (new OlGeoJSON()).readFeatures(geom); - // get the first feature of a multipolygon OR from the single feature of polygon. - geomCoord = poly[0].getGeometry().getInteriorPoints().getCoordinates() || poly.getGeometry().getInteriorPoints().getCoordinates(); - geomCoord = [geomCoord[0][0], geomCoord[0][1]]; + geomCoord = poly[0].getGeometry().getInteriorPoints().getCoordinates(); + geomCoord = [geomCoord[0], geomCoord[1]]; } if (geomCoord !== undefined) { diff --git a/packages/geo/src/lib/routing/routing-form/routing-form.service.ts b/packages/geo/src/lib/routing/routing-form/routing-form.service.ts index a9c229cfd9..f8bece6bd2 100644 --- a/packages/geo/src/lib/routing/routing-form/routing-form.service.ts +++ b/packages/geo/src/lib/routing/routing-form/routing-form.service.ts @@ -1,17 +1,28 @@ import { Injectable } from '@angular/core'; +import { Stop } from '../shared/routing.interface'; @Injectable() export class RoutingFormService { - private stopsCoordinates: [number, number][]; + private stops: Stop[]; constructor() {} getStopsCoordinates(): [number, number][] { - return this.stopsCoordinates; + const stopsCoordinates = []; + if (this.stops) { + this.stops.forEach(stop => { + stopsCoordinates.push(stop.stopCoordinates); + }); + } + return stopsCoordinates; } - setStopsCoordinates(stopsCoordinates) { - this.stopsCoordinates = stopsCoordinates; + setStops(stops: Stop[]) { + this.stops = stops; + } + + getStops() { + return this.stops; } } diff --git a/packages/geo/src/lib/routing/shared/routing.interface.ts b/packages/geo/src/lib/routing/shared/routing.interface.ts index 22c4873b5e..6298424847 100644 --- a/packages/geo/src/lib/routing/shared/routing.interface.ts +++ b/packages/geo/src/lib/routing/shared/routing.interface.ts @@ -1,6 +1,13 @@ import { GeoJsonGeometryTypes } from 'geojson'; import { RoutingFormat, SourceRoutingType } from './routing.enum'; +export interface Stop { + stopPoint?: string; + stopProposals?: []; + routingText?: string; + stopCoordinates?: [number, number]; +} + export interface Routing { id: string; source: string; diff --git a/packages/geo/src/locale/en.geo.json b/packages/geo/src/locale/en.geo.json index b954754bae..57edcb07b0 100644 --- a/packages/geo/src/locale/en.geo.json +++ b/packages/geo/src/locale/en.geo.json @@ -194,11 +194,11 @@ } }, "routing": { - "uturn": "demi-tour", - "sharp right": "fortement à droite", + "uturn": "u-turn", + "sharp right": "sharp right", "right": "right", "slight right": "slightly on right", - "sharp left": "fortement à gauche", + "sharp left": "sharp left", "left": "left", "slight left": "slightly on left", "straight": "forward" @@ -207,7 +207,7 @@ "n": "north", "ne": "northeast", "e": "east", - "se": "Southeast", + "se": "southeast", "s": "south", "sw": "southwest", "w": "west", From a6c698a809d723b890bb2c9aa6f3d8c245467612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Fri, 4 Oct 2019 07:56:41 -0400 Subject: [PATCH 15/18] lint(icherche): missing semicolon --- .../geo/src/lib/search/shared/sources/icherche.interfaces.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts b/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts index 7ac43141ba..ddb2870adc 100644 --- a/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts +++ b/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts @@ -5,7 +5,7 @@ export interface IChercheData { geometry: FeatureGeometry; bbox: [number, number, number, number]; properties: { [key: string]: any }; - icon?: string + icon?: string; highlight: { title: string; title2?: string; @@ -20,7 +20,7 @@ export interface IChercheResponse { export interface IChercheReverseData { geometry: FeatureGeometry; bbox: [number, number, number, number]; - icon?: string + icon?: string; properties: { [key: string]: any }; } From eee16b8f655a35f6c394ac9be04990bfdc85a980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Fri, 4 Oct 2019 08:02:16 -0400 Subject: [PATCH 16/18] fix(catalog): Keep catalog's sort for added layers (#448) * fix(catalog)Keep catalog's sort for added layers * typo * typo --- .../catalog-browser.component.ts | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser.component.ts b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser.component.ts index c033043511..d8c319bf6d 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser.component.ts +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser.component.ts @@ -175,20 +175,50 @@ export class CatalogBrowserComponent implements OnInit, OnDestroy { }); } + /** + * Sort the layers by title. asc or desc. + * @internal + */ + private sortCatalogItemsByTitle(items: CatalogItem[], direction) { + const returnItem = items.sort((a, b) => { + const titleA = a.title.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + const titleB = b.title.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + + if (titleA < titleB) { + return -1; + } + if (titleA > titleB) { + return 1; + } + return 0; + }); + switch (direction) { + case 'asc': + return returnItem; + case 'desc': + return returnItem.reverse(); + default: + return items; + } + } + /** * Add all the layers of a group to map * @param group Catalog group */ private addGroupToMap(group: CatalogItemGroup) { - const layers = group.items.filter((item: CatalogItem) => { + let layers = group.items.filter((item: CatalogItem) => { const added = this.store.state.get(item).added || false; return this.isLayer(item) && added === false; }); + if (this.catalog && this.catalog.sortDirection !== undefined) { + layers = this.sortCatalogItemsByTitle(layers, this.catalog.sortDirection); + } this.addLayersToMap(layers.reverse() as CatalogItemLayer[]); } /** - * Remove all the layers of a groufrom map + * Remove all the layers of a group from map * @param group Catalog group */ private removeGroupFromMap(group: CatalogItemGroup) { From 83e0cb4ff6fdf322102f758717127f688dee73f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Fri, 4 Oct 2019 10:58:57 -0400 Subject: [PATCH 17/18] fix(search-results-tool): fix feature missing --- .../search-results-tool/search-results-tool.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts index 6e94e2ebbd..4138c5b2d3 100644 --- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts +++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.ts @@ -69,7 +69,12 @@ export class SearchResultsToolComponent { return this.store.stateView .firstBy$(e => e.state.focused) .pipe( - map(element => (element ? (element.entity.data as Feature) : undefined)) + map( + element => + (this.feature = element + ? (element.entity.data as Feature) + : undefined) + ) ); } From 2f8f274146b0fff4cc82d09f598bff838c6caaab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Barbeau?= Date: Fri, 4 Oct 2019 13:18:25 -0400 Subject: [PATCH 18/18] feat(auth): show message if password is expired --- package.json | 2 +- .../lib/auth-form/auth-intern.component.html | 4 ++-- .../lib/auth-form/auth-intern.component.ts | 20 +++++++++++++++++-- .../auth/src/lib/shared/auth.interface.ts | 1 + packages/auth/src/lib/shared/auth.service.ts | 16 ++++++++++++--- packages/auth/src/locale/en.auth.json | 8 +++++++- packages/auth/src/locale/fr.auth.json | 8 +++++++- .../core/src/style/themes/blue.theme.scss | 2 +- 8 files changed, 50 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ad4f9a1eaa..4ada173ad3 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "_watch.core": "wait-on dist/utils/package.json && ng build core --watch", "_watch.common": "wait-on dist/core/package.json && ng build common --watch", "_watch.auth": "wait-on dist/common/package.json && ng build auth --watch", - "_watch.geo": "wait-on dist/common/package.json && ng build geo --watch", + "_watch.geo": "wait-on dist/auth/package.json && ng build geo --watch", "_watch.context": "wait-on dist/geo/package.json && ng build context --watch", "_watch.integration": "wait-on dist/context/package.json && ng build integration --watch", "_watch.gulp": "wait-on dist/integration/package.json && gulp core && gulp common && gulp auth && gulp geo && gulp context && gulp integration && gulp core:bundleLocale", diff --git a/packages/auth/src/lib/auth-form/auth-intern.component.html b/packages/auth/src/lib/auth-form/auth-intern.component.html index 16d0460aaa..9c205be337 100644 --- a/packages/auth/src/lib/auth-form/auth-intern.component.html +++ b/packages/auth/src/lib/auth-form/auth-intern.component.html @@ -11,8 +11,8 @@
- - + +

{{error}} diff --git a/packages/auth/src/lib/auth-form/auth-intern.component.ts b/packages/auth/src/lib/auth-form/auth-intern.component.ts index ecdb0f55f2..4525c8b094 100644 --- a/packages/auth/src/lib/auth-form/auth-intern.component.ts +++ b/packages/auth/src/lib/auth-form/auth-intern.component.ts @@ -6,7 +6,9 @@ import { EventEmitter } from '@angular/core'; import { Validators, FormGroup, FormBuilder } from '@angular/forms'; + import { AuthService } from '../shared/auth.service'; +import { LanguageService } from '@igo2/core'; @Component({ selector: 'igo-auth-intern', @@ -26,10 +28,15 @@ export class AuthInternComponent { public error = ''; public form: FormGroup; + public loading = false; @Output() login: EventEmitter = new EventEmitter(); - constructor(public auth: AuthService, fb: FormBuilder) { + constructor( + public auth: AuthService, + private languageService: LanguageService, + fb: FormBuilder + ) { this.form = fb.group({ username: ['', Validators.required], password: ['', Validators.required] @@ -37,12 +44,21 @@ export class AuthInternComponent { } loginUser(values: any) { + this.loading = true; this.auth.login(values.username, values.password).subscribe( () => { this.login.emit(true); + this.loading = false; }, (error: any) => { - this.error = error.error.message; + try { + this.languageService.translate + .get('igo.auth.error.' + error.error.message) + .subscribe(errorMsg => (this.error = errorMsg)); + } catch (e) { + this.error = error.error.message; + } + this.loading = false; } ); return false; diff --git a/packages/auth/src/lib/shared/auth.interface.ts b/packages/auth/src/lib/shared/auth.interface.ts index c99e09fec4..91f4b19993 100644 --- a/packages/auth/src/lib/shared/auth.interface.ts +++ b/packages/auth/src/lib/shared/auth.interface.ts @@ -34,6 +34,7 @@ export interface User { firstName?: string; lastName?: string; locale?: string; + isExpired?: boolean; admin?: boolean; defaultContextId?: string; } diff --git a/packages/auth/src/lib/shared/auth.service.ts b/packages/auth/src/lib/shared/auth.service.ts index 5a88d61139..31be2e65a7 100644 --- a/packages/auth/src/lib/shared/auth.service.ts +++ b/packages/auth/src/lib/shared/auth.service.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { Observable, BehaviorSubject, of } from 'rxjs'; import { tap, catchError } from 'rxjs/operators'; -import { ConfigService, LanguageService } from '@igo2/core'; +import { ConfigService, LanguageService, MessageService } from '@igo2/core'; import { Base64 } from '@igo2/utils'; import { AuthOptions, User } from './auth.interface'; @@ -25,6 +25,7 @@ export class AuthService { private tokenService: TokenService, private config: ConfigService, private languageService: LanguageService, + private messageService: MessageService, @Optional() private router: Router ) { this.options = this.config.getConfig('auth') || {}; @@ -132,8 +133,17 @@ export class AuthService { tap((data: any) => { this.tokenService.set(data.token); const tokenDecoded = this.decodeToken(); - if (tokenDecoded && tokenDecoded.user && tokenDecoded.user.locale) { - this.languageService.setLanguage(tokenDecoded.user.locale); + if (tokenDecoded && tokenDecoded.user) { + if (tokenDecoded.user.locale) { + this.languageService.setLanguage(tokenDecoded.user.locale); + } + if (tokenDecoded.user.isExpired) { + this.languageService.translate + .get('igo.auth.error.Password expired') + .subscribe(expiredAlert => + this.messageService.alert(expiredAlert) + ); + } } this.authenticate$.next(true); }), diff --git a/packages/auth/src/locale/en.auth.json b/packages/auth/src/locale/en.auth.json index fc25d5f800..6637bd6d3d 100644 --- a/packages/auth/src/locale/en.auth.json +++ b/packages/auth/src/locale/en.auth.json @@ -9,7 +9,13 @@ "user": "User", "welcome": "Welcome {{name}}!", "deconnection": "You are logged out.", - "home": "Return to the home page" + "home": "Return to the home page", + "error": { + "Password expired": "Password expired", + "Maximun logins exceeded": "Maximun logins exceeded", + "Wrong password": "Wrong password", + "Invalid username": "Invalid username" + } } } } diff --git a/packages/auth/src/locale/fr.auth.json b/packages/auth/src/locale/fr.auth.json index 146f0e6989..4d9ad89dbb 100644 --- a/packages/auth/src/locale/fr.auth.json +++ b/packages/auth/src/locale/fr.auth.json @@ -9,7 +9,13 @@ "user": "Utilisateur", "welcome": "Bienvenue {{name}}!", "deconnection": "Vous êtes déconnecté", - "home": "Retourner à la page d'accueil" + "home": "Retourner à la page d'accueil", + "error": { + "Password expired": "Votre mot de passe est expiré", + "Maximun logins exceeded": "Nombre maximal de connexions dépassé", + "Wrong password": "Mot de passe incorrect", + "Invalid username": "Utilisateur invalide" + } } } } diff --git a/packages/core/src/style/themes/blue.theme.scss b/packages/core/src/style/themes/blue.theme.scss index 14bb26e04f..d14c9a94f3 100644 --- a/packages/core/src/style/themes/blue.theme.scss +++ b/packages/core/src/style/themes/blue.theme.scss @@ -1,4 +1,4 @@ -$primary: mat-palette($mat-blue, 700); +$primary: mat-palette($mat-blue, 700, 400, 900); $accent: mat-palette($mat-blue, 200); $warn: mat-palette($mat-red);