@igo2/core 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/__ivy_ngcc__/locale/en.common.json +43 -43
  2. package/__ivy_ngcc__/locale/en.core.json +29 -23
  3. package/__ivy_ngcc__/locale/en.geo.json +74 -26
  4. package/__ivy_ngcc__/locale/en.integration.json +12 -4
  5. package/__ivy_ngcc__/locale/en.json +91 -30
  6. package/__ivy_ngcc__/locale/fr.common.json +43 -43
  7. package/__ivy_ngcc__/locale/fr.core.json +29 -23
  8. package/__ivy_ngcc__/locale/fr.geo.json +75 -27
  9. package/__ivy_ngcc__/locale/fr.integration.json +11 -3
  10. package/__ivy_ngcc__/locale/fr.json +91 -30
  11. package/assets/icons/mdi.svg +1 -1
  12. package/bundles/igo2-core.umd.js +125 -149
  13. package/bundles/igo2-core.umd.js.map +1 -1
  14. package/esm2015/lib/activity/activity.interceptor.js +1 -1
  15. package/esm2015/lib/activity/activity.module.js +1 -1
  16. package/esm2015/lib/activity/activity.service.js +1 -1
  17. package/esm2015/lib/activity/index.js +1 -1
  18. package/esm2015/lib/analytics/index.js +1 -1
  19. package/esm2015/lib/analytics/shared/analytics.interface.js +1 -1
  20. package/esm2015/lib/analytics/shared/analytics.service.js +1 -1
  21. package/esm2015/lib/analytics/shared/index.js +1 -1
  22. package/esm2015/lib/config/config.interface.js +1 -1
  23. package/esm2015/lib/config/config.module.js +1 -1
  24. package/esm2015/lib/config/config.provider.js +1 -1
  25. package/esm2015/lib/config/config.service.js +1 -1
  26. package/esm2015/lib/config/index.js +1 -1
  27. package/esm2015/lib/config/version.js +3 -3
  28. package/esm2015/lib/core.module.js +1 -1
  29. package/esm2015/lib/gesture/gesture.module.js +1 -1
  30. package/esm2015/lib/gesture/gesture.provider.js +1 -1
  31. package/esm2015/lib/language/index.js +1 -1
  32. package/esm2015/lib/language/language.module.js +1 -1
  33. package/esm2015/lib/language/shared/index.js +1 -1
  34. package/esm2015/lib/language/shared/language.interface.js +1 -1
  35. package/esm2015/lib/language/shared/language.loader.js +1 -1
  36. package/esm2015/lib/language/shared/language.provider.js +1 -1
  37. package/esm2015/lib/language/shared/language.service.js +1 -1
  38. package/esm2015/lib/language/shared/missing-translation.guard.js +2 -2
  39. package/esm2015/lib/media/index.js +1 -1
  40. package/esm2015/lib/media/media.enum.js +1 -1
  41. package/esm2015/lib/message/index.js +1 -2
  42. package/esm2015/lib/message/message.module.js +38 -9
  43. package/esm2015/lib/message/shared/index.js +1 -1
  44. package/esm2015/lib/message/shared/message.enum.js +3 -2
  45. package/esm2015/lib/message/shared/message.interface.js +1 -1
  46. package/esm2015/lib/message/shared/message.service.js +48 -71
  47. package/esm2015/lib/network/index.js +1 -1
  48. package/esm2015/lib/network/network.interfaces.js +1 -1
  49. package/esm2015/lib/network/network.service.js +1 -1
  50. package/esm2015/lib/request/error.interceptor.js +1 -1
  51. package/esm2015/lib/request/error.module.js +1 -1
  52. package/esm2015/lib/request/index.js +1 -1
  53. package/esm2015/lib/request/logging.interceptor.js +2 -2
  54. package/esm2015/lib/request/logging.module.js +1 -1
  55. package/esm2015/lib/route/route.interface.js +1 -1
  56. package/esm2015/lib/route/route.service.js +20 -4
  57. package/esm2015/lib/storage/index.js +1 -1
  58. package/esm2015/public_api.js +1 -1
  59. package/fesm2015/igo2-core.js +116 -133
  60. package/fesm2015/igo2-core.js.map +1 -1
  61. package/lib/message/index.d.ts +0 -1
  62. package/lib/message/message.module.d.ts +3 -4
  63. package/lib/message/shared/index.d.ts +1 -1
  64. package/lib/message/shared/message.enum.d.ts +2 -1
  65. package/lib/message/shared/message.interface.d.ts +4 -4
  66. package/lib/message/shared/message.service.d.ts +12 -11
  67. package/lib/route/route.interface.d.ts +1 -0
  68. package/lib/route/route.service.d.ts +4 -3
  69. package/locale/en.common.json +43 -43
  70. package/locale/en.core.json +29 -23
  71. package/locale/en.geo.json +74 -26
  72. package/locale/en.integration.json +12 -4
  73. package/locale/en.json +91 -30
  74. package/locale/fr.common.json +43 -43
  75. package/locale/fr.core.json +29 -23
  76. package/locale/fr.geo.json +75 -27
  77. package/locale/fr.integration.json +11 -3
  78. package/locale/fr.json +91 -30
  79. package/package.json +8 -7
  80. package/style/core.theming.scss +3 -1
  81. package/style/index.theming.scss +291 -71
  82. package/style/material.font.scss +9 -9
  83. package/style/partial/core.variables.scss +5 -3
  84. package/style/partial/media.scss +80 -80
  85. package/esm2015/lib/message/message-center/index.js +0 -2
  86. package/esm2015/lib/message/message-center/message-center.component.js +0 -43
  87. package/lib/message/message-center/index.d.ts +0 -1
  88. package/lib/message/message-center/message-center.component.d.ts +0 -19
