@igo2/core 1.7.2 → 1.9.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 (151) hide show
  1. package/__ivy_ngcc__/locale/en.auth.json +5 -1
  2. package/__ivy_ngcc__/locale/en.common.json +43 -43
  3. package/__ivy_ngcc__/locale/en.core.json +23 -23
  4. package/__ivy_ngcc__/locale/en.geo.json +36 -8
  5. package/__ivy_ngcc__/locale/en.integration.json +31 -3
  6. package/__ivy_ngcc__/locale/en.json +70 -11
  7. package/__ivy_ngcc__/locale/fr.auth.json +4 -1
  8. package/__ivy_ngcc__/locale/fr.common.json +43 -43
  9. package/__ivy_ngcc__/locale/fr.core.json +23 -23
  10. package/__ivy_ngcc__/locale/fr.geo.json +37 -9
  11. package/__ivy_ngcc__/locale/fr.integration.json +33 -4
  12. package/__ivy_ngcc__/locale/fr.json +71 -12
  13. package/bundles/igo2-core.umd.js +1492 -1422
  14. package/bundles/igo2-core.umd.js.map +1 -1
  15. package/esm2015/igo2-core.js +5 -5
  16. package/esm2015/lib/activity/activity.interceptor.js +30 -31
  17. package/esm2015/lib/activity/activity.module.js +30 -29
  18. package/esm2015/lib/activity/activity.service.js +33 -33
  19. package/esm2015/lib/activity/index.js +3 -3
  20. package/esm2015/lib/analytics/index.js +2 -2
  21. package/esm2015/lib/analytics/shared/analytics.interface.js +2 -1
  22. package/esm2015/lib/analytics/shared/analytics.service.js +74 -75
  23. package/esm2015/lib/analytics/shared/index.js +3 -3
  24. package/esm2015/lib/config/config.interface.js +2 -1
  25. package/esm2015/lib/config/config.module.js +23 -22
  26. package/esm2015/lib/config/config.provider.js +21 -21
  27. package/esm2015/lib/config/config.service.js +52 -52
  28. package/esm2015/lib/config/index.js +4 -4
  29. package/esm2015/lib/config/version.js +5 -5
  30. package/esm2015/lib/core.module.js +71 -72
  31. package/esm2015/lib/gesture/gesture.module.js +30 -29
  32. package/esm2015/lib/gesture/gesture.provider.js +16 -17
  33. package/esm2015/lib/language/index.js +2 -2
  34. package/esm2015/lib/language/language.module.js +41 -40
  35. package/esm2015/lib/language/shared/index.js +5 -5
  36. package/esm2015/lib/language/shared/language.interface.js +2 -1
  37. package/esm2015/lib/language/shared/language.loader.js +28 -28
  38. package/esm2015/lib/language/shared/language.provider.js +22 -22
  39. package/esm2015/lib/language/shared/language.service.js +28 -29
  40. package/esm2015/lib/language/shared/missing-translation.guard.js +16 -16
  41. package/esm2015/lib/media/index.js +3 -3
  42. package/esm2015/lib/media/media.enum.js +12 -12
  43. package/esm2015/lib/media/media.service.js +76 -76
  44. package/esm2015/lib/message/index.js +3 -3
  45. package/esm2015/lib/message/message-center/index.js +2 -2
  46. package/esm2015/lib/message/message-center/message-center.component.js +43 -43
  47. package/esm2015/lib/message/message.module.js +27 -26
  48. package/esm2015/lib/message/shared/index.js +4 -4
  49. package/esm2015/lib/message/shared/message.enum.js +8 -8
  50. package/esm2015/lib/message/shared/message.interface.js +2 -1
  51. package/esm2015/lib/message/shared/message.service.js +130 -124
  52. package/esm2015/lib/network/index.js +3 -3
  53. package/esm2015/lib/network/network.interfaces.js +2 -1
  54. package/esm2015/lib/network/network.service.js +59 -60
  55. package/esm2015/lib/request/error.interceptor.js +62 -63
  56. package/esm2015/lib/request/error.module.js +39 -38
  57. package/esm2015/lib/request/index.js +3 -3
  58. package/esm2015/lib/request/logging.interceptor.js +29 -29
  59. package/esm2015/lib/request/logging.module.js +30 -29
  60. package/esm2015/lib/route/route.interface.js +2 -1
  61. package/esm2015/lib/route/route.service.js +55 -56
  62. package/esm2015/lib/storage/index.js +3 -3
  63. package/esm2015/lib/storage/storage.interface.js +13 -13
  64. package/esm2015/lib/storage/storage.service.js +79 -80
  65. package/esm2015/public_api.js +26 -26
  66. package/fesm2015/igo2-core.js +1029 -1008
  67. package/fesm2015/igo2-core.js.map +1 -1
  68. package/igo2-core.d.ts +5 -5
  69. package/lib/activity/activity.interceptor.d.ts +11 -11
  70. package/lib/activity/activity.module.d.ts +8 -7
  71. package/lib/activity/activity.service.d.ts +11 -11
  72. package/lib/activity/index.d.ts +2 -2
  73. package/lib/analytics/index.d.ts +1 -1
  74. package/lib/analytics/shared/analytics.interface.d.ts +6 -6
  75. package/lib/analytics/shared/analytics.service.d.ts +19 -19
  76. package/lib/analytics/shared/index.d.ts +2 -2
  77. package/lib/config/config.interface.d.ts +6 -6
  78. package/lib/config/config.module.d.ts +8 -7
  79. package/lib/config/config.provider.d.ts +15 -15
  80. package/lib/config/config.service.d.ts +18 -18
  81. package/lib/config/index.d.ts +3 -3
  82. package/lib/config/version.d.ts +5 -5
  83. package/lib/core.module.d.ts +18 -17
  84. package/lib/gesture/gesture.module.d.ts +9 -8
  85. package/lib/gesture/gesture.provider.d.ts +7 -7
  86. package/lib/language/index.d.ts +1 -1
  87. package/lib/language/language.module.d.ts +9 -8
  88. package/lib/language/shared/index.d.ts +4 -4
  89. package/lib/language/shared/language.interface.d.ts +3 -3
  90. package/lib/language/shared/language.loader.d.ts +11 -11
  91. package/lib/language/shared/language.provider.d.ts +15 -15
  92. package/lib/language/shared/language.service.d.ts +11 -11
  93. package/lib/language/shared/missing-translation.guard.d.ts +4 -4
  94. package/lib/media/index.d.ts +2 -2
  95. package/lib/media/media.enum.d.ts +9 -9
  96. package/lib/media/media.service.d.ts +16 -16
  97. package/lib/message/index.d.ts +2 -2
  98. package/lib/message/message-center/index.d.ts +1 -1
  99. package/lib/message/message-center/message-center.component.d.ts +19 -19
  100. package/lib/message/message.module.d.ts +11 -10
  101. package/lib/message/shared/index.d.ts +4 -4
  102. package/lib/message/shared/message.enum.d.ts +6 -6
  103. package/lib/message/shared/message.interface.d.ts +18 -17
  104. package/lib/message/shared/message.service.d.ts +25 -24
  105. package/lib/network/index.d.ts +2 -2
  106. package/lib/network/network.interfaces.d.ts +3 -3
  107. package/lib/network/network.service.d.ts +20 -20
  108. package/lib/request/error.interceptor.d.ts +16 -16
  109. package/lib/request/error.module.d.ts +9 -8
  110. package/lib/request/index.d.ts +2 -2
  111. package/lib/request/logging.interceptor.d.ts +8 -8
  112. package/lib/request/logging.module.d.ts +8 -7
  113. package/lib/route/route.interface.d.ts +22 -22
  114. package/lib/route/route.service.d.ts +18 -18
  115. package/lib/storage/index.d.ts +2 -2
  116. package/lib/storage/storage.interface.d.ts +20 -20
  117. package/lib/storage/storage.service.d.ts +19 -19
  118. package/locale/en.auth.json +5 -1
  119. package/locale/en.common.json +43 -43
  120. package/locale/en.core.json +23 -23
  121. package/locale/en.geo.json +36 -8
  122. package/locale/en.integration.json +31 -3
  123. package/locale/en.json +70 -11
  124. package/locale/fr.auth.json +4 -1
  125. package/locale/fr.common.json +43 -43
  126. package/locale/fr.core.json +23 -23
  127. package/locale/fr.geo.json +37 -9
  128. package/locale/fr.integration.json +33 -4
  129. package/locale/fr.json +71 -12
  130. package/package.json +8 -8
  131. package/public_api.d.ts +22 -22
  132. package/style/all.theming.scss +0 -7649
  133. package/style/core.theming.scss +0 -43
  134. package/style/foreground.scss +1 -1
  135. package/style/index.theming.scss +1006 -0
  136. package/style/material.font.scss +9 -9
  137. package/style/partial/core.variables.scss +3 -3
  138. package/style/partial/media.scss +80 -80
  139. package/style/setup.scss +1 -0
  140. package/style/themes/blue.theme.scss +16 -11
  141. package/style/themes/bluedq.theme.scss +52 -0
  142. package/style/themes/bluegrey.theme.scss +15 -8
  143. package/style/themes/dark.theme.scss +15 -8
  144. package/style/themes/deeppurple.theme.scss +15 -8
  145. package/style/themes/indigo.theme.scss +15 -8
  146. package/style/themes/orange.theme.scss +15 -8
  147. package/style/themes/teal.theme.scss +15 -8
  148. package/style/theming.scss +2 -7180
  149. package/style/typography.scss +14 -14
  150. package/bundles/igo2-core.umd.min.js +0 -17
  151. package/bundles/igo2-core.umd.min.js.map +0 -1
@@ -1,1489 +1,1559 @@
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('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', 'angular2-notifications', '@angular/material/icon', '@angular/platform-browser', '@angular/router', '@angular/cdk/layout'], factory) :
4
- (global = 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, i6, i7, i1$2, i1$3) { '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('@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';
6
6
 
7
- var ActivityService = /** @class */ (function () {
8
- function ActivityService() {
9
- this.counter$ = new rxjs.BehaviorSubject(0);
10
- this.ids = [];
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () {
17
+ return e[k];
18
+ }
19
+ });
20
+ }
21
+ });
11
22
  }
12
- ActivityService.prototype.register = function () {
13
- var id = utils.uuid();
14
- this.ids.push(id);
15
- this.counter$.next(this.ids.length);
16
- return id;
17
- };
18
- ActivityService.prototype.unregister = function (id) {
19
- var index = this.ids.indexOf(id);
20
- if (index === -1) {
21
- return;
22
- }
23
- this.ids.splice(index, 1);
24
- this.counter$.next(this.ids.length);
25
- };
26
- return ActivityService;
27
- }());
28
- ActivityService.ɵfac = function ActivityService_Factory(t) { return new (t || ActivityService)(); };
29
- ActivityService.ɵprov = i0.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac, providedIn: 'root' });
30
- /*@__PURE__*/ (function () {
31
- i0.ɵsetClassMetadata(ActivityService, [{
32
- type: i0.Injectable,
33
- args: [{
34
- providedIn: 'root'
35
- }]
36
- }], function () { return []; }, null);
23
+ n['default'] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
31
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
32
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
33
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
34
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
35
+
36
+ var ActivityService = /** @class */ (function () {
37
+ function ActivityService() {
38
+ this.counter$ = new rxjs.BehaviorSubject(0);
39
+ this.ids = [];
40
+ }
41
+ ActivityService.prototype.register = function () {
42
+ var id = utils.uuid();
43
+ this.ids.push(id);
44
+ this.counter$.next(this.ids.length);
45
+ return id;
46
+ };
47
+ ActivityService.prototype.unregister = function (id) {
48
+ var index = this.ids.indexOf(id);
49
+ if (index === -1) {
50
+ return;
51
+ }
52
+ this.ids.splice(index, 1);
53
+ this.counter$.next(this.ids.length);
54
+ };
55
+ return ActivityService;
56
+ }());
57
+ ActivityService.ɵfac = function ActivityService_Factory(t) { return new (t || ActivityService)(); };
58
+ ActivityService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ActivityService, factory: ActivityService.ɵfac, providedIn: 'root' });
59
+ (function () {
60
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ActivityService, [{
61
+ type: i0.Injectable,
62
+ args: [{
63
+ providedIn: 'root'
64
+ }]
65
+ }], function () { return []; }, null);
37
66
  })();
38
67
 
39
- var ActivityInterceptor = /** @class */ (function () {
40
- function ActivityInterceptor(activityService) {
41
- this.activityService = activityService;
42
- }
43
- ActivityInterceptor.prototype.intercept = function (req, next) {
44
- var _this = this;
45
- var activity = req.headers.get('activityInterceptor');
46
- if (activity) {
47
- var actReq = req.clone({
48
- headers: req.headers.delete('activityInterceptor')
49
- });
50
- if (activity === 'false') {
51
- return next.handle(actReq);
52
- }
53
- }
54
- var id = this.activityService.register();
55
- return next.handle(req).pipe(operators.finalize(function () {
56
- _this.activityService.unregister(id);
57
- }));
58
- };
59
- return ActivityInterceptor;
60
- }());
61
- ActivityInterceptor.ɵfac = function ActivityInterceptor_Factory(t) { return new (t || ActivityInterceptor)(i0.ɵɵinject(ActivityService)); };
62
- ActivityInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: ActivityInterceptor, factory: ActivityInterceptor.ɵfac });
63
- /*@__PURE__*/ (function () {
64
- i0.ɵsetClassMetadata(ActivityInterceptor, [{
65
- type: i0.Injectable
66
- }], function () { return [{ type: ActivityService }]; }, null);
68
+ var ActivityInterceptor = /** @class */ (function () {
69
+ function ActivityInterceptor(activityService) {
70
+ this.activityService = activityService;
71
+ }
72
+ ActivityInterceptor.prototype.intercept = function (req, next) {
73
+ var _this = this;
74
+ var activity = req.headers.get('activityInterceptor');
75
+ if (activity) {
76
+ var actReq = req.clone({
77
+ headers: req.headers.delete('activityInterceptor')
78
+ });
79
+ if (activity === 'false') {
80
+ return next.handle(actReq);
81
+ }
82
+ }
83
+ var id = this.activityService.register();
84
+ return next.handle(req).pipe(operators.finalize(function () {
85
+ _this.activityService.unregister(id);
86
+ }));
87
+ };
88
+ return ActivityInterceptor;
89
+ }());
90
+ ActivityInterceptor.ɵfac = function ActivityInterceptor_Factory(t) { return new (t || ActivityInterceptor)(i0__namespace.ɵɵinject(ActivityService)); };
91
+ ActivityInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ActivityInterceptor, factory: ActivityInterceptor.ɵfac });
92
+ (function () {
93
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ActivityInterceptor, [{
94
+ type: i0.Injectable
95
+ }], function () { return [{ type: ActivityService }]; }, null);
67
96
  })();
68
97
 
69
- var IgoActivityModule = /** @class */ (function () {
70
- function IgoActivityModule() {
71
- }
72
- IgoActivityModule.forRoot = function () {
73
- return {
74
- ngModule: IgoActivityModule,
75
- providers: [
76
- {
77
- provide: http.HTTP_INTERCEPTORS,
78
- useClass: ActivityInterceptor,
79
- multi: true
80
- }
81
- ]
82
- };
83
- };
84
- return IgoActivityModule;
85
- }());
86
- IgoActivityModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoActivityModule });
87
- IgoActivityModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoActivityModule_Factory(t) { return new (t || IgoActivityModule)(); }, imports: [[]] });
88
- /*@__PURE__*/ (function () {
89
- i0.ɵsetClassMetadata(IgoActivityModule, [{
90
- type: i0.NgModule,
91
- args: [{
92
- imports: [],
93
- declarations: [],
94
- exports: []
95
- }]
96
- }], null, null);
98
+ var IgoActivityModule = /** @class */ (function () {
99
+ function IgoActivityModule() {
100
+ }
101
+ IgoActivityModule.forRoot = function () {
102
+ return {
103
+ ngModule: IgoActivityModule,
104
+ providers: [
105
+ {
106
+ provide: http.HTTP_INTERCEPTORS,
107
+ useClass: ActivityInterceptor,
108
+ multi: true
109
+ }
110
+ ]
111
+ };
112
+ };
113
+ return IgoActivityModule;
114
+ }());
115
+ IgoActivityModule.ɵfac = function IgoActivityModule_Factory(t) { return new (t || IgoActivityModule)(); };
116
+ IgoActivityModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoActivityModule });
117
+ IgoActivityModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
118
+ (function () {
119
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoActivityModule, [{
120
+ type: i0.NgModule,
121
+ args: [{
122
+ imports: [],
123
+ declarations: [],
124
+ exports: []
125
+ }]
126
+ }], null, null);
97
127
  })();
