@sumaris-net/ngx-components 1.7.4 → 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 (33) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +476 -413
  2. package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
  3. package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
  4. package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
  5. package/doc/changelog.md +10 -1
  6. package/esm2015/public_api.js +2 -1
  7. package/esm2015/src/app/core/form/entity-editor.class.js +5 -1
  8. package/esm2015/src/app/core/home/home.js +2 -2
  9. package/esm2015/src/app/core/services/account.service.js +38 -27
  10. package/esm2015/src/app/core/services/base-entity-service.class.js +4 -1
  11. package/esm2015/src/app/core/services/config.service.js +11 -4
  12. package/esm2015/src/app/core/services/local-settings.service.js +18 -14
  13. package/esm2015/src/app/core/services/model/settings.model.js +1 -1
  14. package/esm2015/src/app/core/services/platform.service.js +35 -31
  15. package/esm2015/src/app/shared/directives/autofocus.directive.js +15 -24
  16. package/esm2015/src/app/shared/platforms.js +36 -0
  17. package/esm2015/src/app/shared/services/entity-service.class.js +1 -1
  18. package/esm2015/src/app/shared/services/progress-bar.service.js +1 -1
  19. package/fesm2015/sumaris-net.ngx-components.js +414 -344
  20. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  21. package/package.json +1 -1
  22. package/public_api.d.ts +1 -0
  23. package/src/app/core/form/entity-editor.class.d.ts +1 -1
  24. package/src/app/core/services/account.service.d.ts +2 -0
  25. package/src/app/core/services/base-entity-service.class.d.ts +1 -0
  26. package/src/app/core/services/config.service.d.ts +4 -1
  27. package/src/app/core/services/local-settings.service.d.ts +0 -2
  28. package/src/app/core/services/model/settings.model.d.ts +0 -1
  29. package/src/app/core/services/platform.service.d.ts +8 -5
  30. package/src/app/shared/directives/autofocus.directive.d.ts +4 -5
  31. package/src/app/shared/platforms.d.ts +13 -0
  32. package/src/app/shared/services/entity-service.class.d.ts +1 -0
  33. package/sumaris-net.ngx-components.metadata.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/table'), require('@angular/cdk/a11y'), require('@angular/cdk/overlay'), require('@angular/cdk/scrolling'), require('@angular/material/core'), require('@angular/material/table'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/toolbar'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/select'), require('@angular/material/card'), require('@angular/material/tabs'), require('@angular/material/stepper'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/material/progress-spinner'), require('@angular/material/progress-bar'), require('@angular/material/radio'), require('@angular/material/badge'), require('@angular/material/slide-toggle'), require('@angular/material/dialog'), require('@angular/material/autocomplete'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@ngx-translate/core'), require('@ionic/angular'), require('moment'), require('@angular/material-moment-adapter'), require('@ionic-native/keyboard/ngx'), require('angular2-text-mask'), require('ngx-material-timepicker'), require('@angular/material/datepicker'), require('@angular/animations'), require('@angular/material/divider'), require('@angular/material/tooltip'), require('@angular/material/chips'), require('@angular/router'), require('@angular/platform-browser'), require('@angular/common/http'), require('ngx-color-picker'), require('@ionic-native/native-audio/ngx'), require('@ionic-native/vibration/ngx'), require('@ionic-native/audio-management/ngx'), require('@ionic-native/native-audio/ngx/index'), require('@ionic-native/vibration/ngx/index'), require('@ionic-native/audio-management/ngx/index'), require('uuid/v4'), require('@angular/cdk/drag-drop'), require('ngx-markdown'), require('tweetnacl'), require('@ionic/storage'), require('zone.js/dist/zone-error'), require('@ionic-native/splash-screen/ngx'), require('@ionic-native/network/ngx'), require('ionic-cache'), require('ionic-cache/dist/cache.service'), require('@ionic-native/network/ngx/index'), require('@ionic-native/splash-screen/ngx/index'), require('@ionic-native/status-bar/ngx'), require('@angular/cdk/platform'), require('@ionic-native/in-app-browser/ngx'), require('@apollo/client/core'), require('apollo-angular'), require('@apollo/client/link/ws'), require('@apollo/client/utilities'), require('@apollo/client/link/retry'), require('apollo-link-queue'), require('apollo-link-serialize'), require('apollo-link-logger'), require('apollo-angular/http'), require('apollo3-cache-persist'), require('@ionic-native/downloader/ngx'), require('@ionic-native/status-bar/ngx/index'), require('@ionic-native/keyboard/ngx/index'), require('@ionic-native/in-app-browser/ngx/index'), require('@ionic-native/downloader/ngx/index'), require('@e-is/ngx-material-table'), require('@angular/cdk/collections'), require('ngx-jdenticon'), require('tweetnacl-util'), require('scrypt-async'), require('hammerjs')) :
3
3
  typeof define === 'function' && define.amd ? define('@sumaris-net/ngx-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/table', '@angular/cdk/a11y', '@angular/cdk/overlay', '@angular/cdk/scrolling', '@angular/material/core', '@angular/material/table', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/input', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/toolbar', '@angular/material/icon', '@angular/material/button', '@angular/material/menu', '@angular/material/select', '@angular/material/card', '@angular/material/tabs', '@angular/material/stepper', '@angular/material/list', '@angular/material/button-toggle', '@angular/material/progress-spinner', '@angular/material/progress-bar', '@angular/material/radio', '@angular/material/badge', '@angular/material/slide-toggle', '@angular/material/dialog', '@angular/material/autocomplete', '@angular/forms', 'rxjs', 'rxjs/operators', '@ngx-translate/core', '@ionic/angular', 'moment', '@angular/material-moment-adapter', '@ionic-native/keyboard/ngx', 'angular2-text-mask', 'ngx-material-timepicker', '@angular/material/datepicker', '@angular/animations', '@angular/material/divider', '@angular/material/tooltip', '@angular/material/chips', '@angular/router', '@angular/platform-browser', '@angular/common/http', 'ngx-color-picker', '@ionic-native/native-audio/ngx', '@ionic-native/vibration/ngx', '@ionic-native/audio-management/ngx', '@ionic-native/native-audio/ngx/index', '@ionic-native/vibration/ngx/index', '@ionic-native/audio-management/ngx/index', 'uuid/v4', '@angular/cdk/drag-drop', 'ngx-markdown', 'tweetnacl', '@ionic/storage', 'zone.js/dist/zone-error', '@ionic-native/splash-screen/ngx', '@ionic-native/network/ngx', 'ionic-cache', 'ionic-cache/dist/cache.service', '@ionic-native/network/ngx/index', '@ionic-native/splash-screen/ngx/index', '@ionic-native/status-bar/ngx', '@angular/cdk/platform', '@ionic-native/in-app-browser/ngx', '@apollo/client/core', 'apollo-angular', '@apollo/client/link/ws', '@apollo/client/utilities', '@apollo/client/link/retry', 'apollo-link-queue', 'apollo-link-serialize', 'apollo-link-logger', 'apollo-angular/http', 'apollo3-cache-persist', '@ionic-native/downloader/ngx', '@ionic-native/status-bar/ngx/index', '@ionic-native/keyboard/ngx/index', '@ionic-native/in-app-browser/ngx/index', '@ionic-native/downloader/ngx/index', '@e-is/ngx-material-table', '@angular/cdk/collections', 'ngx-jdenticon', 'tweetnacl-util', 'scrypt-async', 'hammerjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sumaris-net'] = global['sumaris-net'] || {}, global['sumaris-net']['ngx-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global['ngx-translate'].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global['ionic-native'].keyboard.ngx, global['angular2-text-mask'], global['ngx-material-timepicker'], global.ng.material.datepicker, global.ng.animations, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global['ngx-color-picker'], global['ionic-native']['native-audio'].ngx, global['ionic-native'].vibration.ngx, global['ionic-native']['audio-management'].ngx, global['ionic-native']['native-audio'].ngx.index, global['ionic-native'].vibration.ngx.index, global['ionic-native']['audio-management'].ngx.index, global.uuid.v4, global.ng.cdk.dragDrop, global['ngx-markdown'], global.tweetnacl, global.ionic.storage, null, global['ionic-native']['splash-screen'].ngx, global['ionic-native'].network.ngx, global['ionic-cache'], global['ionic-cache/dist/cache'].service, global['ionic-native'].network.ngx.index, global['ionic-native']['splash-screen'].ngx.index, global['ionic-native']['status-bar'].ngx, global.ng.cdk.platform, global['ionic-native']['in-app-browser'].ngx, global.apollo.client.core, global['apollo-angular'], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global['apollo-link-queue'], global['apollo-link-serialize'], global['apollo-link-logger'], global['apollo-angular'].http, global['apollo3-cache-persist'], global['ionic-native'].downloader.ngx, global['ionic-native']['status-bar'].ngx.index, global['ionic-native'].keyboard.ngx.index, global['ionic-native']['in-app-browser'].ngx.index, global['ionic-native'].downloader.ngx.index, global['e-is']['ngx-material-table'], global.ng.cdk.collections, global['ngx-jdenticon']));
5
- }(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, i1$2, i1$5, momentImported, i1$1, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, animations, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, ngxMaterialTable, collections, ngxJdenticon) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["sumaris-net"] = global["sumaris-net"] || {}, global["sumaris-net"]["ngx-components"] = {}), global.ng.core, global.ng.common, global.ng.cdk.table, global.ng.cdk.a11y, global.ng.cdk.overlay, global.ng.cdk.scrolling, global.ng.material.core, global.ng.material.table, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.input, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material.toolbar, global.ng.material.icon, global.ng.material.button, global.ng.material.menu, global.ng.material.select, global.ng.material.card, global.ng.material.tabs, global.ng.material.stepper, global.ng.material.list, global.ng.material.buttonToggle, global.ng.material.progressSpinner, global.ng.material.progressBar, global.ng.material.radio, global.ng.material.badge, global.ng.material.slideToggle, global.ng.material.dialog, global.ng.material.autocomplete, global.ng.forms, global.rxjs, global.rxjs.operators, global["ngx-translate"].core, global.ionic.angular, global.moment, global.ng.materialMomentAdapter, global["ionic-native"].keyboard.ngx, global["angular2-text-mask"], global["ngx-material-timepicker"], global.ng.material.datepicker, global.ng.animations, global.ng.material.divider, global.ng.material.tooltip, global.ng.material.chips, global.ng.router, global.ng.platformBrowser, global.ng.common.http, global["ngx-color-picker"], global["ionic-native"]["native-audio"].ngx, global["ionic-native"].vibration.ngx, global["ionic-native"]["audio-management"].ngx, global["ionic-native"]["native-audio"].ngx.index, global["ionic-native"].vibration.ngx.index, global["ionic-native"]["audio-management"].ngx.index, global.uuid.v4, global.ng.cdk.dragDrop, global["ngx-markdown"], global.tweetnacl, global.ionic.storage, null, global["ionic-native"]["splash-screen"].ngx, global["ionic-native"].network.ngx, global["ionic-cache"], global["ionic-cache/dist/cache"].service, global["ionic-native"].network.ngx.index, global["ionic-native"]["splash-screen"].ngx.index, global["ionic-native"]["status-bar"].ngx, global.ng.cdk.platform, global["ionic-native"]["in-app-browser"].ngx, global.apollo.client.core, global["apollo-angular"], global.apollo.client.link.ws, global.apollo.client.utilities, global.apollo.client.link.retry, global["apollo-link-queue"], global["apollo-link-serialize"], global["apollo-link-logger"], global["apollo-angular"].http, global["apollo3-cache-persist"], global["ionic-native"].downloader.ngx, global["ionic-native"]["status-bar"].ngx.index, global["ionic-native"].keyboard.ngx.index, global["ionic-native"]["in-app-browser"].ngx.index, global["ionic-native"].downloader.ngx.index, global["e-is"]["ngx-material-table"], global.ng.cdk.collections, global["ngx-jdenticon"]));
5
+ })(this, (function (exports, i0, i1$4, table$1, a11y, overlay, scrolling, i1$3, table, sort$1, paginator, formField, input, checkbox, expansion, toolbar, icon, button, menu, select, card, tabs, stepper, list, buttonToggle, progressSpinner, progressBar, radio, badge, slideToggle, i2, autocomplete, i1, rxjs, operators, i1$2, i1$5, momentImported, i1$1, ngx, angular2TextMask, ngxMaterialTimepicker, datepicker, animations, divider, tooltip, chips, i3, i1$6, i2$1, ngxColorPicker, ngx$2, ngx$3, ngx$1, i2$2, i3$1, i4, uuidv4Imported, dragDrop, ngxMarkdown, tweetnacl, i3$2, zoneError, ngx$5, ngx$4, ionicCache, i6, i9, i10, ngx$7, i2$4, ngx$8, core, i2$3, ws, utilities, retry, QueueLink, SerializingLink, loggerLink, i3$3, apollo3CachePersist, ngx$6, i14, i15, i17, i18, ngxMaterialTable, collections, ngxJdenticon) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -15,22 +15,45 @@
15
15
  var d = Object.getOwnPropertyDescriptor(e, k);
16
16
  Object.defineProperty(n, k, d.get ? d : {
17
17
  enumerable: true,
18
- get: function () {
19
- return e[k];
20
- }
18
+ get: function () { return e[k]; }
21
19
  });
22
20
  }
23
21
  });
24
22
  }
25
- n['default'] = e;
23
+ n["default"] = e;
26
24
  return Object.freeze(n);
27
25
  }
28
26
 
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$4);
29
+ var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$3);
30
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
31
+ var i1__namespace$6 = /*#__PURE__*/_interopNamespace(i1);
32
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
33
+ var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$5);
29
34
  var momentImported__namespace = /*#__PURE__*/_interopNamespace(momentImported);
35
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
36
+ var i3__namespace$3 = /*#__PURE__*/_interopNamespace(i3);
37
+ var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$6);
38
+ var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$1);
39
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2$2);
40
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3$1);
41
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
42
  var uuidv4Imported__namespace = /*#__PURE__*/_interopNamespace(uuidv4Imported);
43
+ var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$2);
44
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
45
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
46
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
47
+ var i2__namespace$4 = /*#__PURE__*/_interopNamespace(i2$4);
48
+ var i2__namespace$3 = /*#__PURE__*/_interopNamespace(i2$3);
31
49
  var QueueLink__default = /*#__PURE__*/_interopDefaultLegacy(QueueLink);
32
50
  var SerializingLink__default = /*#__PURE__*/_interopDefaultLegacy(SerializingLink);
33
51
  var loggerLink__default = /*#__PURE__*/_interopDefaultLegacy(loggerLink);
52
+ var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$3);
53
+ var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
54
+ var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
55
+ var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
56
+ var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
34
57
 
35
58
  var ENVIRONMENT = new i0.InjectionToken('ENV');
36
59
  var Environment = /** @class */ (function () {
@@ -1255,14 +1278,14 @@
1255
1278
  };
1256
1279
  return MatAutocompleteConfigHolder;
1257
1280
  }());
1258
- var noop = function (_) { };
1259
- var ɵ0 = noop;
1281
+ var noop$8 = function (_) { };
1282
+ var ɵ0$c = noop$8;
1260
1283
  var MatAutocompleteField = /** @class */ (function () {
1261
1284
  function MatAutocompleteField(cd, formGroupDir) {
1262
1285
  this.cd = cd;
1263
1286
  this.formGroupDir = formGroupDir;
1264
- this._onChangeCallback = noop;
1265
- this._onTouchedCallback = noop;
1287
+ this._onChangeCallback = noop$8;
1288
+ this._onTouchedCallback = noop$8;
1266
1289
  this.logPrefix = '[mat-autocomplete] ';
1267
1290
  this.formControlName = null;
1268
1291
  this.required = false;
@@ -2055,7 +2078,7 @@
2055
2078
  };
2056
2079
  return DateFormatPipe;
2057
2080
  }());