@@ -1,6 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, NgModule, InjectionToken, APP_INITIALIZER, Component, Input, Optional, SkipSelf, Inject, EventEmitter } from '@angular/core';
3
- import * as i2 from '@angular/common';
2
+ import { Injectable, NgModule, InjectionToken, APP_INITIALIZER, Optional, SkipSelf, Inject, EventEmitter } from '@angular/core';
4
3
  import { CommonModule } from '@angular/common';
5
4
  import { HTTP_INTERCEPTORS, HttpClient, HttpErrorResponse, HttpClientModule, HttpResponse } from '@angular/common/http';
6
5
  import { finalize, catchError, map, tap, debounceTime, startWith } from 'rxjs/operators';
@@ -8,13 +7,13 @@ import { BehaviorSubject, throwError, of, combineLatest, fromEvent } from 'rxjs'
8
7
  import { uuid, ObjectUtils } from '@igo2/utils';
9
8
  import * as i1 from '@ngx-translate/core';
10
9
  import { TranslateLoader, TranslateModule, MissingTranslationHandler } from '@ngx-translate/core';
11
- import * as i1$1 from '@igo2/angular2-notifications';
12
- import { SimpleNotificationsModule } from '@igo2/angular2-notifications';
13
- import * as i1$2 from '@angular/material/icon';
10
+ import * as i2 from 'ngx-toastr';
11
+ import { ToastrModule } from 'ngx-toastr';
12
+ import * as i1$1 from '@angular/material/icon';
14
13
  import * as i2$1 from '@angular/platform-browser';
15
14
  import { HammerGestureConfig, HAMMER_GESTURE_CONFIG, HammerModule } from '@angular/platform-browser';
16
- import * as i1$3 from '@angular/router';
17
- import * as i1$4 from '@angular/cdk/layout';
15
+ import * as i1$2 from '@angular/router';
16
+ import * as i1$3 from '@angular/cdk/layout';
18
17
  import { Breakpoints } from '@angular/cdk/layout';