98
128
 
99
- var version = {
100
- lib: '1.7.2',
101
- releaseDate: 1621276718436
129
+ var version = {
130
+ lib: '1.9.0',
131
+ releaseDate: 1632149524409
102
132
  };
103
133
 
104
- var ConfigService = /** @class */ (function () {
105
- function ConfigService(injector) {
106
- this.injector = injector;
107
- this.config = {};
108
- }
109
- /**
110
- * Use to get the data found in config file
111
- */
112
- ConfigService.prototype.getConfig = function (key) {
113
- return utils.ObjectUtils.resolve(this.config, key);
114
- };
115
- /**
116
- * This method loads "[path]" to get all config's variables
117
- */
118
- ConfigService.prototype.load = function (options) {
119
- var _this = this;
120
- var baseConfig = options.default || {};
121
- if (!options.path) {
122
- this.config = baseConfig;
123
- return true;
124
- }
125
- var http$1 = this.injector.get(http.HttpClient);
126
- return new Promise(function (resolve, _reject) {
127
- http$1
128
- .get(options.path)
129
- .pipe(operators.catchError(function (error) {
130
- console.log("Configuration file " + options.path + " could not be read");
131
- resolve(true);
132
- return rxjs.throwError(error.error || 'Server error');
133
- }))
134
- .subscribe(function (configResponse) {
135
- _this.config = utils.ObjectUtils.mergeDeep(utils.ObjectUtils.mergeDeep({ version: version }, baseConfig), configResponse);
136
- resolve(true);
137
- });
138
- });
139
- };
140
- return ConfigService;
141
- }());
142
- ConfigService.ɵfac = function ConfigService_Factory(t) { return new (t || ConfigService)(i0.ɵɵinject(i0.Injector)); };
143
- ConfigService.ɵprov = i0.ɵɵdefineInjectable({ token: ConfigService, factory: ConfigService.ɵfac, providedIn: 'root' });
144
- /*@__PURE__*/ (function () {
145
- i0.ɵsetClassMetadata(ConfigService, [{
146
- type: i0.Injectable,
147
- args: [{
148
- providedIn: 'root'
149
- }]
150
- }], function () { return [{ type: i0.Injector }]; }, null);
134
+ var ConfigService = /** @class */ (function () {
135
+ function ConfigService(injector) {
136
+ this.injector = injector;
137
+ this.config = {};
138
+ }
139
+ /**
140
+ * Use to get the data found in config file
141
+ */
142
+ ConfigService.prototype.getConfig = function (key) {
143
+ return utils.ObjectUtils.resolve(this.config, key);
144
+ };
145
+ /**
146
+ * This method loads "[path]" to get all config's variables
147
+ */
148
+ ConfigService.prototype.load = function (options) {
149
+ var _this = this;
150
+ var baseConfig = options.default || {};
151
+ if (!options.path) {
152
+ this.config = baseConfig;
153
+ return true;
154
+ }
155
+ var http$1 = this.injector.get(http.HttpClient);
156
+ return new Promise(function (resolve, _reject) {
157
+ http$1
158
+ .get(options.path)
159
+ .pipe(operators.catchError(function (error) {
160
+ console.log("Configuration file " + options.path + " could not be read");
161
+ resolve(true);
162
+ return rxjs.throwError(error.error || 'Server error');
163
+ }))
164
+ .subscribe(function (configResponse) {
165
+ _this.config = utils.ObjectUtils.mergeDeep(utils.ObjectUtils.mergeDeep({ version: version }, baseConfig), configResponse);
166
+ resolve(true);
167
+ });
168
+ });
169
+ };
170
+ return ConfigService;
171
+ }());
172
+ ConfigService.ɵfac = function ConfigService_Factory(t) { return new (t || ConfigService)(i0__namespace.ɵɵinject(i0__namespace.Injector)); };
173
+ ConfigService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ConfigService, factory: ConfigService.ɵfac, providedIn: 'root' });
174
+ (function () {
175
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ConfigService, [{
176
+ type: i0.Injectable,
177
+ args: [{
178
+ providedIn: 'root'
179
+ }]
180
+ }], function () { return [{ type: i0__namespace.Injector }]; }, null);
151
181
  })();
152
182
 
153
- var CONFIG_OPTIONS = new i0.InjectionToken('configOptions');
154
- function provideConfigOptions(options) {
155
- return {
156
- provide: CONFIG_OPTIONS,
157
- useValue: options
158
- };
159
- }
160
- function configFactory(configService, options) {
161
- return function () { return configService.load(options); };
162
- }
163
- function provideConfigLoader() {
164
- return {
165
- provide: i0.APP_INITIALIZER,
166
- useFactory: configFactory,
167
- multi: true,
168
- deps: [ConfigService, CONFIG_OPTIONS]
169
- };
183
+ var CONFIG_OPTIONS = new i0.InjectionToken('configOptions');
184
+ function provideConfigOptions(options) {
185
+ return {
186
+ provide: CONFIG_OPTIONS,
187
+ useValue: options
188
+ };
189
+ }
190
+ function configFactory(configService, options) {
191
+ return function () { return configService.load(options); };
192
+ }
193
+ function provideConfigLoader() {
194
+ return {
195
+ provide: i0.APP_INITIALIZER,
196
+ useFactory: configFactory,
197
+ multi: true,
198
+ deps: [ConfigService, CONFIG_OPTIONS]
199
+ };
170
200
  }
171
201
 
172
- var IgoConfigModule = /** @class */ (function () {
173
- function IgoConfigModule() {
174
- }
175
- IgoConfigModule.forRoot = function () {
176
- return {
177
- ngModule: IgoConfigModule,
178
- providers: [provideConfigOptions({}), provideConfigLoader()]
179
- };
180
- };
181
- return IgoConfigModule;
182
- }());
183
- IgoConfigModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoConfigModule });
184
- IgoConfigModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoConfigModule_Factory(t) { return new (t || IgoConfigModule)(); }, imports: [[]] });
185
- /*@__PURE__*/ (function () {
186
- i0.ɵsetClassMetadata(IgoConfigModule, [{
187
- type: i0.NgModule,
188
- args: [{
189
- imports: [],
190
- declarations: [],
191
- exports: []
192
- }]
193
- }], null, null);
202
+ var IgoConfigModule = /** @class */ (function () {
203
+ function IgoConfigModule() {
204
+ }
205
+ IgoConfigModule.forRoot = function () {
206
+ return {
207
+ ngModule: IgoConfigModule,
208
+ providers: [provideConfigOptions({}), provideConfigLoader()]
209
+ };
210
+ };
211
+ return IgoConfigModule;
212
+ }());
213
+ IgoConfigModule.ɵfac = function IgoConfigModule_Factory(t) { return new (t || IgoConfigModule)(); };
214
+ IgoConfigModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoConfigModule });
215
+ IgoConfigModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
216
+ (function () {
217
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoConfigModule, [{
218
+ type: i0.NgModule,
219
+ args: [{
220
+ imports: [],
221
+ declarations: [],
222
+ exports: []
223
+ }]
224
+ }], null, null);
194
225
  })();
195
226
 