2058
- DateFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0.ɵɵinject(i1$1.MomentDateAdapter), i0.ɵɵinject(i1$2.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
2081
+ DateFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0__namespace.ɵɵinject(i1__namespace.MomentDateAdapter), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
2059
2082
  DateFormatPipe.decorators = [
2060
2083
  { type: i0.Pipe, args: [{
2061
2084
  name: 'dateFormat'
@@ -2067,7 +2090,7 @@
2067
2090
  { type: i1$2.TranslateService }
2068
2091
  ]; };
2069
2092
 
2070
- var moment = momentImported__namespace;
2093
+ var moment$6 = momentImported__namespace;
2071
2094
  var DateDiffDurationPipe = /** @class */ (function () {
2072
2095
  function DateDiffDurationPipe(dateAdapter, translate) {
2073
2096
  var _this = this;
@@ -2084,10 +2107,10 @@
2084
2107
  return this.format(startDate, endDate);
2085
2108
  };
2086
2109
  DateDiffDurationPipe.prototype.format = function (startDate, endDate) {
2087
- var duration = moment.duration(endDate.diff(startDate));
2110
+ var duration = moment$6.duration(endDate.diff(startDate));
2088
2111
  if (duration.asMinutes() < 0)
2089
2112
  return '';
2090
- var timeDuration = moment(0)
2113
+ var timeDuration = moment$6(0)
2091
2114
  .hour(duration.hours())
2092
2115
  .minute(duration.minutes());
2093
2116
  var days = Math.floor(duration.asDays());
@@ -2095,7 +2118,7 @@
2095
2118
  };
2096
2119
  return DateDiffDurationPipe;
2097
2120
  }());
2098
- DateDiffDurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0.ɵɵinject(i1$3.DateAdapter), i0.ɵɵinject(i1$2.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
2121
+ DateDiffDurationPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0__namespace.ɵɵinject(i1__namespace$2.DateAdapter), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
2099
2122
  DateDiffDurationPipe.decorators = [
2100
2123
  { type: i0.Pipe, args: [{
2101
2124
  name: 'dateDiffDuration'
@@ -2117,7 +2140,7 @@
2117
2140
  };
2118
2141
  return DateFromNowPipe;
2119
2142
  }());
2120
- DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1$1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
2143
+ DateFromNowPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0__namespace.ɵɵinject(i1__namespace.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
2121
2144
  DateFromNowPipe.decorators = [
2122
2145
  { type: i0.Pipe, args: [{
2123
2146
  name: 'dateFromNow'
@@ -2186,7 +2209,7 @@
2186
2209
  value *= -1;
2187
2210
  }
2188
2211
  }
2189
- var degrees = roundFloat(value, opts.maxDecimals).toString();
2212
+ var degrees = roundFloat$1(value, opts.maxDecimals).toString();
2190
2213
  // Add sign
2191
2214
  var sign = negative ? '-' : '+';
2192
2215
  if (opts.placeholderChar) {
@@ -2237,7 +2260,7 @@
2237
2260
  }
2238
2261
  var degrees = Math.trunc(value);
2239
2262
  var minutes = Math.trunc((value - degrees) * 60);
2240
- var seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
2263
+ var seconds = roundFloat$1(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
2241
2264
  while (seconds >= 60) {
2242
2265
  seconds -= 60;
2243
2266
  minutes += 1;
@@ -2305,7 +2328,7 @@
2305
2328
  }
2306
2329
  }
2307
2330
  var degrees = Math.trunc(value);
2308
- var minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
2331
+ var minutes = roundFloat$1((value - degrees) * 60, opts.maxDecimals);
2309
2332
  while (minutes >= 60) {
2310
2333
  minutes -= 60;
2311
2334
  degrees += 1;
@@ -2356,15 +2379,15 @@
2356
2379
  return NaN;
2357
2380
  }
2358
2381
  if (pattern === 'DD')
2359
- return roundFloat(degrees, maxDecimals);
2382
+ return roundFloat$1(degrees, maxDecimals);
2360
2383
  var minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
2361
2384
  var seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
2362
2385
  var direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
2363
2386
  var sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
2364
2387
  degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
2365
- return roundFloat(degrees, maxDecimals);
2388
+ return roundFloat$1(degrees, maxDecimals);
2366
2389
  }
2367
- function roundFloat(input, maxDecimals) {
2390
+ function roundFloat$1(input, maxDecimals) {
2368
2391
  if (maxDecimals > 0) {
2369
2392
  var powDecimal = Math.pow(10, maxDecimals);
2370
2393
  return Math.trunc(input * powDecimal + 0.5) / powDecimal;
@@ -2387,7 +2410,7 @@
2387
2410
  };
2388
2411
  return LatLongFormatPipe;
2389
2412
  }());
2390
- LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
2413
+ LatLongFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
2391
2414
  LatLongFormatPipe.decorators = [
2392
2415
  { type: i0.Pipe, args: [{
2393
2416
  name: 'latLongFormat'
@@ -2400,7 +2423,7 @@
2400
2423
  }
2401
2424
  return LatitudeFormatPipe;
2402
2425
  }());
2403
- LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
2426
+ LatitudeFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
2404
2427
  LatitudeFormatPipe.decorators = [
2405
2428
  { type: i0.Pipe, args: [{
2406
2429
  name: 'latitudeFormat'
@@ -2413,7 +2436,7 @@
2413
2436
  }
2414
2437
  return LongitudeFormatPipe;
2415
2438
  }());
2416
- LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
2439
+ LongitudeFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
2417
2440
  LongitudeFormatPipe.decorators = [
2418
2441
  { type: i0.Pipe, args: [{
2419
2442
  name: 'longitudeFormat'
@@ -2436,7 +2459,7 @@
2436
2459
  };
2437
2460
  return NumberFormatPipe;
2438
2461
  }());
2439
- NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
2462
+ NumberFormatPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
2440
2463
  NumberFormatPipe.decorators = [
2441
2464
  { type: i0.Pipe, args: [{
2442
2465
  name: 'numberFormat'
@@ -2479,7 +2502,7 @@
2479
2502
  };
2480
2503
  return HighlightPipe;
2481
2504
  }());
2482
- HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
2505
+ HighlightPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
2483
2506
  HighlightPipe.decorators = [
2484
2507
  { type: i0.Pipe, args: [{
2485
2508
  name: 'highlight'
@@ -2547,7 +2570,7 @@
2547
2570
  { type: i0.Pipe, args: [{ name: 'fileSize' },] }
2548
2571
  ];
2549
2572
 
2550
- var moment$1 = momentImported__namespace;
2573
+ var moment$5 = momentImported__namespace;
2551
2574
  var DATE_UNIX_TIMESTAMP = 'X';
2552
2575
  var DATE_UNIX_MS_TIMESTAMP = 'x';
2553
2576
  var DateUtils = /** @class */ (function () {
@@ -2590,32 +2613,32 @@
2590
2613
  if (!value || momentImported.isMoment(value))
2591
2614
  return value;
2592
2615
  // Parse the input value, as a ISO date time
2593
- var date = moment$1(value, DATE_ISO_PATTERN);
2616
+ var date = moment$5(value, DATE_ISO_PATTERN);
2594
2617
  if (date.isValid())
2595
2618
  return date;
2596
2619
  // Not valid: trying to convert from unix timestamp
2597
2620
  if (typeof value === 'string') {
2598
2621
  console.warn('Wrong date format - Trying to convert from local time: ' + value);
2599
2622
  if (value.length === 10) {
2600
- return moment$1(value, DATE_UNIX_TIMESTAMP);
2623
+ return moment$5(value, DATE_UNIX_TIMESTAMP);
2601
2624
  }
2602
2625
  else if (value.length === 13) {
2603
- return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
2626
+ return moment$5(value, DATE_UNIX_MS_TIMESTAMP);
2604
2627
  }
2605
2628
  }
2606
2629
  console.warn('Unable to parse date: ' + value);
2607
2630
  return undefined;
2608
2631
  }
2609
2632
  function fromUnixTimestamp(timeInSec) {
2610
- return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
2633
+ return moment$5(timeInSec, DATE_UNIX_TIMESTAMP);
2611
2634
  }
2612
2635
  function fromUnixMsTimestamp(timeInMs) {
2613
- return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2636
+ return moment$5(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2614
2637
  }
2615
2638
  function toDuration(value, unit) {
2616
2639
  if (!value)
2617
2640
  return undefined;
2618
- var duration = moment$1.duration(value, unit);
2641
+ var duration = moment$5.duration(value, unit);
2619
2642
  // fix 990+ ms
2620
2643
  if (duration.milliseconds() >= 990) {
2621
2644
  duration.add(1000 - duration.milliseconds(), 'ms');
@@ -2645,7 +2668,7 @@
2645
2668
  };
2646
2669
  return DurationPipe;
2647
2670
  }());
2648
- DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$2.TranslateService)); }, token: DurationPipe, providedIn: "root" });
2671
+ DurationPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: DurationPipe, providedIn: "root" });
2649
2672
  DurationPipe.decorators = [
2650
2673
  { type: i0.Pipe, args: [{
2651
2674
  name: 'duration'
@@ -2669,7 +2692,7 @@
2669
2692
  };
2670
2693
  return MathAbsPipe;
2671
2694
  }());
2672
- MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
2695
+ MathAbsPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
2673
2696
  MathAbsPipe.decorators = [
2674
2697
  { type: i0.Pipe, args: [{
2675
2698
  name: 'mathAbs'
@@ -2684,7 +2707,7 @@
2684
2707
  };
2685
2708
  return EvenPipe;
2686
2709
  }());
2687
- EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
2710
+ EvenPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
2688
2711
  EvenPipe.decorators = [
2689
2712
  { type: i0.Pipe, args: [{
2690
2713
  name: 'even'
@@ -2699,7 +2722,7 @@
2699
2722
  };
2700
2723
  return OddPipe;
2701
2724
  }());
2702
- OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
2725
+ OddPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
2703
2726
  OddPipe.decorators = [
2704
2727
  { type: i0.Pipe, args: [{
2705
2728
  name: 'odd'
@@ -2831,7 +2854,7 @@
2831
2854
  };
2832
2855
  return MapGetPipe;
2833
2856
  }());
2834
- MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
2857
+ MapGetPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
2835
2858
  MapGetPipe.decorators = [
2836
2859
  { type: i0.Pipe, args: [{
2837
2860
  name: 'mapGet'
@@ -2848,7 +2871,7 @@
2848
2871
  };
2849
2872
  return MapKeysPipe;
2850
2873
  }());
2851
- MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
2874
+ MapKeysPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
2852
2875
  MapKeysPipe.decorators = [
2853
2876
  { type: i0.Pipe, args: [{
2854
2877
  name: 'mapKeys'
@@ -2865,7 +2888,7 @@
2865
2888
  };
2866
2889
  return MapValuesPipe;
2867
2890
  }());
2868
- MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
2891
+ MapValuesPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
2869
2892
  MapValuesPipe.decorators = [
2870
2893
  { type: i0.Pipe, args: [{
2871
2894
  name: 'mapValues'
@@ -2881,7 +2904,7 @@
2881
2904
  };
2882
2905
  return IsNotNilOrBlankPipe;
2883
2906
  }());
2884
- IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
2907
+ IsNotNilOrBlankPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
2885
2908
  IsNotNilOrBlankPipe.decorators = [
2886
2909
  { type: i0.Pipe, args: [{
2887
2910
  name: 'isNotNilOrBlank'
@@ -2896,7 +2919,7 @@
2896
2919
  };
2897
2920
  return IsNilOrBlankPipe;
2898
2921
  }());
2899
- IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
2922
+ IsNilOrBlankPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
2900
2923
  IsNilOrBlankPipe.decorators = [
2901
2924
  { type: i0.Pipe, args: [{
2902
2925
  name: 'isNilOrBlank'
@@ -2911,7 +2934,7 @@
2911
2934
  };
2912
2935
  return ToStringPipe;
2913
2936
  }());
2914
- ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
2937
+ ToStringPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
2915
2938
  ToStringPipe.decorators = [
2916
2939
  { type: i0.Pipe, args: [{
2917
2940
  name: 'toString'
@@ -2926,7 +2949,7 @@
2926
2949
  };
2927
2950
  return StrLengthPipe;
2928
2951
  }());
2929
- StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
2952
+ StrLengthPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
2930
2953
  StrLengthPipe.decorators = [
2931
2954
  { type: i0.Pipe, args: [{
2932
2955
  name: 'strLength'
@@ -3017,7 +3040,7 @@
3017
3040
  };
3018
3041
  return TranslateContextService;
3019
3042
  }());
3020
- TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$2.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
3043
+ TranslateContextService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
3021
3044
  TranslateContextService.decorators = [
3022
3045
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
3023
3046
  ];
@@ -3074,7 +3097,7 @@
3074
3097
  };
3075
3098
  return PropertyGetPipe;
3076
3099
  }());
3077
- PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
3100
+ PropertyGetPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
3078
3101
  PropertyGetPipe.decorators = [
3079
3102
  { type: i0.Pipe, args: [{
3080
3103
  name: 'propertyGet'
@@ -3100,7 +3123,7 @@
3100
3123
  ngInit: [{ type: i0.Output }]
3101
3124
  };
3102
3125
 
3103
- var moment$2 = momentImported__namespace;
3126
+ var moment$4 = momentImported__namespace;
3104
3127
  // @dynamic
3105
3128
  var SharedValidators = /** @class */ (function () {
3106
3129
  function SharedValidators() {
@@ -3119,7 +3142,7 @@
3119
3142
  };
3120
3143
  SharedValidators.validDate = function (control) {
3121
3144
  var value = control.value;
3122
- var date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
3145
+ var date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
3123
3146
  if (date && (!date.isValid() || date.year() < 1970)) {
3124
3147
  return { validDate: true };
3125
3148
  }
@@ -4285,7 +4308,7 @@
4285
4308
  };
4286
4309
  return FormErrorTranslator;
4287
4310
  }());
4288
- FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
4311
+ FormErrorTranslator.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService), i0__namespace.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
4289
4312
  FormErrorTranslator.decorators = [
4290
4313
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
4291
4314
  ];
@@ -4446,27 +4469,56 @@
4446
4469
  },] }
4447
4470
  ];
4448
4471
 
4472
+ /* ---
4473
+ * Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
4474
+ * --- */
4475
+ var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
4476
+ var testUserAgent = function (win, expr) {
4477
+ var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
4478
+ return expr.test(userAgent);
4479
+ };
4480
+ var isWindow = function (win) {
4481
+ var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
4482
+ return /windows/i.test(userAgent);
4483
+ };
4484
+ /**
4485
+ * Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
4486
+ * @param win
4487
+ */
4488
+ var isDesktop = function (win) { return matchMedia(win, '(any-pointer:fine)'); };
4489
+ var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
4490
+ var isMobile = function (win) { return isTouchUi(win) && !isDesktop(win); };
4491
+ var isIpad = function (win) {
4492
+ // iOS 12 and below
4493
+ if (testUserAgent(win, /iPad/i)) {
4494
+ return true;
4495
+ }
4496
+ // iOS 13+
4497
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
4498
+ return true;
4499
+ }
4500
+ return false;
4501
+ };
4502
+ var ɵ0$b = isIpad;
4503
+ var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
4504
+ var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
4505
+ var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
4506
+
4449
4507
  // Import the core angular services.
4450
4508
  // ----------------------------------------------------------------------------------- //
4451
4509
  // ----------------------------------------------------------------------------------- //
4452
4510
  var BASE_TIMER_DELAY = 100;
4453
4511
  var AutofocusDirective = /** @class */ (function () {
4454
4512
  // I initialize the autofocus directive.
4455
- function AutofocusDirective(elementRef, platform, keyboard) {
4456
- var _this = this;
4513
+ function AutofocusDirective(elementRef, keyboard) {
4457
4514
  this.keyboard = keyboard;
4458
- this.timer = null;
4459
- this.elementRef = elementRef;
4515
+ this._timer = null;
4516
+ this._elementRef = elementRef;
4460
4517
  this.shouldFocusElement = '';
4461
- this.timer = null;
4518
+ this._timer = null;
4462
4519
  this.timerDelay = BASE_TIMER_DELAY;
4463
- platform.ready().then(function () {
4464
- _this.touchUi = platform.is('mobile') || platform.is('tablet');
4465
- });
4520
+ this._mobile = isMobile(window);
4466
4521
  }
4467
- // ---
4468
- // PUBLIC METHODS.
4469
- // ---
4470
4522
  // I get called once after the contents have been fully initialized.
4471
4523
  AutofocusDirective.prototype.ngAfterContentInit = function () {
4472
4524
  // Because this directive can act on the stand-only "autofocus" attribute or
@@ -4501,30 +4553,27 @@
4501
4553
  AutofocusDirective.prototype.ngOnDestroy = function () {
4502
4554
  this.stopFocusWorkflow();
4503
4555
  };
4504
- // ---
4505
- // PRIVATE METHODS.
4506
- // ---
4556
+ /* --- private functions -- */
4507
4557
  // I start the timer-based workflow that will focus the current element.
4508
4558
  AutofocusDirective.prototype.startFocusWorkflow = function () {
4509
4559
  var _this = this;
4510
4560
  // if touch UI: do NOT focus when keyboard hide
4511
- if (this.touchUi && this.keyboard && this.keyboard.isVisible === false)
4561
+ if (this._mobile && this.keyboard && this.keyboard.isVisible === false)
4512
4562
  return;
4513
4563
  // If there is already a timer running for this element, just let it play out -
4514
4564
  // resetting it at this point will only push-out the time at which the focus is
4515
4565
  // applied to the element.
4516
- if (this.timer) {
4566
+ if (this._timer)
4517
4567
  return;
4518
- }
4519
- this.timer = setTimeout(function () {
4520
- _this.timer = null;
4521
- _this.elementRef.nativeElement.focus();
4568
+ this._timer = setTimeout(function () {
4569
+ _this._timer = null;
4570
+ _this._elementRef.nativeElement.focus();
4522
4571
  }, this.timerDelay);
4523
4572
  };
4524
4573
  // I stop the timer-based workflow, preventing focus from taking place.
4525
4574
  AutofocusDirective.prototype.stopFocusWorkflow = function () {
4526
- clearTimeout(this.timer);
4527
- this.timer = null;
4575
+ clearTimeout(this._timer);
4576
+ this._timer = null;
4528
4577
  };
4529
4578
  return AutofocusDirective;
4530
4579
  }());
@@ -4539,7 +4588,6 @@
4539
4588
  ];
4540
4589
  AutofocusDirective.ctorParameters = function () { return [
4541
4590
  { type: i0.ElementRef },
4542
- { type: i1$5.Platform },
4543
4591
  { type: ngx.Keyboard, decorators: [{ type: i0.Optional }] }
4544
4592
  ]; };
4545
4593
 
@@ -4656,9 +4704,9 @@
4656
4704
  var hour = parseInt(durationParts[0] || '0');
4657
4705
  var minute = parseInt(durationParts[1] || '0');
4658
4706
  var value = hour + (minute + 0.5) / 60;
4659
- return roundFloat$1(value, maxDecimals);
4707
+ return roundFloat(value, maxDecimals);
4660
4708
  }
4661
- function roundFloat$1(input, maxDecimals) {
4709
+ function roundFloat(input, maxDecimals) {
4662
4710
  if (maxDecimals > 0) {
4663
4711
  var powDecimal = Math.pow(10, maxDecimals);
4664
4712
  return Math.trunc(input * powDecimal + 0.5) / powDecimal;
@@ -4682,9 +4730,9 @@
4682
4730
  DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
4683
4731
  }
4684
4732
  };
4685
- var noop$1 = function () {
4733
+ var noop$7 = function () {
4686
4734
  };
4687
- var ɵ0$1 = noop$1;
4735
+ var ɵ0$a = noop$7;
4688
4736
  var MatLatLongField = /** @class */ (function () {
4689
4737
  function MatLatLongField(platform, translate, formBuilder, cd, formGroupDir) {
4690
4738
  this.platform = platform;
@@ -4692,8 +4740,8 @@
4692
4740
  this.formBuilder = formBuilder;
4693
4741
  this.cd = cd;
4694
4742
  this.formGroupDir = formGroupDir;
4695
- this._onChangeCallback = noop$1;
4696
- this._onTouchedCallback = noop$1;
4743
+ this._onChangeCallback = noop$7;
4744
+ this._onTouchedCallback = noop$7;
4697
4745
  this._subscription = new rxjs.Subscription();
4698
4746
  this.disabling = false;
4699
4747
  this.writing = false;
@@ -5045,14 +5093,14 @@
5045
5093
  },] }
5046
5094
  ];
5047
5095
 
5048
- var DEFAULT_VALUE_ACCESSOR = {
5096
+ var DEFAULT_VALUE_ACCESSOR$5 = {
5049
5097
  provide: i1.NG_VALUE_ACCESSOR,
5050
5098
  useExisting: i0.forwardRef(function () { return MatDate; }),
5051
5099
  multi: true
5052
5100
  };
5053
- var DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
5054
- var noop$2 = function () { };
5055
- var ɵ0$2 = noop$2;
5101
+ var DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
5102
+ var noop$6 = function () { };
5103
+ var ɵ0$9 = noop$6;
5056
5104
  var MatDate = /** @class */ (function () {
5057
5105
  function MatDate(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5058
5106
  this.dateAdapter = dateAdapter;
@@ -5061,12 +5109,12 @@
5061
5109
  this.cd = cd;
5062
5110
  this.keyboard = keyboard;
5063
5111
  this.formGroupDir = formGroupDir;
5064
- this._onChangeCallback = noop$2;
5065
- this._onTouchedCallback = noop$2;
5112
+ this._onChangeCallback = noop$6;
5113
+ this._onTouchedCallback = noop$6;
5066
5114
  this._subscription = new rxjs.Subscription();
5067
5115
  this.writing = true;
5068
5116
  this.disabling = false;
5069
- this.dayMask = DAY_MASK;
5117
+ this.dayMask = DAY_MASK$2;
5070
5118
  this.disabled = false;
5071
5119
  this.floatLabel = 'auto';
5072
5120
  this.readonly = false;
@@ -5335,7 +5383,7 @@
5335
5383
  selector: 'mat-date-field',
5336
5384
  template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n\n",
5337
5385
  providers: [
5338
- DEFAULT_VALUE_ACCESSOR,
5386
+ DEFAULT_VALUE_ACCESSOR$5,
5339
5387
  ],
5340
5388
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
5341
5389
  styles: [":host{display:inline-block;width:100%;position:relative}:host [no-padding]{--ion-grid-column-padding:0}:host [nowrap]{flex-wrap:nowrap}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md,mat-form-field ion-datetime{padding:0!important}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
@@ -5368,17 +5416,17 @@
5368
5416
  matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
5369
5417
  };
5370
5418
 
5371
- var DEFAULT_VALUE_ACCESSOR$1 = {
5419
+ var DEFAULT_VALUE_ACCESSOR$4 = {
5372
5420
  provide: i1.NG_VALUE_ACCESSOR,
5373
5421
  useExisting: i0.forwardRef(function () { return MatDateTime; }),
5374
5422
  multi: true
5375
5423
  };
5376
5424
  var DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
5377
5425
  var HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
5378
- var HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
5379
- var noop$3 = function () {
5426
+ var HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
5427
+ var noop$5 = function () {
5380
5428
  };
5381
- var ɵ0$3 = noop$3;
5429
+ var ɵ0$8 = noop$5;
5382
5430
  var MatDateTime = /** @class */ (function () {
5383
5431
  function MatDateTime(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5384
5432
  this.platform = platform;
@@ -5388,14 +5436,14 @@
5388
5436
  this.cd = cd;
5389
5437
  this.keyboard = keyboard;
5390
5438
  this.formGroupDir = formGroupDir;
5391
- this._onChangeCallback = noop$3;
5392
- this._onTouchedCallback = noop$3;
5439
+ this._onChangeCallback = noop$5;
5440
+ this._onTouchedCallback = noop$5;
5393
5441
  this._subscription = new rxjs.Subscription();
5394
5442
  this.writing = true;
5395
5443
  this.disabling = false;
5396
5444
  this._readonly = false;
5397
5445
  this.dayMask = DAY_MASK$1;
5398
- this.hourMask = HOUR_MASK;
5446
+ this.hourMask = HOUR_MASK$1;
5399
5447
  this.floatLabel = 'auto';
5400
5448
  this.compact = false;
5401
5449
  this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
@@ -5752,7 +5800,7 @@
5752
5800
  selector: 'mat-date-time-field',
5753
5801
  template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
5754
5802
  providers: [
5755
- DEFAULT_VALUE_ACCESSOR$1,
5803
+ DEFAULT_VALUE_ACCESSOR$4,
5756
5804
  ],
5757
5805
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
5758
5806
  styles: [":host{display:inline-block;width:100%;position:relative;--ion-grid-column-padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md{padding:0!important}ion-row.no-wrap{flex-wrap:nowrap}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
@@ -5786,15 +5834,15 @@
5786
5834
  matInputs: [{ type: i0.ViewChildren, args: ['matInput',] }]
5787
5835
  };
5788
5836
 
5789
- var DEFAULT_VALUE_ACCESSOR$2 = {
5837
+ var DEFAULT_VALUE_ACCESSOR$3 = {
5790
5838
  provide: i1.NG_VALUE_ACCESSOR,
5791
5839
  useExisting: i0.forwardRef(function () { return MatDateShort; }),
5792
5840
  multi: true
5793
5841
  };
5794
- var DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
5842
+ var DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
5795
5843
  var noop$4 = function () {
5796
5844
  };
5797
- var ɵ0$4 = noop$4;
5845
+ var ɵ0$7 = noop$4;
5798
5846
  var MatDateShort = /** @class */ (function () {
5799
5847
  function MatDateShort(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5800
5848
  this.dateAdapter = dateAdapter;
@@ -5807,7 +5855,7 @@
5807
5855
  this._onTouchedCallback = noop$4;
5808
5856
  this.writing = true;
5809
5857
  this.disabling = false;
5810
- this.dayMask = DAY_MASK$2;
5858
+ this.dayMask = DAY_MASK;
5811
5859
  this.disabled = false;
5812
5860
  this.floatLabel = 'auto';
5813
5861
  this.readonly = false;
@@ -6084,7 +6132,7 @@
6084
6132
  selector: 'mat-date-short-field',
6085
6133
  template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_YEAR_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker1)\"\n (keyup.escape)=\"preventEvent($event)\"\n (click)=\"matInput.select()\"\n [required]=\"required\"\n [tabindex]=\"tabindex\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker1)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker1\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker1)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n\n <mat-datepicker #datePicker1\n startView=\"multi-year\"\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n (yearSelected)=\"closeDatePicker($event, datePicker1)\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n",
6086
6134
  providers: [
6087
- DEFAULT_VALUE_ACCESSOR$2,
6135
+ DEFAULT_VALUE_ACCESSOR$3,
6088
6136
  ],
6089
6137
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6090
6138
  styles: [":host{display:inline-block;width:100%;position:relative}:host [no-padding]{--ion-grid-column-padding:0}:host [nowrap]{flex-wrap:nowrap}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md,mat-form-field ion-datetime{padding:0!important}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
@@ -6155,16 +6203,16 @@
6155
6203
  },] }
6156
6204
  ];
6157
6205
 
6158
- var DEFAULT_VALUE_ACCESSOR$3 = {
6206
+ var DEFAULT_VALUE_ACCESSOR$2 = {
6159
6207
  provide: i1.NG_VALUE_ACCESSOR,
6160
6208
  useExisting: i0.forwardRef(function () { return MatDuration; }),
6161
6209
  multi: true
6162
6210
  };
6163
6211
  var HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
6164
- var HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
6165
- var noop$5 = function () {
6212
+ var HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
6213
+ var noop$3 = function () {
6166
6214
  };
6167
- var ɵ0$5 = noop$5;
6215
+ var ɵ0$6 = noop$3;
6168
6216
  var MatDuration = /** @class */ (function () {
6169
6217
  function MatDuration(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
6170
6218
  this.dateAdapter = dateAdapter;
@@ -6173,11 +6221,11 @@
6173
6221
  this.cd = cd;
6174
6222
  this.formGroupDir = formGroupDir;
6175
6223
  this._subscription = new rxjs.Subscription();
6176
- this._onChangeCallback = noop$5;
6177
- this._onTouchedCallback = noop$5;
6224
+ this._onChangeCallback = noop$3;
6225
+ this._onTouchedCallback = noop$3;
6178
6226
  this.writing = true;
6179
6227
  this.disabling = false;
6180
- this.hourMask = HOUR_MASK$1;
6228
+ this.hourMask = HOUR_MASK;
6181
6229
  this.disabled = false;
6182
6230
  this.floatLabel = 'auto';
6183
6231
  this.readonly = false;
@@ -6370,7 +6418,7 @@
6370
6418
  selector: 'mat-duration-field',
6371
6419
  template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{ formControl.value|duration }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput type=\"text\"\n autocomplete=\"off\"\n [formControl]=\"textControl\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.DURATION_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keydown.tab)=\"moveCaretToSeparator($event, true)\"\n (keydown.shift.tab)=\"moveCaretToSeparator($event, false)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n\n <!-- errors -->\n <mat-error *ngIf=\"!formControl.hasError('required') && textControl.hasError('pattern')\" translate>ERROR.FIELD_NOT_VALID_PATTERN</mat-error>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('min')\">\n {{(compact ? 'ERROR.FIELD_MIN_COMPACT' : 'ERROR.FIELD_MIN') | translate:formControl.errors.min }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('max')\">\n {{(compact ? 'ERROR.FIELD_MAX_COMPACT' : 'ERROR.FIELD_MAX') | translate:formControl.errors.max }}</mat-error>\n\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n</ng-template>\n\n",
6372
6420
  providers: [
6373
- DEFAULT_VALUE_ACCESSOR$3,
6421
+ DEFAULT_VALUE_ACCESSOR$2,
6374
6422
  ],
6375
6423
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6376
6424
  styles: [":host{display:inline-block;min-width:140px;position:relative;--ion-grid-column-padding:0}:host,mat-form-field{width:100%}mat-form-field .mat-form-field-subscript-wrapper{overflow:visible;top:100%}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}mat-error{text-align:right;width:100%}"]
@@ -6430,22 +6478,22 @@
6430
6478
  },] }
6431
6479
  ];
6432
6480
 
6433
- var DEFAULT_VALUE_ACCESSOR$4 = {
6481
+ var DEFAULT_VALUE_ACCESSOR$1 = {
6434
6482
  provide: i1.NG_VALUE_ACCESSOR,
6435
6483
  useExisting: i0.forwardRef(function () { return MatBooleanField; }),
6436
6484
  multi: true
6437
6485
  };
6438
- var noop$6 = function () {
6486
+ var noop$2 = function () {
6439
6487
  };
6440
- var ɵ0$6 = noop$6;
6488
+ var ɵ0$5 = noop$2;
6441
6489
  var MatBooleanField = /** @class */ (function () {
6442
6490
  function MatBooleanField(translate, formBuilder, cd, formGroupDir) {
6443
6491
  this.translate = translate;
6444
6492
  this.formBuilder = formBuilder;
6445
6493
  this.cd = cd;
6446
6494
  this.formGroupDir = formGroupDir;
6447
- this._onChangeCallback = noop$6;
6448
- this._onTouchedCallback = noop$6;
6495
+ this._onChangeCallback = noop$2;
6496
+ this._onTouchedCallback = noop$2;
6449
6497
  this._writing = false;
6450
6498
  this.showRadio = false;
6451
6499
  this.disabled = false;
@@ -6620,7 +6668,7 @@
6620
6668
  selector: 'mat-boolean-field',
6621
6669
  template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value == null && 'COMMON.EMPTY_OPTION' || (formControl.value === true && yesLabel) || noLabel) | translate }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio {{classList}}\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{yesLabel|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span>{{yesLabel|translate}}</span>\n </mat-radio-button>&nbsp;\n <mat-radio-button #noButton [value]=\"false\">\n <span>{{noLabel|translate}}</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox {{classList}}\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label>&nbsp;</ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <div class=\"mat-form-field-buttons\"\n [style.--buttons-col-count]=\"buttonsColCount\"\n *ngIf=\"!formControl.disabled; else disabledLabel\">\n <!-- yes -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === true) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && yesIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{yesLabel|translate}}\n </ion-button>\n\n <!-- No button -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex !== undefined ? (_tabindex + 1) : undefined\"\n (click)=\"writeValue(false, $event)\"\n (keyup.enter)=\"writeValue(false, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === false) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && noIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{noLabel|translate}}\n </ion-button>\n </div>\n <ng-template #disabledLabel>\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ng-template>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n<ng-template #matSuffixTemplate>\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
6622
6670
  providers: [
6623
- DEFAULT_VALUE_ACCESSOR$4
6671
+ DEFAULT_VALUE_ACCESSOR$1
6624
6672
  ],
6625
6673
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6626
6674
  styles: [":host{width:100%}.mat-form-field.mat-boolean-field-radio{margin-top:-2px}.mat-form-field.mat-boolean-field-button{margin-top:-4px}.mat-form-field .mat-form-field-buttons{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}.mat-form-field .mat-form-field-buttons .mat-form-field-button{--flex-basis:calc(100% / var(--buttons-col-count, 2));flex:0 1 var(--flex-basis);max-width:min(var(--flex-basis),150px);white-space:normal;padding:0 2px;height:40px}"]
@@ -6707,6 +6755,7 @@
6707
6755
  return MatNumpadEvent;
6708
6756
  }(KeyboardEvent));
6709
6757
 
6758
+ exports.AnimationState = void 0;
6710
6759
  (function (AnimationState) {
6711
6760
  AnimationState["ENTER"] = "enter";
6712
6761
  AnimationState["ENTER_INPUT"] = "enter-input";
@@ -6874,7 +6923,7 @@
6874
6923
  };
6875
6924
  return MatNumpadDomService;
6876
6925
  }());
6877
- MatNumpadDomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$4.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
6926
+ MatNumpadDomService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0__namespace.ɵɵinject(i0__namespace.ComponentFactoryResolver), i0__namespace.ɵɵinject(i0__namespace.ApplicationRef), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(i1__namespace$3.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
6878
6927
  MatNumpadDomService.decorators = [
6879
6928
  { type: i0.Injectable, args: [{
6880
6929
  providedIn: 'root'
@@ -7280,7 +7329,7 @@
7280
7329
  },] }
7281
7330
  ];
7282
7331
 
7283
- var DEFAULT_VALUE_ACCESSOR$5 = {
7332
+ var DEFAULT_VALUE_ACCESSOR = {
7284
7333
  provide: i1.NG_VALUE_ACCESSOR,
7285
7334
  useExisting: i0.forwardRef(function () { return MatSwipeField; }),
7286
7335
  multi: true
@@ -7600,7 +7649,7 @@
7600
7649
  { type: i0.Component, args: [{
7601
7650
  selector: 'mat-swipe-field',
7602
7651
  template: "<mat-form-field [floatLabel]=\"showSlides && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n [class]=\"classList\"\n [class.mat-form-field-disabled]=\"disabled\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n </mat-label>\n <input matInput #fakeInput type=\"text\"\n [formControl]=\"formControl\"\n [readonly]=\"true\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showSlides\"\n [tabindex]=\"tabindex\">\n\n <div class=\"slides-container\" [class.hidden]=\"!showSlides\">\n <ion-slides #slides\n [options]=\"slidesOptions\"\n (ionSlidesDidLoad)=\"slidesLoaded()\"\n (ionSlideReachStart)=\"reachStart(true)\"\n (ionSlideReachEnd)=\"reachEnd(true)\"\n (ionSlideNextEnd)=\"reachStart(false)\"\n (ionSlidePrevEnd)=\"reachEnd(false)\"\n (ionSlideDidChange)=\"slideChanged()\"\n >\n <ion-slide *ngFor=\"let item of $items | async\">\n <ion-label>{{ displayWith(item) }}</ion-label>\n </ion-slide>\n\n </ion-slides>\n </div>\n\n <button #prevButton\n mat-icon-button\n type=\"button\"\n class=\"button-prev\"\n [hidden]=\"!showSlides\"\n [disabled]=\"previousDisabled\"\n (click)=\"previous()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button #nextButton\n mat-icon-button\n type=\"button\"\n class=\"button-next\"\n [hidden]=\"!showSlides\"\n [disabled]=\"nextDisabled\"\n (click)=\"next()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n\n</mat-form-field>\n",
7603
- providers: [DEFAULT_VALUE_ACCESSOR$5],
7652
+ providers: [DEFAULT_VALUE_ACCESSOR],
7604
7653
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
7605
7654
  styles: [":host{display:inline-block;width:100%;position:relative}input.hidden{display:none}.slides-container .swiper-slide{font-size:16px!important}.slides-container.hidden{visibility:hidden;height:0!important}.button-next,.button-prev{position:absolute;top:calc(50% - 20px);z-index:10}.button-prev{left:0;right:auto}.button-next{left:auto;right:0}"]
7606
7655
  },] }
@@ -7661,14 +7710,14 @@
7661
7710
  },] }
7662
7711
  ];
7663
7712
 
7664
- var noop$7 = function () { };
7665
- var ɵ0$7 = noop$7;
7713
+ var noop$1 = function () { };
7714
+ var ɵ0$4 = noop$1;
7666
7715
  var MatChipsField = /** @class */ (function () {
7667
7716
  function MatChipsField(cd, formGroupDir) {
7668
7717
  this.cd = cd;
7669
7718
  this.formGroupDir = formGroupDir;
7670
- this._onChangeCallback = noop$7;
7671
- this._onTouchedCallback = noop$7;
7719
+ this._onChangeCallback = noop$1;
7720
+ this._onTouchedCallback = noop$1;
7672
7721
  this.logPrefix = '[mat-chips] ';
7673
7722
  this.formControlName = null;
7674
7723
  this.required = false;
@@ -8636,7 +8685,7 @@
8636
8685
  };
8637
8686
  return ProgressBarService;
8638
8687
  }());
8639
- ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
8688
+ ProgressBarService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
8640
8689
  ProgressBarService.decorators = [
8641
8690
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
8642
8691
  ];
@@ -8683,7 +8732,7 @@
8683
8732
  };
8684
8733
  return AppGestureConfig;
8685
8734
  }(i1$6.HammerGestureConfig));
8686
- AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
8735
+ AppGestureConfig.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
8687
8736
  AppGestureConfig.decorators = [
8688
8737
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
8689
8738
  ];
@@ -8950,7 +8999,7 @@
8950
8999
  };
8951
9000
  return MatPaginatorI18n;
8952
9001
  }(paginator.MatPaginatorIntl));
8953
- MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
9002
+ MatPaginatorI18n.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
8954
9003
  MatPaginatorI18n.decorators = [
8955
9004
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
8956
9005
  ];
@@ -9042,17 +9091,17 @@
9042
9091
  return rgbArrayToHex(rgb.map(function (v) { return 255 - v; }));
9043
9092
  }
9044
9093
 
9045
- var noop$8 = function () {
9094
+ var noop = function () {
9046
9095
  };
9047
- var ɵ0$8 = noop$8;
9096
+ var ɵ0$3 = noop;
9048
9097
  var AppFormField = /** @class */ (function () {
9049
9098
  function AppFormField(translate, cd, injector, formGroupDir) {
9050
9099
  this.translate = translate;
9051
9100
  this.cd = cd;
9052
9101
  this.injector = injector;
9053
9102
  this.formGroupDir = formGroupDir;
9054
- this._onChangeCallback = noop$8;
9055
- this._onTouchedCallback = noop$8;
9103
+ this._onChangeCallback = noop;
9104
+ this._onTouchedCallback = noop;
9056
9105
  this.readonly = false;
9057
9106
  this.compact = false;
9058
9107
  this.floatLabel = 'auto';
@@ -9607,7 +9656,7 @@
9607
9656
  };
9608
9657
  return AudioProvider;
9609
9658
  }(StartableService));
9610
- AudioProvider.ɵprov = i0.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$2.NativeAudio, 8), i0.ɵɵinject(i3$1.Vibration, 8), i0.ɵɵinject(i4.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
9659
+ AudioProvider.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i2__namespace.NativeAudio, 8), i0__namespace.ɵɵinject(i3__namespace.Vibration, 8), i0__namespace.ɵɵinject(i4__namespace.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
9611
9660
  AudioProvider.decorators = [
9612
9661
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
9613
9662
  ];
@@ -9707,7 +9756,7 @@
9707
9756
  };
9708
9757
  return Hotkeys;
9709
9758
  }());
9710
- Hotkeys.ɵprov = i0.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0.ɵɵinject(i1$6.EventManager), i0.ɵɵinject(i2.MatDialog), i0.ɵɵinject(i1$4.DOCUMENT), i0.ɵɵinject(i1$5.ModalController)); }, token: Hotkeys, providedIn: "root" });
9759
+ Hotkeys.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0__namespace.ɵɵinject(i1__namespace$5.EventManager), i0__namespace.ɵɵinject(i2__namespace$1.MatDialog), i0__namespace.ɵɵinject(i1__namespace$3.DOCUMENT), i0__namespace.ɵɵinject(i1__namespace$4.ModalController)); }, token: Hotkeys, providedIn: "root" });
9711
9760
  Hotkeys.decorators = [
9712
9761
  { type: i0.Injectable, args: [{
9713
9762
  providedIn: 'root'
@@ -9911,7 +9960,7 @@
9911
9960
  return Base64ImageReader;
9912
9961
  }());
9913
9962
 
9914
- var uuidv4 = uuidv4Imported__namespace;
9963
+ var uuidv4$1 = uuidv4Imported__namespace;
9915
9964
  var FileService = /** @class */ (function () {
9916
9965
  function FileService(platform,
9917
9966
  //private transfer: FileTransfer,
@@ -9957,7 +10006,7 @@
9957
10006
  lastSlashIndex = source.lastIndexOf('/');
9958
10007
  if (lastSlashIndex === -1)
9959
10008
  throw new Error('Invalid URL: ' + source);
9960
- fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
10009
+ fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
9961
10010
  if (!(responseType === 'file' && this.canUseFileSystem)) return [3 /*break*/, 4];
9962
10011
  console.warn("WARN: [file] Fetching image {" + source + "} in local file...");
9963
10012
  targetFilePath = this._imageDirectory + fileName;
@@ -10020,7 +10069,7 @@
10020
10069
  };
10021
10070
  return FileService;
10022
10071
  }());
10023
- FileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
10072
+ FileService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i2__namespace$2.HttpClient), i0__namespace.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
10024
10073
  FileService.decorators = [
10025
10074
  { type: i0.Injectable, args: [{
10026
10075
  providedIn: 'root',
@@ -10187,7 +10236,7 @@
10187
10236
  Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
10188
10237
 
10189
10238
  var scrypt = require('scrypt-async');
10190
- var sha256 = require('hash.js/lib/hash/sha/256');
10239
+ var sha256$1 = require('hash.js/lib/hash/sha/256');
10191
10240
  var sha512 = require('hash.js/lib/hash/sha/512');
10192
10241
  var nacl = {
10193
10242
  sign: tweetnacl.sign,
@@ -10293,7 +10342,7 @@
10293
10342
  * Hash (using SHA256) a message
10294
10343
  */
10295
10344
  CryptoService.prototype.sha256 = function (message) {
10296
- return sha256().update(message).digest('hex');
10345
+ return sha256$1().update(message).digest('hex');
10297
10346
  };
10298
10347
  /**
10299
10348
  * Hash (using SHA512) a message
@@ -10307,7 +10356,7 @@
10307
10356
  };
10308
10357
  return CryptoService;
10309
10358
  }());
10310
- CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
10359
+ CryptoService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
10311
10360
  CryptoService.decorators = [
10312
10361
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
10313
10362
  ];
@@ -11220,7 +11269,7 @@
11220
11269
 
11221
11270
  var moment$3 = momentImported__namespace;
11222
11271
  var SETTINGS_STORAGE_KEY = 'settings';
11223
- var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi'];
11272
+ var SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
11224
11273
  // fixme: this constant points to static environment
11225
11274
  var DEFAULT_SETTINGS = {
11226
11275
  accountInheritance: true,
@@ -11271,14 +11320,24 @@
11271
11320
  });
11272
11321
  Object.defineProperty(LocalSettingsService.prototype, "usageMode", {
11273
11322
  get: function () {
11274
- return (this._data && this._data.usageMode || (this.mobile ? 'FIELD' : 'DESK'));
11323
+ var _a;
11324
+ if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
11325
+ console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
11326
+ return isCordova(window) ? 'FIELD' : 'DESK';
11327
+ }
11328
+ return this._data.usageMode;
11275
11329
  },
11276
11330
  enumerable: false,
11277
11331
  configurable: true
11278
11332
  });
11279
11333
  Object.defineProperty(LocalSettingsService.prototype, "mobile", {
11280
11334
  get: function () {
11281
- return this._data && toBoolean(this._data.mobile, this.platform.is('mobile'));
11335
+ var _a;
11336
+ if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
11337
+ console.warn("[settings] Accessing to property 'mobile' BEFORE service started! Please use ready()");
11338
+ return isMobile(window);
11339
+ }
11340
+ return this._data.mobile;
11282
11341
  },
11283
11342
  set: function (value) {
11284
11343
  this._data.mobile = value;
@@ -11286,16 +11345,6 @@
11286
11345
  enumerable: false,
11287
11346
  configurable: true
11288
11347
  });
11289
- Object.defineProperty(LocalSettingsService.prototype, "touchUi", {
11290
- get: function () {
11291
- return this._data.touchUi;
11292
- },
11293
- set: function (value) {
11294
- this._data.touchUi = value;
11295
- },
11296
- enumerable: false,
11297
- configurable: true
11298
- });
11299
11348
  Object.defineProperty(LocalSettingsService.prototype, "pageHistory", {
11300
11349
  get: function () {
11301
11350
  return (this._data && this._data.pageHistory || []);
@@ -11306,9 +11355,8 @@
11306
11355
  LocalSettingsService.prototype.ngOnStart = function () {
11307
11356
  console.info('[settings] Starting service...');
11308
11357
  // Restoring local settings
11309
- this._data.mobile = toBoolean(this._data.mobile, this.platform.is('mobile'));
11310
- this._data.touchUi = this._data.mobile || this.platform.is('phablet') || this.platform.is('tablet');
11311
- this._data.usageMode = this.platform.is('android') || this.platform.is('ios') ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOs
11358
+ this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);
11359
+ this._data.usageMode = (isAndroid(window) || isIOS(window)) ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOS
11312
11360
  // Restoring local settings
11313
11361
  return this.restoreLocally();
11314
11362
  };
@@ -11321,13 +11369,13 @@
11321
11369
  LocalSettingsService.prototype.restoreLocally = function () {
11322
11370
  return __awaiter(this, void 0, void 0, function () {
11323
11371
  var data, settingsStr, restoredData_1;
11324
- return __generator(this, function (_a) {
11325
- switch (_a.label) {
11372
+ return __generator(this, function (_b) {
11373
+ switch (_b.label) {
11326
11374
  case 0:
11327
11375
  data = this._data || {};
11328
11376
  return [4 /*yield*/, this.storage.get(SETTINGS_STORAGE_KEY)];
11329
11377
  case 1:
11330
- settingsStr = _a.sent();
11378
+ settingsStr = _b.sent();
11331
11379
  // Restore local settings (or keep old settings)
11332
11380
  if (isNotNilOrBlank(settingsStr)) {
11333
11381
  console.info('[settings] Restoring previous settings...');
@@ -11384,14 +11432,14 @@
11384
11432
  LocalSettingsService.prototype.apply = function (settings, opts) {
11385
11433
  return __awaiter(this, void 0, void 0, function () {
11386
11434
  var data;
11387
- return __generator(this, function (_a) {
11388
- switch (_a.label) {
11435
+ return __generator(this, function (_b) {
11436
+ switch (_b.label) {
11389
11437
  case 0:
11390
11438
  if (!!this.started) return [3 /*break*/, 2];
11391
11439
  return [4 /*yield*/, this.ready()];
11392
11440
  case 1:
11393
- _a.sent();
11394
- _a.label = 2;
11441
+ _b.sent();
11442
+ _b.label = 2;
11395
11443
  case 2:
11396
11444
  data = Object.assign(Object.assign({}, this._data), settings);
11397
11445
  if (equals(data, this._data))
@@ -11400,11 +11448,11 @@
11400
11448
  if (!(opts && opts.persistImmediate)) return [3 /*break*/, 4];
11401
11449
  return [4 /*yield*/, this.persistLocally(true)];
11402
11450
  case 3:
11403
- _a.sent();
11451
+ _b.sent();
11404
11452
  return [3 /*break*/, 5];
11405
11453
  case 4:
11406
11454
  this.persistLocally(); // No AWAIT
11407
- _a.label = 5;
11455
+ _b.label = 5;
11408
11456
  case 5:
11409
11457
  // Emit event
11410
11458
  if (!opts || opts.emitEvent !== false) {
@@ -11418,14 +11466,14 @@
11418
11466
  LocalSettingsService.prototype.applyProperty = function (key, value, opts) {
11419
11467
  return __awaiter(this, void 0, void 0, function () {
11420
11468
  var changes;
11421
- return __generator(this, function (_a) {
11422
- switch (_a.label) {
11469
+ return __generator(this, function (_b) {
11470
+ switch (_b.label) {
11423
11471
  case 0:
11424
11472
  changes = {};
11425
11473
  changes[key] = value;
11426
11474
  return [4 /*yield*/, this.apply(changes, opts)];
11427
11475
  case 1:
11428
- _a.sent();
11476
+ _b.sent();
11429
11477
  return [2 /*return*/];
11430
11478
  }
11431
11479
  });
@@ -11443,7 +11491,7 @@
11443
11491
  LocalSettingsService.prototype.savePageSetting = function (pageId, value, propertyName) {
11444
11492
  return __awaiter(this, void 0, void 0, function () {
11445
11493
  var key;
11446
- return __generator(this, function (_a) {
11494
+ return __generator(this, function (_b) {
11447
11495
  this._data = this._data || this.defaultSettings;
11448
11496
  this._data.pages = this._data.pages || {};
11449
11497
  key = pageId.replace(/[/]/g, '__');
@@ -11569,8 +11617,8 @@
11569
11617
  ) {
11570
11618
  return __awaiter(this, void 0, void 0, function () {
11571
11619
  var index, existingPage, removedPages;
11572
- return __generator(this, function (_a) {
11573
- switch (_a.label) {
11620
+ return __generator(this, function (_b) {
11621
+ switch (_b.label) {
11574
11622
  case 0:
11575
11623
  // If not inside recursive call: fill page history defaults
11576
11624
  if (!pageHistory)
@@ -11607,8 +11655,8 @@
11607
11655
  return [4 /*yield*/, this.addToPageHistory(page, opts, existingPage.children)];
11608
11656
  case 3:
11609
11657
  // Add page as parent's children (recursive call)
11610
- _a.sent();
11611
- _a.label = 4;
11658
+ _b.sent();
11659
+ _b.label = 4;
11612
11660
  case 4:
11613
11661
  if (!(pageHistory === this._data.pageHistory)) return [3 /*break*/, 6];
11614
11662
  // If max has been reached, remove old pages
@@ -11620,8 +11668,8 @@
11620
11668
  return [4 /*yield*/, this.applyProperty('pageHistory', pageHistory)];
11621
11669
  case 5:
11622
11670
  // Apply new value
11623
- _a.sent();
11624
- _a.label = 6;
11671
+ _b.sent();
11672
+ _b.label = 6;
11625
11673
  case 6: return [2 /*return*/];
11626
11674
  }
11627
11675
  });
@@ -11632,8 +11680,8 @@
11632
11680
  return __awaiter(this, void 0, void 0, function () {
11633
11681
  var index, found;
11634
11682
  var _this = this;
11635
- return __generator(this, function (_a) {
11636
- switch (_a.label) {
11683
+ return __generator(this, function (_b) {
11684
+ switch (_b.label) {
11637
11685
  case 0:
11638
11686
  pageHistory = pageHistory || this._data.pageHistory;
11639
11687
  index = pageHistory.findIndex(function (p) { return p.path === path; });
@@ -11655,8 +11703,8 @@
11655
11703
  return [4 /*yield*/, this.applyProperty('pageHistory', this._data.pageHistory)];
11656
11704
  case 1:
11657
11705
  // Apply changes
11658
- _a.sent();
11659
- _a.label = 2;
11706
+ _b.sent();
11707
+ _b.label = 2;
11660
11708
  case 2: return [2 /*return*/, found];
11661
11709
  }
11662
11710
  });
@@ -11664,14 +11712,14 @@
11664
11712
  };
11665
11713
  LocalSettingsService.prototype.clearPageHistory = function () {
11666
11714
  return __awaiter(this, void 0, void 0, function () {
11667
- return __generator(this, function (_a) {
11668
- switch (_a.label) {
11715
+ return __generator(this, function (_b) {
11716
+ switch (_b.label) {
11669
11717
  case 0:
11670
11718
  // Reset all page history
11671
11719
  return [4 /*yield*/, this.applyProperty('pageHistory', [], { persistImmediate: true })];
11672
11720
  case 1:
11673
11721
  // Reset all page history
11674
- _a.sent();
11722
+ _b.sent();
11675
11723
  return [2 /*return*/];
11676
11724
  }
11677
11725
  });
@@ -11736,7 +11784,7 @@
11736
11784
  };
11737
11785
  return LocalSettingsService;
11738
11786
  }(StartableService));
11739
- LocalSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
11787
+ LocalSettingsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService), i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0__namespace.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
11740
11788
  LocalSettingsService.decorators = [
11741
11789
  { type: i0.Injectable, args: [{
11742
11790
  providedIn: 'root',
@@ -12539,7 +12587,7 @@
12539
12587
  };
12540
12588
  return NetworkService;
12541
12589
  }(StartableService));
12542
- NetworkService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0.ɵɵinject(i1$4.DOCUMENT), i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i1$5.ModalController), i0.ɵɵinject(CryptoService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i2$1.HttpClient), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i9.Network, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i1$2.TranslateService, 8), i0.ɵɵinject(i1$5.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
12590
+ NetworkService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0__namespace.ɵɵinject(i1__namespace$3.DOCUMENT), i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i1__namespace$4.ModalController), i0__namespace.ɵɵinject(CryptoService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(LocalSettingsService), i0__namespace.ɵɵinject(i6__namespace.CacheService), i0__namespace.ɵɵinject(i2__namespace$2.HttpClient), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(i9__namespace.Network, 8), i0__namespace.ɵɵinject(i10__namespace.SplashScreen, 8), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService, 8), i0__namespace.ɵɵinject(i1__namespace$4.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
12543
12591
  NetworkService.decorators = [
12544
12592
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
12545
12593
  ];
@@ -12559,7 +12607,7 @@
12559
12607
  { type: i1$5.ToastController, decorators: [{ type: i0.Optional }] }
12560
12608
  ]; };
12561
12609
 
12562
- var ErrorCodes = {
12610
+ var ErrorCodes$2 = {
12563
12611
  UNKNOWN_ERROR: 0,
12564
12612
  LOAD_ACCOUNT_ERROR: 1,
12565
12613
  BAD_PASSWORD: 2,
@@ -12976,7 +13024,7 @@
12976
13024
  case 13:
12977
13025
  err_1 = _b.sent();
12978
13026
  console.error(err_1);
12979
- throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err_1 };
13027
+ throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err_1 };
12980
13028
  case 14:
12981
13029
  // Emit update event
12982
13030
  if (!opts || opts.emitEvent !== false) {
@@ -13753,7 +13801,7 @@
13753
13801
  }(StartableService));
13754
13802
  EntitiesStorage.TRASH_PREFIX = 'Trash#';
13755
13803
  EntitiesStorage.REMOTE_PREFIX = 'Remote#';
13756
- EntitiesStorage.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(ProgressBarService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
13804
+ EntitiesStorage.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(ProgressBarService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
13757
13805
  EntitiesStorage.decorators = [
13758
13806
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
13759
13807
  ];
@@ -13909,10 +13957,10 @@
13909
13957
  function referentialsToString(values, properties, separator) {
13910
13958
  return (values || []).map(function (v) { return referentialToString(v, properties); }).join(separator || ', ');
13911
13959
  }
13912
- var ɵ0$9 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
13960
+ var ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
13913
13961
  var StatusList = Object.freeze([
13914
13962
  {
13915
- id: ɵ0$9,
13963
+ id: ɵ0$2,
13916
13964
  icon: 'checkmark',
13917
13965
  label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
13918
13966
  },
@@ -14215,7 +14263,7 @@
14215
14263
  (data.lastName || '')) || '';
14216
14264
  }
14217
14265
 
14218
- var uuidv4$1 = uuidv4Imported__namespace;
14266
+ var uuidv4 = uuidv4Imported__namespace;
14219
14267
  var _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
14220
14268
  var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
14221
14269
  /**
@@ -14259,7 +14307,7 @@
14259
14307
  // Skip if not tracked
14260
14308
  if (!context || !context.tracked)
14261
14309
  return forward(operation);
14262
- var id = context.serializationKey || uuidv4$1();
14310
+ var id = context.serializationKey || uuidv4();
14263
14311
  console.debug("[apollo-tracker-link] Watching tracked query {" + operation.operationName + "#" + id + "}");
14264
14312
  // Clean context, before calling JSON.stringify (remove unused attributes)
14265
14313
  var cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
@@ -14892,14 +14940,14 @@
14892
14940
  mutationLinks = void 0;
14893
14941
  // Add queue to store tracked queries, when offline
14894
14942
  if (enableTrackMutationQueries) {
14895
- serializingLink = new SerializingLink__default['default']();
14943
+ serializingLink = new SerializingLink__default["default"]();
14896
14944
  trackerLink = createTrackerLink({
14897
14945
  storage: storage,
14898
14946
  onNetworkStatusChange: this._networkStatusChanged$,
14899
14947
  debounce: 1000,
14900
14948
  debug: true
14901
14949
  });
14902
- queueLink_1 = new QueueLink__default['default']();
14950
+ queueLink_1 = new QueueLink__default["default"]();
14903
14951
  this.registerSubscription(this._networkStatusChanged$
14904
14952
  .subscribe(function (type) {
14905
14953
  // Network is offline: start buffering into queue
@@ -14914,7 +14962,7 @@
14914
14962
  }
14915
14963
  }));
14916
14964
  mutationLinks = [
14917
- loggerLink__default['default'],
14965
+ loggerLink__default["default"],
14918
14966
  queueLink_1,
14919
14967
  trackerLink,
14920
14968
  queueLink_1,
@@ -15021,7 +15069,7 @@
15021
15069
  (err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
15022
15070
  || this.toAppError(err.networkError)
15023
15071
  || (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
15024
- || this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
15072
+ || this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
15025
15073
  // If graphQL: try to convert the first error found
15026
15074
  || (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
15027
15075
  || this.toAppError(err)
@@ -15029,7 +15077,7 @@
15029
15077
  || (err.graphQLErrors && err.graphQLErrors[0])
15030
15078
  || err;
15031
15079
  console.error('[graphql] ' + (error && error.message || error), error.stack || '');
15032
- if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
15080
+ if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
15033
15081
  console.error('[graphql] original error: ' + err.networkError.message);
15034
15082
  this.onNetworkError.next(error);
15035
15083
  }
@@ -15065,7 +15113,7 @@
15065
15113
  return 'ERROR.UNAUTHORIZED';
15066
15114
  case ServerErrorCodes.FORBIDDEN:
15067
15115
  return 'ERROR.FORBIDDEN';
15068
- case ErrorCodes.UNKNOWN_NETWORK_ERROR:
15116
+ case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
15069
15117
  return 'ERROR.UNKNOWN_NETWORK_ERROR';
15070
15118
  case ServerErrorCodes.BAD_UPDATE_DATE:
15071
15119
  return 'ERROR.BAD_UPDATE_DATE';
@@ -15097,7 +15145,7 @@
15097
15145
  };
15098
15146
  return GraphqlService;
15099
15147
  }(StartableService));
15100
- GraphqlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$3.Apollo), i0.ɵɵinject(i3$3.HttpLink), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(CryptoService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
15148
+ GraphqlService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i2__namespace$3.Apollo), i0__namespace.ɵɵinject(i3__namespace$2.HttpLink), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(CryptoService), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
15101
15149
  GraphqlService.decorators = [
15102
15150
  { type: i0.Injectable, args: [{
15103
15151
  providedIn: 'root'
@@ -15114,7 +15162,7 @@
15114
15162
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
15115
15163
  ]; };
15116
15164
 
15117
- var sha256$1 = require('hash.js/lib/hash/sha/256');
15165
+ var sha256 = require('hash.js/lib/hash/sha/256');
15118
15166
  var BaseGraphqlServiceOptions = /** @class */ (function () {
15119
15167
  function BaseGraphqlServiceOptions() {
15120
15168
  }
@@ -15284,8 +15332,8 @@
15284
15332
  };
15285
15333
  /* -- protected methods -- */
15286
15334
  BaseGraphqlService.prototype.computeMutableWatchQueryId = function (opts) {
15287
- var queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
15288
- var variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
15335
+ var queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
15336
+ var variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
15289
15337
  return [queryName, opts.arrayFieldName, variablesKey].join('|');
15290
15338
  };
15291
15339
  BaseGraphqlService.prototype.findMutableWatchQueries = function (opts) {
@@ -15354,19 +15402,19 @@
15354
15402
  /* ------------------------------------
15355
15403
  * GraphQL queries
15356
15404
  * ------------------------------------*/
15357
- var Fragments = {
15358
- account: core.gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"], ["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"]))),
15359
- settings: core.gql(templateObject_2 || (templateObject_2 = __makeTemplateObject(["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"], ["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"])))
15405
+ var Fragments$1 = {
15406
+ account: core.gql(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"], ["\n fragment AccountFragment on AccountVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n settings {\n ...UserSettingsFragment\n }\n department {\n id\n label\n name\n __typename\n }\n __typename\n }"]))),
15407
+ settings: core.gql(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"], ["fragment UserSettingsFragment on UserSettingsVO {\n id\n locale\n latLongFormat\n content\n nonce\n updateDate\n __typename\n }"])))
15360
15408
  };
15361
15409
  // Load account query
15362
- var LoadQuery = core.gql(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"], ["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"])), Fragments.account, Fragments.settings);
15410
+ var LoadQuery$1 = core.gql(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"], ["\n query Account {\n data: account {\n ...AccountFragment\n }\n }\n ", "\n ", "\n"])), Fragments$1.account, Fragments$1.settings);
15363
15411
  // Check email query
15364
- var IsEmailExistsQuery = core.gql(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"], ["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"])));
15412
+ var IsEmailExistsQuery = core.gql(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"], ["\n query IsEmailExists($email: String, $hash: String){\n isEmailExists(email: $email, hash: $hash)\n }\n"])));
15365
15413
  // Save (create or update) account mutation
15366
15414
  var AccountMutations = {
15367
- save: core.gql(templateObject_5 || (templateObject_5 = __makeTemplateObject([" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], [" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments.account, Fragments.settings),
15368
- create: core.gql(templateObject_6 || (templateObject_6 = __makeTemplateObject(["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], ["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments.account, Fragments.settings),
15369
- saveSettings: core.gql(templateObject_7 || (templateObject_7 = __makeTemplateObject(["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""], ["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""])), Fragments.settings)
15415
+ save: core.gql(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject([" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], [" mutation SaveAccount($data:AccountVOInput){\n data: saveAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments$1.account, Fragments$1.settings),
15416
+ create: core.gql(templateObject_6 || (templateObject_6 = __makeTemplateObject(["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""], ["mutation CreateAccount($data:AccountVOInput){\n data: createAccount(account: $data){\n ...AccountFragment\n }\n }\n ", "\n ", ""])), Fragments$1.account, Fragments$1.settings),
15417
+ saveSettings: core.gql(templateObject_7 || (templateObject_7 = __makeTemplateObject(["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""], ["mutation SaveSettings($data:UserSettingsVOInput){\n data: saveSettings(settings: $data){\n ...UserSettingsFragment\n }\n }\n ", ""])), Fragments$1.settings)
15370
15418
  };
15371
15419
  // Sent confirmation email
15372
15420
  var SendConfirmEmailMutation = core.gql(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n mutation sendAccountConfirmationEmail($email:String, $locale:String){\n sendAccountConfirmationEmail(email: $email, locale: $locale)\n }\n"], ["\n mutation sendAccountConfirmationEmail($email:String, $locale:String){\n sendAccountConfirmationEmail(email: $email, locale: $locale)\n }\n"])));
@@ -15395,6 +15443,7 @@
15395
15443
  _this.onChange = new rxjs.Subject();
15396
15444
  _this.onAuthTokenChange = new rxjs.Subject();
15397
15445
  _this.onAuthBasicChange = new rxjs.Subject();
15446
+ _this._stopWatching$ = new rxjs.Subject();
15398
15447
  _this._cache = {
15399
15448
  loaded: false,
15400
15449
  keypair: null,
@@ -15728,7 +15777,7 @@
15728
15777
  error_3 = _b.sent();
15729
15778
  console.error(error_3);
15730
15779
  this.resetData();
15731
- throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
15780
+ throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
15732
15781
  case 4:
15733
15782
  // Store pubkey+keypair
15734
15783
  this._cache.pubkey = Base58.encode(keypair.publicKey);
@@ -15764,7 +15813,7 @@
15764
15813
  return [3 /*break*/, 18];
15765
15814
  case 11:
15766
15815
  err_1 = _b.sent();
15767
- if (!(err_1 && +(err_1.code) === ErrorCodes.LOAD_ACCOUNT_ERROR)) return [3 /*break*/, 17];
15816
+ if (!(err_1 && +(err_1.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR)) return [3 /*break*/, 17];
15768
15817
  if (!(data.username.indexOf('@') !== -1)) return [3 /*break*/, 16];
15769
15818
  isEmailExists = void 0;
15770
15819
  _b.label = 12;
@@ -15780,12 +15829,12 @@
15780
15829
  case 15:
15781
15830
  // Email not exists (no account)
15782
15831
  if (!isEmailExists) {
15783
- throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
15832
+ throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
15784
15833
  }
15785
15834
  _b.label = 16;
15786
15835
  case 16:
15787
15836
  // Email exists, so error = 'bad password'
15788
- throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
15837
+ throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
15789
15838
  case 17: throw err_1; // resend the first error
15790
15839
  case 18:
15791
15840
  _b.trys.push([18, 20, , 21]);
@@ -15921,6 +15970,7 @@
15921
15970
  if (hadAuthBasic)
15922
15971
  this.onAuthBasicChange.next(undefined);
15923
15972
  this.onChange.next(undefined);
15973
+ this._stopWatching$.next();
15924
15974
  return [2 /*return*/];
15925
15975
  }
15926
15976
  });
@@ -15957,8 +16007,8 @@
15957
16007
  _b.label = 3;
15958
16008
  case 3: return [3 /*break*/, 6];
15959
16009
  case 4: return [4 /*yield*/, this.graphql.query({
15960
- query: LoadQuery,
15961
- error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
16010
+ query: LoadQuery$1,
16011
+ error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
15962
16012
  fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
15963
16013
  })];
15964
16014
  case 5:
@@ -15996,7 +16046,7 @@
15996
16046
  case 1:
15997
16047
  isEmailExists = _b.sent();
15998
16048
  if (isEmailExists) {
15999
- throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
16049
+ throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
16000
16050
  }
16001
16051
  return [2 /*return*/];
16002
16052
  }
@@ -16046,7 +16096,7 @@
16046
16096
  locale: locale
16047
16097
  },
16048
16098
  error: {
16049
- code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
16099
+ code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
16050
16100
  message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
16051
16101
  }
16052
16102
  })];
@@ -16069,7 +16119,7 @@
16069
16119
  code: code
16070
16120
  },
16071
16121
  error: {
16072
- code: ErrorCodes.CONFIRM_EMAIL_FAILED,
16122
+ code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
16073
16123
  message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
16074
16124
  }
16075
16125
  })];
@@ -16080,72 +16130,60 @@
16080
16130
  });
16081
16131
  });
16082
16132
  };
16083
- AccountService.prototype.listenChanges = function () {
16133
+ AccountService.prototype.watch = function () {
16084
16134
  var _this = this;
16085
16135
  if (!this._cache.pubkey)
16086
- return rxjs.Subscription.EMPTY;
16087
- var self = this;
16088
- console.debug('[account] [WS] Listening changes');
16089
- var subscription = this.graphql.subscribe({
16136
+ throw new Error('Not logged in');
16137
+ if (!this.started) {
16138
+ // Wait service ready, then loop
16139
+ return rxjs.from(this.ready())
16140
+ .pipe(operators.switchMap(function () { return _this.watch(); }));
16141
+ }
16142
+ this._stopWatching$.next(); // Stop previous listening
16143
+ console.debug('[account] [WS] Watching changes');
16144
+ return this.graphql.subscribe({
16090
16145
  query: AccountSubscriptions.listenChanges,
16091
16146
  variables: {
16092
16147
  interval: 10
16093
16148
  },
16094
16149
  error: {
16095
- code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
16150
+ code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
16096
16151
  message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
16097
16152
  }
16098
- }).subscribe({
16099
- next: function (_b) {
16100
- var data = _b.data;
16101
- return __awaiter(_this, void 0, void 0, function () {
16102
- var _a, existingUpdateDate;
16103
- return __generator(this, function (_b) {
16104
- switch (_b.label) {
16105
- case 0:
16106
- if (!data)
16107
- return [2 /*return*/];
16108
- existingUpdateDate = toDateISOString((_a = self._data) === null || _a === void 0 ? void 0 : _a.updateDate);
16109
- if (!(existingUpdateDate !== data.updateDate)) return [3 /*break*/, 2];
16110
- console.debug("[account] [WS] Detected update on {" + data.updateDate + "}");
16111
- return [4 /*yield*/, self.refresh()];
16112
- case 1:
16113
- _b.sent();
16114
- _b.label = 2;
16115
- case 2: return [2 /*return*/];
16116
- }
16117
- });
16118
- });
16119
- },
16120
- error: function (err) { return __awaiter(_this, void 0, void 0, function () {
16121
- return __generator(this, function (_b) {
16122
- switch (_b.label) {
16123
- case 0:
16124
- if (!(err && +err.code === ServerErrorCodes.NOT_FOUND)) return [3 /*break*/, 2];
16125
- console.info('[account] Account not exists anymore: force user to logout...', err);
16126
- return [4 /*yield*/, self.logout()];
16127
- case 1:
16128
- _b.sent();
16129
- return [3 /*break*/, 5];
16130
- case 2:
16131
- if (!(err && +err.code === ServerErrorCodes.UNAUTHORIZED)) return [3 /*break*/, 4];
16132
- console.info('[account] Account not authorized: force user to logout...', err);
16133
- return [4 /*yield*/, self.logout()];
16134
- case 3:
16135
- _b.sent();
16136
- return [3 /*break*/, 5];
16137
- case 4:
16138
- console.warn('[account] [WS] Received error:', err);
16139
- _b.label = 5;
16140
- case 5: return [2 /*return*/];
16141
- }
16142
- });
16143
- }); },
16144
- complete: function () {
16145
- console.debug('[account] [WS] Completed');
16153
+ })
16154
+ .pipe(
16155
+ // Stop this pipe next time we call watch()
16156
+ operators.takeUntil(this._stopWatching$), operators.map(function (_b) {
16157
+ var data = _b.data;
16158
+ var _a;
16159
+ if (!data)
16160
+ return;
16161
+ var existingUpdateDate = toDateISOString((_a = _this._data) === null || _a === void 0 ? void 0 : _a.updateDate);
16162
+ if (existingUpdateDate === data.updateDate)
16163
+ return;
16164
+ console.debug("[account] [WS] Detected update on {" + data.updateDate + "}");
16165
+ return exports.Account.fromObject(data);
16166
+ }), operators.filter(isNotNil));
16167
+ };
16168
+ AccountService.prototype.listenChanges = function () {
16169
+ var self = this;
16170
+ var subscription = this.watch()
16171
+ .subscribe({
16172
+ next: function (data) { return self.refresh(); },
16173
+ error: function (err) {
16174
+ if (err && +err.code === ServerErrorCodes.NOT_FOUND) {
16175
+ console.info('[account] Account not exists anymore: force user to logout...', err);
16176
+ self.logout();
16177
+ }
16178
+ else if (err && +err.code === ServerErrorCodes.UNAUTHORIZED) {
16179
+ console.info('[account] Account not authorized: force user to logout...', err);
16180
+ self.logout();
16181
+ }
16182
+ else {
16183
+ console.warn('[account] [WS] Received error:', err);
16184
+ }
16146
16185
  }
16147
16186
  });
16148
- // Add log when closing WS
16149
16187
  subscription.add(function () { return console.debug('[account] [WS] Stop listening changes'); });
16150
16188
  return subscription;
16151
16189
  };
@@ -16232,7 +16270,7 @@
16232
16270
  throw error_6;
16233
16271
  console.error(error_6);
16234
16272
  throw {
16235
- code: ErrorCodes.LOAD_ACCOUNT_ERROR,
16273
+ code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
16236
16274
  message: 'ERROR.LOAD_ACCOUNT_ERROR'
16237
16275
  };
16238
16276
  case 6: return [2 /*return*/];
@@ -16441,7 +16479,7 @@
16441
16479
  case 1:
16442
16480
  existingAccount = _b.sent();
16443
16481
  if (!existingAccount || !existingAccount.updateDate) {
16444
- throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
16482
+ throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
16445
16483
  }
16446
16484
  this.copyIdAndUpdateDate(existingAccount, account);
16447
16485
  _b.label = 2;
@@ -16453,7 +16491,7 @@
16453
16491
  mutation: isNew ? AccountMutations.create : AccountMutations.save,
16454
16492
  variables: { data: json },
16455
16493
  error: {
16456
- code: ErrorCodes.SAVE_ACCOUNT_ERROR,
16494
+ code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
16457
16495
  message: 'ERROR.SAVE_ACCOUNT_ERROR'
16458
16496
  }
16459
16497
  })];
@@ -16487,7 +16525,7 @@
16487
16525
  mutation: AccountMutations.saveSettings,
16488
16526
  variables: { data: json },
16489
16527
  error: {
16490
- code: ErrorCodes.SAVE_SETTINGS_ERROR,
16528
+ code: ErrorCodes$2.SAVE_SETTINGS_ERROR,
16491
16529
  message: 'ERROR.SAVE_SETTINGS_ERROR'
16492
16530
  }
16493
16531
  })];
@@ -16518,7 +16556,7 @@
16518
16556
  if (counter > 4) {
16519
16557
  if (this._debug)
16520
16558
  console.debug("[account] Failed to authentication on pod (after " + counter + " attempts)");
16521
- throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
16559
+ throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
16522
16560
  }
16523
16561
  if (!token) return [3 /*break*/, 2];
16524
16562
  return [4 /*yield*/, this.graphql.query({
@@ -16527,7 +16565,7 @@
16527
16565
  token: token
16528
16566
  },
16529
16567
  error: {
16530
- code: ErrorCodes.UNAUTHORIZED,
16568
+ code: ErrorCodes$2.UNAUTHORIZED,
16531
16569
  message: 'ERROR.UNAUTHORIZED'
16532
16570
  },
16533
16571
  fetchPolicy: 'no-cache'
@@ -16544,7 +16582,7 @@
16544
16582
  _b.label = 2;
16545
16583
  case 2:
16546
16584
  challengeError = {
16547
- code: ErrorCodes.AUTH_CHALLENGE_ERROR,
16585
+ code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
16548
16586
  message: 'ERROR.AUTH_CHALLENGE_ERROR'
16549
16587
  };
16550
16588
  return [4 /*yield*/, this.graphql.query({
@@ -16591,7 +16629,7 @@
16591
16629
  };
16592
16630
  return AccountService;
16593
16631
  }(BaseGraphqlService));
16594
- AccountService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(i0.ɵɵinject(CryptoService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(FileService), i0.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
16632
+ AccountService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(i0__namespace.ɵɵinject(CryptoService), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(GraphqlService), i0__namespace.ɵɵinject(LocalSettingsService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(FileService), i0__namespace.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
16595
16633
  AccountService.decorators = [
16596
16634
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
16597
16635
  ];
@@ -16604,7 +16642,7 @@
16604
16642
  { type: FileService },
16605
16643
  { type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
16606
16644
  ]; };
16607
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
16645
+ var templateObject_1$4, templateObject_2$4, templateObject_3$3, templateObject_4$3, templateObject_5$2, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12;
16608
16646
 
16609
16647
  var Software_1, Configuration_1;
16610
16648
  // @dynamic
@@ -16856,18 +16894,18 @@
16856
16894
  /* ------------------------------------
16857
16895
  * GraphQL queries
16858
16896
  * ------------------------------------*/
16859
- var Fragments$1 = {
16860
- config: core.gql(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "], ["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "])))
16897
+ var Fragments = {
16898
+ config: core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "], ["\n fragment ConfigFragment on ConfigurationVO {\n id\n label\n name\n description\n comments\n properties\n smallLogo\n largeLogo\n backgroundImages\n partners {\n id\n label\n name\n logo\n siteUrl\n __typename\n }\n updateDate\n creationDate\n statusId\n __typename\n }\n "])))
16861
16899
  };
16862
- var LoadQuery$1 = core.gql(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"], ["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"])), Fragments$1.config);
16900
+ var LoadQuery = core.gql(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"], ["\nquery Configuration{\n data: configuration{\n ...ConfigFragment\n }\n}\n ", "\n"])), Fragments.config);
16863
16901
  // Save (create or update) account mutation
16864
- var SaveMutation = core.gql(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"], ["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"])), Fragments$1.config);
16865
- var ClearCache = core.gql(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"], ["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"])));
16902
+ var SaveMutation = core.gql(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"], ["\n mutation SaveConfiguration($data: ConfigurationVOInput){\n data: saveConfiguration(config: $data){\n ...ConfigFragment\n }\n }\n ", "\n"])), Fragments.config);
16903
+ var ClearCache = core.gql(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"], ["\n query ClearCache($name: String) {\n clearCache(name: $name)\n }\n"])));
16866
16904
  var CacheStatistics = core.gql(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n query CacheStatistics {\n cacheStatistics\n }\n"], ["\n query CacheStatistics {\n cacheStatistics\n }\n"])));
16867
16905
  var APP_CONFIG_OPTIONS = new i0.InjectionToken('defaultOptions');
16868
16906
  var ConfigService = /** @class */ (function (_super) {
16869
16907
  __extends(ConfigService, _super);
16870
- function ConfigService(platform, graphql, storage, network, file, toastController, translate, environment, defaultOptionsMap) {
16908
+ function ConfigService(platform, graphql, storage, network, file, toastController, translate, accountService, environment, defaultOptionsMap) {
16871
16909
  var _this = _super.call(this, graphql, environment) || this;
16872
16910
  _this.platform = platform;
16873
16911
  _this.graphql = graphql;
@@ -16876,6 +16914,7 @@
16876
16914
  _this.file = file;
16877
16915
  _this.toastController = toastController;
16878
16916
  _this.translate = translate;
16917
+ _this.accountService = accountService;
16879
16918
  _this.environment = environment;
16880
16919
  _this.$data = new rxjs.BehaviorSubject(null);
16881
16920
  _this._debug = !environment.production;
@@ -16921,12 +16960,12 @@
16921
16960
  case 0:
16922
16961
  now = Date.now();
16923
16962
  console.debug('[config] Loading Pod configuration...');
16924
- query = opts && opts.query || LoadQuery$1;
16963
+ query = opts && opts.query || LoadQuery;
16925
16964
  variables = opts && opts.variables || undefined;
16926
16965
  return [4 /*yield*/, this.graphql.query({
16927
16966
  query: query,
16928
16967
  variables: variables,
16929
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
16968
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
16930
16969
  fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
16931
16970
  })];
16932
16971
  case 1:
@@ -16946,6 +16985,9 @@
16946
16985
  });
16947
16986
  });
16948
16987
  };
16988
+ ConfigService.prototype.canUserWrite = function (data, opts) {
16989
+ return this.accountService.isAdmin();
16990
+ };
16949
16991
  /**
16950
16992
  * Save a configuration
16951
16993
  *
@@ -16965,7 +17007,7 @@
16965
17007
  data: json
16966
17008
  },
16967
17009
  error: {
16968
- code: ErrorCodes.SAVE_CONFIG_ERROR,
17010
+ code: ErrorCodes$2.SAVE_CONFIG_ERROR,
16969
17011
  message: 'ERROR.SAVE_CONFIG_ERROR'
16970
17012
  }
16971
17013
  })];
@@ -17000,7 +17042,7 @@
17000
17042
  return [4 /*yield*/, this.graphql.query({
17001
17043
  query: CacheStatistics,
17002
17044
  variables: null,
17003
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
17045
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
17004
17046
  fetchPolicy: 'network-only'
17005
17047
  })];
17006
17048
  case 1:
@@ -17024,7 +17066,7 @@
17024
17066
  return [4 /*yield*/, this.graphql.query({
17025
17067
  query: ClearCache,
17026
17068
  variables: variables,
17027
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
17069
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
17028
17070
  fetchPolicy: 'network-only'
17029
17071
  })];
17030
17072
  case 1:
@@ -17224,7 +17266,7 @@
17224
17266
  };
17225
17267
  return ConfigService;
17226
17268
  }(BaseGraphqlService));
17227
- ConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(NetworkService), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
17269
+ ConfigService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(GraphqlService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(FileService), i0__namespace.ɵɵinject(i1__namespace$4.ToastController), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService), i0__namespace.ɵɵinject(AccountService), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
17228
17270
  ConfigService.decorators = [
17229
17271
  { type: i0.Injectable, args: [{
17230
17272
  providedIn: 'root',
@@ -17239,12 +17281,13 @@
17239
17281
  { type: FileService },
17240
17282
  { type: i1$5.ToastController },
17241
17283
  { type: i1$2.TranslateService },
17284
+ { type: AccountService },
17242
17285
  { type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] },
17243
17286
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_CONFIG_OPTIONS,] }] }
17244
17287
  ]; };
17245
- var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
17288
+ var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2, templateObject_5$1;
17246
17289
 
17247
- var moment$4 = momentImported__namespace;
17290
+ var moment$2 = momentImported__namespace;
17248
17291
  var PlatformService = /** @class */ (function (_super) {
17249
17292
  __extends(PlatformService, _super);
17250
17293
  function PlatformService(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
@@ -17274,29 +17317,44 @@
17274
17317
  console.debug('[platform] Creating service');
17275
17318
  return _this;
17276
17319
  }
17320
+ PlatformService.prototype.is = function (platformName) {
17321
+ switch (platformName) {
17322
+ case 'mobile':
17323
+ // Use custom mobile detection - see SUMARIS issue #323
17324
+ return isMobile(window);
17325
+ default:
17326
+ return this.platform.is(platformName);
17327
+ }
17328
+ };
17277
17329
  Object.defineProperty(PlatformService.prototype, "mobile", {
17278
17330
  get: function () {
17279
- return isNotNil(this._mobile) ? this._mobile : this.platform.is('mobile');
17331
+ return isNotNil(this._mobile) ? this._mobile : isMobile(window);
17280
17332
  },
17281
17333
  enumerable: false,
17282
17334
  configurable: true
17283
17335
  });
17284
- PlatformService.prototype.is = function (platformName) {
17285
- return this.platform.is(platformName);
17286
- };
17287
17336
  /**
17288
- * Say if opened has been opened from a web browser (and NOT inside an Android or iOs App).
17337
+ * Say if opened has been opened inside an Android or iOs App.
17289
17338
  * This is used to known if there is cordova features
17290
17339
  */
17291
- PlatformService.prototype.isWebOrDesktop = function () {
17292
- return !this.platform.is('mobile') || this.platform.is('mobileweb');
17340
+ PlatformService.prototype.isCordova = function () {
17341
+ return this._cordova;
17293
17342
  };
17294
17343
  PlatformService.prototype.isAndroidCordova = function () {
17295
17344
  return this._android && this._cordova || false;
17296
17345
  };
17346
+ PlatformService.prototype.isIOSCordova = function () {
17347
+ return this._ios && this._cordova || false;
17348
+ };
17349
+ PlatformService.prototype.isWeb = function () {
17350
+ return !this._cordova || (!this._android && !this._ios);
17351
+ };
17352
+ PlatformService.prototype.isApp = function () {
17353
+ return this._cordova && (this._android || this._ios);
17354
+ };
17297
17355
  Object.defineProperty(PlatformService.prototype, "canDownload", {
17298
17356
  get: function () {
17299
- return this._android && this._cordova && isNotNil(this.downloader);
17357
+ return !!this.downloader && this.isAndroidCordova();
17300
17358
  },
17301
17359
  enumerable: false,
17302
17360
  configurable: true
@@ -17327,16 +17385,13 @@
17327
17385
  _b.label = 1;
17328
17386
  case 1:
17329
17387
  _b.trys.push([1, 6, , 7]);
17330
- this._mobile = this.platform.is('mobile');
17331
- this._cordova = this.platform.is('cordova');
17332
- this._android = this.platform.is('android');
17333
- this.configureCordovaPlugins(this._mobile);
17334
- this.touchUi = this._mobile || this.platform.is('tablet') || this.platform.is('phablet');
17335
- // Force mobile in settings
17336
- if (this._mobile) {
17337
- this.settings.mobile = this._mobile;
17338
- this.settings.touchUi = this.touchUi;
17339
- }
17388
+ this._mobile = this.is('mobile');
17389
+ this._cordova = this.is('cordova');
17390
+ this._android = this.is('android');
17391
+ this._ios = this.is('ios');
17392
+ this.configureCordovaPlugins();
17393
+ // Force some settings
17394
+ this.settings.mobile = this._mobile;
17340
17395
  // Configure translation
17341
17396
  return [4 /*yield*/, this.configureTranslate()];
17342
17397
  case 2:
@@ -17359,7 +17414,7 @@
17359
17414
  case 5:
17360
17415
  // Start root services
17361
17416
  _b.sent();
17362
- console.info("[platform] Starting platform [OK] {mobile: " + this._mobile + ", touchUi: " + this.touchUi + ", downloader: " + this.canDownload + ", fileOpener: " + this.canOpenFile + "} in " + (Date.now() - now) + "ms");
17417
+ console.info("[platform] Starting platform [OK] {mobile: " + this._mobile + ", downloader: " + this.canDownload + ", fileOpener: " + this.canOpenFile + "} in " + (Date.now() - now) + "ms");
17363
17418
  // Update cache configuration when network changed
17364
17419
  this.networkService.onNetworkStatusChanges
17365
17420
  .pipe(operators.skip(1)) // Skip the first event (behavior subject send event immediately)
@@ -17371,7 +17426,7 @@
17371
17426
  console.info("[platform] Using auth token type {" + tokenType + "}");
17372
17427
  _this.accountService.tokenType = tokenType;
17373
17428
  });
17374
- // Hide the splashscreen (if mobile) - after 1s
17429
+ // Hide the splashscreen (if mobile) - after 1s - and play start sound
17375
17430
  if (this.mobile) {
17376
17431
  setTimeout(function () {
17377
17432
  var _a;
@@ -17450,7 +17505,7 @@
17450
17505
  //}
17451
17506
  };
17452
17507
  /* -- protected methods -- */
17453
- PlatformService.prototype.configureCordovaPlugins = function (mobile) {
17508
+ PlatformService.prototype.configureCordovaPlugins = function () {
17454
17509
  console.info('[platform] Configuring Cordova plugins...');
17455
17510
  if (this.statusBar) {
17456
17511
  this.statusBar.styleDefault();
@@ -17459,15 +17514,6 @@
17459
17514
  if (this.keyboard) {
17460
17515
  this.keyboard.hideFormAccessoryBar(true);
17461
17516
  }
17462
- // Force to use InAppBrowser instead of default window.open()
17463
- if (this.browser) {
17464
- // FIXME: this create a infinite loop (e.g. when downloading an extraction file)
17465
- // window.open = (url?: string, target?: string, features?: string, replace?: boolean) => {
17466
- // console.debug("[platform] Call to window.open() redirected to InAppBrowser.open()");
17467
- // this.browser.create(url, target, features).show();
17468
- // return window;
17469
- // };
17470
- }
17471
17517
  };
17472
17518
  PlatformService.prototype.configureTranslate = function () {
17473
17519
  var _this = this;
@@ -17483,16 +17529,16 @@
17483
17529
  }
17484
17530
  // config moment lib
17485
17531
  try {
17486
- moment$4.locale(event.lang);
17532
+ moment$2.locale(event.lang);
17487
17533
  console.debug('[platform] Use locale {' + event.lang + '}');
17488
17534
  }
17489
17535
  // If error, fallback to en
17490
17536
  catch (err) {
17491
- moment$4.locale('en');
17537
+ moment$2.locale('en');
17492
17538
  console.warn('[platform] Unknown local for moment lib. Using default [en]');
17493
17539
  }
17494
17540
  // Config date adapter
17495
- _this.dateAdapter.setLocale(moment$4.locale());
17541
+ _this.dateAdapter.setLocale(moment$2.locale());
17496
17542
  }
17497
17543
  });
17498
17544
  this.settings.onChange.subscribe(function (data) {
@@ -17673,7 +17719,7 @@
17673
17719
  };
17674
17720
  return PlatformService;
17675
17721
  }(StartableService));
17676
- PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$5.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$2.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
17722
+ PlatformService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0__namespace.ɵɵinject(i1__namespace$4.Platform), i0__namespace.ɵɵinject(i2__namespace$4.Platform), i0__namespace.ɵɵinject(i1__namespace$4.ToastController), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService), i0__namespace.ɵɵinject(i1__namespace.MomentDateAdapter), i0__namespace.ɵɵinject(EntitiesStorage), i0__namespace.ɵɵinject(LocalSettingsService), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(AccountService), i0__namespace.ɵɵinject(ConfigService), i0__namespace.ɵɵinject(i6__namespace.CacheService), i0__namespace.ɵɵinject(i3__namespace$1.Storage), i0__namespace.ɵɵinject(AudioProvider), i0__namespace.ɵɵinject(ENVIRONMENT), i0__namespace.ɵɵinject(i14__namespace.StatusBar, 8), i0__namespace.ɵɵinject(i15__namespace.Keyboard, 8), i0__namespace.ɵɵinject(i10__namespace.SplashScreen, 8), i0__namespace.ɵɵinject(i17__namespace.InAppBrowser, 8), i0__namespace.ɵɵinject(i18__namespace.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
17677
17723
  PlatformService.decorators = [
17678
17724
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
17679
17725
  ];
@@ -17771,7 +17817,7 @@
17771
17817
  };
17772
17818
  return MatStepperI18n;
17773
17819
  }(stepper.MatStepperIntl));
17774
- MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$2.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
17820
+ MatStepperI18n.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0__namespace.ɵɵinject(i1__namespace$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
17775
17821
  MatStepperI18n.decorators = [
17776
17822
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
17777
17823
  ];
@@ -18973,7 +19019,7 @@
18973
19019
  return 1;
18974
19020
  }
18975
19021
  }
18976
- var ɵ0$a = function (defaultStateSize) { return [
19022
+ var ɵ0$1 = function (defaultStateSize) { return [
18977
19023
  Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
18978
19024
  Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
18979
19025
  Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
@@ -18981,7 +19027,7 @@
18981
19027
  var SCALE_OPTIONS_DEFAULT = {
18982
19028
  startColor: rgbArrayMap.red,
18983
19029
  startStates: [0, 2, 3],
18984
- startStepsFn: ɵ0$a
19030
+ startStepsFn: ɵ0$1
18985
19031
  };
18986
19032
  /**
18987
19033
  * Internal function, that create a colors scale, using iteration
@@ -19073,24 +19119,24 @@
19073
19119
  return result;
19074
19120
  }
19075
19121
 
19076
- var EntityTestClass = /** @class */ (function () {
19122
+ var EntityTestClass$1 = /** @class */ (function () {
19077
19123
  function EntityTestClass() {
19078
19124
  }
19079
19125
  return EntityTestClass;
19080
19126
  }());
19081
- var FAKE_ENTITIES = [
19127
+ var FAKE_ENTITIES$1 = [
19082
19128
  { id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
19083
19129
  { id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
19084
19130
  { id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
19085
19131
  ];
19086
- function deepCopy(values, size) {
19132
+ function deepCopy$1(values, size) {
19087
19133
  if (isNil(size)) {
19088
- return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
19134
+ return (values || FAKE_ENTITIES$1).map(function (entity) { return Object.assign({}, entity); });
19089
19135
  }
19090
19136
  var result = [];
19091
19137
  var i = 1;
19092
19138
  while (result.length < size) {
19093
- result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
19139
+ result = result.concat((values || FAKE_ENTITIES$1).map(function (entity) {
19094
19140
  var name = entity.name + ' #' + i;
19095
19141
  return Object.assign(Object.assign({}, entity), { id: i++, name: name });
19096
19142
  }));
@@ -19100,7 +19146,7 @@
19100
19146
  var AutocompleteTestPage = /** @class */ (function () {
19101
19147
  function AutocompleteTestPage(formBuilder) {
19102
19148
  this.formBuilder = formBuilder;
19103
- this._items = deepCopy(FAKE_ENTITIES, 100);
19149
+ this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
19104
19150
  this._$items = new rxjs.BehaviorSubject(undefined);
19105
19151
  this.autocompleteFields = new MatAutocompleteConfigHolder();
19106
19152
  this.memoryHide = false;
@@ -19145,7 +19191,7 @@
19145
19191
  });
19146
19192
  // From items
19147
19193
  this.autocompleteFields.add('entity-items-large', {
19148
- items: FAKE_ENTITIES.slice(),
19194
+ items: FAKE_ENTITIES$1.slice(),
19149
19195
  attributes: ['label', 'name', 'description', 'comments'],
19150
19196
  displayWith: this.entityToString
19151
19197
  });
@@ -19158,12 +19204,12 @@
19158
19204
  var _this = this;
19159
19205
  return __generator(this, function (_a) {
19160
19206
  data = {
19161
- entity: deepCopy(FAKE_ENTITIES)[0],
19207
+ entity: deepCopy$1(FAKE_ENTITIES$1)[0],
19162
19208
  // This item is NOT in the items list => i should be displayed anyway
19163
19209
  missingEntity: {
19164
19210
  id: -1, label: '??', name: 'Missing item'
19165
19211
  },
19166
- disableEntity: deepCopy(FAKE_ENTITIES)[2]
19212
+ disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
19167
19213
  };
19168
19214
  this.form.setValue(data);
19169
19215
  // Load observables
@@ -19361,13 +19407,13 @@
19361
19407
  { type: Array, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [APP_TESTING_PAGES,] }] }
19362
19408
  ]; };
19363
19409
 
19364
- var moment$5 = momentImported__namespace;
19410
+ var moment$1 = momentImported__namespace;
19365
19411
  var SwipeTestPage = /** @class */ (function () {
19366
19412
  function SwipeTestPage(formBuilder, dateFormatPipe) {
19367
19413
  this.formBuilder = formBuilder;
19368
19414
  this.dateFormatPipe = dateFormatPipe;
19369
19415
  this.$dates = new rxjs.BehaviorSubject(undefined);
19370
- this._today = moment$5().startOf('day');
19416
+ this._today = moment$1().startOf('day');
19371
19417
  this.form = formBuilder.group({
19372
19418
  empty: [null, i1.Validators.required],
19373
19419
  date: [null, i1.Validators.compose([i1.Validators.required, SharedValidators.validDate])],
@@ -19381,7 +19427,7 @@
19381
19427
  var _this = this;
19382
19428
  var dates = [];
19383
19429
  for (var d = 0; d < 7; d++) {
19384
- dates[d] = moment$5(this._today).add(d - 3, 'day');
19430
+ dates[d] = moment$1(this._today).add(d - 3, 'day');
19385
19431
  }
19386
19432
  this.$dates.next(dates);
19387
19433
  this.loadData();
@@ -19428,7 +19474,7 @@
19428
19474
  { type: DateFormatPipe }
19429
19475
  ]; };
19430
19476
 
19431
- var moment$6 = momentImported__namespace;
19477
+ var moment = momentImported__namespace;
19432
19478
  var DateTimeTestPage = /** @class */ (function () {
19433
19479
  function DateTimeTestPage(platform, formBuilder, cd) {
19434
19480
  this.platform = platform;
@@ -19464,7 +19510,7 @@
19464
19510
  var now, data;
19465
19511
  var _this = this;
19466
19512
  return __generator(this, function (_a) {
19467
- now = moment$6();
19513
+ now = moment();
19468
19514
  data = {
19469
19515
  empty: toDateISOString(now.clone().add(2, 'hours')),
19470
19516
  enable: toDateISOString(now),
@@ -19529,12 +19575,12 @@
19529
19575
  { type: i0.ChangeDetectorRef }
19530
19576
  ]; };
19531
19577
 
19532
- var EntityTestClass$1 = /** @class */ (function () {
19578
+ var EntityTestClass = /** @class */ (function () {
19533
19579
  function EntityTestClass() {
19534
19580
  }
19535
19581
  return EntityTestClass;
19536
19582
  }());
19537
- var FAKE_ENTITIES$1 = [
19583
+ var FAKE_ENTITIES = [
19538
19584
  { id: 1, label: 'AAA', name: 'Item A' },
19539
19585
  { id: 2, label: 'BBB', name: 'Item B' },
19540
19586
  { id: 3, label: 'CCC', name: 'Item C' },
@@ -19543,14 +19589,14 @@
19543
19589
  { id: 6, label: 'FFF', name: 'Item F' },
19544
19590
  { id: 7, label: 'GGG', name: 'Item G' }
19545
19591
  ];
19546
- function deepCopy$1(values, size) {
19592
+ function deepCopy(values, size) {
19547
19593
  if (isNil(size)) {
19548
- return (values || FAKE_ENTITIES$1).map(function (entity) { return Object.assign({}, entity); });
19594
+ return (values || FAKE_ENTITIES).map(function (entity) { return Object.assign({}, entity); });
19549
19595
  }
19550
19596
  var result = [];
19551
19597
  var i = 1;
19552
19598
  while (result.length < size) {
19553
- result = result.concat((values || FAKE_ENTITIES$1).map(function (entity) {
19599
+ result = result.concat((values || FAKE_ENTITIES).map(function (entity) {
19554
19600
  var name = entity.name + ' #' + i;
19555
19601
  return Object.assign(Object.assign({}, entity), { id: i++, name: name });
19556
19602
  }));
@@ -19560,7 +19606,7 @@
19560
19606
  var ChipsTestPage = /** @class */ (function () {
19561
19607
  function ChipsTestPage(formBuilder) {
19562
19608
  this.formBuilder = formBuilder;
19563
- this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
19609
+ this._items = deepCopy(FAKE_ENTITIES, 100);
19564
19610
  this._$items = new rxjs.BehaviorSubject(undefined);
19565
19611
  this.autocompleteFields = new MatAutocompleteConfigHolder();
19566
19612
  this.form = formBuilder.group({
@@ -19603,7 +19649,7 @@
19603
19649
  var items, data;
19604
19650
  var _this = this;
19605
19651
  return __generator(this, function (_a) {
19606
- items = deepCopy$1(FAKE_ENTITIES$1);
19652
+ items = deepCopy(FAKE_ENTITIES);
19607
19653
  data = {
19608
19654
  entity: items.slice(0, 1),
19609
19655
  entityInitial: items.slice(1, 2),
@@ -19695,7 +19741,7 @@
19695
19741
  },] }
19696
19742
  ];
19697
19743
 
19698
- var routes = [
19744
+ var routes$1 = [
19699
19745
  {
19700
19746
  path: '',
19701
19747
  pathMatch: 'full',
@@ -19750,7 +19796,7 @@
19750
19796
  i1.ReactiveFormsModule,
19751
19797
  SharedMaterialModule,
19752
19798
  i1$2.TranslateModule.forChild(),
19753
- i3.RouterModule.forChild(routes)
19799
+ i3.RouterModule.forChild(routes$1)
19754
19800
  ],
19755
19801
  declarations: [
19756
19802
  MaterialTestingPage,
@@ -20685,7 +20731,7 @@
20685
20731
  this.appName = config.label || this.environment.defaultAppName || 'SUMARiS';
20686
20732
  this.logo = config.largeLogo || config.smallLogo || undefined;
20687
20733
  this.description = config.name;
20688
- this.isWeb = this.platform.isWebOrDesktop();
20734
+ this.isWeb = this.platform.isWeb();
20689
20735
  this.canRegister = config.getPropertyAsBoolean(CORE_CONFIG_OPTIONS.REGISTRATION_ENABLE);
20690
20736
  var partners = (config.partners || []).filter(function (p) { return p && p.logo; });
20691
20737
  this.$partners.next(partners);
@@ -20955,7 +21001,7 @@
20955
21001
  };
20956
21002
  return UserSettingsValidatorService;
20957
21003
  }(AppValidatorService));
20958
- UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
21004
+ UserSettingsValidatorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0__namespace.ɵɵinject(i1__namespace$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
20959
21005
  UserSettingsValidatorService.decorators = [
20960
21006
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
20961
21007
  ];
@@ -21003,7 +21049,7 @@
21003
21049
  };
21004
21050
  return AccountValidatorService;
21005
21051
  }(AppValidatorService));
21006
- AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
21052
+ AccountValidatorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0__namespace.ɵɵinject(i1__namespace$6.FormBuilder), i0__namespace.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
21007
21053
  AccountValidatorService.decorators = [
21008
21054
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
21009
21055
  ];
@@ -21634,7 +21680,7 @@
21634
21680
  };
21635
21681
  return LocalSettingsValidatorService;
21636
21682
  }(AppValidatorService));
21637
- LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
21683
+ LocalSettingsValidatorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0__namespace.ɵɵinject(i1__namespace$6.FormBuilder), i0__namespace.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
21638
21684
  LocalSettingsValidatorService.decorators = [
21639
21685
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
21640
21686
  ];
@@ -22414,7 +22460,7 @@
22414
22460
  };
22415
22461
  return IsOnFieldModePipe;
22416
22462
  }());
22417
- IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
22463
+ IsOnFieldModePipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
22418
22464
  IsOnFieldModePipe.decorators = [
22419
22465
  { type: i0.Pipe, args: [{
22420
22466
  name: 'isOnField'
@@ -22429,7 +22475,7 @@
22429
22475
  };
22430
22476
  return IsNotOnFieldModePipe;
22431
22477
  }());
22432
- IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
22478
+ IsNotOnFieldModePipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
22433
22479
  IsNotOnFieldModePipe.decorators = [
22434
22480
  { type: i0.Pipe, args: [{
22435
22481
  name: 'isNotOnField'
@@ -22447,7 +22493,7 @@
22447
22493
  };
22448
22494
  return PersonToStringPipe;
22449
22495
  }());
22450
- PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
22496
+ PersonToStringPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
22451
22497
  PersonToStringPipe.decorators = [
22452
22498
  { type: i0.Pipe, args: [{
22453
22499
  name: 'personToString'
@@ -22911,7 +22957,7 @@
22911
22957
  };
22912
22958
  return IsLoginAccountPipe;
22913
22959
  }());
22914
- IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
22960
+ IsLoginAccountPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
22915
22961
  IsLoginAccountPipe.decorators = [
22916
22962
  { type: i0.Pipe, args: [{
22917
22963
  name: 'isLogin'
@@ -22926,7 +22972,7 @@
22926
22972
  };
22927
22973
  return AccountToStringPipe;
22928
22974
  }());
22929
- AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
22975
+ AccountToStringPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
22930
22976
  AccountToStringPipe.decorators = [
22931
22977
  { type: i0.Pipe, args: [{
22932
22978
  name: 'accountToString'
@@ -22944,7 +22990,7 @@
22944
22990
  };
22945
22991
  return DepartmentToStringPipe;
22946
22992
  }());
22947
- DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
22993
+ DepartmentToStringPipe.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
22948
22994
  DepartmentToStringPipe.decorators = [
22949
22995
  { type: i0.Pipe, args: [{
22950
22996
  name: 'departmentToString'
@@ -22979,7 +23025,7 @@
22979
23025
  };
22980
23026
  return MenuService;
22981
23027
  }());
22982
- MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
23028
+ MenuService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
22983
23029
  MenuService.decorators = [
22984
23030
  { type: i0.Injectable, args: [{
22985
23031
  providedIn: 'root'
@@ -23593,7 +23639,7 @@
23593
23639
  };
23594
23640
  return AuthGuardService;
23595
23641
  }());
23596
- AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(AccountService), i0.ɵɵinject(i1$5.ModalController), i0.ɵɵinject(i3.Router), i0.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
23642
+ AuthGuardService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0__namespace.ɵɵinject(AccountService), i0__namespace.ɵɵinject(i1__namespace$4.ModalController), i0__namespace.ɵɵinject(i3__namespace$3.Router), i0__namespace.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
23597
23643
  AuthGuardService.decorators = [
23598
23644
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
23599
23645
  ];
@@ -23638,7 +23684,7 @@
23638
23684
  query: query,
23639
23685
  variables: { id: id },
23640
23686
  fetchPolicy: opts && opts.fetchPolicy || undefined,
23641
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
23687
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
23642
23688
  })
23643
23689
  .pipe(operators.map(function (_b) {
23644
23690
  var data = _b.data;
@@ -23660,7 +23706,7 @@
23660
23706
  query: query,
23661
23707
  variables: { id: id },
23662
23708
  fetchPolicy: opts && opts.fetchPolicy || undefined,
23663
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
23709
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
23664
23710
  })];
23665
23711
  case 1:
23666
23712
  data = (_b.sent()).data;
@@ -23696,7 +23742,7 @@
23696
23742
  totalFieldName: withTotal ? 'total' : undefined,
23697
23743
  insertFilterFn: filter && filter.asFilterFn(),
23698
23744
  variables: variables,
23699
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
23745
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
23700
23746
  fetchPolicy: opts && opts.fetchPolicy || undefined
23701
23747
  })
23702
23748
  .pipe(operators.map(function (_b) {
@@ -23738,7 +23784,7 @@
23738
23784
  return [4 /*yield*/, this.graphql.query({
23739
23785
  query: query,
23740
23786
  variables: variables,
23741
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
23787
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
23742
23788
  fetchPolicy: opts && opts.fetchPolicy || 'network-only'
23743
23789
  })];
23744
23790
  case 1:
@@ -23786,7 +23832,7 @@
23786
23832
  variables: {
23787
23833
  filter: filter && filter.asPodObject()
23788
23834
  },
23789
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
23835
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
23790
23836
  fetchPolicy: opts && opts.fetchPolicy || 'network-only'
23791
23837
  })];
23792
23838
  case 3:
@@ -23796,6 +23842,9 @@
23796
23842
  });
23797
23843
  });
23798
23844
  };
23845
+ BaseEntityService.prototype.canUserWrite = function (data, opts) {
23846
+ return !!data;
23847
+ };
23799
23848
  BaseEntityService.prototype.saveAll = function (entities, opts) {
23800
23849
  return __awaiter(this, void 0, void 0, function () {
23801
23850
  var hasNewEntities, json, now;
@@ -23828,7 +23877,7 @@
23828
23877
  variables: {
23829
23878
  data: json
23830
23879
  },
23831
- error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
23880
+ error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
23832
23881
  update: function (proxy, _b) {
23833
23882
  var data = _b.data;
23834
23883
  var savedEntities = data && data.data;
@@ -23895,7 +23944,7 @@
23895
23944
  variables: {
23896
23945
  data: json
23897
23946
  },
23898
- error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
23947
+ error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
23899
23948
  update: function (cache, _b) {
23900
23949
  var data = _b.data;
23901
23950
  // Update entity
@@ -23953,7 +24002,7 @@
23953
24002
  refetchQueries: this.getRefetchQueriesForMutation(opts),
23954
24003
  awaitRefetchQueries: opts && opts.awaitRefetchQueries,
23955
24004
  variables: { ids: ids },
23956
- error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
24005
+ error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
23957
24006
  update: function (cache, res) {
23958
24007
  // Remove from cache
23959
24008
  if (_this.watchQueriesUpdatePolicy === 'update-cache') {
@@ -24006,7 +24055,7 @@
24006
24055
  refetchQueries: this.getRefetchQueriesForMutation(opts),
24007
24056
  awaitRefetchQueries: opts && opts.awaitRefetchQueries,
24008
24057
  variables: { id: id },
24009
- error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
24058
+ error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
24010
24059
  update: function (proxy, res) {
24011
24060
  // Remove from cache
24012
24061
  if (_this.watchQueriesUpdatePolicy === 'update-cache') {
@@ -24045,7 +24094,7 @@
24045
24094
  query: opts && opts.query || this.subscriptions.listenChanges,
24046
24095
  variables: variables,
24047
24096
  error: {
24048
- code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
24097
+ code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
24049
24098
  message: 'ERROR.SUBSCRIBE_DATA_ERROR'
24050
24099
  }
24051
24100
  })
@@ -24268,7 +24317,7 @@
24268
24317
  if (this._debug)
24269
24318
  invalidRows.forEach(function (row) { return AppTableUtils.logRowErrors(row, "[table-datasource] " + _this._logTypeName + " row #" + row.id); });
24270
24319
  // Stop with an error
24271
- throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
24320
+ throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
24272
24321
  }
24273
24322
  this._editingRowCount = 0;
24274
24323
  data = void 0;
@@ -25280,14 +25329,14 @@
25280
25329
  case 0:
25281
25330
  opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
25282
25331
  if (this.readOnly) {
25283
- throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
25332
+ throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
25284
25333
  }
25285
25334
  this.resetError();
25286
25335
  // Keep edited row id (should be done BEFORE confirmEditCreate() )
25287
25336
  this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
25288
25337
  previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
25289
25338
  if (!this.confirmEditCreate()) {
25290
- throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
25339
+ throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
25291
25340
  }
25292
25341
  // Mark as saving
25293
25342
  this.markAsSaving();
@@ -25442,7 +25491,7 @@
25442
25491
  switch (_d.label) {
25443
25492
  case 0:
25444
25493
  if (this.readOnly) {
25445
- throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
25494
+ throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
25446
25495
  }
25447
25496
  if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
25448
25497
  return [2 /*return*/, 0]; // SKip
@@ -27287,7 +27336,7 @@
27287
27336
  case 8:
27288
27337
  data = _b.sent();
27289
27338
  if (!data)
27290
- throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
27339
+ throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
27291
27340
  this._usageMode = this.computeUsageMode(data);
27292
27341
  return [4 /*yield*/, this.onEntityLoaded(data, opts)];
27293
27342
  case 9:
@@ -27710,6 +27759,10 @@
27710
27759
  if (!opts || opts.emitEvent !== false)
27711
27760
  this.markForCheck();
27712
27761
  };
27762
+ /* -- public abstract methods (to override) -- */
27763
+ AppEntityEditor.prototype.canUserWrite = function (data, opts) {
27764
+ return this.dataService.canUserWrite(data, opts);
27765
+ };
27713
27766
  /* -- protected methods -- */
27714
27767
  /**
27715
27768
  * Return undefined to keep same tab
@@ -28049,10 +28102,10 @@
28049
28102
  exports.UserEventFilter = __decorate([
28050
28103
  EntityClass({ typename: 'UserEventVO' })
28051
28104
  ], exports.UserEventFilter);
28052
- var SaveQuery = core.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"])), SocialFragments.userEvent);
28053
- var LoadAllQuery = core.gql(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"], ["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"])), SocialFragments.lightUserEvent);
28054
- var DeleteByIdsMutation = core.gql(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"], ["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"])));
28055
- var LoadAllWithContentQuery = core.gql(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"])), SocialFragments.userEvent);
28105
+ var SaveQuery = core.gql(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n mutation SaveUserEvent($data: UserEventVOInput){\n data: saveUserEvent(userEvent: $data){\n ...UserEventFragment\n }\n }\n ", "\n"])), SocialFragments.userEvent);
28106
+ var LoadAllQuery = core.gql(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"], ["\n query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...LightUserEventFragment\n }\n }\n ", "\n"])), SocialFragments.lightUserEvent);
28107
+ var DeleteByIdsMutation = core.gql(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"], ["\n mutation DeleteUserEvents($ids:[Int]){\n deleteUserEvents(ids: $ids)\n }\n"])));
28108
+ var LoadAllWithContentQuery = core.gql(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"], ["\n query UserEventsWithContent($filter: UserEventFilterVOInput, $page: PageInput){\n data: userEvents(filter: $filter, page: $page){\n ...UserEventFragment\n }\n }\n ", "\n"])), SocialFragments.userEvent);
28056
28109
  var UserEventService = /** @class */ (function (_super) {
28057
28110
  __extends(UserEventService, _super);
28058
28111
  function UserEventService(graphql, accountService, network, translate, toastController, environment) {
@@ -28373,7 +28426,7 @@
28373
28426
  };
28374
28427
  return UserEventService;
28375
28428
  }(BaseGraphqlService));
28376
- UserEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(AccountService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i1$2.TranslateService), i0.ɵɵinject(i1$5.ToastController), i0.ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
28429
+ UserEventService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0__namespace.ɵɵinject(GraphqlService), i0__namespace.ɵɵinject(AccountService), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(i1__namespace$1.TranslateService), i0__namespace.ɵɵinject(i1__namespace$4.ToastController), i0__namespace.ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
28377
28430
  UserEventService.decorators = [
28378
28431
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
28379
28432
  ];
@@ -28385,7 +28438,7 @@
28385
28438
  { type: i1$5.ToastController },
28386
28439
  { type: undefined, decorators: [{ type: i0.Inject, args: [ENVIRONMENT,] }] }
28387
28440
  ]; };
28388
- var templateObject_1$3, templateObject_2$3, templateObject_3$2, templateObject_4$2;
28441
+ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1;
28389
28442
 
28390
28443
  var ICONS_MAP = {
28391
28444
  DEBUG_DATA: { matIcon: 'bug_report' },
@@ -28648,16 +28701,16 @@
28648
28701
  ], exports.PersonFilter);
28649
28702
 
28650
28703
  var PersonFragments = {
28651
- person: core.gql(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"], ["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"])))
28704
+ person: core.gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"], ["fragment PersonFragment on PersonVO {\n id\n firstName\n lastName\n email\n pubkey\n avatar\n statusId\n updateDate\n creationDate\n profiles\n username\n usernameExtranet\n department {\n id\n label\n name\n logo\n __typename\n }\n __typename\n }"])))
28652
28705
  };
28653
28706
  // Load persons query
28654
28707
  var PersonQueries = {
28655
- loadAll: core.gql(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""], ["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
28656
- loadAllWithTotal: core.gql(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""], ["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""])), PersonFragments.person)
28708
+ loadAll: core.gql(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""], ["\n query Persons($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
28709
+ loadAllWithTotal: core.gql(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""], ["\n query PersonsWithTotal($offset: Int, $size: Int, $sortBy: String, $sortDirection: String, $filter: PersonFilterVOInput){\n data: persons(filter: $filter, offset: $offset, size: $size, sortBy: $sortBy, sortDirection: $sortDirection){\n ...PersonFragment\n }\n total: personsCount(filter: $filter)\n }\n ", ""])), PersonFragments.person)
28657
28710
  };
28658
28711
  var PersonMutations = {
28659
- saveAll: core.gql(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""], ["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
28660
- deleteAll: core.gql(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"], ["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"])))
28712
+ saveAll: core.gql(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""], ["\n mutation savePersons($data:[PersonVOInput]){\n data: savePersons(persons: $data){\n ...PersonFragment\n }\n }\n ", ""])), PersonFragments.person),
28713
+ deleteAll: core.gql(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"], ["\n mutation deletePersons($ids:[Int]){\n deletePersons(ids: $ids)\n }"])))
28661
28714
  };
28662
28715
  var PersonService = /** @class */ (function (_super_1) {
28663
28716
  __extends(PersonService, _super_1);
@@ -28781,7 +28834,7 @@
28781
28834
  };
28782
28835
  return PersonService;
28783
28836
  }(BaseEntityService));
28784
- PersonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(PlatformService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
28837
+ PersonService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(i0__namespace.ɵɵinject(GraphqlService), i0__namespace.ɵɵinject(PlatformService), i0__namespace.ɵɵinject(NetworkService), i0__namespace.ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
28785
28838
  PersonService.decorators = [
28786
28839
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
28787
28840
  ];
@@ -28791,7 +28844,7 @@
28791
28844
  { type: NetworkService },
28792
28845
  { type: EntitiesStorage }
28793
28846
  ]; };
28794
- var templateObject_1$4, templateObject_2$4, templateObject_3$3, templateObject_4$3, templateObject_5$2;
28847
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
28795
28848
 
28796
28849
  var PersonValidatorService = /** @class */ (function () {
28797
28850
  function PersonValidatorService(formBuilder, accountValidatorService) {
@@ -28814,7 +28867,7 @@
28814
28867
  };
28815
28868
  return PersonValidatorService;
28816
28869
  }());
28817
- PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
28870
+ PersonValidatorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0__namespace.ɵɵinject(i1__namespace$6.FormBuilder), i0__namespace.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
28818
28871
  PersonValidatorService.decorators = [
28819
28872
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
28820
28873
  ];
@@ -29037,16 +29090,16 @@
29037
29090
  ];
29038
29091
  AdminModule.ctorParameters = function () { return []; };
29039
29092
 
29040
- var ɵ0$b = {
29093
+ var ɵ0 = {
29041
29094
  profile: 'ADMIN'
29042
29095
  };
29043
- var routes$1 = [
29096
+ var routes = [
29044
29097
  {
29045
29098
  path: 'users',
29046
29099
  pathMatch: 'full',
29047
29100
  component: UsersPage,
29048
29101
  canActivate: [AuthGuardService],
29049
- data: ɵ0$b
29102
+ data: ɵ0
29050
29103
  }
29051
29104
  ];
29052
29105
  var AdminRoutingModule = /** @class */ (function () {
@@ -29059,13 +29112,13 @@
29059
29112
  imports: [
29060
29113
  SharedRoutingModule,
29061
29114
  AdminModule,
29062
- i3.RouterModule.forChild(routes$1)
29115
+ i3.RouterModule.forChild(routes)
29063
29116
  ],
29064
29117
  exports: [i3.RouterModule]
29065
29118
  },] }
29066
29119
  ];
29067
29120
 
29068
- var ErrorCodes$2 = {
29121
+ var ErrorCodes = {
29069
29122
  LOAD_PERSONS_ERROR: 100,
29070
29123
  SAVE_PERSONS_ERROR: 101,
29071
29124
  DELETE_PERSONS_ERROR: 102,
@@ -29176,7 +29229,7 @@
29176
29229
  exports.EntityStore = EntityStore;
29177
29230
  exports.EntityUtils = EntityUtils;
29178
29231
  exports.Environment = Environment;
29179
- exports.ErrorCodes = ErrorCodes$2;
29232
+ exports.ErrorCodes = ErrorCodes;
29180
29233
  exports.EvenPipe = EvenPipe;
29181
29234
  exports.FileService = FileService;
29182
29235
  exports.FileSizePipe = FileSizePipe;
@@ -29186,7 +29239,7 @@
29186
29239
  exports.FormErrorTranslatePipe = FormErrorTranslatePipe;
29187
29240
  exports.FormErrorTranslator = FormErrorTranslator;
29188
29241
  exports.FormFieldValuesHolder = FormFieldValuesHolder;
29189
- exports.Fragments = Fragments$1;
29242
+ exports.Fragments = Fragments;
29190
29243
  exports.GraphqlService = GraphqlService;
29191
29244
  exports.HAMMER_PRESS_TIME = HAMMER_PRESS_TIME;
29192
29245
  exports.HAMMER_TAP_TIME = HAMMER_TAP_TIME;
@@ -29363,11 +29416,16 @@
29363
29416
  exports.getRandomImage = getRandomImage;
29364
29417
  exports.hexToRgb = hexToRgb;
29365
29418
  exports.hexToRgbArray = hexToRgbArray;
29419
+ exports.isAndroid = isAndroid;
29366
29420
  exports.isControlHasInput = isControlHasInput;
29421
+ exports.isCordova = isCordova;
29422
+ exports.isDesktop = isDesktop;
29367
29423
  exports.isEmptyArray = isEmptyArray;
29424
+ exports.isIOS = isIOS;
29368
29425
  exports.isInputElement = isInputElement;
29369
29426
  exports.isInstanceOf = isInstanceOf;
29370
29427
  exports.isInt = isInt;
29428
+ exports.isMobile = isMobile;
29371
29429
  exports.isNil = isNil;
29372
29430
  exports.isNilOrBlank = isNilOrBlank;
29373
29431
  exports.isNilOrNaN = isNilOrNaN;
@@ -29378,6 +29436,8 @@
29378
29436
  exports.isNotNilString = isNotNilString;
29379
29437
  exports.isNumber = isNumber;
29380
29438
  exports.isNumberRange = isNumberRange;
29439
+ exports.isTouchUi = isTouchUi;
29440
+ exports.isWindow = isWindow;
29381
29441
  exports.joinProperties = joinProperties;
29382
29442
  exports.joinPropertiesPath = joinPropertiesPath;
29383
29443
  exports.logFormErrors = logFormErrors;
@@ -29385,6 +29445,7 @@
29385
29445
  exports.markAsUntouched = markAsUntouched;
29386
29446
  exports.markControlAsTouched = markControlAsTouched;
29387
29447
  exports.markFormGroupAsTouched = markFormGroupAsTouched;
29448
+ exports.matchMedia = matchMedia;
29388
29449
  exports.matchUpperCase = matchUpperCase;
29389
29450
  exports.mergeLoadResult = mergeLoadResult;
29390
29451
  exports.mixHex = mixHex;
@@ -29425,6 +29486,7 @@
29425
29486
  exports.suggestFromArray = suggestFromArray;
29426
29487
  exports.suggestFromStringArray = suggestFromStringArray;
29427
29488
  exports.tabindexComparator = tabindexComparator;
29489
+ exports.testUserAgent = testUserAgent;
29428
29490
  exports.toBoolean = toBoolean;
29429
29491
  exports.toDateISOString = toDateISOString;
29430
29492
  exports.toDuration = toDuration;
@@ -29439,20 +29501,21 @@
29439
29501
  exports.waitForTrue = waitForTrue;
29440
29502
  exports.waitIdle = waitIdle;
29441
29503
  exports.waitWhilePending = waitWhilePending;
29442
- exports.ɵa = CustomReuseStrategy;
29443
- exports.ɵb = MatNumpadDomService;
29444
- exports.ɵc = SharedMatBadgeIconModule;
29445
- exports.ɵd = MatBadgeIconDirective;
29446
- exports.ɵe = isFocusableElement;
29447
- exports.ɵf = MatBadgeIconTestPage;
29448
- exports.ɵg = RegisterForm;
29449
- exports.ɵh = AccountValidatorService;
29450
- exports.ɵi = RegisterModal;
29451
- exports.ɵj = UserSettingsValidatorService;
29452
- exports.ɵk = LocalSettingsValidatorService;
29453
- exports.ɵl = AppIconComponent;
29504
+ exports["ɵ0"] = ɵ0$b;
29505
+ exports["ɵa"] = CustomReuseStrategy;
29506
+ exports["ɵb"] = MatNumpadDomService;
29507
+ exports["ɵc"] = SharedMatBadgeIconModule;
29508
+ exports["ɵd"] = MatBadgeIconDirective;
29509
+ exports["ɵe"] = isFocusableElement;
29510
+ exports["ɵf"] = MatBadgeIconTestPage;
29511
+ exports["ɵg"] = RegisterForm;
29512
+ exports["ɵh"] = AccountValidatorService;
29513
+ exports["ɵi"] = RegisterModal;
29514
+ exports["ɵj"] = UserSettingsValidatorService;
29515
+ exports["ɵk"] = LocalSettingsValidatorService;
29516
+ exports["ɵl"] = AppIconComponent;
29454
29517
 
29455
29518
  Object.defineProperty(exports, '__esModule', { value: true });
29456
29519
 
29457
- })));
29520
+ }));
29458
29521
  //# sourceMappingURL=sumaris-net.ngx-components.umd.js.map