@igo2/core 1.9.3 → 1.11.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 (44) hide show
  1. package/__ivy_ngcc__/locale/en.core.json +6 -0
  2. package/__ivy_ngcc__/locale/en.geo.json +31 -9
  3. package/__ivy_ngcc__/locale/en.integration.json +6 -4
  4. package/__ivy_ngcc__/locale/en.json +41 -11
  5. package/__ivy_ngcc__/locale/fr.core.json +6 -0
  6. package/__ivy_ngcc__/locale/fr.geo.json +29 -7
  7. package/__ivy_ngcc__/locale/fr.integration.json +5 -3
  8. package/__ivy_ngcc__/locale/fr.json +38 -8
  9. package/bundles/igo2-core.umd.js +138 -141
  10. package/bundles/igo2-core.umd.js.map +1 -1
  11. package/esm2015/lib/config/version.js +3 -3
  12. package/esm2015/lib/message/index.js +1 -2
  13. package/esm2015/lib/message/message.module.js +38 -9
  14. package/esm2015/lib/message/shared/index.js +1 -1
  15. package/esm2015/lib/message/shared/message.enum.js +3 -2
  16. package/esm2015/lib/message/shared/message.interface.js +1 -1
  17. package/esm2015/lib/message/shared/message.service.js +55 -72
  18. package/esm2015/lib/network/network.service.js +11 -3
  19. package/esm2015/lib/route/route.service.js +19 -4
  20. package/fesm2015/igo2-core.js +125 -129
  21. package/fesm2015/igo2-core.js.map +1 -1
  22. package/lib/message/index.d.ts +0 -1
  23. package/lib/message/message.module.d.ts +3 -4
  24. package/lib/message/shared/index.d.ts +1 -1
  25. package/lib/message/shared/message.enum.d.ts +2 -1
  26. package/lib/message/shared/message.interface.d.ts +4 -4
  27. package/lib/message/shared/message.service.d.ts +14 -11
  28. package/lib/network/network.service.d.ts +1 -0
  29. package/lib/route/route.service.d.ts +4 -3
  30. package/locale/en.core.json +6 -0
  31. package/locale/en.geo.json +31 -9
  32. package/locale/en.integration.json +6 -4
  33. package/locale/en.json +41 -11
  34. package/locale/fr.core.json +6 -0
  35. package/locale/fr.geo.json +29 -7
  36. package/locale/fr.integration.json +5 -3
  37. package/locale/fr.json +38 -8
  38. package/package.json +4 -4
  39. package/style/core.theming.scss +3 -1
  40. package/style/index.theming.scss +228 -36
  41. package/esm2015/lib/message/message-center/index.js +0 -2
  42. package/esm2015/lib/message/message-center/message-center.component.js +0 -43
  43. package/lib/message/message-center/index.d.ts +0 -1
  44. package/lib/message/message-center/message-center.component.d.ts +0 -19
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@igo2/utils'), require('@ngx-translate/core'), require('@igo2/angular2-notifications'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/router'), require('@angular/cdk/layout')) :
3
- typeof define === 'function' && define.amd ? define('@igo2/core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@igo2/utils', '@ngx-translate/core', '@igo2/angular2-notifications', '@angular/material/icon', '@angular/platform-browser', '@angular/router', '@angular/cdk/layout'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.igo2 = global.igo2 || {}, global.igo2.core = {}), global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.utils, global["ngxt-core"], global.ng2notify, global.ng.material.icon, global.ng.platformBrowser, global.ng.router, global.ng.cdk.layout));
5
- })(this, (function (exports, i0, i2, http, operators, rxjs, utils, i1, i1$1, i1$2, i2$1, i1$3, i1$4) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@igo2/utils'), require('@ngx-translate/core'), require('ngx-toastr'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/router'), require('@angular/cdk/layout')) :
3
+ typeof define === 'function' && define.amd ? define('@igo2/core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', '@igo2/utils', '@ngx-translate/core', 'ngx-toastr', '@angular/material/icon', '@angular/platform-browser', '@angular/router', '@angular/cdk/layout'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.igo2 = global.igo2 || {}, global.igo2.core = {}), global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.utils, global["ngxt-core"], global.ngxToastr, global.ng.material.icon, global.ng.platformBrowser, global.ng.router, global.ng.cdk.layout));
5
+ })(this, (function (exports, i0, common, http, operators, rxjs, utils, i1, i1$1, i1$2, i2, i1$3, i1$4) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,11 +23,10 @@
23
23
  }
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
26
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
27
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
29
28
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
30
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
29
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
30
  var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
32
31
  var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
33
32
 
@@ -125,8 +124,8 @@
125
124
  })();
