@sumaris-net/ngx-components 1.17.1 → 1.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +623 -540
  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 +9 -0
  6. package/esm2015/src/app/core/graphql/graphql.service.js +3 -2
  7. package/esm2015/src/app/core/services/config.service.js +3 -2
  8. package/esm2015/src/app/core/services/local-settings.service.js +2 -2
  9. package/esm2015/src/app/core/services/platform.service.js +12 -11
  10. package/esm2015/src/app/shared/directives/autofocus.directive.js +4 -2
  11. package/esm2015/src/app/shared/hotkeys/hotkeys.service.js +1 -1
  12. package/esm2015/src/app/shared/inputs.js +1 -1
  13. package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +103 -61
  14. package/esm2015/src/app/shared/material/autocomplete/testing/autocomplete.test.js +20 -5
  15. package/esm2015/src/app/shared/material/chips/material.chips.js +26 -23
  16. package/esm2015/src/app/shared/material/datetime/material.date.js +8 -9
  17. package/esm2015/src/app/shared/material/datetime/material.dateshort.js +8 -8
  18. package/esm2015/src/app/shared/material/datetime/material.datetime.js +7 -8
  19. package/esm2015/src/app/shared/material/datetime/testing/mat-date-time.test.js +3 -3
  20. package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +4 -7
  21. package/esm2015/src/app/shared/material/latlong/material.latlong.js +4 -6
  22. package/esm2015/src/app/shared/material/material.module.js +1 -1
  23. package/esm2015/src/app/shared/platforms.js +2 -2
  24. package/esm2015/src/app/shared/services/entity-service.class.js +1 -1
  25. package/fesm2015/sumaris-net.ngx-components.js +596 -529
  26. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/app/core/services/platform.service.d.ts +1 -1
  29. package/src/app/shared/directives/autofocus.directive.d.ts +2 -1
  30. package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +8 -3
  31. package/src/app/shared/material/autocomplete/testing/autocomplete.test.d.ts +5 -3
  32. package/src/app/shared/material/datetime/material.date.d.ts +2 -4
  33. package/src/app/shared/material/datetime/material.dateshort.d.ts +2 -3
  34. package/src/app/shared/material/datetime/material.datetime.d.ts +1 -3
  35. package/src/app/shared/material/datetime/testing/mat-date.test.d.ts +1 -3
  36. package/src/app/shared/material/latlong/material.latlong.d.ts +1 -3
  37. package/src/app/shared/services/entity-service.class.d.ts +4 -1
  38. package/src/theme/_ngx-components.scss +67 -20
  39. package/sumaris-net.ngx-components.metadata.json +1 -1
@@ -1,9 +1,12 @@
1
- import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, ɵɵdefineInjectable, ɵɵinject, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, TemplateRef, ViewContainerRef, HostBinding, HostListener, ViewChildren, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, TemplateRef, ViewContainerRef, HostBinding, HostListener, ViewChildren, ComponentFactoryResolver, ApplicationRef, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
3
+ import * as i1$3 from '@angular/common';
2
4
  import { CommonModule, DOCUMENT, Location } from '@angular/common';
3
5
  import { CdkTableModule } from '@angular/cdk/table';
4
6
  import { A11yModule } from '@angular/cdk/a11y';
5
7
  import { OverlayModule, OverlayContainer, FullscreenOverlayContainer, Overlay } from '@angular/cdk/overlay';
6
8
  import { ScrollingModule } from '@angular/cdk/scrolling';
9
+ import * as i1$2 from '@angular/material/core';
7
10
  import { DateAdapter, MatCommonModule, MatRippleModule } from '@angular/material/core';
8
11
  import { MatTableModule, MatTable, MatColumnDef } from '@angular/material/table';
9
12
  import { MatSortModule, MatSort } from '@angular/material/sort';
@@ -27,52 +30,63 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
27
30
  import { MatRadioModule } from '@angular/material/radio';
28
31
  import { MatBadgeModule } from '@angular/material/badge';
29
32
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
33
+ import * as i2$1 from '@angular/material/dialog';
30
34
  import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
31
35
  import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
32
36
  import { __awaiter, __decorate } from 'tslib';