19
18
 
20
19
  class ActivityService {
@@ -99,8 +98,8 @@ IgoActivityModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[]] })
99
98
  }], null, null); })();
100
99
 
101
100
  const version = {
102
- lib: '1.9.0',
103
- releaseDate: 1632149524409
101
+ lib: '1.10.0',
102
+ releaseDate: 1639407270981
104
103
  };
105
104
 
106
105
  class ConfigService {
@@ -233,7 +232,7 @@ function provideDefaultLanguageLoader(loader) {
233
232
  class IgoMissingTranslationHandler {
234
233
  handle(params) {
235
234
  if (!params.translateService.langs.length) {
236
- const error = 'Translations are not yet loaded. \
235
+ const error = 'Translations are not yet loaded. \
237
236
  Check that the LanguageService is injected.';
238
237
  throw new Error(error);
239
238
  }
@@ -281,45 +280,6 @@ IgoLanguageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
281
280
  }], null, null); })();
282
281
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1.TranslateModule], exports: [TranslateModule] }); })();
283
282
 
284
- const _c0 = function (a0) { return { closeIcon: a0 }; };
285
- class MessageCenterComponent {
286
- constructor() {
287
- this._options = {};
288
- }
289
- get options() {
290
- return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
291
- }
292
- set options(value) {
293
- this._options = value;
294
- }
295
- }
296
- MessageCenterComponent.defaultOptions = {
297
- timeOut: 5000,
298
- hasCloseIcon: false,
299
- showProgressBar: true,
300
- pauseOnHover: true,
301
- clickToClose: true,
302
- maxLength: 100,
303
- maxStack: 3,
304
- preventDuplicates: true
305
- };
306
- MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
307
- MessageCenterComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MessageCenterComponent, selectors: [["igo-message-center"]], inputs: { options: "options" }, decls: 1, vars: 4, consts: [[1, "mat-typography", 3, "ngClass", "options"]], template: function MessageCenterComponent_Template(rf, ctx) { if (rf & 1) {
308
- i0.ɵɵelement(0, "simple-notifications", 0);
309
- } if (rf & 2) {
310
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
311
- } }, directives: [i1$1.SimpleNotificationsComponent, i2.NgClass], styles: ["[_nghost-%COMP%] div.simple-notification-wrapper{bottom:0;right:calc(50% - 150px)}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){[_nghost-%COMP%] div.simple-notification-wrapper{right:0;left:0;width:100%}}[_nghost-%COMP%] .closeIcon .sn-title:after{content:\"close\";font-family:\"Material Icons\";font-feature-settings:\"liga\" 1;font-size:24px;font-weight:normal;right:5px;top:5px;position:absolute}[_nghost-%COMP%] .simple-notification .icon{top:0;left:0;width:45px;height:45px;height:100%;padding:7px}[_nghost-%COMP%] .simple-notification .icon mat-icon{display:flex;align-items:center;height:100%;font-size:32px}[_nghost-%COMP%] div.simple-notification{min-height:50px;margin-bottom:5px;padding-left:45px;padding-right:25px}[_nghost-%COMP%] div.simple-notification.noIcon{padding-left:25px}@media only screen and (orientation:portrait) and (max-width: 599px),only screen and (orientation:landscape) and (max-width: 959px){[_nghost-%COMP%] div.simple-notification{margin-bottom:0}}[_nghost-%COMP%] div.simple-notification .sn-title{line-height:23px;font-size:15px;font-weight:bold}[_nghost-%COMP%] div.simple-notification .sn-content{line-height:18px;font-size:15px}"] });
312
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageCenterComponent, [{
313
- type: Component,
314
- args: [{
315
- selector: 'igo-message-center',
316
- templateUrl: './message-center.component.html',
317
- styleUrls: ['./message-center.component.scss']
318
- }]
319
- }], function () { return []; }, { options: [{
320
- type: Input
321
- }] }); })();
322
-
323
283
  class IgoMessageModule {
324
284
  static forRoot() {
325
285
  return {
@@ -330,16 +290,46 @@ class IgoMessageModule {
330
290
  }
331
291
  IgoMessageModule.ɵfac = function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); };
332
292
  IgoMessageModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: IgoMessageModule });