196
- /*! *****************************************************************************
197
- Copyright (c) Microsoft Corporation.
198
-
199
- Permission to use, copy, modify, and/or distribute this software for any
200
- purpose with or without fee is hereby granted.
201
-
202
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
203
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
204
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
205
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
206
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
207
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
208
- PERFORMANCE OF THIS SOFTWARE.
209
- ***************************************************************************** */
210
- /* global Reflect, Promise */
211
- var extendStatics = function (d, b) {
212
- extendStatics = Object.setPrototypeOf ||
213
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
214
- function (d, b) { for (var p in b)
215
- if (Object.prototype.hasOwnProperty.call(b, p))
216
- d[p] = b[p]; };
217
- return extendStatics(d, b);
218
- };
219
- function __extends(d, b) {
220
- if (typeof b !== "function" && b !== null)
221
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
222
- extendStatics(d, b);
223
- function __() { this.constructor = d; }
224
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
225
- }
226
- var __assign = function () {
227
- __assign = Object.assign || function __assign(t) {
228
- for (var s, i = 1, n = arguments.length; i < n; i++) {
229
- s = arguments[i];
230
- for (var p in s)
231
- if (Object.prototype.hasOwnProperty.call(s, p))
232
- t[p] = s[p];
233
- }
234
- return t;
235
- };
236
- return __assign.apply(this, arguments);
237
- };
238
- function __rest(s, e) {
239
- var t = {};
240
- for (var p in s)
241
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
242
- t[p] = s[p];
243
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
244
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
245
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
246
- t[p[i]] = s[p[i]];
247
- }
248
- return t;
249
- }
250
- function __decorate(decorators, target, key, desc) {
251
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
252
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
253
- r = Reflect.decorate(decorators, target, key, desc);
254
- else
255
- for (var i = decorators.length - 1; i >= 0; i--)
256
- if (d = decorators[i])
257
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
258
- return c > 3 && r && Object.defineProperty(target, key, r), r;
259
- }
260
- function __param(paramIndex, decorator) {
261
- return function (target, key) { decorator(target, key, paramIndex); };
262
- }
263
- function __metadata(metadataKey, metadataValue) {
264
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
265
- return Reflect.metadata(metadataKey, metadataValue);
266
- }
267
- function __awaiter(thisArg, _arguments, P, generator) {
268
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
269
- return new (P || (P = Promise))(function (resolve, reject) {
270
- function fulfilled(value) { try {
271
- step(generator.next(value));
272
- }
273
- catch (e) {
274
- reject(e);
275
- } }
276
- function rejected(value) { try {
277
- step(generator["throw"](value));
278
- }
279
- catch (e) {
280
- reject(e);
281
- } }
282
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
283
- step((generator = generator.apply(thisArg, _arguments || [])).next());
284
- });
285
- }
286
- function __generator(thisArg, body) {
287
- var _ = { label: 0, sent: function () { if (t[0] & 1)
288
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
289
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
290
- function verb(n) { return function (v) { return step([n, v]); }; }
291
- function step(op) {
292
- if (f)
293
- throw new TypeError("Generator is already executing.");
294
- while (_)
295
- try {
296
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
297
- return t;
298
- if (y = 0, t)
299
- op = [op[0] & 2, t.value];
300
- switch (op[0]) {
301
- case 0:
302
- case 1:
303
- t = op;
304
- break;
305
- case 4:
306
- _.label++;
307
- return { value: op[1], done: false };
308
- case 5:
309
- _.label++;
310
- y = op[1];
311
- op = [0];
312
- continue;
313
- case 7:
314
- op = _.ops.pop();
315
- _.trys.pop();
316
- continue;
317
- default:
318
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
319
- _ = 0;
320
- continue;
321
- }
322
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
323
- _.label = op[1];
324
- break;
325
- }
326
- if (op[0] === 6 && _.label < t[1]) {
327
- _.label = t[1];
328
- t = op;
329
- break;
330
- }
331
- if (t && _.label < t[2]) {
332
- _.label = t[2];
333
- _.ops.push(op);
334
- break;
335
- }
336
- if (t[2])
337
- _.ops.pop();
338
- _.trys.pop();
339
- continue;
340
- }
341
- op = body.call(thisArg, _);
342
- }
343
- catch (e) {
344
- op = [6, e];
345
- y = 0;
346
- }
347
- finally {
348
- f = t = 0;
349
- }
350
- if (op[0] & 5)
351
- throw op[1];
352
- return { value: op[0] ? op[1] : void 0, done: true };
353
- }
354
- }
355
- var __createBinding = Object.create ? (function (o, m, k, k2) {
356
- if (k2 === undefined)
357
- k2 = k;
358
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
359
- }) : (function (o, m, k, k2) {
360
- if (k2 === undefined)
361
- k2 = k;
362
- o[k2] = m[k];
363
- });
364
- function __exportStar(m, o) {
365
- for (var p in m)
366
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
367
- __createBinding(o, m, p);
368
- }
369
- function __values(o) {
370
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
371
- if (m)
372
- return m.call(o);
373
- if (o && typeof o.length === "number")
374
- return {
375
- next: function () {
376
- if (o && i >= o.length)
377
- o = void 0;
378
- return { value: o && o[i++], done: !o };
379
- }
380
- };
381
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
382
- }
383
- function __read(o, n) {
384
- var m = typeof Symbol === "function" && o[Symbol.iterator];
385
- if (!m)
386
- return o;
387
- var i = m.call(o), r, ar = [], e;
388
- try {
389
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
390
- ar.push(r.value);
391
- }
392
- catch (error) {
393
- e = { error: error };
394
- }
395
- finally {
396
- try {
397
- if (r && !r.done && (m = i["return"]))
398
- m.call(i);
399
- }
400
- finally {
401
- if (e)
402
- throw e.error;
403
- }
404
- }
405
- return ar;
406
- }
407
- /** @deprecated */
408
- function __spread() {
409
- for (var ar = [], i = 0; i < arguments.length; i++)
410
- ar = ar.concat(__read(arguments[i]));
411
- return ar;
412
- }
413
- /** @deprecated */
414
- function __spreadArrays() {
415
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
416
- s += arguments[i].length;
417
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
418
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
419
- r[k] = a[j];
420
- return r;
421
- }
422
- function __spreadArray(to, from) {
423
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
424
- to[j] = from[i];
425
- return to;
426
- }
427
- function __await(v) {
428
- return this instanceof __await ? (this.v = v, this) : new __await(v);
429
- }
430
- function __asyncGenerator(thisArg, _arguments, generator) {
431
- if (!Symbol.asyncIterator)
432
- throw new TypeError("Symbol.asyncIterator is not defined.");
433
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
434
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
435
- function verb(n) { if (g[n])
436
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
437
- function resume(n, v) { try {
438
- step(g[n](v));
439
- }
440
- catch (e) {
441
- settle(q[0][3], e);
442
- } }
443
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
444
- function fulfill(value) { resume("next", value); }
445
- function reject(value) { resume("throw", value); }
446
- function settle(f, v) { if (f(v), q.shift(), q.length)
447
- resume(q[0][0], q[0][1]); }
448
- }
449
- function __asyncDelegator(o) {
450
- var i, p;
451
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
452
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
453
- }
454
- function __asyncValues(o) {
455
- if (!Symbol.asyncIterator)
456
- throw new TypeError("Symbol.asyncIterator is not defined.");
457
- var m = o[Symbol.asyncIterator], i;
458
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
459
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
460
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
461
- }
462
- function __makeTemplateObject(cooked, raw) {
463
- if (Object.defineProperty) {
464
- Object.defineProperty(cooked, "raw", { value: raw });
465
- }
466
- else {
467
- cooked.raw = raw;
468
- }
469
- return cooked;
470
- }
471
- ;
472
- var __setModuleDefault = Object.create ? (function (o, v) {
473
- Object.defineProperty(o, "default", { enumerable: true, value: v });
474
- }) : function (o, v) {
475
- o["default"] = v;
476
- };
477
- function __importStar(mod) {
478
- if (mod && mod.__esModule)
479
- return mod;
480
- var result = {};
481
- if (mod != null)
482
- for (var k in mod)
483
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
484
- __createBinding(result, mod, k);
485
- __setModuleDefault(result, mod);
486
- return result;
487
- }
488
- function __importDefault(mod) {
489
- return (mod && mod.__esModule) ? mod : { default: mod };
490
- }
491
- function __classPrivateFieldGet(receiver, privateMap) {
492
- if (!privateMap.has(receiver)) {
493
- throw new TypeError("attempted to get private field on non-instance");
494
- }
495
- return privateMap.get(receiver);
496
- }
497
- function __classPrivateFieldSet(receiver, privateMap, value) {
498
- if (!privateMap.has(receiver)) {
499
- throw new TypeError("attempted to set private field on non-instance");
500
- }
501
- privateMap.set(receiver, value);
502
- return value;
227
+ /*! *****************************************************************************
228
+ Copyright (c) Microsoft Corporation.
229
+
230
+ Permission to use, copy, modify, and/or distribute this software for any
231
+ purpose with or without fee is hereby granted.
232
+
233
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
234
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
235
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
236
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
237
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
238
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
239
+ PERFORMANCE OF THIS SOFTWARE.
240
+ ***************************************************************************** */
241
+ /* global Reflect, Promise */
242
+ var extendStatics = function (d, b) {
243
+ extendStatics = Object.setPrototypeOf ||
244
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
245
+ function (d, b) { for (var p in b)
246
+ if (Object.prototype.hasOwnProperty.call(b, p))
247
+ d[p] = b[p]; };
248
+ return extendStatics(d, b);
249
+ };
250
+ function __extends(d, b) {
251
+ if (typeof b !== "function" && b !== null)
252
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
253
+ extendStatics(d, b);
254
+ function __() { this.constructor = d; }
255
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
256
+ }
257
+ var __assign = function () {
258
+ __assign = Object.assign || function __assign(t) {
259
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
260
+ s = arguments[i];
261
+ for (var p in s)
262
+ if (Object.prototype.hasOwnProperty.call(s, p))
263
+ t[p] = s[p];
264
+ }
265
+ return t;
266
+ };
267
+ return __assign.apply(this, arguments);
268
+ };
269
+ function __rest(s, e) {
270
+ var t = {};
271
+ for (var p in s)
272
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
273
+ t[p] = s[p];
274
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
275
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
276
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
277
+ t[p[i]] = s[p[i]];
278
+ }
279
+ return t;
280
+ }
281
+ function __decorate(decorators, target, key, desc) {
282
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
283
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
284
+ r = Reflect.decorate(decorators, target, key, desc);
285
+ else
286
+ for (var i = decorators.length - 1; i >= 0; i--)
287
+ if (d = decorators[i])
288
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
289
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
290
+ }
291
+ function __param(paramIndex, decorator) {
292
+ return function (target, key) { decorator(target, key, paramIndex); };
293
+ }
294
+ function __metadata(metadataKey, metadataValue) {
295
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
296
+ return Reflect.metadata(metadataKey, metadataValue);
297
+ }
298
+ function __awaiter(thisArg, _arguments, P, generator) {
299
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
300
+ return new (P || (P = Promise))(function (resolve, reject) {
301
+ function fulfilled(value) { try {
302
+ step(generator.next(value));
303
+ }
304
+ catch (e) {
305
+ reject(e);
306
+ } }
307
+ function rejected(value) { try {
308
+ step(generator["throw"](value));
309
+ }
310
+ catch (e) {
311
+ reject(e);
312
+ } }
313
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
314
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
315
+ });
316
+ }
317
+ function __generator(thisArg, body) {
318
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
319
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
320
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
321
+ function verb(n) { return function (v) { return step([n, v]); }; }
322
+ function step(op) {
323
+ if (f)
324
+ throw new TypeError("Generator is already executing.");
325
+ while (_)
326
+ try {
327
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
328
+ return t;
329
+ if (y = 0, t)
330
+ op = [op[0] & 2, t.value];
331
+ switch (op[0]) {
332
+ case 0:
333
+ case 1:
334
+ t = op;
335
+ break;
336
+ case 4:
337
+ _.label++;
338
+ return { value: op[1], done: false };
339
+ case 5:
340
+ _.label++;
341
+ y = op[1];
342
+ op = [0];
343
+ continue;
344
+ case 7:
345
+ op = _.ops.pop();
346
+ _.trys.pop();
347
+ continue;
348
+ default:
349
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
350
+ _ = 0;
351
+ continue;
352
+ }
353
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
354
+ _.label = op[1];
355
+ break;
356
+ }
357
+ if (op[0] === 6 && _.label < t[1]) {
358
+ _.label = t[1];
359
+ t = op;
360
+ break;
361
+ }
362
+ if (t && _.label < t[2]) {
363
+ _.label = t[2];
364
+ _.ops.push(op);
365
+ break;
366
+ }
367
+ if (t[2])
368
+ _.ops.pop();
369
+ _.trys.pop();
370
+ continue;
371
+ }
372
+ op = body.call(thisArg, _);
373
+ }
374
+ catch (e) {
375
+ op = [6, e];
376
+ y = 0;
377
+ }
378
+ finally {
379
+ f = t = 0;
380
+ }
381
+ if (op[0] & 5)
382
+ throw op[1];
383
+ return { value: op[0] ? op[1] : void 0, done: true };
384
+ }
385
+ }
386
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
387
+ if (k2 === undefined)
388
+ k2 = k;
389
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
390
+ }) : (function (o, m, k, k2) {
391
+ if (k2 === undefined)
392
+ k2 = k;
393
+ o[k2] = m[k];
394
+ });
395
+ function __exportStar(m, o) {
396
+ for (var p in m)
397
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
398
+ __createBinding(o, m, p);
399
+ }
400
+ function __values(o) {
401
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
402
+ if (m)
403
+ return m.call(o);
404
+ if (o && typeof o.length === "number")
405
+ return {
406
+ next: function () {
407
+ if (o && i >= o.length)
408
+ o = void 0;
409
+ return { value: o && o[i++], done: !o };
410
+ }
411
+ };
412
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
413
+ }
414
+ function __read(o, n) {
415
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
416
+ if (!m)
417
+ return o;
418
+ var i = m.call(o), r, ar = [], e;
419
+ try {
420
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
421
+ ar.push(r.value);
422
+ }
423
+ catch (error) {
424
+ e = { error: error };
425
+ }
426
+ finally {
427
+ try {
428
+ if (r && !r.done && (m = i["return"]))
429
+ m.call(i);
430
+ }
431
+ finally {
432
+ if (e)
433
+ throw e.error;
434
+ }
435
+ }
436
+ return ar;
437
+ }
438
+ /** @deprecated */
439
+ function __spread() {
440
+ for (var ar = [], i = 0; i < arguments.length; i++)
441
+ ar = ar.concat(__read(arguments[i]));
442
+ return ar;
443
+ }
444
+ /** @deprecated */
445
+ function __spreadArrays() {
446
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
447
+ s += arguments[i].length;
448
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
449
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
450
+ r[k] = a[j];
451
+ return r;
452
+ }
453
+ function __spreadArray(to, from, pack) {
454
+ if (pack || arguments.length === 2)
455
+ for (var i = 0, l = from.length, ar; i < l; i++) {
456
+ if (ar || !(i in from)) {
457
+ if (!ar)
458
+ ar = Array.prototype.slice.call(from, 0, i);
459
+ ar[i] = from[i];
460
+ }
461
+ }
462
+ return to.concat(ar || Array.prototype.slice.call(from));
463
+ }
464
+ function __await(v) {
465
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
466
+ }
467
+ function __asyncGenerator(thisArg, _arguments, generator) {
468
+ if (!Symbol.asyncIterator)
469
+ throw new TypeError("Symbol.asyncIterator is not defined.");
470
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
471
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
472
+ function verb(n) { if (g[n])
473
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
474
+ function resume(n, v) { try {
475
+ step(g[n](v));
476
+ }
477
+ catch (e) {
478
+ settle(q[0][3], e);
479
+ } }
480
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
481
+ function fulfill(value) { resume("next", value); }
482
+ function reject(value) { resume("throw", value); }
483
+ function settle(f, v) { if (f(v), q.shift(), q.length)
484
+ resume(q[0][0], q[0][1]); }
485
+ }
486
+ function __asyncDelegator(o) {
487
+ var i, p;
488
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
489
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
490
+ }
491
+ function __asyncValues(o) {
492
+ if (!Symbol.asyncIterator)
493
+ throw new TypeError("Symbol.asyncIterator is not defined.");
494
+ var m = o[Symbol.asyncIterator], i;
495
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
496
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
497
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
498
+ }
499
+ function __makeTemplateObject(cooked, raw) {
500
+ if (Object.defineProperty) {
501
+ Object.defineProperty(cooked, "raw", { value: raw });
502
+ }
503
+ else {
504
+ cooked.raw = raw;
505
+ }
506
+ return cooked;
507
+ }
508
+ ;
509
+ var __setModuleDefault = Object.create ? (function (o, v) {
510
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
511
+ }) : function (o, v) {
512
+ o["default"] = v;
513
+ };
514
+ function __importStar(mod) {
515
+ if (mod && mod.__esModule)
516
+ return mod;
517
+ var result = {};
518
+ if (mod != null)
519
+ for (var k in mod)
520
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
521
+ __createBinding(result, mod, k);
522
+ __setModuleDefault(result, mod);
523
+ return result;
524
+ }
525
+ function __importDefault(mod) {
526
+ return (mod && mod.__esModule) ? mod : { default: mod };
527
+ }
528
+ function __classPrivateFieldGet(receiver, state, kind, f) {
529
+ if (kind === "a" && !f)
530
+ throw new TypeError("Private accessor was defined without a getter");
531
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
532
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
533
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
534
+ }
535
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
536
+ if (kind === "m")
537
+ throw new TypeError("Private method is not writable");
538
+ if (kind === "a" && !f)
539
+ throw new TypeError("Private accessor was defined without a setter");
540
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
541
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
542
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
503
543
  }
504
544
 
505
- var LanguageLoader = /** @class */ (function () {
506
- function LanguageLoader(http, prefix, suffix, config) {
507
- if (suffix === void 0) { suffix = '.json'; }
508
- this.http = http;
509
- this.prefix = prefix;
510
- this.suffix = suffix;
511
- this.config = config;
512
- }
513
- LanguageLoader.prototype.getTranslation = function (lang) {
514
- var _this = this;
515
- var translation = require("../locale/" + lang + ".json");
516
- var igoLocale$ = rxjs.of(translation);
517
- if (this.config && !this.prefix) {
518
- var prefix = this.config.getConfig('language.prefix');
519
- this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];
520
- }
521
- if (!this.prefix || this.prefix.length === 0) {
522
- return igoLocale$;
523
- }
524
- var appLocale$ = this.prefix.map(function (prefix) { return _this.http.get("" + prefix + lang + _this.suffix); });
525
- var locale$ = rxjs.combineLatest(__spread([igoLocale$], appLocale$));
526
- return locale$.pipe(operators.map(function (translations) {
527
- return translations.reduce(function (acc, current) { return utils.ObjectUtils.mergeDeep(acc, current); }, {});
528
- }));
529
- };
530
- return LanguageLoader;
545
+ var LanguageLoader = /** @class */ (function () {
546
+ function LanguageLoader(http, prefix, suffix, config) {
547
+ if (suffix === void 0) { suffix = '.json'; }
548
+ this.http = http;
549
+ this.prefix = prefix;
550
+ this.suffix = suffix;
551
+ this.config = config;
552
+ }
553
+ LanguageLoader.prototype.getTranslation = function (lang) {
554
+ var _this = this;
555
+ var translation = require("../locale/" + lang + ".json");
556
+ var igoLocale$ = rxjs.of(translation);
557
+ if (this.config && !this.prefix) {
558
+ var prefix = this.config.getConfig('language.prefix');
559
+ this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];
560
+ }
561
+ if (!this.prefix || this.prefix.length === 0) {
562
+ return igoLocale$;
563
+ }
564
+ var appLocale$ = this.prefix.map(function (prefix) { return _this.http.get("" + prefix + lang + _this.suffix); });
565
+ var locale$ = rxjs.combineLatest(__spreadArray([igoLocale$], __read(appLocale$)));
566
+ return locale$.pipe(operators.map(function (translations) {
567
+ return translations.reduce(function (acc, current) { return utils.ObjectUtils.mergeDeep(acc, current); }, {});
568
+ }));
569
+ };
570
+ return LanguageLoader;
531
571
  }());
532
572
 
533
- function defaultLanguageLoader(http, config) {
534
- return new LanguageLoader(http, undefined, undefined, config);
535
- }
536
- function provideLanguageLoader(loader) {
537
- return {
538
- provide: i1.TranslateLoader,
539
- useFactory: loader || defaultLanguageLoader,
540
- deps: [http.HttpClient]
541
- };
542
- }
543
- function provideDefaultLanguageLoader(loader) {
544
- return {
545
- provide: i1.TranslateLoader,
546
- useFactory: loader || defaultLanguageLoader,
547
- deps: [http.HttpClient, ConfigService]
548
- };
573
+ function defaultLanguageLoader(http, config) {
574
+ return new LanguageLoader(http, undefined, undefined, config);
575
+ }
576
+ function provideLanguageLoader(loader) {
577
+ return {
578
+ provide: i1.TranslateLoader,
579
+ useFactory: loader || defaultLanguageLoader,
580
+ deps: [http.HttpClient]
581
+ };
582
+ }
583
+ function provideDefaultLanguageLoader(loader) {
584
+ return {
585
+ provide: i1.TranslateLoader,
586
+ useFactory: loader || defaultLanguageLoader,
587
+ deps: [http.HttpClient, ConfigService]
588
+ };
549
589
  }
550
590
 
551
- var IgoMissingTranslationHandler = /** @class */ (function () {
552
- function IgoMissingTranslationHandler() {
553
- }
554
- IgoMissingTranslationHandler.prototype.handle = function (params) {
555
- if (!params.translateService.langs.length) {
556
- var error = 'Translations are not yet loaded. \
557
- Check that the LanguageService is injected.';
558
- throw new Error(error);
559
- }
560
- if (params.key.substr(0, 4) === 'igo.') {
561
- throw new Error("The Key \"" + params.key + "\" is missing in locale file.");
562
- }
563
- else {
564
- return params.key;
565
- }
566
- };
567
- return IgoMissingTranslationHandler;
591
+ var IgoMissingTranslationHandler = /** @class */ (function () {
592
+ function IgoMissingTranslationHandler() {
593
+ }
594
+ IgoMissingTranslationHandler.prototype.handle = function (params) {
595
+ if (!params.translateService.langs.length) {
596
+ var error = 'Translations are not yet loaded. \
597
+ Check that the LanguageService is injected.';
598
+ throw new Error(error);
599
+ }
600
+ if (params.key.substr(0, 4) === 'igo.') {
601
+ throw new Error("The Key \"" + params.key + "\" is missing in locale file.");
602
+ }
603
+ else {
604
+ return params.key;
605
+ }
606
+ };
607
+ return IgoMissingTranslationHandler;
568
608
  }());
569
609
 
570
- var IgoLanguageModule = /** @class */ (function () {
571
- function IgoLanguageModule() {
572
- }
573
- IgoLanguageModule.forRoot = function () {
574
- return {
575
- ngModule: IgoLanguageModule,
576
- providers: [provideDefaultLanguageLoader()]
577
- };
578
- };
579
- return IgoLanguageModule;
580
- }());
581
- IgoLanguageModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoLanguageModule });
582
- IgoLanguageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoLanguageModule_Factory(t) { return new (t || IgoLanguageModule)(); }, imports: [[
583
- i1.TranslateModule.forRoot({
584
- missingTranslationHandler: {
585
- provide: i1.MissingTranslationHandler,
586
- useClass: IgoMissingTranslationHandler
587
- }
588
- })
589
- ], i1.TranslateModule] });
590
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1.TranslateModule], exports: [i1.TranslateModule] }); })();
591
- /*@__PURE__*/ (function () {
592
- i0.ɵsetClassMetadata(IgoLanguageModule, [{
593
- type: i0.NgModule,
594
- args: [{
595
- imports: [
596
- i1.TranslateModule.forRoot({
597
- missingTranslationHandler: {
598
- provide: i1.MissingTranslationHandler,
599
- useClass: IgoMissingTranslationHandler
600
- }
601
- })
602
- ],
603
- declarations: [],
604
- exports: [i1.TranslateModule]
605
- }]
606
- }], null, null);
607
- })();
610
+ var IgoLanguageModule = /** @class */ (function () {
611
+ function IgoLanguageModule() {
612
+ }
613
+ IgoLanguageModule.forRoot = function () {
614
+ return {
615
+ ngModule: IgoLanguageModule,
616
+ providers: [provideDefaultLanguageLoader()]
617
+ };
618
+ };
619
+ return IgoLanguageModule;
620
+ }());
621
+ IgoLanguageModule.ɵfac = function IgoLanguageModule_Factory(t) { return new (t || IgoLanguageModule)(); };
622
+ IgoLanguageModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoLanguageModule });
623
+ IgoLanguageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
624
+ i1.TranslateModule.forRoot({
625
+ missingTranslationHandler: {
626
+ provide: i1.MissingTranslationHandler,
627
+ useClass: IgoMissingTranslationHandler
628
+ }
629
+ })
630
+ ], i1.TranslateModule] });
631
+ (function () {
632
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoLanguageModule, [{
633
+ type: i0.NgModule,
634
+ args: [{
635
+ imports: [
636
+ i1.TranslateModule.forRoot({
637
+ missingTranslationHandler: {
638
+ provide: i1.MissingTranslationHandler,
639
+ useClass: IgoMissingTranslationHandler
640
+ }
641
+ })
642
+ ],
643
+ declarations: [],
644
+ exports: [i1.TranslateModule]
645
+ }]
646
+ }], null, null);
647
+ })();
648
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoLanguageModule, { imports: [i1__namespace.TranslateModule], exports: [i1.TranslateModule] }); })();
608
649
 
