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