126
125
 
127
126
  var version = {
128
- lib: '1.9.3',
129
- releaseDate: 1634566158790
127
+ lib: '1.11.0',
128
+ releaseDate: 1648648424505
130
129
  };
131
130
 
132
131
  var ConfigService = /** @class */ (function () {
@@ -645,55 +644,6 @@
645
644
  })();
646
645
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1__namespace.TranslateModule], exports: [i1.TranslateModule] }); })();
647
646
 
648
- var _c0 = function (a0) { return { closeIcon: a0 }; };
649
- var MessageCenterComponent = /** @class */ (function () {
650
- function MessageCenterComponent() {
651
- this._options = {};
652
- }
653
- Object.defineProperty(MessageCenterComponent.prototype, "options", {
654
- get: function () {
655
- return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
656
- },
657
- set: function (value) {
658
- this._options = value;
659
- },
660
- enumerable: false,
661
- configurable: true
662
- });
663
- return MessageCenterComponent;
664
- }());
665
- MessageCenterComponent.defaultOptions = {
666
- timeOut: 5000,
667
- hasCloseIcon: false,
668
- showProgressBar: true,
669
- pauseOnHover: true,
670
- clickToClose: true,
671
- maxLength: 100,
672
- maxStack: 3,
673
- preventDuplicates: true
674
- };
675
- MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
676
- MessageCenterComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵ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) {
677
- if (rf & 1) {
678
- i0__namespace.ɵɵelement(0, "simple-notifications", 0);
679
- }
680
- if (rf & 2) {
681
- i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
682
- }
683
- }, directives: [i1__namespace$1.SimpleNotificationsComponent, i2__namespace.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}"] });
684
- (function () {
685
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageCenterComponent, [{
686
- type: i0.Component,
687
- args: [{
688
- selector: 'igo-message-center',
689
- templateUrl: './message-center.component.html',
690
- styleUrls: ['./message-center.component.scss']
691
- }]
692
- }], function () { return []; }, { options: [{
693
- type: i0.Input
694
- }] });
695
- })();
696
-
697
647
  var IgoMessageModule = /** @class */ (function () {
698
648
  function IgoMessageModule() {
699
649
  }
@@ -707,18 +657,48 @@
707
657
  }());
708
658
  IgoMessageModule.ɵfac = function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); };
709
659
  IgoMessageModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoMessageModule });
710
- IgoMessageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()]] });
660
+ IgoMessageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[common.CommonModule,
661
+ i1$1.ToastrModule.forRoot({
662
+ positionClass: 'toast-bottom-right',
663
+ timeOut: 10000,
664
+ extendedTimeOut: 10000,
665
+ messageClass: 'toast-message mat-typography',
666
+ closeButton: true,
667
+ progressBar: true,
668
+ enableHtml: true,
669
+ tapToDismiss: true,
670
+ maxOpened: 4,
671
+ preventDuplicates: true,
672
+ resetTimeoutOnDuplicate: true,
673
+ countDuplicates: false,
674
+ includeTitleDuplicates: true
675
+ })]] });
711
676
  (function () {
712
677
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoMessageModule, [{
713
678
  type: i0.NgModule,
714
679
  args: [{
715
- imports: [i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()],
716
- declarations: [MessageCenterComponent],
717
- exports: [MessageCenterComponent]
680
+ imports: [common.CommonModule,
681
+ i1$1.ToastrModule.forRoot({
682
+ positionClass: 'toast-bottom-right',
683
+ timeOut: 10000,
684
+ extendedTimeOut: 10000,
685
+ messageClass: 'toast-message mat-typography',
686
+ closeButton: true,
687
+ progressBar: true,
688
+ enableHtml: true,
689
+ tapToDismiss: true,
690
+ maxOpened: 4,
691
+ preventDuplicates: true,
692
+ resetTimeoutOnDuplicate: true,
693
+ countDuplicates: false,
694
+ includeTitleDuplicates: true
695
+ })],
696
+ declarations: [],
697
+ exports: []
718
698
  }]
719
699
  }], null, null);
720
700
  })();
