@sumaris-net/ngx-components 0.22.1 → 0.23.2
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/ngx-sumaris-components.umd.js +311 -311
- package/bundles/ngx-sumaris-components.umd.js.map +1 -1
- package/bundles/ngx-sumaris-components.umd.min.js +2 -2
- package/bundles/ngx-sumaris-components.umd.min.js.map +1 -1
- package/doc/changelog.md +4 -0
- package/esm2015/src/app/admin/users/list/users.js +1 -1
- package/esm2015/src/app/core/form/form-buttons-bar.component.js +2 -1
- package/esm2015/src/app/core/services/local-settings.service.js +2 -2
- package/esm2015/src/app/core/table/table.class.js +6 -11
- package/esm2015/src/app/shared/functions.js +2 -5
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +45 -12
- package/esm2015/src/app/shared/material/autocomplete/testing/autocomplete.test.js +2 -2
- package/esm2015/src/app/shared/material/boolean/material.boolean.js +1 -1
- package/fesm2015/ngx-sumaris-components.js +308 -298
- package/fesm2015/ngx-sumaris-components.js.map +1 -1
- package/ngx-sumaris-components.metadata.json +1 -1
- package/package.json +1 -1
- package/src/app/core/table/table.class.d.ts +1 -3
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +7 -2
- package/src/assets/i18n/fr.json +1 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InjectionToken, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, HostBinding, Output, ViewChild, Pipe, Injectable, Directive, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, Injector, Inject, Renderer2 } from '@angular/core';
|
|
3
|
-
import * as i1$3 from '@angular/common';
|
|
1
|
+
import { InjectionToken, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, HostBinding, Output, ViewChild, ɵɵdefineInjectable, ɵɵinject, Pipe, Injectable, Directive, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injector, Inject, Renderer2 } 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
|
-
import {
|
|
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, ReactiveFormsModule, AbstractControl, Validators, FormBuilder, FormControl, FormGroup, FormArray } from '@angular/forms';
|
|
39
34
|
import { timer, merge, fromEvent, Subscription, BehaviorSubject, Subject, isObservable, of, noop as noop$8, Observable, defer, concat, combineLatest, EMPTY } from 'rxjs';
|
|
40
35
|
import { filter, first, map, takeUntil, startWith, debounceTime, takeWhile, switchMap, tap, distinctUntilChanged, mergeMap, catchError, throttleTime } 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,12 +79,11 @@ 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
|
|
100
|
-
import
|
|
101
|
-
import
|
|
84
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx/index';
|
|
85
|
+
import { Keyboard as Keyboard$1 } from '@ionic-native/keyboard/ngx/index';
|
|
86
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx/index';
|
|
102
87
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
103
88
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
104
89
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -265,10 +250,7 @@ function suggestFromArray(items, value, opts) {
|
|
|
265
250
|
items = items.filter(v => !opts.excludedIds.includes(+v['id']));
|
|
266
251
|
}
|
|
267
252
|
// Sort
|
|
268
|
-
|
|
269
|
-
if (sortAttribute) {
|
|
270
|
-
items = sort(items, sortAttribute);
|
|
271
|
-
}
|
|
253
|
+
items = items.sort(propertiesPathComparator(keys));
|
|
272
254
|
// Truncate if need
|
|
273
255
|
const total = (items === null || items === void 0 ? void 0 : items.length) || 0;
|
|
274
256
|
if (opts) {
|
|
@@ -887,19 +869,19 @@ class MatAutocompleteConfigHolder {
|
|
|
887
869
|
return this.fields[fieldName] || this.add(fieldName);
|
|
888
870
|
}
|
|
889
871
|
}
|
|
890
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
872
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
891
873
|
provide: NG_VALUE_ACCESSOR,
|
|
892
874
|
useExisting: forwardRef(() => MatAutocompleteField),
|
|
893
875
|
multi: true
|
|
894
876
|
};
|
|
895
|
-
const noop
|
|
896
|
-
const ɵ0
|
|
877
|
+
const noop = () => { };
|
|
878
|
+
const ɵ0 = noop;
|
|
897
879
|
class MatAutocompleteField {
|
|
898
880
|
constructor(cd, formGroupDir) {
|
|
899
881
|
this.cd = cd;
|
|
900
882
|
this.formGroupDir = formGroupDir;
|
|
901
|
-
this._onChangeCallback = noop
|
|
902
|
-
this._onTouchedCallback = noop
|
|
883
|
+
this._onChangeCallback = noop;
|
|
884
|
+
this._onTouchedCallback = noop;
|
|
903
885
|
this._subscription = new Subscription();
|
|
904
886
|
this._filter$ = new BehaviorSubject(undefined);
|
|
905
887
|
this._reload$ = new Subject();
|
|
@@ -927,6 +909,8 @@ class MatAutocompleteField {
|
|
|
927
909
|
this.onBlur = new EventEmitter();
|
|
928
910
|
this.onFocus = new EventEmitter();
|
|
929
911
|
this.onDropButtonClick = new EventEmitter(true);
|
|
912
|
+
this.onKeydownEscape = new EventEmitter();
|
|
913
|
+
this.onKeyupEnter = new EventEmitter();
|
|
930
914
|
}
|
|
931
915
|
get itemCount() {
|
|
932
916
|
return this._itemCount;
|
|
@@ -1170,6 +1154,15 @@ class MatAutocompleteField {
|
|
|
1170
1154
|
.pipe(distinctUntilChanged())
|
|
1171
1155
|
// Update component state
|
|
1172
1156
|
.subscribe(() => this.checkIfTouched()));
|
|
1157
|
+
this._subscription.add(this.onKeydownEscape.subscribe(event => {
|
|
1158
|
+
if (this.isOpen) {
|
|
1159
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
1160
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
1161
|
+
// DEBUG
|
|
1162
|
+
//console.debug(this.logPrefix + " Closing the panel (keydown.escape)");
|
|
1163
|
+
this.closePanel();
|
|
1164
|
+
}
|
|
1165
|
+
}));
|
|
1173
1166
|
}
|
|
1174
1167
|
ngOnDestroy() {
|
|
1175
1168
|
this._subscription.unsubscribe();
|
|
@@ -1181,6 +1174,8 @@ class MatAutocompleteField {
|
|
|
1181
1174
|
this.onClick.complete();
|
|
1182
1175
|
this.onBlur.complete();
|
|
1183
1176
|
this.onFocus.complete();
|
|
1177
|
+
this.onKeydownEscape.complete();
|
|
1178
|
+
this.onKeyupEnter.complete();
|
|
1184
1179
|
this._implicitValue = undefined;
|
|
1185
1180
|
this.formControl = null;
|
|
1186
1181
|
this.displayWith = null;
|
|
@@ -1194,8 +1189,8 @@ class MatAutocompleteField {
|
|
|
1194
1189
|
this._onTouchedCallback = null;
|
|
1195
1190
|
this._onFetchMoreCallback = null;
|
|
1196
1191
|
// Destroy the 'autocomplete' instance, to avoid memory leak
|
|
1197
|
-
if (this.
|
|
1198
|
-
this.
|
|
1192
|
+
if (this.matAutocomplete) {
|
|
1193
|
+
this.matAutocomplete.ngOnDestroy();
|
|
1199
1194
|
}
|
|
1200
1195
|
}
|
|
1201
1196
|
/**
|
|
@@ -1221,8 +1216,8 @@ class MatAutocompleteField {
|
|
|
1221
1216
|
}
|
|
1222
1217
|
setDisabledState(isDisabled) {
|
|
1223
1218
|
var _a;
|
|
1224
|
-
if (isDisabled && ((_a = this.
|
|
1225
|
-
|
|
1219
|
+
if (isDisabled && ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen)) {
|
|
1220
|
+
this.closePanel();
|
|
1226
1221
|
}
|
|
1227
1222
|
this.cd.markForCheck();
|
|
1228
1223
|
}
|
|
@@ -1320,7 +1315,7 @@ class MatAutocompleteField {
|
|
|
1320
1315
|
event.stopPropagation();
|
|
1321
1316
|
}
|
|
1322
1317
|
_initAutocompleteInfiniteScroll(threshold) {
|
|
1323
|
-
if (!this.
|
|
1318
|
+
if (!this.matAutocomplete)
|
|
1324
1319
|
return; // Skip
|
|
1325
1320
|
// DEBUG
|
|
1326
1321
|
//console.debug(this.logPrefix + ' Init autocomplete scroll listener');
|
|
@@ -1328,12 +1323,12 @@ class MatAutocompleteField {
|
|
|
1328
1323
|
this._openedSubscription.unsubscribe();
|
|
1329
1324
|
this._subscription.remove(this._openedSubscription);
|
|
1330
1325
|
}
|
|
1331
|
-
const opened$ = this.
|
|
1326
|
+
const opened$ = this.matAutocomplete._isOpen
|
|
1332
1327
|
? timer(0)
|
|
1333
|
-
: this.
|
|
1328
|
+
: this.matAutocomplete.opened.pipe(debounceTime(200));
|
|
1334
1329
|
const scrollEnd$ = opened$
|
|
1335
1330
|
.pipe(map((_) => this.getAutocompletePanel()), filter(isNotNil), switchMap((panel) => fromScrollEndEvent(panel, threshold)
|
|
1336
|
-
.pipe(takeUntil(this.
|
|
1331
|
+
.pipe(takeUntil(this.matAutocomplete.closed))));
|
|
1337
1332
|
// Trigger fetch more, end end scroll reached
|
|
1338
1333
|
this._openedSubscription = scrollEnd$
|
|
1339
1334
|
.subscribe(() => this._fetchMore$.emit());
|
|
@@ -1362,6 +1357,22 @@ class MatAutocompleteField {
|
|
|
1362
1357
|
// Register subscription
|
|
1363
1358
|
this._subscription.add(this._openedSubscription);
|
|
1364
1359
|
}
|
|
1360
|
+
get isOpen() {
|
|
1361
|
+
var _a, _b;
|
|
1362
|
+
return (this.searchable && ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen))
|
|
1363
|
+
|| ((_b = this.matSelect) === null || _b === void 0 ? void 0 : _b.panelOpen)
|
|
1364
|
+
|| false;
|
|
1365
|
+
}
|
|
1366
|
+
closePanel() {
|
|
1367
|
+
var _a, _b, _c, _d;
|
|
1368
|
+
if ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen) {
|
|
1369
|
+
(_b = this.matAutocompleteTrigger) === null || _b === void 0 ? void 0 : _b.closePanel();
|
|
1370
|
+
return;
|
|
1371
|
+
}
|
|
1372
|
+
if ((_c = this.matSelect) === null || _c === void 0 ? void 0 : _c.panelOpen) {
|
|
1373
|
+
(_d = this.matSelect) === null || _d === void 0 ? void 0 : _d.close();
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1365
1376
|
/* -- private method -- */
|
|
1366
1377
|
suggest(value, filter) {
|
|
1367
1378
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1422,7 +1433,7 @@ class MatAutocompleteField {
|
|
|
1422
1433
|
}
|
|
1423
1434
|
getAutocompletePanel() {
|
|
1424
1435
|
var _a, _b;
|
|
1425
|
-
const ele = (_b = (_a = this.
|
|
1436
|
+
const ele = (_b = (_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.options.last) === null || _b === void 0 ? void 0 : _b._getHostElement().parentElement;
|
|
1426
1437
|
if (!ele) {
|
|
1427
1438
|
// DEBUG
|
|
1428
1439
|
console.warn(this.logPrefix + ' Unable to find the autocomplete div...');
|
|
@@ -1456,8 +1467,8 @@ MatAutocompleteField.decorators = [
|
|
|
1456
1467
|
{ type: Component, args: [{
|
|
1457
1468
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1458
1469
|
selector: 'mat-autocomplete-field',
|
|
1459
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <!-- readonly -->\n <ng-container *ngIf=\"_readonly; else writable\">\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <ng-template #writable>\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 [compareWith]=\"compareWith\"\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 </ng-template>\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]=\"
|
|
1460
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
1470
|
+
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <!-- readonly -->\n <ng-container *ngIf=\"_readonly; else writable\">\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <ng-template #writable>\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)=\"onKeydownEscape.emit($event)\"\n [compareWith]=\"compareWith\"\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 </ng-template>\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)=\"onClick.emit($event)\"\n (focus)=\"filterInputTextFocusInEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.opened && onDropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [class.cdk-visually-hidden]=\"!searchable\"\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>{{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: 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\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"onDropButtonClick.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 matSuffix select=\"[matSuffix]\"></ng-content>\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 </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\n</ion-grid>\n",
|
|
1471
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
1461
1472
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1462
1473
|
styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}.fact-scroll-viewport{height:100%;width:100%}.fact-item{height:54px;display:flex}.fact-item .fact-date{min-width:100px;text-align:center;font-size:24pt}.fact-item .fact-date,.fact-item .fact-text{height:100%;align-items:center;justify-content:center;display:flex}.fact-item .fact-text{border-radius:10px}cdk-virtual-scroll-viewport{border:1px solid #000}cdk-virtual-scroll-viewport li{list-style:none}"]
|
|
1463
1474
|
},] }
|
|
@@ -1506,9 +1517,12 @@ MatAutocompleteField.propDecorators = {
|
|
|
1506
1517
|
onBlur: [{ type: Output, args: ['blur',] }],
|
|
1507
1518
|
onFocus: [{ type: Output, args: ['focus',] }],
|
|
1508
1519
|
onDropButtonClick: [{ type: Output, args: ['dropButtonClick',] }],
|
|
1520
|
+
onKeydownEscape: [{ type: Output, args: ['keydown.escape',] }],
|
|
1521
|
+
onKeyupEnter: [{ type: Output, args: ['keyup.enter',] }],
|
|
1509
1522
|
matSelect: [{ type: ViewChild, args: ['matSelect',] }],
|
|
1510
1523
|
matInputText: [{ type: ViewChild, args: ['matInputText',] }],
|
|
1511
|
-
|
|
1524
|
+
matAutocomplete: [{ type: ViewChild, args: [MatAutocomplete,] }],
|
|
1525
|
+
matAutocompleteTrigger: [{ type: ViewChild, args: [MatAutocompleteTrigger,] }]
|
|
1512
1526
|
};
|
|
1513
1527
|
|
|
1514
1528
|
class DateFormatPipe {
|
|
@@ -1531,7 +1545,7 @@ class DateFormatPipe {
|
|
|
1531
1545
|
return this.dateAdapter.format(date, displayFormat);
|
|
1532
1546
|
}
|
|
1533
1547
|
}
|
|
1534
|
-
DateFormatPipe.ɵprov =
|
|
1548
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1535
1549
|
DateFormatPipe.decorators = [
|
|
1536
1550
|
{ type: Pipe, args: [{
|
|
1537
1551
|
name: 'dateFormat'
|
|
@@ -1543,7 +1557,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1543
1557
|
{ type: TranslateService }
|
|
1544
1558
|
];
|
|
1545
1559
|
|
|
1546
|
-
const moment
|
|
1560
|
+
const moment = momentImported;
|
|
1547
1561
|
class DateDiffDurationPipe {
|
|
1548
1562
|
constructor(dateAdapter, translate) {
|
|
1549
1563
|
this.dateAdapter = dateAdapter;
|
|
@@ -1559,17 +1573,17 @@ class DateDiffDurationPipe {
|
|
|
1559
1573
|
return this.format(startDate, endDate);
|
|
1560
1574
|
}
|
|
1561
1575
|
format(startDate, endDate) {
|
|
1562
|
-
const duration = moment
|
|
1576
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1563
1577
|
if (duration.asMinutes() < 0)
|
|
1564
1578
|
return '';
|
|
1565
|
-
const timeDuration = moment
|
|
1579
|
+
const timeDuration = moment(0)
|
|
1566
1580
|
.hour(duration.hours())
|
|
1567
1581
|
.minute(duration.minutes());
|
|
1568
1582
|
const days = Math.floor(duration.asDays());
|
|
1569
1583
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1570
1584
|
}
|
|
1571
1585
|
}
|
|
1572
|
-
DateDiffDurationPipe.ɵprov =
|
|
1586
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1573
1587
|
DateDiffDurationPipe.decorators = [
|
|
1574
1588
|
{ type: Pipe, args: [{
|
|
1575
1589
|
name: 'dateDiffDuration'
|
|
@@ -1590,7 +1604,7 @@ class DateFromNowPipe {
|
|
|
1590
1604
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1591
1605
|
}
|
|
1592
1606
|
}
|
|
1593
|
-
DateFromNowPipe.ɵprov =
|
|
1607
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1594
1608
|
DateFromNowPipe.decorators = [
|
|
1595
1609
|
{ type: Pipe, args: [{
|
|
1596
1610
|
name: 'dateFromNow'
|
|
@@ -1659,7 +1673,7 @@ function formatToDD(value, opts) {
|
|
|
1659
1673
|
value *= -1;
|
|
1660
1674
|
}
|
|
1661
1675
|
}
|
|
1662
|
-
let degrees = roundFloat
|
|
1676
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1663
1677
|
// Add sign
|
|
1664
1678
|
let sign = negative ? '-' : '+';
|
|
1665
1679
|
if (opts.placeholderChar) {
|
|
@@ -1710,7 +1724,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1710
1724
|
}
|
|
1711
1725
|
let degrees = Math.trunc(value);
|
|
1712
1726
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1713
|
-
let seconds = roundFloat
|
|
1727
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1714
1728
|
while (seconds >= 60) {
|
|
1715
1729
|
seconds -= 60;
|
|
1716
1730
|
minutes += 1;
|
|
@@ -1778,7 +1792,7 @@ function formatToDDMM(value, opts) {
|
|
|
1778
1792
|
}
|
|
1779
1793
|
}
|
|
1780
1794
|
let degrees = Math.trunc(value);
|
|
1781
|
-
let minutes = roundFloat
|
|
1795
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1782
1796
|
while (minutes >= 60) {
|
|
1783
1797
|
minutes -= 60;
|
|
1784
1798
|
degrees += 1;
|
|
@@ -1829,15 +1843,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
1829
1843
|
return NaN;
|
|
1830
1844
|
}
|
|
1831
1845
|
if (pattern === 'DD')
|
|
1832
|
-
return roundFloat
|
|
1846
|
+
return roundFloat(degrees, maxDecimals);
|
|
1833
1847
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
1834
1848
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
1835
1849
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
1836
1850
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
1837
1851
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
1838
|
-
return roundFloat
|
|
1852
|
+
return roundFloat(degrees, maxDecimals);
|
|
1839
1853
|
}
|
|
1840
|
-
function roundFloat
|
|
1854
|
+
function roundFloat(input, maxDecimals) {
|
|
1841
1855
|
if (maxDecimals > 0) {
|
|
1842
1856
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
1843
1857
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -1857,7 +1871,7 @@ class LatLongFormatPipe {
|
|
|
1857
1871
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
1858
1872
|
}
|
|
1859
1873
|
}
|
|
1860
|
-
LatLongFormatPipe.ɵprov =
|
|
1874
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
1861
1875
|
LatLongFormatPipe.decorators = [
|
|
1862
1876
|
{ type: Pipe, args: [{
|
|
1863
1877
|
name: 'latLongFormat'
|
|
@@ -1869,7 +1883,7 @@ class LatitudeFormatPipe {
|
|
|
1869
1883
|
this.transform = formatLatitude;
|
|
1870
1884
|
}
|
|
1871
1885
|
}
|
|
1872
|
-
LatitudeFormatPipe.ɵprov =
|
|
1886
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
1873
1887
|
LatitudeFormatPipe.decorators = [
|
|
1874
1888
|
{ type: Pipe, args: [{
|
|
1875
1889
|
name: 'latitudeFormat'
|
|
@@ -1881,7 +1895,7 @@ class LongitudeFormatPipe {
|
|
|
1881
1895
|
this.transform = formatLongitude;
|
|
1882
1896
|
}
|
|
1883
1897
|
}
|
|
1884
|
-
LongitudeFormatPipe.ɵprov =
|
|
1898
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
1885
1899
|
LongitudeFormatPipe.decorators = [
|
|
1886
1900
|
{ type: Pipe, args: [{
|
|
1887
1901
|
name: 'longitudeFormat'
|
|
@@ -1901,7 +1915,7 @@ class NumberFormatPipe {
|
|
|
1901
1915
|
}
|
|
1902
1916
|
}
|
|
1903
1917
|
}
|
|
1904
|
-
NumberFormatPipe.ɵprov =
|
|
1918
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
1905
1919
|
NumberFormatPipe.decorators = [
|
|
1906
1920
|
{ type: Pipe, args: [{
|
|
1907
1921
|
name: 'numberFormat'
|
|
@@ -1941,7 +1955,7 @@ class HighlightPipe {
|
|
|
1941
1955
|
}
|
|
1942
1956
|
}
|
|
1943
1957
|
}
|
|
1944
|
-
HighlightPipe.ɵprov =
|
|
1958
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
1945
1959
|
HighlightPipe.decorators = [
|
|
1946
1960
|
{ type: Pipe, args: [{
|
|
1947
1961
|
name: 'highlight'
|
|
@@ -2006,7 +2020,7 @@ FileSizePipe.decorators = [
|
|
|
2006
2020
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2007
2021
|
];
|
|
2008
2022
|
|
|
2009
|
-
const moment$
|
|
2023
|
+
const moment$1 = momentImported;
|
|
2010
2024
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2011
2025
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2012
2026
|
class DateUtils {
|
|
@@ -2040,32 +2054,32 @@ function fromDateISOString(value) {
|
|
|
2040
2054
|
if (!value || isMoment(value))
|
|
2041
2055
|
return value;
|
|
2042
2056
|
// Parse the input value, as a ISO date time
|
|
2043
|
-
const date = moment$
|
|
2057
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2044
2058
|
if (date.isValid())
|
|
2045
2059
|
return date;
|
|
2046
2060
|
// Not valid: trying to convert from unix timestamp
|
|
2047
2061
|
if (typeof value === 'string') {
|
|
2048
2062
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2049
2063
|
if (value.length === 10) {
|
|
2050
|
-
return moment$
|
|
2064
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2051
2065
|
}
|
|
2052
2066
|
else if (value.length === 13) {
|
|
2053
|
-
return moment$
|
|
2067
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2054
2068
|
}
|
|
2055
2069
|
}
|
|
2056
2070
|
console.warn('Unable to parse date: ' + value);
|
|
2057
2071
|
return undefined;
|
|
2058
2072
|
}
|
|
2059
2073
|
function fromUnixTimestamp(timeInSec) {
|
|
2060
|
-
return moment$
|
|
2074
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2061
2075
|
}
|
|
2062
2076
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2063
|
-
return moment$
|
|
2077
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2064
2078
|
}
|
|
2065
2079
|
function toDuration(value, unit) {
|
|
2066
2080
|
if (!value)
|
|
2067
2081
|
return undefined;
|
|
2068
|
-
const duration = moment$
|
|
2082
|
+
const duration = moment$1.duration(value, unit);
|
|
2069
2083
|
// fix 990+ ms
|
|
2070
2084
|
if (duration.milliseconds() >= 990) {
|
|
2071
2085
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2094,7 +2108,7 @@ class DurationPipe {
|
|
|
2094
2108
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2095
2109
|
}
|
|
2096
2110
|
}
|
|
2097
|
-
DurationPipe.ɵprov =
|
|
2111
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2098
2112
|
DurationPipe.decorators = [
|
|
2099
2113
|
{ type: Pipe, args: [{
|
|
2100
2114
|
name: 'duration'
|
|
@@ -2115,7 +2129,7 @@ class MathAbsPipe {
|
|
|
2115
2129
|
}
|
|
2116
2130
|
}
|
|
2117
2131
|
}
|
|
2118
|
-
MathAbsPipe.ɵprov =
|
|
2132
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2119
2133
|
MathAbsPipe.decorators = [
|
|
2120
2134
|
{ type: Pipe, args: [{
|
|
2121
2135
|
name: 'mathAbs'
|
|
@@ -2127,7 +2141,7 @@ class EvenPipe {
|
|
|
2127
2141
|
return val % 2 === 0;
|
|
2128
2142
|
}
|
|
2129
2143
|
}
|
|
2130
|
-
EvenPipe.ɵprov =
|
|
2144
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2131
2145
|
EvenPipe.decorators = [
|
|
2132
2146
|
{ type: Pipe, args: [{
|
|
2133
2147
|
name: 'even'
|
|
@@ -2139,7 +2153,7 @@ class OddPipe {
|
|
|
2139
2153
|
return val % 2 !== 0;
|
|
2140
2154
|
}
|
|
2141
2155
|
}
|
|
2142
|
-
OddPipe.ɵprov =
|
|
2156
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2143
2157
|
OddPipe.decorators = [
|
|
2144
2158
|
{ type: Pipe, args: [{
|
|
2145
2159
|
name: 'odd'
|
|
@@ -2247,7 +2261,7 @@ class MapGetPipe {
|
|
|
2247
2261
|
return val[key];
|
|
2248
2262
|
}
|
|
2249
2263
|
}
|
|
2250
|
-
MapGetPipe.ɵprov =
|
|
2264
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2251
2265
|
MapGetPipe.decorators = [
|
|
2252
2266
|
{ type: Pipe, args: [{
|
|
2253
2267
|
name: 'mapGet'
|
|
@@ -2261,7 +2275,7 @@ class MapKeysPipe {
|
|
|
2261
2275
|
return Object.keys(map);
|
|
2262
2276
|
}
|
|
2263
2277
|
}
|
|
2264
|
-
MapKeysPipe.ɵprov =
|
|
2278
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2265
2279
|
MapKeysPipe.decorators = [
|
|
2266
2280
|
{ type: Pipe, args: [{
|
|
2267
2281
|
name: 'mapKeys'
|
|
@@ -2275,7 +2289,7 @@ class MapValuesPipe {
|
|
|
2275
2289
|
return Object.values(map);
|
|
2276
2290
|
}
|
|
2277
2291
|
}
|
|
2278
|
-
MapValuesPipe.ɵprov =
|
|
2292
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2279
2293
|
MapValuesPipe.decorators = [
|
|
2280
2294
|
{ type: Pipe, args: [{
|
|
2281
2295
|
name: 'mapValues'
|
|
@@ -2288,7 +2302,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2288
2302
|
return isNotNilOrBlank(value);
|
|
2289
2303
|
}
|
|
2290
2304
|
}
|
|
2291
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2305
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2292
2306
|
IsNotNilOrBlankPipe.decorators = [
|
|
2293
2307
|
{ type: Pipe, args: [{
|
|
2294
2308
|
name: 'isNotNilOrBlank'
|
|
@@ -2300,7 +2314,7 @@ class IsNilOrBlankPipe {
|
|
|
2300
2314
|
return isNilOrBlank(value);
|
|
2301
2315
|
}
|
|
2302
2316
|
}
|
|
2303
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2317
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2304
2318
|
IsNilOrBlankPipe.decorators = [
|
|
2305
2319
|
{ type: Pipe, args: [{
|
|
2306
2320
|
name: 'isNilOrBlank'
|
|
@@ -2312,7 +2326,7 @@ class ToStringPipe {
|
|
|
2312
2326
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2313
2327
|
}
|
|
2314
2328
|
}
|
|
2315
|
-
ToStringPipe.ɵprov =
|
|
2329
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2316
2330
|
ToStringPipe.decorators = [
|
|
2317
2331
|
{ type: Pipe, args: [{
|
|
2318
2332
|
name: 'toString'
|
|
@@ -2324,7 +2338,7 @@ class StrLengthPipe {
|
|
|
2324
2338
|
return value && value.length || 0;
|
|
2325
2339
|
}
|
|
2326
2340
|
}
|
|
2327
|
-
StrLengthPipe.ɵprov =
|
|
2341
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2328
2342
|
StrLengthPipe.decorators = [
|
|
2329
2343
|
{ type: Pipe, args: [{
|
|
2330
2344
|
name: 'strLength'
|
|
@@ -2375,7 +2389,7 @@ class TranslateContextService {
|
|
|
2375
2389
|
: parts.slice(0, parts.length - 1).concat(context + parts[parts.length - 1]).join('.');
|
|
2376
2390
|
}
|
|
2377
2391
|
}
|
|
2378
|
-
TranslateContextService.ɵprov =
|
|
2392
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2379
2393
|
TranslateContextService.decorators = [
|
|
2380
2394
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2381
2395
|
];
|
|
@@ -2391,7 +2405,7 @@ class TranslateContextPipe {
|
|
|
2391
2405
|
return this.translateContext.instant(key, context);
|
|
2392
2406
|
}
|
|
2393
2407
|
}
|
|
2394
|
-
TranslateContextPipe.ɵprov =
|
|
2408
|
+
TranslateContextPipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextPipe_Factory() { return new TranslateContextPipe(ɵɵinject(TranslateContextService)); }, token: TranslateContextPipe, providedIn: "root" });
|
|
2395
2409
|
TranslateContextPipe.decorators = [
|
|
2396
2410
|
{ type: Pipe, args: [{
|
|
2397
2411
|
name: 'translateContext'
|
|
@@ -2408,7 +2422,7 @@ class TranslatablePipe {
|
|
|
2408
2422
|
return (_a = changeCaseToUnderscore(value)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
2409
2423
|
}
|
|
2410
2424
|
}
|
|
2411
|
-
TranslatablePipe.ɵprov =
|
|
2425
|
+
TranslatablePipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslatablePipe_Factory() { return new TranslatablePipe(); }, token: TranslatablePipe, providedIn: "root" });
|
|
2412
2426
|
TranslatablePipe.decorators = [
|
|
2413
2427
|
{ type: Pipe, args: [{
|
|
2414
2428
|
name: 'translatable'
|
|
@@ -2425,7 +2439,7 @@ class PropertyGetPipe {
|
|
|
2425
2439
|
args && args.defaultValue);
|
|
2426
2440
|
}
|
|
2427
2441
|
}
|
|
2428
|
-
PropertyGetPipe.ɵprov =
|
|
2442
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2429
2443
|
PropertyGetPipe.decorators = [
|
|
2430
2444
|
{ type: Pipe, args: [{
|
|
2431
2445
|
name: 'propertyGet'
|
|
@@ -2669,12 +2683,12 @@ SharedMatAutocompleteModule.decorators = [
|
|
|
2669
2683
|
},] }
|
|
2670
2684
|
];
|
|
2671
2685
|
|
|
2672
|
-
const moment$
|
|
2686
|
+
const moment$2 = momentImported;
|
|
2673
2687
|
// @dynamic
|
|
2674
2688
|
class SharedValidators {
|
|
2675
2689
|
static validDate(control) {
|
|
2676
2690
|
const value = control.value;
|
|
2677
|
-
const date = !value || moment$
|
|
2691
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
|
|
2678
2692
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2679
2693
|
return { validDate: true };
|
|
2680
2694
|
}
|
|
@@ -3116,9 +3130,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3116
3130
|
const hour = parseInt(durationParts[0] || '0');
|
|
3117
3131
|
const minute = parseInt(durationParts[1] || '0');
|
|
3118
3132
|
const value = hour + (minute + 0.5) / 60;
|
|
3119
|
-
return roundFloat(value, maxDecimals);
|
|
3133
|
+
return roundFloat$1(value, maxDecimals);
|
|
3120
3134
|
}
|
|
3121
|
-
function roundFloat(input, maxDecimals) {
|
|
3135
|
+
function roundFloat$1(input, maxDecimals) {
|
|
3122
3136
|
if (maxDecimals > 0) {
|
|
3123
3137
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3124
3138
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3142,9 +3156,9 @@ const MASKS = {
|
|
|
3142
3156
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3143
3157
|
}
|
|
3144
3158
|
};
|
|
3145
|
-
const noop$
|
|
3159
|
+
const noop$1 = () => {
|
|
3146
3160
|
};
|
|
3147
|
-
const ɵ0$
|
|
3161
|
+
const ɵ0$1 = noop$1;
|
|
3148
3162
|
class MatLatLongField {
|
|
3149
3163
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3150
3164
|
this.platform = platform;
|
|
@@ -3152,8 +3166,8 @@ class MatLatLongField {
|
|
|
3152
3166
|
this.formBuilder = formBuilder;
|
|
3153
3167
|
this.cd = cd;
|
|
3154
3168
|
this.formGroupDir = formGroupDir;
|
|
3155
|
-
this._onChangeCallback = noop$
|
|
3156
|
-
this._onTouchedCallback = noop$
|
|
3169
|
+
this._onChangeCallback = noop$1;
|
|
3170
|
+
this._onTouchedCallback = noop$1;
|
|
3157
3171
|
this._subscription = new Subscription();
|
|
3158
3172
|
this.disabling = false;
|
|
3159
3173
|
this.writing = false;
|
|
@@ -3494,14 +3508,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
3494
3508
|
},] }
|
|
3495
3509
|
];
|
|
3496
3510
|
|
|
3497
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
3511
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
3498
3512
|
provide: NG_VALUE_ACCESSOR,
|
|
3499
3513
|
useExisting: forwardRef(() => MatDate),
|
|
3500
3514
|
multi: true
|
|
3501
3515
|
};
|
|
3502
|
-
const DAY_MASK
|
|
3503
|
-
const noop$
|
|
3504
|
-
const ɵ0$
|
|
3516
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
3517
|
+
const noop$2 = () => { };
|
|
3518
|
+
const ɵ0$2 = noop$2;
|
|
3505
3519
|
class MatDate {
|
|
3506
3520
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
3507
3521
|
this.dateAdapter = dateAdapter;
|
|
@@ -3510,12 +3524,12 @@ class MatDate {
|
|
|
3510
3524
|
this.cd = cd;
|
|
3511
3525
|
this.keyboard = keyboard;
|
|
3512
3526
|
this.formGroupDir = formGroupDir;
|
|
3513
|
-
this._onChangeCallback = noop$
|
|
3514
|
-
this._onTouchedCallback = noop$
|
|
3527
|
+
this._onChangeCallback = noop$2;
|
|
3528
|
+
this._onTouchedCallback = noop$2;
|
|
3515
3529
|
this._subscription = new Subscription();
|
|
3516
3530
|
this.writing = true;
|
|
3517
3531
|
this.disabling = false;
|
|
3518
|
-
this.dayMask = DAY_MASK
|
|
3532
|
+
this.dayMask = DAY_MASK;
|
|
3519
3533
|
this.disabled = false;
|
|
3520
3534
|
this.floatLabel = 'auto';
|
|
3521
3535
|
this.readonly = false;
|
|
@@ -3752,7 +3766,7 @@ MatDate.decorators = [
|
|
|
3752
3766
|
selector: 'mat-date-field',
|
|
3753
3767
|
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",
|
|
3754
3768
|
providers: [
|
|
3755
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
3769
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
3756
3770
|
],
|
|
3757
3771
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3758
3772
|
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%}"]
|
|
@@ -3785,17 +3799,17 @@ MatDate.propDecorators = {
|
|
|
3785
3799
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
3786
3800
|
};
|
|
3787
3801
|
|
|
3788
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
3802
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
3789
3803
|
provide: NG_VALUE_ACCESSOR,
|
|
3790
3804
|
useExisting: forwardRef(() => MatDateTime),
|
|
3791
3805
|
multi: true
|
|
3792
3806
|
};
|
|
3793
3807
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
3794
3808
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
3795
|
-
const HOUR_MASK
|
|
3796
|
-
const noop$
|
|
3809
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
3810
|
+
const noop$3 = () => {
|
|
3797
3811
|
};
|
|
3798
|
-
const ɵ0$
|
|
3812
|
+
const ɵ0$3 = noop$3;
|
|
3799
3813
|
class MatDateTime {
|
|
3800
3814
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
3801
3815
|
this.platform = platform;
|
|
@@ -3805,14 +3819,14 @@ class MatDateTime {
|
|
|
3805
3819
|
this.keyboard = keyboard;
|
|
3806
3820
|
this.cd = cd;
|
|
3807
3821
|
this.formGroupDir = formGroupDir;
|
|
3808
|
-
this._onChangeCallback = noop$
|
|
3809
|
-
this._onTouchedCallback = noop$
|
|
3822
|
+
this._onChangeCallback = noop$3;
|
|
3823
|
+
this._onTouchedCallback = noop$3;
|
|
3810
3824
|
this._subscription = new Subscription();
|
|
3811
3825
|
this.writing = true;
|
|
3812
3826
|
this.disabling = false;
|
|
3813
3827
|
this._onDestroy = new EventEmitter();
|
|
3814
3828
|
this.dayMask = DAY_MASK$1;
|
|
3815
|
-
this.hourMask = HOUR_MASK
|
|
3829
|
+
this.hourMask = HOUR_MASK;
|
|
3816
3830
|
this.floatLabel = 'auto';
|
|
3817
3831
|
this.readonly = false;
|
|
3818
3832
|
this.compact = false;
|
|
@@ -4118,7 +4132,7 @@ MatDateTime.decorators = [
|
|
|
4118
4132
|
selector: 'mat-date-time-field',
|
|
4119
4133
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\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><ng-content select=\"[matPrefix]\"></ng-content></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",
|
|
4120
4134
|
providers: [
|
|
4121
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4135
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
4122
4136
|
],
|
|
4123
4137
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4124
4138
|
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%}"]
|
|
@@ -4157,10 +4171,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4157
4171
|
useExisting: forwardRef(() => MatDateShort),
|
|
4158
4172
|
multi: true
|
|
4159
4173
|
};
|
|
4160
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4161
|
-
const noop$
|
|
4174
|
+
const DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
|
|
4175
|
+
const noop$4 = () => {
|
|
4162
4176
|
};
|
|
4163
|
-
const ɵ0$
|
|
4177
|
+
const ɵ0$4 = noop$4;
|
|
4164
4178
|
class MatDateShort {
|
|
4165
4179
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4166
4180
|
this.dateAdapter = dateAdapter;
|
|
@@ -4169,11 +4183,11 @@ class MatDateShort {
|
|
|
4169
4183
|
this.cd = cd;
|
|
4170
4184
|
this.keyboard = keyboard;
|
|
4171
4185
|
this.formGroupDir = formGroupDir;
|
|
4172
|
-
this._onChangeCallback = noop$
|
|
4173
|
-
this._onTouchedCallback = noop$
|
|
4186
|
+
this._onChangeCallback = noop$4;
|
|
4187
|
+
this._onTouchedCallback = noop$4;
|
|
4174
4188
|
this.writing = true;
|
|
4175
4189
|
this.disabling = false;
|
|
4176
|
-
this.dayMask = DAY_MASK;
|
|
4190
|
+
this.dayMask = DAY_MASK$2;
|
|
4177
4191
|
this.disabled = false;
|
|
4178
4192
|
this.floatLabel = 'auto';
|
|
4179
4193
|
this.readonly = false;
|
|
@@ -4486,16 +4500,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
4486
4500
|
},] }
|
|
4487
4501
|
];
|
|
4488
4502
|
|
|
4489
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4503
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4490
4504
|
provide: NG_VALUE_ACCESSOR,
|
|
4491
4505
|
useExisting: forwardRef(() => MatDuration),
|
|
4492
4506
|
multi: true
|
|
4493
4507
|
};
|
|
4494
4508
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
4495
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
4496
|
-
const noop$
|
|
4509
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
4510
|
+
const noop$5 = () => {
|
|
4497
4511
|
};
|
|
4498
|
-
const ɵ0$5 = noop$
|
|
4512
|
+
const ɵ0$5 = noop$5;
|
|
4499
4513
|
class MatDuration {
|
|
4500
4514
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
4501
4515
|
this.dateAdapter = dateAdapter;
|
|
@@ -4504,11 +4518,11 @@ class MatDuration {
|
|
|
4504
4518
|
this.cd = cd;
|
|
4505
4519
|
this.formGroupDir = formGroupDir;
|
|
4506
4520
|
this._subscription = new Subscription();
|
|
4507
|
-
this._onChangeCallback = noop$
|
|
4508
|
-
this._onTouchedCallback = noop$
|
|
4521
|
+
this._onChangeCallback = noop$5;
|
|
4522
|
+
this._onTouchedCallback = noop$5;
|
|
4509
4523
|
this.writing = true;
|
|
4510
4524
|
this.disabling = false;
|
|
4511
|
-
this.hourMask = HOUR_MASK;
|
|
4525
|
+
this.hourMask = HOUR_MASK$1;
|
|
4512
4526
|
this.disabled = false;
|
|
4513
4527
|
this.floatLabel = 'auto';
|
|
4514
4528
|
this.readonly = false;
|
|
@@ -4688,7 +4702,7 @@ MatDuration.decorators = [
|
|
|
4688
4702
|
selector: 'mat-duration-field',
|
|
4689
4703
|
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",
|
|
4690
4704
|
providers: [
|
|
4691
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4705
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
4692
4706
|
],
|
|
4693
4707
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4694
4708
|
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%}"]
|
|
@@ -4745,22 +4759,22 @@ SharedMatDurationModule.decorators = [
|
|
|
4745
4759
|
},] }
|
|
4746
4760
|
];
|
|
4747
4761
|
|
|
4748
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4762
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4749
4763
|
provide: NG_VALUE_ACCESSOR,
|
|
4750
4764
|
useExisting: forwardRef(() => MatBooleanField),
|
|
4751
4765
|
multi: true
|
|
4752
4766
|
};
|
|
4753
|
-
const noop$
|
|
4767
|
+
const noop$6 = () => {
|
|
4754
4768
|
};
|
|
4755
|
-
const ɵ0$
|
|
4769
|
+
const ɵ0$6 = noop$6;
|
|
4756
4770
|
class MatBooleanField {
|
|
4757
4771
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
4758
4772
|
this.translate = translate;
|
|
4759
4773
|
this.formBuilder = formBuilder;
|
|
4760
4774
|
this.cd = cd;
|
|
4761
4775
|
this.formGroupDir = formGroupDir;
|
|
4762
|
-
this._onChangeCallback = noop$
|
|
4763
|
-
this._onTouchedCallback = noop$
|
|
4776
|
+
this._onChangeCallback = noop$6;
|
|
4777
|
+
this._onTouchedCallback = noop$6;
|
|
4764
4778
|
this._writing = false;
|
|
4765
4779
|
this.showRadio = false;
|
|
4766
4780
|
this.disabled = false;
|
|
@@ -4933,10 +4947,10 @@ MatBooleanField.decorators = [
|
|
|
4933
4947
|
selector: 'mat-boolean-field',
|
|
4934
4948
|
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\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</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\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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\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\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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\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 <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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </ng-container>\n\n <div class=\"cdk-visually-hidden\">\n <div #suffix><ng-content select=\"[matSuffix]\"></ng-content></div>\n </div>\n\n</ng-template>\n\n\n",
|
|
4935
4949
|
providers: [
|
|
4936
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4950
|
+
DEFAULT_VALUE_ACCESSOR$5
|
|
4937
4951
|
],
|
|
4938
4952
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4939
|
-
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:
|
|
4953
|
+
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}"]
|
|
4940
4954
|
},] }
|
|
4941
4955
|
];
|
|
4942
4956
|
MatBooleanField.ctorParameters = () => [
|
|
@@ -5181,7 +5195,7 @@ class MatNumpadDomService {
|
|
|
5181
5195
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5182
5196
|
}
|
|
5183
5197
|
}
|
|
5184
|
-
MatNumpadDomService.ɵprov =
|
|
5198
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
5185
5199
|
MatNumpadDomService.decorators = [
|
|
5186
5200
|
{ type: Injectable, args: [{
|
|
5187
5201
|
providedIn: 'root'
|
|
@@ -5545,7 +5559,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
5545
5559
|
},] }
|
|
5546
5560
|
];
|
|
5547
5561
|
|
|
5548
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
5562
|
+
const DEFAULT_VALUE_ACCESSOR$6 = {
|
|
5549
5563
|
provide: NG_VALUE_ACCESSOR,
|
|
5550
5564
|
useExisting: forwardRef(() => MatSwipeField),
|
|
5551
5565
|
multi: true
|
|
@@ -5808,7 +5822,7 @@ MatSwipeField.decorators = [
|
|
|
5808
5822
|
{ type: Component, args: [{
|
|
5809
5823
|
selector: 'mat-swipe-field',
|
|
5810
5824
|
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",
|
|
5811
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
5825
|
+
providers: [DEFAULT_VALUE_ACCESSOR$6],
|
|
5812
5826
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5813
5827
|
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}"]
|
|
5814
5828
|
},] }
|
|
@@ -6303,7 +6317,7 @@ class ProgressBarService {
|
|
|
6303
6317
|
}
|
|
6304
6318
|
}
|
|
6305
6319
|
}
|
|
6306
|
-
ProgressBarService.ɵprov =
|
|
6320
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
6307
6321
|
ProgressBarService.decorators = [
|
|
6308
6322
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6309
6323
|
];
|
|
@@ -6347,7 +6361,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
6347
6361
|
return mc;
|
|
6348
6362
|
}
|
|
6349
6363
|
}
|
|
6350
|
-
AppGestureConfig.ɵprov =
|
|
6364
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
6351
6365
|
AppGestureConfig.decorators = [
|
|
6352
6366
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6353
6367
|
];
|
|
@@ -6570,7 +6584,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
6570
6584
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
6571
6585
|
}
|
|
6572
6586
|
}
|
|
6573
|
-
MatPaginatorI18n.ɵprov =
|
|
6587
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
6574
6588
|
MatPaginatorI18n.decorators = [
|
|
6575
6589
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6576
6590
|
];
|
|
@@ -6660,17 +6674,17 @@ function getColorContrast(color, bw) {
|
|
|
6660
6674
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
6661
6675
|
}
|
|
6662
6676
|
|
|
6663
|
-
const noop = () => {
|
|
6677
|
+
const noop$7 = () => {
|
|
6664
6678
|
};
|
|
6665
|
-
const ɵ0$
|
|
6679
|
+
const ɵ0$7 = noop$7;
|
|
6666
6680
|
class AppFormField {
|
|
6667
6681
|
constructor(translate, cd, injector, formGroupDir) {
|
|
6668
6682
|
this.translate = translate;
|
|
6669
6683
|
this.cd = cd;
|
|
6670
6684
|
this.injector = injector;
|
|
6671
6685
|
this.formGroupDir = formGroupDir;
|
|
6672
|
-
this._onChangeCallback = noop;
|
|
6673
|
-
this._onTouchedCallback = noop;
|
|
6686
|
+
this._onChangeCallback = noop$7;
|
|
6687
|
+
this._onTouchedCallback = noop$7;
|
|
6674
6688
|
this.readonly = false;
|
|
6675
6689
|
this.compact = false;
|
|
6676
6690
|
this.floatLabel = 'auto';
|
|
@@ -7041,14 +7055,14 @@ class AudioProvider {
|
|
|
7041
7055
|
});
|
|
7042
7056
|
}
|
|
7043
7057
|
}
|
|
7044
|
-
AudioProvider.ɵprov =
|
|
7058
|
+
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" });
|
|
7045
7059
|
AudioProvider.decorators = [
|
|
7046
7060
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7047
7061
|
];
|
|
7048
7062
|
AudioProvider.ctorParameters = () => [
|
|
7049
7063
|
{ type: Platform },
|
|
7050
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7051
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7064
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
7065
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
7052
7066
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7053
7067
|
];
|
|
7054
7068
|
|
|
@@ -7130,7 +7144,7 @@ class Hotkeys {
|
|
|
7130
7144
|
});
|
|
7131
7145
|
}
|
|
7132
7146
|
}
|
|
7133
|
-
Hotkeys.ɵprov =
|
|
7147
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
7134
7148
|
Hotkeys.decorators = [
|
|
7135
7149
|
{ type: Injectable, args: [{
|
|
7136
7150
|
providedIn: 'root'
|
|
@@ -7304,7 +7318,7 @@ class Base64ImageReader {
|
|
|
7304
7318
|
}
|
|
7305
7319
|
}
|
|
7306
7320
|
|
|
7307
|
-
const uuidv4
|
|
7321
|
+
const uuidv4 = uuidv4Imported;
|
|
7308
7322
|
class FileService {
|
|
7309
7323
|
constructor(platform,
|
|
7310
7324
|
//private transfer: FileTransfer,
|
|
@@ -7341,7 +7355,7 @@ class FileService {
|
|
|
7341
7355
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
7342
7356
|
if (lastSlashIndex === -1)
|
|
7343
7357
|
throw new Error('Invalid URL: ' + source);
|
|
7344
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
7358
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
7345
7359
|
// Download into the file system
|
|
7346
7360
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
7347
7361
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -7397,7 +7411,7 @@ class FileService {
|
|
|
7397
7411
|
this._started = true;
|
|
7398
7412
|
}
|
|
7399
7413
|
}
|
|
7400
|
-
FileService.ɵprov =
|
|
7414
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
7401
7415
|
FileService.decorators = [
|
|
7402
7416
|
{ type: Injectable, args: [{
|
|
7403
7417
|
providedIn: 'root',
|
|
@@ -7559,7 +7573,7 @@ class Base58 {
|
|
|
7559
7573
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
7560
7574
|
|
|
7561
7575
|
const scrypt = require('scrypt-async');
|
|
7562
|
-
const sha256
|
|
7576
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
7563
7577
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
7564
7578
|
const nacl = {
|
|
7565
7579
|
sign,
|
|
@@ -7663,7 +7677,7 @@ class CryptoService {
|
|
|
7663
7677
|
* Hash (using SHA256) a message
|
|
7664
7678
|
*/
|
|
7665
7679
|
sha256(message) {
|
|
7666
|
-
return sha256
|
|
7680
|
+
return sha256().update(message).digest('hex');
|
|
7667
7681
|
}
|
|
7668
7682
|
/**
|
|
7669
7683
|
* Hash (using SHA512) a message
|
|
@@ -7676,7 +7690,7 @@ class CryptoService {
|
|
|
7676
7690
|
return nacl.util.encodeBase64(m);
|
|
7677
7691
|
}
|
|
7678
7692
|
}
|
|
7679
|
-
CryptoService.ɵprov =
|
|
7693
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
7680
7694
|
CryptoService.decorators = [
|
|
7681
7695
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7682
7696
|
];
|
|
@@ -8532,7 +8546,7 @@ class LocalSettingsService {
|
|
|
8532
8546
|
.then(() => {
|
|
8533
8547
|
this.data.mobile = isNotNil(this.data.mobile) ? this.data.mobile : this.platform.is('mobile');
|
|
8534
8548
|
this.data.touchUi = this.data.mobile || this.platform.is('phablet') || this.platform.is('tablet');
|
|
8535
|
-
this.data.usageMode = this.
|
|
8549
|
+
this.data.usageMode = this.platform.is('android') ? 'FIELD' : 'DESK'; // FIELD by default if Android
|
|
8536
8550
|
})
|
|
8537
8551
|
.then(() => this.restoreLocally())
|
|
8538
8552
|
.then(data => {
|
|
@@ -8896,7 +8910,7 @@ class LocalSettingsService {
|
|
|
8896
8910
|
return page;
|
|
8897
8911
|
}
|
|
8898
8912
|
}
|
|
8899
|
-
LocalSettingsService.ɵprov =
|
|
8913
|
+
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" });
|
|
8900
8914
|
LocalSettingsService.decorators = [
|
|
8901
8915
|
{ type: Injectable, args: [{
|
|
8902
8916
|
providedIn: 'root',
|
|
@@ -9592,7 +9606,7 @@ class NetworkService {
|
|
|
9592
9606
|
});
|
|
9593
9607
|
}
|
|
9594
9608
|
}
|
|
9595
|
-
NetworkService.ɵprov =
|
|
9609
|
+
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" });
|
|
9596
9610
|
NetworkService.decorators = [
|
|
9597
9611
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9598
9612
|
];
|
|
@@ -9603,16 +9617,16 @@ NetworkService.ctorParameters = () => [
|
|
|
9603
9617
|
{ type: CryptoService },
|
|
9604
9618
|
{ type: Storage },
|
|
9605
9619
|
{ type: LocalSettingsService },
|
|
9606
|
-
{ type: CacheService },
|
|
9620
|
+
{ type: CacheService$1 },
|
|
9607
9621
|
{ type: HttpClient },
|
|
9608
9622
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
9609
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
9610
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
9623
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
9624
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
9611
9625
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
9612
9626
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
9613
9627
|
];
|
|
9614
9628
|
|
|
9615
|
-
const ErrorCodes
|
|
9629
|
+
const ErrorCodes = {
|
|
9616
9630
|
UNKNOWN_ERROR: 0,
|
|
9617
9631
|
LOAD_ACCOUNT_ERROR: 1,
|
|
9618
9632
|
BAD_PASSWORD: 2,
|
|
@@ -9959,7 +9973,7 @@ class EntityStore {
|
|
|
9959
9973
|
}
|
|
9960
9974
|
catch (err) {
|
|
9961
9975
|
console.error(err);
|
|
9962
|
-
throw { code: ErrorCodes
|
|
9976
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
9963
9977
|
}
|
|
9964
9978
|
}
|
|
9965
9979
|
// Emit update event
|
|
@@ -10536,7 +10550,7 @@ class EntitiesStorage {
|
|
|
10536
10550
|
}
|
|
10537
10551
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
10538
10552
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
10539
|
-
EntitiesStorage.ɵprov =
|
|
10553
|
+
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" });
|
|
10540
10554
|
EntitiesStorage.decorators = [
|
|
10541
10555
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10542
10556
|
];
|
|
@@ -10636,10 +10650,10 @@ function referentialToString(obj, properties) {
|
|
|
10636
10650
|
function referentialsToString(values, properties, separator) {
|
|
10637
10651
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
10638
10652
|
}
|
|
10639
|
-
const ɵ0$
|
|
10653
|
+
const ɵ0$8 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
10640
10654
|
const StatusList = Object.freeze([
|
|
10641
10655
|
{
|
|
10642
|
-
id: ɵ0$
|
|
10656
|
+
id: ɵ0$8,
|
|
10643
10657
|
icon: 'checkmark',
|
|
10644
10658
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
10645
10659
|
},
|
|
@@ -10914,7 +10928,7 @@ function accountToString(data) {
|
|
|
10914
10928
|
(data.lastName || '')) || '';
|
|
10915
10929
|
}
|
|
10916
10930
|
|
|
10917
|
-
const uuidv4 = uuidv4Imported;
|
|
10931
|
+
const uuidv4$1 = uuidv4Imported;
|
|
10918
10932
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
10919
10933
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
10920
10934
|
/**
|
|
@@ -10958,7 +10972,7 @@ function createTrackerLink(opts) {
|
|
|
10958
10972
|
// Skip if not tracked
|
|
10959
10973
|
if (!context || !context.tracked)
|
|
10960
10974
|
return forward(operation);
|
|
10961
|
-
const id = context.serializationKey || uuidv4();
|
|
10975
|
+
const id = context.serializationKey || uuidv4$1();
|
|
10962
10976
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
10963
10977
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
10964
10978
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -11666,7 +11680,7 @@ class GraphqlService {
|
|
|
11666
11680
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
11667
11681
|
|| this.toAppError(err.networkError)
|
|
11668
11682
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
11669
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
11683
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
11670
11684
|
// If graphQL: try to convert the first error found
|
|
11671
11685
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
11672
11686
|
|| this.toAppError(err)
|
|
@@ -11674,7 +11688,7 @@ class GraphqlService {
|
|
|
11674
11688
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
11675
11689
|
|| err;
|
|
11676
11690
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
11677
|
-
if (error && error.code === ErrorCodes
|
|
11691
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
11678
11692
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
11679
11693
|
this.onNetworkError.next(error);
|
|
11680
11694
|
}
|
|
@@ -11710,7 +11724,7 @@ class GraphqlService {
|
|
|
11710
11724
|
return 'ERROR.UNAUTHORIZED';
|
|
11711
11725
|
case ServerErrorCodes.FORBIDDEN:
|
|
11712
11726
|
return 'ERROR.FORBIDDEN';
|
|
11713
|
-
case ErrorCodes
|
|
11727
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
11714
11728
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
11715
11729
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
11716
11730
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -11747,7 +11761,7 @@ class GraphqlService {
|
|
|
11747
11761
|
});
|
|
11748
11762
|
}
|
|
11749
11763
|
}
|
|
11750
|
-
GraphqlService.ɵprov =
|
|
11764
|
+
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" });
|
|
11751
11765
|
GraphqlService.decorators = [
|
|
11752
11766
|
{ type: Injectable, args: [{
|
|
11753
11767
|
providedIn: 'root'
|
|
@@ -11764,7 +11778,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
11764
11778
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
11765
11779
|
];
|
|
11766
11780
|
|
|
11767
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
11781
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
11768
11782
|
class BaseGraphqlServiceOptions {
|
|
11769
11783
|
}
|
|
11770
11784
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -11914,8 +11928,8 @@ class BaseGraphqlService {
|
|
|
11914
11928
|
}
|
|
11915
11929
|
/* -- protected methods -- */
|
|
11916
11930
|
computeMutableWatchQueryId(opts) {
|
|
11917
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
11918
|
-
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
11931
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
11932
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
11919
11933
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
11920
11934
|
}
|
|
11921
11935
|
findMutableWatchQueries(opts) {
|
|
@@ -11978,7 +11992,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
11978
11992
|
/* ------------------------------------
|
|
11979
11993
|
* GraphQL queries
|
|
11980
11994
|
* ------------------------------------*/
|
|
11981
|
-
const Fragments
|
|
11995
|
+
const Fragments = {
|
|
11982
11996
|
account: gql `
|
|
11983
11997
|
fragment AccountFragment on AccountVO {
|
|
11984
11998
|
id
|
|
@@ -12011,13 +12025,13 @@ const Fragments$1 = {
|
|
|
12011
12025
|
`
|
|
12012
12026
|
};
|
|
12013
12027
|
// Load account query
|
|
12014
|
-
const LoadQuery
|
|
12028
|
+
const LoadQuery = gql `
|
|
12015
12029
|
query Account {
|
|
12016
12030
|
data: account {
|
|
12017
12031
|
...AccountFragment
|
|
12018
12032
|
}
|
|
12019
12033
|
}
|
|
12020
|
-
${Fragments
|
|
12034
|
+
${Fragments.account}
|
|
12021
12035
|
`;
|
|
12022
12036
|
// Check email query
|
|
12023
12037
|
const IsEmailExistsQuery = gql `
|
|
@@ -12026,13 +12040,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12026
12040
|
}
|
|
12027
12041
|
`;
|
|
12028
12042
|
// Save (create or update) account mutation
|
|
12029
|
-
const SaveMutation
|
|
12043
|
+
const SaveMutation = gql `
|
|
12030
12044
|
mutation SaveAccount($data:AccountVOInput){
|
|
12031
12045
|
data: saveAccount(account: $data){
|
|
12032
12046
|
...AccountFragment
|
|
12033
12047
|
}
|
|
12034
12048
|
}
|
|
12035
|
-
${Fragments
|
|
12049
|
+
${Fragments.account}
|
|
12036
12050
|
`;
|
|
12037
12051
|
// Create account mutation
|
|
12038
12052
|
const CreateMutation = gql `
|
|
@@ -12041,7 +12055,7 @@ const CreateMutation = gql `
|
|
|
12041
12055
|
...AccountFragment
|
|
12042
12056
|
}
|
|
12043
12057
|
}
|
|
12044
|
-
${Fragments
|
|
12058
|
+
${Fragments.account}
|
|
12045
12059
|
`;
|
|
12046
12060
|
// Sent confirmation email
|
|
12047
12061
|
const SendConfirmEmailMutation = gql `
|
|
@@ -12389,7 +12403,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12389
12403
|
catch (error) {
|
|
12390
12404
|
console.error(error);
|
|
12391
12405
|
this.resetData();
|
|
12392
|
-
throw { code: ErrorCodes
|
|
12406
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
12393
12407
|
}
|
|
12394
12408
|
// Store pubkey+keypair
|
|
12395
12409
|
this.data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -12423,7 +12437,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12423
12437
|
}
|
|
12424
12438
|
catch (err) {
|
|
12425
12439
|
// If account not found, check if email is valid
|
|
12426
|
-
if (err && +(err.code) === ErrorCodes
|
|
12440
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
12427
12441
|
// Check email exists
|
|
12428
12442
|
if (data.username.indexOf('@') !== -1) {
|
|
12429
12443
|
let isEmailExists;
|
|
@@ -12435,11 +12449,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
12435
12449
|
}
|
|
12436
12450
|
// Email not exists (no account)
|
|
12437
12451
|
if (!isEmailExists) {
|
|
12438
|
-
throw { code: ErrorCodes
|
|
12452
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
12439
12453
|
}
|
|
12440
12454
|
}
|
|
12441
12455
|
// Email exists, so error = 'bad password'
|
|
12442
|
-
throw { code: ErrorCodes
|
|
12456
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
12443
12457
|
}
|
|
12444
12458
|
throw err; // resend the first error
|
|
12445
12459
|
}
|
|
@@ -12564,8 +12578,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
12564
12578
|
// Load remotely
|
|
12565
12579
|
else {
|
|
12566
12580
|
const { data } = yield this.graphql.query({
|
|
12567
|
-
query: LoadQuery
|
|
12568
|
-
error: { code: ErrorCodes
|
|
12581
|
+
query: LoadQuery,
|
|
12582
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
12569
12583
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
12570
12584
|
});
|
|
12571
12585
|
json = data;
|
|
@@ -12592,7 +12606,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12592
12606
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12593
12607
|
const isEmailExists = yield this.isEmailExists(email);
|
|
12594
12608
|
if (isEmailExists) {
|
|
12595
|
-
throw { code: ErrorCodes
|
|
12609
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
12596
12610
|
}
|
|
12597
12611
|
});
|
|
12598
12612
|
}
|
|
@@ -12628,7 +12642,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12628
12642
|
locale
|
|
12629
12643
|
},
|
|
12630
12644
|
error: {
|
|
12631
|
-
code: ErrorCodes
|
|
12645
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
12632
12646
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
12633
12647
|
}
|
|
12634
12648
|
});
|
|
@@ -12644,7 +12658,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12644
12658
|
code
|
|
12645
12659
|
},
|
|
12646
12660
|
error: {
|
|
12647
|
-
code: ErrorCodes
|
|
12661
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
12648
12662
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
12649
12663
|
}
|
|
12650
12664
|
});
|
|
@@ -12662,7 +12676,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12662
12676
|
interval: 10
|
|
12663
12677
|
},
|
|
12664
12678
|
error: {
|
|
12665
|
-
code: ErrorCodes
|
|
12679
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
12666
12680
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
12667
12681
|
}
|
|
12668
12682
|
}).subscribe({
|
|
@@ -12764,7 +12778,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12764
12778
|
throw error;
|
|
12765
12779
|
console.error(error);
|
|
12766
12780
|
throw {
|
|
12767
|
-
code: ErrorCodes
|
|
12781
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
12768
12782
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
12769
12783
|
};
|
|
12770
12784
|
}
|
|
@@ -12909,7 +12923,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12909
12923
|
if (!isNew) {
|
|
12910
12924
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
12911
12925
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
12912
|
-
throw { code: ErrorCodes
|
|
12926
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
12913
12927
|
}
|
|
12914
12928
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
12915
12929
|
}
|
|
@@ -12918,10 +12932,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
12918
12932
|
delete json.profiles;
|
|
12919
12933
|
// Execute mutation
|
|
12920
12934
|
const { data } = yield this.graphql.mutate({
|
|
12921
|
-
mutation: isNew ? CreateMutation : SaveMutation
|
|
12935
|
+
mutation: isNew ? CreateMutation : SaveMutation,
|
|
12922
12936
|
variables: { data: json },
|
|
12923
12937
|
error: {
|
|
12924
|
-
code: ErrorCodes
|
|
12938
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
12925
12939
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
12926
12940
|
}
|
|
12927
12941
|
});
|
|
@@ -12941,7 +12955,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12941
12955
|
if (counter > 4) {
|
|
12942
12956
|
if (this._debug)
|
|
12943
12957
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
12944
|
-
throw { code: ErrorCodes
|
|
12958
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
12945
12959
|
}
|
|
12946
12960
|
// Check if valid
|
|
12947
12961
|
if (token) {
|
|
@@ -12951,7 +12965,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12951
12965
|
token
|
|
12952
12966
|
},
|
|
12953
12967
|
error: {
|
|
12954
|
-
code: ErrorCodes
|
|
12968
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
12955
12969
|
message: 'ERROR.UNAUTHORIZED'
|
|
12956
12970
|
},
|
|
12957
12971
|
fetchPolicy: 'no-cache'
|
|
@@ -12967,7 +12981,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12967
12981
|
}
|
|
12968
12982
|
// Generate a new token
|
|
12969
12983
|
const challengeError = {
|
|
12970
|
-
code: ErrorCodes
|
|
12984
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
12971
12985
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
12972
12986
|
};
|
|
12973
12987
|
const data = yield this.graphql.query({
|
|
@@ -13001,7 +13015,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13001
13015
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13002
13016
|
}
|
|
13003
13017
|
}
|
|
13004
|
-
AccountService.ɵprov =
|
|
13018
|
+
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" });
|
|
13005
13019
|
AccountService.decorators = [
|
|
13006
13020
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13007
13021
|
];
|
|
@@ -13261,7 +13275,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13261
13275
|
/* ------------------------------------
|
|
13262
13276
|
* GraphQL queries
|
|
13263
13277
|
* ------------------------------------*/
|
|
13264
|
-
const Fragments = {
|
|
13278
|
+
const Fragments$1 = {
|
|
13265
13279
|
config: gql `
|
|
13266
13280
|
fragment ConfigFragment on ConfigurationVO {
|
|
13267
13281
|
id
|
|
@@ -13288,22 +13302,22 @@ const Fragments = {
|
|
|
13288
13302
|
}
|
|
13289
13303
|
`
|
|
13290
13304
|
};
|
|
13291
|
-
const LoadQuery = gql `
|
|
13305
|
+
const LoadQuery$1 = gql `
|
|
13292
13306
|
query Configuration{
|
|
13293
13307
|
data: configuration{
|
|
13294
13308
|
...ConfigFragment
|
|
13295
13309
|
}
|
|
13296
13310
|
}
|
|
13297
|
-
${Fragments.config}
|
|
13311
|
+
${Fragments$1.config}
|
|
13298
13312
|
`;
|
|
13299
13313
|
// Save (create or update) account mutation
|
|
13300
|
-
const SaveMutation = gql `
|
|
13314
|
+
const SaveMutation$1 = gql `
|
|
13301
13315
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
13302
13316
|
data: saveConfiguration(config: $data){
|
|
13303
13317
|
...ConfigFragment
|
|
13304
13318
|
}
|
|
13305
13319
|
}
|
|
13306
|
-
${Fragments.config}
|
|
13320
|
+
${Fragments$1.config}
|
|
13307
13321
|
`;
|
|
13308
13322
|
const ClearCache = gql `
|
|
13309
13323
|
query ClearCache($name: String) {
|
|
@@ -13391,12 +13405,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13391
13405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13392
13406
|
const now = Date.now();
|
|
13393
13407
|
console.debug('[config] Loading Pod configuration...');
|
|
13394
|
-
const query = opts && opts.query || LoadQuery;
|
|
13408
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
13395
13409
|
const variables = opts && opts.variables || undefined;
|
|
13396
13410
|
const res = yield this.graphql.query({
|
|
13397
13411
|
query,
|
|
13398
13412
|
variables,
|
|
13399
|
-
error: { code: ErrorCodes
|
|
13413
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13400
13414
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
13401
13415
|
});
|
|
13402
13416
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -13421,12 +13435,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13421
13435
|
const json = config.asObject();
|
|
13422
13436
|
// Execute mutation
|
|
13423
13437
|
const res = yield this.graphql.mutate({
|
|
13424
|
-
mutation: SaveMutation,
|
|
13438
|
+
mutation: SaveMutation$1,
|
|
13425
13439
|
variables: {
|
|
13426
13440
|
data: json
|
|
13427
13441
|
},
|
|
13428
13442
|
error: {
|
|
13429
|
-
code: ErrorCodes
|
|
13443
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
13430
13444
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
13431
13445
|
}
|
|
13432
13446
|
});
|
|
@@ -13452,7 +13466,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13452
13466
|
const res = yield this.graphql.query({
|
|
13453
13467
|
query: CacheStatistics,
|
|
13454
13468
|
variables: null,
|
|
13455
|
-
error: { code: ErrorCodes
|
|
13469
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13456
13470
|
fetchPolicy: 'network-only'
|
|
13457
13471
|
});
|
|
13458
13472
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -13468,7 +13482,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13468
13482
|
const res = yield this.graphql.query({
|
|
13469
13483
|
query: ClearCache,
|
|
13470
13484
|
variables,
|
|
13471
|
-
error: { code: ErrorCodes
|
|
13485
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13472
13486
|
fetchPolicy: 'network-only'
|
|
13473
13487
|
});
|
|
13474
13488
|
const data = res && res.clearCache || undefined;
|
|
@@ -13627,7 +13641,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13627
13641
|
});
|
|
13628
13642
|
}
|
|
13629
13643
|
}
|
|
13630
|
-
ConfigService.ɵprov =
|
|
13644
|
+
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" });
|
|
13631
13645
|
ConfigService.decorators = [
|
|
13632
13646
|
{ type: Injectable, args: [{
|
|
13633
13647
|
providedIn: 'root',
|
|
@@ -13646,7 +13660,7 @@ ConfigService.ctorParameters = () => [
|
|
|
13646
13660
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
13647
13661
|
];
|
|
13648
13662
|
|
|
13649
|
-
const moment$
|
|
13663
|
+
const moment$4 = momentImported;
|
|
13650
13664
|
class PlatformService {
|
|
13651
13665
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser) {
|
|
13652
13666
|
this.platform = platform;
|
|
@@ -13811,16 +13825,16 @@ class PlatformService {
|
|
|
13811
13825
|
}
|
|
13812
13826
|
// config moment lib
|
|
13813
13827
|
try {
|
|
13814
|
-
moment$
|
|
13828
|
+
moment$4.locale(event.lang);
|
|
13815
13829
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
13816
13830
|
}
|
|
13817
13831
|
// If error, fallback to en
|
|
13818
13832
|
catch (err) {
|
|
13819
|
-
moment$
|
|
13833
|
+
moment$4.locale('en');
|
|
13820
13834
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
13821
13835
|
}
|
|
13822
13836
|
// Config date adapter
|
|
13823
|
-
this.dateAdapter.setLocale(moment$
|
|
13837
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
13824
13838
|
}
|
|
13825
13839
|
});
|
|
13826
13840
|
this.settings.onChange.subscribe(data => {
|
|
@@ -13957,7 +13971,7 @@ class PlatformService {
|
|
|
13957
13971
|
});
|
|
13958
13972
|
}
|
|
13959
13973
|
}
|
|
13960
|
-
PlatformService.ɵprov =
|
|
13974
|
+
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)); }, token: PlatformService, providedIn: "root" });
|
|
13961
13975
|
PlatformService.decorators = [
|
|
13962
13976
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13963
13977
|
];
|
|
@@ -13972,14 +13986,14 @@ PlatformService.ctorParameters = () => [
|
|
|
13972
13986
|
{ type: NetworkService },
|
|
13973
13987
|
{ type: AccountService },
|
|
13974
13988
|
{ type: ConfigService },
|
|
13975
|
-
{ type: CacheService },
|
|
13989
|
+
{ type: CacheService$1 },
|
|
13976
13990
|
{ type: Storage },
|
|
13977
13991
|
{ type: AudioProvider },
|
|
13978
13992
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
13979
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
13993
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
13980
13994
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
13981
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
13982
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] }
|
|
13995
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
13996
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] }
|
|
13983
13997
|
];
|
|
13984
13998
|
|
|
13985
13999
|
class AppHelpModal {
|
|
@@ -14043,7 +14057,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14043
14057
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14044
14058
|
}
|
|
14045
14059
|
}
|
|
14046
|
-
MatStepperI18n.ɵprov =
|
|
14060
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14047
14061
|
MatStepperI18n.decorators = [
|
|
14048
14062
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14049
14063
|
];
|
|
@@ -15035,7 +15049,7 @@ function state2side(state) {
|
|
|
15035
15049
|
return 1;
|
|
15036
15050
|
}
|
|
15037
15051
|
}
|
|
15038
|
-
const ɵ0$
|
|
15052
|
+
const ɵ0$9 = (defaultStateSize) => [
|
|
15039
15053
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15040
15054
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15041
15055
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15043,7 +15057,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
15043
15057
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15044
15058
|
startColor: rgbArrayMap.red,
|
|
15045
15059
|
startStates: [0, 2, 3],
|
|
15046
|
-
startStepsFn: ɵ0$
|
|
15060
|
+
startStepsFn: ɵ0$9
|
|
15047
15061
|
};
|
|
15048
15062
|
/**
|
|
15049
15063
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15135,21 +15149,21 @@ function linearColorGradient(count, options) {
|
|
|
15135
15149
|
return result;
|
|
15136
15150
|
}
|
|
15137
15151
|
|
|
15138
|
-
class EntityTestClass
|
|
15152
|
+
class EntityTestClass {
|
|
15139
15153
|
}
|
|
15140
|
-
const FAKE_ENTITIES
|
|
15154
|
+
const FAKE_ENTITIES = [
|
|
15141
15155
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15142
15156
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15143
15157
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15144
15158
|
];
|
|
15145
|
-
function deepCopy
|
|
15159
|
+
function deepCopy(values, size) {
|
|
15146
15160
|
if (isNil(size)) {
|
|
15147
|
-
return (values || FAKE_ENTITIES
|
|
15161
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15148
15162
|
}
|
|
15149
15163
|
let result = [];
|
|
15150
15164
|
let i = 1;
|
|
15151
15165
|
while (result.length < size) {
|
|
15152
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
15166
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15153
15167
|
const name = entity.name + ' #' + i;
|
|
15154
15168
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15155
15169
|
}));
|
|
@@ -15159,7 +15173,7 @@ function deepCopy$1(values, size) {
|
|
|
15159
15173
|
class AutocompleteTestPage {
|
|
15160
15174
|
constructor(formBuilder) {
|
|
15161
15175
|
this.formBuilder = formBuilder;
|
|
15162
|
-
this._items = deepCopy
|
|
15176
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15163
15177
|
this.$items = new BehaviorSubject(undefined);
|
|
15164
15178
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15165
15179
|
this.memoryHide = false;
|
|
@@ -15203,7 +15217,7 @@ class AutocompleteTestPage {
|
|
|
15203
15217
|
});
|
|
15204
15218
|
// From items
|
|
15205
15219
|
this.autocompleteFields.add('entity-items-large', {
|
|
15206
|
-
items: FAKE_ENTITIES
|
|
15220
|
+
items: FAKE_ENTITIES.slice(),
|
|
15207
15221
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15208
15222
|
displayWith: this.entityToString
|
|
15209
15223
|
});
|
|
@@ -15213,12 +15227,12 @@ class AutocompleteTestPage {
|
|
|
15213
15227
|
loadData() {
|
|
15214
15228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15215
15229
|
const data = {
|
|
15216
|
-
entity: deepCopy
|
|
15230
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15217
15231
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15218
15232
|
missingEntity: {
|
|
15219
15233
|
id: -1, label: '??', name: 'Missing item'
|
|
15220
15234
|
},
|
|
15221
|
-
disableEntity: deepCopy
|
|
15235
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15222
15236
|
};
|
|
15223
15237
|
this.form.setValue(data);
|
|
15224
15238
|
// Load observables
|
|
@@ -15288,7 +15302,7 @@ class AutocompleteTestPage {
|
|
|
15288
15302
|
AutocompleteTestPage.decorators = [
|
|
15289
15303
|
{ type: Component, args: [{
|
|
15290
15304
|
selector: 'app-autocomplete-test',
|
|
15291
|
-
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 class=\"ion-padding\">\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><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></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 [compareWith]=\"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><pre>mobile: true, suggestFn: (searchText, filter) => 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-suggestFn')\"\n [mobile]=\"true\"\n [compareWith]=\"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><pre>mobile: true, 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 [mobile]=\"true\"\n [compareWith]=\"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><pre>mobile: true, 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=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [compareWith]=\"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 [compareWith]=\"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><pre></pre></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 [compareWith]=\"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><pre>class=\"min-width-large\"</pre></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 [compareWith]=\"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-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col><ion-text><h4>Desktop mode</h4></ion-text></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>\nsuggestLengthThreshold: '3'</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-filter')\"\n [mobile]=\"false\"\n [compareWith]=\"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><pre>items: [], value: {{stringify(form.controls.entity.value)}}</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-array-1]'\"\n [compareWith]=\"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><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\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><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=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [compareWith]=\"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><pre>class: 'mat-autocomplete-panel-full-size'</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 [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [compareWith]=\"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>\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 [compareWith]=\"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 [compareWith]=\"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><pre>class=\"mat-autocomplete-panel-full-size\"</pre></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 [compareWith]=\"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><pre>panelWidth: string</pre></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 [compareWith]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
15305
|
+
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 class=\"ion-padding\">\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><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></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 [compareWith]=\"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><pre>mobile: true, suggestFn: (searchText, filter) => 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-suggestFn')\"\n [mobile]=\"true\"\n [compareWith]=\"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><pre>mobile: true, 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 [mobile]=\"true\"\n [compareWith]=\"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><pre>mobile: true, 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=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [mobile]=\"true\"\n [compareWith]=\"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 [compareWith]=\"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><pre></pre></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 [compareWith]=\"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><pre>class=\"min-width-large\"</pre></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 [compareWith]=\"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-grid>\n\n <!-- Desktop mode -->\n <ion-grid *ngIf=\"mode === 'desktop'\">\n <ion-row>\n <ion-col><ion-text><h4>Desktop mode</h4></ion-text></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>\nsuggestLengthThreshold: '3'</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-filter')\"\n [mobile]=\"false\"\n [compareWith]=\"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><pre>items: [], value: {{stringify(form.controls.entity.value)}}</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-array-1]'\"\n [compareWith]=\"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><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\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><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=\"missingEntity\"\n [config]=\"autocompleteFields.get('entity-$items')\"\n [compareWith]=\"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><pre>class: 'mat-autocomplete-panel-full-size'</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 [mobile]=\"false\"\n [class]=\"'mat-autocomplete-panel-full-size'\"\n [compareWith]=\"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 [compareWith]=\"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 [compareWith]=\"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><pre>class=\"mat-autocomplete-panel-full-size\"</pre></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 [compareWith]=\"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><pre>panelWidth: string</pre></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 [compareWith]=\"compareWithFn\"\n [logPrefix]=\"'[combo-desktop-large]'\"\n ></mat-autocomplete-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n\n\n\n\n </ion-grid>\n\n </form>\n\n</ion-content>\n"
|
|
15292
15306
|
},] }
|
|
15293
15307
|
];
|
|
15294
15308
|
AutocompleteTestPage.ctorParameters = () => [
|
|
@@ -15391,13 +15405,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
15391
15405
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
15392
15406
|
];
|
|
15393
15407
|
|
|
15394
|
-
const moment$
|
|
15408
|
+
const moment$5 = momentImported;
|
|
15395
15409
|
class SwipeTestPage {
|
|
15396
15410
|
constructor(formBuilder, dateFormatPipe) {
|
|
15397
15411
|
this.formBuilder = formBuilder;
|
|
15398
15412
|
this.dateFormatPipe = dateFormatPipe;
|
|
15399
15413
|
this.$dates = new BehaviorSubject(undefined);
|
|
15400
|
-
this._today = moment$
|
|
15414
|
+
this._today = moment$5().startOf('day');
|
|
15401
15415
|
this.form = formBuilder.group({
|
|
15402
15416
|
empty: [null, Validators.required],
|
|
15403
15417
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -15410,7 +15424,7 @@ class SwipeTestPage {
|
|
|
15410
15424
|
ngOnInit() {
|
|
15411
15425
|
const dates = [];
|
|
15412
15426
|
for (let d = 0; d < 7; d++) {
|
|
15413
|
-
dates[d] = moment$
|
|
15427
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
15414
15428
|
}
|
|
15415
15429
|
this.$dates.next(dates);
|
|
15416
15430
|
this.loadData();
|
|
@@ -16027,7 +16041,7 @@ class FormArrayHelper {
|
|
|
16027
16041
|
}
|
|
16028
16042
|
}
|
|
16029
16043
|
|
|
16030
|
-
const moment = momentImported;
|
|
16044
|
+
const moment$6 = momentImported;
|
|
16031
16045
|
class DateTimeTestPage {
|
|
16032
16046
|
constructor(platform, formBuilder, cd) {
|
|
16033
16047
|
this.platform = platform;
|
|
@@ -16058,7 +16072,7 @@ class DateTimeTestPage {
|
|
|
16058
16072
|
// Load the form with data
|
|
16059
16073
|
loadData() {
|
|
16060
16074
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16061
|
-
const now = moment();
|
|
16075
|
+
const now = moment$6();
|
|
16062
16076
|
const data = {
|
|
16063
16077
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16064
16078
|
enable: toDateISOString(now),
|
|
@@ -16118,20 +16132,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16118
16132
|
{ type: ChangeDetectorRef }
|
|
16119
16133
|
];
|
|
16120
16134
|
|
|
16121
|
-
class EntityTestClass {
|
|
16135
|
+
class EntityTestClass$1 {
|
|
16122
16136
|
}
|
|
16123
|
-
const FAKE_ENTITIES = [
|
|
16137
|
+
const FAKE_ENTITIES$1 = [
|
|
16124
16138
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16125
16139
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16126
16140
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16127
16141
|
];
|
|
16128
|
-
function deepCopy(values) {
|
|
16129
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16142
|
+
function deepCopy$1(values) {
|
|
16143
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16130
16144
|
}
|
|
16131
16145
|
class ChipsTestPage {
|
|
16132
16146
|
constructor(formBuilder) {
|
|
16133
16147
|
this.formBuilder = formBuilder;
|
|
16134
|
-
this._items = deepCopy(FAKE_ENTITIES);
|
|
16148
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1);
|
|
16135
16149
|
this._$items = new BehaviorSubject(undefined);
|
|
16136
16150
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16137
16151
|
this.form = formBuilder.group({
|
|
@@ -16150,7 +16164,7 @@ class ChipsTestPage {
|
|
|
16150
16164
|
});
|
|
16151
16165
|
// From items
|
|
16152
16166
|
this.autocompleteFields.add('entity-items', {
|
|
16153
|
-
items: FAKE_ENTITIES.slice(),
|
|
16167
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
16154
16168
|
attributes: ['label', 'name'],
|
|
16155
16169
|
displayWith: this.entityToString
|
|
16156
16170
|
});
|
|
@@ -16171,15 +16185,15 @@ class ChipsTestPage {
|
|
|
16171
16185
|
const data = {
|
|
16172
16186
|
entity: [],
|
|
16173
16187
|
// THis item is NOT in the items list => i should be displayed anyway
|
|
16174
|
-
entityInitial: FAKE_ENTITIES.slice(1, 2),
|
|
16175
|
-
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16188
|
+
entityInitial: FAKE_ENTITIES$1.slice(1, 2),
|
|
16189
|
+
disableEntity: FAKE_ENTITIES$1.slice(1, 2)
|
|
16176
16190
|
};
|
|
16177
16191
|
this.form.setValue(data);
|
|
16178
16192
|
});
|
|
16179
16193
|
}
|
|
16180
16194
|
loadItems() {
|
|
16181
16195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16182
|
-
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16196
|
+
this._$items.next(deepCopy$1(FAKE_ENTITIES$1));
|
|
16183
16197
|
});
|
|
16184
16198
|
}
|
|
16185
16199
|
entityToString(item) {
|
|
@@ -16211,7 +16225,7 @@ ChipsTestPage.ctorParameters = () => [
|
|
|
16211
16225
|
{ type: FormBuilder }
|
|
16212
16226
|
];
|
|
16213
16227
|
|
|
16214
|
-
const routes
|
|
16228
|
+
const routes = [
|
|
16215
16229
|
{
|
|
16216
16230
|
path: '',
|
|
16217
16231
|
pathMatch: 'full',
|
|
@@ -16258,7 +16272,7 @@ MaterialTestingModule.decorators = [
|
|
|
16258
16272
|
ReactiveFormsModule,
|
|
16259
16273
|
SharedMaterialModule,
|
|
16260
16274
|
TranslateModule.forChild(),
|
|
16261
|
-
RouterModule.forChild(routes
|
|
16275
|
+
RouterModule.forChild(routes)
|
|
16262
16276
|
],
|
|
16263
16277
|
declarations: [
|
|
16264
16278
|
MaterialTestingPage,
|
|
@@ -17201,7 +17215,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17201
17215
|
});
|
|
17202
17216
|
}
|
|
17203
17217
|
}
|
|
17204
|
-
UserSettingsValidatorService.ɵprov =
|
|
17218
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17205
17219
|
UserSettingsValidatorService.decorators = [
|
|
17206
17220
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17207
17221
|
];
|
|
@@ -17245,7 +17259,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17245
17259
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17246
17260
|
}
|
|
17247
17261
|
}
|
|
17248
|
-
AccountValidatorService.ɵprov =
|
|
17262
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17249
17263
|
AccountValidatorService.decorators = [
|
|
17250
17264
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17251
17265
|
];
|
|
@@ -17474,6 +17488,7 @@ class FormButtonsBarComponent {
|
|
|
17474
17488
|
.subscribe((event) => this.onCancel.emit(event)));
|
|
17475
17489
|
// Escape
|
|
17476
17490
|
this._subscription.add(hotkeys.addShortcut({ keys: 'escape', description: 'COMMON.BTN_CLOSE', preventDefault: false })
|
|
17491
|
+
.pipe(filter(e => !e.defaultPrevented))
|
|
17477
17492
|
.subscribe((event) => this.onBack.emit(event)));
|
|
17478
17493
|
}
|
|
17479
17494
|
ngOnDestroy() {
|
|
@@ -17778,7 +17793,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17778
17793
|
});
|
|
17779
17794
|
}
|
|
17780
17795
|
}
|
|
17781
|
-
LocalSettingsValidatorService.ɵprov =
|
|
17796
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
17782
17797
|
LocalSettingsValidatorService.decorators = [
|
|
17783
17798
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17784
17799
|
];
|
|
@@ -18398,7 +18413,7 @@ class IsOnFieldModePipe {
|
|
|
18398
18413
|
return value === 'FIELD';
|
|
18399
18414
|
}
|
|
18400
18415
|
}
|
|
18401
|
-
IsOnFieldModePipe.ɵprov =
|
|
18416
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18402
18417
|
IsOnFieldModePipe.decorators = [
|
|
18403
18418
|
{ type: Pipe, args: [{
|
|
18404
18419
|
name: 'isOnField'
|
|
@@ -18410,7 +18425,7 @@ class IsNotOnFieldModePipe {
|
|
|
18410
18425
|
return value !== 'FIELD';
|
|
18411
18426
|
}
|
|
18412
18427
|
}
|
|
18413
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18428
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18414
18429
|
IsNotOnFieldModePipe.decorators = [
|
|
18415
18430
|
{ type: Pipe, args: [{
|
|
18416
18431
|
name: 'isNotOnField'
|
|
@@ -18425,7 +18440,7 @@ class PersonToStringPipe {
|
|
|
18425
18440
|
return PersonUtils.personToString(value);
|
|
18426
18441
|
}
|
|
18427
18442
|
}
|
|
18428
|
-
PersonToStringPipe.ɵprov =
|
|
18443
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18429
18444
|
PersonToStringPipe.decorators = [
|
|
18430
18445
|
{ type: Pipe, args: [{
|
|
18431
18446
|
name: 'personToString'
|
|
@@ -18642,7 +18657,7 @@ class IsLoginAccountPipe {
|
|
|
18642
18657
|
return value && value.pubkey && true;
|
|
18643
18658
|
}
|
|
18644
18659
|
}
|
|
18645
|
-
IsLoginAccountPipe.ɵprov =
|
|
18660
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18646
18661
|
IsLoginAccountPipe.decorators = [
|
|
18647
18662
|
{ type: Pipe, args: [{
|
|
18648
18663
|
name: 'isLogin'
|
|
@@ -18654,7 +18669,7 @@ class AccountToStringPipe {
|
|
|
18654
18669
|
return accountToString(value);
|
|
18655
18670
|
}
|
|
18656
18671
|
}
|
|
18657
|
-
AccountToStringPipe.ɵprov =
|
|
18672
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
18658
18673
|
AccountToStringPipe.decorators = [
|
|
18659
18674
|
{ type: Pipe, args: [{
|
|
18660
18675
|
name: 'accountToString'
|
|
@@ -18669,7 +18684,7 @@ class DepartmentToStringPipe {
|
|
|
18669
18684
|
return departmentToString(value);
|
|
18670
18685
|
}
|
|
18671
18686
|
}
|
|
18672
|
-
DepartmentToStringPipe.ɵprov =
|
|
18687
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
18673
18688
|
DepartmentToStringPipe.decorators = [
|
|
18674
18689
|
{ type: Pipe, args: [{
|
|
18675
18690
|
name: 'departmentToString'
|
|
@@ -18695,7 +18710,7 @@ class MenuService {
|
|
|
18695
18710
|
this._visibleSubject.next(value);
|
|
18696
18711
|
}
|
|
18697
18712
|
}
|
|
18698
|
-
MenuService.ɵprov =
|
|
18713
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
18699
18714
|
MenuService.decorators = [
|
|
18700
18715
|
{ type: Injectable, args: [{
|
|
18701
18716
|
providedIn: 'root'
|
|
@@ -19189,7 +19204,7 @@ class AuthGuardService {
|
|
|
19189
19204
|
}));
|
|
19190
19205
|
}
|
|
19191
19206
|
}
|
|
19192
|
-
AuthGuardService.ɵprov =
|
|
19207
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
19193
19208
|
AuthGuardService.decorators = [
|
|
19194
19209
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19195
19210
|
];
|
|
@@ -19237,7 +19252,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19237
19252
|
query,
|
|
19238
19253
|
variables: { id },
|
|
19239
19254
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19240
|
-
error: { code: ErrorCodes
|
|
19255
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19241
19256
|
})
|
|
19242
19257
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19243
19258
|
? (data && this.fromObject(data))
|
|
@@ -19252,7 +19267,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19252
19267
|
query,
|
|
19253
19268
|
variables: { id },
|
|
19254
19269
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19255
|
-
error: { code: ErrorCodes
|
|
19270
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19256
19271
|
});
|
|
19257
19272
|
// Convert to entity
|
|
19258
19273
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19283,7 +19298,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19283
19298
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19284
19299
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19285
19300
|
variables,
|
|
19286
|
-
error: { code: ErrorCodes
|
|
19301
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19287
19302
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19288
19303
|
})
|
|
19289
19304
|
.pipe(map(({ data, total }) => {
|
|
@@ -19319,7 +19334,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19319
19334
|
const { data, total } = yield this.graphql.query({
|
|
19320
19335
|
query,
|
|
19321
19336
|
variables,
|
|
19322
|
-
error: { code: ErrorCodes
|
|
19337
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19323
19338
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19324
19339
|
});
|
|
19325
19340
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19358,7 +19373,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19358
19373
|
variables: {
|
|
19359
19374
|
filter: filter && filter.asPodObject()
|
|
19360
19375
|
},
|
|
19361
|
-
error: { code: ErrorCodes
|
|
19376
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19362
19377
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19363
19378
|
});
|
|
19364
19379
|
return res.total;
|
|
@@ -19391,7 +19406,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19391
19406
|
variables: {
|
|
19392
19407
|
data: json
|
|
19393
19408
|
},
|
|
19394
|
-
error: { code: ErrorCodes
|
|
19409
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19395
19410
|
update: (proxy, { data }) => {
|
|
19396
19411
|
const savedEntities = data && data.data;
|
|
19397
19412
|
if (savedEntities) {
|
|
@@ -19447,7 +19462,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19447
19462
|
variables: {
|
|
19448
19463
|
data: json
|
|
19449
19464
|
},
|
|
19450
|
-
error: { code: ErrorCodes
|
|
19465
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19451
19466
|
update: (cache, { data }) => {
|
|
19452
19467
|
// Update entity
|
|
19453
19468
|
const savedEntity = data && data.data;
|
|
@@ -19495,7 +19510,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19495
19510
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19496
19511
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19497
19512
|
variables: { ids },
|
|
19498
|
-
error: { code: ErrorCodes
|
|
19513
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19499
19514
|
update: (cache, res) => {
|
|
19500
19515
|
// Remove from cache
|
|
19501
19516
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19536,7 +19551,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19536
19551
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19537
19552
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19538
19553
|
variables: { id },
|
|
19539
|
-
error: { code: ErrorCodes
|
|
19554
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19540
19555
|
update: (proxy, res) => {
|
|
19541
19556
|
// Remove from cache
|
|
19542
19557
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19569,7 +19584,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19569
19584
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19570
19585
|
variables,
|
|
19571
19586
|
error: {
|
|
19572
|
-
code: ErrorCodes
|
|
19587
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19573
19588
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19574
19589
|
}
|
|
19575
19590
|
})
|
|
@@ -19744,7 +19759,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
19744
19759
|
if (this._debug)
|
|
19745
19760
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
19746
19761
|
// Stop with an error
|
|
19747
|
-
throw { code: ErrorCodes
|
|
19762
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
19748
19763
|
}
|
|
19749
19764
|
this._editingRowCount = 0;
|
|
19750
19765
|
let data;
|
|
@@ -20055,13 +20070,6 @@ class AppTable {
|
|
|
20055
20070
|
get saving$() {
|
|
20056
20071
|
return this.savingSubject.asObservable();
|
|
20057
20072
|
}
|
|
20058
|
-
// Focus manager
|
|
20059
|
-
set focusColumn(name) {
|
|
20060
|
-
this._focusColumn = name;
|
|
20061
|
-
}
|
|
20062
|
-
get focusColumn() {
|
|
20063
|
-
return this._focusColumn;
|
|
20064
|
-
}
|
|
20065
20073
|
get firstUserColumn() {
|
|
20066
20074
|
return this.displayedColumns[RESERVED_START_COLUMNS.length];
|
|
20067
20075
|
}
|
|
@@ -20573,14 +20581,14 @@ class AppTable {
|
|
|
20573
20581
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20574
20582
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20575
20583
|
if (this.readOnly) {
|
|
20576
|
-
throw { code: ErrorCodes
|
|
20584
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20577
20585
|
}
|
|
20578
20586
|
this.resetError();
|
|
20579
20587
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20580
20588
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20581
20589
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20582
20590
|
if (!this.confirmEditCreate()) {
|
|
20583
|
-
throw { code: ErrorCodes
|
|
20591
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20584
20592
|
}
|
|
20585
20593
|
// Mark as saving
|
|
20586
20594
|
this.markAsSaving();
|
|
@@ -20696,7 +20704,7 @@ class AppTable {
|
|
|
20696
20704
|
deleteRows(event, rows, opts) {
|
|
20697
20705
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20698
20706
|
if (this.readOnly) {
|
|
20699
|
-
throw { code: ErrorCodes
|
|
20707
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20700
20708
|
}
|
|
20701
20709
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
20702
20710
|
return 0; // SKip
|
|
@@ -20852,13 +20860,15 @@ class AppTable {
|
|
|
20852
20860
|
row = row || this.editedRow;
|
|
20853
20861
|
if (!row || !row.editing)
|
|
20854
20862
|
return;
|
|
20863
|
+
// DEBUG
|
|
20864
|
+
//console.debug('[app-table] Cancel the row (keydown.escape)');
|
|
20855
20865
|
if (event) {
|
|
20856
20866
|
// Avoid to cancel the editor
|
|
20857
20867
|
event.preventDefault();
|
|
20858
20868
|
event.stopPropagation();
|
|
20859
20869
|
}
|
|
20860
|
-
// If new row: delete silently
|
|
20861
|
-
if (row.id === -1) {
|
|
20870
|
+
// If new row is invalid: delete silently
|
|
20871
|
+
if (row.id === -1 && row.validator.invalid) {
|
|
20862
20872
|
this.deleteNewRow(event, row);
|
|
20863
20873
|
}
|
|
20864
20874
|
// If exists
|
|
@@ -20885,7 +20895,7 @@ class AppTable {
|
|
|
20885
20895
|
return false;
|
|
20886
20896
|
}
|
|
20887
20897
|
if (!row.editing && !this.loading) {
|
|
20888
|
-
this.
|
|
20898
|
+
this.focusColumn = opts && opts.focusColumn || this.focusColumn;
|
|
20889
20899
|
this._dataSource.startEdit(row);
|
|
20890
20900
|
}
|
|
20891
20901
|
this.editedRow = row;
|
|
@@ -22125,7 +22135,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22125
22135
|
try {
|
|
22126
22136
|
const data = yield this.dataService.load(id, opts);
|
|
22127
22137
|
if (!data)
|
|
22128
|
-
throw { code: ErrorCodes
|
|
22138
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22129
22139
|
this._usageMode = this.computeUsageMode(data);
|
|
22130
22140
|
yield this.onEntityLoaded(data, opts);
|
|
22131
22141
|
yield this.updateView(data, opts);
|
|
@@ -23018,7 +23028,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23018
23028
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23019
23029
|
}
|
|
23020
23030
|
}
|
|
23021
|
-
UserEventService.ɵprov =
|
|
23031
|
+
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" });
|
|
23022
23032
|
UserEventService.decorators = [
|
|
23023
23033
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23024
23034
|
];
|
|
@@ -23400,7 +23410,7 @@ class PersonService extends BaseEntityService {
|
|
|
23400
23410
|
return target;
|
|
23401
23411
|
}
|
|
23402
23412
|
}
|
|
23403
|
-
PersonService.ɵprov =
|
|
23413
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
23404
23414
|
PersonService.decorators = [
|
|
23405
23415
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23406
23416
|
];
|
|
@@ -23431,7 +23441,7 @@ class PersonValidatorService {
|
|
|
23431
23441
|
return this.formBuilder.group(formConfig);
|
|
23432
23442
|
}
|
|
23433
23443
|
}
|
|
23434
|
-
PersonValidatorService.ɵprov =
|
|
23444
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23435
23445
|
PersonValidatorService.decorators = [
|
|
23436
23446
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23437
23447
|
];
|
|
@@ -23587,7 +23597,7 @@ UsersPage.decorators = [
|
|
|
23587
23597
|
],
|
|
23588
23598
|
animations: [slideUpDownAnimation],
|
|
23589
23599
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23590
|
-
styles: [".mat-expansion-panel{margin-bottom:5px}.mat-expansion-panel .form-container mat-form-field{width:100%}.mat-expansion-panel mat-action-row ion-label{line-height:36px}.table-container{height:
|
|
23600
|
+
styles: [".mat-expansion-panel{margin-bottom:5px}.mat-expansion-panel .form-container mat-form-field{width:100%}.mat-expansion-panel mat-action-row ion-label{line-height:36px}.table-container{height:100%}.mat-table .mat-cell .avatar{height:40px;width:40px;margin:2px 0 0;background-size:cover;background-repeat:no-repeat;background-position:50%}.mat-table .mat-column-avatar{min-width:50px}.mat-table .mat-column-profile{min-width:110px}.mat-table .mat-column-status{min-width:130px}.mat-table .mat-column-department{min-width:150px}"]
|
|
23591
23601
|
},] }
|
|
23592
23602
|
];
|
|
23593
23603
|
UsersPage.ctorParameters = () => [
|
|
@@ -23635,16 +23645,16 @@ AdminModule.decorators = [
|
|
|
23635
23645
|
];
|
|
23636
23646
|
AdminModule.ctorParameters = () => [];
|
|
23637
23647
|
|
|
23638
|
-
const ɵ0 = {
|
|
23648
|
+
const ɵ0$a = {
|
|
23639
23649
|
profile: 'ADMIN'
|
|
23640
23650
|
};
|
|
23641
|
-
const routes = [
|
|
23651
|
+
const routes$1 = [
|
|
23642
23652
|
{
|
|
23643
23653
|
path: 'users',
|
|
23644
23654
|
pathMatch: 'full',
|
|
23645
23655
|
component: UsersPage,
|
|
23646
23656
|
canActivate: [AuthGuardService],
|
|
23647
|
-
data: ɵ0
|
|
23657
|
+
data: ɵ0$a
|
|
23648
23658
|
}
|
|
23649
23659
|
];
|
|
23650
23660
|
class AdminRoutingModule {
|
|
@@ -23654,13 +23664,13 @@ AdminRoutingModule.decorators = [
|
|
|
23654
23664
|
imports: [
|
|
23655
23665
|
SharedRoutingModule,
|
|
23656
23666
|
AdminModule,
|
|
23657
|
-
RouterModule.forChild(routes)
|
|
23667
|
+
RouterModule.forChild(routes$1)
|
|
23658
23668
|
],
|
|
23659
23669
|
exports: [RouterModule]
|
|
23660
23670
|
},] }
|
|
23661
23671
|
];
|
|
23662
23672
|
|
|
23663
|
-
const ErrorCodes = {
|
|
23673
|
+
const ErrorCodes$2 = {
|
|
23664
23674
|
LOAD_PERSONS_ERROR: 100,
|
|
23665
23675
|
SAVE_PERSONS_ERROR: 101,
|
|
23666
23676
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -23672,5 +23682,5 @@ const ErrorCodes = {
|
|
|
23672
23682
|
* Generated bundle index. Do not edit.
|
|
23673
23683
|
*/
|
|
23674
23684
|
|
|
23675
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, 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, 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, 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, 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, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, 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, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh };
|
|
23685
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, 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, 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, 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, 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, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, 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, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh };
|
|
23676
23686
|
//# sourceMappingURL=ngx-sumaris-components.js.map
|