609
- var _c0 = function (a0) { return { closeIcon: a0 }; };
610
- var MessageCenterComponent = /** @class */ (function () {
611
- function MessageCenterComponent() {
612
- this._options = {};
613
- }
614
- Object.defineProperty(MessageCenterComponent.prototype, "options", {
615
- get: function () {
616
- return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
617
- },
618
- set: function (value) {
619
- this._options = value;
620
- },
621
- enumerable: false,
622
- configurable: true
623
- });
624
- return MessageCenterComponent;
625
- }());
626
- MessageCenterComponent.defaultOptions = {
627
- timeOut: 5000,
628
- hasCloseIcon: false,
629
- showProgressBar: true,
630
- pauseOnHover: true,
631
- clickToClose: true,
632
- maxLength: 100,
633
- maxStack: 3,
634
- preventDuplicates: true
635
- };
636
- MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
637
- MessageCenterComponent.ɵcmp = 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) {
638
- if (rf & 1) {
639
- i0.ɵɵelement(0, "simple-notifications", 0);
640
- }
641
- if (rf & 2) {
642
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
643
- }
644
- }, directives: [i1$1.SimpleNotificationsComponent, i2.NgClass], styles: ["@charset \"UTF-8\";[_nghost-%COMP%] div.simple-notification-wrapper{bottom:0;right:calc(50% - 150px)}@media only screen and (orientation:landscape) and (max-width:959px),only screen and (orientation:portrait) and (max-width:599px){[_nghost-%COMP%] div.simple-notification-wrapper{left:0;right:0;width:100%}}[_nghost-%COMP%] div.simple-notification{margin-bottom:5px;min-height:50px;padding-left:45px;padding-right:25px}[_nghost-%COMP%] div.simple-notification.noIcon{padding-left:25px}@media only screen and (orientation:landscape) and (max-width:959px),only screen and (orientation:portrait) and (max-width:599px){[_nghost-%COMP%] div.simple-notification{margin-bottom:0}}[_nghost-%COMP%] div.simple-notification .sn-title{font-size:15px;font-weight:700;line-height:23px}[_nghost-%COMP%] div.simple-notification .sn-content{font-size:15px;line-height:18px}[_nghost-%COMP%] div.simple-notification .icon{height:100%;left:0;padding:7px;top:0;width:45px}[_nghost-%COMP%] div.simple-notification .icon\u00A0 mat-icon{align-items:center;display:flex;font-size:32px;height:100%}[_nghost-%COMP%] .closeIcon .sn-title:after{content:\"close\";font-family:Material Icons;font-feature-settings:\"liga\" 1;font-size:24px;font-weight:400;position:absolute;right:5px;top:5px}"] });
645
- /*@__PURE__*/ (function () {
646
- i0.ɵsetClassMetadata(MessageCenterComponent, [{
647
- type: i0.Component,
648
- args: [{
649
- selector: 'igo-message-center',
650
- templateUrl: './message-center.component.html',
651
- styleUrls: ['./message-center.component.scss']
652
- }]
653
- }], function () { return []; }, { options: [{
654
- type: i0.Input
655
- }] });
650
+ var _c0 = function (a0) { return { closeIcon: a0 }; };
651
+ var MessageCenterComponent = /** @class */ (function () {
652
+ function MessageCenterComponent() {
653
+ this._options = {};
654
+ }
655
+ Object.defineProperty(MessageCenterComponent.prototype, "options", {
656
+ get: function () {
657
+ return Object.assign({}, MessageCenterComponent.defaultOptions, this._options);
658
+ },
659
+ set: function (value) {
660
+ this._options = value;
661
+ },
662
+ enumerable: false,
663
+ configurable: true
664
+ });
665
+ return MessageCenterComponent;
666
+ }());
667
+ MessageCenterComponent.defaultOptions = {
668
+ timeOut: 5000,
669
+ hasCloseIcon: false,
670
+ showProgressBar: true,
671
+ pauseOnHover: true,
672
+ clickToClose: true,
673
+ maxLength: 100,
674
+ maxStack: 3,
675
+ preventDuplicates: true
676
+ };
677
+ MessageCenterComponent.ɵfac = function MessageCenterComponent_Factory(t) { return new (t || MessageCenterComponent)(); };
678
+ 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) {
679
+ if (rf & 1) {
680
+ i0__namespace.ɵɵelement(0, "simple-notifications", 0);
681
+ }
682
+ if (rf & 2) {
683
+ i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(2, _c0, ctx.options.hasCloseIcon))("options", ctx.options);
684
+ }
685
+ }, 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}"] });
686
+ (function () {
687
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageCenterComponent, [{
688
+ type: i0.Component,
689
+ args: [{
690
+ selector: 'igo-message-center',
691
+ templateUrl: './message-center.component.html',
692
+ styleUrls: ['./message-center.component.scss']
693
+ }]
694
+ }], function () { return []; }, { options: [{
695
+ type: i0.Input
696
+ }] });
656
697
  })();
657
698
 
658
- var IgoMessageModule = /** @class */ (function () {
659
- function IgoMessageModule() {
660
- }
661
- IgoMessageModule.forRoot = function () {
662
- return {
663
- ngModule: IgoMessageModule,
664
- providers: []
665
- };
666
- };
667
- return IgoMessageModule;
668
- }());
669
- IgoMessageModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoMessageModule });
670
- IgoMessageModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); }, imports: [[i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()]] });
671
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [i2.CommonModule, i1$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
672
- /*@__PURE__*/ (function () {
673
- i0.ɵsetClassMetadata(IgoMessageModule, [{
674
- type: i0.NgModule,
675
- args: [{
676
- imports: [i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()],
677
- declarations: [MessageCenterComponent],
678
- exports: [MessageCenterComponent]
679
- }]
680
- }], null, null);
681
- })();
699
+ var IgoMessageModule = /** @class */ (function () {
700
+ function IgoMessageModule() {
701
+ }
702
+ IgoMessageModule.forRoot = function () {
703
+ return {
704
+ ngModule: IgoMessageModule,
705
+ providers: []
706
+ };
707
+ };
708
+ return IgoMessageModule;
709
+ }());
710
+ IgoMessageModule.ɵfac = function IgoMessageModule_Factory(t) { return new (t || IgoMessageModule)(); };
711
+ IgoMessageModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoMessageModule });
712
+ IgoMessageModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()]] });
713
+ (function () {
714
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoMessageModule, [{
715
+ type: i0.NgModule,
716
+ args: [{
717
+ imports: [i2.CommonModule, i1$1.SimpleNotificationsModule.forRoot()],
718
+ declarations: [MessageCenterComponent],
719
+ exports: [MessageCenterComponent]
720
+ }]
721
+ }], null, null);
722
+ })();
723
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoMessageModule, { declarations: [MessageCenterComponent], imports: [i2.CommonModule, i1__namespace$1.SimpleNotificationsModule], exports: [MessageCenterComponent] }); })();
682
724
 
683
- var LanguageService = /** @class */ (function () {
684
- function LanguageService(translate) {
685
- this.translate = translate;
686
- this.language = this.translate.getBrowserLang();
687
- var lang = this.getLanguage();
688
- this.translate.setDefaultLang(lang);
689
- }
690
- LanguageService.prototype.getLanguage = function () {
691
- return this.language.match(/en|fr/) ? this.language : 'en';
692
- };
693
- LanguageService.prototype.setLanguage = function (language) {
694
- this.language = language.match(/en|fr/) ? language : 'en';
695
- this.translate.use(this.language);
696
- this.translate.reloadLang(this.language);
697
- };
698
- return LanguageService;
699
- }());
700
- LanguageService.ɵfac = function LanguageService_Factory(t) { return new (t || LanguageService)(i0.ɵɵinject(i1.TranslateService)); };
701
- LanguageService.ɵprov = i0.ɵɵdefineInjectable({ token: LanguageService, factory: LanguageService.ɵfac, providedIn: 'root' });
702
- /*@__PURE__*/ (function () {
703
- i0.ɵsetClassMetadata(LanguageService, [{
704
- type: i0.Injectable,
705
- args: [{
706
- providedIn: 'root'
707
- }]
708
- }], function () { return [{ type: i1.TranslateService }]; }, null);
725
+ var LanguageService = /** @class */ (function () {
726
+ function LanguageService(translate) {
727
+ this.translate = translate;
728
+ this.language = this.translate.getBrowserLang();
729
+ var lang = this.getLanguage();
730
+ this.translate.setDefaultLang(lang);
731
+ }
732
+ LanguageService.prototype.getLanguage = function () {
733
+ return this.language.match(/en|fr/) ? this.language : 'en';
734
+ };
735
+ LanguageService.prototype.setLanguage = function (language) {
736
+ this.language = language.match(/en|fr/) ? language : 'en';
737
+ this.translate.use(this.language);
738
+ this.translate.reloadLang(this.language);
739
+ };
740
+ return LanguageService;
741
+ }());
742
+ LanguageService.ɵfac = function LanguageService_Factory(t) { return new (t || LanguageService)(i0__namespace.ɵɵinject(i1__namespace.TranslateService)); };
743
+ LanguageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: LanguageService, factory: LanguageService.ɵfac, providedIn: 'root' });
744
+ (function () {
745
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LanguageService, [{
746
+ type: i0.Injectable,
747
+ args: [{
748
+ providedIn: 'root'
749
+ }]
750
+ }], function () { return [{ type: i1__namespace.TranslateService }]; }, null);
709
751
  })();
710
752
 
