@sumaris-net/ngx-components 0.22.0 → 0.23.2-beta
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 +326 -313
- 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/form/form.utils.js +3 -3
- package/esm2015/src/app/core/form/list.form.js +11 -2
- 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 +6 -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 +323 -300
- 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/form/list.form.d.ts +3 -0
- 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,11 @@ function suggestFromArray(items, value, opts) {
|
|
|
265
250
|
items = items.filter(v => !opts.excludedIds.includes(+v['id']));
|
|
266
251
|
}
|
|
267
252
|
// Sort
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
253
|
+
items = items.sort(propertiesPathComparator(keys));
|
|
254
|
+
// const sortAttribute = keys && keys[0]
|
|
255
|
+
// if (sortAttribute) {
|
|
256
|
+
// items = sort(items, sortAttribute);
|
|
257
|
+
// }
|
|
272
258
|
// Truncate if need
|
|
273
259
|
const total = (items === null || items === void 0 ? void 0 : items.length) || 0;
|
|
274
260
|
if (opts) {
|
|
@@ -887,19 +873,19 @@ class MatAutocompleteConfigHolder {
|
|
|
887
873
|
return this.fields[fieldName] || this.add(fieldName);
|
|
888
874
|
}
|
|
889
875
|
}
|
|
890
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
876
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
891
877
|
provide: NG_VALUE_ACCESSOR,
|
|
892
878
|
useExisting: forwardRef(() => MatAutocompleteField),
|
|
893
879
|
multi: true
|
|
894
880
|
};
|
|
895
|
-
const noop
|
|
896
|
-
const ɵ0
|
|
881
|
+
const noop = () => { };
|
|
882
|
+
const ɵ0 = noop;
|
|
897
883
|
class MatAutocompleteField {
|
|
898
884
|
constructor(cd, formGroupDir) {
|
|
899
885
|
this.cd = cd;
|
|
900
886
|
this.formGroupDir = formGroupDir;
|
|
901
|
-
this._onChangeCallback = noop
|
|
902
|
-
this._onTouchedCallback = noop
|
|
887
|
+
this._onChangeCallback = noop;
|
|
888
|
+
this._onTouchedCallback = noop;
|
|
903
889
|
this._subscription = new Subscription();
|
|
904
890
|
this._filter$ = new BehaviorSubject(undefined);
|
|
905
891
|
this._reload$ = new Subject();
|
|
@@ -927,6 +913,8 @@ class MatAutocompleteField {
|
|
|
927
913
|
this.onBlur = new EventEmitter();
|
|
928
914
|
this.onFocus = new EventEmitter();
|
|
929
915
|
this.onDropButtonClick = new EventEmitter(true);
|
|
916
|
+
this.onKeydownEscape = new EventEmitter();
|
|
917
|
+
this.onKeyupEnter = new EventEmitter();
|
|
930
918
|
}
|
|
931
919
|
get itemCount() {
|
|
932
920
|
return this._itemCount;
|
|
@@ -1170,6 +1158,15 @@ class MatAutocompleteField {
|
|
|
1170
1158
|
.pipe(distinctUntilChanged())
|
|
1171
1159
|
// Update component state
|
|
1172
1160
|
.subscribe(() => this.checkIfTouched()));
|
|
1161
|
+
this._subscription.add(this.onKeydownEscape.subscribe(event => {
|
|
1162
|
+
if (this.isOpen) {
|
|
1163
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
1164
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
1165
|
+
// DEBUG
|
|
1166
|
+
//console.debug(this.logPrefix + " Closing the panel (keydown.escape)");
|
|
1167
|
+
this.closePanel();
|
|
1168
|
+
}
|
|
1169
|
+
}));
|
|
1173
1170
|
}
|
|
1174
1171
|
ngOnDestroy() {
|
|
1175
1172
|
this._subscription.unsubscribe();
|
|
@@ -1181,6 +1178,8 @@ class MatAutocompleteField {
|
|
|
1181
1178
|
this.onClick.complete();
|
|
1182
1179
|
this.onBlur.complete();
|
|
1183
1180
|
this.onFocus.complete();
|
|
1181
|
+
this.onKeydownEscape.complete();
|
|
1182
|
+
this.onKeyupEnter.complete();
|
|
1184
1183
|
this._implicitValue = undefined;
|
|
1185
1184
|
this.formControl = null;
|
|
1186
1185
|
this.displayWith = null;
|
|
@@ -1194,8 +1193,8 @@ class MatAutocompleteField {
|
|
|
1194
1193
|
this._onTouchedCallback = null;
|
|
1195
1194
|
this._onFetchMoreCallback = null;
|
|
1196
1195
|
// Destroy the 'autocomplete' instance, to avoid memory leak
|
|
1197
|
-
if (this.
|
|
1198
|
-
this.
|
|
1196
|
+
if (this.matAutocomplete) {
|
|
1197
|
+
this.matAutocomplete.ngOnDestroy();
|
|
1199
1198
|
}
|
|
1200
1199
|
}
|
|
1201
1200
|
/**
|
|
@@ -1221,8 +1220,8 @@ class MatAutocompleteField {
|
|
|
1221
1220
|
}
|
|
1222
1221
|
setDisabledState(isDisabled) {
|
|
1223
1222
|
var _a;
|
|
1224
|
-
if (isDisabled && ((_a = this.
|
|
1225
|
-
|
|
1223
|
+
if (isDisabled && ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen)) {
|
|
1224
|
+
this.closePanel();
|
|
1226
1225
|
}
|
|
1227
1226
|
this.cd.markForCheck();
|
|
1228
1227
|
}
|
|
@@ -1320,7 +1319,7 @@ class MatAutocompleteField {
|
|
|
1320
1319
|
event.stopPropagation();
|
|
1321
1320
|
}
|
|
1322
1321
|
_initAutocompleteInfiniteScroll(threshold) {
|
|
1323
|
-
if (!this.
|
|
1322
|
+
if (!this.matAutocomplete)
|
|
1324
1323
|
return; // Skip
|
|
1325
1324
|
// DEBUG
|
|
1326
1325
|
//console.debug(this.logPrefix + ' Init autocomplete scroll listener');
|
|
@@ -1328,12 +1327,12 @@ class MatAutocompleteField {
|
|
|
1328
1327
|
this._openedSubscription.unsubscribe();
|
|
1329
1328
|
this._subscription.remove(this._openedSubscription);
|
|
1330
1329
|
}
|
|
1331
|
-
const opened$ = this.
|
|
1330
|
+
const opened$ = this.matAutocomplete._isOpen
|
|
1332
1331
|
? timer(0)
|
|
1333
|
-
: this.
|
|
1332
|
+
: this.matAutocomplete.opened.pipe(debounceTime(200));
|
|
1334
1333
|
const scrollEnd$ = opened$
|
|
1335
1334
|
.pipe(map((_) => this.getAutocompletePanel()), filter(isNotNil), switchMap((panel) => fromScrollEndEvent(panel, threshold)
|
|
1336
|
-
.pipe(takeUntil(this.
|
|
1335
|
+
.pipe(takeUntil(this.matAutocomplete.closed))));
|
|
1337
1336
|
// Trigger fetch more, end end scroll reached
|
|
1338
1337
|
this._openedSubscription = scrollEnd$
|
|
1339
1338
|
.subscribe(() => this._fetchMore$.emit());
|
|
@@ -1362,6 +1361,22 @@ class MatAutocompleteField {
|
|
|
1362
1361
|
// Register subscription
|
|
1363
1362
|
this._subscription.add(this._openedSubscription);
|
|
1364
1363
|
}
|
|
1364
|
+
get isOpen() {
|
|
1365
|
+
var _a, _b;
|
|
1366
|
+
return (this.searchable && ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen))
|
|
1367
|
+
|| ((_b = this.matSelect) === null || _b === void 0 ? void 0 : _b.panelOpen)
|
|
1368
|
+
|| false;
|
|
1369
|
+
}
|
|
1370
|
+
closePanel() {
|
|
1371
|
+
var _a, _b, _c, _d;
|
|
1372
|
+
if ((_a = this.matAutocomplete) === null || _a === void 0 ? void 0 : _a.isOpen) {
|
|
1373
|
+
(_b = this.matAutocompleteTrigger) === null || _b === void 0 ? void 0 : _b.closePanel();
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
if ((_c = this.matSelect) === null || _c === void 0 ? void 0 : _c.panelOpen) {
|
|
1377
|
+
(_d = this.matSelect) === null || _d === void 0 ? void 0 : _d.close();
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1365
1380
|
/* -- private method -- */
|
|
1366
1381
|
suggest(value, filter) {
|
|
1367
1382
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1422,7 +1437,7 @@ class MatAutocompleteField {
|
|
|
1422
1437
|
}
|
|
1423
1438
|
getAutocompletePanel() {
|
|
1424
1439
|
var _a, _b;
|
|
1425
|
-
const ele = (_b = (_a = this.
|
|
1440
|
+
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
1441
|
if (!ele) {
|
|
1427
1442
|
// DEBUG
|
|
1428
1443
|
console.warn(this.logPrefix + ' Unable to find the autocomplete div...');
|
|
@@ -1456,8 +1471,8 @@ MatAutocompleteField.decorators = [
|
|
|
1456
1471
|
{ type: Component, args: [{
|
|
1457
1472
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1458
1473
|
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
|
|
1474
|
+
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",
|
|
1475
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
1461
1476
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1462
1477
|
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
1478
|
},] }
|
|
@@ -1506,9 +1521,12 @@ MatAutocompleteField.propDecorators = {
|
|
|
1506
1521
|
onBlur: [{ type: Output, args: ['blur',] }],
|
|
1507
1522
|
onFocus: [{ type: Output, args: ['focus',] }],
|
|
1508
1523
|
onDropButtonClick: [{ type: Output, args: ['dropButtonClick',] }],
|
|
1524
|
+
onKeydownEscape: [{ type: Output, args: ['keydown.escape',] }],
|
|
1525
|
+
onKeyupEnter: [{ type: Output, args: ['keyup.enter',] }],
|
|
1509
1526
|
matSelect: [{ type: ViewChild, args: ['matSelect',] }],
|
|
1510
1527
|
matInputText: [{ type: ViewChild, args: ['matInputText',] }],
|
|
1511
|
-
|
|
1528
|
+
matAutocomplete: [{ type: ViewChild, args: [MatAutocomplete,] }],
|
|
1529
|
+
matAutocompleteTrigger: [{ type: ViewChild, args: [MatAutocompleteTrigger,] }]
|
|
1512
1530
|
};
|
|
1513
1531
|
|
|
1514
1532
|
class DateFormatPipe {
|
|
@@ -1531,7 +1549,7 @@ class DateFormatPipe {
|
|
|
1531
1549
|
return this.dateAdapter.format(date, displayFormat);
|
|
1532
1550
|
}
|
|
1533
1551
|
}
|
|
1534
|
-
DateFormatPipe.ɵprov =
|
|
1552
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1535
1553
|
DateFormatPipe.decorators = [
|
|
1536
1554
|
{ type: Pipe, args: [{
|
|
1537
1555
|
name: 'dateFormat'
|
|
@@ -1543,7 +1561,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1543
1561
|
{ type: TranslateService }
|
|
1544
1562
|
];
|
|
1545
1563
|
|
|
1546
|
-
const moment
|
|
1564
|
+
const moment = momentImported;
|
|
1547
1565
|
class DateDiffDurationPipe {
|
|
1548
1566
|
constructor(dateAdapter, translate) {
|
|
1549
1567
|
this.dateAdapter = dateAdapter;
|
|
@@ -1559,17 +1577,17 @@ class DateDiffDurationPipe {
|
|
|
1559
1577
|
return this.format(startDate, endDate);
|
|
1560
1578
|
}
|
|
1561
1579
|
format(startDate, endDate) {
|
|
1562
|
-
const duration = moment
|
|
1580
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1563
1581
|
if (duration.asMinutes() < 0)
|
|
1564
1582
|
return '';
|
|
1565
|
-
const timeDuration = moment
|
|
1583
|
+
const timeDuration = moment(0)
|
|
1566
1584
|
.hour(duration.hours())
|
|
1567
1585
|
.minute(duration.minutes());
|
|
1568
1586
|
const days = Math.floor(duration.asDays());
|
|
1569
1587
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1570
1588
|
}
|
|
1571
1589
|
}
|
|
1572
|
-
DateDiffDurationPipe.ɵprov =
|
|
1590
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1573
1591
|
DateDiffDurationPipe.decorators = [
|
|
1574
1592
|
{ type: Pipe, args: [{
|
|
1575
1593
|
name: 'dateDiffDuration'
|
|
@@ -1590,7 +1608,7 @@ class DateFromNowPipe {
|
|
|
1590
1608
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1591
1609
|
}
|
|
1592
1610
|
}
|
|
1593
|
-
DateFromNowPipe.ɵprov =
|
|
1611
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1594
1612
|
DateFromNowPipe.decorators = [
|
|
1595
1613
|
{ type: Pipe, args: [{
|
|
1596
1614
|
name: 'dateFromNow'
|
|
@@ -1659,7 +1677,7 @@ function formatToDD(value, opts) {
|
|
|
1659
1677
|
value *= -1;
|
|
1660
1678
|
}
|
|
1661
1679
|
}
|
|
1662
|
-
let degrees = roundFloat
|
|
1680
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1663
1681
|
// Add sign
|
|
1664
1682
|
let sign = negative ? '-' : '+';
|
|
1665
1683
|
if (opts.placeholderChar) {
|
|
@@ -1710,7 +1728,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1710
1728
|
}
|
|
1711
1729
|
let degrees = Math.trunc(value);
|
|
1712
1730
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1713
|
-
let seconds = roundFloat
|
|
1731
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1714
1732
|
while (seconds >= 60) {
|
|
1715
1733
|
seconds -= 60;
|
|
1716
1734
|
minutes += 1;
|
|
@@ -1778,7 +1796,7 @@ function formatToDDMM(value, opts) {
|
|
|
1778
1796
|
}
|
|
1779
1797
|
}
|
|
1780
1798
|
let degrees = Math.trunc(value);
|
|
1781
|
-
let minutes = roundFloat
|
|
1799
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1782
1800
|
while (minutes >= 60) {
|
|
1783
1801
|
minutes -= 60;
|
|
1784
1802
|
degrees += 1;
|
|
@@ -1829,15 +1847,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
1829
1847
|
return NaN;
|
|
1830
1848
|
}
|
|
1831
1849
|
if (pattern === 'DD')
|
|
1832
|
-
return roundFloat
|
|
1850
|
+
return roundFloat(degrees, maxDecimals);
|
|
1833
1851
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
1834
1852
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
1835
1853
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
1836
1854
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
1837
1855
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
1838
|
-
return roundFloat
|
|
1856
|
+
return roundFloat(degrees, maxDecimals);
|
|
1839
1857
|
}
|
|
1840
|
-
function roundFloat
|
|
1858
|
+
function roundFloat(input, maxDecimals) {
|
|
1841
1859
|
if (maxDecimals > 0) {
|
|
1842
1860
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
1843
1861
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -1857,7 +1875,7 @@ class LatLongFormatPipe {
|
|
|
1857
1875
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
1858
1876
|
}
|
|
1859
1877
|
}
|
|
1860
|
-
LatLongFormatPipe.ɵprov =
|
|
1878
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
1861
1879
|
LatLongFormatPipe.decorators = [
|
|
1862
1880
|
{ type: Pipe, args: [{
|
|
1863
1881
|
name: 'latLongFormat'
|
|
@@ -1869,7 +1887,7 @@ class LatitudeFormatPipe {
|
|
|
1869
1887
|
this.transform = formatLatitude;
|
|
1870
1888
|
}
|
|
1871
1889
|
}
|
|
1872
|
-
LatitudeFormatPipe.ɵprov =
|
|
1890
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
1873
1891
|
LatitudeFormatPipe.decorators = [
|
|
1874
1892
|
{ type: Pipe, args: [{
|
|
1875
1893
|
name: 'latitudeFormat'
|
|
@@ -1881,7 +1899,7 @@ class LongitudeFormatPipe {
|
|
|
1881
1899
|
this.transform = formatLongitude;
|
|
1882
1900
|
}
|
|
1883
1901
|
}
|
|
1884
|
-
LongitudeFormatPipe.ɵprov =
|
|
1902
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
1885
1903
|
LongitudeFormatPipe.decorators = [
|
|
1886
1904
|
{ type: Pipe, args: [{
|
|
1887
1905
|
name: 'longitudeFormat'
|
|
@@ -1901,7 +1919,7 @@ class NumberFormatPipe {
|
|
|
1901
1919
|
}
|
|
1902
1920
|
}
|
|
1903
1921
|
}
|
|
1904
|
-
NumberFormatPipe.ɵprov =
|
|
1922
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
1905
1923
|
NumberFormatPipe.decorators = [
|
|
1906
1924
|
{ type: Pipe, args: [{
|
|
1907
1925
|
name: 'numberFormat'
|
|
@@ -1941,7 +1959,7 @@ class HighlightPipe {
|
|
|
1941
1959
|
}
|
|
1942
1960
|
}
|
|
1943
1961
|
}
|
|
1944
|
-
HighlightPipe.ɵprov =
|
|
1962
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
1945
1963
|
HighlightPipe.decorators = [
|
|
1946
1964
|
{ type: Pipe, args: [{
|
|
1947
1965
|
name: 'highlight'
|
|
@@ -2006,7 +2024,7 @@ FileSizePipe.decorators = [
|
|
|
2006
2024
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2007
2025
|
];
|
|
2008
2026
|
|
|
2009
|
-
const moment$
|
|
2027
|
+
const moment$1 = momentImported;
|
|
2010
2028
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2011
2029
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2012
2030
|
class DateUtils {
|
|
@@ -2040,32 +2058,32 @@ function fromDateISOString(value) {
|
|
|
2040
2058
|
if (!value || isMoment(value))
|
|
2041
2059
|
return value;
|
|
2042
2060
|
// Parse the input value, as a ISO date time
|
|
2043
|
-
const date = moment$
|
|
2061
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2044
2062
|
if (date.isValid())
|
|
2045
2063
|
return date;
|
|
2046
2064
|
// Not valid: trying to convert from unix timestamp
|
|
2047
2065
|
if (typeof value === 'string') {
|
|
2048
2066
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2049
2067
|
if (value.length === 10) {
|
|
2050
|
-
return moment$
|
|
2068
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2051
2069
|
}
|
|
2052
2070
|
else if (value.length === 13) {
|
|
2053
|
-
return moment$
|
|
2071
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2054
2072
|
}
|
|
2055
2073
|
}
|
|
2056
2074
|
console.warn('Unable to parse date: ' + value);
|
|
2057
2075
|
return undefined;
|
|
2058
2076
|
}
|
|
2059
2077
|
function fromUnixTimestamp(timeInSec) {
|
|
2060
|
-
return moment$
|
|
2078
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2061
2079
|
}
|
|
2062
2080
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2063
|
-
return moment$
|
|
2081
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2064
2082
|
}
|
|
2065
2083
|
function toDuration(value, unit) {
|
|
2066
2084
|
if (!value)
|
|
2067
2085
|
return undefined;
|
|
2068
|
-
const duration = moment$
|
|
2086
|
+
const duration = moment$1.duration(value, unit);
|
|
2069
2087
|
// fix 990+ ms
|
|
2070
2088
|
if (duration.milliseconds() >= 990) {
|
|
2071
2089
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2094,7 +2112,7 @@ class DurationPipe {
|
|
|
2094
2112
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2095
2113
|
}
|
|
2096
2114
|
}
|
|
2097
|
-
DurationPipe.ɵprov =
|
|
2115
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2098
2116
|
DurationPipe.decorators = [
|
|
2099
2117
|
{ type: Pipe, args: [{
|
|
2100
2118
|
name: 'duration'
|
|
@@ -2115,7 +2133,7 @@ class MathAbsPipe {
|
|
|
2115
2133
|
}
|
|
2116
2134
|
}
|
|
2117
2135
|
}
|
|
2118
|
-
MathAbsPipe.ɵprov =
|
|
2136
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2119
2137
|
MathAbsPipe.decorators = [
|
|
2120
2138
|
{ type: Pipe, args: [{
|
|
2121
2139
|
name: 'mathAbs'
|
|
@@ -2127,7 +2145,7 @@ class EvenPipe {
|
|
|
2127
2145
|
return val % 2 === 0;
|
|
2128
2146
|
}
|
|
2129
2147
|
}
|
|
2130
|
-
EvenPipe.ɵprov =
|
|
2148
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2131
2149
|
EvenPipe.decorators = [
|
|
2132
2150
|
{ type: Pipe, args: [{
|
|
2133
2151
|
name: 'even'
|
|
@@ -2139,7 +2157,7 @@ class OddPipe {
|
|
|
2139
2157
|
return val % 2 !== 0;
|
|
2140
2158
|
}
|
|
2141
2159
|
}
|
|
2142
|
-
OddPipe.ɵprov =
|
|
2160
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2143
2161
|
OddPipe.decorators = [
|
|
2144
2162
|
{ type: Pipe, args: [{
|
|
2145
2163
|
name: 'odd'
|
|
@@ -2247,7 +2265,7 @@ class MapGetPipe {
|
|
|
2247
2265
|
return val[key];
|
|
2248
2266
|
}
|
|
2249
2267
|
}
|
|
2250
|
-
MapGetPipe.ɵprov =
|
|
2268
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2251
2269
|
MapGetPipe.decorators = [
|
|
2252
2270
|
{ type: Pipe, args: [{
|
|
2253
2271
|
name: 'mapGet'
|
|
@@ -2261,7 +2279,7 @@ class MapKeysPipe {
|
|
|
2261
2279
|
return Object.keys(map);
|
|
2262
2280
|
}
|
|
2263
2281
|
}
|
|
2264
|
-
MapKeysPipe.ɵprov =
|
|
2282
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2265
2283
|
MapKeysPipe.decorators = [
|
|
2266
2284
|
{ type: Pipe, args: [{
|
|
2267
2285
|
name: 'mapKeys'
|
|
@@ -2275,7 +2293,7 @@ class MapValuesPipe {
|
|
|
2275
2293
|
return Object.values(map);
|
|
2276
2294
|
}
|
|
2277
2295
|
}
|
|
2278
|
-
MapValuesPipe.ɵprov =
|
|
2296
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2279
2297
|
MapValuesPipe.decorators = [
|
|
2280
2298
|
{ type: Pipe, args: [{
|
|
2281
2299
|
name: 'mapValues'
|
|
@@ -2288,7 +2306,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2288
2306
|
return isNotNilOrBlank(value);
|
|
2289
2307
|
}
|
|
2290
2308
|
}
|
|
2291
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2309
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2292
2310
|
IsNotNilOrBlankPipe.decorators = [
|
|
2293
2311
|
{ type: Pipe, args: [{
|
|
2294
2312
|
name: 'isNotNilOrBlank'
|
|
@@ -2300,7 +2318,7 @@ class IsNilOrBlankPipe {
|
|
|
2300
2318
|
return isNilOrBlank(value);
|
|
2301
2319
|
}
|
|
2302
2320
|
}
|
|
2303
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2321
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2304
2322
|
IsNilOrBlankPipe.decorators = [
|
|
2305
2323
|
{ type: Pipe, args: [{
|
|
2306
2324
|
name: 'isNilOrBlank'
|
|
@@ -2312,7 +2330,7 @@ class ToStringPipe {
|
|
|
2312
2330
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2313
2331
|
}
|
|
2314
2332
|
}
|
|
2315
|
-
ToStringPipe.ɵprov =
|
|
2333
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2316
2334
|
ToStringPipe.decorators = [
|
|
2317
2335
|
{ type: Pipe, args: [{
|
|
2318
2336
|
name: 'toString'
|
|
@@ -2324,7 +2342,7 @@ class StrLengthPipe {
|
|
|
2324
2342
|
return value && value.length || 0;
|
|
2325
2343
|
}
|
|
2326
2344
|
}
|
|
2327
|
-
StrLengthPipe.ɵprov =
|
|
2345
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2328
2346
|
StrLengthPipe.decorators = [
|
|
2329
2347
|
{ type: Pipe, args: [{
|
|
2330
2348
|
name: 'strLength'
|
|
@@ -2375,7 +2393,7 @@ class TranslateContextService {
|
|
|
2375
2393
|
: parts.slice(0, parts.length - 1).concat(context + parts[parts.length - 1]).join('.');
|
|
2376
2394
|
}
|
|
2377
2395
|
}
|
|
2378
|
-
TranslateContextService.ɵprov =
|
|
2396
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2379
2397
|
TranslateContextService.decorators = [
|
|
2380
2398
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2381
2399
|
];
|
|
@@ -2391,7 +2409,7 @@ class TranslateContextPipe {
|
|
|
2391
2409
|
return this.translateContext.instant(key, context);
|
|
2392
2410
|
}
|
|
2393
2411
|
}
|
|
2394
|
-
TranslateContextPipe.ɵprov =
|
|
2412
|
+
TranslateContextPipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextPipe_Factory() { return new TranslateContextPipe(ɵɵinject(TranslateContextService)); }, token: TranslateContextPipe, providedIn: "root" });
|
|
2395
2413
|
TranslateContextPipe.decorators = [
|
|
2396
2414
|
{ type: Pipe, args: [{
|
|
2397
2415
|
name: 'translateContext'
|
|
@@ -2408,7 +2426,7 @@ class TranslatablePipe {
|
|
|
2408
2426
|
return (_a = changeCaseToUnderscore(value)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
2409
2427
|
}
|
|
2410
2428
|
}
|
|
2411
|
-
TranslatablePipe.ɵprov =
|
|
2429
|
+
TranslatablePipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslatablePipe_Factory() { return new TranslatablePipe(); }, token: TranslatablePipe, providedIn: "root" });
|
|
2412
2430
|
TranslatablePipe.decorators = [
|
|
2413
2431
|
{ type: Pipe, args: [{
|
|
2414
2432
|
name: 'translatable'
|
|
@@ -2425,7 +2443,7 @@ class PropertyGetPipe {
|
|
|
2425
2443
|
args && args.defaultValue);
|
|
2426
2444
|
}
|
|
2427
2445
|
}
|
|
2428
|
-
PropertyGetPipe.ɵprov =
|
|
2446
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2429
2447
|
PropertyGetPipe.decorators = [
|
|
2430
2448
|
{ type: Pipe, args: [{
|
|
2431
2449
|
name: 'propertyGet'
|
|
@@ -2669,12 +2687,12 @@ SharedMatAutocompleteModule.decorators = [
|
|
|
2669
2687
|
},] }
|
|
2670
2688
|
];
|
|
2671
2689
|
|
|
2672
|
-
const moment$
|
|
2690
|
+
const moment$2 = momentImported;
|
|
2673
2691
|
// @dynamic
|
|
2674
2692
|
class SharedValidators {
|
|
2675
2693
|
static validDate(control) {
|
|
2676
2694
|
const value = control.value;
|
|
2677
|
-
const date = !value || moment$
|
|
2695
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
|
|
2678
2696
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2679
2697
|
return { validDate: true };
|
|
2680
2698
|
}
|
|
@@ -3116,9 +3134,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3116
3134
|
const hour = parseInt(durationParts[0] || '0');
|
|
3117
3135
|
const minute = parseInt(durationParts[1] || '0');
|
|
3118
3136
|
const value = hour + (minute + 0.5) / 60;
|
|
3119
|
-
return roundFloat(value, maxDecimals);
|
|
3137
|
+
return roundFloat$1(value, maxDecimals);
|
|
3120
3138
|
}
|
|
3121
|
-
function roundFloat(input, maxDecimals) {
|
|
3139
|
+
function roundFloat$1(input, maxDecimals) {
|
|
3122
3140
|
if (maxDecimals > 0) {
|
|
3123
3141
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3124
3142
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3142,9 +3160,9 @@ const MASKS = {
|
|
|
3142
3160
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3143
3161
|
}
|
|
3144
3162
|
};
|
|
3145
|
-
const noop$
|
|
3163
|
+
const noop$1 = () => {
|
|
3146
3164
|
};
|
|
3147
|
-
const ɵ0$
|
|
3165
|
+
const ɵ0$1 = noop$1;
|
|
3148
3166
|
class MatLatLongField {
|
|
3149
3167
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3150
3168
|
this.platform = platform;
|
|
@@ -3152,8 +3170,8 @@ class MatLatLongField {
|
|
|
3152
3170
|
this.formBuilder = formBuilder;
|
|
3153
3171
|
this.cd = cd;
|
|
3154
3172
|
this.formGroupDir = formGroupDir;
|
|
3155
|
-
this._onChangeCallback = noop$
|
|
3156
|
-
this._onTouchedCallback = noop$
|
|
3173
|
+
this._onChangeCallback = noop$1;
|
|
3174
|
+
this._onTouchedCallback = noop$1;
|
|
3157
3175
|
this._subscription = new Subscription();
|
|
3158
3176
|
this.disabling = false;
|
|
3159
3177
|
this.writing = false;
|
|
@@ -3494,14 +3512,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
3494
3512
|
},] }
|
|
3495
3513
|
];
|
|
3496
3514
|
|
|
3497
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
3515
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
3498
3516
|
provide: NG_VALUE_ACCESSOR,
|
|
3499
3517
|
useExisting: forwardRef(() => MatDate),
|
|
3500
3518
|
multi: true
|
|
3501
3519
|
};
|
|
3502
|
-
const DAY_MASK
|
|
3503
|
-
const noop$
|
|
3504
|
-
const ɵ0$
|
|
3520
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
3521
|
+
const noop$2 = () => { };
|
|
3522
|
+
const ɵ0$2 = noop$2;
|
|
3505
3523
|
class MatDate {
|
|
3506
3524
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
3507
3525
|
this.dateAdapter = dateAdapter;
|
|
@@ -3510,12 +3528,12 @@ class MatDate {
|
|
|
3510
3528
|
this.cd = cd;
|
|
3511
3529
|
this.keyboard = keyboard;
|
|
3512
3530
|
this.formGroupDir = formGroupDir;
|
|
3513
|
-
this._onChangeCallback = noop$
|
|
3514
|
-
this._onTouchedCallback = noop$
|
|
3531
|
+
this._onChangeCallback = noop$2;
|
|
3532
|
+
this._onTouchedCallback = noop$2;
|
|
3515
3533
|
this._subscription = new Subscription();
|
|
3516
3534
|
this.writing = true;
|
|
3517
3535
|
this.disabling = false;
|
|
3518
|
-
this.dayMask = DAY_MASK
|
|
3536
|
+
this.dayMask = DAY_MASK;
|
|
3519
3537
|
this.disabled = false;
|
|
3520
3538
|
this.floatLabel = 'auto';
|
|
3521
3539
|
this.readonly = false;
|
|
@@ -3752,7 +3770,7 @@ MatDate.decorators = [
|
|
|
3752
3770
|
selector: 'mat-date-field',
|
|
3753
3771
|
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
3772
|
providers: [
|
|
3755
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
3773
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
3756
3774
|
],
|
|
3757
3775
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3758
3776
|
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 +3803,17 @@ MatDate.propDecorators = {
|
|
|
3785
3803
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
3786
3804
|
};
|
|
3787
3805
|
|
|
3788
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
3806
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
3789
3807
|
provide: NG_VALUE_ACCESSOR,
|
|
3790
3808
|
useExisting: forwardRef(() => MatDateTime),
|
|
3791
3809
|
multi: true
|
|
3792
3810
|
};
|
|
3793
3811
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
3794
3812
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
3795
|
-
const HOUR_MASK
|
|
3796
|
-
const noop$
|
|
3813
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
3814
|
+
const noop$3 = () => {
|
|
3797
3815
|
};
|
|
3798
|
-
const ɵ0$
|
|
3816
|
+
const ɵ0$3 = noop$3;
|
|
3799
3817
|
class MatDateTime {
|
|
3800
3818
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
3801
3819
|
this.platform = platform;
|
|
@@ -3805,14 +3823,14 @@ class MatDateTime {
|
|
|
3805
3823
|
this.keyboard = keyboard;
|
|
3806
3824
|
this.cd = cd;
|
|
3807
3825
|
this.formGroupDir = formGroupDir;
|
|
3808
|
-
this._onChangeCallback = noop$
|
|
3809
|
-
this._onTouchedCallback = noop$
|
|
3826
|
+
this._onChangeCallback = noop$3;
|
|
3827
|
+
this._onTouchedCallback = noop$3;
|
|
3810
3828
|
this._subscription = new Subscription();
|
|
3811
3829
|
this.writing = true;
|
|
3812
3830
|
this.disabling = false;
|
|
3813
3831
|
this._onDestroy = new EventEmitter();
|
|
3814
3832
|
this.dayMask = DAY_MASK$1;
|
|
3815
|
-
this.hourMask = HOUR_MASK
|
|
3833
|
+
this.hourMask = HOUR_MASK;
|
|
3816
3834
|
this.floatLabel = 'auto';
|
|
3817
3835
|
this.readonly = false;
|
|
3818
3836
|
this.compact = false;
|
|
@@ -4118,7 +4136,7 @@ MatDateTime.decorators = [
|
|
|
4118
4136
|
selector: 'mat-date-time-field',
|
|
4119
4137
|
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
4138
|
providers: [
|
|
4121
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4139
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
4122
4140
|
],
|
|
4123
4141
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4124
4142
|
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 +4175,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4157
4175
|
useExisting: forwardRef(() => MatDateShort),
|
|
4158
4176
|
multi: true
|
|
4159
4177
|
};
|
|
4160
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4161
|
-
const noop$
|
|
4178
|
+
const DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
|
|
4179
|
+
const noop$4 = () => {
|
|
4162
4180
|
};
|
|
4163
|
-
const ɵ0$
|
|
4181
|
+
const ɵ0$4 = noop$4;
|
|
4164
4182
|
class MatDateShort {
|
|
4165
4183
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4166
4184
|
this.dateAdapter = dateAdapter;
|
|
@@ -4169,11 +4187,11 @@ class MatDateShort {
|
|
|
4169
4187
|
this.cd = cd;
|
|
4170
4188
|
this.keyboard = keyboard;
|
|
4171
4189
|
this.formGroupDir = formGroupDir;
|
|
4172
|
-
this._onChangeCallback = noop$
|
|
4173
|
-
this._onTouchedCallback = noop$
|
|
4190
|
+
this._onChangeCallback = noop$4;
|
|
4191
|
+
this._onTouchedCallback = noop$4;
|
|
4174
4192
|
this.writing = true;
|
|
4175
4193
|
this.disabling = false;
|
|
4176
|
-
this.dayMask = DAY_MASK;
|
|
4194
|
+
this.dayMask = DAY_MASK$2;
|
|
4177
4195
|
this.disabled = false;
|
|
4178
4196
|
this.floatLabel = 'auto';
|
|
4179
4197
|
this.readonly = false;
|
|
@@ -4486,16 +4504,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
4486
4504
|
},] }
|
|
4487
4505
|
];
|
|
4488
4506
|
|
|
4489
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4507
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4490
4508
|
provide: NG_VALUE_ACCESSOR,
|
|
4491
4509
|
useExisting: forwardRef(() => MatDuration),
|
|
4492
4510
|
multi: true
|
|
4493
4511
|
};
|
|
4494
4512
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
4495
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
4496
|
-
const noop$
|
|
4513
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
4514
|
+
const noop$5 = () => {
|
|
4497
4515
|
};
|
|
4498
|
-
const ɵ0$5 = noop$
|
|
4516
|
+
const ɵ0$5 = noop$5;
|
|
4499
4517
|
class MatDuration {
|
|
4500
4518
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
4501
4519
|
this.dateAdapter = dateAdapter;
|
|
@@ -4504,11 +4522,11 @@ class MatDuration {
|
|
|
4504
4522
|
this.cd = cd;
|
|
4505
4523
|
this.formGroupDir = formGroupDir;
|
|
4506
4524
|
this._subscription = new Subscription();
|
|
4507
|
-
this._onChangeCallback = noop$
|
|
4508
|
-
this._onTouchedCallback = noop$
|
|
4525
|
+
this._onChangeCallback = noop$5;
|
|
4526
|
+
this._onTouchedCallback = noop$5;
|
|
4509
4527
|
this.writing = true;
|
|
4510
4528
|
this.disabling = false;
|
|
4511
|
-
this.hourMask = HOUR_MASK;
|
|
4529
|
+
this.hourMask = HOUR_MASK$1;
|
|
4512
4530
|
this.disabled = false;
|
|
4513
4531
|
this.floatLabel = 'auto';
|
|
4514
4532
|
this.readonly = false;
|
|
@@ -4688,7 +4706,7 @@ MatDuration.decorators = [
|
|
|
4688
4706
|
selector: 'mat-duration-field',
|
|
4689
4707
|
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
4708
|
providers: [
|
|
4691
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4709
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
4692
4710
|
],
|
|
4693
4711
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4694
4712
|
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 +4763,22 @@ SharedMatDurationModule.decorators = [
|
|
|
4745
4763
|
},] }
|
|
4746
4764
|
];
|
|
4747
4765
|
|
|
4748
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4766
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4749
4767
|
provide: NG_VALUE_ACCESSOR,
|
|
4750
4768
|
useExisting: forwardRef(() => MatBooleanField),
|
|
4751
4769
|
multi: true
|
|
4752
4770
|
};
|
|
4753
|
-
const noop$
|
|
4771
|
+
const noop$6 = () => {
|
|
4754
4772
|
};
|
|
4755
|
-
const ɵ0$
|
|
4773
|
+
const ɵ0$6 = noop$6;
|
|
4756
4774
|
class MatBooleanField {
|
|
4757
4775
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
4758
4776
|
this.translate = translate;
|
|
4759
4777
|
this.formBuilder = formBuilder;
|
|
4760
4778
|
this.cd = cd;
|
|
4761
4779
|
this.formGroupDir = formGroupDir;
|
|
4762
|
-
this._onChangeCallback = noop$
|
|
4763
|
-
this._onTouchedCallback = noop$
|
|
4780
|
+
this._onChangeCallback = noop$6;
|
|
4781
|
+
this._onTouchedCallback = noop$6;
|
|
4764
4782
|
this._writing = false;
|
|
4765
4783
|
this.showRadio = false;
|
|
4766
4784
|
this.disabled = false;
|
|
@@ -4933,10 +4951,10 @@ MatBooleanField.decorators = [
|
|
|
4933
4951
|
selector: 'mat-boolean-field',
|
|
4934
4952
|
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
4953
|
providers: [
|
|
4936
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4954
|
+
DEFAULT_VALUE_ACCESSOR$5
|
|
4937
4955
|
],
|
|
4938
4956
|
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:
|
|
4957
|
+
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
4958
|
},] }
|
|
4941
4959
|
];
|
|
4942
4960
|
MatBooleanField.ctorParameters = () => [
|
|
@@ -5181,7 +5199,7 @@ class MatNumpadDomService {
|
|
|
5181
5199
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5182
5200
|
}
|
|
5183
5201
|
}
|
|
5184
|
-
MatNumpadDomService.ɵprov =
|
|
5202
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
5185
5203
|
MatNumpadDomService.decorators = [
|
|
5186
5204
|
{ type: Injectable, args: [{
|
|
5187
5205
|
providedIn: 'root'
|
|
@@ -5545,7 +5563,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
5545
5563
|
},] }
|
|
5546
5564
|
];
|
|
5547
5565
|
|
|
5548
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
5566
|
+
const DEFAULT_VALUE_ACCESSOR$6 = {
|
|
5549
5567
|
provide: NG_VALUE_ACCESSOR,
|
|
5550
5568
|
useExisting: forwardRef(() => MatSwipeField),
|
|
5551
5569
|
multi: true
|
|
@@ -5808,7 +5826,7 @@ MatSwipeField.decorators = [
|
|
|
5808
5826
|
{ type: Component, args: [{
|
|
5809
5827
|
selector: 'mat-swipe-field',
|
|
5810
5828
|
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],
|
|
5829
|
+
providers: [DEFAULT_VALUE_ACCESSOR$6],
|
|
5812
5830
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5813
5831
|
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
5832
|
},] }
|
|
@@ -6303,7 +6321,7 @@ class ProgressBarService {
|
|
|
6303
6321
|
}
|
|
6304
6322
|
}
|
|
6305
6323
|
}
|
|
6306
|
-
ProgressBarService.ɵprov =
|
|
6324
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
6307
6325
|
ProgressBarService.decorators = [
|
|
6308
6326
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6309
6327
|
];
|
|
@@ -6347,7 +6365,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
6347
6365
|
return mc;
|
|
6348
6366
|
}
|
|
6349
6367
|
}
|
|
6350
|
-
AppGestureConfig.ɵprov =
|
|
6368
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
6351
6369
|
AppGestureConfig.decorators = [
|
|
6352
6370
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6353
6371
|
];
|
|
@@ -6570,7 +6588,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
6570
6588
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
6571
6589
|
}
|
|
6572
6590
|
}
|
|
6573
|
-
MatPaginatorI18n.ɵprov =
|
|
6591
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
6574
6592
|
MatPaginatorI18n.decorators = [
|
|
6575
6593
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6576
6594
|
];
|
|
@@ -6660,17 +6678,17 @@ function getColorContrast(color, bw) {
|
|
|
6660
6678
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
6661
6679
|
}
|
|
6662
6680
|
|
|
6663
|
-
const noop = () => {
|
|
6681
|
+
const noop$7 = () => {
|
|
6664
6682
|
};
|
|
6665
|
-
const ɵ0$
|
|
6683
|
+
const ɵ0$7 = noop$7;
|
|
6666
6684
|
class AppFormField {
|
|
6667
6685
|
constructor(translate, cd, injector, formGroupDir) {
|
|
6668
6686
|
this.translate = translate;
|
|
6669
6687
|
this.cd = cd;
|
|
6670
6688
|
this.injector = injector;
|
|
6671
6689
|
this.formGroupDir = formGroupDir;
|
|
6672
|
-
this._onChangeCallback = noop;
|
|
6673
|
-
this._onTouchedCallback = noop;
|
|
6690
|
+
this._onChangeCallback = noop$7;
|
|
6691
|
+
this._onTouchedCallback = noop$7;
|
|
6674
6692
|
this.readonly = false;
|
|
6675
6693
|
this.compact = false;
|
|
6676
6694
|
this.floatLabel = 'auto';
|
|
@@ -7041,14 +7059,14 @@ class AudioProvider {
|
|
|
7041
7059
|
});
|
|
7042
7060
|
}
|
|
7043
7061
|
}
|
|
7044
|
-
AudioProvider.ɵprov =
|
|
7062
|
+
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
7063
|
AudioProvider.decorators = [
|
|
7046
7064
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7047
7065
|
];
|
|
7048
7066
|
AudioProvider.ctorParameters = () => [
|
|
7049
7067
|
{ type: Platform },
|
|
7050
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7051
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7068
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
7069
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
7052
7070
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7053
7071
|
];
|
|
7054
7072
|
|
|
@@ -7130,7 +7148,7 @@ class Hotkeys {
|
|
|
7130
7148
|
});
|
|
7131
7149
|
}
|
|
7132
7150
|
}
|
|
7133
|
-
Hotkeys.ɵprov =
|
|
7151
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
7134
7152
|
Hotkeys.decorators = [
|
|
7135
7153
|
{ type: Injectable, args: [{
|
|
7136
7154
|
providedIn: 'root'
|
|
@@ -7304,7 +7322,7 @@ class Base64ImageReader {
|
|
|
7304
7322
|
}
|
|
7305
7323
|
}
|
|
7306
7324
|
|
|
7307
|
-
const uuidv4
|
|
7325
|
+
const uuidv4 = uuidv4Imported;
|
|
7308
7326
|
class FileService {
|
|
7309
7327
|
constructor(platform,
|
|
7310
7328
|
//private transfer: FileTransfer,
|
|
@@ -7341,7 +7359,7 @@ class FileService {
|
|
|
7341
7359
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
7342
7360
|
if (lastSlashIndex === -1)
|
|
7343
7361
|
throw new Error('Invalid URL: ' + source);
|
|
7344
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
7362
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
7345
7363
|
// Download into the file system
|
|
7346
7364
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
7347
7365
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -7397,7 +7415,7 @@ class FileService {
|
|
|
7397
7415
|
this._started = true;
|
|
7398
7416
|
}
|
|
7399
7417
|
}
|
|
7400
|
-
FileService.ɵprov =
|
|
7418
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
7401
7419
|
FileService.decorators = [
|
|
7402
7420
|
{ type: Injectable, args: [{
|
|
7403
7421
|
providedIn: 'root',
|
|
@@ -7559,7 +7577,7 @@ class Base58 {
|
|
|
7559
7577
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
7560
7578
|
|
|
7561
7579
|
const scrypt = require('scrypt-async');
|
|
7562
|
-
const sha256
|
|
7580
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
7563
7581
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
7564
7582
|
const nacl = {
|
|
7565
7583
|
sign,
|
|
@@ -7663,7 +7681,7 @@ class CryptoService {
|
|
|
7663
7681
|
* Hash (using SHA256) a message
|
|
7664
7682
|
*/
|
|
7665
7683
|
sha256(message) {
|
|
7666
|
-
return sha256
|
|
7684
|
+
return sha256().update(message).digest('hex');
|
|
7667
7685
|
}
|
|
7668
7686
|
/**
|
|
7669
7687
|
* Hash (using SHA512) a message
|
|
@@ -7676,7 +7694,7 @@ class CryptoService {
|
|
|
7676
7694
|
return nacl.util.encodeBase64(m);
|
|
7677
7695
|
}
|
|
7678
7696
|
}
|
|
7679
|
-
CryptoService.ɵprov =
|
|
7697
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
7680
7698
|
CryptoService.decorators = [
|
|
7681
7699
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7682
7700
|
];
|
|
@@ -8532,7 +8550,7 @@ class LocalSettingsService {
|
|
|
8532
8550
|
.then(() => {
|
|
8533
8551
|
this.data.mobile = isNotNil(this.data.mobile) ? this.data.mobile : this.platform.is('mobile');
|
|
8534
8552
|
this.data.touchUi = this.data.mobile || this.platform.is('phablet') || this.platform.is('tablet');
|
|
8535
|
-
this.data.usageMode = this.
|
|
8553
|
+
this.data.usageMode = this.platform.is('android') ? 'FIELD' : 'DESK'; // FIELD by default if Android
|
|
8536
8554
|
})
|
|
8537
8555
|
.then(() => this.restoreLocally())
|
|
8538
8556
|
.then(data => {
|
|
@@ -8896,7 +8914,7 @@ class LocalSettingsService {
|
|
|
8896
8914
|
return page;
|
|
8897
8915
|
}
|
|
8898
8916
|
}
|
|
8899
|
-
LocalSettingsService.ɵprov =
|
|
8917
|
+
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
8918
|
LocalSettingsService.decorators = [
|
|
8901
8919
|
{ type: Injectable, args: [{
|
|
8902
8920
|
providedIn: 'root',
|
|
@@ -9592,7 +9610,7 @@ class NetworkService {
|
|
|
9592
9610
|
});
|
|
9593
9611
|
}
|
|
9594
9612
|
}
|
|
9595
|
-
NetworkService.ɵprov =
|
|
9613
|
+
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
9614
|
NetworkService.decorators = [
|
|
9597
9615
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9598
9616
|
];
|
|
@@ -9603,16 +9621,16 @@ NetworkService.ctorParameters = () => [
|
|
|
9603
9621
|
{ type: CryptoService },
|
|
9604
9622
|
{ type: Storage },
|
|
9605
9623
|
{ type: LocalSettingsService },
|
|
9606
|
-
{ type: CacheService },
|
|
9624
|
+
{ type: CacheService$1 },
|
|
9607
9625
|
{ type: HttpClient },
|
|
9608
9626
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
9609
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
9610
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
9627
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
9628
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
9611
9629
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
9612
9630
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
9613
9631
|
];
|
|
9614
9632
|
|
|
9615
|
-
const ErrorCodes
|
|
9633
|
+
const ErrorCodes = {
|
|
9616
9634
|
UNKNOWN_ERROR: 0,
|
|
9617
9635
|
LOAD_ACCOUNT_ERROR: 1,
|
|
9618
9636
|
BAD_PASSWORD: 2,
|
|
@@ -9959,7 +9977,7 @@ class EntityStore {
|
|
|
9959
9977
|
}
|
|
9960
9978
|
catch (err) {
|
|
9961
9979
|
console.error(err);
|
|
9962
|
-
throw { code: ErrorCodes
|
|
9980
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
9963
9981
|
}
|
|
9964
9982
|
}
|
|
9965
9983
|
// Emit update event
|
|
@@ -10536,7 +10554,7 @@ class EntitiesStorage {
|
|
|
10536
10554
|
}
|
|
10537
10555
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
10538
10556
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
10539
|
-
EntitiesStorage.ɵprov =
|
|
10557
|
+
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
10558
|
EntitiesStorage.decorators = [
|
|
10541
10559
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10542
10560
|
];
|
|
@@ -10636,10 +10654,10 @@ function referentialToString(obj, properties) {
|
|
|
10636
10654
|
function referentialsToString(values, properties, separator) {
|
|
10637
10655
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
10638
10656
|
}
|
|
10639
|
-
const ɵ0$
|
|
10657
|
+
const ɵ0$8 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
10640
10658
|
const StatusList = Object.freeze([
|
|
10641
10659
|
{
|
|
10642
|
-
id: ɵ0$
|
|
10660
|
+
id: ɵ0$8,
|
|
10643
10661
|
icon: 'checkmark',
|
|
10644
10662
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
10645
10663
|
},
|
|
@@ -10914,7 +10932,7 @@ function accountToString(data) {
|
|
|
10914
10932
|
(data.lastName || '')) || '';
|
|
10915
10933
|
}
|
|
10916
10934
|
|
|
10917
|
-
const uuidv4 = uuidv4Imported;
|
|
10935
|
+
const uuidv4$1 = uuidv4Imported;
|
|
10918
10936
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
10919
10937
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
10920
10938
|
/**
|
|
@@ -10958,7 +10976,7 @@ function createTrackerLink(opts) {
|
|
|
10958
10976
|
// Skip if not tracked
|
|
10959
10977
|
if (!context || !context.tracked)
|
|
10960
10978
|
return forward(operation);
|
|
10961
|
-
const id = context.serializationKey || uuidv4();
|
|
10979
|
+
const id = context.serializationKey || uuidv4$1();
|
|
10962
10980
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
10963
10981
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
10964
10982
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -11666,7 +11684,7 @@ class GraphqlService {
|
|
|
11666
11684
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
11667
11685
|
|| this.toAppError(err.networkError)
|
|
11668
11686
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
11669
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
11687
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
11670
11688
|
// If graphQL: try to convert the first error found
|
|
11671
11689
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
11672
11690
|
|| this.toAppError(err)
|
|
@@ -11674,7 +11692,7 @@ class GraphqlService {
|
|
|
11674
11692
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
11675
11693
|
|| err;
|
|
11676
11694
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
11677
|
-
if (error && error.code === ErrorCodes
|
|
11695
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
11678
11696
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
11679
11697
|
this.onNetworkError.next(error);
|
|
11680
11698
|
}
|
|
@@ -11710,7 +11728,7 @@ class GraphqlService {
|
|
|
11710
11728
|
return 'ERROR.UNAUTHORIZED';
|
|
11711
11729
|
case ServerErrorCodes.FORBIDDEN:
|
|
11712
11730
|
return 'ERROR.FORBIDDEN';
|
|
11713
|
-
case ErrorCodes
|
|
11731
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
11714
11732
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
11715
11733
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
11716
11734
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -11747,7 +11765,7 @@ class GraphqlService {
|
|
|
11747
11765
|
});
|
|
11748
11766
|
}
|
|
11749
11767
|
}
|
|
11750
|
-
GraphqlService.ɵprov =
|
|
11768
|
+
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
11769
|
GraphqlService.decorators = [
|
|
11752
11770
|
{ type: Injectable, args: [{
|
|
11753
11771
|
providedIn: 'root'
|
|
@@ -11764,7 +11782,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
11764
11782
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
11765
11783
|
];
|
|
11766
11784
|
|
|
11767
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
11785
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
11768
11786
|
class BaseGraphqlServiceOptions {
|
|
11769
11787
|
}
|
|
11770
11788
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -11914,8 +11932,8 @@ class BaseGraphqlService {
|
|
|
11914
11932
|
}
|
|
11915
11933
|
/* -- protected methods -- */
|
|
11916
11934
|
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) || '';
|
|
11935
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
11936
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
11919
11937
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
11920
11938
|
}
|
|
11921
11939
|
findMutableWatchQueries(opts) {
|
|
@@ -11978,7 +11996,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
11978
11996
|
/* ------------------------------------
|
|
11979
11997
|
* GraphQL queries
|
|
11980
11998
|
* ------------------------------------*/
|
|
11981
|
-
const Fragments
|
|
11999
|
+
const Fragments = {
|
|
11982
12000
|
account: gql `
|
|
11983
12001
|
fragment AccountFragment on AccountVO {
|
|
11984
12002
|
id
|
|
@@ -12011,13 +12029,13 @@ const Fragments$1 = {
|
|
|
12011
12029
|
`
|
|
12012
12030
|
};
|
|
12013
12031
|
// Load account query
|
|
12014
|
-
const LoadQuery
|
|
12032
|
+
const LoadQuery = gql `
|
|
12015
12033
|
query Account {
|
|
12016
12034
|
data: account {
|
|
12017
12035
|
...AccountFragment
|
|
12018
12036
|
}
|
|
12019
12037
|
}
|
|
12020
|
-
${Fragments
|
|
12038
|
+
${Fragments.account}
|
|
12021
12039
|
`;
|
|
12022
12040
|
// Check email query
|
|
12023
12041
|
const IsEmailExistsQuery = gql `
|
|
@@ -12026,13 +12044,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12026
12044
|
}
|
|
12027
12045
|
`;
|
|
12028
12046
|
// Save (create or update) account mutation
|
|
12029
|
-
const SaveMutation
|
|
12047
|
+
const SaveMutation = gql `
|
|
12030
12048
|
mutation SaveAccount($data:AccountVOInput){
|
|
12031
12049
|
data: saveAccount(account: $data){
|
|
12032
12050
|
...AccountFragment
|
|
12033
12051
|
}
|
|
12034
12052
|
}
|
|
12035
|
-
${Fragments
|
|
12053
|
+
${Fragments.account}
|
|
12036
12054
|
`;
|
|
12037
12055
|
// Create account mutation
|
|
12038
12056
|
const CreateMutation = gql `
|
|
@@ -12041,7 +12059,7 @@ const CreateMutation = gql `
|
|
|
12041
12059
|
...AccountFragment
|
|
12042
12060
|
}
|
|
12043
12061
|
}
|
|
12044
|
-
${Fragments
|
|
12062
|
+
${Fragments.account}
|
|
12045
12063
|
`;
|
|
12046
12064
|
// Sent confirmation email
|
|
12047
12065
|
const SendConfirmEmailMutation = gql `
|
|
@@ -12389,7 +12407,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12389
12407
|
catch (error) {
|
|
12390
12408
|
console.error(error);
|
|
12391
12409
|
this.resetData();
|
|
12392
|
-
throw { code: ErrorCodes
|
|
12410
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
12393
12411
|
}
|
|
12394
12412
|
// Store pubkey+keypair
|
|
12395
12413
|
this.data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -12423,7 +12441,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12423
12441
|
}
|
|
12424
12442
|
catch (err) {
|
|
12425
12443
|
// If account not found, check if email is valid
|
|
12426
|
-
if (err && +(err.code) === ErrorCodes
|
|
12444
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
12427
12445
|
// Check email exists
|
|
12428
12446
|
if (data.username.indexOf('@') !== -1) {
|
|
12429
12447
|
let isEmailExists;
|
|
@@ -12435,11 +12453,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
12435
12453
|
}
|
|
12436
12454
|
// Email not exists (no account)
|
|
12437
12455
|
if (!isEmailExists) {
|
|
12438
|
-
throw { code: ErrorCodes
|
|
12456
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
12439
12457
|
}
|
|
12440
12458
|
}
|
|
12441
12459
|
// Email exists, so error = 'bad password'
|
|
12442
|
-
throw { code: ErrorCodes
|
|
12460
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
12443
12461
|
}
|
|
12444
12462
|
throw err; // resend the first error
|
|
12445
12463
|
}
|
|
@@ -12564,8 +12582,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
12564
12582
|
// Load remotely
|
|
12565
12583
|
else {
|
|
12566
12584
|
const { data } = yield this.graphql.query({
|
|
12567
|
-
query: LoadQuery
|
|
12568
|
-
error: { code: ErrorCodes
|
|
12585
|
+
query: LoadQuery,
|
|
12586
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
12569
12587
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
12570
12588
|
});
|
|
12571
12589
|
json = data;
|
|
@@ -12592,7 +12610,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12592
12610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12593
12611
|
const isEmailExists = yield this.isEmailExists(email);
|
|
12594
12612
|
if (isEmailExists) {
|
|
12595
|
-
throw { code: ErrorCodes
|
|
12613
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
12596
12614
|
}
|
|
12597
12615
|
});
|
|
12598
12616
|
}
|
|
@@ -12628,7 +12646,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12628
12646
|
locale
|
|
12629
12647
|
},
|
|
12630
12648
|
error: {
|
|
12631
|
-
code: ErrorCodes
|
|
12649
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
12632
12650
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
12633
12651
|
}
|
|
12634
12652
|
});
|
|
@@ -12644,7 +12662,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12644
12662
|
code
|
|
12645
12663
|
},
|
|
12646
12664
|
error: {
|
|
12647
|
-
code: ErrorCodes
|
|
12665
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
12648
12666
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
12649
12667
|
}
|
|
12650
12668
|
});
|
|
@@ -12662,7 +12680,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12662
12680
|
interval: 10
|
|
12663
12681
|
},
|
|
12664
12682
|
error: {
|
|
12665
|
-
code: ErrorCodes
|
|
12683
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
12666
12684
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
12667
12685
|
}
|
|
12668
12686
|
}).subscribe({
|
|
@@ -12764,7 +12782,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12764
12782
|
throw error;
|
|
12765
12783
|
console.error(error);
|
|
12766
12784
|
throw {
|
|
12767
|
-
code: ErrorCodes
|
|
12785
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
12768
12786
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
12769
12787
|
};
|
|
12770
12788
|
}
|
|
@@ -12909,7 +12927,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12909
12927
|
if (!isNew) {
|
|
12910
12928
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
12911
12929
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
12912
|
-
throw { code: ErrorCodes
|
|
12930
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
12913
12931
|
}
|
|
12914
12932
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
12915
12933
|
}
|
|
@@ -12918,10 +12936,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
12918
12936
|
delete json.profiles;
|
|
12919
12937
|
// Execute mutation
|
|
12920
12938
|
const { data } = yield this.graphql.mutate({
|
|
12921
|
-
mutation: isNew ? CreateMutation : SaveMutation
|
|
12939
|
+
mutation: isNew ? CreateMutation : SaveMutation,
|
|
12922
12940
|
variables: { data: json },
|
|
12923
12941
|
error: {
|
|
12924
|
-
code: ErrorCodes
|
|
12942
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
12925
12943
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
12926
12944
|
}
|
|
12927
12945
|
});
|
|
@@ -12941,7 +12959,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12941
12959
|
if (counter > 4) {
|
|
12942
12960
|
if (this._debug)
|
|
12943
12961
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
12944
|
-
throw { code: ErrorCodes
|
|
12962
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
12945
12963
|
}
|
|
12946
12964
|
// Check if valid
|
|
12947
12965
|
if (token) {
|
|
@@ -12951,7 +12969,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12951
12969
|
token
|
|
12952
12970
|
},
|
|
12953
12971
|
error: {
|
|
12954
|
-
code: ErrorCodes
|
|
12972
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
12955
12973
|
message: 'ERROR.UNAUTHORIZED'
|
|
12956
12974
|
},
|
|
12957
12975
|
fetchPolicy: 'no-cache'
|
|
@@ -12967,7 +12985,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
12967
12985
|
}
|
|
12968
12986
|
// Generate a new token
|
|
12969
12987
|
const challengeError = {
|
|
12970
|
-
code: ErrorCodes
|
|
12988
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
12971
12989
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
12972
12990
|
};
|
|
12973
12991
|
const data = yield this.graphql.query({
|
|
@@ -13001,7 +13019,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13001
13019
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13002
13020
|
}
|
|
13003
13021
|
}
|
|
13004
|
-
AccountService.ɵprov =
|
|
13022
|
+
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
13023
|
AccountService.decorators = [
|
|
13006
13024
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13007
13025
|
];
|
|
@@ -13261,7 +13279,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13261
13279
|
/* ------------------------------------
|
|
13262
13280
|
* GraphQL queries
|
|
13263
13281
|
* ------------------------------------*/
|
|
13264
|
-
const Fragments = {
|
|
13282
|
+
const Fragments$1 = {
|
|
13265
13283
|
config: gql `
|
|
13266
13284
|
fragment ConfigFragment on ConfigurationVO {
|
|
13267
13285
|
id
|
|
@@ -13288,22 +13306,22 @@ const Fragments = {
|
|
|
13288
13306
|
}
|
|
13289
13307
|
`
|
|
13290
13308
|
};
|
|
13291
|
-
const LoadQuery = gql `
|
|
13309
|
+
const LoadQuery$1 = gql `
|
|
13292
13310
|
query Configuration{
|
|
13293
13311
|
data: configuration{
|
|
13294
13312
|
...ConfigFragment
|
|
13295
13313
|
}
|
|
13296
13314
|
}
|
|
13297
|
-
${Fragments.config}
|
|
13315
|
+
${Fragments$1.config}
|
|
13298
13316
|
`;
|
|
13299
13317
|
// Save (create or update) account mutation
|
|
13300
|
-
const SaveMutation = gql `
|
|
13318
|
+
const SaveMutation$1 = gql `
|
|
13301
13319
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
13302
13320
|
data: saveConfiguration(config: $data){
|
|
13303
13321
|
...ConfigFragment
|
|
13304
13322
|
}
|
|
13305
13323
|
}
|
|
13306
|
-
${Fragments.config}
|
|
13324
|
+
${Fragments$1.config}
|
|
13307
13325
|
`;
|
|
13308
13326
|
const ClearCache = gql `
|
|
13309
13327
|
query ClearCache($name: String) {
|
|
@@ -13391,12 +13409,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13391
13409
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13392
13410
|
const now = Date.now();
|
|
13393
13411
|
console.debug('[config] Loading Pod configuration...');
|
|
13394
|
-
const query = opts && opts.query || LoadQuery;
|
|
13412
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
13395
13413
|
const variables = opts && opts.variables || undefined;
|
|
13396
13414
|
const res = yield this.graphql.query({
|
|
13397
13415
|
query,
|
|
13398
13416
|
variables,
|
|
13399
|
-
error: { code: ErrorCodes
|
|
13417
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13400
13418
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
13401
13419
|
});
|
|
13402
13420
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -13421,12 +13439,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13421
13439
|
const json = config.asObject();
|
|
13422
13440
|
// Execute mutation
|
|
13423
13441
|
const res = yield this.graphql.mutate({
|
|
13424
|
-
mutation: SaveMutation,
|
|
13442
|
+
mutation: SaveMutation$1,
|
|
13425
13443
|
variables: {
|
|
13426
13444
|
data: json
|
|
13427
13445
|
},
|
|
13428
13446
|
error: {
|
|
13429
|
-
code: ErrorCodes
|
|
13447
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
13430
13448
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
13431
13449
|
}
|
|
13432
13450
|
});
|
|
@@ -13452,7 +13470,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13452
13470
|
const res = yield this.graphql.query({
|
|
13453
13471
|
query: CacheStatistics,
|
|
13454
13472
|
variables: null,
|
|
13455
|
-
error: { code: ErrorCodes
|
|
13473
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13456
13474
|
fetchPolicy: 'network-only'
|
|
13457
13475
|
});
|
|
13458
13476
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -13468,7 +13486,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13468
13486
|
const res = yield this.graphql.query({
|
|
13469
13487
|
query: ClearCache,
|
|
13470
13488
|
variables,
|
|
13471
|
-
error: { code: ErrorCodes
|
|
13489
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
13472
13490
|
fetchPolicy: 'network-only'
|
|
13473
13491
|
});
|
|
13474
13492
|
const data = res && res.clearCache || undefined;
|
|
@@ -13627,7 +13645,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
13627
13645
|
});
|
|
13628
13646
|
}
|
|
13629
13647
|
}
|
|
13630
|
-
ConfigService.ɵprov =
|
|
13648
|
+
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
13649
|
ConfigService.decorators = [
|
|
13632
13650
|
{ type: Injectable, args: [{
|
|
13633
13651
|
providedIn: 'root',
|
|
@@ -13646,7 +13664,7 @@ ConfigService.ctorParameters = () => [
|
|
|
13646
13664
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
13647
13665
|
];
|
|
13648
13666
|
|
|
13649
|
-
const moment$
|
|
13667
|
+
const moment$4 = momentImported;
|
|
13650
13668
|
class PlatformService {
|
|
13651
13669
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser) {
|
|
13652
13670
|
this.platform = platform;
|
|
@@ -13811,16 +13829,16 @@ class PlatformService {
|
|
|
13811
13829
|
}
|
|
13812
13830
|
// config moment lib
|
|
13813
13831
|
try {
|
|
13814
|
-
moment$
|
|
13832
|
+
moment$4.locale(event.lang);
|
|
13815
13833
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
13816
13834
|
}
|
|
13817
13835
|
// If error, fallback to en
|
|
13818
13836
|
catch (err) {
|
|
13819
|
-
moment$
|
|
13837
|
+
moment$4.locale('en');
|
|
13820
13838
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
13821
13839
|
}
|
|
13822
13840
|
// Config date adapter
|
|
13823
|
-
this.dateAdapter.setLocale(moment$
|
|
13841
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
13824
13842
|
}
|
|
13825
13843
|
});
|
|
13826
13844
|
this.settings.onChange.subscribe(data => {
|
|
@@ -13957,7 +13975,7 @@ class PlatformService {
|
|
|
13957
13975
|
});
|
|
13958
13976
|
}
|
|
13959
13977
|
}
|
|
13960
|
-
PlatformService.ɵprov =
|
|
13978
|
+
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
13979
|
PlatformService.decorators = [
|
|
13962
13980
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13963
13981
|
];
|
|
@@ -13972,14 +13990,14 @@ PlatformService.ctorParameters = () => [
|
|
|
13972
13990
|
{ type: NetworkService },
|
|
13973
13991
|
{ type: AccountService },
|
|
13974
13992
|
{ type: ConfigService },
|
|
13975
|
-
{ type: CacheService },
|
|
13993
|
+
{ type: CacheService$1 },
|
|
13976
13994
|
{ type: Storage },
|
|
13977
13995
|
{ type: AudioProvider },
|
|
13978
13996
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
13979
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
13997
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
13980
13998
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
13981
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
13982
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] }
|
|
13999
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
14000
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] }
|
|
13983
14001
|
];
|
|
13984
14002
|
|
|
13985
14003
|
class AppHelpModal {
|
|
@@ -14043,7 +14061,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14043
14061
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14044
14062
|
}
|
|
14045
14063
|
}
|
|
14046
|
-
MatStepperI18n.ɵprov =
|
|
14064
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14047
14065
|
MatStepperI18n.decorators = [
|
|
14048
14066
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14049
14067
|
];
|
|
@@ -15035,7 +15053,7 @@ function state2side(state) {
|
|
|
15035
15053
|
return 1;
|
|
15036
15054
|
}
|
|
15037
15055
|
}
|
|
15038
|
-
const ɵ0$
|
|
15056
|
+
const ɵ0$9 = (defaultStateSize) => [
|
|
15039
15057
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15040
15058
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15041
15059
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15043,7 +15061,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
15043
15061
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15044
15062
|
startColor: rgbArrayMap.red,
|
|
15045
15063
|
startStates: [0, 2, 3],
|
|
15046
|
-
startStepsFn: ɵ0$
|
|
15064
|
+
startStepsFn: ɵ0$9
|
|
15047
15065
|
};
|
|
15048
15066
|
/**
|
|
15049
15067
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15135,21 +15153,21 @@ function linearColorGradient(count, options) {
|
|
|
15135
15153
|
return result;
|
|
15136
15154
|
}
|
|
15137
15155
|
|
|
15138
|
-
class EntityTestClass
|
|
15156
|
+
class EntityTestClass {
|
|
15139
15157
|
}
|
|
15140
|
-
const FAKE_ENTITIES
|
|
15158
|
+
const FAKE_ENTITIES = [
|
|
15141
15159
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15142
15160
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15143
15161
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15144
15162
|
];
|
|
15145
|
-
function deepCopy
|
|
15163
|
+
function deepCopy(values, size) {
|
|
15146
15164
|
if (isNil(size)) {
|
|
15147
|
-
return (values || FAKE_ENTITIES
|
|
15165
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15148
15166
|
}
|
|
15149
15167
|
let result = [];
|
|
15150
15168
|
let i = 1;
|
|
15151
15169
|
while (result.length < size) {
|
|
15152
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
15170
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15153
15171
|
const name = entity.name + ' #' + i;
|
|
15154
15172
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15155
15173
|
}));
|
|
@@ -15159,7 +15177,7 @@ function deepCopy$1(values, size) {
|
|
|
15159
15177
|
class AutocompleteTestPage {
|
|
15160
15178
|
constructor(formBuilder) {
|
|
15161
15179
|
this.formBuilder = formBuilder;
|
|
15162
|
-
this._items = deepCopy
|
|
15180
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15163
15181
|
this.$items = new BehaviorSubject(undefined);
|
|
15164
15182
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15165
15183
|
this.memoryHide = false;
|
|
@@ -15203,7 +15221,7 @@ class AutocompleteTestPage {
|
|
|
15203
15221
|
});
|
|
15204
15222
|
// From items
|
|
15205
15223
|
this.autocompleteFields.add('entity-items-large', {
|
|
15206
|
-
items: FAKE_ENTITIES
|
|
15224
|
+
items: FAKE_ENTITIES.slice(),
|
|
15207
15225
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15208
15226
|
displayWith: this.entityToString
|
|
15209
15227
|
});
|
|
@@ -15213,12 +15231,12 @@ class AutocompleteTestPage {
|
|
|
15213
15231
|
loadData() {
|
|
15214
15232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15215
15233
|
const data = {
|
|
15216
|
-
entity: deepCopy
|
|
15234
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15217
15235
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15218
15236
|
missingEntity: {
|
|
15219
15237
|
id: -1, label: '??', name: 'Missing item'
|
|
15220
15238
|
},
|
|
15221
|
-
disableEntity: deepCopy
|
|
15239
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15222
15240
|
};
|
|
15223
15241
|
this.form.setValue(data);
|
|
15224
15242
|
// Load observables
|
|
@@ -15288,7 +15306,7 @@ class AutocompleteTestPage {
|
|
|
15288
15306
|
AutocompleteTestPage.decorators = [
|
|
15289
15307
|
{ type: Component, args: [{
|
|
15290
15308
|
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"
|
|
15309
|
+
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
15310
|
},] }
|
|
15293
15311
|
];
|
|
15294
15312
|
AutocompleteTestPage.ctorParameters = () => [
|
|
@@ -15391,13 +15409,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
15391
15409
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
15392
15410
|
];
|
|
15393
15411
|
|
|
15394
|
-
const moment$
|
|
15412
|
+
const moment$5 = momentImported;
|
|
15395
15413
|
class SwipeTestPage {
|
|
15396
15414
|
constructor(formBuilder, dateFormatPipe) {
|
|
15397
15415
|
this.formBuilder = formBuilder;
|
|
15398
15416
|
this.dateFormatPipe = dateFormatPipe;
|
|
15399
15417
|
this.$dates = new BehaviorSubject(undefined);
|
|
15400
|
-
this._today = moment$
|
|
15418
|
+
this._today = moment$5().startOf('day');
|
|
15401
15419
|
this.form = formBuilder.group({
|
|
15402
15420
|
empty: [null, Validators.required],
|
|
15403
15421
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -15410,7 +15428,7 @@ class SwipeTestPage {
|
|
|
15410
15428
|
ngOnInit() {
|
|
15411
15429
|
const dates = [];
|
|
15412
15430
|
for (let d = 0; d < 7; d++) {
|
|
15413
|
-
dates[d] = moment$
|
|
15431
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
15414
15432
|
}
|
|
15415
15433
|
this.$dates.next(dates);
|
|
15416
15434
|
this.loadData();
|
|
@@ -15628,7 +15646,7 @@ function adaptValueToControl(source, control, path) {
|
|
|
15628
15646
|
}
|
|
15629
15647
|
// Skip if value is not an array
|
|
15630
15648
|
if (!(source instanceof Array) || control.length === 0) {
|
|
15631
|
-
if (
|
|
15649
|
+
if (isNotEmptyArray(source))
|
|
15632
15650
|
console.warn(`WARN: please resize the FormArray '${path}' to the same length of the input array`);
|
|
15633
15651
|
return [];
|
|
15634
15652
|
}
|
|
@@ -16027,7 +16045,7 @@ class FormArrayHelper {
|
|
|
16027
16045
|
}
|
|
16028
16046
|
}
|
|
16029
16047
|
|
|
16030
|
-
const moment = momentImported;
|
|
16048
|
+
const moment$6 = momentImported;
|
|
16031
16049
|
class DateTimeTestPage {
|
|
16032
16050
|
constructor(platform, formBuilder, cd) {
|
|
16033
16051
|
this.platform = platform;
|
|
@@ -16058,7 +16076,7 @@ class DateTimeTestPage {
|
|
|
16058
16076
|
// Load the form with data
|
|
16059
16077
|
loadData() {
|
|
16060
16078
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16061
|
-
const now = moment();
|
|
16079
|
+
const now = moment$6();
|
|
16062
16080
|
const data = {
|
|
16063
16081
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16064
16082
|
enable: toDateISOString(now),
|
|
@@ -16118,20 +16136,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16118
16136
|
{ type: ChangeDetectorRef }
|
|
16119
16137
|
];
|
|
16120
16138
|
|
|
16121
|
-
class EntityTestClass {
|
|
16139
|
+
class EntityTestClass$1 {
|
|
16122
16140
|
}
|
|
16123
|
-
const FAKE_ENTITIES = [
|
|
16141
|
+
const FAKE_ENTITIES$1 = [
|
|
16124
16142
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16125
16143
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16126
16144
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16127
16145
|
];
|
|
16128
|
-
function deepCopy(values) {
|
|
16129
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16146
|
+
function deepCopy$1(values) {
|
|
16147
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16130
16148
|
}
|
|
16131
16149
|
class ChipsTestPage {
|
|
16132
16150
|
constructor(formBuilder) {
|
|
16133
16151
|
this.formBuilder = formBuilder;
|
|
16134
|
-
this._items = deepCopy(FAKE_ENTITIES);
|
|
16152
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1);
|
|
16135
16153
|
this._$items = new BehaviorSubject(undefined);
|
|
16136
16154
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16137
16155
|
this.form = formBuilder.group({
|
|
@@ -16150,7 +16168,7 @@ class ChipsTestPage {
|
|
|
16150
16168
|
});
|
|
16151
16169
|
// From items
|
|
16152
16170
|
this.autocompleteFields.add('entity-items', {
|
|
16153
|
-
items: FAKE_ENTITIES.slice(),
|
|
16171
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
16154
16172
|
attributes: ['label', 'name'],
|
|
16155
16173
|
displayWith: this.entityToString
|
|
16156
16174
|
});
|
|
@@ -16171,15 +16189,15 @@ class ChipsTestPage {
|
|
|
16171
16189
|
const data = {
|
|
16172
16190
|
entity: [],
|
|
16173
16191
|
// 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)
|
|
16192
|
+
entityInitial: FAKE_ENTITIES$1.slice(1, 2),
|
|
16193
|
+
disableEntity: FAKE_ENTITIES$1.slice(1, 2)
|
|
16176
16194
|
};
|
|
16177
16195
|
this.form.setValue(data);
|
|
16178
16196
|
});
|
|
16179
16197
|
}
|
|
16180
16198
|
loadItems() {
|
|
16181
16199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16182
|
-
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16200
|
+
this._$items.next(deepCopy$1(FAKE_ENTITIES$1));
|
|
16183
16201
|
});
|
|
16184
16202
|
}
|
|
16185
16203
|
entityToString(item) {
|
|
@@ -16211,7 +16229,7 @@ ChipsTestPage.ctorParameters = () => [
|
|
|
16211
16229
|
{ type: FormBuilder }
|
|
16212
16230
|
];
|
|
16213
16231
|
|
|
16214
|
-
const routes
|
|
16232
|
+
const routes = [
|
|
16215
16233
|
{
|
|
16216
16234
|
path: '',
|
|
16217
16235
|
pathMatch: 'full',
|
|
@@ -16258,7 +16276,7 @@ MaterialTestingModule.decorators = [
|
|
|
16258
16276
|
ReactiveFormsModule,
|
|
16259
16277
|
SharedMaterialModule,
|
|
16260
16278
|
TranslateModule.forChild(),
|
|
16261
|
-
RouterModule.forChild(routes
|
|
16279
|
+
RouterModule.forChild(routes)
|
|
16262
16280
|
],
|
|
16263
16281
|
declarations: [
|
|
16264
16282
|
MaterialTestingPage,
|
|
@@ -17201,7 +17219,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17201
17219
|
});
|
|
17202
17220
|
}
|
|
17203
17221
|
}
|
|
17204
|
-
UserSettingsValidatorService.ɵprov =
|
|
17222
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17205
17223
|
UserSettingsValidatorService.decorators = [
|
|
17206
17224
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17207
17225
|
];
|
|
@@ -17245,7 +17263,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17245
17263
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17246
17264
|
}
|
|
17247
17265
|
}
|
|
17248
|
-
AccountValidatorService.ɵprov =
|
|
17266
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17249
17267
|
AccountValidatorService.decorators = [
|
|
17250
17268
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17251
17269
|
];
|
|
@@ -17474,6 +17492,7 @@ class FormButtonsBarComponent {
|
|
|
17474
17492
|
.subscribe((event) => this.onCancel.emit(event)));
|
|
17475
17493
|
// Escape
|
|
17476
17494
|
this._subscription.add(hotkeys.addShortcut({ keys: 'escape', description: 'COMMON.BTN_CLOSE', preventDefault: false })
|
|
17495
|
+
.pipe(filter(e => !e.defaultPrevented))
|
|
17477
17496
|
.subscribe((event) => this.onBack.emit(event)));
|
|
17478
17497
|
}
|
|
17479
17498
|
ngOnDestroy() {
|
|
@@ -17778,7 +17797,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17778
17797
|
});
|
|
17779
17798
|
}
|
|
17780
17799
|
}
|
|
17781
|
-
LocalSettingsValidatorService.ɵprov =
|
|
17800
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
17782
17801
|
LocalSettingsValidatorService.decorators = [
|
|
17783
17802
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17784
17803
|
];
|
|
@@ -18234,7 +18253,13 @@ class AppListForm extends AppForm {
|
|
|
18234
18253
|
}
|
|
18235
18254
|
markAsTouched(opts) {
|
|
18236
18255
|
AppFormUtils.markAsTouched(this.formArray, opts);
|
|
18237
|
-
|
|
18256
|
+
if (!opts || opts.emitEvent !== false)
|
|
18257
|
+
this.markForCheck();
|
|
18258
|
+
}
|
|
18259
|
+
markAllAsTouched(opts) {
|
|
18260
|
+
AppFormUtils.markAllAsTouched(this.formArray, opts);
|
|
18261
|
+
if (!opts || opts.emitEvent !== false)
|
|
18262
|
+
this.markForCheck();
|
|
18238
18263
|
}
|
|
18239
18264
|
ngOnInit() {
|
|
18240
18265
|
this.options = Object.assign({ allowEmptyArray: true, allowMultipleSelection: true, buttons: [] }, this.options);
|
|
@@ -18265,6 +18290,9 @@ class AppListForm extends AppForm {
|
|
|
18265
18290
|
this.helper.resize(data.length);
|
|
18266
18291
|
this.helper.formArray.patchValue(data, { emitEvent: false });
|
|
18267
18292
|
}
|
|
18293
|
+
else {
|
|
18294
|
+
console.warn('TODO: cannot applyied setValue() on fromArray, because formArrayHelper not exists yet !');
|
|
18295
|
+
}
|
|
18268
18296
|
this.selection.clear();
|
|
18269
18297
|
this.markAsPristine();
|
|
18270
18298
|
this.loading = false;
|
|
@@ -18389,7 +18417,7 @@ class IsOnFieldModePipe {
|
|
|
18389
18417
|
return value === 'FIELD';
|
|
18390
18418
|
}
|
|
18391
18419
|
}
|
|
18392
|
-
IsOnFieldModePipe.ɵprov =
|
|
18420
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18393
18421
|
IsOnFieldModePipe.decorators = [
|
|
18394
18422
|
{ type: Pipe, args: [{
|
|
18395
18423
|
name: 'isOnField'
|
|
@@ -18401,7 +18429,7 @@ class IsNotOnFieldModePipe {
|
|
|
18401
18429
|
return value !== 'FIELD';
|
|
18402
18430
|
}
|
|
18403
18431
|
}
|
|
18404
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18432
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18405
18433
|
IsNotOnFieldModePipe.decorators = [
|
|
18406
18434
|
{ type: Pipe, args: [{
|
|
18407
18435
|
name: 'isNotOnField'
|
|
@@ -18416,7 +18444,7 @@ class PersonToStringPipe {
|
|
|
18416
18444
|
return PersonUtils.personToString(value);
|
|
18417
18445
|
}
|
|
18418
18446
|
}
|
|
18419
|
-
PersonToStringPipe.ɵprov =
|
|
18447
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18420
18448
|
PersonToStringPipe.decorators = [
|
|
18421
18449
|
{ type: Pipe, args: [{
|
|
18422
18450
|
name: 'personToString'
|
|
@@ -18633,7 +18661,7 @@ class IsLoginAccountPipe {
|
|
|
18633
18661
|
return value && value.pubkey && true;
|
|
18634
18662
|
}
|
|
18635
18663
|
}
|
|
18636
|
-
IsLoginAccountPipe.ɵprov =
|
|
18664
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18637
18665
|
IsLoginAccountPipe.decorators = [
|
|
18638
18666
|
{ type: Pipe, args: [{
|
|
18639
18667
|
name: 'isLogin'
|
|
@@ -18645,7 +18673,7 @@ class AccountToStringPipe {
|
|
|
18645
18673
|
return accountToString(value);
|
|
18646
18674
|
}
|
|
18647
18675
|
}
|
|
18648
|
-
AccountToStringPipe.ɵprov =
|
|
18676
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
18649
18677
|
AccountToStringPipe.decorators = [
|
|
18650
18678
|
{ type: Pipe, args: [{
|
|
18651
18679
|
name: 'accountToString'
|
|
@@ -18660,7 +18688,7 @@ class DepartmentToStringPipe {
|
|
|
18660
18688
|
return departmentToString(value);
|
|
18661
18689
|
}
|
|
18662
18690
|
}
|
|
18663
|
-
DepartmentToStringPipe.ɵprov =
|
|
18691
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
18664
18692
|
DepartmentToStringPipe.decorators = [
|
|
18665
18693
|
{ type: Pipe, args: [{
|
|
18666
18694
|
name: 'departmentToString'
|
|
@@ -18686,7 +18714,7 @@ class MenuService {
|
|
|
18686
18714
|
this._visibleSubject.next(value);
|
|
18687
18715
|
}
|
|
18688
18716
|
}
|
|
18689
|
-
MenuService.ɵprov =
|
|
18717
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
18690
18718
|
MenuService.decorators = [
|
|
18691
18719
|
{ type: Injectable, args: [{
|
|
18692
18720
|
providedIn: 'root'
|
|
@@ -19180,7 +19208,7 @@ class AuthGuardService {
|
|
|
19180
19208
|
}));
|
|
19181
19209
|
}
|
|
19182
19210
|
}
|
|
19183
|
-
AuthGuardService.ɵprov =
|
|
19211
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
19184
19212
|
AuthGuardService.decorators = [
|
|
19185
19213
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19186
19214
|
];
|
|
@@ -19228,7 +19256,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19228
19256
|
query,
|
|
19229
19257
|
variables: { id },
|
|
19230
19258
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19231
|
-
error: { code: ErrorCodes
|
|
19259
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19232
19260
|
})
|
|
19233
19261
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19234
19262
|
? (data && this.fromObject(data))
|
|
@@ -19243,7 +19271,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19243
19271
|
query,
|
|
19244
19272
|
variables: { id },
|
|
19245
19273
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19246
|
-
error: { code: ErrorCodes
|
|
19274
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19247
19275
|
});
|
|
19248
19276
|
// Convert to entity
|
|
19249
19277
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19274,7 +19302,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19274
19302
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19275
19303
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19276
19304
|
variables,
|
|
19277
|
-
error: { code: ErrorCodes
|
|
19305
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19278
19306
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19279
19307
|
})
|
|
19280
19308
|
.pipe(map(({ data, total }) => {
|
|
@@ -19310,7 +19338,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19310
19338
|
const { data, total } = yield this.graphql.query({
|
|
19311
19339
|
query,
|
|
19312
19340
|
variables,
|
|
19313
|
-
error: { code: ErrorCodes
|
|
19341
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19314
19342
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19315
19343
|
});
|
|
19316
19344
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19349,7 +19377,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19349
19377
|
variables: {
|
|
19350
19378
|
filter: filter && filter.asPodObject()
|
|
19351
19379
|
},
|
|
19352
|
-
error: { code: ErrorCodes
|
|
19380
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19353
19381
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19354
19382
|
});
|
|
19355
19383
|
return res.total;
|
|
@@ -19382,7 +19410,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19382
19410
|
variables: {
|
|
19383
19411
|
data: json
|
|
19384
19412
|
},
|
|
19385
|
-
error: { code: ErrorCodes
|
|
19413
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19386
19414
|
update: (proxy, { data }) => {
|
|
19387
19415
|
const savedEntities = data && data.data;
|
|
19388
19416
|
if (savedEntities) {
|
|
@@ -19438,7 +19466,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19438
19466
|
variables: {
|
|
19439
19467
|
data: json
|
|
19440
19468
|
},
|
|
19441
|
-
error: { code: ErrorCodes
|
|
19469
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19442
19470
|
update: (cache, { data }) => {
|
|
19443
19471
|
// Update entity
|
|
19444
19472
|
const savedEntity = data && data.data;
|
|
@@ -19486,7 +19514,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19486
19514
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19487
19515
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19488
19516
|
variables: { ids },
|
|
19489
|
-
error: { code: ErrorCodes
|
|
19517
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19490
19518
|
update: (cache, res) => {
|
|
19491
19519
|
// Remove from cache
|
|
19492
19520
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19527,7 +19555,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19527
19555
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19528
19556
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19529
19557
|
variables: { id },
|
|
19530
|
-
error: { code: ErrorCodes
|
|
19558
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19531
19559
|
update: (proxy, res) => {
|
|
19532
19560
|
// Remove from cache
|
|
19533
19561
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19560,7 +19588,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19560
19588
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19561
19589
|
variables,
|
|
19562
19590
|
error: {
|
|
19563
|
-
code: ErrorCodes
|
|
19591
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19564
19592
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19565
19593
|
}
|
|
19566
19594
|
})
|
|
@@ -19735,7 +19763,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
19735
19763
|
if (this._debug)
|
|
19736
19764
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
19737
19765
|
// Stop with an error
|
|
19738
|
-
throw { code: ErrorCodes
|
|
19766
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
19739
19767
|
}
|
|
19740
19768
|
this._editingRowCount = 0;
|
|
19741
19769
|
let data;
|
|
@@ -20046,13 +20074,6 @@ class AppTable {
|
|
|
20046
20074
|
get saving$() {
|
|
20047
20075
|
return this.savingSubject.asObservable();
|
|
20048
20076
|
}
|
|
20049
|
-
// Focus manager
|
|
20050
|
-
set focusColumn(name) {
|
|
20051
|
-
this._focusColumn = name;
|
|
20052
|
-
}
|
|
20053
|
-
get focusColumn() {
|
|
20054
|
-
return this._focusColumn;
|
|
20055
|
-
}
|
|
20056
20077
|
get firstUserColumn() {
|
|
20057
20078
|
return this.displayedColumns[RESERVED_START_COLUMNS.length];
|
|
20058
20079
|
}
|
|
@@ -20564,14 +20585,14 @@ class AppTable {
|
|
|
20564
20585
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20565
20586
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20566
20587
|
if (this.readOnly) {
|
|
20567
|
-
throw { code: ErrorCodes
|
|
20588
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20568
20589
|
}
|
|
20569
20590
|
this.resetError();
|
|
20570
20591
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20571
20592
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20572
20593
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20573
20594
|
if (!this.confirmEditCreate()) {
|
|
20574
|
-
throw { code: ErrorCodes
|
|
20595
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20575
20596
|
}
|
|
20576
20597
|
// Mark as saving
|
|
20577
20598
|
this.markAsSaving();
|
|
@@ -20687,7 +20708,7 @@ class AppTable {
|
|
|
20687
20708
|
deleteRows(event, rows, opts) {
|
|
20688
20709
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20689
20710
|
if (this.readOnly) {
|
|
20690
|
-
throw { code: ErrorCodes
|
|
20711
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20691
20712
|
}
|
|
20692
20713
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
20693
20714
|
return 0; // SKip
|
|
@@ -20843,13 +20864,15 @@ class AppTable {
|
|
|
20843
20864
|
row = row || this.editedRow;
|
|
20844
20865
|
if (!row || !row.editing)
|
|
20845
20866
|
return;
|
|
20867
|
+
// DEBUG
|
|
20868
|
+
//console.debug('[app-table] Cancel the row (keydown.escape)');
|
|
20846
20869
|
if (event) {
|
|
20847
20870
|
// Avoid to cancel the editor
|
|
20848
20871
|
event.preventDefault();
|
|
20849
20872
|
event.stopPropagation();
|
|
20850
20873
|
}
|
|
20851
|
-
// If new row: delete silently
|
|
20852
|
-
if (row.id === -1) {
|
|
20874
|
+
// If new row is invalid: delete silently
|
|
20875
|
+
if (row.id === -1 && row.validator.invalid) {
|
|
20853
20876
|
this.deleteNewRow(event, row);
|
|
20854
20877
|
}
|
|
20855
20878
|
// If exists
|
|
@@ -20876,7 +20899,7 @@ class AppTable {
|
|
|
20876
20899
|
return false;
|
|
20877
20900
|
}
|
|
20878
20901
|
if (!row.editing && !this.loading) {
|
|
20879
|
-
this.
|
|
20902
|
+
this.focusColumn = opts && opts.focusColumn || this.focusColumn;
|
|
20880
20903
|
this._dataSource.startEdit(row);
|
|
20881
20904
|
}
|
|
20882
20905
|
this.editedRow = row;
|
|
@@ -22116,7 +22139,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22116
22139
|
try {
|
|
22117
22140
|
const data = yield this.dataService.load(id, opts);
|
|
22118
22141
|
if (!data)
|
|
22119
|
-
throw { code: ErrorCodes
|
|
22142
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22120
22143
|
this._usageMode = this.computeUsageMode(data);
|
|
22121
22144
|
yield this.onEntityLoaded(data, opts);
|
|
22122
22145
|
yield this.updateView(data, opts);
|
|
@@ -23009,7 +23032,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23009
23032
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23010
23033
|
}
|
|
23011
23034
|
}
|
|
23012
|
-
UserEventService.ɵprov =
|
|
23035
|
+
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" });
|
|
23013
23036
|
UserEventService.decorators = [
|
|
23014
23037
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23015
23038
|
];
|
|
@@ -23391,7 +23414,7 @@ class PersonService extends BaseEntityService {
|
|
|
23391
23414
|
return target;
|
|
23392
23415
|
}
|
|
23393
23416
|
}
|
|
23394
|
-
PersonService.ɵprov =
|
|
23417
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
23395
23418
|
PersonService.decorators = [
|
|
23396
23419
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23397
23420
|
];
|
|
@@ -23422,7 +23445,7 @@ class PersonValidatorService {
|
|
|
23422
23445
|
return this.formBuilder.group(formConfig);
|
|
23423
23446
|
}
|
|
23424
23447
|
}
|
|
23425
|
-
PersonValidatorService.ɵprov =
|
|
23448
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23426
23449
|
PersonValidatorService.decorators = [
|
|
23427
23450
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23428
23451
|
];
|
|
@@ -23578,7 +23601,7 @@ UsersPage.decorators = [
|
|
|
23578
23601
|
],
|
|
23579
23602
|
animations: [slideUpDownAnimation],
|
|
23580
23603
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23581
|
-
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:
|
|
23604
|
+
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}"]
|
|
23582
23605
|
},] }
|
|
23583
23606
|
];
|
|
23584
23607
|
UsersPage.ctorParameters = () => [
|
|
@@ -23626,16 +23649,16 @@ AdminModule.decorators = [
|
|
|
23626
23649
|
];
|
|
23627
23650
|
AdminModule.ctorParameters = () => [];
|
|
23628
23651
|
|
|
23629
|
-
const ɵ0 = {
|
|
23652
|
+
const ɵ0$a = {
|
|
23630
23653
|
profile: 'ADMIN'
|
|
23631
23654
|
};
|
|
23632
|
-
const routes = [
|
|
23655
|
+
const routes$1 = [
|
|
23633
23656
|
{
|
|
23634
23657
|
path: 'users',
|
|
23635
23658
|
pathMatch: 'full',
|
|
23636
23659
|
component: UsersPage,
|
|
23637
23660
|
canActivate: [AuthGuardService],
|
|
23638
|
-
data: ɵ0
|
|
23661
|
+
data: ɵ0$a
|
|
23639
23662
|
}
|
|
23640
23663
|
];
|
|
23641
23664
|
class AdminRoutingModule {
|
|
@@ -23645,13 +23668,13 @@ AdminRoutingModule.decorators = [
|
|
|
23645
23668
|
imports: [
|
|
23646
23669
|
SharedRoutingModule,
|
|
23647
23670
|
AdminModule,
|
|
23648
|
-
RouterModule.forChild(routes)
|
|
23671
|
+
RouterModule.forChild(routes$1)
|
|
23649
23672
|
],
|
|
23650
23673
|
exports: [RouterModule]
|
|
23651
23674
|
},] }
|
|
23652
23675
|
];
|
|
23653
23676
|
|
|
23654
|
-
const ErrorCodes = {
|
|
23677
|
+
const ErrorCodes$2 = {
|
|
23655
23678
|
LOAD_PERSONS_ERROR: 100,
|
|
23656
23679
|
SAVE_PERSONS_ERROR: 101,
|
|
23657
23680
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -23663,5 +23686,5 @@ const ErrorCodes = {
|
|
|
23663
23686
|
* Generated bundle index. Do not edit.
|
|
23664
23687
|
*/
|
|
23665
23688
|
|
|
23666
|
-
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 };
|
|
23689
|
+
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 };
|
|
23667
23690
|
//# sourceMappingURL=ngx-sumaris-components.js.map
|