721
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [i2.CommonModule, i1__namespace$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
701
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoMessageModule, { imports: [common.CommonModule, i1__namespace$1.ToastrModule] }); })();
722
702
 
723
703
  var LanguageService = /** @class */ (function () {
724
704
  function LanguageService(translate) {
@@ -751,18 +731,27 @@
751
731
  exports.MessageType = void 0;
752
732
  (function (MessageType) {
753
733
  MessageType["ERROR"] = "error";
754
- MessageType["ALERT"] = "alert";
734
+ MessageType["ALERT"] = "warning";
735
+ MessageType["WARNING"] = "warning";
755
736
  MessageType["INFO"] = "info";
756
737
  MessageType["SUCCESS"] = "success";
757
738
  })(exports.MessageType || (exports.MessageType = {}));
758
739
 
759
740
  var MessageService = /** @class */ (function () {
760
- function MessageService(notificationService, configService) {
761
- this.notificationService = notificationService;
741
+ function MessageService(injector, configService, languageService) {
742
+ this.injector = injector;
762
743
  this.configService = configService;
744
+ this.languageService = languageService;
763
745
  this.messages$ = new rxjs.BehaviorSubject([]);
764
746
  this.options = this.configService.getConfig('message') || {};
765
747
  }
748
+ Object.defineProperty(MessageService.prototype, "toastr", {
749
+ get: function () {
750
+ return this.injector.get(i1$1.ToastrService);
751
+ },
752
+ enumerable: false,
753
+ configurable: true
754
+ });
766
755
  MessageService.prototype.showError = function (httpError) {
767
756
  httpError.error.caught = true;
768
757
  return this.error(httpError.error.message, httpError.error.title);
@@ -781,78 +770,67 @@
781
770
  }
782
771
  if (currentDate > message.options.from && currentDate < message.options.to) {
783
772
  message = this.handleTemplate(message);
784
- var notification = void 0;
785
773
  if (message.text) {
786
- notification = this.notificationService.create(message.title, message.text, message.type, message.options);
787
- }
788
- else if (message.html) {
789
- if (!message.icon) {
790
- message.options.theClass = message.options.theClass
791
- ? message.options.theClass + ' noIcon'
792
- : 'noIcon';
774
+ var messageShown = void 0;
775
+ switch (message.type) {
776
+ case exports.MessageType.SUCCESS:
777
+ messageShown = this.success(message.text, message.title, message.options);
778
+ break;
779
+ case exports.MessageType.ERROR:
780
+ messageShown = this.error(message.text, message.title, message.options);
781
+ break;
782
+ case exports.MessageType.INFO:
783
+ messageShown = this.info(message.text, message.title, message.options);
784
+ break;
785
+ case exports.MessageType.ALERT:
786
+ case exports.MessageType.WARNING:
787
+ messageShown = this.alert(message.text, message.title, message.options);
788
+ break;
789
+ default:
790
+ messageShown = this.info(message.text, message.title, message.options);
791
+ break;
793
792
  }
794
- notification = this.notificationService.html(message.html, message.type, message.options);
795
- }
796
- else {
797
- return;
798
- }
799
- if (message.icon !== undefined) {
800
- this.addIcon(notification, message.icon);
793
+ message.options.id = messageShown.toastId;
801
794
  }
802
- message.options.id = notification.id;
803
- return notification;
804
795
  }
805
- return;
806
796
  };
807
797
  MessageService.prototype.success = function (text, title, options) {
798
+ if (title === void 0) { title = 'igo.core.message.success'; }
808
799
  if (options === void 0) { options = {}; }
809
- return this.message({
810
- text: text,
811
- title: title,
812
- icon: options.icon || 'check',
813
- options: options,
814
- type: exports.MessageType.SUCCESS
815
- });
800
+ var message = this.languageService.translate.instant(text);
801
+ var translatedTitle = this.languageService.translate.instant(title);
802
+ return this.toastr.success(message, translatedTitle, options);
816
803
  };
817
804
  MessageService.prototype.error = function (text, title, options) {
805
+ if (title === void 0) { title = 'igo.core.message.error'; }
818
806
  if (options === void 0) { options = {}; }
819
- return this.message({
820
- text: text,
821
- title: title,
822
- icon: options.icon || 'error_outline',
823
- options: options,
824
- type: exports.MessageType.ERROR
825
- });
807
+ var message = this.languageService.translate.instant(text);
808
+ var translatedTitle = this.languageService.translate.instant(title);
809
+ return this.toastr.error(message, translatedTitle, options);
826
810
  };
827
811
  MessageService.prototype.info = function (text, title, options) {
812
+ if (title === void 0) { title = 'igo.core.message.info'; }
828
813
  if (options === void 0) { options = {}; }
829
- return this.message({
830
- text: text,
831
- title: title,
832
- icon: options.icon || 'info_outline',
833
- options: options,
834
- type: exports.MessageType.INFO
835
- });
814
+ var message = this.languageService.translate.instant(text);
815
+ var translatedTitle = this.languageService.translate.instant(title);
816
+ return this.toastr.info(message, translatedTitle, options);
836
817
  };
837
818
  MessageService.prototype.alert = function (text, title, options) {
819
+ if (title === void 0) { title = 'igo.core.message.alert'; }
838
820
  if (options === void 0) { options = {}; }
839
- return this.message({
840
- text: text,
841
- title: title,
842
- icon: options.icon || 'access_alarm',
843
- options: options,
844
- type: exports.MessageType.ALERT
845
- });
821
+ var message = this.languageService.translate.instant(text);
822
+ var translatedTitle = this.languageService.translate.instant(title);
823
+ return this.toastr.warning(message, translatedTitle, options);
846
824
  };
847
825
  MessageService.prototype.remove = function (id) {
848
- this.notificationService.remove(id);
826
+ this.toastr.remove(id);
849
827
  };
850
828
  MessageService.prototype.removeAllAreNotError = function () {
851
829
  var e_1, _a;
852
830
  try {
853
831
  for (var _b = __values(this.messages$.value), _c = _b.next(); !_c.done; _c = _b.next()) {
854
832
  var mess = _c.value;
855
- if (mess.type !== 'error') {
833
+ if (mess.type !== exports.MessageType.ERROR) {
856
834
  this.remove(mess.options.id);
857
835
  }
858
836
  }
@@ -865,12 +843,6 @@
865
843
  finally { if (e_1) throw e_1.error; }
866
844
  }
867
845
  };
868
- MessageService.prototype.addIcon = function (notification, icon) {
869
- // There is no way to add an icon to a notification when reating
870
- // it so we simply set it on the notification directly.
871
- // See https://github.com/flauc/angular2-notifications/issues/165
872
- notification.icon = "\n <mat-icon class=\"material-icons mat-icon mat-list-avatar\" svgIcon=\"" + icon + "\">\n </mat-icon>";
873
- };
874
846
  MessageService.prototype.handleTemplate = function (message) {
875
847
  if (!this.options.template || message.html) {
876
848
  return message;
@@ -878,16 +850,14 @@
878
850
  var html = this.options.template;
879
851
  html = html.replace('${text}', message.text);
880
852
  html = html.replace('${title}', message.title);
881
- html = html.replace('${icon}', message.icon);
882
- message.html = html;
883
- message.text = undefined;
853
+ message.html = undefined;
854
+ message.text = html;
884
855
  message.title = undefined;
885
- message.icon = undefined;
886
856
  return message;
887
857
  };
888
858
  return MessageService;
889
859
  }());
890
- MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0__namespace.ɵɵinject(i1__namespace$1.NotificationsService), i0__namespace.ɵɵinject(ConfigService)); };
860
+ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0__namespace.ɵɵinject(i0.Injector), i0__namespace.ɵɵinject(ConfigService), i0__namespace.ɵɵinject(LanguageService)); };
891
861
  MessageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
892
862
  (function () {
893
863
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageService, [{
@@ -895,7 +865,12 @@
895
865
  args: [{
896
866
  providedIn: 'root'
897
867
  }]
898
- }], function () { return [{ type: i1__namespace$1.NotificationsService }, { type: ConfigService }]; }, null);
868
+ }], function () {
869
+ return [{ type: i0__namespace.Injector, decorators: [{
870
+ type: i0.Inject,
871
+ args: [i0.Injector]
872
+ }] }, { type: ConfigService }, { type: LanguageService }];
873
+ }, null);
899
874
  })();