333
- IgoMessageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[CommonModule, SimpleNotificationsModule.forRoot()]] });
293
+ IgoMessageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[CommonModule,
294
+ ToastrModule.forRoot({
295
+ positionClass: 'toast-bottom-right',
296
+ timeOut: 10000,
297
+ extendedTimeOut: 10000,
298
+ messageClass: 'toast-message mat-typography',
299
+ closeButton: true,
300
+ progressBar: true,
301
+ enableHtml: true,
302
+ tapToDismiss: true,
303
+ maxOpened: 4,
304
+ preventDuplicates: true,
305
+ resetTimeoutOnDuplicate: true,
306
+ countDuplicates: true,
307
+ includeTitleDuplicates: true
308
+ })]] });
334
309
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IgoMessageModule, [{
335
310
  type: NgModule,
336
311
  args: [{
337
- imports: [CommonModule, SimpleNotificationsModule.forRoot()],
338
- declarations: [MessageCenterComponent],
339
- exports: [MessageCenterComponent]
312
+ imports: [CommonModule,
313
+ ToastrModule.forRoot({
314
+ positionClass: 'toast-bottom-right',
315
+ timeOut: 10000,
316
+ extendedTimeOut: 10000,
317
+ messageClass: 'toast-message mat-typography',
318
+ closeButton: true,
319
+ progressBar: true,
320
+ enableHtml: true,
321
+ tapToDismiss: true,
322
+ maxOpened: 4,
323
+ preventDuplicates: true,
324
+ resetTimeoutOnDuplicate: true,
325
+ countDuplicates: true,
326
+ includeTitleDuplicates: true
327
+ })],
328
+ declarations: [],
329
+ exports: []
340
330
  }]
341
331
  }], null, null); })();
342
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [CommonModule, i1$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
332
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoMessageModule, { imports: [CommonModule, i2.ToastrModule] }); })();
343
333
 