37
+ import * as i1$6 from '@angular/forms';
33
38
  import { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
34
39
  import { timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, from, of, noop as noop$9, Observable, defer, forkJoin, combineLatest, EMPTY } from 'rxjs';
35
40
  import { filter, first, map, takeUntil, switchMap, startWith, debounceTime, takeWhile, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
41
+ import { trigger, transition, style, animate, state } from '@angular/animations';
42
+ import * as i1$1 from '@ngx-translate/core';
36
43
  import { TranslateService, TranslateModule } from '@ngx-translate/core';
44
+ import * as i1$4 from '@ionic/angular';
37
45
  import { IonicModule, Platform, IonRouterOutlet, ModalController, PopoverController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent, IonInfiniteScroll } from '@ionic/angular';
38
46
  import * as momentImported from 'moment';
39
47
  import { isMoment } from 'moment';
48
+ import * as i1 from '@angular/material-moment-adapter';
40
49
  import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
41
50
  import * as momentTZImported from 'moment-timezone';
42
51
  import { Keyboard } from '@ionic-native/keyboard/ngx';
43
52
  import { TextMaskModule } from 'angular2-text-mask';
44
53
  import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker';
45
54
  import { MatDatepickerModule } from '@angular/material/datepicker';
46
- import { trigger, state, style, transition, animate } from '@angular/animations';
47
55
  import { MatDividerModule } from '@angular/material/divider';
48
56
  import { MatTooltipModule } from '@angular/material/tooltip';
49
57
  import { MatChipsModule } from '@angular/material/chips';
58
+ import * as i3$3 from '@angular/router';
50
59
  import { Router, ActivatedRoute, RouterModule, RouteReuseStrategy } from '@angular/router';
60
+ import * as i1$5 from '@angular/platform-browser';
51
61
  import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
62
+ import * as i2$2 from '@angular/common/http';
52
63
  import { HttpResponse, HttpClient, HttpHeaders, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
53
64
  import { ColorPickerModule } from 'ngx-color-picker';
54
- import { NativeAudio as NativeAudio$1 } from '@ionic-native/native-audio/ngx';
55
- import { Vibration as Vibration$1 } from '@ionic-native/vibration/ngx';
65
+ import { NativeAudio } from '@ionic-native/native-audio/ngx';
66
+ import { Vibration } from '@ionic-native/vibration/ngx';
56
67
  import { AudioManagement } from '@ionic-native/audio-management/ngx';
57
- import { NativeAudio } from '@ionic-native/native-audio/ngx/index';
58
- import { Vibration } from '@ionic-native/vibration/ngx/index';
59
- import { AudioManagement as AudioManagement$1 } from '@ionic-native/audio-management/ngx/index';
68
+ import * as i2 from '@ionic-native/native-audio/ngx/index';
69
+ import * as i3 from '@ionic-native/vibration/ngx/index';
70
+ import * as i4 from '@ionic-native/audio-management/ngx/index';
60
71
  import * as uuidv4Imported from 'uuid/v4';
61
72
  import { DragDropModule } from '@angular/cdk/drag-drop';
62
73
  import { MarkdownModule } from 'ngx-markdown';
63
74
  import { sign, box, hash, verify } from 'tweetnacl';
75
+ import * as i3$1 from '@ionic/storage';
64
76
  import { Storage, IonicStorageModule } from '@ionic/storage';
65
77
  import 'zone.js/dist/zone-error';
66
- import { SplashScreen as SplashScreen$1 } from '@ionic-native/splash-screen/ngx';
67
- import { Connection, Network as Network$1 } from '@ionic-native/network/ngx';
68
- import { CacheService as CacheService$1, CacheModule } from 'ionic-cache';
69
- import { CacheService } from 'ionic-cache/dist/cache.service';
70
- import { Network } from '@ionic-native/network/ngx/index';
71
- import { SplashScreen } from '@ionic-native/splash-screen/ngx/index';
72
- import { StatusBar as StatusBar$1 } from '@ionic-native/status-bar/ngx';
78
+ import { SplashScreen } from '@ionic-native/splash-screen/ngx';
79
+ import { Connection, Network } from '@ionic-native/network/ngx';
80
+ import { CacheService, CacheModule } from 'ionic-cache';
81
+ import * as i6 from 'ionic-cache/dist/cache.service';
82
+ import * as i9 from '@ionic-native/network/ngx/index';
83
+ import * as i10 from '@ionic-native/splash-screen/ngx/index';
84
+ import { StatusBar } from '@ionic-native/status-bar/ngx';
85
+ import * as i2$4 from '@angular/cdk/platform';
73
86
  import { Platform as Platform$1 } from '@angular/cdk/platform';
74
- import { InAppBrowser as InAppBrowser$1 } from '@ionic-native/in-app-browser/ngx';
87
+ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
75
88
  import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
89
+ import * as i2$3 from 'apollo-angular';
76
90
  import { Apollo } from 'apollo-angular';
77
91
  import { WebSocketLink } from '@apollo/client/link/ws';
78
92
  import { getMainDefinition } from '@apollo/client/utilities';
@@ -80,13 +94,14 @@ import { RetryLink } from '@apollo/client/link/retry';
80
94
  import QueueLink from 'apollo-link-queue';
81
95
  import SerializingLink from 'apollo-link-serialize';
82
96
  import loggerLink from 'apollo-link-logger';
97
+ import * as i3$2 from 'apollo-angular/http';
83
98
  import { HttpLink } from 'apollo-angular/http';
84
99
  import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
85
- import { NotificationVisibility, Downloader as Downloader$1 } from '@ionic-native/downloader/ngx';
86
- import { StatusBar } from '@ionic-native/status-bar/ngx/index';
87
- import { Keyboard as Keyboard$1 } from '@ionic-native/keyboard/ngx/index';
88
- import { InAppBrowser } from '@ionic-native/in-app-browser/ngx/index';
89
- import { Downloader } from '@ionic-native/downloader/ngx/index';
100
+ import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
101
+ import * as i14 from '@ionic-native/status-bar/ngx/index';
102
+ import * as i15 from '@ionic-native/keyboard/ngx/index';
103
+ import * as i17 from '@ionic-native/in-app-browser/ngx/index';
104
+ import * as i18 from '@ionic-native/downloader/ngx/index';
90
105
  import { CdkTextareaAutosize } from '@angular/cdk/text-field';
91
106
  import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
92
107
  import { SelectionModel } from '@angular/cdk/collections';
@@ -942,6 +957,136 @@ function fromScrollEndEvent(element, threshold) {
942
957
  .pipe(filter(() => isEnd()));
943
958
  }
944
959
 
960
+ // import the required animation functions from the angular animations module
961
+ const fadeInAnimation =
962
+ // trigger name for attaching this animation to an element using the [@triggerName] syntax
963
+ trigger('fadeInAnimation', [
964
+ // route 'enter' transition
965
+ transition(':enter', [
966
+ // css styles at start of transition
967
+ style({ opacity: 0 }),
968
+ // animation and styles at end of transition
969
+ animate('.3s', style({ opacity: 1 }))
970
+ ]),
971
+ ]);
972
+ const fadeInOutAnimation =
973
+ // trigger name for attaching this animation to an element using the [@triggerName] syntax
974
+ trigger('fadeInOutAnimation', [
975
+ // route 'enter' transition
976
+ transition(':enter', [
977
+ // css styles at start of transition
978
+ style({ opacity: 0 }),
979
+ // animation and styles at end of transition
980
+ animate('.3s', style({ opacity: 1 }))
981
+ ]),
982
+ // route 'leave' transition
983
+ transition(':leave', [
984
+ // animation and styles at end of transition
985
+ animate('.5s ease-in-out', style({
986
+ opacity: 0
987
+ }))
988
+ ]),
989
+ ]);
990
+ const slideInOutAnimation =
991
+ // trigger name for attaching this animation to an element using the [@triggerName] syntax
992
+ trigger('slideInOutAnimation', [
993
+ // end state styles for route container (host)
994
+ state('*', style({
995
+ // the view covers the whole screen with a semi tranparent background
996
+ position: 'relative',
997
+ top: 0,
998
+ left: 0,
999
+ right: 0,
1000
+ bottom: 0,
1001
+ opacity: 1
1002
+ })),
1003
+ // route 'enter' transition
1004
+ transition(':enter', [
1005
+ // styles at start of transition
1006
+ style({
1007
+ // start with the content positioned off the right of the screen,
1008
+ // -400% is required instead of -100% because the negative position adds to the width of the element
1009
+ left: '400%',
1010
+ // start with background opacity set to 0 (invisible)
1011
+ opacity: 0
1012
+ }),
1013
+ // animation and styles at end of transition
1014
+ animate('.3s ease-in-out', style({
1015
+ // transition the right position to 0 which slides the content into view
1016
+ left: 0,
1017
+ // transition the background opacity to 0.8 to fade it in
1018
+ opacity: 0.8
1019
+ }))
1020
+ ]),
1021
+ // route 'leave' transition
1022
+ transition(':leave', [
1023
+ // animation and styles at end of transition
1024
+ animate('.5s ease-in-out', style({
1025
+ // transition the right position to -400% which slides the content out of view
1026
+ left: '400%',
1027
+ // transition the background opacity to 0 to fade it out
1028
+ opacity: 0
1029
+ }))
1030
+ ])
1031
+ ]);
1032
+ const slideUpDownAnimation =
1033
+ // trigger name for attaching this animation to an element using the [@triggerName] syntax
1034
+ trigger('slideUpDownAnimation', [
1035
+ // end state styles for route container (host)
1036
+ state('*', style({
1037
+ transform: 'translateY(0)',
1038
+ opacity: 1
1039
+ })),
1040
+ // route 'enter' transition
1041
+ transition(':enter', [
1042
+ // styles at start of transition
1043
+ style({
1044
+ transform: 'translateY(-400%)',
1045
+ opacity: 0
1046
+ }),
1047
+ // animation and styles at end of transition
1048
+ animate('.3s ease-in-out', style({
1049
+ transform: 'translateY(0)',
1050
+ opacity: 1
1051
+ }))
1052
+ ]),
1053
+ // route 'leave' transition
1054
+ transition(':leave', [
1055
+ // animation and styles at end of transition
1056
+ animate('.5s ease-in-out', style({
1057
+ transform: 'translateY(-100%)',
1058
+ opacity: 0
1059
+ }))
1060
+ ])
1061
+ ]);
1062
+
1063
+ /* ---
1064
+ * Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
1065
+ * --- */
1066
+ const matchMedia = (win, query) => win.matchMedia(query).matches;
1067
+ const testUserAgent = (win, expr) => {
1068
+ const userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
1069
+ return expr.test(userAgent);
1070
+ };
1071
+ const isWindows = (win) => testUserAgent(win, /windows/i);
1072
+ const isTouchUi = (win) => matchMedia(win, '(any-pointer:coarse)');
1073
+ const isMobile = (win) => isCordova(window) || isAndroid(win) || isIOS(window) || (isTouchUi(win) && !isWindows(win));
1074
+ const isIpad = (win) => {
1075
+ // iOS 12 and below
1076
+ if (testUserAgent(win, /iPad/i)) {
1077
+ return true;
1078
+ }
1079
+ // iOS 13+
1080
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
1081
+ return true;
1082
+ }
1083
+ return false;
1084
+ };
1085
+ const ɵ0$c = isIpad;
1086
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
1087
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
1088
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
1089
+
945
1090
  class MatAutocompleteConfigHolder {
946
1091
  constructor(options) {
947
1092
  this.options = options;
@@ -963,8 +1108,8 @@ class MatAutocompleteConfigHolder {
963
1108
  // Keep original the function from options, when exists
964
1109
  const attributesOrFn = attributes.map((a, index) => typeof a === 'function' && options.attributes[index] || a);
965
1110
  const filter = Object.assign({ searchAttribute: attributes.length === 1 ? attributes[0] : undefined, searchAttributes: attributes.length > 1 ? attributes : undefined }, options.filter);
966
- const displayWith = options.displayWith || ((obj) => obj && joinPropertiesPath(obj, attributes));
967
- const equals = options.equals || ((o1, o2) => o1 && o2 && o1.id === o2.id);
1111
+ const displayWith = options.displayWith || MatAutocompleteFieldUtils.createDisplayFn(attributes, options.multiple);
1112
+ const equals = options.equals || MatAutocompleteFieldUtils.defaultEquals;
968
1113
  const config = Object.assign(Object.assign({}, options), { attributes: attributesOrFn, suggestFn,
969
1114
  filter,
970
1115
  displayWith,
@@ -979,14 +1124,31 @@ class MatAutocompleteConfigHolder {
979
1124
  return this.fields[fieldName] || this.add(fieldName);
980
1125
  }
981
1126
  }
982
- const noop = (_) => { };
983
- const ɵ0 = noop;
1127
+ class MatAutocompleteFieldUtils {
1128
+ static createDisplayFn(displayAttributes, multiple) {
1129
+ // if multiple (manage array)
1130
+ if (multiple) {
1131
+ return (value) => {
1132
+ return Array.isArray(value)
1133
+ ? (value || []).map(obj => obj && joinPropertiesPath(obj, displayAttributes)).join(', ')
1134
+ : value && joinPropertiesPath(value, displayAttributes);
1135
+ };
1136
+ }
1137
+ // Join properties
1138
+ return (obj) => obj && joinPropertiesPath(obj, displayAttributes);
1139
+ }
1140
+ static defaultEquals(o1, o2) {
1141
+ return isNotNil(o1 === null || o1 === void 0 ? void 0 : o1.id) && o1.id === (o2 === null || o2 === void 0 ? void 0 : o2.id);
1142
+ }
1143
+ }
1144
+ const noop$8 = (_) => { };
1145
+ const ɵ0$b = noop$8;
984
1146
  class MatAutocompleteField {
985
1147
  constructor(cd, formGroupDir) {
986
1148
  this.cd = cd;
987
1149
  this.formGroupDir = formGroupDir;
988
- this._onChangeCallback = noop;
989
- this._onTouchedCallback = noop;
1150
+ this._onChangeCallback = noop$8;
1151
+ this._onTouchedCallback = noop$8;
990
1152
  this.logPrefix = '[mat-autocomplete] ';
991
1153
  this.formControlName = null;
992
1154
  this.required = false;
@@ -994,12 +1156,13 @@ class MatAutocompleteField {
994
1156
  this.debounceTime = null;
995
1157
  this.i18nPrefix = 'REFERENTIAL.';
996
1158
  this.noResultMessage = 'COMMON.NO_RESULT';
997
- this.multiple = false;
998
1159
  this.itemSize = '48px';
999
1160
  this.fetchMoreThreshold = '15%';
1000
1161
  this.suggestLengthThreshold = null;
1001
1162
  this.showLoadingSpinner = true;
1002
1163
  this.debug = false;
1164
+ this.showSearchBar = true;
1165
+ this.stickySearchBar = false;
1003
1166
  this.clicked = new EventEmitter();
1004
1167
  this.blurred = new EventEmitter();
1005
1168
  this.focused = new EventEmitter();
@@ -1079,6 +1242,9 @@ class MatAutocompleteField {
1079
1242
  get loading() {
1080
1243
  return isNil(this.$filteredItems.value);
1081
1244
  }
1245
+ get desktop() {
1246
+ return !this.mobile;
1247
+ }
1082
1248
  ngOnInit() {
1083
1249
  var _a, _b;
1084
1250
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
@@ -1096,6 +1262,7 @@ class MatAutocompleteField {
1096
1262
  this.displayColumnNames = this.displayColumnNames || this.config.columnNames;
1097
1263
  this.displayWith = this.displayWith || this.config.displayWith;
1098
1264
  this.equals = this.equals || this.config.equals;
1265
+ this.multiple = toBoolean(this.multiple, this.config.multiple);
1099
1266
  this.mobile = toBoolean(this.mobile, this.config.mobile);
1100
1267
  this.suggestLengthThreshold = toNumber(this.suggestLengthThreshold, this.config.suggestLengthThreshold || 0);
1101
1268
  this.showAllOnFocus = toBoolean(this.showAllOnFocus, toBoolean(this.config.showAllOnFocus, this.suggestLengthThreshold <= 0));
@@ -1105,8 +1272,11 @@ class MatAutocompleteField {
1105
1272
  this.highlightAccent = toBoolean(this.highlightAccent, toBoolean(this.config.highlightAccent));
1106
1273
  }
1107
1274
  // Default values
1275
+ this.multiple = toBoolean(this.multiple, false);
1276
+ this.mobile = toBoolean(this.mobile, this.multiple || isMobile(window));
1108
1277
  this.displayAttributes = this.displayAttributes || ((_a = this.filter) === null || _a === void 0 ? void 0 : _a.attributes) || ['label', 'name'];
1109
- this.displayWith = this.displayWith || ((obj) => obj && joinPropertiesPath(obj, this.displayAttributes));
1278
+ this.displayWith = this.displayWith || MatAutocompleteFieldUtils.createDisplayFn(this.displayAttributes, this.multiple);
1279
+ this.equals = this.equals || MatAutocompleteFieldUtils.defaultEquals;
1110
1280
  this.displayColumnSizes = this.displayColumnSizes
1111
1281
  // if only column: auto size
1112
1282
  || (this.displayAttributes.length === 1 && [undefined])
@@ -1114,24 +1284,21 @@ class MatAutocompleteField {
1114
1284
  // - if label then col size = 2
1115
1285
  // - if rankOrder then col size = 1
1116
1286
  // - ese => auto size
1117
- || this.displayAttributes.map(attr => (attr && attr.endsWith('label')) ? 2
1118
- : ((attr && attr.endsWith('rankOrder')) ? 1
1119
- : undefined));
1287
+ || this.displayAttributes.map(attr => attr && (attr.endsWith('label') ? 3
1288
+ : (attr.endsWith('rankOrder') ? 2
1289
+ : undefined)));
1120
1290
  this.displayColumnNames = this.displayAttributes.map((attr, index) => this.displayColumnNames && this.displayColumnNames[index] ||
1121
1291
  (this.i18nPrefix + changeCaseToUnderscore(attr).toUpperCase()));
1122
- this.mobile = toBoolean(this.mobile, false);
1123
- this.searchable = !this.mobile && !this.multiple;
1124
- this.equals = this.equals || ((o1, o2) => o1 && o2 && o1.id === o2.id);
1125
1292
  const classList = (_b = this.classList) === null || _b === void 0 ? void 0 : _b.split(' ');
1126
1293
  this.panelWidth = this.panelWidth || (classList && ((classList.includes('min-width-medium') && '300px')
1127
1294
  || (classList.includes('min-width-large') && '400px')
1128
1295
  || (classList.includes('min-width-xlarge') && '450px')
1129
1296
  || (classList.includes('mat-autocomplete-panel-full-size') && '100vw')));
1130
1297
  this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, true);
1131
- this.debounceTime = toNumber(this.debounceTime, 250);
1298
+ this.debounceTime = toNumber(this.debounceTime, this.mobile ? 650 : 250);
1132
1299
  this.highlightAccent = toBoolean(this.highlightAccent, false);
1133
1300
  this.suggestLengthThreshold = this.suggestLengthThreshold || 0;
1134
- this.matAutocompletePosition = this.matAutocompletePosition || (this.mobile && this.searchable ? 'above' : 'auto'); // On mobile, set position to above (because of bottom keyboard)
1301
+ this.matAutocompletePosition = this.matAutocompletePosition || 'auto';
1135
1302
  // No suggestFn: filter on the given items
1136
1303
  if (!this.suggestFn) {
1137
1304
  const suggestFromArrayFn = (value, filter) => __awaiter(this, void 0, void 0, function* () {
@@ -1152,10 +1319,10 @@ class MatAutocompleteField {
1152
1319
  return this.suggestFn(value, filter); // Loop
1153
1320
  });
1154
1321
  }
1155
- else if (!this.searchable) {
1322
+ else if (this.mobile) {
1156
1323
  // Manually fill input items, from the given suggest function
1157
- this._subscription.add(this._$filter.pipe(startWith(this.filter), debounceTime(250), takeWhile((_) => !this.searchable), // Close subscription, when enabling search (no more mat-select)
1158
- switchMap((filter) => this.suggest('*', filter)))
1324
+ this._subscription.add(this._$filter.pipe(startWith(this.filter), debounceTime(250), takeWhile((_) => this.mobile), // Close subscription, when not mobile (no more mat-select)
1325
+ filter(_ => this.suggestLengthThreshold <= 0), switchMap((filter) => this.suggest('*', filter)))
1159
1326
  .subscribe(items => this.$inputItems.next(items)));
1160
1327
  }
1161
1328
  // Send value to suggest when :
@@ -1171,11 +1338,17 @@ class MatAutocompleteField {
1171
1338
  this._reload$,
1172
1339
  // Search text (no distinctUntilChanged() because of the debounceTime() pipe)
1173
1340
  this.formControl.valueChanges
1174
- .pipe(filter(value => this.enabled && this.searchable && isNotNilString(value)),
1341
+ .pipe(filter(value => this.enabled && isNotNilString(value)),
1175
1342
  // Mark as loading (to show loading spinner) - earlier as possible, so before the debounce time
1176
1343
  tap(_ => this.showLoadingSpinner && this.markAsLoading()),
1177
1344
  // Filter if not enough character
1178
- filter(value => value.length >= this.suggestLengthThreshold),
1345
+ filter(value => {
1346
+ if (value.length >= this.suggestLengthThreshold)
1347
+ return true;
1348
+ // Update display value, to enable the message "not enough characters"
1349
+ this.displayValue = value;
1350
+ return false;
1351
+ }),
1179
1352
  // Wait a debounce time
1180
1353
  debounceTime(this.debounceTime)
1181
1354
  // DEBUG
@@ -1183,37 +1356,34 @@ class MatAutocompleteField {
1183
1356
  ),
1184
1357
  // Object set: use it (no distinctUntilChanged() pipe need)
1185
1358
  this.formControl.valueChanges
1186
- .pipe(startWith(this.formControl.value), filter(value => (this.searchable && isNotNil(value) && typeof value === 'object')), tap(value => {
1359
+ .pipe(startWith(this.formControl.value), filter(value => (!this.mobile && isNotNil(value) && typeof value === 'object')), tap(value => {
1187
1360
  // DEBUG
1188
- if (this.debug)
1189
- console.debug(this.logPrefix + ' object changes:', value);
1361
+ //if (this.debug) console.debug(this.logPrefix + ' object changes:', value)
1362
+ var _a;
1190
1363
  // Update the display value (if need)
1191
1364
  const displayValue = this.displayWith(value) || '';
1192
1365
  if (this.displayValue !== displayValue) {
1193
1366
  this.displayValue = displayValue;
1194
1367
  // Apply to the input[type=text] field
1195
- if (this.matInputText && this.matInputText.nativeElement) {
1368
+ if ((_a = this.matInputText) === null || _a === void 0 ? void 0 : _a.nativeElement) {
1196
1369
  this.matInputText.nativeElement.value = this.displayValue;
1197
1370
  }
1198
1371
  }
1199
- })
1200
- // DEBUG
1201
- //,tap(value => this.debug && console.debug(this.logPrefix + ' Received an object value: ', value))
1202
- ),
1372
+ })),
1203
1373
  // On dropdown button click (no distinctUntilChanged(), nor debounceTime)
1204
1374
  this.dropButtonClick
1205
- .pipe(filter(event => this.searchable && this.enabled && (!event || !event.defaultPrevented)), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
1375
+ .pipe(filter(event => !this.mobile && this.enabled && (!event || !event.defaultPrevented)), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
1206
1376
  // Make sure there is enough characters
1207
1377
  filter(thresholdFilterFn)),
1208
1378
  // Merge some observables, with a common distinctUntilChanged() pipe, and NO debounceTime
1209
1379
  merge(
1210
1380
  // Focus or click => Load all
1211
1381
  merge(this.focused, this.clicked)
1212
- .pipe(filter(_ => this.enabled && this.searchable), map(_ => this.showAllOnFocus ? '*' : this.formControl.value)
1382
+ .pipe(filter(_ => this.enabled && !this.mobile), map(_ => this.showAllOnFocus ? '*' : this.formControl.value)
1213
1383
  // DEBUG
1214
1384
  //,tap(value => this.debug && console.debug(this.logPrefix + ' Received focused or clicked event: ', value))
1215
1385
  ), merge(this.$inputItems, this._$filter)
1216
- .pipe(filter(_ => this.searchable && this.enabled), map(_ => this.formControl.value)))
1386
+ .pipe(filter(_ => this.enabled), map(_ => this.formControl.value)))
1217
1387
  .pipe(
1218
1388
  // Make sure there is enough characters
1219
1389
  filter(thresholdFilterFn),
@@ -1246,7 +1416,7 @@ class MatAutocompleteField {
1246
1416
  fetchMoreItemsChanges)
1247
1417
  .subscribe(items => {
1248
1418
  // Make sure control value is inside (mat-select)
1249
- if (items && !this.searchable) {
1419
+ if (items && this.mobile) {
1250
1420
  const value = this.formControl.value;
1251
1421
  if (isNotNil(value) && typeof value === 'object' && items.findIndex(item => this.equals(item, value)) === -1) {
1252
1422
  // If form value is missing: add it to the list
@@ -1260,7 +1430,7 @@ class MatAutocompleteField {
1260
1430
  this._subscription.add(this.blurred
1261
1431
  .pipe(
1262
1432
  // Skip if not searchable
1263
- filter(_ => this.searchable), map(_ => this.formControl.value)
1433
+ filter(_ => !this.mobile), map(_ => this.formControl.value)
1264
1434
  // DEBUG
1265
1435
  //,tap(value => this.debug && console.debug(this.logPrefix + ' Received blurred event: ', value)),
1266
1436
  )
@@ -1284,6 +1454,7 @@ class MatAutocompleteField {
1284
1454
  this.$filteredItems.next(undefined);
1285
1455
  }
1286
1456
  this._implicitValue = null; // reset the implicit value
1457
+ this.closePanel(); // Clone panel
1287
1458
  }));
1288
1459
  // Listen form control status change
1289
1460
  this._subscription.add(this.formControl.statusChanges
@@ -1294,6 +1465,7 @@ class MatAutocompleteField {
1294
1465
  .subscribe(() => this.checkIfTouched()));
1295
1466
  this._subscription.add(this.keydownEscape.subscribe(event => {
1296
1467
  if (this.isOpen) {
1468
+ // Avoid form or page to manage escape event
1297
1469
  event === null || event === void 0 ? void 0 : event.stopPropagation();
1298
1470
  event === null || event === void 0 ? void 0 : event.preventDefault();
1299
1471
  // DEBUG
@@ -1329,7 +1501,6 @@ class MatAutocompleteField {
1329
1501
  this.equals = null;
1330
1502
  this.suggestFn = null;
1331
1503
  this.$filteredItems = null;
1332
- this.matSelectItems$ = null;
1333
1504
  this.config = null;
1334
1505
  this.classList = null;
1335
1506
  this._onChangeCallback = null;
@@ -1344,8 +1515,13 @@ class MatAutocompleteField {
1344
1515
  * Allow to reload content. Useful when filter has been changed but not detected
1345
1516
  */
1346
1517
  reloadItems(value) {
1518
+ var _a;
1347
1519
  // Force a refresh
1348
1520
  this._reload$.next(value || '*');
1521
+ // Clear the search bar, because options will not correspond
1522
+ if (!this.isOpen && isNotNilOrBlank((_a = this.ionSearchbar) === null || _a === void 0 ? void 0 : _a.value)) {
1523
+ this.ionSearchbar.value = null;
1524
+ }
1349
1525
  }
1350
1526
  writeValue(value) {
1351
1527
  // DEBUG
@@ -1369,15 +1545,15 @@ class MatAutocompleteField {
1369
1545
  this.cd.markForCheck();
1370
1546
  }
1371
1547
  focus() {
1372
- var _a;
1373
- if (this.searchable) {
1374
- focusInput(this.matInputText);
1548
+ if (this.mobile) {
1549
+ this.matSelect.focus();
1375
1550
  }
1376
1551
  else {
1377
- (_a = this.matSelect) === null || _a === void 0 ? void 0 : _a.focus();
1552
+ focusInput(this.matInputText);
1378
1553
  }
1379
1554
  }
1380
1555
  filterInputTextFocusEvent(event) {
1556
+ var _a;
1381
1557
  if (!event || event.defaultPrevented)
1382
1558
  return;
1383
1559
  // Ignore event from mat-option
@@ -1392,7 +1568,7 @@ class MatAutocompleteField {
1392
1568
  }
1393
1569
  // DEBUG
1394
1570
  //if (this.debug) console.debug(this.logPrefix + ' Select input content');
1395
- const hasContent = true; // selectInputContent(event);
1571
+ const hasContent = isNotNilOrBlank((_a = event.target) === null || _a === void 0 ? void 0 : _a.value);
1396
1572
  // If combo is empty, or if has content but should force to show panel on focus
1397
1573
  if (!hasContent || this.showPanelOnFocus || this.showAllOnFocus) {
1398
1574
  // DEBUG
@@ -1412,18 +1588,38 @@ class MatAutocompleteField {
1412
1588
  event.stopPropagation();
1413
1589
  event.returnValue = false;
1414
1590
  // DEBUG
1415
- if (this.debug)
1416
- console.debug(this.logPrefix + " Cancelling blur event");
1591
+ //if (this.debug) console.debug(this.logPrefix + " Cancelling blur event");
1417
1592
  return false;
1418
1593
  }
1419
- //DEBUG
1420
- if (this.debug)
1421
- console.debug(this.logPrefix + ' Blur: move caret to the beginning');
1594
+ // DEBUG
1595
+ //if (this.debug) console.debug(this.logPrefix + ' Blur: move caret to the beginning');
1422
1596
  // Move caret to the beginning (fix issue IMAGINE-469)
1423
1597
  selectInputRange(event.target, 0, 0);
1424
1598
  this.blurred.emit(event);
1425
1599
  return true;
1426
1600
  }
1601
+ ionSearchBarChanged(event) {
1602
+ if (!event || event.defaultPrevented || !this.matSelect.panelOpen)
1603
+ return;
1604
+ // DEBUG
1605
+ //console.debug(this.logPrefix + " Received <ion-searchbar> changes", event.detail.data);
1606
+ event.preventDefault();
1607
+ event.detail.preventDefault();
1608
+ event.stopPropagation();
1609
+ event.detail.stopPropagation();
1610
+ this.markAsLoading();
1611
+ this.reloadItems(event.detail.data);
1612
+ // TODO avoid mat-select to focus the option
1613
+ /*if (this.multiple) {
1614
+ this.matSelect._elementRef;
1615
+ }*/
1616
+ }
1617
+ ionSearchBarClear(event) {
1618
+ if (!event || event.defaultPrevented || !this.matSelect.panelOpen)
1619
+ return;
1620
+ this.markAsLoading();
1621
+ this.reloadItems();
1622
+ }
1427
1623
  filterMatSelectFocusEvent(event) {
1428
1624
  if (!event || event.defaultPrevented)
1429
1625
  return;
@@ -1449,20 +1645,6 @@ class MatAutocompleteField {
1449
1645
  this.blurred.emit(event);
1450
1646
  return true;
1451
1647
  }
1452
- toggleSearch(event) {
1453
- const searchable = !this.searchable;
1454
- if (searchable && this.searchable && this.matInputText) {
1455
- this.focus();
1456
- }
1457
- else {
1458
- this.searchable = searchable;
1459
- if (searchable) {
1460
- this.autofocus = true;
1461
- this.showPanelOnFocus = false;
1462
- }
1463
- this.markForCheck();
1464
- }
1465
- }
1466
1648
  clearValue(event) {
1467
1649
  this.writeValue(null);
1468
1650
  event.stopPropagation();
@@ -1512,7 +1694,7 @@ class MatAutocompleteField {
1512
1694
  }
1513
1695
  get isOpen() {
1514
1696
  var _a, _b;
1515
- return (this.searchable && ((_a = this.autocomplete) === null || _a === void 0 ? void 0 : _a.isOpen))
1697
+ return (!this.mobile && ((_a = this.autocomplete) === null || _a === void 0 ? void 0 : _a.isOpen))
1516
1698
  || ((_b = this.matSelect) === null || _b === void 0 ? void 0 : _b.panelOpen)
1517
1699
  || false;
1518
1700
  }
@@ -1551,8 +1733,7 @@ class MatAutocompleteField {
1551
1733
  res = data;
1552
1734
  }
1553
1735
  // DEBUG
1554
- if (this.debug)
1555
- console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
1736
+ //if (this.debug) console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
1556
1737
  return res;
1557
1738
  });
1558
1739
  }
@@ -1571,7 +1752,7 @@ class MatAutocompleteField {
1571
1752
  });
1572
1753
  }
1573
1754
  updateImplicitValue(items) {
1574
- if (this.searchable) {
1755
+ if (!this.mobile) {
1575
1756
  // Store implicit value (will use it onBlur if not other value selected)
1576
1757
  if (items && items.length === 1) {
1577
1758
  this._implicitValue = items[0];
@@ -1624,12 +1805,13 @@ MatAutocompleteField.decorators = [
1624
1805
  { type: Component, args: [{
1625
1806
  // eslint-disable-next-line @angular-eslint/component-selector
1626
1807
  selector: 'mat-autocomplete-field',
1627
- template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <!-- readonly -->\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\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 [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text *ngIf=\"itemCount; let count\" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n <ion-row class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text *ngIf=\"itemCount; let count\" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\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 <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
1808
+ template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <!-- readonly -->\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\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 [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Mobile or Mutliple (use <mat-select>) -->\n <mat-select #matSelect\n *ngIf=\"mobile || multiple; else desktopTemplate\"\n [disableRipple]=\"true\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n [compareWith]=\"equals\"\n [multiple]=\"multiple\"\n [typeaheadDebounceInterval]=\"debounceTime * 10\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- Search bar -->\n <ion-searchbar *ngIf=\"showSearchBar\" #ionSearchbar\n class=\"mat-select-header\"\n [class.ion-searchbar-sticky]=\"stickySearchBar\"\n inputmode=\"search\"\n autocomplete=\"off\"\n animated=\"true\"\n showClearButton\n [debounce]=\"debounceTime\"\n (ionClear)=\"ionSearchBarClear($event)\"\n (ionInput)=\"ionSearchBarChanged($event)\"\n [placeholder]=\"'COMMON.BTN_SEARCH'|translate\"\n ></ion-searchbar>\n\n <!-- Headers -->\n <ion-row class=\"mat-select-header column ion-no-padding\"\n [class.multiple]=\"multiple\"\n [class.ion-searchbar-sticky]=\"showSearchBar && stickySearchBar\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required && !multiple && !clearable\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <!-- Options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: ionSearchbar.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount as count\"\n class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #desktopTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <!-- Headers -->\n <ion-row class=\"mat-autocomplete-header column ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- Options -->\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label><i>{{noResultMessage | translate}}</i></ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(displayValue | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount; let count\" class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\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 <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"desktop\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n\n<ng-template #headers>\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n</ng-template>\n\n<ng-template #options>\n\n\n</ng-template>\n\n",
1628
1809
  providers: [{
1629
1810
  provide: NG_VALUE_ACCESSOR,
1630
1811
  multi: true,
1631
1812
  useExisting: forwardRef(() => MatAutocompleteField)
1632
1813
  }],
1814
+ animations: [slideInOutAnimation],
1633
1815
  changeDetection: ChangeDetectionStrategy.OnPush,
1634
1816
  styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}"]
1635
1817
  },] }
@@ -1670,6 +1852,8 @@ MatAutocompleteField.propDecorators = {
1670
1852
  suggestLengthThreshold: [{ type: Input }],
1671
1853
  showLoadingSpinner: [{ type: Input }],
1672
1854
  debug: [{ type: Input }],
1855
+ showSearchBar: [{ type: Input }],
1856
+ stickySearchBar: [{ type: Input }],
1673
1857
  clicked: [{ type: Output, args: ['click',] }],
1674
1858
  blurred: [{ type: Output, args: ['blur',] }],
1675
1859
  focused: [{ type: Output, args: ['focus',] }],
@@ -1677,6 +1861,7 @@ MatAutocompleteField.propDecorators = {
1677
1861
  keydownEscape: [{ type: Output, args: ['keydown.escape',] }],
1678
1862
  keyupEnter: [{ type: Output, args: ['keyup.enter',] }],
1679
1863
  matSelect: [{ type: ViewChild, args: ['matSelect',] }],
1864
+ ionSearchbar: [{ type: ViewChild, args: ['ionSearchbar',] }],
1680
1865
  matInputText: [{ type: ViewChild, args: ['matInputText',] }],
1681
1866
  autocomplete: [{ type: ViewChild, args: [MatAutocomplete,] }],
1682
1867
  autocompleteTrigger: [{ type: ViewChild, args: [MatAutocompleteTrigger,] }],
@@ -1706,7 +1891,7 @@ class DateFormatPipe {
1706
1891
  return this.dateAdapter.format(date, displayFormat);
1707
1892
  }
1708
1893
  }
1709
- DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
1894
+ DateFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
1710
1895
  DateFormatPipe.decorators = [
1711
1896
  { type: Pipe, args: [{
1712
1897
  name: 'dateFormat'
@@ -1718,7 +1903,7 @@ DateFormatPipe.ctorParameters = () => [
1718
1903
  { type: TranslateService }
1719
1904
  ];
1720
1905
 
1721
- const moment = momentImported;
1906
+ const moment$7 = momentImported;
1722
1907
  class DateDiffDurationPipe {
1723
1908
  constructor(dateAdapter, translate) {
1724
1909
  this.dateAdapter = dateAdapter;
@@ -1734,17 +1919,17 @@ class DateDiffDurationPipe {
1734
1919
  return this.format(startDate, endDate);
1735
1920
  }
1736
1921
  format(startDate, endDate) {
1737
- const duration = moment.duration(endDate.diff(startDate));
1922
+ const duration = moment$7.duration(endDate.diff(startDate));
1738
1923
  if (duration.asMinutes() < 0)
1739
1924
  return '';
1740
- const timeDuration = moment(0)
1925
+ const timeDuration = moment$7(0)
1741
1926
  .hour(duration.hours())
1742
1927
  .minute(duration.minutes());
1743
1928
  const days = Math.floor(duration.asDays());
1744
1929
  return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
1745
1930
  }
1746
1931
  }
1747
- DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
1932
+ DateDiffDurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0.ɵɵinject(i1$2.DateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
1748
1933
  DateDiffDurationPipe.decorators = [
1749
1934
  { type: Pipe, args: [{
1750
1935
  name: 'dateDiffDuration'
@@ -1765,7 +1950,7 @@ class DateFromNowPipe {
1765
1950
  return date ? date.fromNow(args && args.withoutSuffix) : '';
1766
1951
  }
1767
1952
  }
1768
- DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
1953
+ DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
1769
1954
  DateFromNowPipe.decorators = [
1770
1955
  { type: Pipe, args: [{
1771
1956
  name: 'dateFromNow'
@@ -1834,7 +2019,7 @@ function formatToDD(value, opts) {
1834
2019
  value *= -1;
1835
2020
  }
1836
2021
  }
1837
- let degrees = roundFloat(value, opts.maxDecimals).toString();
2022
+ let degrees = roundFloat$1(value, opts.maxDecimals).toString();
1838
2023
  // Add sign
1839
2024
  let sign = negative ? '-' : '+';
1840
2025
  if (opts.placeholderChar) {
@@ -1885,7 +2070,7 @@ function formatToDDMMSS(value, opts) {
1885
2070
  }
1886
2071
  let degrees = Math.trunc(value);
1887
2072
  let minutes = Math.trunc((value - degrees) * 60);
1888
- let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
2073
+ let seconds = roundFloat$1(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
1889
2074
  while (seconds >= 60) {
1890
2075
  seconds -= 60;
1891
2076
  minutes += 1;
@@ -1953,7 +2138,7 @@ function formatToDDMM(value, opts) {
1953
2138
  }
1954
2139
  }
1955
2140
  let degrees = Math.trunc(value);
1956
- let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
2141
+ let minutes = roundFloat$1((value - degrees) * 60, opts.maxDecimals);
1957
2142
  while (minutes >= 60) {
1958
2143
  minutes -= 60;
1959
2144
  degrees += 1;
@@ -2004,15 +2189,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
2004
2189
  return NaN;
2005
2190
  }
2006
2191
  if (pattern === 'DD')
2007
- return roundFloat(degrees, maxDecimals);
2192
+ return roundFloat$1(degrees, maxDecimals);
2008
2193
  const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
2009
2194
  const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
2010
2195
  const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
2011
2196
  const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
2012
2197
  degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
2013
- return roundFloat(degrees, maxDecimals);
2198
+ return roundFloat$1(degrees, maxDecimals);
2014
2199
  }
2015
- function roundFloat(input, maxDecimals) {
2200
+ function roundFloat$1(input, maxDecimals) {
2016
2201
  if (maxDecimals > 0) {
2017
2202
  const powDecimal = Math.pow(10, maxDecimals);
2018
2203
  return Math.trunc(input * powDecimal + 0.5) / powDecimal;
@@ -2032,7 +2217,7 @@ class LatLongFormatPipe {
2032
2217
  return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
2033
2218
  }
2034
2219
  }
2035
- LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
2220
+ LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
2036
2221
  LatLongFormatPipe.decorators = [
2037
2222
  { type: Pipe, args: [{
2038
2223
  name: 'latLongFormat'
@@ -2044,7 +2229,7 @@ class LatitudeFormatPipe {
2044
2229
  this.transform = formatLatitude;
2045
2230
  }
2046
2231
  }
2047
- LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
2232
+ LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
2048
2233
  LatitudeFormatPipe.decorators = [
2049
2234
  { type: Pipe, args: [{
2050
2235
  name: 'latitudeFormat'
@@ -2056,7 +2241,7 @@ class LongitudeFormatPipe {
2056
2241
  this.transform = formatLongitude;
2057
2242
  }
2058
2243
  }
2059
- LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
2244
+ LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
2060
2245
  LongitudeFormatPipe.decorators = [
2061
2246
  { type: Pipe, args: [{
2062
2247
  name: 'longitudeFormat'
@@ -2076,7 +2261,7 @@ class NumberFormatPipe {
2076
2261
  }
2077
2262
  }
2078
2263
  }
2079
- NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
2264
+ NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
2080
2265
  NumberFormatPipe.decorators = [
2081
2266
  { type: Pipe, args: [{
2082
2267
  name: 'numberFormat'
@@ -2116,7 +2301,7 @@ class HighlightPipe {
2116
2301
  }
2117
2302
  }
2118
2303
  }
2119
- HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
2304
+ HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
2120
2305
  HighlightPipe.decorators = [
2121
2306
  { type: Pipe, args: [{
2122
2307
  name: 'highlight'
@@ -2181,7 +2366,7 @@ FileSizePipe.decorators = [
2181
2366
  { type: Pipe, args: [{ name: 'fileSize' },] }
2182
2367
  ];
2183
2368
 
2184
- const moment$1 = momentImported;
2369
+ const moment$6 = momentImported;
2185
2370
  const tz = momentTZImported;
2186
2371
  const DATE_UNIX_TIMESTAMP = 'X';
2187
2372
  const DATE_UNIX_MS_TIMESTAMP = 'x';
@@ -2258,32 +2443,32 @@ function fromDateISOString(value) {
2258
2443
  if (!value || isMoment(value))
2259
2444
  return value;
2260
2445
  // Parse the input value, as a ISO date time
2261
- const date = moment$1(value, DATE_ISO_PATTERN);
2446
+ const date = moment$6(value, DATE_ISO_PATTERN);
2262
2447
  if (date.isValid())
2263
2448
  return date;
2264
2449
  // Not valid: trying to convert from unix timestamp
2265
2450
  if (typeof value === 'string') {
2266
2451
  console.warn('Wrong date format - Trying to convert from local time: ' + value);
2267
2452
  if (value.length === 10) {
2268
- return moment$1(value, DATE_UNIX_TIMESTAMP);
2453
+ return moment$6(value, DATE_UNIX_TIMESTAMP);
2269
2454
  }
2270
2455
  else if (value.length === 13) {
2271
- return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
2456
+ return moment$6(value, DATE_UNIX_MS_TIMESTAMP);
2272
2457
  }
2273
2458
  }
2274
2459
  console.warn('Unable to parse date: ' + value);
2275
2460
  return undefined;
2276
2461
  }
2277
2462
  function fromUnixTimestamp(timeInSec) {
2278
- return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
2463
+ return moment$6(timeInSec, DATE_UNIX_TIMESTAMP);
2279
2464
  }
2280
2465
  function fromUnixMsTimestamp(timeInMs) {
2281
- return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2466
+ return moment$6(timeInMs, DATE_UNIX_MS_TIMESTAMP);
2282
2467
  }
2283
2468
  function toDuration(value, unit) {
2284
2469
  if (!value)
2285
2470
  return undefined;
2286
- const duration = moment$1.duration(value, unit);
2471
+ const duration = moment$6.duration(value, unit);
2287
2472
  // fix 990+ ms
2288
2473
  if (duration.milliseconds() >= 990) {
2289
2474
  duration.add(1000 - duration.milliseconds(), 'ms');
@@ -2312,7 +2497,7 @@ class DurationPipe {
2312
2497
  return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
2313
2498
  }
2314
2499
  }
2315
- DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
2500
+ DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$1.TranslateService)); }, token: DurationPipe, providedIn: "root" });
2316
2501
  DurationPipe.decorators = [
2317
2502
  { type: Pipe, args: [{
2318
2503
  name: 'duration'
@@ -2333,7 +2518,7 @@ class MathAbsPipe {
2333
2518
  }
2334
2519
  }
2335
2520
  }
2336
- MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
2521
+ MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
2337
2522
  MathAbsPipe.decorators = [
2338
2523
  { type: Pipe, args: [{
2339
2524
  name: 'mathAbs'
@@ -2345,7 +2530,7 @@ class EvenPipe {
2345
2530
  return val % 2 === 0;
2346
2531
  }
2347
2532
  }
2348
- EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
2533
+ EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
2349
2534
  EvenPipe.decorators = [
2350
2535
  { type: Pipe, args: [{
2351
2536
  name: 'even'
@@ -2357,7 +2542,7 @@ class OddPipe {
2357
2542
  return val % 2 !== 0;
2358
2543
  }
2359
2544
  }
2360
- OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
2545
+ OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
2361
2546
  OddPipe.decorators = [
2362
2547
  { type: Pipe, args: [{
2363
2548
  name: 'odd'
@@ -2465,7 +2650,7 @@ class MapGetPipe {
2465
2650
  return val[key];
2466
2651
  }
2467
2652
  }
2468
- MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
2653
+ MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
2469
2654
  MapGetPipe.decorators = [
2470
2655
  { type: Pipe, args: [{
2471
2656
  name: 'mapGet'
@@ -2479,7 +2664,7 @@ class MapKeysPipe {
2479
2664
  return Object.keys(map);
2480
2665
  }
2481
2666
  }
2482
- MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
2667
+ MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
2483
2668
  MapKeysPipe.decorators = [
2484
2669
  { type: Pipe, args: [{
2485
2670
  name: 'mapKeys'
@@ -2493,7 +2678,7 @@ class MapValuesPipe {
2493
2678
  return Object.values(map);
2494
2679
  }
2495
2680
  }
2496
- MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
2681
+ MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
2497
2682
  MapValuesPipe.decorators = [
2498
2683
  { type: Pipe, args: [{
2499
2684
  name: 'mapValues'
@@ -2506,7 +2691,7 @@ class IsNotNilOrBlankPipe {
2506
2691
  return isNotNilOrBlank(value);
2507
2692
  }
2508
2693
  }
2509
- IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
2694
+ IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
2510
2695
  IsNotNilOrBlankPipe.decorators = [
2511
2696
  { type: Pipe, args: [{
2512
2697
  name: 'isNotNilOrBlank'
@@ -2518,7 +2703,7 @@ class IsNilOrBlankPipe {
2518
2703
  return isNilOrBlank(value);
2519
2704
  }
2520
2705
  }
2521
- IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
2706
+ IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
2522
2707
  IsNilOrBlankPipe.decorators = [
2523
2708
  { type: Pipe, args: [{
2524
2709
  name: 'isNilOrBlank'
@@ -2530,7 +2715,7 @@ class ToStringPipe {
2530
2715
  return (value !== null && value !== undefined) ? value.toString() : '';
2531
2716
  }
2532
2717
  }
2533
- ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
2718
+ ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
2534
2719
  ToStringPipe.decorators = [
2535
2720
  { type: Pipe, args: [{
2536
2721
  name: 'toString'
@@ -2542,7 +2727,7 @@ class StrLengthPipe {
2542
2727
  return value && value.length || 0;
2543
2728
  }
2544
2729
  }
2545
- StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
2730
+ StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
2546
2731
  StrLengthPipe.decorators = [
2547
2732
  { type: Pipe, args: [{
2548
2733
  name: 'strLength'
@@ -2554,7 +2739,7 @@ class StrIncludesPipe {
2554
2739
  return (value === null || value === void 0 ? void 0 : value.includes(searchString, position)) || false;
2555
2740
  }
2556
2741
  }
2557
- StrIncludesPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
2742
+ StrIncludesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
2558
2743
  StrIncludesPipe.decorators = [
2559
2744
  { type: Pipe, args: [{
2560
2745
  name: 'strIncludes'
@@ -2631,7 +2816,7 @@ class TranslateContextService {
2631
2816
  return translations[keys[keys.length - 1]]; // Return the last keys translation
2632
2817
  }
2633
2818
  }
2634
- TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
2819
+ TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$1.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
2635
2820
  TranslateContextService.decorators = [
2636
2821
  { type: Injectable, args: [{ providedIn: 'root' },] }
2637
2822
  ];
@@ -2681,7 +2866,7 @@ class PropertyGetPipe {
2681
2866
  args && args.defaultValue);
2682
2867
  }
2683
2868
  }
2684
- PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
2869
+ PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
2685
2870
  PropertyGetPipe.decorators = [
2686
2871
  { type: Pipe, args: [{
2687
2872
  name: 'propertyGet'
@@ -2706,7 +2891,7 @@ NgInitDirective.propDecorators = {
2706
2891
  ngInit: [{ type: Output }]
2707
2892
  };
2708
2893
 
2709
- const moment$2 = momentImported;
2894
+ const moment$5 = momentImported;
2710
2895
  // @dynamic
2711
2896
  class SharedValidators {
2712
2897
  static getDoubleRegexp(maxDecimals) {
@@ -2787,7 +2972,7 @@ class SharedValidators {
2787
2972
  }
2788
2973
  static validDate(control) {
2789
2974
  const value = control.value;
2790
- const date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
2975
+ const date = !value || moment$5.isMoment(value) ? value : moment$5(control.value, DATE_ISO_PATTERN);
2791
2976
  if (date && (!date.isValid() || date.year() < 1970)) {
2792
2977
  return { validDate: true };
2793
2978
  }
@@ -3899,7 +4084,7 @@ class FormErrorTranslator {
3899
4084
  return errorKey;
3900
4085
  }
3901
4086
  }
3902
- FormErrorTranslator.ɵprov = ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(ɵɵinject(TranslateService), ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
4087
+ FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
3903
4088
  FormErrorTranslator.decorators = [
3904
4089
  { type: Injectable, args: [{ providedIn: 'root' },] }
3905
4090
  ];
@@ -3979,7 +4164,7 @@ class FormGetPipe {
3979
4164
  return form.get(path);
3980
4165
  }
3981
4166
  }
3982
- FormGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
4167
+ FormGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
3983
4168
  FormGetPipe.decorators = [
3984
4169
  { type: Pipe, args: [{
3985
4170
  name: 'formGet'
@@ -3991,7 +4176,7 @@ class FormGetControlPipe {
3991
4176
  return form.get(path);
3992
4177
  }
3993
4178
  }
3994
- FormGetControlPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
4179
+ FormGetControlPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
3995
4180
  FormGetControlPipe.decorators = [
3996
4181
  { type: Pipe, args: [{
3997
4182
  name: 'formGetControl'
@@ -4003,7 +4188,7 @@ class FormGetArrayPipe {
4003
4188
  return form.get(path);
4004
4189
  }
4005
4190
  }
4006
- FormGetArrayPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
4191
+ FormGetArrayPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
4007
4192
  FormGetArrayPipe.decorators = [
4008
4193
  { type: Pipe, args: [{
4009
4194
  name: 'formGetArray'
@@ -4015,7 +4200,7 @@ class FormGetGroupPipe {
4015
4200
  return form.get(path);
4016
4201
  }
4017
4202
  }
4018
- FormGetGroupPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
4203
+ FormGetGroupPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
4019
4204
  FormGetGroupPipe.decorators = [
4020
4205
  { type: Pipe, args: [{
4021
4206
  name: 'formGetGroup'
@@ -4113,40 +4298,13 @@ SharedPipesModule.decorators = [
4113
4298
  },] }
4114
4299
  ];
4115
4300
 
4116
- /* ---
4117
- * Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
4118
- * --- */
4119
- const matchMedia = (win, query) => win.matchMedia(query).matches;
4120
- const testUserAgent = (win, expr) => {
4121
- const userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
4122
- return expr.test(userAgent);
4123
- };
4124
- const isWindows = (win) => testUserAgent(win, /windows/i);
4125
- const isTouchUi = (win) => matchMedia(win, '(any-pointer:coarse)');
4126
- const isMobile = (win) => isTouchUi(win) && !isWindows(win);
4127
- const isIpad = (win) => {
4128
- // iOS 12 and below
4129
- if (testUserAgent(win, /iPad/i)) {
4130
- return true;
4131
- }
4132
- // iOS 13+
4133
- if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
4134
- return true;
4135
- }
4136
- return false;
4137
- };
4138
- const ɵ0$1 = isIpad;
4139
- const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
4140
- const isAndroid = (win) => testUserAgent(win, /android|sink/i);
4141
- const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
4142
-
4143
4301
  // Import the core angular services.
4144
4302
  // ----------------------------------------------------------------------------------- //
4145
4303
  // ----------------------------------------------------------------------------------- //
4146
4304
  const BASE_TIMER_DELAY = 100;
4147
4305
  class AutofocusDirective {
4148
4306
  // I initialize the autofocus directive.
4149
- constructor(elementRef, keyboard) {
4307
+ constructor(platform, elementRef, keyboard) {
4150
4308
  this.keyboard = keyboard;
4151
4309
  this._timer = null;
4152
4310
  this._elementRef = elementRef;
@@ -4221,6 +4379,7 @@ AutofocusDirective.decorators = [
4221
4379
  },] }
4222
4380
  ];
4223
4381
  AutofocusDirective.ctorParameters = () => [
4382
+ { type: Platform },
4224
4383
  { type: ElementRef },
4225
4384
  { type: Keyboard, decorators: [{ type: Optional }] }
4226
4385
  ];
@@ -4370,9 +4529,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
4370
4529
  const hour = parseInt(durationParts[0] || '0');
4371
4530
  const minute = parseInt(durationParts[1] || '0');
4372
4531
  const value = hour + (minute + 0.5) / 60;
4373
- return roundFloat$1(value, maxDecimals);
4532
+ return roundFloat(value, maxDecimals);
4374
4533
  }
4375
- function roundFloat$1(input, maxDecimals) {
4534
+ function roundFloat(input, maxDecimals) {
4376
4535
  if (maxDecimals > 0) {
4377
4536
  const powDecimal = Math.pow(10, maxDecimals);
4378
4537
  return Math.trunc(input * powDecimal + 0.5) / powDecimal;
@@ -4396,18 +4555,17 @@ const MASKS = {
4396
4555
  DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
4397
4556
  }
4398
4557
  };
4399
- const noop$1 = () => {
4558
+ const noop$7 = () => {
4400
4559
  };
4401
- const ɵ0$2 = noop$1;
4560
+ const ɵ0$a = noop$7;
4402
4561
  class MatLatLongField {
4403
- constructor(platform, translate, formBuilder, cd, formGroupDir) {
4404
- this.platform = platform;
4562
+ constructor(translate, formBuilder, cd, formGroupDir) {
4405
4563
  this.translate = translate;
4406
4564
  this.formBuilder = formBuilder;
4407
4565
  this.cd = cd;
4408
4566
  this.formGroupDir = formGroupDir;
4409
- this._onChangeCallback = noop$1;
4410
- this._onTouchedCallback = noop$1;
4567
+ this._onChangeCallback = noop$7;
4568
+ this._onTouchedCallback = noop$7;
4411
4569
  this._subscription = new Subscription();
4412
4570
  this.disabling = false;
4413
4571
  this.writing = false;
@@ -4418,7 +4576,6 @@ class MatLatLongField {
4418
4576
  this.required = false;
4419
4577
  this.onBlur = new EventEmitter();
4420
4578
  this.onFocus = new EventEmitter();
4421
- this.mobile = this.platform.is('mobile');
4422
4579
  }
4423
4580
  get disabled() {
4424
4581
  return this.readonly || this.formControl.disabled;
@@ -4431,6 +4588,7 @@ class MatLatLongField {
4431
4588
  return this._readonly;
4432
4589
  }
4433
4590
  ngOnInit() {
4591
+ this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
4434
4592
  this.type = this.type || 'latitude';
4435
4593
  this.pattern = this.pattern || 'DDMM';
4436
4594
  this.mask = MASKS[this.type] && MASKS[this.type][this.pattern];
@@ -4692,7 +4850,6 @@ MatLatLongField.decorators = [
4692
4850
  },] }
4693
4851
  ];
4694
4852
  MatLatLongField.ctorParameters = () => [
4695
- { type: Platform },
4696
4853
  { type: TranslateService },
4697
4854
  { type: FormBuilder },
4698
4855
  { type: ChangeDetectorRef },
@@ -4744,30 +4901,29 @@ SharedMatLatLongModule.decorators = [
4744
4901
  },] }
4745
4902
  ];
4746
4903
 
4747
- const DEFAULT_VALUE_ACCESSOR = {
4904
+ const DEFAULT_VALUE_ACCESSOR$5 = {
4748
4905
  provide: NG_VALUE_ACCESSOR,
4749
4906
  useExisting: forwardRef(() => MatDate),
4750
4907
  multi: true
4751
4908
  };
4752
- const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
4753
- const noop$2 = () => { };
4754
- const ɵ0$3 = noop$2;
4909
+ const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
4910
+ const noop$6 = () => { };
4911
+ const ɵ0$9 = noop$6;
4755
4912
  class MatDate {
4756
- constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
4757
- this.platform = platform;
4913
+ constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
4758
4914
  this.dateAdapter = dateAdapter;
4759
4915
  this.translate = translate;
4760
4916
  this.formBuilder = formBuilder;
4761
4917
  this.cd = cd;
4762
4918
  this.keyboard = keyboard;
4763
4919
  this.formGroupDir = formGroupDir;
4764
- this._onChangeCallback = noop$2;
4765
- this._onTouchedCallback = noop$2;
4920
+ this._onChangeCallback = noop$6;
4921
+ this._onTouchedCallback = noop$6;
4766
4922
  this._subscription = new Subscription();
4767
4923
  this._writing = true;
4768
4924
  this._disabling = false;
4769
4925
  this._readonly = false;
4770
- this.dayMask = DAY_MASK;
4926
+ this.dayMask = DAY_MASK$2;
4771
4927
  this.floatLabel = 'auto';
4772
4928
  this.compact = false;
4773
4929
  this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
@@ -4797,11 +4953,12 @@ class MatDate {
4797
4953
  return this.formControl.value;
4798
4954
  }
4799
4955
  ngOnInit() {
4800
- this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
4801
- this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
4802
4956
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
4803
4957
  if (!this.formControl)
4804
4958
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
4959
+ this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
4960
+ // Workaround because ion-datetime has issue (do not returned a ISO date)
4961
+ this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
4805
4962
  this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
4806
4963
  // Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
4807
4964
  if (!this.formControl.validator || this.formControl.validator === Validators.required) {
@@ -5054,14 +5211,13 @@ MatDate.decorators = [
5054
5211
  selector: 'mat-date-field',
5055
5212
  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 -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\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]=\"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 input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\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)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <!-- errors -->\n <mat-error *ngIf=\"formControl.touched && formControl.errors|mapKeys|arrayFirst; let errorKey\">\n <ng-container [ngSwitch]=\"errorKey\">\n <span *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</span>\n <span *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</span>\n <span *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</span>\n <span *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</span>\n <span *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</span>\n <span *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</span>\n <span *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</span>\n <span *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</span>\n </ng-container>\n </mat-error>\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 </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"\n ></mat-datepicker>\n\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",
5056
5213
  providers: [
5057
- DEFAULT_VALUE_ACCESSOR,
5214
+ DEFAULT_VALUE_ACCESSOR$5,
5058
5215
  ],
5059
5216
  changeDetection: ChangeDetectionStrategy.OnPush,
5060
5217
  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%}"]
5061
5218
  },] }
5062
5219
  ];
5063
5220
  MatDate.ctorParameters = () => [
5064
- { type: Platform },
5065
5221
  { type: DateAdapter },
5066
5222
  { type: TranslateService },
5067
5223
  { type: FormBuilder },
@@ -5070,12 +5226,12 @@ MatDate.ctorParameters = () => [
5070
5226
  { type: FormGroupDirective, decorators: [{ type: Optional }] }
5071
5227
  ];
5072
5228
  MatDate.propDecorators = {
5229
+ mobile: [{ type: Input }],
5073
5230
  formControl: [{ type: Input }],
5074
5231
  formControlName: [{ type: Input }],
5075
5232
  placeholder: [{ type: Input }],
5076
5233
  floatLabel: [{ type: Input }],
5077
5234
  required: [{ type: Input }],
5078
- mobile: [{ type: Input }],
5079
5235
  compact: [{ type: Input }],
5080
5236
  placeholderChar: [{ type: Input }],
5081
5237
  autofocus: [{ type: Input }],
@@ -5089,33 +5245,32 @@ MatDate.propDecorators = {
5089
5245
  matInputs: [{ type: ViewChildren, args: ['matInput',] }]
5090
5246
  };
5091
5247
 
5092
- const DEFAULT_VALUE_ACCESSOR$1 = {
5248
+ const DEFAULT_VALUE_ACCESSOR$4 = {
5093
5249
  provide: NG_VALUE_ACCESSOR,
5094
5250
  useExisting: forwardRef(() => MatDateTime),
5095
5251
  multi: true
5096
5252
  };
5097
5253
  const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
5098
5254
  const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
5099
- const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
5100
- const noop$3 = () => { };
5101
- const ɵ0$4 = noop$3;
5255
+ const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
5256
+ const noop$5 = () => { };
5257
+ const ɵ0$8 = noop$5;
5102
5258
  class MatDateTime {
5103
- constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5104
- this.platform = platform;
5259
+ constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5105
5260
  this.dateAdapter = dateAdapter;
5106
5261
  this.translate = translate;
5107
5262
  this.formBuilder = formBuilder;
5108
5263
  this.cd = cd;
5109
5264
  this.keyboard = keyboard;
5110
5265
  this.formGroupDir = formGroupDir;
5111
- this._onChangeCallback = noop$3;
5112
- this._onTouchedCallback = noop$3;
5266
+ this._onChangeCallback = noop$5;
5267
+ this._onTouchedCallback = noop$5;
5113
5268
  this._subscription = new Subscription();
5114
5269
  this._writing = true;
5115
5270
  this._disabling = false;
5116
5271
  this._readonly = false;
5117
5272
  this.dayMask = DAY_MASK$1;
5118
- this.hourMask = HOUR_MASK;
5273
+ this.hourMask = HOUR_MASK$1;
5119
5274
  this.floatLabel = 'auto';
5120
5275
  this.compact = false;
5121
5276
  this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
@@ -5144,11 +5299,12 @@ class MatDateTime {
5144
5299
  return this.formControl.value;
5145
5300
  }
5146
5301
  ngOnInit() {
5147
- this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
5148
- this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5149
5302
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
5150
5303
  if (!this.formControl)
5151
5304
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
5305
+ this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
5306
+ // Workaround because ion-datetime has issue (do not returned a ISO date)
5307
+ this._keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5152
5308
  this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
5153
5309
  // Add 'validDate' validator (when existing validator are null or required, to be sure to keep it)
5154
5310
  if (!this.formControl.validator || this.formControl.validator === Validators.required) {
@@ -5428,14 +5584,13 @@ MatDateTime.decorators = [
5428
5584
  selector: 'mat-date-time-field',
5429
5585
  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]=\"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 input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\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)=\"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=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</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 && (hourControl.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]=\"hourControl\"\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]=\"hourControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"hourControl\"\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",
5430
5586
  providers: [
5431
- DEFAULT_VALUE_ACCESSOR$1,
5587
+ DEFAULT_VALUE_ACCESSOR$4,
5432
5588
  ],
5433
5589
  changeDetection: ChangeDetectionStrategy.OnPush,
5434
5590
  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%}"]
5435
5591
  },] }
5436
5592
  ];
5437
5593
  MatDateTime.ctorParameters = () => [
5438
- { type: Platform },
5439
5594
  { type: DateAdapter },
5440
5595
  { type: TranslateService },
5441
5596
  { type: FormBuilder },
@@ -5463,17 +5618,17 @@ MatDateTime.propDecorators = {
5463
5618
  matInputs: [{ type: ViewChildren, args: ['matInput',] }]
5464
5619
  };
5465
5620
 
5466
- const DEFAULT_VALUE_ACCESSOR$2 = {
5621
+ const DEFAULT_VALUE_ACCESSOR$3 = {
5467
5622
  provide: NG_VALUE_ACCESSOR,
5468
5623
  useExisting: forwardRef(() => MatDateShort),
5469
5624
  multi: true
5470
5625
  };
5471
- const DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
5626
+ const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
5472
5627
  const noop$4 = () => {
5473
5628
  };
5474
- const ɵ0$5 = noop$4;
5629
+ const ɵ0$7 = noop$4;
5475
5630
  class MatDateShort {
5476
- constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5631
+ constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
5477
5632
  this.dateAdapter = dateAdapter;
5478
5633
  this.translate = translate;
5479
5634
  this.formBuilder = formBuilder;
@@ -5484,16 +5639,13 @@ class MatDateShort {
5484
5639
  this._onTouchedCallback = noop$4;
5485
5640
  this.writing = true;
5486
5641
  this.disabling = false;
5487
- this.dayMask = DAY_MASK$2;
5642
+ this.dayMask = DAY_MASK;
5488
5643
  this.disabled = false;
5489
5644
  this.floatLabel = 'auto';
5490
5645
  this.readonly = false;
5491
5646
  this.compact = false;
5492
5647
  this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
5493
5648
  this.clearable = false;
5494
- // Workaround because ion-datetime has issue (do not returned a ISO date)
5495
- this.mobile = platform.is('mobile');
5496
- this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5497
5649
  this.locale = (translate.currentLang || translate.defaultLang).substr(0, 2);
5498
5650
  }
5499
5651
  set tabindex(value) {
@@ -5512,6 +5664,9 @@ class MatDateShort {
5512
5664
  this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
5513
5665
  if (!this.formControl)
5514
5666
  throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-short-field>.');
5667
+ this.mobile = isNotNil(this.mobile) ? this.mobile : isMobile(window);
5668
+ // Workaround because ion-datetime has issue (do not returned a ISO date)
5669
+ this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
5515
5670
  // Redirect errors from main control, into day sub control
5516
5671
  const $error = new BehaviorSubject(null);
5517
5672
  this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
@@ -5729,14 +5884,13 @@ MatDateShort.decorators = [
5729
5884
  selector: 'mat-date-short-field',
5730
5885
  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",
5731
5886
  providers: [
5732
- DEFAULT_VALUE_ACCESSOR$2,
5887
+ DEFAULT_VALUE_ACCESSOR$3,
5733
5888
  ],
5734
5889
  changeDetection: ChangeDetectionStrategy.OnPush,
5735
5890
  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%}"]
5736
5891
  },] }
5737
5892
  ];
5738
5893
  MatDateShort.ctorParameters = () => [
5739
- { type: Platform },
5740
5894
  { type: DateAdapter },
5741
5895
  { type: TranslateService },
5742
5896
  { type: FormBuilder },
@@ -5745,6 +5899,7 @@ MatDateShort.ctorParameters = () => [
5745
5899
  { type: FormGroupDirective, decorators: [{ type: Optional }] }
5746
5900
  ];
5747
5901
  MatDateShort.propDecorators = {
5902
+ mobile: [{ type: Input }],
5748
5903
  disabled: [{ type: Input }],
5749
5904
  formControl: [{ type: Input }],
5750
5905
  formControlName: [{ type: Input }],
@@ -5797,16 +5952,16 @@ SharedMatDateTimeModule.decorators = [
5797
5952
  },] }
5798
5953
  ];
5799
5954
 
5800
- const DEFAULT_VALUE_ACCESSOR$3 = {
5955
+ const DEFAULT_VALUE_ACCESSOR$2 = {
5801
5956
  provide: NG_VALUE_ACCESSOR,
5802
5957
  useExisting: forwardRef(() => MatDuration),
5803
5958
  multi: true
5804
5959
  };
5805
5960
  const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
5806
- const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
5807
- const noop$5 = () => {
5961
+ const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
5962
+ const noop$3 = () => {
5808
5963
  };
5809
- const ɵ0$6 = noop$5;
5964
+ const ɵ0$6 = noop$3;
5810
5965
  class MatDuration {
5811
5966
  constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
5812
5967
  this.dateAdapter = dateAdapter;
@@ -5815,11 +5970,11 @@ class MatDuration {
5815
5970
  this.cd = cd;
5816
5971
  this.formGroupDir = formGroupDir;
5817
5972
  this._subscription = new Subscription();
5818
- this._onChangeCallback = noop$5;
5819
- this._onTouchedCallback = noop$5;
5973
+ this._onChangeCallback = noop$3;
5974
+ this._onTouchedCallback = noop$3;
5820
5975
  this.writing = true;
5821
5976
  this.disabling = false;
5822
- this.hourMask = HOUR_MASK$1;
5977
+ this.hourMask = HOUR_MASK;
5823
5978
  this.disabled = false;
5824
5979
  this.floatLabel = 'auto';
5825
5980
  this.readonly = false;
@@ -5999,7 +6154,7 @@ MatDuration.decorators = [
5999
6154
  selector: 'mat-duration-field',
6000
6155
  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",
6001
6156
  providers: [
6002
- DEFAULT_VALUE_ACCESSOR$3,
6157
+ DEFAULT_VALUE_ACCESSOR$2,
6003
6158
  ],
6004
6159
  changeDetection: ChangeDetectionStrategy.OnPush,
6005
6160
  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%}"]
@@ -6056,22 +6211,22 @@ SharedMatDurationModule.decorators = [
6056
6211
  },] }
6057
6212
  ];
6058
6213
 
6059
- const DEFAULT_VALUE_ACCESSOR$4 = {
6214
+ const DEFAULT_VALUE_ACCESSOR$1 = {
6060
6215
  provide: NG_VALUE_ACCESSOR,
6061
6216
  useExisting: forwardRef(() => MatBooleanField),
6062
6217
  multi: true
6063
6218
  };
6064
- const noop$6 = () => {
6219
+ const noop$2 = () => {
6065
6220
  };
6066
- const ɵ0$7 = noop$6;
6221
+ const ɵ0$5 = noop$2;
6067
6222
  class MatBooleanField {
6068
6223
  constructor(translate, formBuilder, cd, formGroupDir) {
6069
6224
  this.translate = translate;
6070
6225
  this.formBuilder = formBuilder;
6071
6226
  this.cd = cd;
6072
6227
  this.formGroupDir = formGroupDir;
6073
- this._onChangeCallback = noop$6;
6074
- this._onTouchedCallback = noop$6;
6228
+ this._onChangeCallback = noop$2;
6229
+ this._onTouchedCallback = noop$2;
6075
6230
  this._writing = false;
6076
6231
  this.showRadio = false;
6077
6232
  this.disabled = false;
@@ -6234,7 +6389,7 @@ MatBooleanField.decorators = [
6234
6389
  selector: 'mat-boolean-field',
6235
6390
  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",
6236
6391
  providers: [
6237
- DEFAULT_VALUE_ACCESSOR$4
6392
+ DEFAULT_VALUE_ACCESSOR$1
6238
6393
  ],
6239
6394
  changeDetection: ChangeDetectionStrategy.OnPush,
6240
6395
  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}"]
@@ -6480,7 +6635,7 @@ class MatNumpadDomService {
6480
6635
  this.appRef.detachView(this.componentRef.hostView);
6481
6636
  }
6482
6637
  }
6483
- MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
6638
+ 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$3.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
6484
6639
  MatNumpadDomService.decorators = [
6485
6640
  { type: Injectable, args: [{
6486
6641
  providedIn: 'root'
@@ -6844,7 +6999,7 @@ SharedMatNumpadModule.decorators = [
6844
6999
  },] }
6845
7000
  ];
6846
7001
 
6847
- const DEFAULT_VALUE_ACCESSOR$5 = {
7002
+ const DEFAULT_VALUE_ACCESSOR = {
6848
7003
  provide: NG_VALUE_ACCESSOR,
6849
7004
  useExisting: forwardRef(() => MatSwipeField),
6850
7005
  multi: true
@@ -7107,7 +7262,7 @@ MatSwipeField.decorators = [
7107
7262
  { type: Component, args: [{
7108
7263
  selector: 'mat-swipe-field',
7109
7264
  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",
7110
- providers: [DEFAULT_VALUE_ACCESSOR$5],
7265
+ providers: [DEFAULT_VALUE_ACCESSOR],
7111
7266
  changeDetection: ChangeDetectionStrategy.OnPush,
7112
7267
  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}"]
7113
7268
  },] }
@@ -7165,14 +7320,14 @@ SharedMatSwipeModule.decorators = [
7165
7320
  },] }
7166
7321
  ];
7167
7322
 
7168
- const noop$7 = () => { };
7169
- const ɵ0$8 = noop$7;
7323
+ const noop$1 = () => { };
7324
+ const ɵ0$4 = noop$1;
7170
7325
  class MatChipsField {
7171
7326
  constructor(cd, formGroupDir) {
7172
7327
  this.cd = cd;
7173
7328
  this.formGroupDir = formGroupDir;
7174
- this._onChangeCallback = noop$7;
7175
- this._onTouchedCallback = noop$7;
7329
+ this._onChangeCallback = noop$1;
7330
+ this._onTouchedCallback = noop$1;
7176
7331
  this.logPrefix = '[mat-chips] ';
7177
7332
  this.formControlName = null;
7178
7333
  this.required = false;
@@ -7293,9 +7448,9 @@ class MatChipsField {
7293
7448
  // - if label then col size = 2
7294
7449
  // - if rankOrder then col size = 1
7295
7450
  // - ese => auto size
7296
- || this.displayAttributes.map(attr => (attr && attr.endsWith('label')) ? 2
7297
- : ((attr && attr.endsWith('rankOrder')) ? 1
7298
- : undefined));
7451
+ || this.displayAttributes.map(attr => attr && (attr.endsWith('label') ? 3
7452
+ : (attr.endsWith('rankOrder') ? 2
7453
+ : undefined)));
7299
7454
  this.displayColumnNames = this.displayAttributes.map((attr, index) => this.displayColumnNames && this.displayColumnNames[index] ||
7300
7455
  (this.i18nPrefix + changeCaseToUnderscore(attr).toUpperCase()));
7301
7456
  this.mobile = toBoolean(this.mobile, false);
@@ -7313,18 +7468,18 @@ class MatChipsField {
7313
7468
  // No suggestFn: filter on the given items
7314
7469
  if (!this.suggestFn) {
7315
7470
  const suggestFromArrayFn = (value, filter) => __awaiter(this, void 0, void 0, function* () {
7316
- if (this.debug)
7317
- console.debug(this.logPrefix + ' Calling suggestFromArray with value=', value);
7471
+ // DEBUG
7472
+ //if (this.debug) console.debug(this.logPrefix + ' Calling suggestFromArray with value=', value);
7318
7473
  return suggestFromArray(this.$inputItems.value, value, Object.assign({ searchAttributes: this.displayAttributes }, filter));
7319
7474
  });
7320
7475
  // Wait (once) that items are loaded, then call suggest from array fn
7321
7476
  this.suggestFn = (value, filter) => __awaiter(this, void 0, void 0, function* () {
7322
7477
  if (isNil(this.$inputItems.value)) {
7323
- if (this.debug)
7324
- console.debug('[mat-chips] Waiting items to be set...');
7478
+ // DEBUG
7479
+ //if (this.debug) console.debug('[mat-chips] Waiting items to be set...');
7325
7480
  yield firstNotNilPromise(this.$inputItems);
7326
- if (this.debug)
7327
- console.debug('[mat-chips] Received items:', this.$inputItems.value);
7481
+ // DEBUG
7482
+ //if (this.debug) console.debug('[mat-chips] Received items:', this.$inputItems.value);
7328
7483
  }
7329
7484
  this.suggestFn = suggestFromArrayFn;
7330
7485
  return this.suggestFn(value, filter); // Loop
@@ -7353,9 +7508,7 @@ class MatChipsField {
7353
7508
  ),
7354
7509
  // Object set: use it (no distinctUntilChanged() pipe need)
7355
7510
  this.inputControl.valueChanges
7356
- .pipe(startWith(this.inputControl.value), filter(value => isNotNil(value) && typeof value === 'object'),
7357
- // DEBUG
7358
- tap(value => this.debug && console.debug(this.logPrefix + ' Received an object value: ', value))),
7511
+ .pipe(startWith(this.inputControl.value), filter(value => isNotNil(value) && typeof value === 'object')),
7359
7512
  // On dropdown button click (no distinctUntilChanged(), nor debounceTime)
7360
7513
  this.dropButtonClick
7361
7514
  .pipe(filter(event => this.enabled && (!event || !event.defaultPrevented)), tap(_ => this.matInputText.nativeElement.focus()), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
@@ -7428,6 +7581,7 @@ class MatChipsField {
7428
7581
  this.$filteredItems.next(undefined);
7429
7582
  }
7430
7583
  this._implicitValue = null; // reset the implicit value
7584
+ this.closePanel(); // Clone panel
7431
7585
  }));
7432
7586
  // Listen form control status change
7433
7587
  this._subscription.add(this.formControl.statusChanges
@@ -7438,6 +7592,7 @@ class MatChipsField {
7438
7592
  .subscribe(() => this.checkIfTouched()));
7439
7593
  this._subscription.add(this.keydownEscape.subscribe(event => {
7440
7594
  if (this.isOpen) {
7595
+ // Avoid form or page to manage escape event
7441
7596
  event === null || event === void 0 ? void 0 : event.stopPropagation();
7442
7597
  event === null || event === void 0 ? void 0 : event.preventDefault();
7443
7598
  // DEBUG
@@ -7525,8 +7680,8 @@ class MatChipsField {
7525
7680
  value = [value];
7526
7681
  }
7527
7682
  if (value !== this.formControl.value) {
7528
- if (this.debug)
7529
- console.debug(this.logPrefix + ' Writing value: ', value);
7683
+ // DEBUG
7684
+ //if (this.debug) console.debug(this.logPrefix + ' Writing value: ', value);
7530
7685
  this.formControl.patchValue(value, { emitEvent: false });
7531
7686
  this._onChangeCallback(value);
7532
7687
  }
@@ -7559,15 +7714,17 @@ class MatChipsField {
7559
7714
  if (event.stopPropagation)
7560
7715
  event.stopPropagation();
7561
7716
  event.returnValue = false;
7562
- if (this.debug)
7563
- console.debug(this.logPrefix + ' Cancelling focus event');
7717
+ // DEBUG
7718
+ //if (this.debug) console.debug(this.logPrefix + ' Cancelling focus event');
7564
7719
  return false;
7565
7720
  }
7721
+ // DEBUG
7722
+ //if (this.debug) console.debug(this.logPrefix + ' Select input content');
7566
7723
  const hasContent = selectInputContent(event);
7567
7724
  // If combo is empty, or if has content but should force to show panel on focus
7568
7725
  if (!hasContent || (this.showPanelOnFocus && this.showAllOnFocus)) {
7569
- if (this.debug)
7570
- console.debug(this.logPrefix + ' Emit focus event');
7726
+ // DEBUG
7727
+ //if (this.debug) console.debug(this.logPrefix + ' Emit focus event');
7571
7728
  this.focused.emit(event);
7572
7729
  return true;
7573
7730
  }
@@ -7582,11 +7739,12 @@ class MatChipsField {
7582
7739
  if (event.stopPropagation)
7583
7740
  event.stopPropagation();
7584
7741
  event.returnValue = false;
7585
- //DEBUG console.debug(this.logPrefix + " Cancelling blur event");
7742
+ //DEBUG
7743
+ //if (this.debug) console.debug(this.logPrefix + " Cancelling blur event");
7586
7744
  return false;
7587
7745
  }
7588
- //DEBUG
7589
- //console.debug(this.logPrefix + ' Blur: move caret to the beginning');
7746
+ // DEBUG
7747
+ //if (this.debug) console.debug(this.logPrefix + ' Blur: move caret to the beginning');
7590
7748
  // Move caret to the beginning (fix issue IMAGINE-469)
7591
7749
  selectInputRange(event.target, 0, 0);
7592
7750
  this.blurred.emit(event);
@@ -7724,7 +7882,7 @@ MatChipsField.decorators = [
7724
7882
  { type: Component, args: [{
7725
7883
  // eslint-disable-next-line @angular-eslint/component-selector
7726
7884
  selector: 'mat-chips-field',
7727
- template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\" class=\"material-chips\" [class.mat-form-field-disabled]=\"disabled\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <mat-label>{{placeholder}}</mat-label>\n <mat-chip-list #chipList\n (focus)=\"filterChipsFocusEvent($event)\" >\n <mat-chip\n *ngFor=\"let item of value\"\n [selectable]=\"false\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n >\n {{displayWith(item)}}\n <mat-icon matChipRemove *ngIf=\"!disabled\">cancel</mat-icon>\n </mat-chip>\n\n <input #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"inputControl\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"disabled\"\n [hidden]=\"disabled\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n [matChipInputFor]=\"chipList\"\n >\n </mat-chip-list>\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n (optionSelected)=\"add($event)\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count\" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: inputControl.value, withAccent: highlightAccent } \"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button 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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
7885
+ template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\" class=\"material-chips\" [class.mat-form-field-disabled]=\"disabled\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <mat-label>{{placeholder}}</mat-label>\n <mat-chip-list #chipList\n (focus)=\"filterChipsFocusEvent($event)\" >\n <mat-chip\n *ngFor=\"let item of value\"\n [selectable]=\"false\"\n [removable]=\"!disabled\"\n (removed)=\"remove(item)\"\n [color]=\"chipColor\"\n >\n {{displayWith(item)}}\n <mat-icon matChipRemove *ngIf=\"!disabled\">cancel</mat-icon>\n </mat-chip>\n\n <input #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"inputControl\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [readonly]=\"disabled\"\n [hidden]=\"disabled\"\n [required]=\"required\"\n (click)=\"clicked.emit($event)\"\n (focus)=\"filterInputTextFocusEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"keydownEscape.emit($event)\"\n (keyup.enter)=\"keyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.showPanel && dropButtonClick.emit($event)\"\n [matChipInputFor]=\"chipList\"\n >\n </mat-chip-list>\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n (optionSelected)=\"add($event)\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [panelWidth]=\"panelWidth\">\n <ion-row class=\"mat-autocomplete-header ion-no-padding column\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async as items; else loadingTemplate\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: inputControl.value, withAccent: highlightAccent } \"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- footer -->\n <ion-row *ngIf=\"itemCount as count\"\n class=\"mat-autocomplete-footer ion-no-padding\">\n <ion-col>\n <ion-text class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"dropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button 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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
7728
7886
  providers: [{
7729
7887
  provide: NG_VALUE_ACCESSOR,
7730
7888
  multi: true,
@@ -8041,7 +8199,7 @@ class ProgressBarService {
8041
8199
  }
8042
8200
  }
8043
8201
  }
8044
- ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
8202
+ ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
8045
8203
  ProgressBarService.decorators = [
8046
8204
  { type: Injectable, args: [{ providedIn: 'root' },] }
8047
8205
  ];
@@ -8085,7 +8243,7 @@ class AppGestureConfig extends HammerGestureConfig {
8085
8243
  return mc;
8086
8244
  }
8087
8245
  }
8088
- AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
8246
+ AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
8089
8247
  AppGestureConfig.decorators = [
8090
8248
  { type: Injectable, args: [{ providedIn: 'root' },] }
8091
8249
  ];
@@ -8310,7 +8468,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
8310
8468
  this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
8311
8469
  }
8312
8470
  }
8313
- MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
8471
+ MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
8314
8472
  MatPaginatorI18n.decorators = [
8315
8473
  { type: Injectable, args: [{ providedIn: 'root' },] }
8316
8474
  ];
@@ -8400,17 +8558,17 @@ function getColorContrast(color, bw) {
8400
8558
  return rgbArrayToHex(rgb.map(v => 255 - v));
8401
8559
  }
8402
8560
 
8403
- const noop$8 = () => {
8561
+ const noop = () => {
8404
8562
  };
8405
- const ɵ0$9 = noop$8;
8563
+ const ɵ0$3 = noop;
8406
8564
  class AppFormField {
8407
8565
  constructor(translate, cd, injector, formGroupDir) {
8408
8566
  this.translate = translate;
8409
8567
  this.cd = cd;
8410
8568
  this.injector = injector;
8411
8569
  this.formGroupDir = formGroupDir;
8412
- this._onChangeCallback = noop$8;
8413
- this._onTouchedCallback = noop$8;
8570
+ this._onChangeCallback = noop;
8571
+ this._onTouchedCallback = noop;
8414
8572
  this.readonly = false;
8415
8573
  this.compact = false;
8416
8574
  this.floatLabel = 'auto';
@@ -8846,14 +9004,14 @@ class AudioProvider extends StartableService {
8846
9004
  });
8847
9005
  }
8848
9006
  }
8849
- AudioProvider.ɵprov = ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(ɵɵinject(Platform), ɵɵinject(NativeAudio, 8), ɵɵinject(Vibration, 8), ɵɵinject(AudioManagement$1, 8)); }, token: AudioProvider, providedIn: "root" });
9007
+ AudioProvider.ɵprov = i0.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2.NativeAudio, 8), i0.ɵɵinject(i3.Vibration, 8), i0.ɵɵinject(i4.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
8850
9008
  AudioProvider.decorators = [
8851
9009
  { type: Injectable, args: [{ providedIn: 'root' },] }
8852
9010
  ];
8853
9011
  AudioProvider.ctorParameters = () => [
8854
9012
  { type: Platform },
8855
- { type: NativeAudio$1, decorators: [{ type: Optional }] },
8856
- { type: Vibration$1, decorators: [{ type: Optional }] },
9013
+ { type: NativeAudio, decorators: [{ type: Optional }] },
9014
+ { type: Vibration, decorators: [{ type: Optional }] },
8857
9015
  { type: AudioManagement, decorators: [{ type: Optional }] }
8858
9016
  ];
8859
9017
 
@@ -8938,7 +9096,7 @@ class Hotkeys {
8938
9096
  });
8939
9097
  }
8940
9098
  }
8941
- Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController), ɵɵinject(PopoverController)); }, token: Hotkeys, providedIn: "root" });
9099
+ Hotkeys.ɵprov = i0.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0.ɵɵinject(i1$5.EventManager), i0.ɵɵinject(i2$1.MatDialog), i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(i1$4.PopoverController)); }, token: Hotkeys, providedIn: "root" });
8942
9100
  Hotkeys.decorators = [
8943
9101
  { type: Injectable, args: [{
8944
9102
  providedIn: 'root'
@@ -9113,7 +9271,7 @@ class Base64ImageReader {
9113
9271
  }
9114
9272
  }
9115
9273
 
9116
- const uuidv4 = uuidv4Imported;
9274
+ const uuidv4$1 = uuidv4Imported;
9117
9275
  class FileService {
9118
9276
  constructor(platform,
9119
9277
  //private transfer: FileTransfer,
@@ -9150,7 +9308,7 @@ class FileService {
9150
9308
  const lastSlashIndex = source.lastIndexOf('/');
9151
9309
  if (lastSlashIndex === -1)
9152
9310
  throw new Error('Invalid URL: ' + source);
9153
- const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
9311
+ const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
9154
9312
  // Download into the file system
9155
9313
  if (responseType === 'file' && this.canUseFileSystem) {
9156
9314
  console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
@@ -9206,7 +9364,7 @@ class FileService {
9206
9364
  this._started = true;
9207
9365
  }
9208
9366
  }
9209
- FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
9367
+ FileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
9210
9368
  FileService.decorators = [
9211
9369
  { type: Injectable, args: [{
9212
9370
  providedIn: 'root',
@@ -9372,7 +9530,7 @@ class Base58 {
9372
9530
  Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
9373
9531
 
9374
9532
  const scrypt = require('scrypt-async');
9375
- const sha256 = require('hash.js/lib/hash/sha/256');
9533
+ const sha256$1 = require('hash.js/lib/hash/sha/256');
9376
9534
  const sha512 = require('hash.js/lib/hash/sha/512');
9377
9535
  const nacl = {
9378
9536
  sign,
@@ -9476,7 +9634,7 @@ class CryptoService {
9476
9634
  * Hash (using SHA256) a message
9477
9635
  */
9478
9636
  sha256(message) {
9479
- return sha256().update(message).digest('hex');
9637
+ return sha256$1().update(message).digest('hex');
9480
9638
  }
9481
9639
  /**
9482
9640
  * Hash (using SHA512) a message
@@ -9489,7 +9647,7 @@ class CryptoService {
9489
9647
  return nacl.util.encodeBase64(m);
9490
9648
  }
9491
9649
  }
9492
- CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
9650
+ CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
9493
9651
  CryptoService.decorators = [
9494
9652
  { type: Injectable, args: [{ providedIn: 'root' },] }
9495
9653
  ];
@@ -9972,109 +10130,6 @@ Peer = Peer_1 = __decorate([
9972
10130
  EntityClass({ typename: 'PeerVO' })
9973
10131
  ], Peer);
9974
10132
 
9975
- // import the required animation functions from the angular animations module
9976
- const fadeInAnimation =
9977
- // trigger name for attaching this animation to an element using the [@triggerName] syntax
9978
- trigger('fadeInAnimation', [
9979
- // route 'enter' transition
9980
- transition(':enter', [
9981
- // css styles at start of transition
9982
- style({ opacity: 0 }),
9983
- // animation and styles at end of transition
9984
- animate('.3s', style({ opacity: 1 }))
9985
- ]),
9986
- ]);
9987
- const fadeInOutAnimation =
9988
- // trigger name for attaching this animation to an element using the [@triggerName] syntax
9989
- trigger('fadeInOutAnimation', [
9990
- // route 'enter' transition
9991
- transition(':enter', [
9992
- // css styles at start of transition
9993
- style({ opacity: 0 }),
9994
- // animation and styles at end of transition
9995
- animate('.3s', style({ opacity: 1 }))
9996
- ]),
9997
- // route 'leave' transition
9998
- transition(':leave', [
9999
- // animation and styles at end of transition
10000
- animate('.5s ease-in-out', style({
10001
- opacity: 0
10002
- }))
10003
- ]),
10004
- ]);
10005
- const slideInOutAnimation =
10006
- // trigger name for attaching this animation to an element using the [@triggerName] syntax
10007
- trigger('slideInOutAnimation', [
10008
- // end state styles for route container (host)
10009
- state('*', style({
10010
- // the view covers the whole screen with a semi tranparent background
10011
- position: 'relative',
10012
- top: 0,
10013
- left: 0,
10014
- right: 0,
10015
- bottom: 0,
10016
- opacity: 1
10017
- })),
10018
- // route 'enter' transition
10019
- transition(':enter', [
10020
- // styles at start of transition
10021
- style({
10022
- // start with the content positioned off the right of the screen,
10023
- // -400% is required instead of -100% because the negative position adds to the width of the element
10024
- left: '400%',
10025
- // start with background opacity set to 0 (invisible)
10026
- opacity: 0
10027
- }),
10028
- // animation and styles at end of transition
10029
- animate('.3s ease-in-out', style({
10030
- // transition the right position to 0 which slides the content into view
10031
- left: 0,
10032
- // transition the background opacity to 0.8 to fade it in
10033
- opacity: 0.8
10034
- }))
10035
- ]),
10036
- // route 'leave' transition
10037
- transition(':leave', [
10038
- // animation and styles at end of transition
10039
- animate('.5s ease-in-out', style({
10040
- // transition the right position to -400% which slides the content out of view
10041
- left: '400%',
10042
- // transition the background opacity to 0 to fade it out
10043
- opacity: 0
10044
- }))
10045
- ])
10046
- ]);
10047
- const slideUpDownAnimation =
10048
- // trigger name for attaching this animation to an element using the [@triggerName] syntax
10049
- trigger('slideUpDownAnimation', [
10050
- // end state styles for route container (host)
10051
- state('*', style({
10052
- transform: 'translateY(0)',
10053
- opacity: 1
10054
- })),
10055
- // route 'enter' transition
10056
- transition(':enter', [
10057
- // styles at start of transition
10058
- style({
10059
- transform: 'translateY(-400%)',
10060
- opacity: 0
10061
- }),
10062
- // animation and styles at end of transition
10063
- animate('.3s ease-in-out', style({
10064
- transform: 'translateY(0)',
10065
- opacity: 1
10066
- }))
10067
- ]),
10068
- // route 'leave' transition
10069
- transition(':leave', [
10070
- // animation and styles at end of transition
10071
- animate('.5s ease-in-out', style({
10072
- transform: 'translateY(-100%)',
10073
- opacity: 0
10074
- }))
10075
- ])
10076
- ]);
10077
-
10078
10133
  class HttpUtils {
10079
10134
  static getText(http, uri, opts) {
10080
10135
  return __awaiter(this, void 0, void 0, function* () {
@@ -10352,7 +10407,7 @@ SelectPeerModal.propDecorators = {
10352
10407
  onRefresh: [{ type: Input }]
10353
10408
  };
10354
10409
 
10355
- const moment$3 = momentImported;
10410
+ const moment$4 = momentImported;
10356
10411
  const SETTINGS_STORAGE_KEY = 'settings';
10357
10412
  const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
10358
10413
  // fixme: this constant points to static environment
@@ -10414,7 +10469,7 @@ class LocalSettingsService extends StartableService {
10414
10469
  ngOnStart() {
10415
10470
  console.info('[settings] Starting service...');
10416
10471
  // Restoring local settings
10417
- this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);
10472
+ this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : (isCordova(window) || isMobile(window));
10418
10473
  this._data.usageMode = (isAndroid(window) || isIOS(window)) ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOS
10419
10474
  // Restoring local settings
10420
10475
  return this.restoreLocally();
@@ -10595,11 +10650,11 @@ class LocalSettingsService extends StartableService {
10595
10650
  if (!feature) {
10596
10651
  feature = {
10597
10652
  name: featureName.toLowerCase(),
10598
- lastSyncDate: moment$3().toISOString()
10653
+ lastSyncDate: moment$4().toISOString()
10599
10654
  };
10600
10655
  }
10601
10656
  else {
10602
- feature.lastSyncDate = moment$3().toISOString();
10657
+ feature.lastSyncDate = moment$4().toISOString();
10603
10658
  }
10604
10659
  this.saveOfflineFeature(feature);
10605
10660
  }
@@ -10760,7 +10815,7 @@ class LocalSettingsService extends StartableService {
10760
10815
  if (!page || !page.title || !page.path)
10761
10816
  throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
10762
10817
  // Set time
10763
- page.time = page.time || moment$3();
10818
+ page.time = page.time || moment$4();
10764
10819
  // Clean the title (remove <small> tags)
10765
10820
  if (!opts || opts.removeTitleSmallTag !== false) {
10766
10821
  const tagIndex = page.title.indexOf('</small>');
@@ -10776,7 +10831,7 @@ class LocalSettingsService extends StartableService {
10776
10831
  return page;
10777
10832
  }
10778
10833
  }
10779
- LocalSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(ɵɵinject(TranslateService), ɵɵinject(Platform), ɵɵinject(Storage), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_LOCAL_SETTINGS, 8), ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
10834
+ LocalSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
10780
10835
  LocalSettingsService.decorators = [
10781
10836
  { type: Injectable, args: [{
10782
10837
  providedIn: 'root',
@@ -11493,7 +11548,7 @@ class NetworkService extends StartableService {
11493
11548
  });
11494
11549
  }
11495
11550
  }
11496
- NetworkService.ɵprov = ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(ɵɵinject(DOCUMENT), ɵɵinject(Platform), ɵɵinject(ModalController), ɵɵinject(CryptoService), ɵɵinject(Storage), ɵɵinject(LocalSettingsService), ɵɵinject(CacheService), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT), ɵɵinject(Network, 8), ɵɵinject(SplashScreen, 8), ɵɵinject(TranslateService, 8), ɵɵinject(ToastController, 8)); }, token: NetworkService, providedIn: "root" });
11551
+ NetworkService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(CryptoService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i9.Network, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i1$1.TranslateService, 8), i0.ɵɵinject(i1$4.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
11497
11552
  NetworkService.decorators = [
11498
11553
  { type: Injectable, args: [{ providedIn: 'root' },] }
11499
11554
  ];
@@ -11504,16 +11559,16 @@ NetworkService.ctorParameters = () => [
11504
11559
  { type: CryptoService },
11505
11560
  { type: Storage },
11506
11561
  { type: LocalSettingsService },
11507
- { type: CacheService$1 },
11562
+ { type: CacheService },
11508
11563
  { type: HttpClient },
11509
11564
  { type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
11510
- { type: Network$1, decorators: [{ type: Optional }] },
11511
- { type: SplashScreen$1, decorators: [{ type: Optional }] },
11565
+ { type: Network, decorators: [{ type: Optional }] },
11566
+ { type: SplashScreen, decorators: [{ type: Optional }] },
11512
11567
  { type: TranslateService, decorators: [{ type: Optional }] },
11513
11568
  { type: ToastController, decorators: [{ type: Optional }] }
11514
11569
  ];
11515
11570
 
11516
- const ErrorCodes = {
11571
+ const ErrorCodes$2 = {
11517
11572
  UNKNOWN_ERROR: 0,
11518
11573
  LOAD_ACCOUNT_ERROR: 1,
11519
11574
  BAD_PASSWORD: 2,
@@ -11865,7 +11920,7 @@ class EntityStore {
11865
11920
  }
11866
11921
  catch (err) {
11867
11922
  console.error(err);
11868
- throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
11923
+ throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
11869
11924
  }
11870
11925
  }
11871
11926
  // Emit update event
@@ -12439,7 +12494,7 @@ class EntitiesStorage extends StartableService {
12439
12494
  }
12440
12495
  EntitiesStorage.TRASH_PREFIX = 'Trash#';
12441
12496
  EntitiesStorage.REMOTE_PREFIX = 'Remote#';
12442
- EntitiesStorage.ɵprov = ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(ɵɵinject(Platform), ɵɵinject(ProgressBarService), ɵɵinject(Storage), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
12497
+ EntitiesStorage.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(ProgressBarService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
12443
12498
  EntitiesStorage.decorators = [
12444
12499
  { type: Injectable, args: [{ providedIn: 'root' },] }
12445
12500
  ];
@@ -12576,10 +12631,10 @@ function referentialToString(obj, properties) {
12576
12631
  function referentialsToString(values, properties, separator) {
12577
12632
  return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
12578
12633
  }
12579
- const ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
12634
+ const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
12580
12635
  const StatusList = Object.freeze([
12581
12636
  {
12582
- id: ɵ0$a,
12637
+ id: ɵ0$2,
12583
12638
  icon: 'checkmark',
12584
12639
  label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
12585
12640
  },
@@ -12854,7 +12909,7 @@ function accountToString(data) {
12854
12909
  (data.lastName || '')) || '';
12855
12910
  }
12856
12911
 
12857
- const uuidv4$1 = uuidv4Imported;
12912
+ const uuidv4 = uuidv4Imported;
12858
12913
  const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
12859
12914
  const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
12860
12915
  /**
@@ -12898,7 +12953,7 @@ function createTrackerLink(opts) {
12898
12953
  // Skip if not tracked
12899
12954
  if (!context || !context.tracked)
12900
12955
  return forward(operation);
12901
- const id = context.serializationKey || uuidv4$1();
12956
+ const id = context.serializationKey || uuidv4();
12902
12957
  console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
12903
12958
  // Clean context, before calling JSON.stringify (remove unused attributes)
12904
12959
  const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
@@ -13394,7 +13449,7 @@ class GraphqlService extends StartableService {
13394
13449
  return __awaiter(this, void 0, void 0, function* () {
13395
13450
  yield this.network.ready();
13396
13451
  console.info('[graphql] Starting graphql...');
13397
- const mobile = this.platform.is('mobile') || this.platform.is('mobileweb');
13452
+ const mobile = isMobile(window);
13398
13453
  const enableTrackMutationQueries = !mobile;
13399
13454
  const peer = this.network.peer;
13400
13455
  if (!peer)
@@ -13561,7 +13616,7 @@ class GraphqlService extends StartableService {
13561
13616
  (err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
13562
13617
  || this.toAppError(err.networkError)
13563
13618
  || (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
13564
- || this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
13619
+ || this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
13565
13620
  // If graphQL: try to convert the first error found
13566
13621
  || (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
13567
13622
  || this.toAppError(err)
@@ -13569,7 +13624,7 @@ class GraphqlService extends StartableService {
13569
13624
  || (err.graphQLErrors && err.graphQLErrors[0])
13570
13625
  || err;
13571
13626
  console.error('[graphql] ' + (error && error.message || error), error.stack || '');
13572
- if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
13627
+ if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
13573
13628
  console.error('[graphql] original error: ' + err.networkError.message);
13574
13629
  this.onNetworkError.next(error);
13575
13630
  }
@@ -13605,7 +13660,7 @@ class GraphqlService extends StartableService {
13605
13660
  return 'ERROR.UNAUTHORIZED';
13606
13661
  case ServerErrorCodes.FORBIDDEN:
13607
13662
  return 'ERROR.FORBIDDEN';
13608
- case ErrorCodes.UNKNOWN_NETWORK_ERROR:
13663
+ case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
13609
13664
  return 'ERROR.UNKNOWN_NETWORK_ERROR';
13610
13665
  case ServerErrorCodes.BAD_UPDATE_DATE:
13611
13666
  return 'ERROR.BAD_UPDATE_DATE';
@@ -13636,7 +13691,7 @@ class GraphqlService extends StartableService {
13636
13691
  return undefined;
13637
13692
  }
13638
13693
  }
13639
- GraphqlService.ɵprov = ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(ɵɵinject(Platform), ɵɵinject(Apollo), ɵɵinject(HttpLink), ɵɵinject(NetworkService), ɵɵinject(Storage), ɵɵinject(CryptoService), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
13694
+ GraphqlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$3.Apollo), i0.ɵɵinject(i3$2.HttpLink), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(CryptoService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
13640
13695
  GraphqlService.decorators = [
13641
13696
  { type: Injectable, args: [{
13642
13697
  providedIn: 'root'
@@ -13653,7 +13708,7 @@ GraphqlService.ctorParameters = () => [
13653
13708
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
13654
13709
  ];
13655
13710
 
13656
- const sha256$1 = require('hash.js/lib/hash/sha/256');
13711
+ const sha256 = require('hash.js/lib/hash/sha/256');
13657
13712
  class BaseGraphqlServiceOptions {
13658
13713
  }
13659
13714
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
@@ -13804,8 +13859,8 @@ class BaseGraphqlService extends StartableService {
13804
13859
  }
13805
13860
  /* -- protected methods -- */
13806
13861
  computeMutableWatchQueryId(opts) {
13807
- const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
13808
- const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
13862
+ const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
13863
+ const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
13809
13864
  return [queryName, opts.arrayFieldName, variablesKey].join('|');
13810
13865
  }
13811
13866
  findMutableWatchQueries(opts) {
@@ -13875,7 +13930,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
13875
13930
  /* ------------------------------------
13876
13931
  * GraphQL queries
13877
13932
  * ------------------------------------*/
13878
- const Fragments = {
13933
+ const Fragments$1 = {
13879
13934
  account: gql `
13880
13935
  fragment AccountFragment on AccountVO {
13881
13936
  id
@@ -13910,14 +13965,14 @@ const Fragments = {
13910
13965
  }`
13911
13966
  };
13912
13967
  // Load account query
13913
- const LoadQuery = gql `
13968
+ const LoadQuery$1 = gql `
13914
13969
  query Account {
13915
13970
  data: account {
13916
13971
  ...AccountFragment
13917
13972
  }
13918
13973
  }
13919
- ${Fragments.account}
13920
- ${Fragments.settings}
13974
+ ${Fragments$1.account}
13975
+ ${Fragments$1.settings}
13921
13976
  `;
13922
13977
  // Check email query
13923
13978
  const IsEmailExistsQuery = gql `
@@ -13932,21 +13987,21 @@ const AccountMutations = {
13932
13987
  ...AccountFragment
13933
13988
  }
13934
13989
  }
13935
- ${Fragments.account}
13936
- ${Fragments.settings}`,
13990
+ ${Fragments$1.account}
13991
+ ${Fragments$1.settings}`,
13937
13992
  create: gql `mutation CreateAccount($data:AccountVOInput){
13938
13993
  data: createAccount(account: $data){
13939
13994
  ...AccountFragment
13940
13995
  }
13941
13996
  }
13942
- ${Fragments.account}
13943
- ${Fragments.settings}`,
13997
+ ${Fragments$1.account}
13998
+ ${Fragments$1.settings}`,
13944
13999
  saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
13945
14000
  data: saveSettings(settings: $data){
13946
14001
  ...UserSettingsFragment
13947
14002
  }
13948
14003
  }
13949
- ${Fragments.settings}`
14004
+ ${Fragments$1.settings}`
13950
14005
  };
13951
14006
  // Sent confirmation email
13952
14007
  const SendConfirmEmailMutation = gql `
@@ -14261,7 +14316,7 @@ class AccountService extends BaseGraphqlService {
14261
14316
  catch (error) {
14262
14317
  console.error(error);
14263
14318
  this.resetData();
14264
- throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
14319
+ throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
14265
14320
  }
14266
14321
  // Store pubkey+keypair
14267
14322
  this._cache.pubkey = Base58.encode(keypair.publicKey);
@@ -14295,7 +14350,7 @@ class AccountService extends BaseGraphqlService {
14295
14350
  }
14296
14351
  catch (err) {
14297
14352
  // If account not found, check if email is valid
14298
- if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
14353
+ if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
14299
14354
  // Check email exists
14300
14355
  if (data.username.indexOf('@') !== -1) {
14301
14356
  let isEmailExists;
@@ -14307,11 +14362,11 @@ class AccountService extends BaseGraphqlService {
14307
14362
  }
14308
14363
  // Email not exists (no account)
14309
14364
  if (!isEmailExists) {
14310
- throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
14365
+ throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
14311
14366
  }
14312
14367
  }
14313
14368
  // Email exists, so error = 'bad password'
14314
- throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
14369
+ throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
14315
14370
  }
14316
14371
  throw err; // resend the first error
14317
14372
  }
@@ -14457,8 +14512,8 @@ class AccountService extends BaseGraphqlService {
14457
14512
  // Load remotely
14458
14513
  else {
14459
14514
  const { data } = yield this.graphql.query({
14460
- query: LoadQuery,
14461
- error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
14515
+ query: LoadQuery$1,
14516
+ error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
14462
14517
  fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
14463
14518
  });
14464
14519
  json = data;
@@ -14485,7 +14540,7 @@ class AccountService extends BaseGraphqlService {
14485
14540
  return __awaiter(this, void 0, void 0, function* () {
14486
14541
  const isEmailExists = yield this.isEmailExists(email);
14487
14542
  if (isEmailExists) {
14488
- throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
14543
+ throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
14489
14544
  }
14490
14545
  });
14491
14546
  }
@@ -14521,7 +14576,7 @@ class AccountService extends BaseGraphqlService {
14521
14576
  locale
14522
14577
  },
14523
14578
  error: {
14524
- code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
14579
+ code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
14525
14580
  message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
14526
14581
  }
14527
14582
  });
@@ -14537,7 +14592,7 @@ class AccountService extends BaseGraphqlService {
14537
14592
  code
14538
14593
  },
14539
14594
  error: {
14540
- code: ErrorCodes.CONFIRM_EMAIL_FAILED,
14595
+ code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
14541
14596
  message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
14542
14597
  }
14543
14598
  });
@@ -14616,7 +14671,7 @@ class AccountService extends BaseGraphqlService {
14616
14671
  throw error;
14617
14672
  console.error(error);
14618
14673
  throw {
14619
- code: ErrorCodes.LOAD_ACCOUNT_ERROR,
14674
+ code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
14620
14675
  message: 'ERROR.LOAD_ACCOUNT_ERROR'
14621
14676
  };
14622
14677
  }
@@ -14786,7 +14841,7 @@ class AccountService extends BaseGraphqlService {
14786
14841
  if (!isNew) {
14787
14842
  const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
14788
14843
  if (!existingAccount || !existingAccount.updateDate) {
14789
- throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
14844
+ throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
14790
14845
  }
14791
14846
  this.copyIdAndUpdateDate(existingAccount, account);
14792
14847
  }
@@ -14798,7 +14853,7 @@ class AccountService extends BaseGraphqlService {
14798
14853
  mutation: isNew ? AccountMutations.create : AccountMutations.save,
14799
14854
  variables: { data: json },
14800
14855
  error: {
14801
- code: ErrorCodes.SAVE_ACCOUNT_ERROR,
14856
+ code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
14802
14857
  message: 'ERROR.SAVE_ACCOUNT_ERROR'
14803
14858
  }
14804
14859
  });
@@ -14825,7 +14880,7 @@ class AccountService extends BaseGraphqlService {
14825
14880
  mutation: AccountMutations.saveSettings,
14826
14881
  variables: { data: json },
14827
14882
  error: {
14828
- code: ErrorCodes.SAVE_SETTINGS_ERROR,
14883
+ code: ErrorCodes$2.SAVE_SETTINGS_ERROR,
14829
14884
  message: 'ERROR.SAVE_SETTINGS_ERROR'
14830
14885
  }
14831
14886
  });
@@ -14847,7 +14902,7 @@ class AccountService extends BaseGraphqlService {
14847
14902
  if (counter > 4) {
14848
14903
  if (this._debug)
14849
14904
  console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
14850
- throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
14905
+ throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
14851
14906
  }
14852
14907
  // Check if valid
14853
14908
  if (token) {
@@ -14857,7 +14912,7 @@ class AccountService extends BaseGraphqlService {
14857
14912
  token
14858
14913
  },
14859
14914
  error: {
14860
- code: ErrorCodes.UNAUTHORIZED,
14915
+ code: ErrorCodes$2.UNAUTHORIZED,
14861
14916
  message: 'ERROR.UNAUTHORIZED'
14862
14917
  },
14863
14918
  fetchPolicy: 'no-cache'
@@ -14873,7 +14928,7 @@ class AccountService extends BaseGraphqlService {
14873
14928
  }
14874
14929
  // Generate a new token
14875
14930
  const challengeError = {
14876
- code: ErrorCodes.AUTH_CHALLENGE_ERROR,
14931
+ code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
14877
14932
  message: 'ERROR.AUTH_CHALLENGE_ERROR'
14878
14933
  };
14879
14934
  const data = yield this.graphql.query({
@@ -14951,7 +15006,7 @@ class AccountService extends BaseGraphqlService {
14951
15006
  query: AccountSubscriptions.listenChanges,
14952
15007
  variables,
14953
15008
  error: {
14954
- code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
15009
+ code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
14955
15010
  message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
14956
15011
  }
14957
15012
  }).pipe(map(({ data }) => data),
@@ -14980,7 +15035,7 @@ class AccountService extends BaseGraphqlService {
14980
15035
  return Toasts.show(this.toastController, this.translate, opts);
14981
15036
  }
14982
15037
  }
14983
- AccountService.ɵprov = ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(ɵɵinject(CryptoService), ɵɵinject(NetworkService), ɵɵinject(GraphqlService), ɵɵinject(LocalSettingsService), ɵɵinject(Storage), ɵɵinject(FileService), ɵɵinject(TranslateService, 8), ɵɵinject(ToastController, 8), ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
15038
+ 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$1.Storage), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$1.TranslateService, 8), i0.ɵɵinject(i1$4.ToastController, 8), i0.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
14984
15039
  AccountService.decorators = [
14985
15040
  { type: Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
14986
15041
  ];
@@ -15248,7 +15303,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
15248
15303
  /* ------------------------------------
15249
15304
  * GraphQL queries
15250
15305
  * ------------------------------------*/
15251
- const Fragments$1 = {
15306
+ const Fragments = {
15252
15307
  config: gql `
15253
15308
  fragment ConfigFragment on ConfigurationVO {
15254
15309
  id
@@ -15275,13 +15330,13 @@ const Fragments$1 = {
15275
15330
  }
15276
15331
  `
15277
15332
  };
15278
- const LoadQuery$1 = gql `
15333
+ const LoadQuery = gql `
15279
15334
  query Configuration{
15280
15335
  data: configuration{
15281
15336
  ...ConfigFragment
15282
15337
  }
15283
15338
  }
15284
- ${Fragments$1.config}
15339
+ ${Fragments.config}
15285
15340
  `;
15286
15341
  // Save (create or update) account mutation
15287
15342
  const SaveMutation = gql `
@@ -15290,7 +15345,7 @@ const SaveMutation = gql `
15290
15345
  ...ConfigFragment
15291
15346
  }
15292
15347
  }
15293
- ${Fragments$1.config}
15348
+ ${Fragments.config}
15294
15349
  `;
15295
15350
  const ClearCache = gql `
15296
15351
  query ClearCache($name: String) {
@@ -15341,12 +15396,12 @@ class ConfigService extends BaseGraphqlService {
15341
15396
  return __awaiter(this, void 0, void 0, function* () {
15342
15397
  const now = Date.now();
15343
15398
  console.debug('[config] Loading Pod configuration...');
15344
- const query = opts && opts.query || LoadQuery$1;
15399
+ const query = opts && opts.query || LoadQuery;
15345
15400
  const variables = opts && opts.variables || undefined;
15346
15401
  const res = yield this.graphql.query({
15347
15402
  query,
15348
15403
  variables,
15349
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15404
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15350
15405
  fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
15351
15406
  });
15352
15407
  const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
@@ -15379,7 +15434,7 @@ class ConfigService extends BaseGraphqlService {
15379
15434
  data: json
15380
15435
  },
15381
15436
  error: {
15382
- code: ErrorCodes.SAVE_CONFIG_ERROR,
15437
+ code: ErrorCodes$2.SAVE_CONFIG_ERROR,
15383
15438
  message: 'ERROR.SAVE_CONFIG_ERROR'
15384
15439
  }
15385
15440
  });
@@ -15405,7 +15460,7 @@ class ConfigService extends BaseGraphqlService {
15405
15460
  const res = yield this.graphql.query({
15406
15461
  query: CacheStatistics,
15407
15462
  variables: null,
15408
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15463
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15409
15464
  fetchPolicy: 'network-only'
15410
15465
  });
15411
15466
  const data = res && res.cacheStatistics || undefined;
@@ -15421,7 +15476,7 @@ class ConfigService extends BaseGraphqlService {
15421
15476
  const res = yield this.graphql.query({
15422
15477
  query: ClearCache,
15423
15478
  variables,
15424
- error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15479
+ error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
15425
15480
  fetchPolicy: 'no-cache'
15426
15481
  });
15427
15482
  const data = res && res.clearCache || undefined;
@@ -15508,7 +15563,7 @@ class ConfigService extends BaseGraphqlService {
15508
15563
  else {
15509
15564
  let now = this._debug && Date.now();
15510
15565
  // Convert images, for offline usage
15511
- if (this.network.online && this.platform.is('mobile')) {
15566
+ if (this.network.online && isMobile(window)) {
15512
15567
  const jobs = [];
15513
15568
  // Download logos
15514
15569
  if (data.largeLogo && data.largeLogo.startsWith('http')) {
@@ -15580,7 +15635,7 @@ class ConfigService extends BaseGraphqlService {
15580
15635
  });
15581
15636
  }
15582
15637
  }
15583
- ConfigService.ɵprov = ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(ɵɵinject(Platform), ɵɵinject(GraphqlService), ɵɵinject(Storage), ɵɵinject(NetworkService), ɵɵinject(FileService), ɵɵinject(ToastController), ɵɵinject(TranslateService), ɵɵinject(AccountService), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
15638
+ ConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(NetworkService), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
15584
15639
  ConfigService.decorators = [
15585
15640
  { type: Injectable, args: [{
15586
15641
  providedIn: 'root',
@@ -15600,7 +15655,7 @@ ConfigService.ctorParameters = () => [
15600
15655
  { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
15601
15656
  ];
15602
15657
 
15603
- const moment$4 = momentImported;
15658
+ const moment$3 = momentImported;
15604
15659
  const AndroidOsEnvironment = Object.freeze({
15605
15660
  DIRECTORY_DOWNLOADS: 'Download',
15606
15661
  DIRECTORY_DOWNLOADS_OLD: 'Downloads',
@@ -15635,14 +15690,15 @@ class PlatformService extends StartableService {
15635
15690
  is(platformName) {
15636
15691
  switch (platformName) {
15637
15692
  case 'mobile':
15638
- // Use custom mobile detection - see SUMARIS issue #323
15639
- return isMobile(window);
15693
+ case 'mobileweb':
15694
+ // Exclude Windows touch screens - see SUMARIS issue #323
15695
+ return this.platform.is(platformName) && !isWindows(window);
15640
15696
  default:
15641
15697
  return this.platform.is(platformName);
15642
15698
  }
15643
15699
  }
15644
15700
  get mobile() {
15645
- return isNotNil(this._mobile) ? this._mobile : isMobile(window);
15701
+ return isNotNil(this._mobile) ? this._mobile : this.is('mobile');
15646
15702
  }
15647
15703
  /**
15648
15704
  * Say if opened has been opened inside an Android or iOs App.
@@ -15657,17 +15713,17 @@ class PlatformService extends StartableService {
15657
15713
  isIOSCordova() {
15658
15714
  return this._ios && this._cordova || false;
15659
15715
  }
15660
- isWeb() {
15661
- return !this._cordova || (!this._android && !this._ios);
15662
- }
15663
15716
  isApp() {
15664
- return this._cordova && (this._android || this._ios);
15717
+ return this.isAndroidCordova() || this.isIOSCordova();
15718
+ }
15719
+ isWeb() {
15720
+ return !this.isApp();
15665
15721
  }
15666
15722
  isMobileWeb() {
15667
- return isMobile(window) && this.isWeb();
15723
+ return this.mobile && this.isWeb();
15668
15724
  }
15669
15725
  get canDownload() {
15670
- return !!this.downloader && this.isAndroidCordova();
15726
+ return this.downloader && this.isAndroidCordova();
15671
15727
  }
15672
15728
  get canOpenFile() {
15673
15729
  return false;
@@ -15834,16 +15890,16 @@ class PlatformService extends StartableService {
15834
15890
  }
15835
15891
  // config moment lib
15836
15892
  try {
15837
- moment$4.locale(event.lang);
15893
+ moment$3.locale(event.lang);
15838
15894
  console.debug('[platform] Use locale {' + event.lang + '}');
15839
15895
  }
15840
15896
  // If error, fallback to en
15841
15897
  catch (err) {
15842
- moment$4.locale('en');
15898
+ moment$3.locale('en');
15843
15899
  console.warn('[platform] Unknown local for moment lib. Using default [en]');
15844
15900
  }
15845
15901
  // Config date adapter
15846
- this.dateAdapter.setLocale(moment$4.locale());
15902
+ this.dateAdapter.setLocale(moment$3.locale());
15847
15903
  }
15848
15904
  });
15849
15905
  this.settings.onChange.subscribe(data => {
@@ -16044,7 +16100,7 @@ class PlatformService extends StartableService {
16044
16100
  });
16045
16101
  }
16046
16102
  }
16047
- PlatformService.ɵprov = ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(ɵɵinject(Platform), ɵɵinject(Platform$1), ɵɵinject(ToastController), ɵɵinject(TranslateService), ɵɵinject(MomentDateAdapter), ɵɵinject(EntitiesStorage), ɵɵinject(LocalSettingsService), ɵɵinject(NetworkService), ɵɵinject(AccountService), ɵɵinject(ConfigService), ɵɵinject(CacheService), ɵɵinject(Storage), ɵɵinject(AudioProvider), ɵɵinject(ENVIRONMENT), ɵɵinject(StatusBar, 8), ɵɵinject(Keyboard$1, 8), ɵɵinject(SplashScreen, 8), ɵɵinject(InAppBrowser, 8), ɵɵinject(Downloader, 8)); }, token: PlatformService, providedIn: "root" });
16103
+ PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$1.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" });
16048
16104
  PlatformService.decorators = [
16049
16105
  { type: Injectable, args: [{ providedIn: 'root' },] }
16050
16106
  ];
@@ -16059,15 +16115,15 @@ PlatformService.ctorParameters = () => [
16059
16115
  { type: NetworkService },
16060
16116
  { type: AccountService },
16061
16117
  { type: ConfigService },
16062
- { type: CacheService$1 },
16118
+ { type: CacheService },
16063
16119
  { type: Storage },
16064
16120
  { type: AudioProvider },
16065
16121
  { type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
16066
- { type: StatusBar$1, decorators: [{ type: Optional }] },
16122
+ { type: StatusBar, decorators: [{ type: Optional }] },
16067
16123
  { type: Keyboard, decorators: [{ type: Optional }] },
16068
- { type: SplashScreen$1, decorators: [{ type: Optional }] },
16069
- { type: InAppBrowser$1, decorators: [{ type: Optional }] },
16070
- { type: Downloader$1, decorators: [{ type: Optional }] }
16124
+ { type: SplashScreen, decorators: [{ type: Optional }] },
16125
+ { type: InAppBrowser, decorators: [{ type: Optional }] },
16126
+ { type: Downloader, decorators: [{ type: Optional }] }
16071
16127
  ];
16072
16128
 
16073
16129
  class AppHelpModal {
@@ -16131,7 +16187,7 @@ class MatStepperI18n extends MatStepperIntl {
16131
16187
  this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
16132
16188
  }
16133
16189
  }
16134
- MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
16190
+ MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
16135
16191
  MatStepperI18n.decorators = [
16136
16192
  { type: Injectable, args: [{ providedIn: 'root' },] }
16137
16193
  ];
@@ -17967,7 +18023,7 @@ function state2side(state) {
17967
18023
  return 1;
17968
18024
  }
17969
18025
  }
17970
- const ɵ0$b = (defaultStateSize) => [
18026
+ const ɵ0$1 = (defaultStateSize) => [
17971
18027
  Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
17972
18028
  Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
17973
18029
  Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
@@ -17975,7 +18031,7 @@ const ɵ0$b = (defaultStateSize) => [
17975
18031
  const SCALE_OPTIONS_DEFAULT = {
17976
18032
  startColor: rgbArrayMap.red,
17977
18033
  startStates: [0, 2, 3],
17978
- startStepsFn: ɵ0$b
18034
+ startStepsFn: ɵ0$1
17979
18035
  };
17980
18036
  /**
17981
18037
  * Internal function, that create a colors scale, using iteration
@@ -18772,7 +18828,7 @@ class UserSettingsValidatorService extends AppValidatorService {
18772
18828
  });
18773
18829
  }
18774
18830
  }
18775
- UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
18831
+ UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
18776
18832
  UserSettingsValidatorService.decorators = [
18777
18833
  { type: Injectable, args: [{ providedIn: 'root' },] }
18778
18834
  ];
@@ -18816,7 +18872,7 @@ class AccountValidatorService extends AppValidatorService {
18816
18872
  return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
18817
18873
  }
18818
18874
  }
18819
- AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
18875
+ AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
18820
18876
  AccountValidatorService.decorators = [
18821
18877
  { type: Injectable, args: [{ providedIn: 'root' },] }
18822
18878
  ];
@@ -19381,7 +19437,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
19381
19437
  });
19382
19438
  }
19383
19439
  }
19384
- LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
19440
+ LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
19385
19441
  LocalSettingsValidatorService.decorators = [
19386
19442
  { type: Injectable, args: [{ providedIn: 'root' },] }
19387
19443
  ];
@@ -20000,7 +20056,7 @@ class IsOnFieldModePipe {
20000
20056
  return value === 'FIELD';
20001
20057
  }
20002
20058
  }
20003
- IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
20059
+ IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
20004
20060
  IsOnFieldModePipe.decorators = [
20005
20061
  { type: Pipe, args: [{
20006
20062
  name: 'isOnField'
@@ -20012,7 +20068,7 @@ class IsNotOnFieldModePipe {
20012
20068
  return value !== 'FIELD';
20013
20069
  }
20014
20070
  }
20015
- IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
20071
+ IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
20016
20072
  IsNotOnFieldModePipe.decorators = [
20017
20073
  { type: Pipe, args: [{
20018
20074
  name: 'isNotOnField'
@@ -20027,7 +20083,7 @@ class PersonToStringPipe {
20027
20083
  return PersonUtils.personToString(value);
20028
20084
  }
20029
20085
  }
20030
- PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
20086
+ PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
20031
20087
  PersonToStringPipe.decorators = [
20032
20088
  { type: Pipe, args: [{
20033
20089
  name: 'personToString'
@@ -20412,7 +20468,7 @@ class IsLoginAccountPipe {
20412
20468
  return value && value.pubkey && true;
20413
20469
  }
20414
20470
  }
20415
- IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
20471
+ IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
20416
20472
  IsLoginAccountPipe.decorators = [
20417
20473
  { type: Pipe, args: [{
20418
20474
  name: 'isLogin'
@@ -20424,7 +20480,7 @@ class AccountToStringPipe {
20424
20480
  return accountToString(value);
20425
20481
  }
20426
20482
  }
20427
- AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
20483
+ AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
20428
20484
  AccountToStringPipe.decorators = [
20429
20485
  { type: Pipe, args: [{
20430
20486
  name: 'accountToString'
@@ -20439,7 +20495,7 @@ class DepartmentToStringPipe {
20439
20495
  return departmentToString(value);
20440
20496
  }
20441
20497
  }
20442
- DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
20498
+ DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
20443
20499
  DepartmentToStringPipe.decorators = [
20444
20500
  { type: Pipe, args: [{
20445
20501
  name: 'departmentToString'
@@ -20535,7 +20591,7 @@ class MenuService {
20535
20591
  this._visibleSubject.next(value);
20536
20592
  }
20537
20593
  }
20538
- MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
20594
+ MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
20539
20595
  MenuService.decorators = [
20540
20596
  { type: Injectable, args: [{
20541
20597
  providedIn: 'root'
@@ -20991,7 +21047,7 @@ class AuthGuardService {
20991
21047
  }));
20992
21048
  }
20993
21049
  }
20994
- AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
21050
+ AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(AccountService), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(i3$3.Router), i0.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
20995
21051
  AuthGuardService.decorators = [
20996
21052
  { type: Injectable, args: [{ providedIn: 'root' },] }
20997
21053
  ];
@@ -21033,7 +21089,7 @@ class BaseEntityService extends BaseGraphqlService {
21033
21089
  query,
21034
21090
  variables: { id },
21035
21091
  fetchPolicy: opts && opts.fetchPolicy || undefined,
21036
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
21092
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
21037
21093
  })
21038
21094
  .pipe(map(({ data }) => (!opts || opts.toEntity !== false)
21039
21095
  ? (data && this.fromObject(data))
@@ -21048,7 +21104,7 @@ class BaseEntityService extends BaseGraphqlService {
21048
21104
  query,
21049
21105
  variables: { id },
21050
21106
  fetchPolicy: opts && opts.fetchPolicy || undefined,
21051
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
21107
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
21052
21108
  });
21053
21109
  // Convert to entity
21054
21110
  return (!opts || opts.toEntity !== false)
@@ -21079,7 +21135,7 @@ class BaseEntityService extends BaseGraphqlService {
21079
21135
  totalFieldName: withTotal ? 'total' : undefined,
21080
21136
  insertFilterFn: filter && filter.asFilterFn(),
21081
21137
  variables,
21082
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
21138
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
21083
21139
  fetchPolicy: opts && opts.fetchPolicy || undefined
21084
21140
  })
21085
21141
  .pipe(map(({ data, total }) => {
@@ -21115,7 +21171,7 @@ class BaseEntityService extends BaseGraphqlService {
21115
21171
  const { data, total } = yield this.graphql.query({
21116
21172
  query,
21117
21173
  variables,
21118
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
21174
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
21119
21175
  fetchPolicy: opts && opts.fetchPolicy || 'network-only'
21120
21176
  });
21121
21177
  const entities = (!opts || opts.toEntity !== false) ?
@@ -21154,7 +21210,7 @@ class BaseEntityService extends BaseGraphqlService {
21154
21210
  variables: {
21155
21211
  filter: filter && filter.asPodObject()
21156
21212
  },
21157
- error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
21213
+ error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
21158
21214
  fetchPolicy: opts && opts.fetchPolicy || 'network-only'
21159
21215
  });
21160
21216
  return res.total;
@@ -21190,7 +21246,7 @@ class BaseEntityService extends BaseGraphqlService {
21190
21246
  variables: {
21191
21247
  data: json
21192
21248
  },
21193
- error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
21249
+ error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
21194
21250
  update: (proxy, { data }) => {
21195
21251
  const savedEntities = data && data.data;
21196
21252
  if (savedEntities) {
@@ -21246,7 +21302,7 @@ class BaseEntityService extends BaseGraphqlService {
21246
21302
  variables: {
21247
21303
  data: json
21248
21304
  },
21249
- error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
21305
+ error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
21250
21306
  update: (cache, { data }) => {
21251
21307
  // Update entity
21252
21308
  const savedEntity = data && data.data;
@@ -21294,7 +21350,7 @@ class BaseEntityService extends BaseGraphqlService {
21294
21350
  refetchQueries: this.getRefetchQueriesForMutation(opts),
21295
21351
  awaitRefetchQueries: opts && opts.awaitRefetchQueries,
21296
21352
  variables: { ids },
21297
- error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
21353
+ error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
21298
21354
  update: (cache, res) => {
21299
21355
  // Remove from cache
21300
21356
  if (this.watchQueriesUpdatePolicy === 'update-cache') {
@@ -21335,7 +21391,7 @@ class BaseEntityService extends BaseGraphqlService {
21335
21391
  refetchQueries: this.getRefetchQueriesForMutation(opts),
21336
21392
  awaitRefetchQueries: opts && opts.awaitRefetchQueries,
21337
21393
  variables: { id },
21338
- error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
21394
+ error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
21339
21395
  update: (proxy, res) => {
21340
21396
  // Remove from cache
21341
21397
  if (this.watchQueriesUpdatePolicy === 'update-cache') {
@@ -21371,7 +21427,7 @@ class BaseEntityService extends BaseGraphqlService {
21371
21427
  fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
21372
21428
  variables,
21373
21429
  error: {
21374
- code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
21430
+ code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
21375
21431
  message: 'ERROR.SUBSCRIBE_DATA_ERROR'
21376
21432
  }
21377
21433
  })
@@ -21557,7 +21613,7 @@ class EntitiesTableDataSource extends TableDataSource {
21557
21613
  if (this._debug)
21558
21614
  invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
21559
21615
  // Stop with an error
21560
- throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
21616
+ throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
21561
21617
  }
21562
21618
  this._editingRowCount = 0;
21563
21619
  let data;
@@ -22428,14 +22484,14 @@ class AppTable {
22428
22484
  return __awaiter(this, void 0, void 0, function* () {
22429
22485
  opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
22430
22486
  if (this.readOnly) {
22431
- throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
22487
+ throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
22432
22488
  }
22433
22489
  this.resetError();
22434
22490
  // Keep edited row id (should be done BEFORE confirmEditCreate() )
22435
22491
  this.previouslyEditedRowId = opts.keepEditing ? ((((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined) || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.id)) : undefined;
22436
22492
  const previouslyEditedData = opts.keepEditing ? (isNotNil(this.previouslyEditedRowId) && ((_c = this.editedRow) === null || _c === void 0 ? void 0 : _c.currentData) || ((_d = this.singleSelectedRow) === null || _d === void 0 ? void 0 : _d.currentData)) : undefined;
22437
22493
  if (!this.confirmEditCreate()) {
22438
- throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
22494
+ throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
22439
22495
  }
22440
22496
  // Mark as saving
22441
22497
  this.markAsSaving();
@@ -22554,7 +22610,7 @@ class AppTable {
22554
22610
  var _a;
22555
22611
  return __awaiter(this, void 0, void 0, function* () {
22556
22612
  if (this.readOnly) {
22557
- throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
22613
+ throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
22558
22614
  }
22559
22615
  if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
22560
22616
  return 0; // SKip
@@ -24134,7 +24190,7 @@ class AppEntityEditor extends AppTabEditor {
24134
24190
  try {
24135
24191
  const data = yield this.dataService.load(id, opts);
24136
24192
  if (!data)
24137
- throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
24193
+ throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
24138
24194
  this._usageMode = this.computeUsageMode(data);
24139
24195
  yield this.onEntityLoaded(data, opts);
24140
24196
  yield this.updateView(data, opts);
@@ -25086,7 +25142,7 @@ class UserEventService extends BaseGraphqlService {
25086
25142
  EntityUtils.copyIdAndUpdateDate(source, target);
25087
25143
  }
25088
25144
  }
25089
- UserEventService.ɵprov = ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(ɵɵinject(GraphqlService), ɵɵinject(AccountService), ɵɵinject(NetworkService), ɵɵinject(TranslateService), ɵɵinject(ToastController), ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
25145
+ UserEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(AccountService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
25090
25146
  UserEventService.decorators = [
25091
25147
  { type: Injectable, args: [{ providedIn: 'root' },] }
25092
25148
  ];
@@ -25467,7 +25523,7 @@ class PersonService extends BaseEntityService {
25467
25523
  return target;
25468
25524
  }
25469
25525
  }
25470
- PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
25526
+ 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" });
25471
25527
  PersonService.decorators = [
25472
25528
  { type: Injectable, args: [{ providedIn: 'root' },] }
25473
25529
  ];
@@ -25498,7 +25554,7 @@ class PersonValidatorService {
25498
25554
  return this.formBuilder.group(formConfig);
25499
25555
  }
25500
25556
  }
25501
- PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
25557
+ PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
25502
25558
  PersonValidatorService.decorators = [
25503
25559
  { type: Injectable, args: [{ providedIn: 'root' },] }
25504
25560
  ];
@@ -25692,16 +25748,16 @@ AdminModule.decorators = [
25692
25748
  ];
25693
25749
  AdminModule.ctorParameters = () => [];
25694
25750
 
25695
- const ɵ0$c = {
25751
+ const ɵ0 = {
25696
25752
  profile: 'ADMIN'
25697
25753
  };
25698
- const routes = [
25754
+ const routes$5 = [
25699
25755
  {
25700
25756
  path: 'users',
25701
25757
  pathMatch: 'full',
25702
25758
  component: UsersPage,
25703
25759
  canActivate: [AuthGuardService],
25704
- data: ɵ0$c
25760
+ data: ɵ0
25705
25761
  }
25706
25762
  ];
25707
25763
  class AdminRoutingModule {
@@ -25711,33 +25767,33 @@ AdminRoutingModule.decorators = [
25711
25767
  imports: [
25712
25768
  SharedRoutingModule,
25713
25769
  AdminModule,
25714
- RouterModule.forChild(routes)
25770
+ RouterModule.forChild(routes$5)
25715
25771
  ],
25716
25772
  exports: [RouterModule]
25717
25773
  },] }
25718
25774
  ];
25719
25775
 
25720
- const ErrorCodes$2 = {
25776
+ const ErrorCodes = {
25721
25777
  LOAD_PERSONS_ERROR: 100,
25722
25778
  SAVE_PERSONS_ERROR: 101,
25723
25779
  DELETE_PERSONS_ERROR: 102,
25724
25780
  };
25725
25781
 
25726
- class EntityTestClass {
25782
+ class EntityTestClass$1 {
25727
25783
  }
25728
- const FAKE_ENTITIES = [
25784
+ const FAKE_ENTITIES$1 = [
25729
25785
  { id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
25730
25786
  { id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
25731
25787
  { id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
25732
25788
  ];
25733
- function deepCopy(values, size) {
25789
+ function deepCopy$1(values, size) {
25734
25790
  if (isNil(size)) {
25735
- return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
25791
+ return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
25736
25792
  }
25737
25793
  let result = [];
25738
25794
  let i = 1;
25739
25795
  while (result.length < size) {
25740
- result = result.concat((values || FAKE_ENTITIES).map(entity => {
25796
+ result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
25741
25797
  const name = entity.name + ' #' + i;
25742
25798
  return Object.assign(Object.assign({}, entity), { id: i++, name });
25743
25799
  }));
@@ -25747,7 +25803,7 @@ function deepCopy(values, size) {
25747
25803
  class AutocompleteTestPage {
25748
25804
  constructor(formBuilder) {
25749
25805
  this.formBuilder = formBuilder;
25750
- this._items = deepCopy(FAKE_ENTITIES, 100);
25806
+ this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
25751
25807
  this._$items = new BehaviorSubject(undefined);
25752
25808
  this.autocompleteFields = new MatAutocompleteConfigHolder();
25753
25809
  this.memoryHide = false;
@@ -25758,6 +25814,7 @@ class AutocompleteTestPage {
25758
25814
  entity: [null, SharedValidators.entity],
25759
25815
  missingEntity: [null, SharedValidators.entity],
25760
25816
  disableEntity: [null, SharedValidators.entity],
25817
+ entities: [null, SharedFormArrayValidators.requiredArrayMinLength(1)],
25761
25818
  });
25762
25819
  this.form.get('disableEntity').disable();
25763
25820
  }
@@ -25791,22 +25848,32 @@ class AutocompleteTestPage {
25791
25848
  });
25792
25849
  // From items
25793
25850
  this.autocompleteFields.add('entity-items-large', {
25794
- items: FAKE_ENTITIES.slice(),
25851
+ items: FAKE_ENTITIES$1.slice(),
25795
25852
  attributes: ['label', 'name', 'description', 'comments'],
25796
25853
  displayWith: this.entityToString
25797
25854
  });
25855
+ // For mutliple value
25856
+ this.autocompleteFields.add('entities-items-filter', {
25857
+ service: {
25858
+ suggest: (value, filter) => this.suggest(value, filter)
25859
+ },
25860
+ attributes: ['label', 'name'],
25861
+ multiple: true
25862
+ //displayWith: this.entitiesToString
25863
+ });
25798
25864
  this.loadData();
25799
25865
  }
25800
25866
  // Load the form with data
25801
25867
  loadData() {
25802
25868
  return __awaiter(this, void 0, void 0, function* () {
25803
25869
  const data = {
25804
- entity: deepCopy(FAKE_ENTITIES)[0],
25870
+ entity: deepCopy$1(FAKE_ENTITIES$1)[0],
25805
25871
  // This item is NOT in the items list => i should be displayed anyway
25806
25872
  missingEntity: {
25807
25873
  id: -1, label: '??', name: 'Missing item'
25808
25874
  },
25809
- disableEntity: deepCopy(FAKE_ENTITIES)[2]
25875
+ disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2],
25876
+ entities: deepCopy$1(FAKE_ENTITIES$1)
25810
25877
  };
25811
25878
  this.form.setValue(data);
25812
25879
  // Load observables
@@ -25821,6 +25888,9 @@ class AutocompleteTestPage {
25821
25888
  entityToString(item) {
25822
25889
  return [item && item.label || undefined, item && item.name || undefined].filter(isNotNil).join(' - ');
25823
25890
  }
25891
+ entitiesToString(items) {
25892
+ return (items || []).map(this.entityToString).join(', ');
25893
+ }
25824
25894
  suggest(value, filter) {
25825
25895
  return __awaiter(this, void 0, void 0, function* () {
25826
25896
  filter = Object.assign({ offset: 0, size: 30 }, filter);
@@ -25864,9 +25934,10 @@ class AutocompleteTestPage {
25864
25934
  this.memoryTimer = null;
25865
25935
  this.memoryHide = false;
25866
25936
  }
25867
- updateFilter(fieldName) {
25937
+ updateFilter(autocompleteField, fieldName) {
25868
25938
  const filter = this.autocompleteFields.get(fieldName).filter || {};
25869
25939
  filter.searchAttribute = (!filter || filter.searchAttribute !== 'name') ? 'name' : 'label';
25940
+ autocompleteField.reloadItems();
25870
25941
  }
25871
25942
  /* -- protected methods -- */
25872
25943
  stringify(value) {
@@ -25876,7 +25947,7 @@ class AutocompleteTestPage {
25876
25947
  AutocompleteTestPage.decorators = [
25877
25948
  { type: Component, args: [{
25878
25949
  selector: 'app-autocomplete-test',
25879
- template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Autocomplete field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <!-- Tab nav - mobile/desktop mode -->\n <nav mat-tab-nav-bar>\n <a mat-tab-link\n [active]=\"mode==='mobile'\"\n (click)=\"toggleMode('mobile')\">\n <mat-label>Mobile</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='desktop'\"\n (click)=\"toggleMode('desktop')\">\n <mat-label>Desktop</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='memory'\"\n (click)=\"toggleMode('memory')\">\n <mat-label>Memory leak debug</mat-label>\n </a>\n <a mat-tab-link\n [active]=\"mode==='temp'\"\n (click)=\"toggleMode('temp')\">\n <mat-label>Temporary</mat-label>\n </a>\n </nav>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <!--<ion-grid *ngIf=\"mode === 'temp'\">\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>items: Observable&lt;any[]&gt;</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [compareWith]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n </ion-grid>-->\n\n\n <ion-grid *ngIf=\"mode === 'memory'\">\n\n <!-- debugging memory leak -->\n <ion-row>\n <ion-col>\n <ion-text><h4>Debug memory leak</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Items type\">\n <mat-select (selectionChange)=\"memoryAutocompleteFieldName=$event.value\" [value]=\"memoryAutocompleteFieldName\">\n <mat-option value=\"entity-$items\">Observable</mat-option>\n <mat-option value=\"entity-suggestFn\">Suggest function</mat-option>\n </mat-select>\n </mat-form-field>\n </ion-col>\n <ion-col size=\"1\" class=\"ion-no-padding\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Mobile ?\">\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [checked]=\"memoryMobile\">\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\" color=\"tertiary\">Start</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\" color=\"tertiary\">Stop</ion-button>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n *ngIf=\"!memoryHide && memoryAutocompleteFieldName\"\n [config]=\"autocompleteFields.get(memoryAutocompleteFieldName)\"\n [mobile]=\"memoryMobile\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-memory-leak]'\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <!-- Mobile mode -->\n <ion-grid *ngIf=\"mode === 'mobile'\">\n\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Suggest() function\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, suggestFn: (searchText, filter) =&gt; any[]</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-1]'\"\n [required]=\"true\"\n placeholder=\"Suggest field\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Items is an Observable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-observable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Change filter\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <ion-button (click)=\"updateFilter('entity-items-filter')\">Filter on: {{autocompleteFields.get('entity-items-filter').filter?.searchAttribute }}</ion-button>\n </ion-col>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-filter]'\"\n ></mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"min-width-large\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"true\"\n class=\"min-width-large\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col>\n <ion-text><h4>Desktop mode</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n items from suggest function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult&lt;any&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-suggest]'\">\n </mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n search with a suggestLengthThreshold\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult&lt;any&gt;\nsuggestLengthThreshold: '3'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n suggestLengthThreshold=\"3\"\n [logPrefix]=\"'[combo-desktop-suggest]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an array\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: [], value: {{stringify(form.controls.entity.value)}}</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [logPrefix]=\"'[combo-desktop-array-1]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-missing]'\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size panel\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class: 'mat-autocomplete-panel-full-size'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n [debug]=\"true\"\n [showAllOnFocus]=\"true\"\n [showPanelOnFocus]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-disable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"mat-autocomplete-panel-full-size\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n class=\"mat-autocomplete-panel-full-size\"\n panelWidth=\"100vw\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>panelWidth: string</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n <ion-col size=\"3\">\n <mat-checkbox #showIcons [checked]=\"false\">\n Icons ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n <mat-icon matPrefix *ngIf=\"showIcons.checked\">keyboard_arrow_right</mat-icon>\n <mat-icon matSuffix *ngIf=\"showIcons.checked\">keyboard_arrow_left</mat-icon>\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
25950
+ template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Autocomplete field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <!-- Tab nav - mobile/desktop mode -->\n <nav mat-tab-nav-bar>\n <a mat-tab-link\n [active]=\"mode==='mobile'\"\n (click)=\"toggleMode('mobile')\">\n <mat-label>Mobile</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='desktop'\"\n (click)=\"toggleMode('desktop')\">\n <mat-label>Desktop</mat-label>\n </a>\n <a mat-tab-link [active]=\"mode==='memory'\"\n (click)=\"toggleMode('memory')\">\n <mat-label>Memory leak debug</mat-label>\n </a>\n <a mat-tab-link\n [active]=\"mode==='temp'\"\n (click)=\"toggleMode('temp')\">\n <mat-label>Temporary</mat-label>\n </a>\n </nav>\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <!--<ion-grid *ngIf=\"mode === 'temp'\">\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>items: Observable&lt;any[]&gt;</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [compareWith]=\"compareWithFn\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n </ion-grid>-->\n\n\n <ion-grid *ngIf=\"mode === 'memory'\">\n\n <!-- debugging memory leak -->\n <ion-row>\n <ion-col>\n <ion-text><h4>Debug memory leak</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Items type\">\n <mat-select (selectionChange)=\"memoryAutocompleteFieldName=$event.value\" [value]=\"memoryAutocompleteFieldName\">\n <mat-option value=\"entity-$items\">Observable</mat-option>\n <mat-option value=\"entity-suggestFn\">Suggest function</mat-option>\n </mat-select>\n </mat-form-field>\n </ion-col>\n <ion-col size=\"1\" class=\"ion-no-padding\">\n <mat-form-field floatLabel=\"always\">\n <input matInput type=\"text\" hidden placeholder=\"Mobile ?\">\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [checked]=\"memoryMobile\">\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\" color=\"tertiary\">Start</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\" color=\"tertiary\">Stop</ion-button>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\"\n *ngIf=\"!memoryHide && memoryAutocompleteFieldName\"\n [config]=\"autocompleteFields.get(memoryAutocompleteFieldName)\"\n [mobile]=\"memoryMobile\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-memory-leak]'\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n <!-- Mobile mode -->\n <ion-grid *ngIf=\"mode === 'mobile'\">\n\n <ion-row>\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Suggest() function\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, suggestFn: (searchText, filter) =&gt; any[]</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-1]'\"\n [required]=\"true\"\n placeholder=\"Suggest field\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Items is an Observable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-observable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>mobile: true, items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n search with a suggestLengthThreshold\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult&lt;any&gt;\nsuggestLengthThreshold: '3'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n suggestLengthThreshold=\"3\"\n [logPrefix]=\"'[combo-mobile-suggestLengthThreshold]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Multiple value\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>multiple: true</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entities\"\n [config]=\"autocompleteFields.get('entities-items-filter')\"\n [placeholder]=\"'Multiple'\"\n mobile=\"true\"\n multiple=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-multiple]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-2]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Change filter\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre></pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col>\n <ion-button (click)=\"updateFilter(filterChangeField, 'entity-items-filter')\">Filter on: {{autocompleteFields.get('entity-items-filter').filter?.searchAttribute }}</ion-button>\n </ion-col>\n <ion-col>\n <mat-autocomplete-field formControlName=\"entity\" #filterChangeField\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-filter]'\"\n ></mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"min-width-large\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"true\"\n class=\"min-width-large\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-mobile-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Fullscreen\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class: 'mat-autocomplete-panel-full-size'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-mobile-full-size]'\"\n [debug]=\"true\"\n [showAllOnFocus]=\"true\"\n [showPanelOnFocus]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col>\n <ion-text><h4>Desktop mode</h4></ion-text>\n </ion-col>\n </ion-row>\n <ion-row>\n\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n items from suggest function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult&lt;any&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-suggest]'\">\n </mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n search with a suggestLengthThreshold\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>suggest: (value, filter) => LoadResult&lt;any&gt;\nsuggestLengthThreshold: '3'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n suggestLengthThreshold=\"3\"\n [logPrefix]=\"'[combo-desktop-suggestLengthThreshold]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an array\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: [], value: {{stringify(form.controls.entity.value)}}</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items')\"\n [logPrefix]=\"'[combo-desktop-array-1]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Items is an Observable\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [equals]=\"equals\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Multiple value\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>multiple: true</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entities\"\n [config]=\"autocompleteFields.get('entities-items-filter')\"\n [placeholder]=\"'Multiple'\"\n mobile=\"false\"\n multiple=\"true\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-multiple]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Control value if missing in items\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>items: Observable&lt;any[]&gt;</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-missing]'\"\n [mobile]=\"false\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size panel\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class: 'mat-autocomplete-panel-full-size'</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n [debug]=\"true\"\n [showAllOnFocus]=\"true\"\n [showPanelOnFocus]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disabled control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-disable]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly control\n </ion-label>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n <ion-row>\n <ion-col size=\"9\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Full size combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>class=\"mat-autocomplete-panel-full-size\"</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n class=\"mat-autocomplete-panel-full-size\"\n panelWidth=\"100vw\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"3\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Large combo\n </ion-label>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small>\n <pre>panelWidth: string</pre>\n </small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <mat-autocomplete-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-large')\"\n [mobile]=\"false\"\n panelWidth=\"400px\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col size=\"6\">\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Readonly toggle\n </ion-text>\n </ion-card-title>\n </ion-card-header>\n <ion-card-content>\n <ion-grid>\n <ion-row>\n <ion-col size=\"3\">\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n Readonly ?\n </mat-checkbox>\n </ion-col>\n <ion-col size=\"3\">\n <mat-checkbox #showIcons [checked]=\"false\">\n Icons ?\n </mat-checkbox>\n </ion-col>\n </ion-row>\n <ion-row>\n <ion-col>\n <mat-autocomplete-field #readonlyField formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"equals\"\n [logPrefix]=\"'[combo-desktop-readonly]'\"\n [readonly]=\"true\"\n [clearable]=\"!readonlyField.readonly\">\n <mat-icon matPrefix *ngIf=\"showIcons.checked\">keyboard_arrow_right</mat-icon>\n <mat-icon matSuffix *ngIf=\"showIcons.checked\">keyboard_arrow_left</mat-icon>\n </mat-autocomplete-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
25880
25951
  },] }
25881
25952
  ];
25882
25953
  AutocompleteTestPage.ctorParameters = () => [
@@ -25949,13 +26020,13 @@ LatLongTestPage.ctorParameters = () => [
25949
26020
  { type: FormBuilder }
25950
26021
  ];
25951
26022
 
25952
- const moment$5 = momentImported;
26023
+ const moment$2 = momentImported;
25953
26024
  class SwipeTestPage {
25954
26025
  constructor(formBuilder, dateFormatPipe) {
25955
26026
  this.formBuilder = formBuilder;
25956
26027
  this.dateFormatPipe = dateFormatPipe;
25957
26028
  this.$dates = new BehaviorSubject(undefined);
25958
- this._today = moment$5().startOf('day');
26029
+ this._today = moment$2().startOf('day');
25959
26030
  this.form = formBuilder.group({
25960
26031
  empty: [null, Validators.required],
25961
26032
  date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
@@ -25968,7 +26039,7 @@ class SwipeTestPage {
25968
26039
  ngOnInit() {
25969
26040
  const dates = [];
25970
26041
  for (let d = 0; d < 7; d++) {
25971
- dates[d] = moment$5(this._today).add(d - 3, 'day');
26042
+ dates[d] = moment$2(this._today).add(d - 3, 'day');
25972
26043
  }
25973
26044
  this.$dates.next(dates);
25974
26045
  this.loadData();
@@ -26009,7 +26080,7 @@ SwipeTestPage.ctorParameters = () => [
26009
26080
  { type: DateFormatPipe }
26010
26081
  ];
26011
26082
 
26012
- const moment$6 = momentImported;
26083
+ const moment$1 = momentImported;
26013
26084
  class DateTimeTestPage {
26014
26085
  constructor(platform, formBuilder, cd) {
26015
26086
  this.platform = platform;
@@ -26032,8 +26103,7 @@ class DateTimeTestPage {
26032
26103
  disableControl.disable();
26033
26104
  // Copy the 'enable' value, into the disable control
26034
26105
  this.form.get('enable').valueChanges.subscribe(value => disableControl.setValue(value));
26035
- const mobile = platform.is('mobile');
26036
- this.showLogPanel = this.showLogPanel || mobile;
26106
+ this.showLogPanel = this.showLogPanel || isMobile(window);
26037
26107
  }
26038
26108
  ngOnInit() {
26039
26109
  setTimeout(() => this.loadData(), 250);
@@ -26041,7 +26111,7 @@ class DateTimeTestPage {
26041
26111
  // Load the form with data
26042
26112
  loadData() {
26043
26113
  return __awaiter(this, void 0, void 0, function* () {
26044
- const now = moment$6();
26114
+ const now = moment$1();
26045
26115
  const data = {
26046
26116
  empty: toDateISOString(now.clone().add(2, 'hours')),
26047
26117
  enable: toDateISOString(now),
@@ -26102,9 +26172,9 @@ DateTimeTestPage.ctorParameters = () => [
26102
26172
  { type: ChangeDetectorRef }
26103
26173
  ];
26104
26174
 
26105
- class EntityTestClass$1 {
26175
+ class EntityTestClass {
26106
26176
  }
26107
- const FAKE_ENTITIES$1 = [
26177
+ const FAKE_ENTITIES = [
26108
26178
  { id: 1, label: 'AAA', name: 'Item A' },
26109
26179
  { id: 2, label: 'BBB', name: 'Item B' },
26110
26180
  { id: 3, label: 'CCC', name: 'Item C' },
@@ -26113,14 +26183,14 @@ const FAKE_ENTITIES$1 = [
26113
26183
  { id: 6, label: 'FFF', name: 'Item F' },
26114
26184
  { id: 7, label: 'GGG', name: 'Item G' }
26115
26185
  ];
26116
- function deepCopy$1(values, size) {
26186
+ function deepCopy(values, size) {
26117
26187
  if (isNil(size)) {
26118
- return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
26188
+ return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
26119
26189
  }
26120
26190
  let result = [];
26121
26191
  let i = 1;
26122
26192
  while (result.length < size) {
26123
- result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
26193
+ result = result.concat((values || FAKE_ENTITIES).map(entity => {
26124
26194
  const name = entity.name + ' #' + i;
26125
26195
  return Object.assign(Object.assign({}, entity), { id: i++, name });
26126
26196
  }));
@@ -26130,7 +26200,7 @@ function deepCopy$1(values, size) {
26130
26200
  class ChipsTestPage {
26131
26201
  constructor(formBuilder) {
26132
26202
  this.formBuilder = formBuilder;
26133
- this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
26203
+ this._items = deepCopy(FAKE_ENTITIES, 100);
26134
26204
  this._$items = new BehaviorSubject(undefined);
26135
26205
  this.autocompleteFields = new MatAutocompleteConfigHolder();
26136
26206
  this.form = formBuilder.group({
@@ -26169,7 +26239,7 @@ class ChipsTestPage {
26169
26239
  // Load the form with data
26170
26240
  loadData() {
26171
26241
  return __awaiter(this, void 0, void 0, function* () {
26172
- const items = deepCopy$1(FAKE_ENTITIES$1);
26242
+ const items = deepCopy(FAKE_ENTITIES);
26173
26243
  const data = {
26174
26244
  entity: items.slice(0, 1),
26175
26245
  entityInitial: items.slice(1, 2),
@@ -26285,10 +26355,9 @@ NumpadTestPage.ctorParameters = () => [
26285
26355
  { type: FormBuilder }
26286
26356
  ];
26287
26357
 
26288
- const moment$7 = momentImported;
26358
+ const moment = momentImported;
26289
26359
  class DateTestPage {
26290
- constructor(platform, formBuilder, cd) {
26291
- this.platform = platform;
26360
+ constructor(formBuilder, cd) {
26292
26361
  this.formBuilder = formBuilder;
26293
26362
  this.cd = cd;
26294
26363
  this.showLogPanel = true;
@@ -26310,8 +26379,7 @@ class DateTestPage {
26310
26379
  disableControl.disable();
26311
26380
  // Copy the 'enable' value, into the disable control
26312
26381
  this.form.get('enable').valueChanges.subscribe(value => disableControl.setValue(value));
26313
- const mobile = platform.is('mobile');
26314
- this.showLogPanel = this.showLogPanel || mobile;
26382
+ this.showLogPanel = this.showLogPanel || isMobile(window);
26315
26383
  }
26316
26384
  ngOnInit() {
26317
26385
  setTimeout(() => this.loadData(), 250);
@@ -26319,7 +26387,7 @@ class DateTestPage {
26319
26387
  // Load the form with data
26320
26388
  loadData() {
26321
26389
  return __awaiter(this, void 0, void 0, function* () {
26322
- const now = moment$7();
26390
+ const now = moment();
26323
26391
  const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
26324
26392
  const data = {
26325
26393
  empty: toDateISOString(now.clone().add(2, 'hours')),
@@ -26380,7 +26448,6 @@ DateTestPage.decorators = [
26380
26448
  },] }
26381
26449
  ];
26382
26450
  DateTestPage.ctorParameters = () => [
26383
- { type: Platform },
26384
26451
  { type: FormBuilder },
26385
26452
  { type: ChangeDetectorRef }
26386
26453
  ];
@@ -26397,7 +26464,7 @@ const SHARED_MATERIAL_TESTING_PAGES = [
26397
26464
  { label: 'Shared directives', divider: true },
26398
26465
  { label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
26399
26466
  ];
26400
- const routes$1 = [
26467
+ const routes$4 = [
26401
26468
  {
26402
26469
  path: '',
26403
26470
  pathMatch: 'full',
@@ -26454,7 +26521,7 @@ MaterialTestingModule.decorators = [
26454
26521
  ReactiveFormsModule,
26455
26522
  SharedMaterialModule,
26456
26523
  TranslateModule.forChild(),
26457
- RouterModule.forChild(routes$1)
26524
+ RouterModule.forChild(routes$4)
26458
26525
  ],
26459
26526
  declarations: [
26460
26527
  DateTimeTestPage,
@@ -26515,7 +26582,7 @@ ToastTestingPage.ctorParameters = () => [
26515
26582
  { type: TranslateService }
26516
26583
  ];
26517
26584
 
26518
- const routes$2 = [
26585
+ const routes$3 = [
26519
26586
  {
26520
26587
  path: 'toast',
26521
26588
  pathMatch: 'full',
@@ -26530,7 +26597,7 @@ ToastTestingModule.decorators = [
26530
26597
  CommonModule,
26531
26598
  IonicModule,
26532
26599
  TranslateModule.forChild(),
26533
- RouterModule.forChild(routes$2)
26600
+ RouterModule.forChild(routes$3)
26534
26601
  ],
26535
26602
  declarations: [
26536
26603
  ToastTestingPage
@@ -26593,7 +26660,7 @@ UploadFileTestingPage.ctorParameters = () => [
26593
26660
  { type: PopoverController }
26594
26661
  ];
26595
26662
 
26596
- const routes$3 = [
26663
+ const routes$2 = [
26597
26664
  {
26598
26665
  path: 'upload-file',
26599
26666
  pathMatch: 'full',
@@ -26608,7 +26675,7 @@ UploadFileTestingModule.decorators = [
26608
26675
  CommonModule,
26609
26676
  IonicModule,
26610
26677
  TranslateModule.forChild(),
26611
- RouterModule.forChild(routes$3)
26678
+ RouterModule.forChild(routes$2)
26612
26679
  ],
26613
26680
  declarations: [
26614
26681
  UploadFileTestingPage
@@ -26989,7 +27056,7 @@ TextPopoverTestingPage.ctorParameters = () => [
26989
27056
  { type: PopoverController }
26990
27057
  ];
26991
27058
 
26992
- const routes$4 = [
27059
+ const routes$1 = [
26993
27060
  {
26994
27061
  path: 'text-popover',
26995
27062
  pathMatch: 'full',
@@ -27004,7 +27071,7 @@ TextPopoverTestingModule.decorators = [
27004
27071
  CommonModule,
27005
27072
  IonicModule,
27006
27073
  TranslateModule.forChild(),
27007
- RouterModule.forChild(routes$4)
27074
+ RouterModule.forChild(routes$1)
27008
27075
  ],
27009
27076
  declarations: [
27010
27077
  TextPopoverTestingPage
@@ -27021,7 +27088,7 @@ const CORE_TESTING_PAGES = [
27021
27088
  { label: 'Table', page: '/testing/core/table' },
27022
27089
  { label: 'Text popover', page: '/testing/core/text-popover' }
27023
27090
  ];
27024
- const routes$5 = [
27091
+ const routes = [
27025
27092
  {
27026
27093
  path: '',
27027
27094
  pathMatch: 'full',
@@ -27045,7 +27112,7 @@ CoreTestingModule.decorators = [
27045
27112
  imports: [
27046
27113
  CommonModule,
27047
27114
  TranslateModule.forChild(),
27048
- RouterModule.forChild(routes$5),
27115
+ RouterModule.forChild(routes),
27049
27116
  // Sub modules
27050
27117
  TableTestingModule,
27051
27118
  TextPopoverTestingModule
@@ -27065,5 +27132,5 @@ CoreTestingModule.decorators = [
27065
27132
  * Generated bundle index. Do not edit.
27066
27133
  */
27067
27134
 
27068
- export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AndroidOsEnvironment, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes$2 as ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetGroupPipe, FormGetPipe, Fragments$1 as Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBadgeIconDirective, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedAsyncValidators, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBadgeIconModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrIncludesPipe, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TextForm, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isControlHasInput, isCordova, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isTouchUi, isWindows, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$1 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh, AppIconComponent as ɵi, DateTestPage as ɵj, NumpadTestPage as ɵk, MatBadgeIconTestPage as ɵl, ToastTestingModule as ɵm, ToastTestingPage as ɵn };
27135
+ export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AndroidOsEnvironment, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetGroupPipe, FormGetPipe, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBadgeIconDirective, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedAsyncValidators, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBadgeIconModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrIncludesPipe, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TextForm, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isControlHasInput, isCordova, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isTouchUi, isWindows, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$c as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh, AppIconComponent as ɵi, DateTestPage as ɵj, NumpadTestPage as ɵk, MatBadgeIconTestPage as ɵl, ToastTestingModule as ɵm, ToastTestingPage as ɵn };
27069
27136
  //# sourceMappingURL=sumaris-net.ngx-components.js.map