900
875
 
901
876
  var ErrorInterceptor = /** @class */ (function () {
@@ -1009,10 +984,10 @@
1009
984
  };
1010
985
  return IgoCoreModule;
1011
986
  }());
1012
- IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0__namespace.ɵɵinject(i1__namespace$2.MatIconRegistry), i0__namespace.ɵɵinject(i2__namespace$1.DomSanitizer)); };
987
+ IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0__namespace.ɵɵinject(i1__namespace$2.MatIconRegistry), i0__namespace.ɵɵinject(i2__namespace.DomSanitizer)); };
1013
988
  IgoCoreModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoCoreModule });
1014
989
  IgoCoreModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
1015
- i2.CommonModule,
990
+ common.CommonModule,
1016
991
  http.HttpClientModule,
1017
992
  IgoActivityModule.forRoot(),
1018
993
  IgoConfigModule.forRoot(),
@@ -1029,7 +1004,7 @@
1029
1004
  type: i0.NgModule,
1030
1005
  args: [{
1031
1006
  imports: [
1032
- i2.CommonModule,
1007
+ common.CommonModule,
1033
1008
  http.HttpClientModule,
1034
1009
  IgoActivityModule.forRoot(),
1035
1010
  IgoConfigModule.forRoot(),
@@ -1046,10 +1021,10 @@
1046
1021
  IgoMessageModule
1047
1022
  ]
1048
1023
  }]
