@sumaris-net/ngx-components 1.6.4 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +490 -447
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +9 -1
- package/esm2015/src/app/core/services/model/filter.model.js +1 -1
- package/esm2015/src/app/core/services/model/referential.model.js +1 -1
- package/esm2015/src/app/core/table/table.class.js +8 -8
- package/esm2015/src/app/shared/form/field.component.js +2 -2
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +53 -33
- package/esm2015/src/app/shared/material/autocomplete/testing/autocomplete.test.js +6 -6
- package/esm2015/src/app/shared/material/boolean/material.boolean.js +3 -4
- package/esm2015/src/app/shared/material/chips/material.chips.js +39 -34
- package/esm2015/src/app/shared/material/chips/testing/chips.test.js +43 -14
- package/esm2015/src/app/shared/material/datetime/material.date.js +41 -41
- package/esm2015/src/app/shared/material/datetime/material.dateshort.js +2 -2
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +32 -32
- package/esm2015/src/app/shared/material/duration/material.duration.js +2 -2
- package/fesm2015/sumaris-net.ngx-components.js +467 -430
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/filter.model.d.ts +1 -1
- package/src/app/core/services/model/referential.model.d.ts +3 -3
- package/src/app/core/table/table.class.d.ts +4 -4
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +4 -3
- package/src/app/shared/material/autocomplete/testing/autocomplete.test.d.ts +4 -5
- package/src/app/shared/material/boolean/material.boolean.d.ts +0 -1
- package/src/app/shared/material/chips/material.chips.d.ts +6 -5
- package/src/app/shared/material/datetime/material.date.d.ts +6 -6
- package/src/app/shared/material/datetime/material.datetime.d.ts +11 -11
- package/src/theme/_ngx-components.scss +3 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, HostBinding, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import * as i1$3 from '@angular/common';
|
|
1
|
+
import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, ɵɵdefineInjectable, ɵɵinject, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
|
|
4
2
|
import { CommonModule, DOCUMENT, Location } from '@angular/common';
|
|
5
3
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
6
4
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
7
5
|
import { OverlayModule, OverlayContainer, FullscreenOverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
8
6
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
|
-
import * as i1$2 from '@angular/material/core';
|
|
10
7
|
import { DateAdapter, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
11
8
|
import { MatTableModule, MatTable, MatColumnDef } from '@angular/material/table';
|
|
12
9
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
@@ -30,21 +27,16 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
30
27
|
import { MatRadioModule } from '@angular/material/radio';
|
|
31
28
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
32
29
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
33
|
-
import * as i2$1 from '@angular/material/dialog';
|
|
34
30
|
import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
35
31
|
import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
36
32
|
import { __awaiter, __decorate } from 'tslib';
|
|
37
|
-
import * as i1$6 from '@angular/forms';
|
|
38
33
|
import { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
|
|
39
|
-
import { timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, noop as noop$
|
|
34
|
+
import { timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, noop as noop$9, Observable, defer, of, from, combineLatest, EMPTY } from 'rxjs';
|
|
40
35
|
import { filter, first, map, takeUntil, switchMap, startWith, debounceTime, takeWhile, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
|
|
41
|
-
import * as i1$1 from '@ngx-translate/core';
|
|
42
36
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
|
-
import * as i1$4 from '@ionic/angular';
|
|
44
37
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent } from '@ionic/angular';
|
|
45
38
|
import * as momentImported from 'moment';
|
|
46
39
|
import { isMoment } from 'moment';
|
|
47
|
-
import * as i1 from '@angular/material-moment-adapter';
|
|
48
40
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
49
41
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
50
42
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
@@ -54,38 +46,32 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
54
46
|
import { MatDividerModule } from '@angular/material/divider';
|
|
55
47
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
56
48
|
import { MatChipsModule } from '@angular/material/chips';
|
|
57
|
-
import * as i3$3 from '@angular/router';
|
|
58
49
|
import { Router, RouterModule, RouteReuseStrategy, ActivatedRoute } from '@angular/router';
|
|
59
|
-
import * as i1$5 from '@angular/platform-browser';
|
|
60
50
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
61
|
-
import * as i2$2 from '@angular/common/http';
|
|
62
51
|
import { HttpResponse, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
63
52
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
64
|
-
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
65
|
-
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
53
|
+
import { NativeAudio as NativeAudio$1 } from '@ionic-native/native-audio/ngx';
|
|
54
|
+
import { Vibration as Vibration$1 } from '@ionic-native/vibration/ngx';
|
|
66
55
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
56
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx/index';
|
|
57
|
+
import { Vibration } from '@ionic-native/vibration/ngx/index';
|
|
58
|
+
import { AudioManagement as AudioManagement$1 } from '@ionic-native/audio-management/ngx/index';
|
|
70
59
|
import * as uuidv4Imported from 'uuid/v4';
|
|
71
60
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
72
61
|
import { MarkdownModule } from 'ngx-markdown';
|
|
73
62
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
74
|
-
import * as i3$1 from '@ionic/storage';
|
|
75
63
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
76
64
|
import 'zone.js/dist/zone-error';
|
|
77
|
-
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
|
78
|
-
import { Connection, Network } from '@ionic-native/network/ngx';
|
|
79
|
-
import { CacheService, CacheModule } from 'ionic-cache';
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
|
-
import * as i2$4 from '@angular/cdk/platform';
|
|
65
|
+
import { SplashScreen as SplashScreen$1 } from '@ionic-native/splash-screen/ngx';
|
|
66
|
+
import { Connection, Network as Network$1 } from '@ionic-native/network/ngx';
|
|
67
|
+
import { CacheService as CacheService$1, CacheModule } from 'ionic-cache';
|
|
68
|
+
import { CacheService } from 'ionic-cache/dist/cache.service';
|
|
69
|
+
import { Network } from '@ionic-native/network/ngx/index';
|
|
70
|
+
import { SplashScreen } from '@ionic-native/splash-screen/ngx/index';
|
|
71
|
+
import { StatusBar as StatusBar$1 } from '@ionic-native/status-bar/ngx';
|
|
85
72
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
86
|
-
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
73
|
+
import { InAppBrowser as InAppBrowser$1 } from '@ionic-native/in-app-browser/ngx';
|
|
87
74
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
88
|
-
import * as i2$3 from 'apollo-angular';
|
|
89
75
|
import { Apollo } from 'apollo-angular';
|
|
90
76
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
91
77
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -93,14 +79,13 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
93
79
|
import QueueLink from 'apollo-link-queue';
|
|
94
80
|
import SerializingLink from 'apollo-link-serialize';
|
|
95
81
|
import loggerLink from 'apollo-link-logger';
|
|
96
|
-
import * as i3$2 from 'apollo-angular/http';
|
|
97
82
|
import { HttpLink } from 'apollo-angular/http';
|
|
98
83
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
99
|
-
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
100
|
-
import
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
84
|
+
import { NotificationVisibility, Downloader as Downloader$1 } from '@ionic-native/downloader/ngx';
|
|
85
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx/index';
|
|
86
|
+
import { Keyboard as Keyboard$1 } from '@ionic-native/keyboard/ngx/index';
|
|
87
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx/index';
|
|
88
|
+
import { Downloader } from '@ionic-native/downloader/ngx/index';
|
|
104
89
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
105
90
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
106
91
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -976,10 +961,11 @@ class MatAutocompleteConfigHolder {
|
|
|
976
961
|
const attributesOrFn = attributes.map((a, index) => typeof a === 'function' && options.attributes[index] || a);
|
|
977
962
|
const filter = Object.assign({ searchAttribute: attributes.length === 1 ? attributes[0] : undefined, searchAttributes: attributes.length > 1 ? attributes : undefined }, options.filter);
|
|
978
963
|
const displayWith = options.displayWith || ((obj) => obj && joinPropertiesPath(obj, attributes));
|
|
979
|
-
const
|
|
964
|
+
const equals = options.equals || ((o1, o2) => o1 && o2 && o1.id === o2.id);
|
|
980
965
|
const config = Object.assign(Object.assign({}, options), { attributes: attributesOrFn, suggestFn,
|
|
981
966
|
filter,
|
|
982
|
-
displayWith,
|
|
967
|
+
displayWith,
|
|
968
|
+
equals });
|
|
983
969
|
this.fields[fieldName] = config;
|
|
984
970
|
return config;
|
|
985
971
|
}
|
|
@@ -990,14 +976,14 @@ class MatAutocompleteConfigHolder {
|
|
|
990
976
|
return this.fields[fieldName] || this.add(fieldName);
|
|
991
977
|
}
|
|
992
978
|
}
|
|
993
|
-
const noop
|
|
994
|
-
const ɵ0
|
|
979
|
+
const noop = (_) => { };
|
|
980
|
+
const ɵ0 = noop;
|
|
995
981
|
class MatAutocompleteField {
|
|
996
982
|
constructor(cd, formGroupDir) {
|
|
997
983
|
this.cd = cd;
|
|
998
984
|
this.formGroupDir = formGroupDir;
|
|
999
|
-
this._onChangeCallback = noop
|
|
1000
|
-
this._onTouchedCallback = noop
|
|
985
|
+
this._onChangeCallback = noop;
|
|
986
|
+
this._onTouchedCallback = noop;
|
|
1001
987
|
this.logPrefix = '[mat-autocomplete] ';
|
|
1002
988
|
this.formControlName = null;
|
|
1003
989
|
this.required = false;
|
|
@@ -1010,13 +996,13 @@ class MatAutocompleteField {
|
|
|
1010
996
|
this.fetchMoreThreshold = '15%';
|
|
1011
997
|
this.suggestLengthThreshold = null;
|
|
1012
998
|
this.showLoadingSpinner = true;
|
|
999
|
+
this.debug = false;
|
|
1013
1000
|
this.clicked = new EventEmitter();
|
|
1014
1001
|
this.blurred = new EventEmitter();
|
|
1015
1002
|
this.focused = new EventEmitter();
|
|
1016
1003
|
this.dropButtonClick = new EventEmitter(true);
|
|
1017
1004
|
this.keydownEscape = new EventEmitter();
|
|
1018
1005
|
this.keyupEnter = new EventEmitter();
|
|
1019
|
-
this.animationsDisabled = true;
|
|
1020
1006
|
this._readonly = false;
|
|
1021
1007
|
this.$inputItems = new BehaviorSubject(undefined);
|
|
1022
1008
|
this.$filteredItems = new BehaviorSubject(undefined);
|
|
@@ -1087,6 +1073,9 @@ class MatAutocompleteField {
|
|
|
1087
1073
|
get enabled() {
|
|
1088
1074
|
return !this._readonly && this.formControl.enabled;
|
|
1089
1075
|
}
|
|
1076
|
+
get loading() {
|
|
1077
|
+
return isNil(this.$filteredItems.value);
|
|
1078
|
+
}
|
|
1090
1079
|
ngOnInit() {
|
|
1091
1080
|
var _a, _b;
|
|
1092
1081
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
@@ -1107,7 +1096,7 @@ class MatAutocompleteField {
|
|
|
1107
1096
|
this.mobile = toBoolean(this.mobile, this.config.mobile);
|
|
1108
1097
|
this.suggestLengthThreshold = toNumber(this.suggestLengthThreshold, this.config.suggestLengthThreshold || 0);
|
|
1109
1098
|
this.showAllOnFocus = toBoolean(this.showAllOnFocus, toBoolean(this.config.showAllOnFocus, this.suggestLengthThreshold <= 0));
|
|
1110
|
-
this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, toBoolean(this.config.showPanelOnFocus));
|
|
1099
|
+
this.showPanelOnFocus = toBoolean(this.showPanelOnFocus, toBoolean(this.config.showPanelOnFocus, true));
|
|
1111
1100
|
this.classList = this.classList || this.config.class;
|
|
1112
1101
|
this.debounceTime = toNumber(this.debounceTime, this.config.debounceTime);
|
|
1113
1102
|
this.highlightAccent = toBoolean(this.highlightAccent, toBoolean(this.config.highlightAccent));
|
|
@@ -1185,15 +1174,15 @@ class MatAutocompleteField {
|
|
|
1185
1174
|
// Filter if not enough character
|
|
1186
1175
|
filter(value => value.length >= this.suggestLengthThreshold),
|
|
1187
1176
|
// Wait a debounce time
|
|
1188
|
-
debounceTime(this.debounceTime)
|
|
1177
|
+
debounceTime(this.debounceTime),
|
|
1189
1178
|
// DEBUG
|
|
1190
|
-
|
|
1191
|
-
),
|
|
1179
|
+
tap((value) => console.debug(this.logPrefix + ' Search text changes:', value))),
|
|
1192
1180
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
1193
1181
|
this.formControl.valueChanges
|
|
1194
1182
|
.pipe(startWith(this.formControl.value), filter(value => (this.searchable && isNotNil(value) && typeof value === 'object')), tap(value => {
|
|
1195
1183
|
// DEBUG
|
|
1196
|
-
|
|
1184
|
+
if (this.debug)
|
|
1185
|
+
console.debug(this.logPrefix + ' object changes:', value);
|
|
1197
1186
|
// Update the display value (if need)
|
|
1198
1187
|
const displayValue = this.displayWith(value) || '';
|
|
1199
1188
|
if (this.displayValue !== displayValue) {
|
|
@@ -1203,10 +1192,9 @@ class MatAutocompleteField {
|
|
|
1203
1192
|
this.matInputText.nativeElement.value = this.displayValue;
|
|
1204
1193
|
}
|
|
1205
1194
|
}
|
|
1206
|
-
})
|
|
1195
|
+
}),
|
|
1207
1196
|
// DEBUG
|
|
1208
|
-
|
|
1209
|
-
),
|
|
1197
|
+
tap(value => this.debug && console.debug(this.logPrefix + ' Received an object value: ', value))),
|
|
1210
1198
|
// On dropdown button click (no distinctUntilChanged(), nor debounceTime)
|
|
1211
1199
|
this.dropButtonClick
|
|
1212
1200
|
.pipe(filter(event => this.searchable && this.enabled && (!event || !event.defaultPrevented)), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
|
|
@@ -1216,20 +1204,23 @@ class MatAutocompleteField {
|
|
|
1216
1204
|
merge(
|
|
1217
1205
|
// Focus or click => Load all
|
|
1218
1206
|
merge(this.focused, this.clicked)
|
|
1219
|
-
.pipe(filter(_ => this.enabled && this.searchable), map(_ => this.showAllOnFocus ? '*' : this.formControl.value)
|
|
1220
|
-
|
|
1207
|
+
.pipe(filter(_ => this.enabled && this.searchable), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
|
|
1208
|
+
// DEBUG
|
|
1209
|
+
tap(value => this.debug && console.debug(this.logPrefix + ' Received focused or clicked event: ', value))), merge(this.$inputItems, this._$filter)
|
|
1210
|
+
.pipe(filter(_ => this.searchable && this.enabled), map(_ => this.formControl.value),
|
|
1211
|
+
// DEBUG
|
|
1212
|
+
tap(value => this.debug && console.debug(this.logPrefix + ' Received $inputItems or filter event: ', value))))
|
|
1221
1213
|
.pipe(
|
|
1222
|
-
// Make enough characters
|
|
1214
|
+
// Make sure there is enough characters
|
|
1223
1215
|
filter(thresholdFilterFn),
|
|
1224
1216
|
// Distinguish changes
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
tap(value => console.debug(this.logPrefix + ' Received update event: ', value))))
|
|
1217
|
+
// - do NOT filter if loading, to force update after a blur event
|
|
1218
|
+
distinctUntilChanged((v1, v2) => !this.loading && (v1 === v2 || this.equals(v1, v2)))))
|
|
1228
1219
|
.pipe(
|
|
1229
1220
|
// Suggest values
|
|
1230
1221
|
mergeMap(value => this.suggest(value, this.filter)),
|
|
1231
1222
|
// DEBUG
|
|
1232
|
-
|
|
1223
|
+
tap(items => this.debug && console.debug(this.logPrefix + ' Received from suggest: ', items)),
|
|
1233
1224
|
// Store implicit value (will use it onBlur if not other value selected)
|
|
1234
1225
|
tap(items => this.updateImplicitValue(items)));
|
|
1235
1226
|
// Fetch more events
|
|
@@ -1262,7 +1253,9 @@ class MatAutocompleteField {
|
|
|
1262
1253
|
this._subscription.add(this.blurred
|
|
1263
1254
|
.pipe(
|
|
1264
1255
|
// Skip if not searchable
|
|
1265
|
-
filter(_ => this.searchable), map(_ => this.formControl.value)
|
|
1256
|
+
filter(_ => this.searchable), map(_ => this.formControl.value),
|
|
1257
|
+
// DEBUG
|
|
1258
|
+
tap(value => console.debug(this.logPrefix + ' Received blurred event: ', value)))
|
|
1266
1259
|
.subscribe(value => {
|
|
1267
1260
|
// When leave component without object, use implicit value if :
|
|
1268
1261
|
// - an explicit value
|
|
@@ -1348,7 +1341,7 @@ class MatAutocompleteField {
|
|
|
1348
1341
|
}
|
|
1349
1342
|
writeValue(value) {
|
|
1350
1343
|
// DEBUG
|
|
1351
|
-
// console.debug(this.logPrefix +
|
|
1344
|
+
// console.debug(this.logPrefix + ' Writing value: ', value);
|
|
1352
1345
|
if (value !== this.formControl.value) {
|
|
1353
1346
|
this.formControl.patchValue(value, { emitEvent: false });
|
|
1354
1347
|
this._onChangeCallback(value);
|
|
@@ -1385,15 +1378,20 @@ class MatAutocompleteField {
|
|
|
1385
1378
|
if (event.stopPropagation)
|
|
1386
1379
|
event.stopPropagation();
|
|
1387
1380
|
event.returnValue = false;
|
|
1388
|
-
//DEBUG
|
|
1381
|
+
// DEBUG
|
|
1382
|
+
if (this.debug)
|
|
1383
|
+
console.debug(this.logPrefix + ' Cancelling focus event');
|
|
1389
1384
|
return false;
|
|
1390
1385
|
}
|
|
1391
|
-
|
|
1386
|
+
if (this.debug)
|
|
1387
|
+
console.debug(this.logPrefix + ' Select input content');
|
|
1388
|
+
const hasContent = true; // selectInputContent(event);
|
|
1392
1389
|
// If combo is empty, or if has content but should force to show panel on focus
|
|
1393
|
-
if (!hasContent ||
|
|
1390
|
+
if (!hasContent || this.showPanelOnFocus || this.showAllOnFocus) {
|
|
1394
1391
|
// DEBUG
|
|
1395
|
-
|
|
1396
|
-
|
|
1392
|
+
if (this.debug)
|
|
1393
|
+
console.debug(this.logPrefix + ' Emit focus event');
|
|
1394
|
+
this.focused.emit();
|
|
1397
1395
|
return true;
|
|
1398
1396
|
}
|
|
1399
1397
|
return false;
|
|
@@ -1407,11 +1405,14 @@ class MatAutocompleteField {
|
|
|
1407
1405
|
if (event.stopPropagation)
|
|
1408
1406
|
event.stopPropagation();
|
|
1409
1407
|
event.returnValue = false;
|
|
1410
|
-
//DEBUG
|
|
1408
|
+
// DEBUG
|
|
1409
|
+
if (this.debug)
|
|
1410
|
+
console.debug(this.logPrefix + " Cancelling blur event");
|
|
1411
1411
|
return false;
|
|
1412
1412
|
}
|
|
1413
1413
|
//DEBUG
|
|
1414
|
-
|
|
1414
|
+
if (this.debug)
|
|
1415
|
+
console.debug(this.logPrefix + ' Blur: move caret to the beginning');
|
|
1415
1416
|
// Move caret to the beginning (fix issue IMAGINE-469)
|
|
1416
1417
|
selectInputRange(event.target, 0, 0);
|
|
1417
1418
|
this.blurred.emit(event);
|
|
@@ -1522,6 +1523,7 @@ class MatAutocompleteField {
|
|
|
1522
1523
|
/* -- private method -- */
|
|
1523
1524
|
suggest(value, filter) {
|
|
1524
1525
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1526
|
+
// Call suggestion function
|
|
1525
1527
|
let res = yield this.suggestFn(value, filter);
|
|
1526
1528
|
// DEBUG
|
|
1527
1529
|
//console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
@@ -1542,6 +1544,9 @@ class MatAutocompleteField {
|
|
|
1542
1544
|
this._moreItemsCount = fetchMore && (this._itemCount - data.length) || 0;
|
|
1543
1545
|
res = data;
|
|
1544
1546
|
}
|
|
1547
|
+
// DEBUG
|
|
1548
|
+
if (this.debug)
|
|
1549
|
+
console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
1545
1550
|
return res;
|
|
1546
1551
|
});
|
|
1547
1552
|
}
|
|
@@ -1613,7 +1618,7 @@ MatAutocompleteField.decorators = [
|
|
|
1613
1618
|
{ type: Component, args: [{
|
|
1614
1619
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1615
1620
|
selector: 'mat-autocomplete-field',
|
|
1616
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\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
|
|
1621
|
+
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; last as isLast\" [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 </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)=\"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; 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><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 </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",
|
|
1617
1622
|
providers: [{
|
|
1618
1623
|
provide: NG_VALUE_ACCESSOR,
|
|
1619
1624
|
multi: true,
|
|
@@ -1658,6 +1663,7 @@ MatAutocompleteField.propDecorators = {
|
|
|
1658
1663
|
fetchMoreThreshold: [{ type: Input }],
|
|
1659
1664
|
suggestLengthThreshold: [{ type: Input }],
|
|
1660
1665
|
showLoadingSpinner: [{ type: Input }],
|
|
1666
|
+
debug: [{ type: Input }],
|
|
1661
1667
|
clicked: [{ type: Output, args: ['click',] }],
|
|
1662
1668
|
blurred: [{ type: Output, args: ['blur',] }],
|
|
1663
1669
|
focused: [{ type: Output, args: ['focus',] }],
|
|
@@ -1668,7 +1674,6 @@ MatAutocompleteField.propDecorators = {
|
|
|
1668
1674
|
matInputText: [{ type: ViewChild, args: ['matInputText',] }],
|
|
1669
1675
|
autocomplete: [{ type: ViewChild, args: [MatAutocomplete,] }],
|
|
1670
1676
|
autocompleteTrigger: [{ type: ViewChild, args: [MatAutocompleteTrigger,] }],
|
|
1671
|
-
animationsDisabled: [{ type: HostBinding, args: ['@.disabled',] }],
|
|
1672
1677
|
filter: [{ type: Input }],
|
|
1673
1678
|
readonly: [{ type: Input }],
|
|
1674
1679
|
tabindex: [{ type: Input }],
|
|
@@ -1695,7 +1700,7 @@ class DateFormatPipe {
|
|
|
1695
1700
|
return this.dateAdapter.format(date, displayFormat);
|
|
1696
1701
|
}
|
|
1697
1702
|
}
|
|
1698
|
-
DateFormatPipe.ɵprov =
|
|
1703
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1699
1704
|
DateFormatPipe.decorators = [
|
|
1700
1705
|
{ type: Pipe, args: [{
|
|
1701
1706
|
name: 'dateFormat'
|
|
@@ -1707,7 +1712,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1707
1712
|
{ type: TranslateService }
|
|
1708
1713
|
];
|
|
1709
1714
|
|
|
1710
|
-
const moment
|
|
1715
|
+
const moment = momentImported;
|
|
1711
1716
|
class DateDiffDurationPipe {
|
|
1712
1717
|
constructor(dateAdapter, translate) {
|
|
1713
1718
|
this.dateAdapter = dateAdapter;
|
|
@@ -1723,17 +1728,17 @@ class DateDiffDurationPipe {
|
|
|
1723
1728
|
return this.format(startDate, endDate);
|
|
1724
1729
|
}
|
|
1725
1730
|
format(startDate, endDate) {
|
|
1726
|
-
const duration = moment
|
|
1731
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1727
1732
|
if (duration.asMinutes() < 0)
|
|
1728
1733
|
return '';
|
|
1729
|
-
const timeDuration = moment
|
|
1734
|
+
const timeDuration = moment(0)
|
|
1730
1735
|
.hour(duration.hours())
|
|
1731
1736
|
.minute(duration.minutes());
|
|
1732
1737
|
const days = Math.floor(duration.asDays());
|
|
1733
1738
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1734
1739
|
}
|
|
1735
1740
|
}
|
|
1736
|
-
DateDiffDurationPipe.ɵprov =
|
|
1741
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1737
1742
|
DateDiffDurationPipe.decorators = [
|
|
1738
1743
|
{ type: Pipe, args: [{
|
|
1739
1744
|
name: 'dateDiffDuration'
|
|
@@ -1754,7 +1759,7 @@ class DateFromNowPipe {
|
|
|
1754
1759
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1755
1760
|
}
|
|
1756
1761
|
}
|
|
1757
|
-
DateFromNowPipe.ɵprov =
|
|
1762
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1758
1763
|
DateFromNowPipe.decorators = [
|
|
1759
1764
|
{ type: Pipe, args: [{
|
|
1760
1765
|
name: 'dateFromNow'
|
|
@@ -1823,7 +1828,7 @@ function formatToDD(value, opts) {
|
|
|
1823
1828
|
value *= -1;
|
|
1824
1829
|
}
|
|
1825
1830
|
}
|
|
1826
|
-
let degrees = roundFloat
|
|
1831
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1827
1832
|
// Add sign
|
|
1828
1833
|
let sign = negative ? '-' : '+';
|
|
1829
1834
|
if (opts.placeholderChar) {
|
|
@@ -1874,7 +1879,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1874
1879
|
}
|
|
1875
1880
|
let degrees = Math.trunc(value);
|
|
1876
1881
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1877
|
-
let seconds = roundFloat
|
|
1882
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1878
1883
|
while (seconds >= 60) {
|
|
1879
1884
|
seconds -= 60;
|
|
1880
1885
|
minutes += 1;
|
|
@@ -1942,7 +1947,7 @@ function formatToDDMM(value, opts) {
|
|
|
1942
1947
|
}
|
|
1943
1948
|
}
|
|
1944
1949
|
let degrees = Math.trunc(value);
|
|
1945
|
-
let minutes = roundFloat
|
|
1950
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1946
1951
|
while (minutes >= 60) {
|
|
1947
1952
|
minutes -= 60;
|
|
1948
1953
|
degrees += 1;
|
|
@@ -1993,15 +1998,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
1993
1998
|
return NaN;
|
|
1994
1999
|
}
|
|
1995
2000
|
if (pattern === 'DD')
|
|
1996
|
-
return roundFloat
|
|
2001
|
+
return roundFloat(degrees, maxDecimals);
|
|
1997
2002
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
1998
2003
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
1999
2004
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2000
2005
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2001
2006
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2002
|
-
return roundFloat
|
|
2007
|
+
return roundFloat(degrees, maxDecimals);
|
|
2003
2008
|
}
|
|
2004
|
-
function roundFloat
|
|
2009
|
+
function roundFloat(input, maxDecimals) {
|
|
2005
2010
|
if (maxDecimals > 0) {
|
|
2006
2011
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
2007
2012
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2021,7 +2026,7 @@ class LatLongFormatPipe {
|
|
|
2021
2026
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
2022
2027
|
}
|
|
2023
2028
|
}
|
|
2024
|
-
LatLongFormatPipe.ɵprov =
|
|
2029
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2025
2030
|
LatLongFormatPipe.decorators = [
|
|
2026
2031
|
{ type: Pipe, args: [{
|
|
2027
2032
|
name: 'latLongFormat'
|
|
@@ -2033,7 +2038,7 @@ class LatitudeFormatPipe {
|
|
|
2033
2038
|
this.transform = formatLatitude;
|
|
2034
2039
|
}
|
|
2035
2040
|
}
|
|
2036
|
-
LatitudeFormatPipe.ɵprov =
|
|
2041
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2037
2042
|
LatitudeFormatPipe.decorators = [
|
|
2038
2043
|
{ type: Pipe, args: [{
|
|
2039
2044
|
name: 'latitudeFormat'
|
|
@@ -2045,7 +2050,7 @@ class LongitudeFormatPipe {
|
|
|
2045
2050
|
this.transform = formatLongitude;
|
|
2046
2051
|
}
|
|
2047
2052
|
}
|
|
2048
|
-
LongitudeFormatPipe.ɵprov =
|
|
2053
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2049
2054
|
LongitudeFormatPipe.decorators = [
|
|
2050
2055
|
{ type: Pipe, args: [{
|
|
2051
2056
|
name: 'longitudeFormat'
|
|
@@ -2065,7 +2070,7 @@ class NumberFormatPipe {
|
|
|
2065
2070
|
}
|
|
2066
2071
|
}
|
|
2067
2072
|
}
|
|
2068
|
-
NumberFormatPipe.ɵprov =
|
|
2073
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2069
2074
|
NumberFormatPipe.decorators = [
|
|
2070
2075
|
{ type: Pipe, args: [{
|
|
2071
2076
|
name: 'numberFormat'
|
|
@@ -2105,7 +2110,7 @@ class HighlightPipe {
|
|
|
2105
2110
|
}
|
|
2106
2111
|
}
|
|
2107
2112
|
}
|
|
2108
|
-
HighlightPipe.ɵprov =
|
|
2113
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2109
2114
|
HighlightPipe.decorators = [
|
|
2110
2115
|
{ type: Pipe, args: [{
|
|
2111
2116
|
name: 'highlight'
|
|
@@ -2170,7 +2175,7 @@ FileSizePipe.decorators = [
|
|
|
2170
2175
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2171
2176
|
];
|
|
2172
2177
|
|
|
2173
|
-
const moment$
|
|
2178
|
+
const moment$1 = momentImported;
|
|
2174
2179
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2175
2180
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2176
2181
|
class DateUtils {
|
|
@@ -2212,32 +2217,32 @@ function fromDateISOString(value) {
|
|
|
2212
2217
|
if (!value || isMoment(value))
|
|
2213
2218
|
return value;
|
|
2214
2219
|
// Parse the input value, as a ISO date time
|
|
2215
|
-
const date = moment$
|
|
2220
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2216
2221
|
if (date.isValid())
|
|
2217
2222
|
return date;
|
|
2218
2223
|
// Not valid: trying to convert from unix timestamp
|
|
2219
2224
|
if (typeof value === 'string') {
|
|
2220
2225
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2221
2226
|
if (value.length === 10) {
|
|
2222
|
-
return moment$
|
|
2227
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2223
2228
|
}
|
|
2224
2229
|
else if (value.length === 13) {
|
|
2225
|
-
return moment$
|
|
2230
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2226
2231
|
}
|
|
2227
2232
|
}
|
|
2228
2233
|
console.warn('Unable to parse date: ' + value);
|
|
2229
2234
|
return undefined;
|
|
2230
2235
|
}
|
|
2231
2236
|
function fromUnixTimestamp(timeInSec) {
|
|
2232
|
-
return moment$
|
|
2237
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2233
2238
|
}
|
|
2234
2239
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2235
|
-
return moment$
|
|
2240
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2236
2241
|
}
|
|
2237
2242
|
function toDuration(value, unit) {
|
|
2238
2243
|
if (!value)
|
|
2239
2244
|
return undefined;
|
|
2240
|
-
const duration = moment$
|
|
2245
|
+
const duration = moment$1.duration(value, unit);
|
|
2241
2246
|
// fix 990+ ms
|
|
2242
2247
|
if (duration.milliseconds() >= 990) {
|
|
2243
2248
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2266,7 +2271,7 @@ class DurationPipe {
|
|
|
2266
2271
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2267
2272
|
}
|
|
2268
2273
|
}
|
|
2269
|
-
DurationPipe.ɵprov =
|
|
2274
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2270
2275
|
DurationPipe.decorators = [
|
|
2271
2276
|
{ type: Pipe, args: [{
|
|
2272
2277
|
name: 'duration'
|
|
@@ -2287,7 +2292,7 @@ class MathAbsPipe {
|
|
|
2287
2292
|
}
|
|
2288
2293
|
}
|
|
2289
2294
|
}
|
|
2290
|
-
MathAbsPipe.ɵprov =
|
|
2295
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2291
2296
|
MathAbsPipe.decorators = [
|
|
2292
2297
|
{ type: Pipe, args: [{
|
|
2293
2298
|
name: 'mathAbs'
|
|
@@ -2299,7 +2304,7 @@ class EvenPipe {
|
|
|
2299
2304
|
return val % 2 === 0;
|
|
2300
2305
|
}
|
|
2301
2306
|
}
|
|
2302
|
-
EvenPipe.ɵprov =
|
|
2307
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2303
2308
|
EvenPipe.decorators = [
|
|
2304
2309
|
{ type: Pipe, args: [{
|
|
2305
2310
|
name: 'even'
|
|
@@ -2311,7 +2316,7 @@ class OddPipe {
|
|
|
2311
2316
|
return val % 2 !== 0;
|
|
2312
2317
|
}
|
|
2313
2318
|
}
|
|
2314
|
-
OddPipe.ɵprov =
|
|
2319
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2315
2320
|
OddPipe.decorators = [
|
|
2316
2321
|
{ type: Pipe, args: [{
|
|
2317
2322
|
name: 'odd'
|
|
@@ -2419,7 +2424,7 @@ class MapGetPipe {
|
|
|
2419
2424
|
return val[key];
|
|
2420
2425
|
}
|
|
2421
2426
|
}
|
|
2422
|
-
MapGetPipe.ɵprov =
|
|
2427
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2423
2428
|
MapGetPipe.decorators = [
|
|
2424
2429
|
{ type: Pipe, args: [{
|
|
2425
2430
|
name: 'mapGet'
|
|
@@ -2433,7 +2438,7 @@ class MapKeysPipe {
|
|
|
2433
2438
|
return Object.keys(map);
|
|
2434
2439
|
}
|
|
2435
2440
|
}
|
|
2436
|
-
MapKeysPipe.ɵprov =
|
|
2441
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2437
2442
|
MapKeysPipe.decorators = [
|
|
2438
2443
|
{ type: Pipe, args: [{
|
|
2439
2444
|
name: 'mapKeys'
|
|
@@ -2447,7 +2452,7 @@ class MapValuesPipe {
|
|
|
2447
2452
|
return Object.values(map);
|
|
2448
2453
|
}
|
|
2449
2454
|
}
|
|
2450
|
-
MapValuesPipe.ɵprov =
|
|
2455
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2451
2456
|
MapValuesPipe.decorators = [
|
|
2452
2457
|
{ type: Pipe, args: [{
|
|
2453
2458
|
name: 'mapValues'
|
|
@@ -2460,7 +2465,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2460
2465
|
return isNotNilOrBlank(value);
|
|
2461
2466
|
}
|
|
2462
2467
|
}
|
|
2463
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2468
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2464
2469
|
IsNotNilOrBlankPipe.decorators = [
|
|
2465
2470
|
{ type: Pipe, args: [{
|
|
2466
2471
|
name: 'isNotNilOrBlank'
|
|
@@ -2472,7 +2477,7 @@ class IsNilOrBlankPipe {
|
|
|
2472
2477
|
return isNilOrBlank(value);
|
|
2473
2478
|
}
|
|
2474
2479
|
}
|
|
2475
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2480
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2476
2481
|
IsNilOrBlankPipe.decorators = [
|
|
2477
2482
|
{ type: Pipe, args: [{
|
|
2478
2483
|
name: 'isNilOrBlank'
|
|
@@ -2484,7 +2489,7 @@ class ToStringPipe {
|
|
|
2484
2489
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2485
2490
|
}
|
|
2486
2491
|
}
|
|
2487
|
-
ToStringPipe.ɵprov =
|
|
2492
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2488
2493
|
ToStringPipe.decorators = [
|
|
2489
2494
|
{ type: Pipe, args: [{
|
|
2490
2495
|
name: 'toString'
|
|
@@ -2496,7 +2501,7 @@ class StrLengthPipe {
|
|
|
2496
2501
|
return value && value.length || 0;
|
|
2497
2502
|
}
|
|
2498
2503
|
}
|
|
2499
|
-
StrLengthPipe.ɵprov =
|
|
2504
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2500
2505
|
StrLengthPipe.decorators = [
|
|
2501
2506
|
{ type: Pipe, args: [{
|
|
2502
2507
|
name: 'strLength'
|
|
@@ -2573,7 +2578,7 @@ class TranslateContextService {
|
|
|
2573
2578
|
return translations[keys[keys.length - 1]]; // Return the last keys translation
|
|
2574
2579
|
}
|
|
2575
2580
|
}
|
|
2576
|
-
TranslateContextService.ɵprov =
|
|
2581
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2577
2582
|
TranslateContextService.decorators = [
|
|
2578
2583
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2579
2584
|
];
|
|
@@ -2625,7 +2630,7 @@ class PropertyGetPipe {
|
|
|
2625
2630
|
args && args.defaultValue);
|
|
2626
2631
|
}
|
|
2627
2632
|
}
|
|
2628
|
-
PropertyGetPipe.ɵprov =
|
|
2633
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2629
2634
|
PropertyGetPipe.decorators = [
|
|
2630
2635
|
{ type: Pipe, args: [{
|
|
2631
2636
|
name: 'propertyGet'
|
|
@@ -2650,7 +2655,7 @@ NgInitDirective.propDecorators = {
|
|
|
2650
2655
|
ngInit: [{ type: Output }]
|
|
2651
2656
|
};
|
|
2652
2657
|
|
|
2653
|
-
const moment$
|
|
2658
|
+
const moment$2 = momentImported;
|
|
2654
2659
|
// @dynamic
|
|
2655
2660
|
class SharedValidators {
|
|
2656
2661
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2667,7 +2672,7 @@ class SharedValidators {
|
|
|
2667
2672
|
}
|
|
2668
2673
|
static validDate(control) {
|
|
2669
2674
|
const value = control.value;
|
|
2670
|
-
const date = !value || moment$
|
|
2675
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
|
|
2671
2676
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2672
2677
|
return { validDate: true };
|
|
2673
2678
|
}
|
|
@@ -3741,7 +3746,7 @@ class FormErrorTranslator {
|
|
|
3741
3746
|
return errorKey;
|
|
3742
3747
|
}
|
|
3743
3748
|
}
|
|
3744
|
-
FormErrorTranslator.ɵprov =
|
|
3749
|
+
FormErrorTranslator.ɵprov = ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(ɵɵinject(TranslateService), ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
3745
3750
|
FormErrorTranslator.decorators = [
|
|
3746
3751
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3747
3752
|
];
|
|
@@ -4060,9 +4065,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4060
4065
|
const hour = parseInt(durationParts[0] || '0');
|
|
4061
4066
|
const minute = parseInt(durationParts[1] || '0');
|
|
4062
4067
|
const value = hour + (minute + 0.5) / 60;
|
|
4063
|
-
return roundFloat(value, maxDecimals);
|
|
4068
|
+
return roundFloat$1(value, maxDecimals);
|
|
4064
4069
|
}
|
|
4065
|
-
function roundFloat(input, maxDecimals) {
|
|
4070
|
+
function roundFloat$1(input, maxDecimals) {
|
|
4066
4071
|
if (maxDecimals > 0) {
|
|
4067
4072
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4068
4073
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4086,9 +4091,9 @@ const MASKS = {
|
|
|
4086
4091
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4087
4092
|
}
|
|
4088
4093
|
};
|
|
4089
|
-
const noop$
|
|
4094
|
+
const noop$1 = () => {
|
|
4090
4095
|
};
|
|
4091
|
-
const ɵ0$
|
|
4096
|
+
const ɵ0$1 = noop$1;
|
|
4092
4097
|
class MatLatLongField {
|
|
4093
4098
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
4094
4099
|
this.platform = platform;
|
|
@@ -4096,8 +4101,8 @@ class MatLatLongField {
|
|
|
4096
4101
|
this.formBuilder = formBuilder;
|
|
4097
4102
|
this.cd = cd;
|
|
4098
4103
|
this.formGroupDir = formGroupDir;
|
|
4099
|
-
this._onChangeCallback = noop$
|
|
4100
|
-
this._onTouchedCallback = noop$
|
|
4104
|
+
this._onChangeCallback = noop$1;
|
|
4105
|
+
this._onTouchedCallback = noop$1;
|
|
4101
4106
|
this._subscription = new Subscription();
|
|
4102
4107
|
this.disabling = false;
|
|
4103
4108
|
this.writing = false;
|
|
@@ -4433,14 +4438,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4433
4438
|
},] }
|
|
4434
4439
|
];
|
|
4435
4440
|
|
|
4436
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
4441
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
4437
4442
|
provide: NG_VALUE_ACCESSOR,
|
|
4438
4443
|
useExisting: forwardRef(() => MatDate),
|
|
4439
4444
|
multi: true
|
|
4440
4445
|
};
|
|
4441
|
-
const DAY_MASK
|
|
4442
|
-
const noop$
|
|
4443
|
-
const ɵ0$
|
|
4446
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4447
|
+
const noop$2 = () => { };
|
|
4448
|
+
const ɵ0$2 = noop$2;
|
|
4444
4449
|
class MatDate {
|
|
4445
4450
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4446
4451
|
this.dateAdapter = dateAdapter;
|
|
@@ -4449,12 +4454,12 @@ class MatDate {
|
|
|
4449
4454
|
this.cd = cd;
|
|
4450
4455
|
this.keyboard = keyboard;
|
|
4451
4456
|
this.formGroupDir = formGroupDir;
|
|
4452
|
-
this._onChangeCallback = noop$
|
|
4453
|
-
this._onTouchedCallback = noop$
|
|
4457
|
+
this._onChangeCallback = noop$2;
|
|
4458
|
+
this._onTouchedCallback = noop$2;
|
|
4454
4459
|
this._subscription = new Subscription();
|
|
4455
4460
|
this.writing = true;
|
|
4456
4461
|
this.disabling = false;
|
|
4457
|
-
this.dayMask = DAY_MASK
|
|
4462
|
+
this.dayMask = DAY_MASK;
|
|
4458
4463
|
this.disabled = false;
|
|
4459
4464
|
this.floatLabel = 'auto';
|
|
4460
4465
|
this.readonly = false;
|
|
@@ -4482,7 +4487,7 @@ class MatDate {
|
|
|
4482
4487
|
ngOnInit() {
|
|
4483
4488
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
4484
4489
|
if (!this.formControl)
|
|
4485
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-
|
|
4490
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-field>.');
|
|
4486
4491
|
this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
|
|
4487
4492
|
// Redirect errors from main control, into day sub control
|
|
4488
4493
|
const $error = new BehaviorSubject(null);
|
|
@@ -4579,44 +4584,6 @@ class MatDate {
|
|
|
4579
4584
|
this.markForCheck();
|
|
4580
4585
|
this._onChangeCallback(dateStr);
|
|
4581
4586
|
}
|
|
4582
|
-
updatePattern(pattern) {
|
|
4583
|
-
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
4584
|
-
if (this.displayPattern !== pattern) {
|
|
4585
|
-
this.displayPattern = pattern;
|
|
4586
|
-
this.dayPattern = pattern;
|
|
4587
|
-
this.markForCheck();
|
|
4588
|
-
}
|
|
4589
|
-
}
|
|
4590
|
-
onFormChange(dayValue) {
|
|
4591
|
-
if (this.writing)
|
|
4592
|
-
return; // Skip if call by self
|
|
4593
|
-
this.writing = true;
|
|
4594
|
-
// Make to remove placeholder chars
|
|
4595
|
-
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
4596
|
-
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
4597
|
-
}
|
|
4598
|
-
let date;
|
|
4599
|
-
// Parse day string
|
|
4600
|
-
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
4601
|
-
// Reset time
|
|
4602
|
-
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
4603
|
-
// update date picker
|
|
4604
|
-
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
4605
|
-
// Get the model value
|
|
4606
|
-
const dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
4607
|
-
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
4608
|
-
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
4609
|
-
//this.formControl.updateValueAndValidity();
|
|
4610
|
-
this.writing = false;
|
|
4611
|
-
this.markForCheck();
|
|
4612
|
-
this._onChangeCallback(dateStr);
|
|
4613
|
-
}
|
|
4614
|
-
checkIfTouched() {
|
|
4615
|
-
if (this.dayControl.touched) {
|
|
4616
|
-
this.markForCheck();
|
|
4617
|
-
this._onTouchedCallback();
|
|
4618
|
-
}
|
|
4619
|
-
}
|
|
4620
4587
|
openDatePickerIfMobile(event, datePicker) {
|
|
4621
4588
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4622
4589
|
if (!this.mobile || event.defaultPrevented)
|
|
@@ -4656,7 +4623,45 @@ class MatDate {
|
|
|
4656
4623
|
}
|
|
4657
4624
|
});
|
|
4658
4625
|
}
|
|
4659
|
-
/* --
|
|
4626
|
+
/* -- private method -- */
|
|
4627
|
+
updatePattern(pattern) {
|
|
4628
|
+
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
4629
|
+
if (this.displayPattern !== pattern) {
|
|
4630
|
+
this.displayPattern = pattern;
|
|
4631
|
+
this.dayPattern = pattern;
|
|
4632
|
+
this.markForCheck();
|
|
4633
|
+
}
|
|
4634
|
+
}
|
|
4635
|
+
onFormChange(dayValue) {
|
|
4636
|
+
if (this.writing)
|
|
4637
|
+
return; // Skip if call by self
|
|
4638
|
+
this.writing = true;
|
|
4639
|
+
// Make to remove placeholder chars
|
|
4640
|
+
while (dayValue && dayValue.indexOf(this.placeholderChar) !== -1) {
|
|
4641
|
+
dayValue = dayValue.replace(this.placeholderChar, '');
|
|
4642
|
+
}
|
|
4643
|
+
let date;
|
|
4644
|
+
// Parse day string
|
|
4645
|
+
date = dayValue && this.dateAdapter.parse(dayValue, this.dayPattern) || null;
|
|
4646
|
+
// Reset time
|
|
4647
|
+
date = date && date.utc(true).hour(0).minute(0).seconds(0).millisecond(0);
|
|
4648
|
+
// update date picker
|
|
4649
|
+
this._value = date && this.dateAdapter.parse(date.clone(), DATE_ISO_PATTERN);
|
|
4650
|
+
// Get the model value
|
|
4651
|
+
const dateStr = date && date.isValid() && this.dateAdapter.format(date, DATE_ISO_PATTERN).replace('+00:00', 'Z') || date;
|
|
4652
|
+
//console.debug("[mat-date-time] Setting date: ", dateStr);
|
|
4653
|
+
this.formControl.patchValue(dateStr, { emitEvent: false });
|
|
4654
|
+
//this.formControl.updateValueAndValidity();
|
|
4655
|
+
this.writing = false;
|
|
4656
|
+
this.markForCheck();
|
|
4657
|
+
this._onChangeCallback(dateStr);
|
|
4658
|
+
}
|
|
4659
|
+
checkIfTouched() {
|
|
4660
|
+
if (this.dayControl.touched) {
|
|
4661
|
+
this.markForCheck();
|
|
4662
|
+
this._onTouchedCallback();
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4660
4665
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
4661
4666
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4662
4667
|
if (!this.keyboard || !this.keyboard.isVisible)
|
|
@@ -4691,7 +4696,7 @@ MatDate.decorators = [
|
|
|
4691
4696
|
selector: 'mat-date-field',
|
|
4692
4697
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n\n",
|
|
4693
4698
|
providers: [
|
|
4694
|
-
DEFAULT_VALUE_ACCESSOR
|
|
4699
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
4695
4700
|
],
|
|
4696
4701
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4697
4702
|
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%}"]
|
|
@@ -4724,34 +4729,34 @@ MatDate.propDecorators = {
|
|
|
4724
4729
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4725
4730
|
};
|
|
4726
4731
|
|
|
4727
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4732
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
4728
4733
|
provide: NG_VALUE_ACCESSOR,
|
|
4729
4734
|
useExisting: forwardRef(() => MatDateTime),
|
|
4730
4735
|
multi: true
|
|
4731
4736
|
};
|
|
4732
4737
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4733
4738
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4734
|
-
const HOUR_MASK
|
|
4735
|
-
const noop$
|
|
4739
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4740
|
+
const noop$3 = () => {
|
|
4736
4741
|
};
|
|
4737
|
-
const ɵ0$
|
|
4742
|
+
const ɵ0$3 = noop$3;
|
|
4738
4743
|
class MatDateTime {
|
|
4739
|
-
constructor(platform, dateAdapter, translate, formBuilder,
|
|
4744
|
+
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4740
4745
|
this.platform = platform;
|
|
4741
4746
|
this.dateAdapter = dateAdapter;
|
|
4742
4747
|
this.translate = translate;
|
|
4743
4748
|
this.formBuilder = formBuilder;
|
|
4744
|
-
this.keyboard = keyboard;
|
|
4745
4749
|
this.cd = cd;
|
|
4750
|
+
this.keyboard = keyboard;
|
|
4746
4751
|
this.formGroupDir = formGroupDir;
|
|
4747
|
-
this._onChangeCallback = noop$
|
|
4748
|
-
this._onTouchedCallback = noop$
|
|
4752
|
+
this._onChangeCallback = noop$3;
|
|
4753
|
+
this._onTouchedCallback = noop$3;
|
|
4749
4754
|
this._subscription = new Subscription();
|
|
4750
4755
|
this.writing = true;
|
|
4751
4756
|
this.disabling = false;
|
|
4752
4757
|
this._readonly = false;
|
|
4753
4758
|
this.dayMask = DAY_MASK$1;
|
|
4754
|
-
this.hourMask = HOUR_MASK
|
|
4759
|
+
this.hourMask = HOUR_MASK;
|
|
4755
4760
|
this.floatLabel = 'auto';
|
|
4756
4761
|
this.compact = false;
|
|
4757
4762
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4781,7 +4786,7 @@ class MatDateTime {
|
|
|
4781
4786
|
}
|
|
4782
4787
|
ngOnInit() {
|
|
4783
4788
|
this.mobile = isNil(this.mobile) ? this.platform.is('mobile') : this.mobile;
|
|
4784
|
-
this.
|
|
4789
|
+
this.keyboardHideDelay = this.mobile && KEYBOARD_HIDE_DELAY_MS || 0;
|
|
4785
4790
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
4786
4791
|
if (!this.formControl)
|
|
4787
4792
|
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-time-field>.');
|
|
@@ -4905,10 +4910,6 @@ class MatDateTime {
|
|
|
4905
4910
|
this.disabling = false;
|
|
4906
4911
|
this.markForCheck();
|
|
4907
4912
|
}
|
|
4908
|
-
updatePattern(patterns) {
|
|
4909
|
-
this.displayPattern = (patterns['COMMON.DATE_TIME_PATTERN'] !== 'COMMON.DATE_TIME_PATTERN' ? patterns['COMMON.DATE_TIME_PATTERN'] : 'L LT');
|
|
4910
|
-
this.dayPattern = (patterns['COMMON.DATE_PATTERN'] !== 'COMMON.DATE_PATTERN' ? patterns['COMMON.DATE_PATTERN'] : 'L');
|
|
4911
|
-
}
|
|
4912
4913
|
onDatePickerChange(event) {
|
|
4913
4914
|
// Make sure event is valid
|
|
4914
4915
|
if (!event || (event.value !== null && !isMoment(event.value))) {
|
|
@@ -4946,7 +4947,7 @@ class MatDateTime {
|
|
|
4946
4947
|
return;
|
|
4947
4948
|
this.preventEvent(event);
|
|
4948
4949
|
// Make sure the keyboard is closed
|
|
4949
|
-
yield this.
|
|
4950
|
+
yield this.waitKeyboardHide(false);
|
|
4950
4951
|
// Open the picker
|
|
4951
4952
|
this.openDatePicker(null, datePicker);
|
|
4952
4953
|
});
|
|
@@ -4967,7 +4968,7 @@ class MatDateTime {
|
|
|
4967
4968
|
return;
|
|
4968
4969
|
this.preventEvent(event);
|
|
4969
4970
|
// Make sure the keyboard is closed
|
|
4970
|
-
yield this.
|
|
4971
|
+
yield this.waitKeyboardHide(true);
|
|
4971
4972
|
// Open the picker
|
|
4972
4973
|
this.openTimePicker(null);
|
|
4973
4974
|
});
|
|
@@ -4986,12 +4987,6 @@ class MatDateTime {
|
|
|
4986
4987
|
event.stopPropagation();
|
|
4987
4988
|
event.returnValue = false;
|
|
4988
4989
|
}
|
|
4989
|
-
checkIfTouched() {
|
|
4990
|
-
if (this.dateFormControl.touched || this.timeFormControl.touched) {
|
|
4991
|
-
this._onTouchedCallback();
|
|
4992
|
-
this.markForCheck();
|
|
4993
|
-
}
|
|
4994
|
-
}
|
|
4995
4990
|
focus() {
|
|
4996
4991
|
if (!this.matInputs.length)
|
|
4997
4992
|
return;
|
|
@@ -5007,7 +5002,31 @@ class MatDateTime {
|
|
|
5007
5002
|
this.markAsTouched();
|
|
5008
5003
|
this.markAsDirty();
|
|
5009
5004
|
}
|
|
5010
|
-
/* --
|
|
5005
|
+
/* -- private method -- */
|
|
5006
|
+
updatePattern(patterns) {
|
|
5007
|
+
this.displayPattern = (patterns['COMMON.DATE_TIME_PATTERN'] !== 'COMMON.DATE_TIME_PATTERN' ? patterns['COMMON.DATE_TIME_PATTERN'] : 'L LT');
|
|
5008
|
+
this.dayPattern = (patterns['COMMON.DATE_PATTERN'] !== 'COMMON.DATE_PATTERN' ? patterns['COMMON.DATE_PATTERN'] : 'L');
|
|
5009
|
+
}
|
|
5010
|
+
checkIfTouched() {
|
|
5011
|
+
if (this.dateFormControl.touched || this.timeFormControl.touched) {
|
|
5012
|
+
this._onTouchedCallback();
|
|
5013
|
+
this.markForCheck();
|
|
5014
|
+
}
|
|
5015
|
+
}
|
|
5016
|
+
waitKeyboardHide(waitKeyboardDelay) {
|
|
5017
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5018
|
+
if (!this.keyboard || !this.keyboard.isVisible)
|
|
5019
|
+
return; // ok, already hidden (or not accessible)
|
|
5020
|
+
// Force keyboard to be hide
|
|
5021
|
+
this.keyboard.hide();
|
|
5022
|
+
// Wait hide occur
|
|
5023
|
+
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
5024
|
+
// Wait an additional delay if need (depending on the OS)
|
|
5025
|
+
if (this.keyboardHideDelay > 0 && waitKeyboardDelay) {
|
|
5026
|
+
yield sleep(this.keyboardHideDelay);
|
|
5027
|
+
}
|
|
5028
|
+
});
|
|
5029
|
+
}
|
|
5011
5030
|
emitChange(value) {
|
|
5012
5031
|
// Get the model value
|
|
5013
5032
|
const dateStr = toDateISOString(value) || null;
|
|
@@ -5020,20 +5039,6 @@ class MatDateTime {
|
|
|
5020
5039
|
this.checkIfTouched();
|
|
5021
5040
|
}
|
|
5022
5041
|
}
|
|
5023
|
-
hideKeyboard(waitIsHidden) {
|
|
5024
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5025
|
-
if (!this.keyboard.isVisible)
|
|
5026
|
-
return; // ok, already hidden
|
|
5027
|
-
// Force keyboard to be hide
|
|
5028
|
-
this.keyboard.hide();
|
|
5029
|
-
// Wait hide occur
|
|
5030
|
-
yield this.keyboard.onKeyboardHide().pipe(first()).toPromise();
|
|
5031
|
-
// Wait an additional delay if need (depending on the OS)
|
|
5032
|
-
if (this.waitHideKeyboardDelay > 0 && waitIsHidden) {
|
|
5033
|
-
yield sleep(this.waitHideKeyboardDelay);
|
|
5034
|
-
}
|
|
5035
|
-
});
|
|
5036
|
-
}
|
|
5037
5042
|
updateTabIndex() {
|
|
5038
5043
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
5039
5044
|
return; // skip
|
|
@@ -5063,7 +5068,7 @@ MatDateTime.decorators = [
|
|
|
5063
5068
|
selector: 'mat-date-time-field',
|
|
5064
5069
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
5065
5070
|
providers: [
|
|
5066
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5071
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
5067
5072
|
],
|
|
5068
5073
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5069
5074
|
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%}"]
|
|
@@ -5074,8 +5079,8 @@ MatDateTime.ctorParameters = () => [
|
|
|
5074
5079
|
{ type: DateAdapter },
|
|
5075
5080
|
{ type: TranslateService },
|
|
5076
5081
|
{ type: FormBuilder },
|
|
5077
|
-
{ type: Keyboard },
|
|
5078
5082
|
{ type: ChangeDetectorRef },
|
|
5083
|
+
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
5079
5084
|
{ type: FormGroupDirective, decorators: [{ type: Optional }] }
|
|
5080
5085
|
];
|
|
5081
5086
|
MatDateTime.propDecorators = {
|
|
@@ -5097,15 +5102,15 @@ MatDateTime.propDecorators = {
|
|
|
5097
5102
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5098
5103
|
};
|
|
5099
5104
|
|
|
5100
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5105
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5101
5106
|
provide: NG_VALUE_ACCESSOR,
|
|
5102
5107
|
useExisting: forwardRef(() => MatDateShort),
|
|
5103
5108
|
multi: true
|
|
5104
5109
|
};
|
|
5105
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5106
|
-
const noop$
|
|
5110
|
+
const DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
|
|
5111
|
+
const noop$4 = () => {
|
|
5107
5112
|
};
|
|
5108
|
-
const ɵ0$
|
|
5113
|
+
const ɵ0$4 = noop$4;
|
|
5109
5114
|
class MatDateShort {
|
|
5110
5115
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5111
5116
|
this.dateAdapter = dateAdapter;
|
|
@@ -5114,11 +5119,11 @@ class MatDateShort {
|
|
|
5114
5119
|
this.cd = cd;
|
|
5115
5120
|
this.keyboard = keyboard;
|
|
5116
5121
|
this.formGroupDir = formGroupDir;
|
|
5117
|
-
this._onChangeCallback = noop$
|
|
5118
|
-
this._onTouchedCallback = noop$
|
|
5122
|
+
this._onChangeCallback = noop$4;
|
|
5123
|
+
this._onTouchedCallback = noop$4;
|
|
5119
5124
|
this.writing = true;
|
|
5120
5125
|
this.disabling = false;
|
|
5121
|
-
this.dayMask = DAY_MASK;
|
|
5126
|
+
this.dayMask = DAY_MASK$2;
|
|
5122
5127
|
this.disabled = false;
|
|
5123
5128
|
this.floatLabel = 'auto';
|
|
5124
5129
|
this.readonly = false;
|
|
@@ -5145,7 +5150,7 @@ class MatDateShort {
|
|
|
5145
5150
|
ngOnInit() {
|
|
5146
5151
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5147
5152
|
if (!this.formControl)
|
|
5148
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-
|
|
5153
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-date-short-field>.');
|
|
5149
5154
|
// Redirect errors from main control, into day sub control
|
|
5150
5155
|
const $error = new BehaviorSubject(null);
|
|
5151
5156
|
this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
|
|
@@ -5363,7 +5368,7 @@ MatDateShort.decorators = [
|
|
|
5363
5368
|
selector: 'mat-date-short-field',
|
|
5364
5369
|
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",
|
|
5365
5370
|
providers: [
|
|
5366
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5371
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5367
5372
|
],
|
|
5368
5373
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5369
5374
|
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%}"]
|
|
@@ -5431,16 +5436,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5431
5436
|
},] }
|
|
5432
5437
|
];
|
|
5433
5438
|
|
|
5434
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5439
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5435
5440
|
provide: NG_VALUE_ACCESSOR,
|
|
5436
5441
|
useExisting: forwardRef(() => MatDuration),
|
|
5437
5442
|
multi: true
|
|
5438
5443
|
};
|
|
5439
5444
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5440
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5441
|
-
const noop$
|
|
5445
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5446
|
+
const noop$5 = () => {
|
|
5442
5447
|
};
|
|
5443
|
-
const ɵ0$5 = noop$
|
|
5448
|
+
const ɵ0$5 = noop$5;
|
|
5444
5449
|
class MatDuration {
|
|
5445
5450
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5446
5451
|
this.dateAdapter = dateAdapter;
|
|
@@ -5449,11 +5454,11 @@ class MatDuration {
|
|
|
5449
5454
|
this.cd = cd;
|
|
5450
5455
|
this.formGroupDir = formGroupDir;
|
|
5451
5456
|
this._subscription = new Subscription();
|
|
5452
|
-
this._onChangeCallback = noop$
|
|
5453
|
-
this._onTouchedCallback = noop$
|
|
5457
|
+
this._onChangeCallback = noop$5;
|
|
5458
|
+
this._onTouchedCallback = noop$5;
|
|
5454
5459
|
this.writing = true;
|
|
5455
5460
|
this.disabling = false;
|
|
5456
|
-
this.hourMask = HOUR_MASK;
|
|
5461
|
+
this.hourMask = HOUR_MASK$1;
|
|
5457
5462
|
this.disabled = false;
|
|
5458
5463
|
this.floatLabel = 'auto';
|
|
5459
5464
|
this.readonly = false;
|
|
@@ -5487,7 +5492,7 @@ class MatDuration {
|
|
|
5487
5492
|
}
|
|
5488
5493
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
5489
5494
|
if (!this.formControl)
|
|
5490
|
-
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-
|
|
5495
|
+
throw new Error('Missing mandatory attribute \'formControl\' or \'formControlName\' in <mat-duration-field>.');
|
|
5491
5496
|
this.required = toBoolean(this.required, this.formControl.validator === Validators.required);
|
|
5492
5497
|
// Redirect errors from main control, into day sub control
|
|
5493
5498
|
const $error = new BehaviorSubject(null);
|
|
@@ -5633,7 +5638,7 @@ MatDuration.decorators = [
|
|
|
5633
5638
|
selector: 'mat-duration-field',
|
|
5634
5639
|
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",
|
|
5635
5640
|
providers: [
|
|
5636
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5641
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
5637
5642
|
],
|
|
5638
5643
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5639
5644
|
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%}"]
|
|
@@ -5690,22 +5695,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5690
5695
|
},] }
|
|
5691
5696
|
];
|
|
5692
5697
|
|
|
5693
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5698
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
5694
5699
|
provide: NG_VALUE_ACCESSOR,
|
|
5695
5700
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5696
5701
|
multi: true
|
|
5697
5702
|
};
|
|
5698
|
-
const noop$
|
|
5703
|
+
const noop$6 = () => {
|
|
5699
5704
|
};
|
|
5700
|
-
const ɵ0$
|
|
5705
|
+
const ɵ0$6 = noop$6;
|
|
5701
5706
|
class MatBooleanField {
|
|
5702
5707
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5703
5708
|
this.translate = translate;
|
|
5704
5709
|
this.formBuilder = formBuilder;
|
|
5705
5710
|
this.cd = cd;
|
|
5706
5711
|
this.formGroupDir = formGroupDir;
|
|
5707
|
-
this._onChangeCallback = noop$
|
|
5708
|
-
this._onTouchedCallback = noop$
|
|
5712
|
+
this._onChangeCallback = noop$6;
|
|
5713
|
+
this._onTouchedCallback = noop$6;
|
|
5709
5714
|
this._writing = false;
|
|
5710
5715
|
this.showRadio = false;
|
|
5711
5716
|
this.disabled = false;
|
|
@@ -5866,9 +5871,9 @@ class MatBooleanField {
|
|
|
5866
5871
|
MatBooleanField.decorators = [
|
|
5867
5872
|
{ type: Component, args: [{
|
|
5868
5873
|
selector: 'mat-boolean-field',
|
|
5869
|
-
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> \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> </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
|
|
5874
|
+
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> \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> </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",
|
|
5870
5875
|
providers: [
|
|
5871
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5876
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
5872
5877
|
],
|
|
5873
5878
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5874
5879
|
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}"]
|
|
@@ -5904,8 +5909,7 @@ MatBooleanField.propDecorators = {
|
|
|
5904
5909
|
yesButton: [{ type: ViewChild, args: ['yesButton',] }],
|
|
5905
5910
|
noButton: [{ type: ViewChild, args: ['noButton',] }],
|
|
5906
5911
|
checkboxButton: [{ type: ViewChild, args: ['checkboxButton',] }],
|
|
5907
|
-
fakeInput: [{ type: ViewChild, args: ['fakeInput',] }]
|
|
5908
|
-
suffixDiv: [{ type: ViewChild, args: ['suffix', { static: false },] }]
|
|
5912
|
+
fakeInput: [{ type: ViewChild, args: ['fakeInput',] }]
|
|
5909
5913
|
};
|
|
5910
5914
|
|
|
5911
5915
|
class SharedMatBooleanModule {
|
|
@@ -6115,7 +6119,7 @@ class MatNumpadDomService {
|
|
|
6115
6119
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6116
6120
|
}
|
|
6117
6121
|
}
|
|
6118
|
-
MatNumpadDomService.ɵprov =
|
|
6122
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
6119
6123
|
MatNumpadDomService.decorators = [
|
|
6120
6124
|
{ type: Injectable, args: [{
|
|
6121
6125
|
providedIn: 'root'
|
|
@@ -6479,7 +6483,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6479
6483
|
},] }
|
|
6480
6484
|
];
|
|
6481
6485
|
|
|
6482
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
6486
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
6483
6487
|
provide: NG_VALUE_ACCESSOR,
|
|
6484
6488
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6485
6489
|
multi: true
|
|
@@ -6488,8 +6492,8 @@ class MatSwipeField {
|
|
|
6488
6492
|
constructor(cd, formGroupDir) {
|
|
6489
6493
|
this.cd = cd;
|
|
6490
6494
|
this.formGroupDir = formGroupDir;
|
|
6491
|
-
this._onChangeCallback = noop$
|
|
6492
|
-
this._onTouchedCallback = noop$
|
|
6495
|
+
this._onChangeCallback = noop$9;
|
|
6496
|
+
this._onTouchedCallback = noop$9;
|
|
6493
6497
|
this._subscription = new Subscription();
|
|
6494
6498
|
this._writing = false;
|
|
6495
6499
|
this.showSlides = false;
|
|
@@ -6742,7 +6746,7 @@ MatSwipeField.decorators = [
|
|
|
6742
6746
|
{ type: Component, args: [{
|
|
6743
6747
|
selector: 'mat-swipe-field',
|
|
6744
6748
|
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",
|
|
6745
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6749
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
6746
6750
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6747
6751
|
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}"]
|
|
6748
6752
|
},] }
|
|
@@ -6800,12 +6804,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
6800
6804
|
},] }
|
|
6801
6805
|
];
|
|
6802
6806
|
|
|
6807
|
+
const noop$7 = () => { };
|
|
6808
|
+
const ɵ0$7 = noop$7;
|
|
6803
6809
|
class MatChipsField {
|
|
6804
6810
|
constructor(cd, formGroupDir) {
|
|
6805
6811
|
this.cd = cd;
|
|
6806
6812
|
this.formGroupDir = formGroupDir;
|
|
6807
|
-
this._onChangeCallback =
|
|
6808
|
-
this._onTouchedCallback =
|
|
6813
|
+
this._onChangeCallback = noop$7;
|
|
6814
|
+
this._onTouchedCallback = noop$7;
|
|
6809
6815
|
this.logPrefix = '[mat-chips] ';
|
|
6810
6816
|
this.formControlName = null;
|
|
6811
6817
|
this.required = false;
|
|
@@ -6814,12 +6820,12 @@ class MatChipsField {
|
|
|
6814
6820
|
this.debounceTime = null;
|
|
6815
6821
|
this.i18nPrefix = 'REFERENTIAL.';
|
|
6816
6822
|
this.noResultMessage = 'COMMON.NO_RESULT';
|
|
6817
|
-
this.debug = false;
|
|
6818
6823
|
this.itemSize = '48px';
|
|
6819
6824
|
this.fetchMoreThreshold = '15%';
|
|
6820
6825
|
this.suggestLengthThreshold = null;
|
|
6821
6826
|
this.showLoadingSpinner = true;
|
|
6822
6827
|
this.chipColor = null;
|
|
6828
|
+
this.debug = false;
|
|
6823
6829
|
this.clicked = new EventEmitter();
|
|
6824
6830
|
this.blurred = new EventEmitter();
|
|
6825
6831
|
this.focused = new EventEmitter();
|
|
@@ -6888,6 +6894,9 @@ class MatChipsField {
|
|
|
6888
6894
|
get enabled() {
|
|
6889
6895
|
return !this.readonly && this.formControl.enabled;
|
|
6890
6896
|
}
|
|
6897
|
+
get loading() {
|
|
6898
|
+
return isNil(this.$filteredItems.value);
|
|
6899
|
+
}
|
|
6891
6900
|
ngOnInit() {
|
|
6892
6901
|
var _a, _b;
|
|
6893
6902
|
this.formControl = this.formControl || this.formControlName && this.formGroupDir && this.formGroupDir.form.get(this.formControlName);
|
|
@@ -6983,19 +6992,9 @@ class MatChipsField {
|
|
|
6983
6992
|
),
|
|
6984
6993
|
// Object set: use it (no distinctUntilChanged() pipe need)
|
|
6985
6994
|
this.inputControl.valueChanges
|
|
6986
|
-
.pipe(startWith(this.inputControl.value), filter(value => isNotNil(value) && typeof value === 'object'),
|
|
6987
|
-
// DEBUG
|
|
6988
|
-
//console.debug(this.logPrefix + ' object changes:', value)
|
|
6989
|
-
// Update the display value (if need)
|
|
6990
|
-
const displayValue = this.displayWith(value) || '';
|
|
6991
|
-
// Apply to the input[type=text] field
|
|
6992
|
-
if (this.matInputText && this.matInputText.nativeElement) {
|
|
6993
|
-
this.matInputText.nativeElement.value = displayValue;
|
|
6994
|
-
}
|
|
6995
|
-
})
|
|
6995
|
+
.pipe(startWith(this.inputControl.value), filter(value => isNotNil(value) && typeof value === 'object'),
|
|
6996
6996
|
// DEBUG
|
|
6997
|
-
|
|
6998
|
-
),
|
|
6997
|
+
tap(value => this.debug && console.debug(this.logPrefix + ' Received an object value: ', value))),
|
|
6999
6998
|
// On dropdown button click (no distinctUntilChanged(), nor debounceTime)
|
|
7000
6999
|
this.dropButtonClick
|
|
7001
7000
|
.pipe(filter(event => this.enabled && (!event || !event.defaultPrevented)), tap(_ => this.matInputText.nativeElement.focus()), map(_ => this.showAllOnFocus ? '*' : this.formControl.value),
|
|
@@ -7085,7 +7084,9 @@ class MatChipsField {
|
|
|
7085
7084
|
this._openedSubscription.unsubscribe();
|
|
7086
7085
|
}
|
|
7087
7086
|
this.$inputItems.complete();
|
|
7087
|
+
this.$inputItems.unsubscribe();
|
|
7088
7088
|
this.$filteredItems.complete();
|
|
7089
|
+
this.$filteredItems.unsubscribe();
|
|
7089
7090
|
this._reload$.complete();
|
|
7090
7091
|
this._$filter.complete();
|
|
7091
7092
|
this.dropButtonClick.complete();
|
|
@@ -7147,12 +7148,18 @@ class MatChipsField {
|
|
|
7147
7148
|
this._reload$.next(value || '*');
|
|
7148
7149
|
}
|
|
7149
7150
|
writeValue(value) {
|
|
7150
|
-
if (
|
|
7151
|
-
|
|
7151
|
+
if (value && !Array.isArray(value)) {
|
|
7152
|
+
value = [value];
|
|
7153
|
+
}
|
|
7152
7154
|
if (value !== this.formControl.value) {
|
|
7155
|
+
if (this.debug)
|
|
7156
|
+
console.debug(this.logPrefix + ' Writing value: ', value);
|
|
7153
7157
|
this.formControl.patchValue(value, { emitEvent: false });
|
|
7154
7158
|
this._onChangeCallback(value);
|
|
7155
7159
|
}
|
|
7160
|
+
else {
|
|
7161
|
+
this.markForCheck();
|
|
7162
|
+
}
|
|
7156
7163
|
}
|
|
7157
7164
|
registerOnChange(fn) {
|
|
7158
7165
|
this._onChangeCallback = fn;
|
|
@@ -7261,7 +7268,7 @@ class MatChipsField {
|
|
|
7261
7268
|
// Call suggestion function
|
|
7262
7269
|
let res = yield this.suggestFn(value, filter);
|
|
7263
7270
|
// DEBUG
|
|
7264
|
-
//
|
|
7271
|
+
//console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
7265
7272
|
if (!res) {
|
|
7266
7273
|
this._itemCount = 0;
|
|
7267
7274
|
res = [];
|
|
@@ -7271,14 +7278,17 @@ class MatChipsField {
|
|
|
7271
7278
|
this._itemCount = res.length || 0;
|
|
7272
7279
|
}
|
|
7273
7280
|
else {
|
|
7274
|
-
const { data, total } = res;
|
|
7275
|
-
res = data;
|
|
7281
|
+
const { data, total, fetchMore } = res;
|
|
7276
7282
|
this._itemCount = toNumber(total, data && data.length || 0);
|
|
7283
|
+
this._onFetchMoreCallback = fetchMore;
|
|
7284
|
+
this._moreItemsCount = fetchMore && (this._itemCount - data.length) || 0;
|
|
7285
|
+
res = data;
|
|
7277
7286
|
}
|
|
7278
7287
|
// Filter out existing items
|
|
7279
7288
|
const filteredData = (res || []).slice().filter(item1 => this.value.findIndex(item2 => this.equals(item1, item2)) === -1);
|
|
7280
|
-
|
|
7281
|
-
|
|
7289
|
+
const removedItemCount = (((res === null || res === void 0 ? void 0 : res.length) || 0) - ((filteredData === null || filteredData === void 0 ? void 0 : filteredData.length) || 0));
|
|
7290
|
+
// Decrease the item count, with delta
|
|
7291
|
+
this._itemCount -= removedItemCount;
|
|
7282
7292
|
if (this.debug)
|
|
7283
7293
|
console.debug(this.logPrefix + ' Filtered items by suggestFn:', value, res);
|
|
7284
7294
|
return res;
|
|
@@ -7308,6 +7318,12 @@ class MatChipsField {
|
|
|
7308
7318
|
this._implicitValue = undefined;
|
|
7309
7319
|
}
|
|
7310
7320
|
}
|
|
7321
|
+
checkIfTouched() {
|
|
7322
|
+
if (this.formControl.touched) {
|
|
7323
|
+
this.cd.markForCheck();
|
|
7324
|
+
this._onTouchedCallback();
|
|
7325
|
+
}
|
|
7326
|
+
}
|
|
7311
7327
|
getAutocompletePanel() {
|
|
7312
7328
|
var _a, _b;
|
|
7313
7329
|
const ele = (_b = (_a = this.autocomplete) === null || _a === void 0 ? void 0 : _a.options.last) === null || _b === void 0 ? void 0 : _b._getHostElement().parentElement;
|
|
@@ -7317,12 +7333,6 @@ class MatChipsField {
|
|
|
7317
7333
|
}
|
|
7318
7334
|
return ele;
|
|
7319
7335
|
}
|
|
7320
|
-
checkIfTouched() {
|
|
7321
|
-
if (this.formControl.touched) {
|
|
7322
|
-
this.cd.markForCheck();
|
|
7323
|
-
this._onTouchedCallback();
|
|
7324
|
-
}
|
|
7325
|
-
}
|
|
7326
7336
|
markForCheck() {
|
|
7327
7337
|
this.cd.markForCheck();
|
|
7328
7338
|
}
|
|
@@ -7342,13 +7352,11 @@ MatChipsField.decorators = [
|
|
|
7342
7352
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
7343
7353
|
selector: 'mat-chips-field',
|
|
7344
7354
|
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",
|
|
7345
|
-
providers: [
|
|
7346
|
-
{
|
|
7355
|
+
providers: [{
|
|
7347
7356
|
provide: NG_VALUE_ACCESSOR,
|
|
7348
7357
|
multi: true,
|
|
7349
7358
|
useExisting: forwardRef(() => MatChipsField)
|
|
7350
|
-
}
|
|
7351
|
-
],
|
|
7359
|
+
}],
|
|
7352
7360
|
encapsulation: ViewEncapsulation.None,
|
|
7353
7361
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7354
7362
|
styles: [":host{width:100%;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%}.mat-form-field-suffix{position:absolute!important;right:0!important;top:calc(100% - 50px)!important}.mat-chip.mat-standard-chip.mat-primary{background-color:var(--ion-color-primary);color:var(--ion-color-primary-contrast)}.mat-chip.mat-standard-chip.mat-secondary{background-color:var(--ion-color-secondary);color:var(--ion-color-secondary-contrast)}.mat-chip.mat-standard-chip.mat-tertiary{background-color:var(--ion-color-tertiary);color:var(--ion-color-tertiary-contrast)}.mat-chip.mat-standard-chip.mat-accent{background-color:var(--ion-color-accent);color:var(--ion-color-accent-contrast)}.mat-chip.mat-standard-chip.mat-warning{background-color:var(--ion-color-warning);color:var(--ion-color-warning-contrast)}"]
|
|
@@ -7385,12 +7393,12 @@ MatChipsField.propDecorators = {
|
|
|
7385
7393
|
classList: [{ type: Input, args: ['class',] }],
|
|
7386
7394
|
panelWidth: [{ type: Input }],
|
|
7387
7395
|
matAutocompletePosition: [{ type: Input }],
|
|
7388
|
-
debug: [{ type: Input }],
|
|
7389
7396
|
itemSize: [{ type: Input }],
|
|
7390
7397
|
fetchMoreThreshold: [{ type: Input }],
|
|
7391
7398
|
suggestLengthThreshold: [{ type: Input }],
|
|
7392
7399
|
showLoadingSpinner: [{ type: Input }],
|
|
7393
7400
|
chipColor: [{ type: Input }],
|
|
7401
|
+
debug: [{ type: Input }],
|
|
7394
7402
|
clicked: [{ type: Output }],
|
|
7395
7403
|
blurred: [{ type: Output }],
|
|
7396
7404
|
focused: [{ type: Output }],
|
|
@@ -7589,7 +7597,7 @@ class ProgressBarService {
|
|
|
7589
7597
|
}
|
|
7590
7598
|
}
|
|
7591
7599
|
}
|
|
7592
|
-
ProgressBarService.ɵprov =
|
|
7600
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7593
7601
|
ProgressBarService.decorators = [
|
|
7594
7602
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7595
7603
|
];
|
|
@@ -7633,7 +7641,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7633
7641
|
return mc;
|
|
7634
7642
|
}
|
|
7635
7643
|
}
|
|
7636
|
-
AppGestureConfig.ɵprov =
|
|
7644
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7637
7645
|
AppGestureConfig.decorators = [
|
|
7638
7646
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7639
7647
|
];
|
|
@@ -7858,7 +7866,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7858
7866
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7859
7867
|
}
|
|
7860
7868
|
}
|
|
7861
|
-
MatPaginatorI18n.ɵprov =
|
|
7869
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7862
7870
|
MatPaginatorI18n.decorators = [
|
|
7863
7871
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7864
7872
|
];
|
|
@@ -7948,17 +7956,17 @@ function getColorContrast(color, bw) {
|
|
|
7948
7956
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
7949
7957
|
}
|
|
7950
7958
|
|
|
7951
|
-
const noop = () => {
|
|
7959
|
+
const noop$8 = () => {
|
|
7952
7960
|
};
|
|
7953
|
-
const ɵ0$
|
|
7961
|
+
const ɵ0$8 = noop$8;
|
|
7954
7962
|
class AppFormField {
|
|
7955
7963
|
constructor(translate, cd, injector, formGroupDir) {
|
|
7956
7964
|
this.translate = translate;
|
|
7957
7965
|
this.cd = cd;
|
|
7958
7966
|
this.injector = injector;
|
|
7959
7967
|
this.formGroupDir = formGroupDir;
|
|
7960
|
-
this._onChangeCallback = noop;
|
|
7961
|
-
this._onTouchedCallback = noop;
|
|
7968
|
+
this._onChangeCallback = noop$8;
|
|
7969
|
+
this._onTouchedCallback = noop$8;
|
|
7962
7970
|
this.readonly = false;
|
|
7963
7971
|
this.compact = false;
|
|
7964
7972
|
this.floatLabel = 'auto';
|
|
@@ -8111,7 +8119,7 @@ class AppFormField {
|
|
|
8111
8119
|
AppFormField.decorators = [
|
|
8112
8120
|
{ type: Component, args: [{
|
|
8113
8121
|
selector: 'app-form-field',
|
|
8114
|
-
template: "<ng-container [ngSwitch]=\"type\">\n\n <!-- integer -->\n <mat-form-field *ngSwitchCase=\"'integer'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n type=\"number\"\n autocomplete=\"off\"\n [readonly]=\"readonly\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n pattern=\"-?[0-9]*\"\n step=\"1\"\n [appAutofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keypress)=\"filterNumberInput($event, false)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('pattern')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('integer')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- double -->\n <mat-form-field *ngSwitchCase=\"'double'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <input matInput #matInput\n type=\"number\"\n decimal=\"true\"\n autocomplete=\"off\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n [appAutofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [step]=\"numberInputStep\"\n (keypress)=\"filterNumberInput($event, true)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('maxDecimals')\">\n {{ (compact ? 'ERROR.FIELD_MAXIMUM_DECIMALS_COMPACT' : 'ERROR.FIELD_MAXIMUM_DECIMALS')| translate:{max:\n definition.maximumNumberDecimals} }}</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- boolean -->\n <mat-boolean-field *ngSwitchCase=\"'boolean'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [readonly]=\"readonly\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-boolean-field>\n\n <!-- date -->\n <mat-date-field *ngSwitchCase=\"'date'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-field>\n\n <!-- date time -->\n <mat-date-time-field *ngSwitchCase=\"'dateTime'\"\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_TIME_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-time-field>\n\n <!-- enum -->\n <mat-form-field *ngSwitchCase=\"'enum'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <mat-select [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-option *ngFor=\"let item of definition.values\" [value]=\"item.key || item\">{{ (item.value || item) | translate }}</mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- color -->\n <mat-form-field *ngSwitchCase=\"'color'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <ion-icon margin-right name=\"color-fill\" matPrefix></ion-icon>\n\n <input matInput autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [style.color]=\"getColorContrast(formControl.value)\"\n [style.background]=\"formControl.value\"\n [colorPicker]=\"formControl.value\"\n (colorPickerChange)=\"writeValue($event)\"\n [cpSaveClickOutside]=\"true\"\n cpPosition=\"top\"\n cpOutputFormat=\"hex\"\n [cpOKButton]=\"false\"\n [required]=\"required\"/>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- string -->\n <mat-form-field *ngSwitchCase=\"'string'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\"\n (keypress)=\"filterAlphanumericalInput($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- auto-complete -->\n <mat-autocomplete-field *ngSwitchCase=\"'entity'\"\n [class]=\"classList\"\n [autofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-autocomplete-field>\n\n <!-- multi auto-complete -->\n <mat-chips-field *ngSwitchCase=\"'entities'\"\n [class]=\"classList\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-chips-field>\n\n <!-- other -->\n <div *ngSwitchDefault>\n <mat-error *ngIf=\"type\">Unknown type {{type}} for option {{definition.key}}. Please report this error.</mat-error>\n <mat-error *ngIf=\"!type\">Error on option field. Please check console log for details.</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n</ng-container>\n",
|
|
8122
|
+
template: "<ng-container [ngSwitch]=\"type\">\n\n <!-- integer -->\n <mat-form-field *ngSwitchCase=\"'integer'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n type=\"number\"\n autocomplete=\"off\"\n [readonly]=\"readonly\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n pattern=\"-?[0-9]*\"\n step=\"1\"\n [appAutofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keypress)=\"filterNumberInput($event, false)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('pattern')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('integer')\">\n {{'ERROR.FIELD_NOT_VALID_INTEGER'| translate }}</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- double -->\n <mat-form-field *ngSwitchCase=\"'double'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <input matInput #matInput\n type=\"number\"\n decimal=\"true\"\n autocomplete=\"off\"\n [min]=\"definition.minValue\"\n [max]=\"definition.maxValue\"\n [appAutofocus]=\"autofocus\"\n [readonly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [step]=\"numberInputStep\"\n (keypress)=\"filterNumberInput($event, true)\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\">\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 <mat-error *ngIf=\"formControl.hasError('maxDecimals')\">\n {{ (compact ? 'ERROR.FIELD_MAXIMUM_DECIMALS_COMPACT' : 'ERROR.FIELD_MAXIMUM_DECIMALS')| translate:{max:\n definition.maximumNumberDecimals} }}</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- boolean -->\n <mat-boolean-field *ngSwitchCase=\"'boolean'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [readonly]=\"readonly\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-boolean-field>\n\n <!-- date -->\n <mat-date-field *ngSwitchCase=\"'date'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-field>\n\n <!-- date time -->\n <mat-date-time-field *ngSwitchCase=\"'dateTime'\" #matInput\n [class]=\"classList\"\n [formControl]=\"formControl\"\n [placeholder]=\"compact ? ('COMMON.DATE_TIME_PLACEHOLDER'|translate): placeholder\"\n [floatLabel]=\"floatLabel\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [compact]=\"compact\"\n [tabindex]=\"tabindex\"\n [autofocus]=\"autofocus\">\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-date-time-field>\n\n <!-- enum -->\n <mat-form-field *ngSwitchCase=\"'enum'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <mat-select [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-option *ngFor=\"let item of definition.values\" [value]=\"item.key || item\">{{ (item.value || item) | translate }}</mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- color -->\n <mat-form-field *ngSwitchCase=\"'color'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n\n <ion-icon margin-right name=\"color-fill\" matPrefix></ion-icon>\n\n <input matInput autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [style.color]=\"getColorContrast(formControl.value)\"\n [style.background]=\"formControl.value\"\n [colorPicker]=\"formControl.value\"\n (colorPickerChange)=\"writeValue($event)\"\n [cpSaveClickOutside]=\"true\"\n cpPosition=\"top\"\n cpOutputFormat=\"hex\"\n [cpOKButton]=\"false\"\n [required]=\"required\"/>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- string -->\n <mat-form-field *ngSwitchCase=\"'string'\" [floatLabel]=\"floatLabel\" [class]=\"classList\">\n <input matInput #matInput\n autocomplete=\"off\"\n [appAutofocus]=\"autofocus\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [readonly]=\"readonly\"\n [tabIndex]=\"tabindex\"\n (click)=\"selectInputContent($event)\"\n (keypress)=\"filterAlphanumericalInput($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\">\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </mat-form-field>\n\n <!-- auto-complete -->\n <mat-autocomplete-field *ngSwitchCase=\"'entity'\"\n [class]=\"classList\"\n [autofocus]=\"autofocus\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-autocomplete-field>\n\n <!-- multi auto-complete -->\n <mat-chips-field *ngSwitchCase=\"'entities'\"\n [class]=\"classList\"\n [placeholder]=\"placeholder\"\n [floatLabel]=\"floatLabel\"\n [formControl]=\"formControl\"\n [config]=\"definition.autocomplete\"\n [required]=\"required\"\n [displayWith]=\"getDisplayValueFn(definition)\">\n <ng-content select=\"[matPrefix]\"></ng-content>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </mat-chips-field>\n\n <!-- other -->\n <div *ngSwitchDefault>\n <mat-error *ngIf=\"type\">Unknown type {{type}} for option {{definition.key}}. Please report this error.</mat-error>\n <mat-error *ngIf=\"!type\">Error on option field. Please check console log for details.</mat-error>\n <div matSuffix>\n <ng-content select=\"[matSuffix]\"></ng-content>\n </div>\n </div>\n\n</ng-container>\n",
|
|
8115
8123
|
providers: [
|
|
8116
8124
|
{
|
|
8117
8125
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -8391,14 +8399,14 @@ class AudioProvider extends StartableService {
|
|
|
8391
8399
|
});
|
|
8392
8400
|
}
|
|
8393
8401
|
}
|
|
8394
|
-
AudioProvider.ɵprov =
|
|
8402
|
+
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" });
|
|
8395
8403
|
AudioProvider.decorators = [
|
|
8396
8404
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8397
8405
|
];
|
|
8398
8406
|
AudioProvider.ctorParameters = () => [
|
|
8399
8407
|
{ type: Platform },
|
|
8400
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
8401
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
8408
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
8409
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
8402
8410
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
8403
8411
|
];
|
|
8404
8412
|
|
|
@@ -8480,7 +8488,7 @@ class Hotkeys {
|
|
|
8480
8488
|
});
|
|
8481
8489
|
}
|
|
8482
8490
|
}
|
|
8483
|
-
Hotkeys.ɵprov =
|
|
8491
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
8484
8492
|
Hotkeys.decorators = [
|
|
8485
8493
|
{ type: Injectable, args: [{
|
|
8486
8494
|
providedIn: 'root'
|
|
@@ -8654,7 +8662,7 @@ class Base64ImageReader {
|
|
|
8654
8662
|
}
|
|
8655
8663
|
}
|
|
8656
8664
|
|
|
8657
|
-
const uuidv4
|
|
8665
|
+
const uuidv4 = uuidv4Imported;
|
|
8658
8666
|
class FileService {
|
|
8659
8667
|
constructor(platform,
|
|
8660
8668
|
//private transfer: FileTransfer,
|
|
@@ -8691,7 +8699,7 @@ class FileService {
|
|
|
8691
8699
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8692
8700
|
if (lastSlashIndex === -1)
|
|
8693
8701
|
throw new Error('Invalid URL: ' + source);
|
|
8694
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
8702
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8695
8703
|
// Download into the file system
|
|
8696
8704
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8697
8705
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8747,7 +8755,7 @@ class FileService {
|
|
|
8747
8755
|
this._started = true;
|
|
8748
8756
|
}
|
|
8749
8757
|
}
|
|
8750
|
-
FileService.ɵprov =
|
|
8758
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
8751
8759
|
FileService.decorators = [
|
|
8752
8760
|
{ type: Injectable, args: [{
|
|
8753
8761
|
providedIn: 'root',
|
|
@@ -8913,7 +8921,7 @@ class Base58 {
|
|
|
8913
8921
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
8914
8922
|
|
|
8915
8923
|
const scrypt = require('scrypt-async');
|
|
8916
|
-
const sha256
|
|
8924
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
8917
8925
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
8918
8926
|
const nacl = {
|
|
8919
8927
|
sign,
|
|
@@ -9017,7 +9025,7 @@ class CryptoService {
|
|
|
9017
9025
|
* Hash (using SHA256) a message
|
|
9018
9026
|
*/
|
|
9019
9027
|
sha256(message) {
|
|
9020
|
-
return sha256
|
|
9028
|
+
return sha256().update(message).digest('hex');
|
|
9021
9029
|
}
|
|
9022
9030
|
/**
|
|
9023
9031
|
* Hash (using SHA512) a message
|
|
@@ -9030,7 +9038,7 @@ class CryptoService {
|
|
|
9030
9038
|
return nacl.util.encodeBase64(m);
|
|
9031
9039
|
}
|
|
9032
9040
|
}
|
|
9033
|
-
CryptoService.ɵprov =
|
|
9041
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9034
9042
|
CryptoService.decorators = [
|
|
9035
9043
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9036
9044
|
];
|
|
@@ -10258,7 +10266,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10258
10266
|
return page;
|
|
10259
10267
|
}
|
|
10260
10268
|
}
|
|
10261
|
-
LocalSettingsService.ɵprov =
|
|
10269
|
+
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" });
|
|
10262
10270
|
LocalSettingsService.decorators = [
|
|
10263
10271
|
{ type: Injectable, args: [{
|
|
10264
10272
|
providedIn: 'root',
|
|
@@ -10916,7 +10924,7 @@ class NetworkService extends StartableService {
|
|
|
10916
10924
|
});
|
|
10917
10925
|
}
|
|
10918
10926
|
}
|
|
10919
|
-
NetworkService.ɵprov =
|
|
10927
|
+
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" });
|
|
10920
10928
|
NetworkService.decorators = [
|
|
10921
10929
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10922
10930
|
];
|
|
@@ -10927,16 +10935,16 @@ NetworkService.ctorParameters = () => [
|
|
|
10927
10935
|
{ type: CryptoService },
|
|
10928
10936
|
{ type: Storage },
|
|
10929
10937
|
{ type: LocalSettingsService },
|
|
10930
|
-
{ type: CacheService },
|
|
10938
|
+
{ type: CacheService$1 },
|
|
10931
10939
|
{ type: HttpClient },
|
|
10932
10940
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10933
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
10934
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
10941
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
10942
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
10935
10943
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
10936
10944
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
10937
10945
|
];
|
|
10938
10946
|
|
|
10939
|
-
const ErrorCodes
|
|
10947
|
+
const ErrorCodes = {
|
|
10940
10948
|
UNKNOWN_ERROR: 0,
|
|
10941
10949
|
LOAD_ACCOUNT_ERROR: 1,
|
|
10942
10950
|
BAD_PASSWORD: 2,
|
|
@@ -11288,7 +11296,7 @@ class EntityStore {
|
|
|
11288
11296
|
}
|
|
11289
11297
|
catch (err) {
|
|
11290
11298
|
console.error(err);
|
|
11291
|
-
throw { code: ErrorCodes
|
|
11299
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11292
11300
|
}
|
|
11293
11301
|
}
|
|
11294
11302
|
// Emit update event
|
|
@@ -11862,7 +11870,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11862
11870
|
}
|
|
11863
11871
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11864
11872
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11865
|
-
EntitiesStorage.ɵprov =
|
|
11873
|
+
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" });
|
|
11866
11874
|
EntitiesStorage.decorators = [
|
|
11867
11875
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11868
11876
|
];
|
|
@@ -11999,10 +12007,10 @@ function referentialToString(obj, properties) {
|
|
|
11999
12007
|
function referentialsToString(values, properties, separator) {
|
|
12000
12008
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12001
12009
|
}
|
|
12002
|
-
const ɵ0$
|
|
12010
|
+
const ɵ0$9 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12003
12011
|
const StatusList = Object.freeze([
|
|
12004
12012
|
{
|
|
12005
|
-
id: ɵ0$
|
|
12013
|
+
id: ɵ0$9,
|
|
12006
12014
|
icon: 'checkmark',
|
|
12007
12015
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12008
12016
|
},
|
|
@@ -12277,7 +12285,7 @@ function accountToString(data) {
|
|
|
12277
12285
|
(data.lastName || '')) || '';
|
|
12278
12286
|
}
|
|
12279
12287
|
|
|
12280
|
-
const uuidv4 = uuidv4Imported;
|
|
12288
|
+
const uuidv4$1 = uuidv4Imported;
|
|
12281
12289
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12282
12290
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12283
12291
|
/**
|
|
@@ -12321,7 +12329,7 @@ function createTrackerLink(opts) {
|
|
|
12321
12329
|
// Skip if not tracked
|
|
12322
12330
|
if (!context || !context.tracked)
|
|
12323
12331
|
return forward(operation);
|
|
12324
|
-
const id = context.serializationKey || uuidv4();
|
|
12332
|
+
const id = context.serializationKey || uuidv4$1();
|
|
12325
12333
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12326
12334
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12327
12335
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -12986,7 +12994,7 @@ class GraphqlService extends StartableService {
|
|
|
12986
12994
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
12987
12995
|
|| this.toAppError(err.networkError)
|
|
12988
12996
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
12989
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
12997
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
12990
12998
|
// If graphQL: try to convert the first error found
|
|
12991
12999
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
12992
13000
|
|| this.toAppError(err)
|
|
@@ -12994,7 +13002,7 @@ class GraphqlService extends StartableService {
|
|
|
12994
13002
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
12995
13003
|
|| err;
|
|
12996
13004
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
12997
|
-
if (error && error.code === ErrorCodes
|
|
13005
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12998
13006
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
12999
13007
|
this.onNetworkError.next(error);
|
|
13000
13008
|
}
|
|
@@ -13030,7 +13038,7 @@ class GraphqlService extends StartableService {
|
|
|
13030
13038
|
return 'ERROR.UNAUTHORIZED';
|
|
13031
13039
|
case ServerErrorCodes.FORBIDDEN:
|
|
13032
13040
|
return 'ERROR.FORBIDDEN';
|
|
13033
|
-
case ErrorCodes
|
|
13041
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13034
13042
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13035
13043
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13036
13044
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13061,7 +13069,7 @@ class GraphqlService extends StartableService {
|
|
|
13061
13069
|
return undefined;
|
|
13062
13070
|
}
|
|
13063
13071
|
}
|
|
13064
|
-
GraphqlService.ɵprov =
|
|
13072
|
+
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" });
|
|
13065
13073
|
GraphqlService.decorators = [
|
|
13066
13074
|
{ type: Injectable, args: [{
|
|
13067
13075
|
providedIn: 'root'
|
|
@@ -13078,7 +13086,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13078
13086
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13079
13087
|
];
|
|
13080
13088
|
|
|
13081
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13089
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
13082
13090
|
class BaseGraphqlServiceOptions {
|
|
13083
13091
|
}
|
|
13084
13092
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13229,8 +13237,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13229
13237
|
}
|
|
13230
13238
|
/* -- protected methods -- */
|
|
13231
13239
|
computeMutableWatchQueryId(opts) {
|
|
13232
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13233
|
-
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13240
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13241
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13234
13242
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13235
13243
|
}
|
|
13236
13244
|
findMutableWatchQueries(opts) {
|
|
@@ -13296,7 +13304,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13296
13304
|
/* ------------------------------------
|
|
13297
13305
|
* GraphQL queries
|
|
13298
13306
|
* ------------------------------------*/
|
|
13299
|
-
const Fragments
|
|
13307
|
+
const Fragments = {
|
|
13300
13308
|
account: gql `
|
|
13301
13309
|
fragment AccountFragment on AccountVO {
|
|
13302
13310
|
id
|
|
@@ -13331,14 +13339,14 @@ const Fragments$1 = {
|
|
|
13331
13339
|
}`
|
|
13332
13340
|
};
|
|
13333
13341
|
// Load account query
|
|
13334
|
-
const LoadQuery
|
|
13342
|
+
const LoadQuery = gql `
|
|
13335
13343
|
query Account {
|
|
13336
13344
|
data: account {
|
|
13337
13345
|
...AccountFragment
|
|
13338
13346
|
}
|
|
13339
13347
|
}
|
|
13340
|
-
${Fragments
|
|
13341
|
-
${Fragments
|
|
13348
|
+
${Fragments.account}
|
|
13349
|
+
${Fragments.settings}
|
|
13342
13350
|
`;
|
|
13343
13351
|
// Check email query
|
|
13344
13352
|
const IsEmailExistsQuery = gql `
|
|
@@ -13353,21 +13361,21 @@ const AccountMutations = {
|
|
|
13353
13361
|
...AccountFragment
|
|
13354
13362
|
}
|
|
13355
13363
|
}
|
|
13356
|
-
${Fragments
|
|
13357
|
-
${Fragments
|
|
13364
|
+
${Fragments.account}
|
|
13365
|
+
${Fragments.settings}`,
|
|
13358
13366
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
13359
13367
|
data: createAccount(account: $data){
|
|
13360
13368
|
...AccountFragment
|
|
13361
13369
|
}
|
|
13362
13370
|
}
|
|
13363
|
-
${Fragments
|
|
13364
|
-
${Fragments
|
|
13371
|
+
${Fragments.account}
|
|
13372
|
+
${Fragments.settings}`,
|
|
13365
13373
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
13366
13374
|
data: saveSettings(settings: $data){
|
|
13367
13375
|
...UserSettingsFragment
|
|
13368
13376
|
}
|
|
13369
13377
|
}
|
|
13370
|
-
${Fragments
|
|
13378
|
+
${Fragments.settings}`
|
|
13371
13379
|
};
|
|
13372
13380
|
// Sent confirmation email
|
|
13373
13381
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13676,7 +13684,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13676
13684
|
catch (error) {
|
|
13677
13685
|
console.error(error);
|
|
13678
13686
|
this.resetData();
|
|
13679
|
-
throw { code: ErrorCodes
|
|
13687
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13680
13688
|
}
|
|
13681
13689
|
// Store pubkey+keypair
|
|
13682
13690
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13710,7 +13718,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13710
13718
|
}
|
|
13711
13719
|
catch (err) {
|
|
13712
13720
|
// If account not found, check if email is valid
|
|
13713
|
-
if (err && +(err.code) === ErrorCodes
|
|
13721
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13714
13722
|
// Check email exists
|
|
13715
13723
|
if (data.username.indexOf('@') !== -1) {
|
|
13716
13724
|
let isEmailExists;
|
|
@@ -13722,11 +13730,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13722
13730
|
}
|
|
13723
13731
|
// Email not exists (no account)
|
|
13724
13732
|
if (!isEmailExists) {
|
|
13725
|
-
throw { code: ErrorCodes
|
|
13733
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13726
13734
|
}
|
|
13727
13735
|
}
|
|
13728
13736
|
// Email exists, so error = 'bad password'
|
|
13729
|
-
throw { code: ErrorCodes
|
|
13737
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13730
13738
|
}
|
|
13731
13739
|
throw err; // resend the first error
|
|
13732
13740
|
}
|
|
@@ -13851,8 +13859,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13851
13859
|
// Load remotely
|
|
13852
13860
|
else {
|
|
13853
13861
|
const { data } = yield this.graphql.query({
|
|
13854
|
-
query: LoadQuery
|
|
13855
|
-
error: { code: ErrorCodes
|
|
13862
|
+
query: LoadQuery,
|
|
13863
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13856
13864
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13857
13865
|
});
|
|
13858
13866
|
json = data;
|
|
@@ -13879,7 +13887,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13879
13887
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13880
13888
|
const isEmailExists = yield this.isEmailExists(email);
|
|
13881
13889
|
if (isEmailExists) {
|
|
13882
|
-
throw { code: ErrorCodes
|
|
13890
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13883
13891
|
}
|
|
13884
13892
|
});
|
|
13885
13893
|
}
|
|
@@ -13915,7 +13923,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13915
13923
|
locale
|
|
13916
13924
|
},
|
|
13917
13925
|
error: {
|
|
13918
|
-
code: ErrorCodes
|
|
13926
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13919
13927
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
13920
13928
|
}
|
|
13921
13929
|
});
|
|
@@ -13931,7 +13939,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13931
13939
|
code
|
|
13932
13940
|
},
|
|
13933
13941
|
error: {
|
|
13934
|
-
code: ErrorCodes
|
|
13942
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
13935
13943
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
13936
13944
|
}
|
|
13937
13945
|
});
|
|
@@ -13949,7 +13957,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13949
13957
|
interval: 10
|
|
13950
13958
|
},
|
|
13951
13959
|
error: {
|
|
13952
|
-
code: ErrorCodes
|
|
13960
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13953
13961
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
13954
13962
|
}
|
|
13955
13963
|
}).subscribe({
|
|
@@ -14050,7 +14058,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14050
14058
|
throw error;
|
|
14051
14059
|
console.error(error);
|
|
14052
14060
|
throw {
|
|
14053
|
-
code: ErrorCodes
|
|
14061
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14054
14062
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14055
14063
|
};
|
|
14056
14064
|
}
|
|
@@ -14218,7 +14226,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14218
14226
|
if (!isNew) {
|
|
14219
14227
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14220
14228
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14221
|
-
throw { code: ErrorCodes
|
|
14229
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14222
14230
|
}
|
|
14223
14231
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14224
14232
|
}
|
|
@@ -14230,7 +14238,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14230
14238
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14231
14239
|
variables: { data: json },
|
|
14232
14240
|
error: {
|
|
14233
|
-
code: ErrorCodes
|
|
14241
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14234
14242
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14235
14243
|
}
|
|
14236
14244
|
});
|
|
@@ -14257,7 +14265,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14257
14265
|
mutation: AccountMutations.saveSettings,
|
|
14258
14266
|
variables: { data: json },
|
|
14259
14267
|
error: {
|
|
14260
|
-
code: ErrorCodes
|
|
14268
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14261
14269
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14262
14270
|
}
|
|
14263
14271
|
});
|
|
@@ -14279,7 +14287,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14279
14287
|
if (counter > 4) {
|
|
14280
14288
|
if (this._debug)
|
|
14281
14289
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14282
|
-
throw { code: ErrorCodes
|
|
14290
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14283
14291
|
}
|
|
14284
14292
|
// Check if valid
|
|
14285
14293
|
if (token) {
|
|
@@ -14289,7 +14297,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14289
14297
|
token
|
|
14290
14298
|
},
|
|
14291
14299
|
error: {
|
|
14292
|
-
code: ErrorCodes
|
|
14300
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
14293
14301
|
message: 'ERROR.UNAUTHORIZED'
|
|
14294
14302
|
},
|
|
14295
14303
|
fetchPolicy: 'no-cache'
|
|
@@ -14305,7 +14313,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14305
14313
|
}
|
|
14306
14314
|
// Generate a new token
|
|
14307
14315
|
const challengeError = {
|
|
14308
|
-
code: ErrorCodes
|
|
14316
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14309
14317
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14310
14318
|
};
|
|
14311
14319
|
const data = yield this.graphql.query({
|
|
@@ -14344,7 +14352,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14344
14352
|
target.updateDate = source.updateDate || target.updateDate;
|
|
14345
14353
|
}
|
|
14346
14354
|
}
|
|
14347
|
-
AccountService.ɵprov =
|
|
14355
|
+
AccountService.ɵprov = ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(ɵɵinject(CryptoService), ɵɵinject(NetworkService), ɵɵinject(GraphqlService), ɵɵinject(LocalSettingsService), ɵɵinject(Storage), ɵɵinject(FileService), ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
14348
14356
|
AccountService.decorators = [
|
|
14349
14357
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14350
14358
|
];
|
|
@@ -14604,7 +14612,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
14604
14612
|
/* ------------------------------------
|
|
14605
14613
|
* GraphQL queries
|
|
14606
14614
|
* ------------------------------------*/
|
|
14607
|
-
const Fragments = {
|
|
14615
|
+
const Fragments$1 = {
|
|
14608
14616
|
config: gql `
|
|
14609
14617
|
fragment ConfigFragment on ConfigurationVO {
|
|
14610
14618
|
id
|
|
@@ -14631,13 +14639,13 @@ const Fragments = {
|
|
|
14631
14639
|
}
|
|
14632
14640
|
`
|
|
14633
14641
|
};
|
|
14634
|
-
const LoadQuery = gql `
|
|
14642
|
+
const LoadQuery$1 = gql `
|
|
14635
14643
|
query Configuration{
|
|
14636
14644
|
data: configuration{
|
|
14637
14645
|
...ConfigFragment
|
|
14638
14646
|
}
|
|
14639
14647
|
}
|
|
14640
|
-
${Fragments.config}
|
|
14648
|
+
${Fragments$1.config}
|
|
14641
14649
|
`;
|
|
14642
14650
|
// Save (create or update) account mutation
|
|
14643
14651
|
const SaveMutation = gql `
|
|
@@ -14646,7 +14654,7 @@ const SaveMutation = gql `
|
|
|
14646
14654
|
...ConfigFragment
|
|
14647
14655
|
}
|
|
14648
14656
|
}
|
|
14649
|
-
${Fragments.config}
|
|
14657
|
+
${Fragments$1.config}
|
|
14650
14658
|
`;
|
|
14651
14659
|
const ClearCache = gql `
|
|
14652
14660
|
query ClearCache($name: String) {
|
|
@@ -14696,12 +14704,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14696
14704
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14697
14705
|
const now = Date.now();
|
|
14698
14706
|
console.debug('[config] Loading Pod configuration...');
|
|
14699
|
-
const query = opts && opts.query || LoadQuery;
|
|
14707
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
14700
14708
|
const variables = opts && opts.variables || undefined;
|
|
14701
14709
|
const res = yield this.graphql.query({
|
|
14702
14710
|
query,
|
|
14703
14711
|
variables,
|
|
14704
|
-
error: { code: ErrorCodes
|
|
14712
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14705
14713
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14706
14714
|
});
|
|
14707
14715
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14731,7 +14739,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14731
14739
|
data: json
|
|
14732
14740
|
},
|
|
14733
14741
|
error: {
|
|
14734
|
-
code: ErrorCodes
|
|
14742
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14735
14743
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14736
14744
|
}
|
|
14737
14745
|
});
|
|
@@ -14757,7 +14765,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14757
14765
|
const res = yield this.graphql.query({
|
|
14758
14766
|
query: CacheStatistics,
|
|
14759
14767
|
variables: null,
|
|
14760
|
-
error: { code: ErrorCodes
|
|
14768
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14761
14769
|
fetchPolicy: 'network-only'
|
|
14762
14770
|
});
|
|
14763
14771
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14773,7 +14781,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14773
14781
|
const res = yield this.graphql.query({
|
|
14774
14782
|
query: ClearCache,
|
|
14775
14783
|
variables,
|
|
14776
|
-
error: { code: ErrorCodes
|
|
14784
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14777
14785
|
fetchPolicy: 'network-only'
|
|
14778
14786
|
});
|
|
14779
14787
|
const data = res && res.clearCache || undefined;
|
|
@@ -14932,7 +14940,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14932
14940
|
});
|
|
14933
14941
|
}
|
|
14934
14942
|
}
|
|
14935
|
-
ConfigService.ɵprov =
|
|
14943
|
+
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(ENVIRONMENT), ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
14936
14944
|
ConfigService.decorators = [
|
|
14937
14945
|
{ type: Injectable, args: [{
|
|
14938
14946
|
providedIn: 'root',
|
|
@@ -14951,7 +14959,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14951
14959
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
14952
14960
|
];
|
|
14953
14961
|
|
|
14954
|
-
const moment$
|
|
14962
|
+
const moment$4 = momentImported;
|
|
14955
14963
|
class PlatformService extends StartableService {
|
|
14956
14964
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14957
14965
|
super(platform);
|
|
@@ -15155,16 +15163,16 @@ class PlatformService extends StartableService {
|
|
|
15155
15163
|
}
|
|
15156
15164
|
// config moment lib
|
|
15157
15165
|
try {
|
|
15158
|
-
moment$
|
|
15166
|
+
moment$4.locale(event.lang);
|
|
15159
15167
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15160
15168
|
}
|
|
15161
15169
|
// If error, fallback to en
|
|
15162
15170
|
catch (err) {
|
|
15163
|
-
moment$
|
|
15171
|
+
moment$4.locale('en');
|
|
15164
15172
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15165
15173
|
}
|
|
15166
15174
|
// Config date adapter
|
|
15167
|
-
this.dateAdapter.setLocale(moment$
|
|
15175
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
15168
15176
|
}
|
|
15169
15177
|
});
|
|
15170
15178
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15298,7 +15306,7 @@ class PlatformService extends StartableService {
|
|
|
15298
15306
|
});
|
|
15299
15307
|
}
|
|
15300
15308
|
}
|
|
15301
|
-
PlatformService.ɵprov =
|
|
15309
|
+
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" });
|
|
15302
15310
|
PlatformService.decorators = [
|
|
15303
15311
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15304
15312
|
];
|
|
@@ -15313,15 +15321,15 @@ PlatformService.ctorParameters = () => [
|
|
|
15313
15321
|
{ type: NetworkService },
|
|
15314
15322
|
{ type: AccountService },
|
|
15315
15323
|
{ type: ConfigService },
|
|
15316
|
-
{ type: CacheService },
|
|
15324
|
+
{ type: CacheService$1 },
|
|
15317
15325
|
{ type: Storage },
|
|
15318
15326
|
{ type: AudioProvider },
|
|
15319
15327
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
15320
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
15328
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
15321
15329
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
15322
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
15323
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
15324
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
15330
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
15331
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] },
|
|
15332
|
+
{ type: Downloader$1, decorators: [{ type: Optional }] }
|
|
15325
15333
|
];
|
|
15326
15334
|
|
|
15327
15335
|
class AppHelpModal {
|
|
@@ -15385,7 +15393,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
15385
15393
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
15386
15394
|
}
|
|
15387
15395
|
}
|
|
15388
|
-
MatStepperI18n.ɵprov =
|
|
15396
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
15389
15397
|
MatStepperI18n.decorators = [
|
|
15390
15398
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15391
15399
|
];
|
|
@@ -16387,7 +16395,7 @@ function state2side(state) {
|
|
|
16387
16395
|
return 1;
|
|
16388
16396
|
}
|
|
16389
16397
|
}
|
|
16390
|
-
const ɵ0$
|
|
16398
|
+
const ɵ0$a = (defaultStateSize) => [
|
|
16391
16399
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
16392
16400
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
16393
16401
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -16395,7 +16403,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
16395
16403
|
const SCALE_OPTIONS_DEFAULT = {
|
|
16396
16404
|
startColor: rgbArrayMap.red,
|
|
16397
16405
|
startStates: [0, 2, 3],
|
|
16398
|
-
startStepsFn: ɵ0$
|
|
16406
|
+
startStepsFn: ɵ0$a
|
|
16399
16407
|
};
|
|
16400
16408
|
/**
|
|
16401
16409
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -16487,21 +16495,21 @@ function linearColorGradient(count, options) {
|
|
|
16487
16495
|
return result;
|
|
16488
16496
|
}
|
|
16489
16497
|
|
|
16490
|
-
class EntityTestClass
|
|
16498
|
+
class EntityTestClass {
|
|
16491
16499
|
}
|
|
16492
|
-
const FAKE_ENTITIES
|
|
16500
|
+
const FAKE_ENTITIES = [
|
|
16493
16501
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
16494
16502
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
16495
16503
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
16496
16504
|
];
|
|
16497
|
-
function deepCopy
|
|
16505
|
+
function deepCopy(values, size) {
|
|
16498
16506
|
if (isNil(size)) {
|
|
16499
|
-
return (values || FAKE_ENTITIES
|
|
16507
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16500
16508
|
}
|
|
16501
16509
|
let result = [];
|
|
16502
16510
|
let i = 1;
|
|
16503
16511
|
while (result.length < size) {
|
|
16504
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
16512
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
16505
16513
|
const name = entity.name + ' #' + i;
|
|
16506
16514
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
16507
16515
|
}));
|
|
@@ -16511,8 +16519,8 @@ function deepCopy$1(values, size) {
|
|
|
16511
16519
|
class AutocompleteTestPage {
|
|
16512
16520
|
constructor(formBuilder) {
|
|
16513
16521
|
this.formBuilder = formBuilder;
|
|
16514
|
-
this._items = deepCopy
|
|
16515
|
-
this
|
|
16522
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
16523
|
+
this._$items = new BehaviorSubject(undefined);
|
|
16516
16524
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16517
16525
|
this.memoryHide = false;
|
|
16518
16526
|
this.memoryMobile = true;
|
|
@@ -16541,7 +16549,7 @@ class AutocompleteTestPage {
|
|
|
16541
16549
|
});
|
|
16542
16550
|
// From $items observable
|
|
16543
16551
|
this.autocompleteFields.add('entity-$items', {
|
|
16544
|
-
items: this
|
|
16552
|
+
items: this._$items,
|
|
16545
16553
|
attributes: ['label', 'name'],
|
|
16546
16554
|
displayWith: this.entityToString
|
|
16547
16555
|
});
|
|
@@ -16555,7 +16563,7 @@ class AutocompleteTestPage {
|
|
|
16555
16563
|
});
|
|
16556
16564
|
// From items
|
|
16557
16565
|
this.autocompleteFields.add('entity-items-large', {
|
|
16558
|
-
items: FAKE_ENTITIES
|
|
16566
|
+
items: FAKE_ENTITIES.slice(),
|
|
16559
16567
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
16560
16568
|
displayWith: this.entityToString
|
|
16561
16569
|
});
|
|
@@ -16565,12 +16573,12 @@ class AutocompleteTestPage {
|
|
|
16565
16573
|
loadData() {
|
|
16566
16574
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16567
16575
|
const data = {
|
|
16568
|
-
entity: deepCopy
|
|
16576
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
16569
16577
|
// This item is NOT in the items list => i should be displayed anyway
|
|
16570
16578
|
missingEntity: {
|
|
16571
16579
|
id: -1, label: '??', name: 'Missing item'
|
|
16572
16580
|
},
|
|
16573
|
-
disableEntity: deepCopy
|
|
16581
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
16574
16582
|
};
|
|
16575
16583
|
this.form.setValue(data);
|
|
16576
16584
|
// Load observables
|
|
@@ -16579,7 +16587,7 @@ class AutocompleteTestPage {
|
|
|
16579
16587
|
}
|
|
16580
16588
|
loadItems() {
|
|
16581
16589
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16582
|
-
this
|
|
16590
|
+
this._$items.next(this._items.slice());
|
|
16583
16591
|
});
|
|
16584
16592
|
}
|
|
16585
16593
|
entityToString(item) {
|
|
@@ -16609,7 +16617,7 @@ class AutocompleteTestPage {
|
|
|
16609
16617
|
doSubmit(event) {
|
|
16610
16618
|
console.debug('Validate form: ', this.form.value);
|
|
16611
16619
|
}
|
|
16612
|
-
|
|
16620
|
+
equals(o1, o2) {
|
|
16613
16621
|
return o1 && o2 && o1.id === o2.id;
|
|
16614
16622
|
}
|
|
16615
16623
|
toggleMode(value) {
|
|
@@ -16640,7 +16648,7 @@ class AutocompleteTestPage {
|
|
|
16640
16648
|
AutocompleteTestPage.decorators = [
|
|
16641
16649
|
{ type: Component, args: [{
|
|
16642
16650
|
selector: 'app-autocomplete-test',
|
|
16643
|
-
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<any[]></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]=\"compareWithFn\"\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) => 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]=\"compareWithFn\"\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<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-$items')\"\n [mobile]=\"true\"\n [equals]=\"compareWithFn\"\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<any[]></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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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<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-items-filter')\"\n [placeholder]=\"'Entity'\"\n [mobile]=\"false\"\n [equals]=\"compareWithFn\"\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<any>\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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<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-$items')\"\n [logPrefix]=\"'[combo-desktop-2]'\"\n [equals]=\"compareWithFn\"\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<any[]></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]=\"compareWithFn\"\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 [equals]=\"compareWithFn\"\n [matAutocompletePosition]=\"'above'\"\n [logPrefix]=\"'[combo-desktop-full-size]'\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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]=\"compareWithFn\"\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"
|
|
16651
|
+
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<any[]></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) => 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<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-$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<any[]></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<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-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<any>\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<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-$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<any[]></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"
|
|
16644
16652
|
},] }
|
|
16645
16653
|
];
|
|
16646
16654
|
AutocompleteTestPage.ctorParameters = () => [
|
|
@@ -16743,13 +16751,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16743
16751
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16744
16752
|
];
|
|
16745
16753
|
|
|
16746
|
-
const moment$
|
|
16754
|
+
const moment$5 = momentImported;
|
|
16747
16755
|
class SwipeTestPage {
|
|
16748
16756
|
constructor(formBuilder, dateFormatPipe) {
|
|
16749
16757
|
this.formBuilder = formBuilder;
|
|
16750
16758
|
this.dateFormatPipe = dateFormatPipe;
|
|
16751
16759
|
this.$dates = new BehaviorSubject(undefined);
|
|
16752
|
-
this._today = moment$
|
|
16760
|
+
this._today = moment$5().startOf('day');
|
|
16753
16761
|
this.form = formBuilder.group({
|
|
16754
16762
|
empty: [null, Validators.required],
|
|
16755
16763
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16762,7 +16770,7 @@ class SwipeTestPage {
|
|
|
16762
16770
|
ngOnInit() {
|
|
16763
16771
|
const dates = [];
|
|
16764
16772
|
for (let d = 0; d < 7; d++) {
|
|
16765
|
-
dates[d] = moment$
|
|
16773
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
16766
16774
|
}
|
|
16767
16775
|
this.$dates.next(dates);
|
|
16768
16776
|
this.loadData();
|
|
@@ -16803,7 +16811,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16803
16811
|
{ type: DateFormatPipe }
|
|
16804
16812
|
];
|
|
16805
16813
|
|
|
16806
|
-
const moment = momentImported;
|
|
16814
|
+
const moment$6 = momentImported;
|
|
16807
16815
|
class DateTimeTestPage {
|
|
16808
16816
|
constructor(platform, formBuilder, cd) {
|
|
16809
16817
|
this.platform = platform;
|
|
@@ -16835,7 +16843,7 @@ class DateTimeTestPage {
|
|
|
16835
16843
|
// Load the form with data
|
|
16836
16844
|
loadData() {
|
|
16837
16845
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16838
|
-
const now = moment();
|
|
16846
|
+
const now = moment$6();
|
|
16839
16847
|
const data = {
|
|
16840
16848
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16841
16849
|
enable: toDateISOString(now),
|
|
@@ -16896,9 +16904,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16896
16904
|
{ type: ChangeDetectorRef }
|
|
16897
16905
|
];
|
|
16898
16906
|
|
|
16899
|
-
class EntityTestClass {
|
|
16907
|
+
class EntityTestClass$1 {
|
|
16900
16908
|
}
|
|
16901
|
-
const FAKE_ENTITIES = [
|
|
16909
|
+
const FAKE_ENTITIES$1 = [
|
|
16902
16910
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16903
16911
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16904
16912
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -16907,13 +16915,24 @@ const FAKE_ENTITIES = [
|
|
|
16907
16915
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
16908
16916
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
16909
16917
|
];
|
|
16910
|
-
function deepCopy(values) {
|
|
16911
|
-
|
|
16918
|
+
function deepCopy$1(values, size) {
|
|
16919
|
+
if (isNil(size)) {
|
|
16920
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16921
|
+
}
|
|
16922
|
+
let result = [];
|
|
16923
|
+
let i = 1;
|
|
16924
|
+
while (result.length < size) {
|
|
16925
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
16926
|
+
const name = entity.name + ' #' + i;
|
|
16927
|
+
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
16928
|
+
}));
|
|
16929
|
+
}
|
|
16930
|
+
return result.slice(0, size);
|
|
16912
16931
|
}
|
|
16913
16932
|
class ChipsTestPage {
|
|
16914
16933
|
constructor(formBuilder) {
|
|
16915
16934
|
this.formBuilder = formBuilder;
|
|
16916
|
-
this._items = deepCopy(FAKE_ENTITIES);
|
|
16935
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
16917
16936
|
this._$items = new BehaviorSubject(undefined);
|
|
16918
16937
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16919
16938
|
this.form = formBuilder.group({
|
|
@@ -16933,12 +16952,12 @@ class ChipsTestPage {
|
|
|
16933
16952
|
});
|
|
16934
16953
|
// From items
|
|
16935
16954
|
this.autocompleteFields.add('entity-items', {
|
|
16936
|
-
items:
|
|
16955
|
+
items: this._items.slice(),
|
|
16937
16956
|
attributes: ['label', 'name'],
|
|
16938
16957
|
displayWith: this.entityToString,
|
|
16939
16958
|
equals: (o1, o2) => EntityUtils.compare(o1, o2, 1, 'id') === 0
|
|
16940
16959
|
});
|
|
16941
|
-
// From items
|
|
16960
|
+
// From $items observable
|
|
16942
16961
|
this.autocompleteFields.add('entity-$items', {
|
|
16943
16962
|
items: this._$items,
|
|
16944
16963
|
attributes: ['label', 'name'],
|
|
@@ -16952,18 +16971,20 @@ class ChipsTestPage {
|
|
|
16952
16971
|
// Load the form with data
|
|
16953
16972
|
loadData() {
|
|
16954
16973
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16974
|
+
const items = deepCopy$1(FAKE_ENTITIES$1);
|
|
16955
16975
|
const data = {
|
|
16956
|
-
entity:
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16976
|
+
entity: items.slice(0, 1),
|
|
16977
|
+
entityInitial: items.slice(1, 2),
|
|
16978
|
+
disableEntity: items.slice(1, 2)
|
|
16960
16979
|
};
|
|
16961
16980
|
this.form.setValue(data);
|
|
16981
|
+
// Load observables
|
|
16982
|
+
setTimeout(() => this.loadItems(), 1000);
|
|
16962
16983
|
});
|
|
16963
16984
|
}
|
|
16964
16985
|
loadItems() {
|
|
16965
16986
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16966
|
-
this._$items.next(
|
|
16987
|
+
this._$items.next(this._items.slice());
|
|
16967
16988
|
});
|
|
16968
16989
|
}
|
|
16969
16990
|
entityToString(item) {
|
|
@@ -16971,7 +16992,23 @@ class ChipsTestPage {
|
|
|
16971
16992
|
}
|
|
16972
16993
|
suggest(value, filter) {
|
|
16973
16994
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16974
|
-
|
|
16995
|
+
filter = Object.assign({ offset: 0, size: 30 }, filter);
|
|
16996
|
+
const res = suggestFromArray(this._items, value, Object.assign(Object.assign({}, filter), { searchAttributes: ['label', 'name'] }));
|
|
16997
|
+
// Simulate a size = 30
|
|
16998
|
+
const total = res.total || res.data.length;
|
|
16999
|
+
const nextOffset = filter.offset + res.data.length;
|
|
17000
|
+
if (nextOffset < total) {
|
|
17001
|
+
filter = Object.assign(Object.assign({}, filter), { offset: nextOffset });
|
|
17002
|
+
return {
|
|
17003
|
+
total,
|
|
17004
|
+
data: res.data,
|
|
17005
|
+
fetchMore: (variables) => __awaiter(this, void 0, void 0, function* () {
|
|
17006
|
+
yield sleep(1000);
|
|
17007
|
+
return this.suggest(value, Object.assign(Object.assign({}, filter), variables));
|
|
17008
|
+
})
|
|
17009
|
+
};
|
|
17010
|
+
}
|
|
17011
|
+
return res;
|
|
16975
17012
|
});
|
|
16976
17013
|
}
|
|
16977
17014
|
doSubmit(event) {
|
|
@@ -16988,7 +17025,7 @@ class ChipsTestPage {
|
|
|
16988
17025
|
ChipsTestPage.decorators = [
|
|
16989
17026
|
{ type: Component, args: [{
|
|
16990
17027
|
selector: 'app-chips-test',
|
|
16991
|
-
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>Chips field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <ion-row>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Suggest() function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-empty] '\"\n chipColor=\"accent\"\n [debug]=\"
|
|
17028
|
+
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>Chips field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <ion-row>\n\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-text color=\"primary\">\n Suggest() function\n </ion-text>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-empty] '\"\n chipColor=\"accent\"\n [debug]=\"false\"\n ></mat-chips-field>\n {{stringify(form.controls.entity.value)}}\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 Suggest() function with initial value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <pre><small>suggestFn: (searchText, filter) => any[]</small></pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-chips-field formControlName=\"entityInitial\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [logPrefix]=\"'[mat-chips-initialized] '\"\n chipColor=\"primary\"\n [debug]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.entityInitial.value)}}\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-chips-field formControlName=\"disableEntity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[mat-chips-disabled] '\"\n chipColor=\"warning\"\n [debug]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.disableEntity.value)}}\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-chips-field formControlName=\"entity\"\n [config]=\"autocompleteFields.get('entity-suggestFn')\"\n [equals]=\"equals\"\n [logPrefix]=\"'[mat-chips-readonly] '\"\n [readonly]=\"true\"\n ></mat-chips-field>\n {{stringify(form.controls.entity.value)}}\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
16992
17029
|
},] }
|
|
16993
17030
|
];
|
|
16994
17031
|
ChipsTestPage.ctorParameters = () => [
|
|
@@ -17004,7 +17041,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
17004
17041
|
},] }
|
|
17005
17042
|
];
|
|
17006
17043
|
|
|
17007
|
-
const routes
|
|
17044
|
+
const routes = [
|
|
17008
17045
|
{
|
|
17009
17046
|
path: '',
|
|
17010
17047
|
pathMatch: 'full',
|
|
@@ -17056,7 +17093,7 @@ MaterialTestingModule.decorators = [
|
|
|
17056
17093
|
ReactiveFormsModule,
|
|
17057
17094
|
SharedMaterialModule,
|
|
17058
17095
|
TranslateModule.forChild(),
|
|
17059
|
-
RouterModule.forChild(routes
|
|
17096
|
+
RouterModule.forChild(routes)
|
|
17060
17097
|
],
|
|
17061
17098
|
declarations: [
|
|
17062
17099
|
MaterialTestingPage,
|
|
@@ -18071,7 +18108,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18071
18108
|
});
|
|
18072
18109
|
}
|
|
18073
18110
|
}
|
|
18074
|
-
UserSettingsValidatorService.ɵprov =
|
|
18111
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18075
18112
|
UserSettingsValidatorService.decorators = [
|
|
18076
18113
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18077
18114
|
];
|
|
@@ -18115,7 +18152,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18115
18152
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18116
18153
|
}
|
|
18117
18154
|
}
|
|
18118
|
-
AccountValidatorService.ɵprov =
|
|
18155
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18119
18156
|
AccountValidatorService.decorators = [
|
|
18120
18157
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18121
18158
|
];
|
|
@@ -18680,7 +18717,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
18680
18717
|
});
|
|
18681
18718
|
}
|
|
18682
18719
|
}
|
|
18683
|
-
LocalSettingsValidatorService.ɵprov =
|
|
18720
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
18684
18721
|
LocalSettingsValidatorService.decorators = [
|
|
18685
18722
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18686
18723
|
];
|
|
@@ -19299,7 +19336,7 @@ class IsOnFieldModePipe {
|
|
|
19299
19336
|
return value === 'FIELD';
|
|
19300
19337
|
}
|
|
19301
19338
|
}
|
|
19302
|
-
IsOnFieldModePipe.ɵprov =
|
|
19339
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
19303
19340
|
IsOnFieldModePipe.decorators = [
|
|
19304
19341
|
{ type: Pipe, args: [{
|
|
19305
19342
|
name: 'isOnField'
|
|
@@ -19311,7 +19348,7 @@ class IsNotOnFieldModePipe {
|
|
|
19311
19348
|
return value !== 'FIELD';
|
|
19312
19349
|
}
|
|
19313
19350
|
}
|
|
19314
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
19351
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
19315
19352
|
IsNotOnFieldModePipe.decorators = [
|
|
19316
19353
|
{ type: Pipe, args: [{
|
|
19317
19354
|
name: 'isNotOnField'
|
|
@@ -19326,7 +19363,7 @@ class PersonToStringPipe {
|
|
|
19326
19363
|
return PersonUtils.personToString(value);
|
|
19327
19364
|
}
|
|
19328
19365
|
}
|
|
19329
|
-
PersonToStringPipe.ɵprov =
|
|
19366
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
19330
19367
|
PersonToStringPipe.decorators = [
|
|
19331
19368
|
{ type: Pipe, args: [{
|
|
19332
19369
|
name: 'personToString'
|
|
@@ -19711,7 +19748,7 @@ class IsLoginAccountPipe {
|
|
|
19711
19748
|
return value && value.pubkey && true;
|
|
19712
19749
|
}
|
|
19713
19750
|
}
|
|
19714
|
-
IsLoginAccountPipe.ɵprov =
|
|
19751
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
19715
19752
|
IsLoginAccountPipe.decorators = [
|
|
19716
19753
|
{ type: Pipe, args: [{
|
|
19717
19754
|
name: 'isLogin'
|
|
@@ -19723,7 +19760,7 @@ class AccountToStringPipe {
|
|
|
19723
19760
|
return accountToString(value);
|
|
19724
19761
|
}
|
|
19725
19762
|
}
|
|
19726
|
-
AccountToStringPipe.ɵprov =
|
|
19763
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
19727
19764
|
AccountToStringPipe.decorators = [
|
|
19728
19765
|
{ type: Pipe, args: [{
|
|
19729
19766
|
name: 'accountToString'
|
|
@@ -19738,7 +19775,7 @@ class DepartmentToStringPipe {
|
|
|
19738
19775
|
return departmentToString(value);
|
|
19739
19776
|
}
|
|
19740
19777
|
}
|
|
19741
|
-
DepartmentToStringPipe.ɵprov =
|
|
19778
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
19742
19779
|
DepartmentToStringPipe.decorators = [
|
|
19743
19780
|
{ type: Pipe, args: [{
|
|
19744
19781
|
name: 'departmentToString'
|
|
@@ -19764,7 +19801,7 @@ class MenuService {
|
|
|
19764
19801
|
this._visibleSubject.next(value);
|
|
19765
19802
|
}
|
|
19766
19803
|
}
|
|
19767
|
-
MenuService.ɵprov =
|
|
19804
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19768
19805
|
MenuService.decorators = [
|
|
19769
19806
|
{ type: Injectable, args: [{
|
|
19770
19807
|
providedIn: 'root'
|
|
@@ -20288,7 +20325,7 @@ class AuthGuardService {
|
|
|
20288
20325
|
}));
|
|
20289
20326
|
}
|
|
20290
20327
|
}
|
|
20291
|
-
AuthGuardService.ɵprov =
|
|
20328
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
20292
20329
|
AuthGuardService.decorators = [
|
|
20293
20330
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
20294
20331
|
];
|
|
@@ -20330,7 +20367,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20330
20367
|
query,
|
|
20331
20368
|
variables: { id },
|
|
20332
20369
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20333
|
-
error: { code: ErrorCodes
|
|
20370
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20334
20371
|
})
|
|
20335
20372
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
20336
20373
|
? (data && this.fromObject(data))
|
|
@@ -20345,7 +20382,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20345
20382
|
query,
|
|
20346
20383
|
variables: { id },
|
|
20347
20384
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20348
|
-
error: { code: ErrorCodes
|
|
20385
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20349
20386
|
});
|
|
20350
20387
|
// Convert to entity
|
|
20351
20388
|
return (!opts || opts.toEntity !== false)
|
|
@@ -20376,7 +20413,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20376
20413
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
20377
20414
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
20378
20415
|
variables,
|
|
20379
|
-
error: { code: ErrorCodes
|
|
20416
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
20380
20417
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
20381
20418
|
})
|
|
20382
20419
|
.pipe(map(({ data, total }) => {
|
|
@@ -20412,7 +20449,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20412
20449
|
const { data, total } = yield this.graphql.query({
|
|
20413
20450
|
query,
|
|
20414
20451
|
variables,
|
|
20415
|
-
error: { code: ErrorCodes
|
|
20452
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
20416
20453
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20417
20454
|
});
|
|
20418
20455
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -20451,7 +20488,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20451
20488
|
variables: {
|
|
20452
20489
|
filter: filter && filter.asPodObject()
|
|
20453
20490
|
},
|
|
20454
|
-
error: { code: ErrorCodes
|
|
20491
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
20455
20492
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20456
20493
|
});
|
|
20457
20494
|
return res.total;
|
|
@@ -20484,7 +20521,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20484
20521
|
variables: {
|
|
20485
20522
|
data: json
|
|
20486
20523
|
},
|
|
20487
|
-
error: { code: ErrorCodes
|
|
20524
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20488
20525
|
update: (proxy, { data }) => {
|
|
20489
20526
|
const savedEntities = data && data.data;
|
|
20490
20527
|
if (savedEntities) {
|
|
@@ -20540,7 +20577,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20540
20577
|
variables: {
|
|
20541
20578
|
data: json
|
|
20542
20579
|
},
|
|
20543
|
-
error: { code: ErrorCodes
|
|
20580
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20544
20581
|
update: (cache, { data }) => {
|
|
20545
20582
|
// Update entity
|
|
20546
20583
|
const savedEntity = data && data.data;
|
|
@@ -20588,7 +20625,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20588
20625
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20589
20626
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20590
20627
|
variables: { ids },
|
|
20591
|
-
error: { code: ErrorCodes
|
|
20628
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20592
20629
|
update: (cache, res) => {
|
|
20593
20630
|
// Remove from cache
|
|
20594
20631
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20629,7 +20666,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20629
20666
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20630
20667
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20631
20668
|
variables: { id },
|
|
20632
|
-
error: { code: ErrorCodes
|
|
20669
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20633
20670
|
update: (proxy, res) => {
|
|
20634
20671
|
// Remove from cache
|
|
20635
20672
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20662,7 +20699,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20662
20699
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
20663
20700
|
variables,
|
|
20664
20701
|
error: {
|
|
20665
|
-
code: ErrorCodes
|
|
20702
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
20666
20703
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
20667
20704
|
}
|
|
20668
20705
|
})
|
|
@@ -20848,7 +20885,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
20848
20885
|
if (this._debug)
|
|
20849
20886
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
20850
20887
|
// Stop with an error
|
|
20851
|
-
throw { code: ErrorCodes
|
|
20888
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20852
20889
|
}
|
|
20853
20890
|
this._editingRowCount = 0;
|
|
20854
20891
|
let data;
|
|
@@ -21328,13 +21365,6 @@ class AppTable {
|
|
|
21328
21365
|
markAsLoaded(opts) {
|
|
21329
21366
|
this.setLoading(false, opts);
|
|
21330
21367
|
}
|
|
21331
|
-
markRowAsDirty(row, opts) {
|
|
21332
|
-
var _a;
|
|
21333
|
-
row = row || this.editedRow;
|
|
21334
|
-
if (row)
|
|
21335
|
-
(_a = row.validator) === null || _a === void 0 ? void 0 : _a.markAsDirty(opts);
|
|
21336
|
-
this.markAsDirty(opts);
|
|
21337
|
-
}
|
|
21338
21368
|
markAsReady(opts) {
|
|
21339
21369
|
if (this.readySubject.value !== true) {
|
|
21340
21370
|
this.readySubject.next(true);
|
|
@@ -21717,14 +21747,14 @@ class AppTable {
|
|
|
21717
21747
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21718
21748
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
21719
21749
|
if (this.readOnly) {
|
|
21720
|
-
throw { code: ErrorCodes
|
|
21750
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21721
21751
|
}
|
|
21722
21752
|
this.resetError();
|
|
21723
21753
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
21724
21754
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
21725
21755
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
21726
21756
|
if (!this.confirmEditCreate()) {
|
|
21727
|
-
throw { code: ErrorCodes
|
|
21757
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21728
21758
|
}
|
|
21729
21759
|
// Mark as saving
|
|
21730
21760
|
this.markAsSaving();
|
|
@@ -21841,7 +21871,7 @@ class AppTable {
|
|
|
21841
21871
|
var _a;
|
|
21842
21872
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21843
21873
|
if (this.readOnly) {
|
|
21844
|
-
throw { code: ErrorCodes
|
|
21874
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21845
21875
|
}
|
|
21846
21876
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
21847
21877
|
return 0; // SKip
|
|
@@ -22455,6 +22485,13 @@ class AppTable {
|
|
|
22455
22485
|
equals(d1, d2) {
|
|
22456
22486
|
return EntityUtils.equals(d1, d2, 'id');
|
|
22457
22487
|
}
|
|
22488
|
+
markRowAsDirty(row, opts) {
|
|
22489
|
+
var _a;
|
|
22490
|
+
row = row || this.editedRow;
|
|
22491
|
+
if (row)
|
|
22492
|
+
(_a = row.validator) === null || _a === void 0 ? void 0 : _a.markAsDirty(opts);
|
|
22493
|
+
this.markAsDirty(opts);
|
|
22494
|
+
}
|
|
22458
22495
|
/* -- private method -- */
|
|
22459
22496
|
setLoading(value, opts) {
|
|
22460
22497
|
if (this.loadingSubject.value !== value) {
|
|
@@ -23360,7 +23397,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23360
23397
|
try {
|
|
23361
23398
|
const data = yield this.dataService.load(id, opts);
|
|
23362
23399
|
if (!data)
|
|
23363
|
-
throw { code: ErrorCodes
|
|
23400
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
23364
23401
|
this._usageMode = this.computeUsageMode(data);
|
|
23365
23402
|
yield this.onEntityLoaded(data, opts);
|
|
23366
23403
|
yield this.updateView(data, opts);
|
|
@@ -24265,7 +24302,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24265
24302
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
24266
24303
|
}
|
|
24267
24304
|
}
|
|
24268
|
-
UserEventService.ɵprov =
|
|
24305
|
+
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" });
|
|
24269
24306
|
UserEventService.decorators = [
|
|
24270
24307
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24271
24308
|
];
|
|
@@ -24650,7 +24687,7 @@ class PersonService extends BaseEntityService {
|
|
|
24650
24687
|
return target;
|
|
24651
24688
|
}
|
|
24652
24689
|
}
|
|
24653
|
-
PersonService.ɵprov =
|
|
24690
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
24654
24691
|
PersonService.decorators = [
|
|
24655
24692
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24656
24693
|
];
|
|
@@ -24681,7 +24718,7 @@ class PersonValidatorService {
|
|
|
24681
24718
|
return this.formBuilder.group(formConfig);
|
|
24682
24719
|
}
|
|
24683
24720
|
}
|
|
24684
|
-
PersonValidatorService.ɵprov =
|
|
24721
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
24685
24722
|
PersonValidatorService.decorators = [
|
|
24686
24723
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24687
24724
|
];
|
|
@@ -24887,16 +24924,16 @@ AdminModule.decorators = [
|
|
|
24887
24924
|
];
|
|
24888
24925
|
AdminModule.ctorParameters = () => [];
|
|
24889
24926
|
|
|
24890
|
-
const ɵ0 = {
|
|
24927
|
+
const ɵ0$b = {
|
|
24891
24928
|
profile: 'ADMIN'
|
|
24892
24929
|
};
|
|
24893
|
-
const routes = [
|
|
24930
|
+
const routes$1 = [
|
|
24894
24931
|
{
|
|
24895
24932
|
path: 'users',
|
|
24896
24933
|
pathMatch: 'full',
|
|
24897
24934
|
component: UsersPage,
|
|
24898
24935
|
canActivate: [AuthGuardService],
|
|
24899
|
-
data: ɵ0
|
|
24936
|
+
data: ɵ0$b
|
|
24900
24937
|
}
|
|
24901
24938
|
];
|
|
24902
24939
|
class AdminRoutingModule {
|
|
@@ -24906,13 +24943,13 @@ AdminRoutingModule.decorators = [
|
|
|
24906
24943
|
imports: [
|
|
24907
24944
|
SharedRoutingModule,
|
|
24908
24945
|
AdminModule,
|
|
24909
|
-
RouterModule.forChild(routes)
|
|
24946
|
+
RouterModule.forChild(routes$1)
|
|
24910
24947
|
],
|
|
24911
24948
|
exports: [RouterModule]
|
|
24912
24949
|
},] }
|
|
24913
24950
|
];
|
|
24914
24951
|
|
|
24915
|
-
const ErrorCodes = {
|
|
24952
|
+
const ErrorCodes$2 = {
|
|
24916
24953
|
LOAD_PERSONS_ERROR: 100,
|
|
24917
24954
|
SAVE_PERSONS_ERROR: 101,
|
|
24918
24955
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -24924,5 +24961,5 @@ const ErrorCodes = {
|
|
|
24924
24961
|
* Generated bundle index. Do not edit.
|
|
24925
24962
|
*/
|
|
24926
24963
|
|
|
24927
|
-
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, 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, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, 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, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, 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, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, 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, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, 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, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, 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, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$
|
|
24964
|
+
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, 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, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, 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, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes$2 as ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, 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, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, 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, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, 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, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, 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, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$7 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, SharedMatBadgeIconModule as ɵc, MatBadgeIconDirective as ɵd, isFocusableElement as ɵe, MatBadgeIconTestPage as ɵf, RegisterForm as ɵg, AccountValidatorService as ɵh, RegisterModal as ɵi, UserSettingsValidatorService as ɵj, LocalSettingsValidatorService as ɵk, AppIconComponent as ɵl };
|
|
24928
24965
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|