711
- (function (MessageType) {
712
- MessageType["ERROR"] = "error";
713
- MessageType["ALERT"] = "alert";
714
- MessageType["INFO"] = "info";
715
- MessageType["SUCCESS"] = "success";
753
+ exports.MessageType = void 0;
754
+ (function (MessageType) {
755
+ MessageType["ERROR"] = "error";
756
+ MessageType["ALERT"] = "alert";
757
+ MessageType["INFO"] = "info";
758
+ MessageType["SUCCESS"] = "success";
716
759
  })(exports.MessageType || (exports.MessageType = {}));
717
760
 
718
- var MessageService = /** @class */ (function () {
719
- function MessageService(notificationService, configService) {
720
- this.notificationService = notificationService;
721
- this.configService = configService;
722
- this.messages$ = new rxjs.BehaviorSubject([]);
723
- this.options = this.configService.getConfig('message') || {};
724
- }
725
- MessageService.prototype.showError = function (httpError) {
726
- httpError.error.caught = true;
727
- return this.error(httpError.error.message, httpError.error.title);
728
- };
729
- MessageService.prototype.message = function (message) {
730
- this.messages$.next(this.messages$.value.concat([message]));
731
- message.options = message.options || {};
732
- var currentDate = new Date();
733
- message.options.from = message.options.from ? message.options.from : new Date('1 jan 1900');
734
- message.options.to = message.options.to ? message.options.to : new Date('1 jan 3000');
735
- if (typeof message.options.from === 'string') {
736
- message.options.from = new Date(Date.parse(message.options.from.replace(/-/g, ' ')));
737
- }
738
- if (typeof message.options.to === 'string') {
739
- message.options.to = new Date(Date.parse(message.options.to.replace(/-/g, ' ')));
740
- }
741
- if (currentDate > message.options.from && currentDate < message.options.to) {
742
- message = this.handleTemplate(message);
743
- var notification = void 0;
744
- if (message.text) {
745
- notification = this.notificationService.create(message.title, message.text, message.type, message.options);
746
- }
747
- else if (message.html) {
748
- if (!message.icon) {
749
- message.options.theClass = message.options.theClass
750
- ? message.options.theClass + ' noIcon'
751
- : 'noIcon';
752
- }
753
- notification = this.notificationService.html(message.html, message.type, message.options);
754
- }
755
- else {
756
- return;
757
- }
758
- if (message.icon !== undefined) {
759
- this.addIcon(notification, message.icon);
760
- }
761
- return notification;
762
- }
763
- return;
764
- };
765
- MessageService.prototype.success = function (text, title, options) {
766
- if (options === void 0) { options = {}; }
767
- return this.message({
768
- text: text,
769
- title: title,
770
- icon: options.icon || 'check',
771
- options: options,
772
- type: exports.MessageType.SUCCESS
773
- });
774
- };
775
- MessageService.prototype.error = function (text, title, options) {
776
- if (options === void 0) { options = {}; }
777
- return this.message({
778
- text: text,
779
- title: title,
780
- icon: options.icon || 'error_outline',
781
- options: options,
782
- type: exports.MessageType.ERROR
783
- });
784
- };
785
- MessageService.prototype.info = function (text, title, options) {
786
- if (options === void 0) { options = {}; }
787
- return this.message({
788
- text: text,
789
- title: title,
790
- icon: options.icon || 'info_outline',
791
- options: options,
792
- type: exports.MessageType.INFO
793
- });
794
- };
795
- MessageService.prototype.alert = function (text, title, options) {
796
- if (options === void 0) { options = {}; }
797
- return this.message({
798
- text: text,
799
- title: title,
800
- icon: options.icon || 'access_alarm',
801
- options: options,
802
- type: exports.MessageType.ALERT
803
- });
804
- };
805
- MessageService.prototype.remove = function (id) {
806
- this.notificationService.remove(id);
807
- };
808
- MessageService.prototype.addIcon = function (notification, icon) {
809
- // There is no way to add an icon to a notification when reating
810
- // it so we simply set it on the notification directly.
811
- // See https://github.com/flauc/angular2-notifications/issues/165
812
- notification.icon = "\n <mat-icon class=\"material-icons mat-icon mat-list-avatar\" svgIcon=\"" + icon + "\">\n </mat-icon>";
813
- };
814
- MessageService.prototype.handleTemplate = function (message) {
815
- if (!this.options.template || message.html) {
816
- return message;
817
- }
818
- var html = this.options.template;
819
- html = html.replace('${text}', message.text);
820
- html = html.replace('${title}', message.title);
821
- html = html.replace('${icon}', message.icon);
822
- message.html = html;
823
- message.text = undefined;
824
- message.title = undefined;
825
- message.icon = undefined;
826
- return message;
827
- };
828
- return MessageService;
829
- }());
830
- MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0.ɵɵinject(i1$1.NotificationsService), i0.ɵɵinject(ConfigService)); };
831
- MessageService.ɵprov = i0.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
832
- /*@__PURE__*/ (function () {
833
- i0.ɵsetClassMetadata(MessageService, [{
834
- type: i0.Injectable,
835
- args: [{
836
- providedIn: 'root'
837
- }]
838
- }], function () { return [{ type: i1$1.NotificationsService }, { type: ConfigService }]; }, null);
761
+ var MessageService = /** @class */ (function () {
762
+ function MessageService(notificationService, configService) {
763
+ this.notificationService = notificationService;
764
+ this.configService = configService;
765
+ this.messages$ = new rxjs.BehaviorSubject([]);
766
+ this.options = this.configService.getConfig('message') || {};
767
+ }
768
+ MessageService.prototype.showError = function (httpError) {
769
+ httpError.error.caught = true;
770
+ return this.error(httpError.error.message, httpError.error.title);
771
+ };
772
+ MessageService.prototype.message = function (message) {
773
+ this.messages$.next(this.messages$.value.concat([message]));
774
+ message.options = message.options || {};
775
+ var currentDate = new Date();
776
+ message.options.from = message.options.from ? message.options.from : new Date('1 jan 1900');
777
+ message.options.to = message.options.to ? message.options.to : new Date('1 jan 3000');
778
+ if (typeof message.options.from === 'string') {
779
+ message.options.from = new Date(Date.parse(message.options.from.replace(/-/g, ' ')));
780
+ }
781
+ if (typeof message.options.to === 'string') {
782
+ message.options.to = new Date(Date.parse(message.options.to.replace(/-/g, ' ')));
783
+ }
784
+ if (currentDate > message.options.from && currentDate < message.options.to) {
785
+ message = this.handleTemplate(message);
786
+ var notification = void 0;
787
+ if (message.text) {
788
+ notification = this.notificationService.create(message.title, message.text, message.type, message.options);
789
+ }
790
+ else if (message.html) {
791
+ if (!message.icon) {
792
+ message.options.theClass = message.options.theClass
793
+ ? message.options.theClass + ' noIcon'
794
+ : 'noIcon';
795
+ }
796
+ notification = this.notificationService.html(message.html, message.type, message.options);
797
+ }
798
+ else {
799
+ return;
800
+ }
801
+ if (message.icon !== undefined) {
802
+ this.addIcon(notification, message.icon);
803
+ }
804
+ message.options.id = notification.id;
805
+ return notification;
806
+ }
807
+ return;
808
+ };
809
+ MessageService.prototype.success = function (text, title, options) {
810
+ if (options === void 0) { options = {}; }
811
+ return this.message({
812
+ text: text,
813
+ title: title,
814
+ icon: options.icon || 'check',
815
+ options: options,
816
+ type: exports.MessageType.SUCCESS
817
+ });
818
+ };
819
+ MessageService.prototype.error = function (text, title, options) {
820
+ if (options === void 0) { options = {}; }
821
+ return this.message({
822
+ text: text,
823
+ title: title,
824
+ icon: options.icon || 'error_outline',
825
+ options: options,
826
+ type: exports.MessageType.ERROR
827
+ });
828
+ };
829
+ MessageService.prototype.info = function (text, title, options) {
830
+ if (options === void 0) { options = {}; }
831
+ return this.message({
832
+ text: text,
833
+ title: title,
834
+ icon: options.icon || 'info_outline',
835
+ options: options,
836
+ type: exports.MessageType.INFO
837
+ });
838
+ };
839
+ MessageService.prototype.alert = function (text, title, options) {
840
+ if (options === void 0) { options = {}; }
841
+ return this.message({
842
+ text: text,
843
+ title: title,
844
+ icon: options.icon || 'access_alarm',
845
+ options: options,
846
+ type: exports.MessageType.ALERT
847
+ });
848
+ };
849
+ MessageService.prototype.remove = function (id) {
850
+ this.notificationService.remove(id);
851
+ };
852
+ MessageService.prototype.removeAllAreNotError = function () {
853
+ var e_1, _a;
854
+ try {
855
+ for (var _b = __values(this.messages$.value), _c = _b.next(); !_c.done; _c = _b.next()) {
856
+ var mess = _c.value;
857
+ if (mess.type !== 'error') {
858
+ this.remove(mess.options.id);
859
+ }
860
+ }
861
+ }
862
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
863
+ finally {
864
+ try {
865
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
866
+ }
867
+ finally { if (e_1) throw e_1.error; }
868
+ }
869
+ };
870
+ MessageService.prototype.addIcon = function (notification, icon) {
871
+ // There is no way to add an icon to a notification when reating
872
+ // it so we simply set it on the notification directly.
873
+ // See https://github.com/flauc/angular2-notifications/issues/165
874
+ notification.icon = "\n <mat-icon class=\"material-icons mat-icon mat-list-avatar\" svgIcon=\"" + icon + "\">\n </mat-icon>";
875
+ };
876
+ MessageService.prototype.handleTemplate = function (message) {
877
+ if (!this.options.template || message.html) {
878
+ return message;
879
+ }
880
+ var html = this.options.template;
881
+ html = html.replace('${text}', message.text);
882
+ html = html.replace('${title}', message.title);
883
+ html = html.replace('${icon}', message.icon);
884
+ message.html = html;
885
+ message.text = undefined;
886
+ message.title = undefined;
887
+ message.icon = undefined;
888
+ return message;
889
+ };
890
+ return MessageService;
891
+ }());
892
+ MessageService.ɵfac = function MessageService_Factory(t) { return new (t || MessageService)(i0__namespace.ɵɵinject(i1__namespace$1.NotificationsService), i0__namespace.ɵɵinject(ConfigService)); };
893
+ MessageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: MessageService, factory: MessageService.ɵfac, providedIn: 'root' });
894
+ (function () {
895
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MessageService, [{
896
+ type: i0.Injectable,
897
+ args: [{
898
+ providedIn: 'root'
899
+ }]
900
+ }], function () { return [{ type: i1__namespace$1.NotificationsService }, { type: ConfigService }]; }, null);
839
901
  })();
840
902
 
841
- var ErrorInterceptor = /** @class */ (function () {
842
- function ErrorInterceptor(messageService, injector) {
843
- this.messageService = messageService;
844
- this.injector = injector;
845
- }
846
- ErrorInterceptor.prototype.intercept = function (req, next) {
847
- var _this = this;
848
- var errorContainer = { httpError: undefined };
849
- return next.handle(req).pipe(operators.catchError(function (error) { return _this.handleError(error, errorContainer); }), operators.finalize(function () {
850
- _this.handleCaughtError(errorContainer);
851
- _this.handleUncaughtError(errorContainer);
852
- }));
853
- };
854
- ErrorInterceptor.prototype.handleError = function (httpError, errorContainer) {
855
- if (httpError instanceof http.HttpErrorResponse) {
856
- var errorObj = httpError.error === 'object' ? httpError.error : {};
857
- errorObj.message = httpError.error.message || httpError.statusText;
858
- errorObj.caught = false;
859
- httpError = new http.HttpErrorResponse({
860
- error: errorObj,
861
- headers: httpError.headers,
862
- status: httpError.status,
863
- statusText: httpError.statusText,
864
- url: httpError.url
865
- });
866
- }
867
- errorContainer.httpError = httpError;
868
- return rxjs.throwError(httpError);
869
- };
870
- ErrorInterceptor.prototype.handleCaughtError = function (errorContainer) {
871
- var httpError = errorContainer.httpError;
872
- if (httpError && httpError.error.toDisplay) {
873
- httpError.error.caught = true;
874
- this.messageService.error(httpError.error.message, httpError.error.title);
875
- }
876
- };
877
- ErrorInterceptor.prototype.handleUncaughtError = function (errorContainer) {
878
- var httpError = errorContainer.httpError;
879
- if (httpError && !httpError.error.caught) {
880
- var translate = this.injector.get(LanguageService).translate;
881
- var message = translate.instant('igo.core.errors.uncaught.message');
882
- var title = translate.instant('igo.core.errors.uncaught.title');
883
- httpError.error.caught = true;
884
- this.messageService.error(message, title);
885
- }
886
- };
887
- return ErrorInterceptor;
888
- }());
889
- ErrorInterceptor.ɵfac = function ErrorInterceptor_Factory(t) { return new (t || ErrorInterceptor)(i0.ɵɵinject(MessageService), i0.ɵɵinject(i0.Injector)); };
890
- ErrorInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorInterceptor, factory: ErrorInterceptor.ɵfac, providedIn: 'root' });
891
- /*@__PURE__*/ (function () {
892
- i0.ɵsetClassMetadata(ErrorInterceptor, [{
893
- type: i0.Injectable,
894
- args: [{
895
- providedIn: 'root'
896
- }]
897
- }], function () { return [{ type: MessageService }, { type: i0.Injector }]; }, null);
903
+ var ErrorInterceptor = /** @class */ (function () {
904
+ function ErrorInterceptor(messageService, injector) {
905
+ this.messageService = messageService;
906
+ this.injector = injector;
907
+ }
908
+ ErrorInterceptor.prototype.intercept = function (req, next) {
909
+ var _this = this;
910
+ var errorContainer = { httpError: undefined };
911
+ return next.handle(req).pipe(operators.catchError(function (error) { return _this.handleError(error, errorContainer); }), operators.finalize(function () {
912
+ _this.handleCaughtError(errorContainer);
913
+ _this.handleUncaughtError(errorContainer);
914
+ }));
915
+ };
916
+ ErrorInterceptor.prototype.handleError = function (httpError, errorContainer) {
917
+ if (httpError instanceof http.HttpErrorResponse) {
918
+ var errorObj = httpError.error === 'object' ? httpError.error : {};
919
+ errorObj.message = httpError.error.message || httpError.statusText;
920
+ errorObj.caught = false;
921
+ httpError = new http.HttpErrorResponse({
922
+ error: errorObj,
923
+ headers: httpError.headers,
924
+ status: httpError.status,
925
+ statusText: httpError.statusText,
926
+ url: httpError.url
927
+ });
928
+ }
929
+ errorContainer.httpError = httpError;
930
+ return rxjs.throwError(httpError);
931
+ };
932
+ ErrorInterceptor.prototype.handleCaughtError = function (errorContainer) {
933
+ var httpError = errorContainer.httpError;
934
+ if (httpError && httpError.error.toDisplay) {
935
+ httpError.error.caught = true;
936
+ this.messageService.error(httpError.error.message, httpError.error.title);
937
+ }
938
+ };
939
+ ErrorInterceptor.prototype.handleUncaughtError = function (errorContainer) {
940
+ var httpError = errorContainer.httpError;
941
+ if (httpError && !httpError.error.caught) {
942
+ var translate = this.injector.get(LanguageService).translate;
943
+ var message = translate.instant('igo.core.errors.uncaught.message');
944
+ var title = translate.instant('igo.core.errors.uncaught.title');
945
+ httpError.error.caught = true;
946
+ this.messageService.error(message, title);
947
+ }
948
+ };
949
+ return ErrorInterceptor;
950
+ }());
951
+ ErrorInterceptor.ɵfac = function ErrorInterceptor_Factory(t) { return new (t || ErrorInterceptor)(i0__namespace.ɵɵinject(MessageService), i0__namespace.ɵɵinject(i0__namespace.Injector)); };
952
+ ErrorInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: ErrorInterceptor, factory: ErrorInterceptor.ɵfac, providedIn: 'root' });
953
+ (function () {
954
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ErrorInterceptor, [{
955
+ type: i0.Injectable,
956
+ args: [{
957
+ providedIn: 'root'
958
+ }]
959
+ }], function () { return [{ type: MessageService }, { type: i0__namespace.Injector }]; }, null);
898
960
  })();
899
961
 
900
- var IgoErrorModule = /** @class */ (function () {
901
- function IgoErrorModule(parentModule) {
902
- if (parentModule) {
903
- throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
904
- }
905
- }
906
- IgoErrorModule.forRoot = function () {
907
- return {
908
- ngModule: IgoErrorModule,
909
- providers: [
910
- {
911
- provide: http.HTTP_INTERCEPTORS,
912
- useClass: ErrorInterceptor,
913
- multi: true
914
- }
915
- ]
916
- };
917
- };
918
- return IgoErrorModule;
919
- }());
920
- IgoErrorModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoErrorModule });
921
- IgoErrorModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoErrorModule_Factory(t) { return new (t || IgoErrorModule)(i0.ɵɵinject(IgoErrorModule, 12)); }, imports: [[]] });
922
- /*@__PURE__*/ (function () {
923
- i0.ɵsetClassMetadata(IgoErrorModule, [{
924
- type: i0.NgModule,
925
- args: [{
926
- imports: [],
927
- declarations: [],
928
- exports: []
929
- }]
930
- }], function () {
931
- return [{ type: IgoErrorModule, decorators: [{
932
- type: i0.Optional
933
- }, {
934
- type: i0.SkipSelf
935
- }] }];
936
- }, null);
962
+ var IgoErrorModule = /** @class */ (function () {
963
+ function IgoErrorModule(parentModule) {
964
+ if (parentModule) {
965
+ throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
966
+ }
967
+ }
968
+ IgoErrorModule.forRoot = function () {
969
+ return {
970
+ ngModule: IgoErrorModule,
971
+ providers: [
972
+ {
973
+ provide: http.HTTP_INTERCEPTORS,
974
+ useClass: ErrorInterceptor,
975
+ multi: true
976
+ }
977
+ ]
978
+ };
979
+ };
980
+ return IgoErrorModule;
981
+ }());
982
+ IgoErrorModule.ɵfac = function IgoErrorModule_Factory(t) { return new (t || IgoErrorModule)(i0__namespace.ɵɵinject(IgoErrorModule, 12)); };
983
+ IgoErrorModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoErrorModule });
984
+ IgoErrorModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
985
+ (function () {
986
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoErrorModule, [{
987
+ type: i0.NgModule,
988
+ args: [{
989
+ imports: [],
990
+ declarations: [],
991
+ exports: []
992
+ }]
993
+ }], function () {
994
+ return [{ type: IgoErrorModule, decorators: [{
995
+ type: i0.Optional
996
+ }, {
997
+ type: i0.SkipSelf
998
+ }] }];
999
+ }, null);
937
1000
  })();
938
1001
 