1049
- }], function () { return [{ type: i1__namespace$2.MatIconRegistry }, { type: i2__namespace$1.DomSanitizer }]; }, null);
1024
+ }], function () { return [{ type: i1__namespace$2.MatIconRegistry }, { type: i2__namespace.DomSanitizer }]; }, null);
1050
1025
  })();
1051
1026
  (function () {
1052
- (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [i2.CommonModule,
1027
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [common.CommonModule,
1053
1028
  http.HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
1054
1029
  IgoConfigModule,
1055
1030
  IgoErrorModule,
@@ -1068,7 +1043,7 @@
1068
1043
  return mc;
1069
1044
  };
1070
1045
  return IgoGestureConfig;
1071
- }(i2$1.HammerGestureConfig));
1046
+ }(i2.HammerGestureConfig));
1072
1047
  IgoGestureConfig.ɵfac = /*@__PURE__*/ function () { var ɵIgoGestureConfig_BaseFactory; return function IgoGestureConfig_Factory(t) { return (ɵIgoGestureConfig_BaseFactory || (ɵIgoGestureConfig_BaseFactory = i0__namespace.ɵɵgetInheritedFactory(IgoGestureConfig)))(t || IgoGestureConfig); }; }();
1073
1048
  IgoGestureConfig.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: IgoGestureConfig, factory: IgoGestureConfig.ɵfac });
1074
1049
  (function () {
@@ -1085,7 +1060,7 @@
1085
1060
  ngModule: IgoGestureModule,
1086
1061
  providers: [
1087
1062
  {
1088
- provide: i2$1.HAMMER_GESTURE_CONFIG,
1063
+ provide: i2.HAMMER_GESTURE_CONFIG,
1089
1064
  useClass: IgoGestureConfig
1090
1065
  }
1091
1066
  ]
@@ -1095,18 +1070,18 @@
1095
1070
  }());
1096
1071
  IgoGestureModule.ɵfac = function IgoGestureModule_Factory(t) { return new (t || IgoGestureModule)(); };
1097
1072
  IgoGestureModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoGestureModule });
1098
- IgoGestureModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2$1.HammerModule]] });
1073
+ IgoGestureModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2.HammerModule]] });
1099
1074
  (function () {
1100
1075
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoGestureModule, [{
1101
1076
  type: i0.NgModule,
1102
1077
  args: [{
1103
- imports: [i2$1.HammerModule],
1078
+ imports: [i2.HammerModule],
1104
1079
  declarations: [],
1105
1080
  exports: []
1106
1081
  }]
1107
1082
  }], null, null);
1108
1083
  })();
1109
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i2$1.HammerModule] }); })();
1084
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i2.HammerModule] }); })();
1110
1085
 