344
334
  class LanguageService {
345
335
  constructor(translate) {
@@ -369,15 +359,17 @@ LanguageService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: Language
369
359
  var MessageType;
370
360
  (function (MessageType) {
371
361
  MessageType["ERROR"] = "error";
372
- MessageType["ALERT"] = "alert";
362
+ MessageType["ALERT"] = "warning";
363
+ MessageType["WARNING"] = "warning";
373
364
  MessageType["INFO"] = "info";
374
365
  MessageType["SUCCESS"] = "success";
375
366
  })(MessageType || (MessageType = {}));
376
367
 
377
368
  class MessageService {
378
- constructor(notificationService, configService) {
379
- this.notificationService = notificationService;
369
+ constructor(configService, toastr, languageService) {
380
370
  this.configService = configService;
371
+ this.toastr = toastr;
372
+ this.languageService = languageService;
381
373
  this.messages$ = new BehaviorSubject([]);
382
374
  this.options = this.configService.getConfig('message') || {};
383
375
  }
@@ -399,83 +391,60 @@ class MessageService {
399
391
  }
400
392
  if (currentDate > message.options.from && currentDate < message.options.to) {
401
393
  message = this.handleTemplate(message);
402
- let notification;
403
394
  if (message.text) {
404
- notification = this.notificationService.create(message.title, message.text, message.type, message.options);
405
- }
406
- else if (message.html) {
407
- if (!message.icon) {
408
- message.options.theClass = message.options.theClass
409
- ? message.options.theClass + ' noIcon'
410
- : 'noIcon';
395
+ let messageShown;
396
+ switch (message.type) {
397
+ case MessageType.SUCCESS:
398
+ messageShown = this.success(message.text, message.title, message.options);
399
+ break;
400
+ case MessageType.ERROR:
401
+ messageShown = this.error(message.text, message.title, message.options);
402
+ break;
403
+ case MessageType.INFO:
404
+ messageShown = this.info(message.text, message.title, message.options);
405
+ break;
406
+ case MessageType.ALERT:
407
+ case MessageType.WARNING:
408
+ messageShown = this.alert(message.text, message.title, message.options);
409
+ break;
410
+ default:
411
+ messageShown = this.info(message.text, message.title, message.options);
412
+ break;
411
413
  }
412
- notification = this.notificationService.html(message.html, message.type, message.options);
414
+ message.options.id = messageShown.toastId;
413
415
  }
414
- else {
415
- return;
416
- }
417
- if (message.icon !== undefined) {
418
- this.addIcon(notification, message.icon);
419
- }
420
- message.options.id = notification.id;
421
- return notification;
422
416
  }
423
- return;
424
- }
425
- success(text, title, options = {}) {
426
- return this.message({
427
- text,
428
- title,
429
- icon: options.icon || 'check',
430
- options,
431
- type: MessageType.SUCCESS
432
- });
433
417
  }
434
- error(text, title, options = {}) {
435
- return this.message({
436
- text,
437
- title,
438
- icon: options.icon || 'error_outline',
439
- options,
440
- type: MessageType.ERROR
441
- });
418
+ success(text, title = 'igo.core.message.success', options = {}) {
419
+ const message = this.languageService.translate.instant(text);
420
+ const translatedTitle = this.languageService.translate.instant(title);
421
+ return this.toastr.success(message, translatedTitle, options);
442
422
  }
443
- info(text, title, options = {}) {
444
- return this.message({
445
- text,
446
- title,
447
- icon: options.icon || 'info_outline',
448
- options,
449
- type: MessageType.INFO
450
- });
423
+ error(text, title = 'igo.core.message.error', options = {}) {
424
+ const message = this.languageService.translate.instant(text);
425
+ const translatedTitle = this.languageService.translate.instant(title);
426
+ return this.toastr.error(message, translatedTitle, options);
451
427
  }
452
- alert(text, title, options = {}) {
453
- return this.message({
454
- text,
455
- title,
456
- icon: options.icon || 'access_alarm',
457
- options,
458
- type: MessageType.ALERT
459
- });
428
+ info(text, title = 'igo.core.message.info', options = {}) {
429
+ const message = this.languageService.translate.instant(text);
430
+ const translatedTitle = this.languageService.translate.instant(title);
431
+ return this.toastr.info(message, translatedTitle, options);
432
+ }
433
+ alert(text, title = 'igo.core.message.alert', options = {}) {
434
+ const message = this.languageService.translate.instant(text);
435
+ const translatedTitle = this.languageService.translate.instant(title);
436
+ return this.toastr.warning(message, translatedTitle, options);
460
437
  }
461
438
  remove(id) {
462
- this.notificationService.remove(id);
439
+ this.toastr.remove(id);
463
440
  }
464
441
  removeAllAreNotError() {
465
442
  for (const mess of this.messages$.value) {
466
- if (mess.type !== 'error') {
443
+ if (mess.type !== MessageType.ERROR) {
467
444
  this.remove(mess.options.id);
468
445
  }
469
446
  }
470
447
  }
471
- addIcon(notification, icon) {
472
- // There is no way to add an icon to a notification when reating
473
- // it so we simply set it on the notification directly.
474
- // See https://github.com/flauc/angular2-notifications/issues/165
475
- notification.icon = `
476
- <mat-icon class="material-icons mat-icon mat-list-avatar" svgIcon="${icon}">
477
- </mat-icon>`;
478
- }
479
448
  handleTemplate(message) {
480
449
  if (!this.options.template || message.html) {
481
450
  return message;
@@ -483,22 +452,20 @@ class MessageService {
483
452
  let html = this.options.template;
484
453
  html = html.replace('${text}', message.text);
485
454
  html = html.replace('${title}', message.title);
486
- html = html.replace('${icon}', message.icon);
487
- message.html = html;
488
- message.text = undefined;
455
+ message.html = undefined;
456
+ message.text = html;
489
457
  message.title = undefined;
490
- message.icon = undefined;
491
458
  return message;
492
459
  }
493
460
  }
494
- MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0.ɵɵinject(i1$1.NotificationsService), i0.ɵɵinject(ConfigService)); };
461
+ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0.ɵɵinject(ConfigService), i0.ɵɵinject(i2.ToastrService), i0.ɵɵinject(LanguageService)); };
495
462
  MessageService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
496
463
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageService, [{
497
464
  type: Injectable,
498
465
  args: [{
499
466
  providedIn: 'root'
500
467
  }]
501
- }], function () { return [{ type: i1$1.NotificationsService }, { type: ConfigService }]; }, null); })();
468
+ }], function () { return [{ type: ConfigService }, { type: i2.ToastrService }, { type: LanguageService }]; }, null); })();
502
469
 