939
- var IgoCoreModule = /** @class */ (function () {
940
- function IgoCoreModule(matIconRegistry, domSanitizer) {
941
- matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/igo2/core/icons/mdi.svg'));
942
- }
943
- IgoCoreModule.forRoot = function () {
944
- return {
945
- ngModule: IgoCoreModule,
946
- providers: []
947
- };
948
- };
949
- return IgoCoreModule;
950
- }());
951
- IgoCoreModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoCoreModule });
952
- IgoCoreModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0.ɵɵinject(i6.MatIconRegistry), i0.ɵɵinject(i7.DomSanitizer)); }, imports: [[
953
- i2.CommonModule,
954
- http.HttpClientModule,
955
- IgoActivityModule.forRoot(),
956
- IgoConfigModule.forRoot(),
957
- IgoErrorModule.forRoot(),
958
- IgoLanguageModule.forRoot(),
959
- IgoMessageModule.forRoot()
960
- ], IgoActivityModule,
961
- IgoConfigModule,
962
- IgoErrorModule,
963
- IgoLanguageModule,
964
- IgoMessageModule] });
965
- (function () {
966
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [i2.CommonModule,
967
- http.HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
968
- IgoConfigModule,
969
- IgoErrorModule,
970
- IgoLanguageModule,
971
- IgoMessageModule] });
972
- })();
973
- /*@__PURE__*/ (function () {
974
- i0.ɵsetClassMetadata(IgoCoreModule, [{
975
- type: i0.NgModule,
976
- args: [{
977
- imports: [
978
- i2.CommonModule,
979
- http.HttpClientModule,
980
- IgoActivityModule.forRoot(),
981
- IgoConfigModule.forRoot(),
982
- IgoErrorModule.forRoot(),
983
- IgoLanguageModule.forRoot(),
984
- IgoMessageModule.forRoot()
985
- ],
986
- declarations: [],
987
- exports: [
988
- IgoActivityModule,
989
- IgoConfigModule,
990
- IgoErrorModule,
991
- IgoLanguageModule,
992
- IgoMessageModule
993
- ]
994
- }]
995
- }], function () { return [{ type: i6.MatIconRegistry }, { type: i7.DomSanitizer }]; }, null);
1002
+ var IgoCoreModule = /** @class */ (function () {
1003
+ function IgoCoreModule(matIconRegistry, domSanitizer) {
1004
+ matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/igo2/core/icons/mdi.svg'));
1005
+ }
1006
+ IgoCoreModule.forRoot = function () {
1007
+ return {
1008
+ ngModule: IgoCoreModule,
1009
+ providers: []
1010
+ };
1011
+ };
1012
+ return IgoCoreModule;
1013
+ }());
1014
+ IgoCoreModule.ɵfac = function IgoCoreModule_Factory(t) { return new (t || IgoCoreModule)(i0__namespace.ɵɵinject(i1__namespace$2.MatIconRegistry), i0__namespace.ɵɵinject(i2__namespace$1.DomSanitizer)); };
1015
+ IgoCoreModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoCoreModule });
1016
+ IgoCoreModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
1017
+ i2.CommonModule,
1018
+ http.HttpClientModule,
1019
+ IgoActivityModule.forRoot(),
1020
+ IgoConfigModule.forRoot(),
1021
+ IgoErrorModule.forRoot(),
1022
+ IgoLanguageModule.forRoot(),
1023
+ IgoMessageModule.forRoot()
1024
+ ], IgoActivityModule,
1025
+ IgoConfigModule,
1026
+ IgoErrorModule,
1027
+ IgoLanguageModule,
1028
+ IgoMessageModule] });
1029
+ (function () {
1030
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoCoreModule, [{
1031
+ type: i0.NgModule,
1032
+ args: [{
1033
+ imports: [
1034
+ i2.CommonModule,
1035
+ http.HttpClientModule,
1036
+ IgoActivityModule.forRoot(),
1037
+ IgoConfigModule.forRoot(),
1038
+ IgoErrorModule.forRoot(),
1039
+ IgoLanguageModule.forRoot(),
1040
+ IgoMessageModule.forRoot()
1041
+ ],
1042
+ declarations: [],
1043
+ exports: [
1044
+ IgoActivityModule,
1045
+ IgoConfigModule,
1046
+ IgoErrorModule,
1047
+ IgoLanguageModule,
1048
+ IgoMessageModule
1049
+ ]
1050
+ }]
1051
+ }], function () { return [{ type: i1__namespace$2.MatIconRegistry }, { type: i2__namespace$1.DomSanitizer }]; }, null);
1052
+ })();
1053
+ (function () {
1054
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoCoreModule, { imports: [i2.CommonModule,
1055
+ http.HttpClientModule, IgoActivityModule, IgoConfigModule, IgoErrorModule, IgoLanguageModule, IgoMessageModule], exports: [IgoActivityModule,
1056
+ IgoConfigModule,
1057
+ IgoErrorModule,
1058
+ IgoLanguageModule,
1059
+ IgoMessageModule] });
996
1060
  })();
997
1061
 
998
- var IgoGestureConfig = /** @class */ (function (_super) {
999
- __extends(IgoGestureConfig, _super);
1000
- function IgoGestureConfig() {
1001
- return _super !== null && _super.apply(this, arguments) || this;
1002
- }
1003
- IgoGestureConfig.prototype.buildHammer = function (element) {
1004
- var mc = _super.prototype.buildHammer.call(this, element);
1005
- mc.set({ touchAction: 'pan-y' });
1006
- return mc;
1007
- };
1008
- return IgoGestureConfig;
1009
- }(i7.HammerGestureConfig));
1010
- IgoGestureConfig.ɵfac = function IgoGestureConfig_Factory(t) { return ɵIgoGestureConfig_BaseFactory(t || IgoGestureConfig); };
1011
- IgoGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ token: IgoGestureConfig, factory: IgoGestureConfig.ɵfac });
1012
- var ɵIgoGestureConfig_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(IgoGestureConfig);
1013
- /*@__PURE__*/ (function () {
1014
- i0.ɵsetClassMetadata(IgoGestureConfig, [{
1015
- type: i0.Injectable
1016
- }], null, null);
1062
+ var IgoGestureConfig = /** @class */ (function (_super) {
1063
+ __extends(IgoGestureConfig, _super);
1064
+ function IgoGestureConfig() {
1065
+ return _super !== null && _super.apply(this, arguments) || this;
1066
+ }
1067
+ IgoGestureConfig.prototype.buildHammer = function (element) {
1068
+ var mc = _super.prototype.buildHammer.call(this, element);
1069
+ mc.set({ touchAction: 'pan-y' });
1070
+ return mc;
1071
+ };
1072
+ return IgoGestureConfig;
1073
+ }(i2$1.HammerGestureConfig));
1074
+ IgoGestureConfig.ɵfac = /*@__PURE__*/ function () { var ɵIgoGestureConfig_BaseFactory; return function IgoGestureConfig_Factory(t) { return (ɵIgoGestureConfig_BaseFactory || (ɵIgoGestureConfig_BaseFactory = i0__namespace.ɵɵgetInheritedFactory(IgoGestureConfig)))(t || IgoGestureConfig); }; }();
1075
+ IgoGestureConfig.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: IgoGestureConfig, factory: IgoGestureConfig.ɵfac });
1076
+ (function () {
1077
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoGestureConfig, [{
1078
+ type: i0.Injectable
1079
+ }], null, null);
1017
1080
  })();
1018
1081
 
1019
- var IgoGestureModule = /** @class */ (function () {
1020
- function IgoGestureModule() {
1021
- }
1022
- IgoGestureModule.forRoot = function () {
1023
- return {
1024
- ngModule: IgoGestureModule,
1025
- providers: [
1026
- {
1027
- provide: i7.HAMMER_GESTURE_CONFIG,
1028
- useClass: IgoGestureConfig
1029
- }
1030
- ]
1031
- };
1032
- };
1033
- return IgoGestureModule;
1034
- }());
1035
- IgoGestureModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoGestureModule });
1036
- IgoGestureModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoGestureModule_Factory(t) { return new (t || IgoGestureModule)(); }, imports: [[i7.HammerModule]] });
1037
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i7.HammerModule] }); })();
1038
- /*@__PURE__*/ (function () {
1039
- i0.ɵsetClassMetadata(IgoGestureModule, [{
1040
- type: i0.NgModule,
1041
- args: [{
1042
- imports: [i7.HammerModule],
1043
- declarations: [],
1044
- exports: []
1045
- }]
1046
- }], null, null);
1047
- })();
1082
+ var IgoGestureModule = /** @class */ (function () {
1083
+ function IgoGestureModule() {
1084
+ }
1085
+ IgoGestureModule.forRoot = function () {
1086
+ return {
1087
+ ngModule: IgoGestureModule,
1088
+ providers: [
1089
+ {
1090
+ provide: i2$1.HAMMER_GESTURE_CONFIG,
1091
+ useClass: IgoGestureConfig
1092
+ }
1093
+ ]
1094
+ };
1095
+ };
1096
+ return IgoGestureModule;
1097
+ }());
1098
+ IgoGestureModule.ɵfac = function IgoGestureModule_Factory(t) { return new (t || IgoGestureModule)(); };
1099
+ IgoGestureModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoGestureModule });
1100
+ IgoGestureModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[i2$1.HammerModule]] });
1101
+ (function () {
1102
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoGestureModule, [{
1103
+ type: i0.NgModule,
1104
+ args: [{
1105
+ imports: [i2$1.HammerModule],
1106
+ declarations: [],
1107
+ exports: []
1108
+ }]
1109
+ }], null, null);
1110
+ })();
1111
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(IgoGestureModule, { imports: [i2$1.HammerModule] }); })();
1048
1112
 
1049
- var LoggingInterceptor = /** @class */ (function () {
1050
- function LoggingInterceptor() {
1051
- }
1052
- LoggingInterceptor.prototype.intercept = function (req, next) {
1053
- var started = Date.now();
1054
- var ok;
1055
- // extend server response observable with logging
1056
- return next.handle(req).pipe(operators.tap(
1057
- // Succeeds when there is a response; ignore other events
1058
- function (event) { return (ok = event instanceof http.HttpResponse ? 'succeeded' : ''); },
1059
- // Operation failed; error is an HttpErrorResponse
1060
- function (error) { return (ok = 'failed'); }),
1061
- // Log when response observable either completes or errors
1062
- operators.finalize(function () {
1063
- var elapsed = Date.now() - started;
1064
- var msg = req.method + " \"" + req.urlWithParams + "\"\n " + ok + " in " + elapsed + " ms.";
1065
- console.log(msg);
1066
- }));
1067
- };
1068
- return LoggingInterceptor;
1069
- }());
1070
- LoggingInterceptor.ɵfac = function LoggingInterceptor_Factory(t) { return new (t || LoggingInterceptor)(); };
1071
- LoggingInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: LoggingInterceptor, factory: LoggingInterceptor.ɵfac });
1072
- /*@__PURE__*/ (function () {
1073
- i0.ɵsetClassMetadata(LoggingInterceptor, [{
1074
- type: i0.Injectable
1075
- }], null, null);
1113
+ var LoggingInterceptor = /** @class */ (function () {
1114
+ function LoggingInterceptor() {
1115
+ }
1116
+ LoggingInterceptor.prototype.intercept = function (req, next) {
1117
+ var started = Date.now();
1118
+ var ok;
1119
+ // extend server response observable with logging
1120
+ return next.handle(req).pipe(operators.tap(
1121
+ // Succeeds when there is a response; ignore other events
1122
+ function (event) { return (ok = event instanceof http.HttpResponse ? 'succeeded' : ''); },
1123
+ // Operation failed; error is an HttpErrorResponse
1124
+ function (error) { return (ok = 'failed'); }),
1125
+ // Log when response observable either completes or errors
1126
+ operators.finalize(function () {
1127
+ var elapsed = Date.now() - started;
1128
+ var msg = req.method + " \"" + req.urlWithParams + "\"\n " + ok + " in " + elapsed + " ms.";
1129
+ console.log(msg);
1130
+ }));
1131
+ };
1132
+ return LoggingInterceptor;
1133
+ }());
1134
+ LoggingInterceptor.ɵfac = function LoggingInterceptor_Factory(t) { return new (t || LoggingInterceptor)(); };
1135
+ LoggingInterceptor.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: LoggingInterceptor, factory: LoggingInterceptor.ɵfac });
1136
+ (function () {
1137
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(LoggingInterceptor, [{
1138
+ type: i0.Injectable
1139
+ }], null, null);
1076
1140
  })();
1077
1141
 
1078
- var IgoLoggingModule = /** @class */ (function () {
1079
- function IgoLoggingModule() {
1080
- }
1081
- IgoLoggingModule.forRoot = function () {
1082
- return {
1083
- ngModule: IgoLoggingModule,
1084
- providers: [
1085
- {
1086
- provide: http.HTTP_INTERCEPTORS,
1087
- useClass: LoggingInterceptor,
1088
- multi: true
1089
- }
1090
- ]
1091
- };
1092
- };
1093
- return IgoLoggingModule;
1094
- }());
1095
- IgoLoggingModule.ɵmod = i0.ɵɵdefineNgModule({ type: IgoLoggingModule });
1096
- IgoLoggingModule.ɵinj = i0.ɵɵdefineInjector({ factory: function IgoLoggingModule_Factory(t) { return new (t || IgoLoggingModule)(); }, imports: [[]] });
1097
- /*@__PURE__*/ (function () {
1098
- i0.ɵsetClassMetadata(IgoLoggingModule, [{
1099
- type: i0.NgModule,
1100
- args: [{
1101
- imports: [],
1102
- declarations: [],
1103
- exports: []
1104
- }]
1105
- }], null, null);
1142
+ var IgoLoggingModule = /** @class */ (function () {
1143
+ function IgoLoggingModule() {
1144
+ }
1145
+ IgoLoggingModule.forRoot = function () {
1146
+ return {
1147
+ ngModule: IgoLoggingModule,
1148
+ providers: [
1149
+ {
1150
+ provide: http.HTTP_INTERCEPTORS,
1151
+ useClass: LoggingInterceptor,
1152
+ multi: true
1153
+ }
1154
+ ]
1155
+ };
1156
+ };
1157
+ return IgoLoggingModule;
1158
+ }());
1159
+ IgoLoggingModule.ɵfac = function IgoLoggingModule_Factory(t) { return new (t || IgoLoggingModule)(); };
1160
+ IgoLoggingModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: IgoLoggingModule });
1161
+ IgoLoggingModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[]] });
1162
+ (function () {
1163
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(IgoLoggingModule, [{
1164
+ type: i0.NgModule,
1165
+ args: [{
1166
+ imports: [],
1167
+ declarations: [],
1168
+ exports: []
1169
+ }]
1170
+ }], null, null);
1106
1171
  })();
1107
1172
 