1111
1086
  var LoggingInterceptor = /** @class */ (function () {
1112
1087
  function LoggingInterceptor() {
@@ -1176,7 +1151,8 @@
1176
1151
  };
1177
1152
  }
1178
1153
  var RouteService = /** @class */ (function () {
1179
- function RouteService(route, options) {
1154
+ function RouteService(router, route, options) {
1155
+ this.router = router;
1180
1156
  this.route = route;
1181
1157
  var defaultOptions = {
1182
1158
  centerKey: 'center',
@@ -1205,6 +1181,20 @@
1205
1181
  }
1206
1182
  Object.defineProperty(RouteService.prototype, "queryParams", {
1207
1183
  get: function () {
1184
+ var url = decodeURIComponent(location.search);
1185
+ if (url.includes('¢er=')) {
1186
+ url = url.replace('¢er', '&center');
1187
+ var queryParams = url
1188
+ .slice(1)
1189
+ .split('&')
1190
+ .map(function (p) { return p.split('='); })
1191
+ .reduce(function (obj, pair) {
1192
+ var _a = __read(pair.map(decodeURIComponent), 2), key = _a[0], value = _a[1];
1193
+ obj[key] = value;
1194
+ return obj;
1195
+ }, {});
1196
+ this.router.navigate([], { queryParams: queryParams });
1197
+ }
1208
1198
  return this.route.queryParams;
1209
1199
  },
1210
1200
  enumerable: false,
@@ -1212,7 +1202,7 @@
1212
1202
  });
1213
1203
  return RouteService;
1214
1204
  }());
1215
- RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0__namespace.ɵɵinject(i1__namespace$3.ActivatedRoute), i0__namespace.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1205
+ RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0__namespace.ɵɵinject(i1__namespace$3.Router), i0__namespace.ɵɵinject(i1__namespace$3.ActivatedRoute), i0__namespace.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1216
1206
  RouteService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
1217
1207
  (function () {
1218
1208
  (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RouteService, [{
@@ -1221,7 +1211,7 @@
1221
1211
  providedIn: 'root'
1222
1212
  }]
1223
1213
  }], function () {
1224
- return [{ type: i1__namespace$3.ActivatedRoute }, { type: undefined, decorators: [{
1214
+ return [{ type: i1__namespace$3.Router }, { type: i1__namespace$3.ActivatedRoute }, { type: undefined, decorators: [{
1225
1215
  type: i0.Inject,
1226
1216
  args: [ROUTE_SERVICE_OPTIONS]
1227
1217
  }, {
@@ -1502,18 +1492,26 @@
1502
1492
  NetworkService.prototype.checkNetworkState = function () {
1503
1493
  var _this = this;
1504
1494
  this.onlineSubscription = rxjs.fromEvent(window, 'online').subscribe(function () {
1495
+ if (_this.previousMessageId) {
1496
+ _this.messageService.remove(_this.previousMessageId);
1497
+ }
1505
1498
  var translate = _this.injector.get(LanguageService).translate;
1506
1499
  var message = translate.instant('igo.core.network.online.message');
1507
1500
  var title = translate.instant('igo.core.network.online.title');
1508
- _this.messageService.info(message, title);
1501
+ var messageObj = _this.messageService.info(message, title);
1502
+ _this.previousMessageId = messageObj.toastId;
1509
1503
  _this.state.connection = true;
1510
1504
  _this.emitEvent();
1511
1505
  });
1512
1506
  this.offlineSubscription = rxjs.fromEvent(window, 'offline').subscribe(function () {
1507
+ if (_this.previousMessageId) {
1508
+ _this.messageService.remove(_this.previousMessageId);
1509
+ }
1513
1510
  var translate = _this.injector.get(LanguageService).translate;
1514
1511
  var message = translate.instant('igo.core.network.offline.message');
1515
1512
  var title = translate.instant('igo.core.network.offline.title');
1516
- _this.messageService.info(message, title);
1513
+ var messageObj = _this.messageService.info(message, title);
1514
+ _this.previousMessageId = messageObj.toastId;
1517
1515
  _this.state.connection = false;
1518
1516
  _this.emitEvent();
1519
1517
  });
@@ -1575,7 +1573,6 @@
1575
1573
  exports.LanguageService = LanguageService;
1576
1574
  exports.LoggingInterceptor = LoggingInterceptor;
1577
1575
  exports.MediaService = MediaService;
1578
- exports.MessageCenterComponent = MessageCenterComponent;
1579
1576
  exports.MessageService = MessageService;
1580
1577
  exports.NetworkService = NetworkService;
1581
1578
  exports.ROUTE_SERVICE_OPTIONS = ROUTE_SERVICE_OPTIONS;