503
470
  class ErrorInterceptor {
504
471
  constructor(messageService, injector) {
@@ -601,7 +568,7 @@ class IgoCoreModule {
601
568
  };
602
569
  }
603
570
  }
604
- IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0.ɵɵinject(i1$2.MatIconRegistry), i0.ɵɵinject(i2$1.DomSanitizer)); };
571
+ IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0.ɵɵinject(i1$1.MatIconRegistry), i0.ɵɵinject(i2$1.DomSanitizer)); };
605
572
  IgoCoreModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: IgoCoreModule });
606
573
  IgoCoreModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
607
574
  CommonModule,
@@ -637,7 +604,7 @@ IgoCoreModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
637
604
  IgoMessageModule
638
605
  ]
639
606
  }]
640
- }], function () { return [{ type: i1$2.MatIconRegistry }, { type: i2$1.DomSanitizer }]; }, null); })();
607
+ }], function () { return [{ type: i1$1.MatIconRegistry }, { type: i2$1.DomSanitizer }]; }, null); })();
641
608
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [CommonModule,
642
609
  HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
643
610
  IgoConfigModule,
@@ -697,7 +664,7 @@ class LoggingInterceptor {
697
664
  // Log when response observable either completes or errors
698
665
  finalize(() => {
699
666
  const elapsed = Date.now() - started;
700
- const msg = `${req.method} "${req.urlWithParams}"
667
+ const msg = `${req.method} "${req.urlWithParams}"
701
668
  ${ok} in ${elapsed} ms.`;
702
669
  console.log(msg);
703
670
  }));
@@ -743,7 +710,8 @@ function provideRouteServiceOptions(options) {
743
710
  };
744
711
  }
745
712
  class RouteService {
746
- constructor(route, options) {
713
+ constructor(router, route, options) {
714
+ this.router = router;
747
715
  this.route = route;
748
716
  const defaultOptions = {
749
717
  centerKey: 'center',
@@ -754,6 +722,7 @@ class RouteService {
754
722
  visibleOnLayersKey: 'visiblelayers',
755
723
  visibleOffLayersKey: 'invisiblelayers',
756
724
  directionsCoordKey: 'routing',
725
+ directionsOptionsKey: 'routingOptions',
757
726
  toolKey: 'tool',
758
727
  wmsUrlKey: 'wmsUrl',
759
728
  wmsLayersKey: 'wmsLayers',
@@ -770,17 +739,31 @@ class RouteService {
770
739
  this.options = Object.assign({}, defaultOptions, options);
771
740
  }
772
741
  get queryParams() {
742
+ let url = decodeURIComponent(location.search);
743
+ if (url.includes('¢er=')) {
744
+ url = url.replace('¢er', '&center');
745
+ const queryParams = url
746
+ .slice(1)
747
+ .split('&')
748
+ .map(p => p.split('='))
749
+ .reduce((obj, pair) => {
750
+ const [key, value] = pair.map(decodeURIComponent);
751
+ obj[key] = value;
752
+ return obj;
753
+ }, {});
754
+ this.router.navigate([], { queryParams });
755
+ }
773
756
  return this.route.queryParams;
774
757
  }
775
758
  }
776
- RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0.ɵɵinject(i1$3.ActivatedRoute), i0.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
759
+ RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0.ɵɵinject(i1$2.Router), i0.ɵɵinject(i1$2.ActivatedRoute), i0.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
777
760
  RouteService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
778
761
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouteService, [{
779
762
  type: Injectable,
780
763
  args: [{
781
764
  providedIn: 'root'
782
765
  }]
783
- }], function () { return [{ type: i1$3.ActivatedRoute }, { type: undefined, decorators: [{
766
+ }], function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: undefined, decorators: [{
784
767
  type: Inject,
785
768
  args: [ROUTE_SERVICE_OPTIONS]
786
769
  }, {
@@ -931,14 +914,14 @@ class MediaService {
931
914
  return media === 'desktop';
932
915
  }
933
916
  }
934
- MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0.ɵɵinject(i1$4.BreakpointObserver)); };
917
+ MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0.ɵɵinject(i1$3.BreakpointObserver)); };
935
918
  MediaService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MediaService, factory: MediaService.ɵfac, providedIn: 'root' });
936
919
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MediaService, [{
937
920
  type: Injectable,
938
921
  args: [{
939
922
  providedIn: 'root'
940
923
  }]
941
- }], function () { return [{ type: i1$4.BreakpointObserver }]; }, null); })();
924
+ }], function () { return [{ type: i1$3.BreakpointObserver }]; }, null); })();
942
925
 
943
926
  var StorageScope;
944
927
  (function (StorageScope) {
@@ -1088,5 +1071,5 @@ NetworkService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NetworkSe
1088
1071
  * Generated bundle index. Do not edit.
1089
1072
  */
1090
1073
 
1091
- export { ActivityInterceptor, ActivityService, AnalyticsService, CONFIG_OPTIONS, ConfigService, ErrorInterceptor, IgoActivityModule, IgoConfigModule, IgoCoreModule, IgoErrorModule, IgoGestureConfig, IgoGestureModule, IgoLanguageModule, IgoLoggingModule, IgoMessageModule, IgoMissingTranslationHandler, LanguageLoader, LanguageService, LoggingInterceptor, Media, MediaOrientation, MediaService, MessageCenterComponent, MessageService, MessageType, NetworkService, ROUTE_SERVICE_OPTIONS, RouteService, StorageScope, StorageService, StorageServiceEventEnum, configFactory, defaultLanguageLoader, provideConfigLoader, provideConfigOptions, provideDefaultLanguageLoader, provideLanguageLoader, provideRouteServiceOptions, version };
1074
+ export { ActivityInterceptor, ActivityService, AnalyticsService, CONFIG_OPTIONS, ConfigService, ErrorInterceptor, IgoActivityModule, IgoConfigModule, IgoCoreModule, IgoErrorModule, IgoGestureConfig, IgoGestureModule, IgoLanguageModule, IgoLoggingModule, IgoMessageModule, IgoMissingTranslationHandler, LanguageLoader, LanguageService, LoggingInterceptor, Media, MediaOrientation, MediaService, MessageService, MessageType, NetworkService, ROUTE_SERVICE_OPTIONS, RouteService, StorageScope, StorageService, StorageServiceEventEnum, configFactory, defaultLanguageLoader, provideConfigLoader, provideConfigOptions, provideDefaultLanguageLoader, provideLanguageLoader, provideRouteServiceOptions, version };
1092
1075
  //# sourceMappingURL=igo2-core.js.map