1108
- var ROUTE_SERVICE_OPTIONS = new i0.InjectionToken('routeServiceOptions');
1109
- function provideRouteServiceOptions(options) {
1110
- return {
1111
- provide: ROUTE_SERVICE_OPTIONS,
1112
- useValue: options
1113
- };
1114
- }
1115
- var RouteService = /** @class */ (function () {
1116
- function RouteService(route, options) {
1117
- this.route = route;
1118
- var defaultOptions = {
1119
- centerKey: 'center',
1120
- zoomKey: 'zoom',
1121
- projectionKey: 'projection',
1122
- contextKey: 'context',
1123
- searchKey: 'search',
1124
- visibleOnLayersKey: 'visiblelayers',
1125
- visibleOffLayersKey: 'invisiblelayers',
1126
- directionsCoordKey: 'routing',
1127
- toolKey: 'tool',
1128
- wmsUrlKey: 'wmsUrl',
1129
- wmsLayersKey: 'wmsLayers',
1130
- wmtsUrlKey: 'wmtsUrl',
1131
- wmtsLayersKey: 'wmtsLayers',
1132
- arcgisUrlKey: 'arcgisUrl',
1133
- arcgisLayersKey: 'arcgisLayers',
1134
- iarcgisUrlKey: 'iarcgisUrl',
1135
- iarcgisLayersKey: 'iarcgisLayers',
1136
- tarcgisUrlKey: 'tarcgisUrl',
1137
- tarcgisLayersKey: 'tarcgisLayers',
1138
- vectorKey: 'vector'
1139
- };
1140
- this.options = Object.assign({}, defaultOptions, options);
1141
- }
1142
- Object.defineProperty(RouteService.prototype, "queryParams", {
1143
- get: function () {
1144
- return this.route.queryParams;
1145
- },
1146
- enumerable: false,
1147
- configurable: true
1148
- });
1149
- return RouteService;
1150
- }());
1151
- RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0.ɵɵinject(i1$2.ActivatedRoute), i0.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1152
- RouteService.ɵprov = i0.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
1153
- /*@__PURE__*/ (function () {
1154
- i0.ɵsetClassMetadata(RouteService, [{
1155
- type: i0.Injectable,
1156
- args: [{
1157
- providedIn: 'root'
1158
- }]
1159
- }], function () {
1160
- return [{ type: i1$2.ActivatedRoute }, { type: undefined, decorators: [{
1161
- type: i0.Inject,
1162
- args: [ROUTE_SERVICE_OPTIONS]
1163
- }, {
1164
- type: i0.Optional
1165
- }] }];
1166
- }, null);
1173
+ var ROUTE_SERVICE_OPTIONS = new i0.InjectionToken('routeServiceOptions');
1174
+ function provideRouteServiceOptions(options) {
1175
+ return {
1176
+ provide: ROUTE_SERVICE_OPTIONS,
1177
+ useValue: options
1178
+ };
1179
+ }
1180
+ var RouteService = /** @class */ (function () {
1181
+ function RouteService(route, options) {
1182
+ this.route = route;
1183
+ var defaultOptions = {
1184
+ centerKey: 'center',
1185
+ zoomKey: 'zoom',
1186
+ projectionKey: 'projection',
1187
+ contextKey: 'context',
1188
+ searchKey: 'search',
1189
+ visibleOnLayersKey: 'visiblelayers',
1190
+ visibleOffLayersKey: 'invisiblelayers',
1191
+ directionsCoordKey: 'routing',
1192
+ toolKey: 'tool',
1193
+ wmsUrlKey: 'wmsUrl',
1194
+ wmsLayersKey: 'wmsLayers',
1195
+ wmtsUrlKey: 'wmtsUrl',
1196
+ wmtsLayersKey: 'wmtsLayers',
1197
+ arcgisUrlKey: 'arcgisUrl',
1198
+ arcgisLayersKey: 'arcgisLayers',
1199
+ iarcgisUrlKey: 'iarcgisUrl',
1200
+ iarcgisLayersKey: 'iarcgisLayers',
1201
+ tarcgisUrlKey: 'tarcgisUrl',
1202
+ tarcgisLayersKey: 'tarcgisLayers',
1203
+ vectorKey: 'vector'
1204
+ };
1205
+ this.options = Object.assign({}, defaultOptions, options);
1206
+ }
1207
+ Object.defineProperty(RouteService.prototype, "queryParams", {
1208
+ get: function () {
1209
+ return this.route.queryParams;
1210
+ },
1211
+ enumerable: false,
1212
+ configurable: true
1213
+ });
1214
+ return RouteService;
1215
+ }());
1216
+ RouteService.ɵfac = function RouteService_Factory(t) { return new (t || RouteService)(i0__namespace.ɵɵinject(i1__namespace$3.ActivatedRoute), i0__namespace.ɵɵinject(ROUTE_SERVICE_OPTIONS, 8)); };
1217
+ RouteService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: RouteService, factory: RouteService.ɵfac, providedIn: 'root' });
1218
+ (function () {
1219
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RouteService, [{
1220
+ type: i0.Injectable,
1221
+ args: [{
1222
+ providedIn: 'root'
1223
+ }]
1224
+ }], function () {
1225
+ return [{ type: i1__namespace$3.ActivatedRoute }, { type: undefined, decorators: [{
1226
+ type: i0.Inject,
1227
+ args: [ROUTE_SERVICE_OPTIONS]
1228
+ }, {
1229
+ type: i0.Optional
1230
+ }] }];
1231
+ }, null);
1167
1232
  })();
1168
1233
 
1169
- var AnalyticsService = /** @class */ (function () {
1170
- function AnalyticsService(config) {
1171
- this.config = config;
1172
- this.options = this.config.getConfig('analytics') || {};
1173
- if (this.options.provider === 'matomo') {
1174
- this.initMatomo();
1175
- }
1176
- }
1177
- Object.defineProperty(AnalyticsService.prototype, "paq", {
1178
- get: function () {
1179
- return (window._paq = window._paq || []);
1180
- },
1181
- enumerable: false,
1182
- configurable: true
1183
- });
1184
- AnalyticsService.prototype.initMatomo = function () {
1185
- var _this = this;
1186
- if (!this.options.url || !this.options.id) {
1187
- return;
1188
- }
1189
- var url = this.options.url.substr(-1) === '/'
1190
- ? this.options.url + 'matomo'
1191
- : this.options.url;
1192
- // this.paq.push(['trackPageView']);
1193
- // this.paq.push(['enableLinkTracking']);
1194
- (function () {
1195
- _this.paq.push(['setTrackerUrl', url + '.php']);
1196
- _this.paq.push(['setSiteId', _this.options.id]);
1197
- var g = document.createElement('script');
1198
- var s = document.getElementsByTagName('script')[0];
1199
- g.type = 'text/javascript';
1200
- g.async = true;
1201
- g.defer = true;
1202
- g.src = url + '.js';
1203
- s.parentNode.insertBefore(g, s);
1204
- })();
1205
- };
1206
- AnalyticsService.prototype.setUser = function (user, profils) {
1207
- if (this.options.provider === 'matomo') {
1208
- if (!user) {
1209
- this.paq.push(['resetUserId']);
1210
- this.paq.push(['deleteCustomVariable', 1, 'user']);
1211
- this.paq.push(['deleteCustomVariable', 2, 'name']);
1212
- this.paq.push(['deleteCustomVariable', 3, 'profils']);
1213
- }
1214
- else {
1215
- this.paq.push(['setUserId', user.id]);
1216
- var name = user.firstName + " " + user.lastName;
1217
- this.paq.push(['setCustomVariable', 1, 'user', user.sourceId, 'visit']);
1218
- this.paq.push(['setCustomVariable', 2, 'name', name, 'visit']);
1219
- this.paq.push(['setCustomVariable', 3, 'profils', profils, 'visit']);
1220
- }
1221
- this.paq.push(['trackPageView']);
1222
- this.paq.push(['enableLinkTracking']);
1223
- }
1224
- };
1225
- AnalyticsService.prototype.trackSearch = function (term, nbResults) {
1226
- if (this.options.provider === 'matomo') {
1227
- this.paq.push(['trackSiteSearch', term, false, nbResults]);
1228
- }
1229
- };
1230
- AnalyticsService.prototype.trackEvent = function (category, action, name) {
1231
- if (this.options.provider === 'matomo') {
1232
- this.paq.push(['trackEvent', category, action, name]);
1233
- }
1234
- };
1235
- return AnalyticsService;
1236
- }());
1237
- AnalyticsService.ɵfac = function AnalyticsService_Factory(t) { return new (t || AnalyticsService)(i0.ɵɵinject(ConfigService)); };
1238
- AnalyticsService.ɵprov = i0.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' });
1239
- /*@__PURE__*/ (function () {
1240
- i0.ɵsetClassMetadata(AnalyticsService, [{
1241
- type: i0.Injectable,
1242
- args: [{
1243
- providedIn: 'root'
1244
- }]
1245
- }], function () { return [{ type: ConfigService }]; }, null);
1234
+ var AnalyticsService = /** @class */ (function () {
1235
+ function AnalyticsService(config) {
1236
+ this.config = config;
1237
+ this.options = this.config.getConfig('analytics') || {};
1238
+ if (this.options.provider === 'matomo') {
1239
+ this.initMatomo();
1240
+ }
1241
+ }
1242
+ Object.defineProperty(AnalyticsService.prototype, "paq", {
1243
+ get: function () {
1244
+ return (window._paq = window._paq || []);
1245
+ },
1246
+ enumerable: false,
1247
+ configurable: true
1248
+ });
1249
+ AnalyticsService.prototype.initMatomo = function () {
1250
+ var _this = this;
1251
+ if (!this.options.url || !this.options.id) {
1252
+ return;
1253
+ }
1254
+ var url = this.options.url.substr(-1) === '/'
1255
+ ? this.options.url + 'matomo'
1256
+ : this.options.url;
1257
+ // this.paq.push(['trackPageView']);
1258
+ // this.paq.push(['enableLinkTracking']);
1259
+ (function () {
1260
+ _this.paq.push(['setTrackerUrl', url + '.php']);
1261
+ _this.paq.push(['setSiteId', _this.options.id]);
1262
+ var g = document.createElement('script');
1263
+ var s = document.getElementsByTagName('script')[0];
1264
+ g.type = 'text/javascript';
1265
+ g.async = true;
1266
+ g.defer = true;
1267
+ g.src = url + '.js';
1268
+ s.parentNode.insertBefore(g, s);
1269
+ })();
1270
+ };
1271
+ AnalyticsService.prototype.setUser = function (user, profils) {
1272
+ if (this.options.provider === 'matomo') {
1273
+ if (!user) {
1274
+ this.paq.push(['resetUserId']);
1275
+ this.paq.push(['deleteCustomVariable', 1, 'user']);
1276
+ this.paq.push(['deleteCustomVariable', 2, 'name']);
1277
+ this.paq.push(['deleteCustomVariable', 3, 'profils']);
1278
+ }
1279
+ else {
1280
+ this.paq.push(['setUserId', user.id]);
1281
+ var name = user.firstName + " " + user.lastName;
1282
+ this.paq.push(['setCustomVariable', 1, 'user', user.sourceId, 'visit']);
1283
+ this.paq.push(['setCustomVariable', 2, 'name', name, 'visit']);
1284
+ this.paq.push(['setCustomVariable', 3, 'profils', profils, 'visit']);
1285
+ }
1286
+ this.paq.push(['trackPageView']);
1287
+ this.paq.push(['enableLinkTracking']);
1288
+ }
1289
+ };
1290
+ AnalyticsService.prototype.trackSearch = function (term, nbResults) {
1291
+ if (this.options.provider === 'matomo') {
1292
+ this.paq.push(['trackSiteSearch', term, false, nbResults]);
1293
+ }
1294
+ };
1295
+ AnalyticsService.prototype.trackEvent = function (category, action, name) {
1296
+ if (this.options.provider === 'matomo') {
1297
+ this.paq.push(['trackEvent', category, action, name]);
1298
+ }
1299
+ };
1300
+ return AnalyticsService;
1301
+ }());
1302
+ AnalyticsService.ɵfac = function AnalyticsService_Factory(t) { return new (t || AnalyticsService)(i0__namespace.ɵɵinject(ConfigService)); };
1303
+ AnalyticsService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' });
1304
+ (function () {
1305
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(AnalyticsService, [{
1306
+ type: i0.Injectable,
1307
+ args: [{
1308
+ providedIn: 'root'
1309
+ }]
1310
+ }], function () { return [{ type: ConfigService }]; }, null);
1246
1311
  })();
1247
1312
 
1248
- (function (Media) {
1249
- Media["Mobile"] = "mobile";
1250
- Media["Tablet"] = "tablet";
1251
- Media["Desktop"] = "desktop";
1252
- })(exports.Media || (exports.Media = {}));
1253
- (function (MediaOrientation) {
1254
- MediaOrientation["Portrait"] = "portrait";
1255
- MediaOrientation["Landscape"] = "landscape";
1313
+ exports.Media = void 0;
1314
+ (function (Media) {
1315
+ Media["Mobile"] = "mobile";
1316
+ Media["Tablet"] = "tablet";
1317
+ Media["Desktop"] = "desktop";
1318
+ })(exports.Media || (exports.Media = {}));
1319
+ exports.MediaOrientation = void 0;
1320
+ (function (MediaOrientation) {
1321
+ MediaOrientation["Portrait"] = "portrait";
1322
+ MediaOrientation["Landscape"] = "landscape";
1256
1323
  })(exports.MediaOrientation || (exports.MediaOrientation = {}));
1257
1324
 
1258
- var MediaService = /** @class */ (function () {
1259
- function MediaService(breakpointObserver) {
1260
- var _this = this;
1261
- this.media$ = new rxjs.BehaviorSubject(undefined);
1262
- this.orientation$ = new rxjs.BehaviorSubject(undefined);
1263
- breakpointObserver
1264
- .observe([i1$3.Breakpoints.HandsetLandscape])
1265
- .subscribe(function (res) {
1266
- if (res.matches) {
1267
- _this.media$.next(exports.Media.Mobile);
1268
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1269
- }
1270
- });
1271
- breakpointObserver.observe([i1$3.Breakpoints.HandsetPortrait]).subscribe(function (res) {
1272
- if (res.matches) {
1273
- _this.media$.next(exports.Media.Mobile);
1274
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1275
- }
1276
- });
1277
- breakpointObserver.observe([i1$3.Breakpoints.TabletLandscape]).subscribe(function (res) {
1278
- if (res.matches) {
1279
- _this.media$.next(exports.Media.Tablet);
1280
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1281
- }
1282
- });
1283
- breakpointObserver.observe([i1$3.Breakpoints.TabletPortrait]).subscribe(function (res) {
1284
- if (res.matches) {
1285
- _this.media$.next(exports.Media.Tablet);
1286
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1287
- }
1288
- });
1289
- breakpointObserver.observe([i1$3.Breakpoints.WebLandscape]).subscribe(function (res) {
1290
- if (res.matches) {
1291
- _this.media$.next(exports.Media.Desktop);
1292
- _this.orientation$.next(exports.MediaOrientation.Landscape);
1293
- }
1294
- });
1295
- breakpointObserver.observe([i1$3.Breakpoints.WebPortrait]).subscribe(function (res) {
1296
- if (res.matches) {
1297
- _this.media$.next(exports.Media.Desktop);
1298
- _this.orientation$.next(exports.MediaOrientation.Portrait);
1299
- }
1300
- });
1301
- }
1302
- MediaService.prototype.getMedia = function () {
1303
- return this.media$.value;
1304
- };
1305
- MediaService.prototype.getOrientation = function () {
1306
- return this.orientation$.value;
1307
- };
1308
- MediaService.prototype.isTouchScreen = function () {
1309
- return 'ontouchstart' in document.documentElement ? true : false;
1310
- };
1311
- MediaService.prototype.isMobile = function () {
1312
- var media = this.getMedia();
1313
- return media === 'mobile';
1314
- };
1315
- MediaService.prototype.isDesktop = function () {
1316
- var media = this.getMedia();
1317
- return media === 'desktop';
1318
- };
1319
- return MediaService;
1320
- }());
1321
- MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0.ɵɵinject(i1$3.BreakpointObserver)); };
1322
- MediaService.ɵprov = i0.ɵɵdefineInjectable({ token: MediaService, factory: MediaService.ɵfac, providedIn: 'root' });
1323
- /*@__PURE__*/ (function () {
1324
- i0.ɵsetClassMetadata(MediaService, [{
1325
- type: i0.Injectable,
1326
- args: [{
1327
- providedIn: 'root'
1328
- }]
1329
- }], function () { return [{ type: i1$3.BreakpointObserver }]; }, null);
1325
+ var MediaService = /** @class */ (function () {
1326
+ function MediaService(breakpointObserver) {
1327
+ var _this = this;
1328
+ this.media$ = new rxjs.BehaviorSubject(undefined);
1329
+ this.orientation$ = new rxjs.BehaviorSubject(undefined);
1330
+ breakpointObserver
1331
+ .observe([i1$4.Breakpoints.HandsetLandscape])
1332
+ .subscribe(function (res) {
1333
+ if (res.matches) {
1334
+ _this.media$.next(exports.Media.Mobile);
1335
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1336
+ }
1337
+ });
1338
+ breakpointObserver.observe([i1$4.Breakpoints.HandsetPortrait]).subscribe(function (res) {
1339
+ if (res.matches) {
1340
+ _this.media$.next(exports.Media.Mobile);
1341
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1342
+ }
1343
+ });
1344
+ breakpointObserver.observe([i1$4.Breakpoints.TabletLandscape]).subscribe(function (res) {
1345
+ if (res.matches) {
1346
+ _this.media$.next(exports.Media.Tablet);
1347
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1348
+ }
1349
+ });
1350
+ breakpointObserver.observe([i1$4.Breakpoints.TabletPortrait]).subscribe(function (res) {
1351
+ if (res.matches) {
1352
+ _this.media$.next(exports.Media.Tablet);
1353
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1354
+ }
1355
+ });
1356
+ breakpointObserver.observe([i1$4.Breakpoints.WebLandscape]).subscribe(function (res) {
1357
+ if (res.matches) {
1358
+ _this.media$.next(exports.Media.Desktop);
1359
+ _this.orientation$.next(exports.MediaOrientation.Landscape);
1360
+ }
1361
+ });
1362
+ breakpointObserver.observe([i1$4.Breakpoints.WebPortrait]).subscribe(function (res) {
1363
+ if (res.matches) {
1364
+ _this.media$.next(exports.Media.Desktop);
1365
+ _this.orientation$.next(exports.MediaOrientation.Portrait);
1366
+ }
1367
+ });
1368
+ }
1369
+ MediaService.prototype.getMedia = function () {
1370
+ return this.media$.value;
1371
+ };
1372
+ MediaService.prototype.getOrientation = function () {
1373
+ return this.orientation$.value;
1374
+ };
1375
+ MediaService.prototype.isTouchScreen = function () {
1376
+ return 'ontouchstart' in document.documentElement ? true : false;
1377
+ };
1378
+ MediaService.prototype.isMobile = function () {
1379
+ var media = this.getMedia();
1380
+ return media === 'mobile';
1381
+ };
1382
+ MediaService.prototype.isDesktop = function () {
1383
+ var media = this.getMedia();
1384
+ return media === 'desktop';
1385
+ };
1386
+ return MediaService;
1387
+ }());
1388
+ MediaService.ɵfac = function MediaService_Factory(t) { return new (t || MediaService)(i0__namespace.ɵɵinject(i1__namespace$4.BreakpointObserver)); };
1389
+ MediaService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: MediaService, factory: MediaService.ɵfac, providedIn: 'root' });
1390
+ (function () {
1391
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MediaService, [{
1392
+ type: i0.Injectable,
1393
+ args: [{
1394
+ providedIn: 'root'
1395
+ }]
1396
+ }], function () { return [{ type: i1__namespace$4.BreakpointObserver }]; }, null);
1330
1397
  })();
1331
1398
 
1332
- (function (StorageScope) {
1333
- StorageScope["SESSION"] = "Session";
1334
- StorageScope["LOCAL"] = "Local";
1335
- })(exports.StorageScope || (exports.StorageScope = {}));
1336
- (function (StorageServiceEventEnum) {
1337
- StorageServiceEventEnum["ADDED"] = "Added";
1338
- StorageServiceEventEnum["MODIFIED"] = "Modified";
1339
- StorageServiceEventEnum["REMOVED"] = "Removed";
1340
- StorageServiceEventEnum["CLEARED"] = "Cleared";
1399
+ exports.StorageScope = void 0;
1400
+ (function (StorageScope) {
1401
+ StorageScope["SESSION"] = "Session";
1402
+ StorageScope["LOCAL"] = "Local";
1403
+ })(exports.StorageScope || (exports.StorageScope = {}));
1404
+ exports.StorageServiceEventEnum = void 0;
1405
+ (function (StorageServiceEventEnum) {
1406
+ StorageServiceEventEnum["ADDED"] = "Added";
1407
+ StorageServiceEventEnum["MODIFIED"] = "Modified";
1408
+ StorageServiceEventEnum["REMOVED"] = "Removed";
1409
+ StorageServiceEventEnum["CLEARED"] = "Cleared";
1341
1410
  })(exports.StorageServiceEventEnum || (exports.StorageServiceEventEnum = {}));
1342
1411
 
1343
- var StorageService = /** @class */ (function () {
1344
- function StorageService(config) {
1345
- this.config = config;
1346
- this.storageChange$ = new rxjs.BehaviorSubject(undefined);
1347
- this.options = this.config.getConfig('storage') || { key: 'igo' };
1348
- }
1349
- /**
1350
- * Use to get the data found in storage file
1351
- */
1352
- StorageService.prototype.get = function (key, scope) {
1353
- var value;
1354
- if (!scope || scope === exports.StorageScope.SESSION) {
1355
- value = sessionStorage.getItem(this.options.key + "." + key);
1356
- }
1357
- if (scope === exports.StorageScope.LOCAL || (!value && !scope)) {
1358
- value = localStorage.getItem(this.options.key + "." + key);
1359
- }
1360
- if (value) {
1361
- try {
1362
- value = JSON.parse(value);
1363
- }
1364
- catch (_a) {
1365
- value = value;
1366
- }
1367
- }
1368
- return value;
1369
- };
1370
- StorageService.prototype.set = function (key, value, scope) {
1371
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1372
- var previousValue = this.get(key, scope);
1373
- if (scope === exports.StorageScope.SESSION) {
1374
- sessionStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1375
- }
1376
- else {
1377
- localStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1378
- }
1379
- var currentValue = this.get(key, scope);
1380
- if (currentValue !== previousValue) {
1381
- this.storageChange$.next({
1382
- key: key, scope: scope,
1383
- event: previousValue !== undefined ? exports.StorageServiceEventEnum.MODIFIED : exports.StorageServiceEventEnum.ADDED,
1384
- previousValue: previousValue,
1385
- currentValue: currentValue
1386
- });
1387
- }
1388
- };
1389
- StorageService.prototype.remove = function (key, scope) {
1390
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1391
- var previousValue = this.get(key, scope);
1392
- if (scope === exports.StorageScope.SESSION) {
1393
- sessionStorage.removeItem(this.options.key + "." + key);
1394
- }
1395
- else {
1396
- localStorage.removeItem(this.options.key + "." + key);
1397
- }
1398
- this.storageChange$.next({ key: key, scope: scope, event: exports.StorageServiceEventEnum.REMOVED, previousValue: previousValue });
1399
- };
1400
- StorageService.prototype.clear = function (scope) {
1401
- if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1402
- if (scope === exports.StorageScope.SESSION) {
1403
- sessionStorage.clear();
1404
- }
1405
- else {
1406
- localStorage.clear();
1407
- }
1408
- this.storageChange$.next({ scope: scope, event: exports.StorageServiceEventEnum.CLEARED });
1409
- };
1410
- return StorageService;
1411
- }());
1412
- StorageService.ɵfac = function StorageService_Factory(t) { return new (t || StorageService)(i0.ɵɵinject(ConfigService)); };
1413
- StorageService.ɵprov = i0.ɵɵdefineInjectable({ token: StorageService, factory: StorageService.ɵfac, providedIn: 'root' });
1414
- /*@__PURE__*/ (function () {
1415
- i0.ɵsetClassMetadata(StorageService, [{
1416
- type: i0.Injectable,
1417
- args: [{
1418
- providedIn: 'root'
1419
- }]
1420
- }], function () { return [{ type: ConfigService }]; }, null);
1412
+ var StorageService = /** @class */ (function () {
1413
+ function StorageService(config) {
1414
+ this.config = config;
1415
+ this.storageChange$ = new rxjs.BehaviorSubject(undefined);
1416
+ this.options = this.config.getConfig('storage') || { key: 'igo' };
1417
+ }
1418
+ /**
1419
+ * Use to get the data found in storage file
1420
+ */
1421
+ StorageService.prototype.get = function (key, scope) {
1422
+ var value;
1423
+ if (!scope || scope === exports.StorageScope.SESSION) {
1424
+ value = sessionStorage.getItem(this.options.key + "." + key);
1425
+ }
1426
+ if (scope === exports.StorageScope.LOCAL || (!value && !scope)) {
1427
+ value = localStorage.getItem(this.options.key + "." + key);
1428
+ }
1429
+ if (value) {
1430
+ try {
1431
+ value = JSON.parse(value);
1432
+ }
1433
+ catch (_a) {
1434
+ value = value;
1435
+ }
1436
+ }
1437
+ return value;
1438
+ };
1439
+ StorageService.prototype.set = function (key, value, scope) {
1440
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1441
+ var previousValue = this.get(key, scope);
1442
+ if (scope === exports.StorageScope.SESSION) {
1443
+ sessionStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1444
+ }
1445
+ else {
1446
+ localStorage.setItem(this.options.key + "." + key, JSON.stringify(value));
1447
+ }
1448
+ var currentValue = this.get(key, scope);
1449
+ if (currentValue !== previousValue) {
1450
+ this.storageChange$.next({
1451
+ key: key,
1452
+ scope: scope,
1453
+ event: previousValue !== undefined ? exports.StorageServiceEventEnum.MODIFIED : exports.StorageServiceEventEnum.ADDED,
1454
+ previousValue: previousValue,
1455
+ currentValue: currentValue
1456
+ });
1457
+ }
1458
+ };
1459
+ StorageService.prototype.remove = function (key, scope) {
1460
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1461
+ var previousValue = this.get(key, scope);
1462
+ if (scope === exports.StorageScope.SESSION) {
1463
+ sessionStorage.removeItem(this.options.key + "." + key);
1464
+ }
1465
+ else {
1466
+ localStorage.removeItem(this.options.key + "." + key);
1467
+ }
1468
+ this.storageChange$.next({ key: key, scope: scope, event: exports.StorageServiceEventEnum.REMOVED, previousValue: previousValue });
1469
+ };
1470
+ StorageService.prototype.clear = function (scope) {
1471
+ if (scope === void 0) { scope = exports.StorageScope.LOCAL; }
1472
+ if (scope === exports.StorageScope.SESSION) {
1473
+ sessionStorage.clear();
1474
+ }
1475
+ else {
1476
+ localStorage.clear();
1477
+ }
1478
+ this.storageChange$.next({ scope: scope, event: exports.StorageServiceEventEnum.CLEARED });
1479
+ };
1480
+ return StorageService;
1481
+ }());
1482
+ StorageService.ɵfac = function StorageService_Factory(t) { return new (t || StorageService)(i0__namespace.ɵɵinject(ConfigService)); };
1483
+ StorageService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: StorageService, factory: StorageService.ɵfac, providedIn: 'root' });
1484
+ (function () {
1485
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(StorageService, [{
1486
+ type: i0.Injectable,
1487
+ args: [{
1488
+ providedIn: 'root'
1489
+ }]
1490
+ }], function () { return [{ type: ConfigService }]; }, null);
1421
1491
  })();
1422
1492
 
1423
- var NetworkService = /** @class */ (function () {
1424
- function NetworkService(messageService, injector) {
1425
- this.messageService = messageService;
1426
- this.injector = injector;
1427
- this.stateChangeEventEmitter = new i0.EventEmitter();
1428
- this.state = {
1429
- connection: window.navigator.onLine
1430
- };
1431
- this.checkNetworkState();
1432
- }
1433
- NetworkService.prototype.checkNetworkState = function () {
1434
- var _this = this;
1435
- this.onlineSubscription = rxjs.fromEvent(window, 'online').subscribe(function () {
1436
- var translate = _this.injector.get(LanguageService).translate;
1437
- var message = translate.instant('igo.core.network.online.message');
1438
- var title = translate.instant('igo.core.network.online.title');
1439
- _this.messageService.info(message, title);
1440
- _this.state.connection = true;
1441
- _this.emitEvent();
1442
- });
1443
- this.offlineSubscription = rxjs.fromEvent(window, 'offline').subscribe(function () {
1444
- var translate = _this.injector.get(LanguageService).translate;
1445
- var message = translate.instant('igo.core.network.offline.message');
1446
- var title = translate.instant('igo.core.network.offline.title');
1447
- _this.messageService.info(message, title);
1448
- _this.state.connection = false;
1449
- _this.emitEvent();
1450
- });
1451
- };
1452
- NetworkService.prototype.emitEvent = function () {
1453
- this.stateChangeEventEmitter.emit(this.state);
1454
- };
1455
- NetworkService.prototype.ngOnDestroy = function () {
1456
- try {
1457
- this.offlineSubscription.unsubscribe();
1458
- this.onlineSubscription.unsubscribe();
1459
- }
1460
- catch (e) { }
1461
- };
1462
- NetworkService.prototype.currentState = function (reportState) {
1463
- if (reportState === void 0) { reportState = true; }
1464
- return reportState
1465
- ? this.stateChangeEventEmitter.pipe(operators.debounceTime(300), operators.startWith(this.state))
1466
- : this.stateChangeEventEmitter.pipe(operators.debounceTime(300));
1467
- };
1468
- return NetworkService;
1469
- }());
1470
- NetworkService.ɵfac = function NetworkService_Factory(t) { return new (t || NetworkService)(i0.ɵɵinject(MessageService), i0.ɵɵinject(i0.Injector)); };
1471
- NetworkService.ɵprov = i0.ɵɵdefineInjectable({ token: NetworkService, factory: NetworkService.ɵfac, providedIn: 'root' });
1472
- /*@__PURE__*/ (function () {
1473
- i0.ɵsetClassMetadata(NetworkService, [{
1474
- type: i0.Injectable,
1475
- args: [{
1476
- providedIn: 'root'
1477
- }]
1478
- }], function () { return [{ type: MessageService }, { type: i0.Injector }]; }, null);
1493
+ var NetworkService = /** @class */ (function () {
1494
+ function NetworkService(messageService, injector) {
1495
+ this.messageService = messageService;
1496
+ this.injector = injector;
1497
+ this.stateChangeEventEmitter = new i0.EventEmitter();
1498
+ this.state = {
1499
+ connection: window.navigator.onLine
1500
+ };
1501
+ this.checkNetworkState();
1502
+ }
1503
+ NetworkService.prototype.checkNetworkState = function () {
1504
+ var _this = this;
1505
+ this.onlineSubscription = rxjs.fromEvent(window, 'online').subscribe(function () {
1506
+ var translate = _this.injector.get(LanguageService).translate;
1507
+ var message = translate.instant('igo.core.network.online.message');
1508
+ var title = translate.instant('igo.core.network.online.title');
1509
+ _this.messageService.info(message, title);
1510
+ _this.state.connection = true;
1511
+ _this.emitEvent();
1512
+ });
1513
+ this.offlineSubscription = rxjs.fromEvent(window, 'offline').subscribe(function () {
1514
+ var translate = _this.injector.get(LanguageService).translate;
1515
+ var message = translate.instant('igo.core.network.offline.message');
1516
+ var title = translate.instant('igo.core.network.offline.title');
1517
+ _this.messageService.info(message, title);
1518
+ _this.state.connection = false;
1519
+ _this.emitEvent();
1520
+ });
1521
+ };
1522
+ NetworkService.prototype.emitEvent = function () {
1523
+ this.stateChangeEventEmitter.emit(this.state);
1524
+ };
1525
+ NetworkService.prototype.ngOnDestroy = function () {
1526
+ try {
1527
+ this.offlineSubscription.unsubscribe();
1528
+ this.onlineSubscription.unsubscribe();
1529
+ }
1530
+ catch (e) { }
1531
+ };
1532
+ NetworkService.prototype.currentState = function (reportState) {
1533
+ if (reportState === void 0) { reportState = true; }
1534
+ return reportState
1535
+ ? this.stateChangeEventEmitter.pipe(operators.debounceTime(300), operators.startWith(this.state))
1536
+ : this.stateChangeEventEmitter.pipe(operators.debounceTime(300));
1537
+ };
1538
+ return NetworkService;
1539
+ }());
1540
+ NetworkService.ɵfac = function NetworkService_Factory(t) { return new (t || NetworkService)(i0__namespace.ɵɵinject(MessageService), i0__namespace.ɵɵinject(i0__namespace.Injector)); };
1541
+ NetworkService.ɵprov = /*@__PURE__*/ i0__namespace.ɵɵdefineInjectable({ token: NetworkService, factory: NetworkService.ɵfac, providedIn: 'root' });
1542
+ (function () {
1543
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NetworkService, [{
1544
+ type: i0.Injectable,
1545
+ args: [{
1546
+ providedIn: 'root'
1547
+ }]
1548
+ }], function () { return [{ type: MessageService }, { type: i0__namespace.Injector }]; }, null);
1479
1549
  })();
1480
1550
 
1481
- /*
1482
- * Public API Surface of core
1551
+ /*
1552
+ * Public API Surface of core
1483
1553
  */
1484
1554
 
1485
- /**
1486
- * Generated bundle index. Do not edit.
1555
+ /**
1556
+ * Generated bundle index. Do not edit.
1487
1557
  */
1488
1558
 
1489
1559
  exports.ActivityInterceptor = ActivityInterceptor;