@sumaris-net/ngx-components 1.7.4 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +476 -413
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +10 -1
- package/esm2015/public_api.js +2 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -1
- package/esm2015/src/app/core/home/home.js +2 -2
- package/esm2015/src/app/core/services/account.service.js +38 -27
- package/esm2015/src/app/core/services/base-entity-service.class.js +4 -1
- package/esm2015/src/app/core/services/config.service.js +11 -4
- package/esm2015/src/app/core/services/local-settings.service.js +18 -14
- package/esm2015/src/app/core/services/model/settings.model.js +1 -1
- package/esm2015/src/app/core/services/platform.service.js +35 -31
- package/esm2015/src/app/shared/directives/autofocus.directive.js +15 -24
- package/esm2015/src/app/shared/platforms.js +36 -0
- package/esm2015/src/app/shared/services/entity-service.class.js +1 -1
- package/esm2015/src/app/shared/services/progress-bar.service.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +414 -344
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/core/form/entity-editor.class.d.ts +1 -1
- package/src/app/core/services/account.service.d.ts +2 -0
- package/src/app/core/services/base-entity-service.class.d.ts +1 -0
- package/src/app/core/services/config.service.d.ts +4 -1
- package/src/app/core/services/local-settings.service.d.ts +0 -2
- package/src/app/core/services/model/settings.model.d.ts +0 -1
- package/src/app/core/services/platform.service.d.ts +8 -5
- package/src/app/shared/directives/autofocus.directive.d.ts +4 -5
- package/src/app/shared/platforms.d.ts +13 -0
- package/src/app/shared/services/entity-service.class.d.ts +1 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, TemplateRef, ViewContainerRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import * as i1$3 from '@angular/common';
|
|
2
4
|
import { CommonModule, DOCUMENT, Location } from '@angular/common';
|
|
3
5
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
4
6
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
5
7
|
import { OverlayModule, OverlayContainer, FullscreenOverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
6
8
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
|
+
import * as i1$2 from '@angular/material/core';
|
|
7
10
|
import { DateAdapter, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
8
11
|
import { MatTableModule, MatTable, MatColumnDef } from '@angular/material/table';
|
|
9
12
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
@@ -27,16 +30,21 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
27
30
|
import { MatRadioModule } from '@angular/material/radio';
|
|
28
31
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
29
32
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
33
|
+
import * as i2$1 from '@angular/material/dialog';
|
|
30
34
|
import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
31
35
|
import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
32
36
|
import { __awaiter, __decorate } from 'tslib';
|
|
37
|
+
import * as i1$6 from '@angular/forms';
|
|
33
38
|
import { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
|
|
34
39
|
import { timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, noop as noop$9, Observable, defer, of, from, combineLatest, EMPTY } from 'rxjs';
|
|
35
40
|
import { filter, first, map, takeUntil, switchMap, startWith, debounceTime, takeWhile, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
|
|
41
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
36
42
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
|
+
import * as i1$4 from '@ionic/angular';
|
|
37
44
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent } from '@ionic/angular';
|
|
38
45
|
import * as momentImported from 'moment';
|
|
39
46
|
import { isMoment } from 'moment';
|
|
47
|
+
import * as i1 from '@angular/material-moment-adapter';
|
|
40
48
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
41
49
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
42
50
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
@@ -46,32 +54,38 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
46
54
|
import { MatDividerModule } from '@angular/material/divider';
|
|
47
55
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
48
56
|
import { MatChipsModule } from '@angular/material/chips';
|
|
57
|
+
import * as i3$3 from '@angular/router';
|
|
49
58
|
import { Router, RouterModule, RouteReuseStrategy, ActivatedRoute } from '@angular/router';
|
|
59
|
+
import * as i1$5 from '@angular/platform-browser';
|
|
50
60
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
61
|
+
import * as i2$2 from '@angular/common/http';
|
|
51
62
|
import { HttpResponse, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
52
63
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
53
|
-
import { NativeAudio
|
|
54
|
-
import { Vibration
|
|
64
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
65
|
+
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
55
66
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
67
|
+
import * as i2 from '@ionic-native/native-audio/ngx/index';
|
|
68
|
+
import * as i3 from '@ionic-native/vibration/ngx/index';
|
|
69
|
+
import * as i4 from '@ionic-native/audio-management/ngx/index';
|
|
59
70
|
import * as uuidv4Imported from 'uuid/v4';
|
|
60
71
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
61
72
|
import { MarkdownModule } from 'ngx-markdown';
|
|
62
73
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
74
|
+
import * as i3$1 from '@ionic/storage';
|
|
63
75
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
64
76
|
import 'zone.js/dist/zone-error';
|
|
65
|
-
import { SplashScreen
|
|
66
|
-
import { Connection, Network
|
|
67
|
-
import { CacheService
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import { StatusBar
|
|
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 * as i6 from 'ionic-cache/dist/cache.service';
|
|
81
|
+
import * as i9 from '@ionic-native/network/ngx/index';
|
|
82
|
+
import * as i10 from '@ionic-native/splash-screen/ngx/index';
|
|
83
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
|
+
import * as i2$4 from '@angular/cdk/platform';
|
|
72
85
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
73
|
-
import { InAppBrowser
|
|
86
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
74
87
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
88
|
+
import * as i2$3 from 'apollo-angular';
|
|
75
89
|
import { Apollo } from 'apollo-angular';
|
|
76
90
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
77
91
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -79,13 +93,14 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
79
93
|
import QueueLink from 'apollo-link-queue';
|
|
80
94
|
import SerializingLink from 'apollo-link-serialize';
|
|
81
95
|
import loggerLink from 'apollo-link-logger';
|
|
96
|
+
import * as i3$2 from 'apollo-angular/http';
|
|
82
97
|
import { HttpLink } from 'apollo-angular/http';
|
|
83
98
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
84
|
-
import { NotificationVisibility, Downloader
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
99
|
+
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
100
|
+
import * as i14 from '@ionic-native/status-bar/ngx/index';
|
|
101
|
+
import * as i15 from '@ionic-native/keyboard/ngx/index';
|
|
102
|
+
import * as i17 from '@ionic-native/in-app-browser/ngx/index';
|
|
103
|
+
import * as i18 from '@ionic-native/downloader/ngx/index';
|
|
89
104
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
90
105
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
91
106
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -976,14 +991,14 @@ class MatAutocompleteConfigHolder {
|
|
|
976
991
|
return this.fields[fieldName] || this.add(fieldName);
|
|
977
992
|
}
|
|
978
993
|
}
|
|
979
|
-
const noop = (_) => { };
|
|
980
|
-
const ɵ0 = noop;
|
|
994
|
+
const noop$8 = (_) => { };
|
|
995
|
+
const ɵ0$c = noop$8;
|
|
981
996
|
class MatAutocompleteField {
|
|
982
997
|
constructor(cd, formGroupDir) {
|
|
983
998
|
this.cd = cd;
|
|
984
999
|
this.formGroupDir = formGroupDir;
|
|
985
|
-
this._onChangeCallback = noop;
|
|
986
|
-
this._onTouchedCallback = noop;
|
|
1000
|
+
this._onChangeCallback = noop$8;
|
|
1001
|
+
this._onTouchedCallback = noop$8;
|
|
987
1002
|
this.logPrefix = '[mat-autocomplete] ';
|
|
988
1003
|
this.formControlName = null;
|
|
989
1004
|
this.required = false;
|
|
@@ -1703,7 +1718,7 @@ class DateFormatPipe {
|
|
|
1703
1718
|
return this.dateAdapter.format(date, displayFormat);
|
|
1704
1719
|
}
|
|
1705
1720
|
}
|
|
1706
|
-
DateFormatPipe.ɵprov =
|
|
1721
|
+
DateFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1707
1722
|
DateFormatPipe.decorators = [
|
|
1708
1723
|
{ type: Pipe, args: [{
|
|
1709
1724
|
name: 'dateFormat'
|
|
@@ -1715,7 +1730,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1715
1730
|
{ type: TranslateService }
|
|
1716
1731
|
];
|
|
1717
1732
|
|
|
1718
|
-
const moment = momentImported;
|
|
1733
|
+
const moment$6 = momentImported;
|
|
1719
1734
|
class DateDiffDurationPipe {
|
|
1720
1735
|
constructor(dateAdapter, translate) {
|
|
1721
1736
|
this.dateAdapter = dateAdapter;
|
|
@@ -1731,17 +1746,17 @@ class DateDiffDurationPipe {
|
|
|
1731
1746
|
return this.format(startDate, endDate);
|
|
1732
1747
|
}
|
|
1733
1748
|
format(startDate, endDate) {
|
|
1734
|
-
const duration = moment.duration(endDate.diff(startDate));
|
|
1749
|
+
const duration = moment$6.duration(endDate.diff(startDate));
|
|
1735
1750
|
if (duration.asMinutes() < 0)
|
|
1736
1751
|
return '';
|
|
1737
|
-
const timeDuration = moment(0)
|
|
1752
|
+
const timeDuration = moment$6(0)
|
|
1738
1753
|
.hour(duration.hours())
|
|
1739
1754
|
.minute(duration.minutes());
|
|
1740
1755
|
const days = Math.floor(duration.asDays());
|
|
1741
1756
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1742
1757
|
}
|
|
1743
1758
|
}
|
|
1744
|
-
DateDiffDurationPipe.ɵprov =
|
|
1759
|
+
DateDiffDurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0.ɵɵinject(i1$2.DateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1745
1760
|
DateDiffDurationPipe.decorators = [
|
|
1746
1761
|
{ type: Pipe, args: [{
|
|
1747
1762
|
name: 'dateDiffDuration'
|
|
@@ -1762,7 +1777,7 @@ class DateFromNowPipe {
|
|
|
1762
1777
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1763
1778
|
}
|
|
1764
1779
|
}
|
|
1765
|
-
DateFromNowPipe.ɵprov =
|
|
1780
|
+
DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1766
1781
|
DateFromNowPipe.decorators = [
|
|
1767
1782
|
{ type: Pipe, args: [{
|
|
1768
1783
|
name: 'dateFromNow'
|
|
@@ -1831,7 +1846,7 @@ function formatToDD(value, opts) {
|
|
|
1831
1846
|
value *= -1;
|
|
1832
1847
|
}
|
|
1833
1848
|
}
|
|
1834
|
-
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1849
|
+
let degrees = roundFloat$1(value, opts.maxDecimals).toString();
|
|
1835
1850
|
// Add sign
|
|
1836
1851
|
let sign = negative ? '-' : '+';
|
|
1837
1852
|
if (opts.placeholderChar) {
|
|
@@ -1882,7 +1897,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1882
1897
|
}
|
|
1883
1898
|
let degrees = Math.trunc(value);
|
|
1884
1899
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1885
|
-
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1900
|
+
let seconds = roundFloat$1(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1886
1901
|
while (seconds >= 60) {
|
|
1887
1902
|
seconds -= 60;
|
|
1888
1903
|
minutes += 1;
|
|
@@ -1950,7 +1965,7 @@ function formatToDDMM(value, opts) {
|
|
|
1950
1965
|
}
|
|
1951
1966
|
}
|
|
1952
1967
|
let degrees = Math.trunc(value);
|
|
1953
|
-
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1968
|
+
let minutes = roundFloat$1((value - degrees) * 60, opts.maxDecimals);
|
|
1954
1969
|
while (minutes >= 60) {
|
|
1955
1970
|
minutes -= 60;
|
|
1956
1971
|
degrees += 1;
|
|
@@ -2001,15 +2016,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
2001
2016
|
return NaN;
|
|
2002
2017
|
}
|
|
2003
2018
|
if (pattern === 'DD')
|
|
2004
|
-
return roundFloat(degrees, maxDecimals);
|
|
2019
|
+
return roundFloat$1(degrees, maxDecimals);
|
|
2005
2020
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2006
2021
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2007
2022
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2008
2023
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2009
2024
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2010
|
-
return roundFloat(degrees, maxDecimals);
|
|
2025
|
+
return roundFloat$1(degrees, maxDecimals);
|
|
2011
2026
|
}
|
|
2012
|
-
function roundFloat(input, maxDecimals) {
|
|
2027
|
+
function roundFloat$1(input, maxDecimals) {
|
|
2013
2028
|
if (maxDecimals > 0) {
|
|
2014
2029
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
2015
2030
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2029,7 +2044,7 @@ class LatLongFormatPipe {
|
|
|
2029
2044
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
2030
2045
|
}
|
|
2031
2046
|
}
|
|
2032
|
-
LatLongFormatPipe.ɵprov =
|
|
2047
|
+
LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2033
2048
|
LatLongFormatPipe.decorators = [
|
|
2034
2049
|
{ type: Pipe, args: [{
|
|
2035
2050
|
name: 'latLongFormat'
|
|
@@ -2041,7 +2056,7 @@ class LatitudeFormatPipe {
|
|
|
2041
2056
|
this.transform = formatLatitude;
|
|
2042
2057
|
}
|
|
2043
2058
|
}
|
|
2044
|
-
LatitudeFormatPipe.ɵprov =
|
|
2059
|
+
LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2045
2060
|
LatitudeFormatPipe.decorators = [
|
|
2046
2061
|
{ type: Pipe, args: [{
|
|
2047
2062
|
name: 'latitudeFormat'
|
|
@@ -2053,7 +2068,7 @@ class LongitudeFormatPipe {
|
|
|
2053
2068
|
this.transform = formatLongitude;
|
|
2054
2069
|
}
|
|
2055
2070
|
}
|
|
2056
|
-
LongitudeFormatPipe.ɵprov =
|
|
2071
|
+
LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2057
2072
|
LongitudeFormatPipe.decorators = [
|
|
2058
2073
|
{ type: Pipe, args: [{
|
|
2059
2074
|
name: 'longitudeFormat'
|
|
@@ -2073,7 +2088,7 @@ class NumberFormatPipe {
|
|
|
2073
2088
|
}
|
|
2074
2089
|
}
|
|
2075
2090
|
}
|
|
2076
|
-
NumberFormatPipe.ɵprov =
|
|
2091
|
+
NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2077
2092
|
NumberFormatPipe.decorators = [
|
|
2078
2093
|
{ type: Pipe, args: [{
|
|
2079
2094
|
name: 'numberFormat'
|
|
@@ -2113,7 +2128,7 @@ class HighlightPipe {
|
|
|
2113
2128
|
}
|
|
2114
2129
|
}
|
|
2115
2130
|
}
|
|
2116
|
-
HighlightPipe.ɵprov =
|
|
2131
|
+
HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2117
2132
|
HighlightPipe.decorators = [
|
|
2118
2133
|
{ type: Pipe, args: [{
|
|
2119
2134
|
name: 'highlight'
|
|
@@ -2178,7 +2193,7 @@ FileSizePipe.decorators = [
|
|
|
2178
2193
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2179
2194
|
];
|
|
2180
2195
|
|
|
2181
|
-
const moment$
|
|
2196
|
+
const moment$5 = momentImported;
|
|
2182
2197
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2183
2198
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2184
2199
|
class DateUtils {
|
|
@@ -2220,32 +2235,32 @@ function fromDateISOString(value) {
|
|
|
2220
2235
|
if (!value || isMoment(value))
|
|
2221
2236
|
return value;
|
|
2222
2237
|
// Parse the input value, as a ISO date time
|
|
2223
|
-
const date = moment$
|
|
2238
|
+
const date = moment$5(value, DATE_ISO_PATTERN);
|
|
2224
2239
|
if (date.isValid())
|
|
2225
2240
|
return date;
|
|
2226
2241
|
// Not valid: trying to convert from unix timestamp
|
|
2227
2242
|
if (typeof value === 'string') {
|
|
2228
2243
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2229
2244
|
if (value.length === 10) {
|
|
2230
|
-
return moment$
|
|
2245
|
+
return moment$5(value, DATE_UNIX_TIMESTAMP);
|
|
2231
2246
|
}
|
|
2232
2247
|
else if (value.length === 13) {
|
|
2233
|
-
return moment$
|
|
2248
|
+
return moment$5(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2234
2249
|
}
|
|
2235
2250
|
}
|
|
2236
2251
|
console.warn('Unable to parse date: ' + value);
|
|
2237
2252
|
return undefined;
|
|
2238
2253
|
}
|
|
2239
2254
|
function fromUnixTimestamp(timeInSec) {
|
|
2240
|
-
return moment$
|
|
2255
|
+
return moment$5(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2241
2256
|
}
|
|
2242
2257
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2243
|
-
return moment$
|
|
2258
|
+
return moment$5(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2244
2259
|
}
|
|
2245
2260
|
function toDuration(value, unit) {
|
|
2246
2261
|
if (!value)
|
|
2247
2262
|
return undefined;
|
|
2248
|
-
const duration = moment$
|
|
2263
|
+
const duration = moment$5.duration(value, unit);
|
|
2249
2264
|
// fix 990+ ms
|
|
2250
2265
|
if (duration.milliseconds() >= 990) {
|
|
2251
2266
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2274,7 +2289,7 @@ class DurationPipe {
|
|
|
2274
2289
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2275
2290
|
}
|
|
2276
2291
|
}
|
|
2277
|
-
DurationPipe.ɵprov =
|
|
2292
|
+
DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$1.TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2278
2293
|
DurationPipe.decorators = [
|
|
2279
2294
|
{ type: Pipe, args: [{
|
|
2280
2295
|
name: 'duration'
|
|
@@ -2295,7 +2310,7 @@ class MathAbsPipe {
|
|
|
2295
2310
|
}
|
|
2296
2311
|
}
|
|
2297
2312
|
}
|
|
2298
|
-
MathAbsPipe.ɵprov =
|
|
2313
|
+
MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2299
2314
|
MathAbsPipe.decorators = [
|
|
2300
2315
|
{ type: Pipe, args: [{
|
|
2301
2316
|
name: 'mathAbs'
|
|
@@ -2307,7 +2322,7 @@ class EvenPipe {
|
|
|
2307
2322
|
return val % 2 === 0;
|
|
2308
2323
|
}
|
|
2309
2324
|
}
|
|
2310
|
-
EvenPipe.ɵprov =
|
|
2325
|
+
EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2311
2326
|
EvenPipe.decorators = [
|
|
2312
2327
|
{ type: Pipe, args: [{
|
|
2313
2328
|
name: 'even'
|
|
@@ -2319,7 +2334,7 @@ class OddPipe {
|
|
|
2319
2334
|
return val % 2 !== 0;
|
|
2320
2335
|
}
|
|
2321
2336
|
}
|
|
2322
|
-
OddPipe.ɵprov =
|
|
2337
|
+
OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2323
2338
|
OddPipe.decorators = [
|
|
2324
2339
|
{ type: Pipe, args: [{
|
|
2325
2340
|
name: 'odd'
|
|
@@ -2427,7 +2442,7 @@ class MapGetPipe {
|
|
|
2427
2442
|
return val[key];
|
|
2428
2443
|
}
|
|
2429
2444
|
}
|
|
2430
|
-
MapGetPipe.ɵprov =
|
|
2445
|
+
MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2431
2446
|
MapGetPipe.decorators = [
|
|
2432
2447
|
{ type: Pipe, args: [{
|
|
2433
2448
|
name: 'mapGet'
|
|
@@ -2441,7 +2456,7 @@ class MapKeysPipe {
|
|
|
2441
2456
|
return Object.keys(map);
|
|
2442
2457
|
}
|
|
2443
2458
|
}
|
|
2444
|
-
MapKeysPipe.ɵprov =
|
|
2459
|
+
MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2445
2460
|
MapKeysPipe.decorators = [
|
|
2446
2461
|
{ type: Pipe, args: [{
|
|
2447
2462
|
name: 'mapKeys'
|
|
@@ -2455,7 +2470,7 @@ class MapValuesPipe {
|
|
|
2455
2470
|
return Object.values(map);
|
|
2456
2471
|
}
|
|
2457
2472
|
}
|
|
2458
|
-
MapValuesPipe.ɵprov =
|
|
2473
|
+
MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2459
2474
|
MapValuesPipe.decorators = [
|
|
2460
2475
|
{ type: Pipe, args: [{
|
|
2461
2476
|
name: 'mapValues'
|
|
@@ -2468,7 +2483,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2468
2483
|
return isNotNilOrBlank(value);
|
|
2469
2484
|
}
|
|
2470
2485
|
}
|
|
2471
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2486
|
+
IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2472
2487
|
IsNotNilOrBlankPipe.decorators = [
|
|
2473
2488
|
{ type: Pipe, args: [{
|
|
2474
2489
|
name: 'isNotNilOrBlank'
|
|
@@ -2480,7 +2495,7 @@ class IsNilOrBlankPipe {
|
|
|
2480
2495
|
return isNilOrBlank(value);
|
|
2481
2496
|
}
|
|
2482
2497
|
}
|
|
2483
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2498
|
+
IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2484
2499
|
IsNilOrBlankPipe.decorators = [
|
|
2485
2500
|
{ type: Pipe, args: [{
|
|
2486
2501
|
name: 'isNilOrBlank'
|
|
@@ -2492,7 +2507,7 @@ class ToStringPipe {
|
|
|
2492
2507
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2493
2508
|
}
|
|
2494
2509
|
}
|
|
2495
|
-
ToStringPipe.ɵprov =
|
|
2510
|
+
ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2496
2511
|
ToStringPipe.decorators = [
|
|
2497
2512
|
{ type: Pipe, args: [{
|
|
2498
2513
|
name: 'toString'
|
|
@@ -2504,7 +2519,7 @@ class StrLengthPipe {
|
|
|
2504
2519
|
return value && value.length || 0;
|
|
2505
2520
|
}
|
|
2506
2521
|
}
|
|
2507
|
-
StrLengthPipe.ɵprov =
|
|
2522
|
+
StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2508
2523
|
StrLengthPipe.decorators = [
|
|
2509
2524
|
{ type: Pipe, args: [{
|
|
2510
2525
|
name: 'strLength'
|
|
@@ -2581,7 +2596,7 @@ class TranslateContextService {
|
|
|
2581
2596
|
return translations[keys[keys.length - 1]]; // Return the last keys translation
|
|
2582
2597
|
}
|
|
2583
2598
|
}
|
|
2584
|
-
TranslateContextService.ɵprov =
|
|
2599
|
+
TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$1.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2585
2600
|
TranslateContextService.decorators = [
|
|
2586
2601
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2587
2602
|
];
|
|
@@ -2631,7 +2646,7 @@ class PropertyGetPipe {
|
|
|
2631
2646
|
args && args.defaultValue);
|
|
2632
2647
|
}
|
|
2633
2648
|
}
|
|
2634
|
-
PropertyGetPipe.ɵprov =
|
|
2649
|
+
PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2635
2650
|
PropertyGetPipe.decorators = [
|
|
2636
2651
|
{ type: Pipe, args: [{
|
|
2637
2652
|
name: 'propertyGet'
|
|
@@ -2656,7 +2671,7 @@ NgInitDirective.propDecorators = {
|
|
|
2656
2671
|
ngInit: [{ type: Output }]
|
|
2657
2672
|
};
|
|
2658
2673
|
|
|
2659
|
-
const moment$
|
|
2674
|
+
const moment$4 = momentImported;
|
|
2660
2675
|
// @dynamic
|
|
2661
2676
|
class SharedValidators {
|
|
2662
2677
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2673,7 +2688,7 @@ class SharedValidators {
|
|
|
2673
2688
|
}
|
|
2674
2689
|
static validDate(control) {
|
|
2675
2690
|
const value = control.value;
|
|
2676
|
-
const date = !value || moment$
|
|
2691
|
+
const date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
|
|
2677
2692
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2678
2693
|
return { validDate: true };
|
|
2679
2694
|
}
|
|
@@ -3747,7 +3762,7 @@ class FormErrorTranslator {
|
|
|
3747
3762
|
return errorKey;
|
|
3748
3763
|
}
|
|
3749
3764
|
}
|
|
3750
|
-
FormErrorTranslator.ɵprov =
|
|
3765
|
+
FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
3751
3766
|
FormErrorTranslator.decorators = [
|
|
3752
3767
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3753
3768
|
];
|
|
@@ -3903,26 +3918,56 @@ SharedPipesModule.decorators = [
|
|
|
3903
3918
|
},] }
|
|
3904
3919
|
];
|
|
3905
3920
|
|
|
3921
|
+
/* ---
|
|
3922
|
+
* Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
|
|
3923
|
+
* --- */
|
|
3924
|
+
const matchMedia = (win, query) => win.matchMedia(query).matches;
|
|
3925
|
+
const testUserAgent = (win, expr) => {
|
|
3926
|
+
const userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
3927
|
+
return expr.test(userAgent);
|
|
3928
|
+
};
|
|
3929
|
+
const isWindow = (win) => {
|
|
3930
|
+
const userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
3931
|
+
return /windows/i.test(userAgent);
|
|
3932
|
+
};
|
|
3933
|
+
/**
|
|
3934
|
+
* Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
|
|
3935
|
+
* @param win
|
|
3936
|
+
*/
|
|
3937
|
+
const isDesktop = (win) => matchMedia(win, '(any-pointer:fine)');
|
|
3938
|
+
const isTouchUi = (win) => matchMedia(win, '(any-pointer:coarse)');
|
|
3939
|
+
const isMobile = (win) => isTouchUi(win) && !isDesktop(win);
|
|
3940
|
+
const isIpad = (win) => {
|
|
3941
|
+
// iOS 12 and below
|
|
3942
|
+
if (testUserAgent(win, /iPad/i)) {
|
|
3943
|
+
return true;
|
|
3944
|
+
}
|
|
3945
|
+
// iOS 13+
|
|
3946
|
+
if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
|
|
3947
|
+
return true;
|
|
3948
|
+
}
|
|
3949
|
+
return false;
|
|
3950
|
+
};
|
|
3951
|
+
const ɵ0$b = isIpad;
|
|
3952
|
+
const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
|
|
3953
|
+
const isAndroid = (win) => testUserAgent(win, /android|sink/i);
|
|
3954
|
+
const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
|
|
3955
|
+
|
|
3906
3956
|
// Import the core angular services.
|
|
3907
3957
|
// ----------------------------------------------------------------------------------- //
|
|
3908
3958
|
// ----------------------------------------------------------------------------------- //
|
|
3909
3959
|
const BASE_TIMER_DELAY = 100;
|
|
3910
3960
|
class AutofocusDirective {
|
|
3911
3961
|
// I initialize the autofocus directive.
|
|
3912
|
-
constructor(elementRef,
|
|
3962
|
+
constructor(elementRef, keyboard) {
|
|
3913
3963
|
this.keyboard = keyboard;
|
|
3914
|
-
this.
|
|
3915
|
-
this.
|
|
3964
|
+
this._timer = null;
|
|
3965
|
+
this._elementRef = elementRef;
|
|
3916
3966
|
this.shouldFocusElement = '';
|
|
3917
|
-
this.
|
|
3967
|
+
this._timer = null;
|
|
3918
3968
|
this.timerDelay = BASE_TIMER_DELAY;
|
|
3919
|
-
|
|
3920
|
-
this.touchUi = platform.is('mobile') || platform.is('tablet');
|
|
3921
|
-
});
|
|
3969
|
+
this._mobile = isMobile(window);
|
|
3922
3970
|
}
|
|
3923
|
-
// ---
|
|
3924
|
-
// PUBLIC METHODS.
|
|
3925
|
-
// ---
|
|
3926
3971
|
// I get called once after the contents have been fully initialized.
|
|
3927
3972
|
ngAfterContentInit() {
|
|
3928
3973
|
// Because this directive can act on the stand-only "autofocus" attribute or
|
|
@@ -3957,29 +4002,26 @@ class AutofocusDirective {
|
|
|
3957
4002
|
ngOnDestroy() {
|
|
3958
4003
|
this.stopFocusWorkflow();
|
|
3959
4004
|
}
|
|
3960
|
-
|
|
3961
|
-
// PRIVATE METHODS.
|
|
3962
|
-
// ---
|
|
4005
|
+
/* --- private functions -- */
|
|
3963
4006
|
// I start the timer-based workflow that will focus the current element.
|
|
3964
4007
|
startFocusWorkflow() {
|
|
3965
4008
|
// if touch UI: do NOT focus when keyboard hide
|
|
3966
|
-
if (this.
|
|
4009
|
+
if (this._mobile && this.keyboard && this.keyboard.isVisible === false)
|
|
3967
4010
|
return;
|
|
3968
4011
|
// If there is already a timer running for this element, just let it play out -
|
|
3969
4012
|
// resetting it at this point will only push-out the time at which the focus is
|
|
3970
4013
|
// applied to the element.
|
|
3971
|
-
if (this.
|
|
4014
|
+
if (this._timer)
|
|
3972
4015
|
return;
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
this.
|
|
3976
|
-
this.elementRef.nativeElement.focus();
|
|
4016
|
+
this._timer = setTimeout(() => {
|
|
4017
|
+
this._timer = null;
|
|
4018
|
+
this._elementRef.nativeElement.focus();
|
|
3977
4019
|
}, this.timerDelay);
|
|
3978
4020
|
}
|
|
3979
4021
|
// I stop the timer-based workflow, preventing focus from taking place.
|
|
3980
4022
|
stopFocusWorkflow() {
|
|
3981
|
-
clearTimeout(this.
|
|
3982
|
-
this.
|
|
4023
|
+
clearTimeout(this._timer);
|
|
4024
|
+
this._timer = null;
|
|
3983
4025
|
}
|
|
3984
4026
|
}
|
|
3985
4027
|
AutofocusDirective.decorators = [
|
|
@@ -3993,7 +4035,6 @@ AutofocusDirective.decorators = [
|
|
|
3993
4035
|
];
|
|
3994
4036
|
AutofocusDirective.ctorParameters = () => [
|
|
3995
4037
|
{ type: ElementRef },
|
|
3996
|
-
{ type: Platform },
|
|
3997
4038
|
{ type: Keyboard, decorators: [{ type: Optional }] }
|
|
3998
4039
|
];
|
|
3999
4040
|
|
|
@@ -4099,9 +4140,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4099
4140
|
const hour = parseInt(durationParts[0] || '0');
|
|
4100
4141
|
const minute = parseInt(durationParts[1] || '0');
|
|
4101
4142
|
const value = hour + (minute + 0.5) / 60;
|
|
4102
|
-
return roundFloat
|
|
4143
|
+
return roundFloat(value, maxDecimals);
|
|
4103
4144
|
}
|
|
4104
|
-
function roundFloat
|
|
4145
|
+
function roundFloat(input, maxDecimals) {
|
|
4105
4146
|
if (maxDecimals > 0) {
|
|
4106
4147
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4107
4148
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4125,9 +4166,9 @@ const MASKS = {
|
|
|
4125
4166
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4126
4167
|
}
|
|
4127
4168
|
};
|
|
4128
|
-
const noop$
|
|
4169
|
+
const noop$7 = () => {
|
|
4129
4170
|
};
|
|
4130
|
-
const ɵ0$
|
|
4171
|
+
const ɵ0$a = noop$7;
|
|
4131
4172
|
class MatLatLongField {
|
|
4132
4173
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
4133
4174
|
this.platform = platform;
|
|
@@ -4135,8 +4176,8 @@ class MatLatLongField {
|
|
|
4135
4176
|
this.formBuilder = formBuilder;
|
|
4136
4177
|
this.cd = cd;
|
|
4137
4178
|
this.formGroupDir = formGroupDir;
|
|
4138
|
-
this._onChangeCallback = noop$
|
|
4139
|
-
this._onTouchedCallback = noop$
|
|
4179
|
+
this._onChangeCallback = noop$7;
|
|
4180
|
+
this._onTouchedCallback = noop$7;
|
|
4140
4181
|
this._subscription = new Subscription();
|
|
4141
4182
|
this.disabling = false;
|
|
4142
4183
|
this.writing = false;
|
|
@@ -4473,14 +4514,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4473
4514
|
},] }
|
|
4474
4515
|
];
|
|
4475
4516
|
|
|
4476
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
4517
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4477
4518
|
provide: NG_VALUE_ACCESSOR,
|
|
4478
4519
|
useExisting: forwardRef(() => MatDate),
|
|
4479
4520
|
multi: true
|
|
4480
4521
|
};
|
|
4481
|
-
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4482
|
-
const noop$
|
|
4483
|
-
const ɵ0$
|
|
4522
|
+
const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4523
|
+
const noop$6 = () => { };
|
|
4524
|
+
const ɵ0$9 = noop$6;
|
|
4484
4525
|
class MatDate {
|
|
4485
4526
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4486
4527
|
this.dateAdapter = dateAdapter;
|
|
@@ -4489,12 +4530,12 @@ class MatDate {
|
|
|
4489
4530
|
this.cd = cd;
|
|
4490
4531
|
this.keyboard = keyboard;
|
|
4491
4532
|
this.formGroupDir = formGroupDir;
|
|
4492
|
-
this._onChangeCallback = noop$
|
|
4493
|
-
this._onTouchedCallback = noop$
|
|
4533
|
+
this._onChangeCallback = noop$6;
|
|
4534
|
+
this._onTouchedCallback = noop$6;
|
|
4494
4535
|
this._subscription = new Subscription();
|
|
4495
4536
|
this.writing = true;
|
|
4496
4537
|
this.disabling = false;
|
|
4497
|
-
this.dayMask = DAY_MASK;
|
|
4538
|
+
this.dayMask = DAY_MASK$2;
|
|
4498
4539
|
this.disabled = false;
|
|
4499
4540
|
this.floatLabel = 'auto';
|
|
4500
4541
|
this.readonly = false;
|
|
@@ -4731,7 +4772,7 @@ MatDate.decorators = [
|
|
|
4731
4772
|
selector: 'mat-date-field',
|
|
4732
4773
|
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",
|
|
4733
4774
|
providers: [
|
|
4734
|
-
DEFAULT_VALUE_ACCESSOR,
|
|
4775
|
+
DEFAULT_VALUE_ACCESSOR$5,
|
|
4735
4776
|
],
|
|
4736
4777
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4737
4778
|
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%}"]
|
|
@@ -4764,17 +4805,17 @@ MatDate.propDecorators = {
|
|
|
4764
4805
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4765
4806
|
};
|
|
4766
4807
|
|
|
4767
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4808
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4768
4809
|
provide: NG_VALUE_ACCESSOR,
|
|
4769
4810
|
useExisting: forwardRef(() => MatDateTime),
|
|
4770
4811
|
multi: true
|
|
4771
4812
|
};
|
|
4772
4813
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4773
4814
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4774
|
-
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4775
|
-
const noop$
|
|
4815
|
+
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4816
|
+
const noop$5 = () => {
|
|
4776
4817
|
};
|
|
4777
|
-
const ɵ0$
|
|
4818
|
+
const ɵ0$8 = noop$5;
|
|
4778
4819
|
class MatDateTime {
|
|
4779
4820
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4780
4821
|
this.platform = platform;
|
|
@@ -4784,14 +4825,14 @@ class MatDateTime {
|
|
|
4784
4825
|
this.cd = cd;
|
|
4785
4826
|
this.keyboard = keyboard;
|
|
4786
4827
|
this.formGroupDir = formGroupDir;
|
|
4787
|
-
this._onChangeCallback = noop$
|
|
4788
|
-
this._onTouchedCallback = noop$
|
|
4828
|
+
this._onChangeCallback = noop$5;
|
|
4829
|
+
this._onTouchedCallback = noop$5;
|
|
4789
4830
|
this._subscription = new Subscription();
|
|
4790
4831
|
this.writing = true;
|
|
4791
4832
|
this.disabling = false;
|
|
4792
4833
|
this._readonly = false;
|
|
4793
4834
|
this.dayMask = DAY_MASK$1;
|
|
4794
|
-
this.hourMask = HOUR_MASK;
|
|
4835
|
+
this.hourMask = HOUR_MASK$1;
|
|
4795
4836
|
this.floatLabel = 'auto';
|
|
4796
4837
|
this.compact = false;
|
|
4797
4838
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5103,7 +5144,7 @@ MatDateTime.decorators = [
|
|
|
5103
5144
|
selector: 'mat-date-time-field',
|
|
5104
5145
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
5105
5146
|
providers: [
|
|
5106
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5147
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
5107
5148
|
],
|
|
5108
5149
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5109
5150
|
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%}"]
|
|
@@ -5137,15 +5178,15 @@ MatDateTime.propDecorators = {
|
|
|
5137
5178
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5138
5179
|
};
|
|
5139
5180
|
|
|
5140
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5181
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5141
5182
|
provide: NG_VALUE_ACCESSOR,
|
|
5142
5183
|
useExisting: forwardRef(() => MatDateShort),
|
|
5143
5184
|
multi: true
|
|
5144
5185
|
};
|
|
5145
|
-
const DAY_MASK
|
|
5186
|
+
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5146
5187
|
const noop$4 = () => {
|
|
5147
5188
|
};
|
|
5148
|
-
const ɵ0$
|
|
5189
|
+
const ɵ0$7 = noop$4;
|
|
5149
5190
|
class MatDateShort {
|
|
5150
5191
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5151
5192
|
this.dateAdapter = dateAdapter;
|
|
@@ -5158,7 +5199,7 @@ class MatDateShort {
|
|
|
5158
5199
|
this._onTouchedCallback = noop$4;
|
|
5159
5200
|
this.writing = true;
|
|
5160
5201
|
this.disabling = false;
|
|
5161
|
-
this.dayMask = DAY_MASK
|
|
5202
|
+
this.dayMask = DAY_MASK;
|
|
5162
5203
|
this.disabled = false;
|
|
5163
5204
|
this.floatLabel = 'auto';
|
|
5164
5205
|
this.readonly = false;
|
|
@@ -5403,7 +5444,7 @@ MatDateShort.decorators = [
|
|
|
5403
5444
|
selector: 'mat-date-short-field',
|
|
5404
5445
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_YEAR_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker1)\"\n (keyup.escape)=\"preventEvent($event)\"\n (click)=\"matInput.select()\"\n [required]=\"required\"\n [tabindex]=\"tabindex\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker1)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker1\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker1)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n\n <mat-datepicker #datePicker1\n startView=\"multi-year\"\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n (yearSelected)=\"closeDatePicker($event, datePicker1)\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n",
|
|
5405
5446
|
providers: [
|
|
5406
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5447
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
5407
5448
|
],
|
|
5408
5449
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5409
5450
|
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%}"]
|
|
@@ -5471,16 +5512,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5471
5512
|
},] }
|
|
5472
5513
|
];
|
|
5473
5514
|
|
|
5474
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5515
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5475
5516
|
provide: NG_VALUE_ACCESSOR,
|
|
5476
5517
|
useExisting: forwardRef(() => MatDuration),
|
|
5477
5518
|
multi: true
|
|
5478
5519
|
};
|
|
5479
5520
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5480
|
-
const HOUR_MASK
|
|
5481
|
-
const noop$
|
|
5521
|
+
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5522
|
+
const noop$3 = () => {
|
|
5482
5523
|
};
|
|
5483
|
-
const ɵ0$
|
|
5524
|
+
const ɵ0$6 = noop$3;
|
|
5484
5525
|
class MatDuration {
|
|
5485
5526
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5486
5527
|
this.dateAdapter = dateAdapter;
|
|
@@ -5489,11 +5530,11 @@ class MatDuration {
|
|
|
5489
5530
|
this.cd = cd;
|
|
5490
5531
|
this.formGroupDir = formGroupDir;
|
|
5491
5532
|
this._subscription = new Subscription();
|
|
5492
|
-
this._onChangeCallback = noop$
|
|
5493
|
-
this._onTouchedCallback = noop$
|
|
5533
|
+
this._onChangeCallback = noop$3;
|
|
5534
|
+
this._onTouchedCallback = noop$3;
|
|
5494
5535
|
this.writing = true;
|
|
5495
5536
|
this.disabling = false;
|
|
5496
|
-
this.hourMask = HOUR_MASK
|
|
5537
|
+
this.hourMask = HOUR_MASK;
|
|
5497
5538
|
this.disabled = false;
|
|
5498
5539
|
this.floatLabel = 'auto';
|
|
5499
5540
|
this.readonly = false;
|
|
@@ -5673,7 +5714,7 @@ MatDuration.decorators = [
|
|
|
5673
5714
|
selector: 'mat-duration-field',
|
|
5674
5715
|
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",
|
|
5675
5716
|
providers: [
|
|
5676
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5717
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5677
5718
|
],
|
|
5678
5719
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5679
5720
|
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%}"]
|
|
@@ -5730,22 +5771,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5730
5771
|
},] }
|
|
5731
5772
|
];
|
|
5732
5773
|
|
|
5733
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5774
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5734
5775
|
provide: NG_VALUE_ACCESSOR,
|
|
5735
5776
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5736
5777
|
multi: true
|
|
5737
5778
|
};
|
|
5738
|
-
const noop$
|
|
5779
|
+
const noop$2 = () => {
|
|
5739
5780
|
};
|
|
5740
|
-
const ɵ0$
|
|
5781
|
+
const ɵ0$5 = noop$2;
|
|
5741
5782
|
class MatBooleanField {
|
|
5742
5783
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5743
5784
|
this.translate = translate;
|
|
5744
5785
|
this.formBuilder = formBuilder;
|
|
5745
5786
|
this.cd = cd;
|
|
5746
5787
|
this.formGroupDir = formGroupDir;
|
|
5747
|
-
this._onChangeCallback = noop$
|
|
5748
|
-
this._onTouchedCallback = noop$
|
|
5788
|
+
this._onChangeCallback = noop$2;
|
|
5789
|
+
this._onTouchedCallback = noop$2;
|
|
5749
5790
|
this._writing = false;
|
|
5750
5791
|
this.showRadio = false;
|
|
5751
5792
|
this.disabled = false;
|
|
@@ -5908,7 +5949,7 @@ MatBooleanField.decorators = [
|
|
|
5908
5949
|
selector: 'mat-boolean-field',
|
|
5909
5950
|
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value == null && 'COMMON.EMPTY_OPTION' || (formControl.value === true && yesLabel) || noLabel) | translate }}</ion-text>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio {{classList}}\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{yesLabel|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span>{{yesLabel|translate}}</span>\n </mat-radio-button> \n <mat-radio-button #noButton [value]=\"false\">\n <span>{{noLabel|translate}}</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox {{classList}}\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label> </ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button {{classList}}\">\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <div class=\"mat-form-field-buttons\"\n [style.--buttons-col-count]=\"buttonsColCount\"\n *ngIf=\"!formControl.disabled; else disabledLabel\">\n <!-- yes -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === true) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && yesIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{yesLabel|translate}}\n </ion-button>\n\n <!-- No button -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex !== undefined ? (_tabindex + 1) : undefined\"\n (click)=\"writeValue(false, $event)\"\n (keyup.enter)=\"writeValue(false, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === false) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && noIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{noLabel|translate}}\n </ion-button>\n </div>\n <ng-template #disabledLabel>\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ng-template>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n<ng-template #matSuffixTemplate>\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
5910
5951
|
providers: [
|
|
5911
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5952
|
+
DEFAULT_VALUE_ACCESSOR$1
|
|
5912
5953
|
],
|
|
5913
5954
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5914
5955
|
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}"]
|
|
@@ -6154,7 +6195,7 @@ class MatNumpadDomService {
|
|
|
6154
6195
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6155
6196
|
}
|
|
6156
6197
|
}
|
|
6157
|
-
MatNumpadDomService.ɵprov =
|
|
6198
|
+
MatNumpadDomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$3.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
6158
6199
|
MatNumpadDomService.decorators = [
|
|
6159
6200
|
{ type: Injectable, args: [{
|
|
6160
6201
|
providedIn: 'root'
|
|
@@ -6518,7 +6559,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6518
6559
|
},] }
|
|
6519
6560
|
];
|
|
6520
6561
|
|
|
6521
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
6562
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
6522
6563
|
provide: NG_VALUE_ACCESSOR,
|
|
6523
6564
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6524
6565
|
multi: true
|
|
@@ -6781,7 +6822,7 @@ MatSwipeField.decorators = [
|
|
|
6781
6822
|
{ type: Component, args: [{
|
|
6782
6823
|
selector: 'mat-swipe-field',
|
|
6783
6824
|
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",
|
|
6784
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
6825
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6785
6826
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6786
6827
|
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}"]
|
|
6787
6828
|
},] }
|
|
@@ -6839,14 +6880,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
6839
6880
|
},] }
|
|
6840
6881
|
];
|
|
6841
6882
|
|
|
6842
|
-
const noop$
|
|
6843
|
-
const ɵ0$
|
|
6883
|
+
const noop$1 = () => { };
|
|
6884
|
+
const ɵ0$4 = noop$1;
|
|
6844
6885
|
class MatChipsField {
|
|
6845
6886
|
constructor(cd, formGroupDir) {
|
|
6846
6887
|
this.cd = cd;
|
|
6847
6888
|
this.formGroupDir = formGroupDir;
|
|
6848
|
-
this._onChangeCallback = noop$
|
|
6849
|
-
this._onTouchedCallback = noop$
|
|
6889
|
+
this._onChangeCallback = noop$1;
|
|
6890
|
+
this._onTouchedCallback = noop$1;
|
|
6850
6891
|
this.logPrefix = '[mat-chips] ';
|
|
6851
6892
|
this.formControlName = null;
|
|
6852
6893
|
this.required = false;
|
|
@@ -7715,7 +7756,7 @@ class ProgressBarService {
|
|
|
7715
7756
|
}
|
|
7716
7757
|
}
|
|
7717
7758
|
}
|
|
7718
|
-
ProgressBarService.ɵprov =
|
|
7759
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7719
7760
|
ProgressBarService.decorators = [
|
|
7720
7761
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7721
7762
|
];
|
|
@@ -7759,7 +7800,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7759
7800
|
return mc;
|
|
7760
7801
|
}
|
|
7761
7802
|
}
|
|
7762
|
-
AppGestureConfig.ɵprov =
|
|
7803
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7763
7804
|
AppGestureConfig.decorators = [
|
|
7764
7805
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7765
7806
|
];
|
|
@@ -7984,7 +8025,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7984
8025
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7985
8026
|
}
|
|
7986
8027
|
}
|
|
7987
|
-
MatPaginatorI18n.ɵprov =
|
|
8028
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7988
8029
|
MatPaginatorI18n.decorators = [
|
|
7989
8030
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7990
8031
|
];
|
|
@@ -8074,17 +8115,17 @@ function getColorContrast(color, bw) {
|
|
|
8074
8115
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
8075
8116
|
}
|
|
8076
8117
|
|
|
8077
|
-
const noop
|
|
8118
|
+
const noop = () => {
|
|
8078
8119
|
};
|
|
8079
|
-
const ɵ0$
|
|
8120
|
+
const ɵ0$3 = noop;
|
|
8080
8121
|
class AppFormField {
|
|
8081
8122
|
constructor(translate, cd, injector, formGroupDir) {
|
|
8082
8123
|
this.translate = translate;
|
|
8083
8124
|
this.cd = cd;
|
|
8084
8125
|
this.injector = injector;
|
|
8085
8126
|
this.formGroupDir = formGroupDir;
|
|
8086
|
-
this._onChangeCallback = noop
|
|
8087
|
-
this._onTouchedCallback = noop
|
|
8127
|
+
this._onChangeCallback = noop;
|
|
8128
|
+
this._onTouchedCallback = noop;
|
|
8088
8129
|
this.readonly = false;
|
|
8089
8130
|
this.compact = false;
|
|
8090
8131
|
this.floatLabel = 'auto';
|
|
@@ -8517,14 +8558,14 @@ class AudioProvider extends StartableService {
|
|
|
8517
8558
|
});
|
|
8518
8559
|
}
|
|
8519
8560
|
}
|
|
8520
|
-
AudioProvider.ɵprov =
|
|
8561
|
+
AudioProvider.ɵprov = i0.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2.NativeAudio, 8), i0.ɵɵinject(i3.Vibration, 8), i0.ɵɵinject(i4.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
|
|
8521
8562
|
AudioProvider.decorators = [
|
|
8522
8563
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8523
8564
|
];
|
|
8524
8565
|
AudioProvider.ctorParameters = () => [
|
|
8525
8566
|
{ type: Platform },
|
|
8526
|
-
{ type: NativeAudio
|
|
8527
|
-
{ type: Vibration
|
|
8567
|
+
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
8568
|
+
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
8528
8569
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
8529
8570
|
];
|
|
8530
8571
|
|
|
@@ -8606,7 +8647,7 @@ class Hotkeys {
|
|
|
8606
8647
|
});
|
|
8607
8648
|
}
|
|
8608
8649
|
}
|
|
8609
|
-
Hotkeys.ɵprov =
|
|
8650
|
+
Hotkeys.ɵprov = i0.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0.ɵɵinject(i1$5.EventManager), i0.ɵɵinject(i2$1.MatDialog), i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
8610
8651
|
Hotkeys.decorators = [
|
|
8611
8652
|
{ type: Injectable, args: [{
|
|
8612
8653
|
providedIn: 'root'
|
|
@@ -8780,7 +8821,7 @@ class Base64ImageReader {
|
|
|
8780
8821
|
}
|
|
8781
8822
|
}
|
|
8782
8823
|
|
|
8783
|
-
const uuidv4 = uuidv4Imported;
|
|
8824
|
+
const uuidv4$1 = uuidv4Imported;
|
|
8784
8825
|
class FileService {
|
|
8785
8826
|
constructor(platform,
|
|
8786
8827
|
//private transfer: FileTransfer,
|
|
@@ -8817,7 +8858,7 @@ class FileService {
|
|
|
8817
8858
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8818
8859
|
if (lastSlashIndex === -1)
|
|
8819
8860
|
throw new Error('Invalid URL: ' + source);
|
|
8820
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8861
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
8821
8862
|
// Download into the file system
|
|
8822
8863
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8823
8864
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8873,7 +8914,7 @@ class FileService {
|
|
|
8873
8914
|
this._started = true;
|
|
8874
8915
|
}
|
|
8875
8916
|
}
|
|
8876
|
-
FileService.ɵprov =
|
|
8917
|
+
FileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
8877
8918
|
FileService.decorators = [
|
|
8878
8919
|
{ type: Injectable, args: [{
|
|
8879
8920
|
providedIn: 'root',
|
|
@@ -9039,7 +9080,7 @@ class Base58 {
|
|
|
9039
9080
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9040
9081
|
|
|
9041
9082
|
const scrypt = require('scrypt-async');
|
|
9042
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
9083
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
9043
9084
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
9044
9085
|
const nacl = {
|
|
9045
9086
|
sign,
|
|
@@ -9143,7 +9184,7 @@ class CryptoService {
|
|
|
9143
9184
|
* Hash (using SHA256) a message
|
|
9144
9185
|
*/
|
|
9145
9186
|
sha256(message) {
|
|
9146
|
-
return sha256().update(message).digest('hex');
|
|
9187
|
+
return sha256$1().update(message).digest('hex');
|
|
9147
9188
|
}
|
|
9148
9189
|
/**
|
|
9149
9190
|
* Hash (using SHA512) a message
|
|
@@ -9156,7 +9197,7 @@ class CryptoService {
|
|
|
9156
9197
|
return nacl.util.encodeBase64(m);
|
|
9157
9198
|
}
|
|
9158
9199
|
}
|
|
9159
|
-
CryptoService.ɵprov =
|
|
9200
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9160
9201
|
CryptoService.decorators = [
|
|
9161
9202
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9162
9203
|
];
|
|
@@ -9965,7 +10006,7 @@ SelectPeerModal.propDecorators = {
|
|
|
9965
10006
|
|
|
9966
10007
|
const moment$3 = momentImported;
|
|
9967
10008
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
9968
|
-
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi'];
|
|
10009
|
+
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
9969
10010
|
// fixme: this constant points to static environment
|
|
9970
10011
|
const DEFAULT_SETTINGS = {
|
|
9971
10012
|
accountInheritance: true,
|
|
@@ -10001,29 +10042,32 @@ class LocalSettingsService extends StartableService {
|
|
|
10001
10042
|
return this._data && this._data.latLongFormat || 'DDMM';
|
|
10002
10043
|
}
|
|
10003
10044
|
get usageMode() {
|
|
10004
|
-
|
|
10045
|
+
var _a;
|
|
10046
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
|
|
10047
|
+
console.warn("[settings] Accessing to property 'usageMode' BEFORE service started! Please use ready()");
|
|
10048
|
+
return isCordova(window) ? 'FIELD' : 'DESK';
|
|
10049
|
+
}
|
|
10050
|
+
return this._data.usageMode;
|
|
10005
10051
|
}
|
|
10006
10052
|
get mobile() {
|
|
10007
|
-
|
|
10053
|
+
var _a;
|
|
10054
|
+
if (isNil((_a = this._data) === null || _a === void 0 ? void 0 : _a.mobile)) {
|
|
10055
|
+
console.warn("[settings] Accessing to property 'mobile' BEFORE service started! Please use ready()");
|
|
10056
|
+
return isMobile(window);
|
|
10057
|
+
}
|
|
10058
|
+
return this._data.mobile;
|
|
10008
10059
|
}
|
|
10009
10060
|
set mobile(value) {
|
|
10010
10061
|
this._data.mobile = value;
|
|
10011
10062
|
}
|
|
10012
|
-
get touchUi() {
|
|
10013
|
-
return this._data.touchUi;
|
|
10014
|
-
}
|
|
10015
|
-
set touchUi(value) {
|
|
10016
|
-
this._data.touchUi = value;
|
|
10017
|
-
}
|
|
10018
10063
|
get pageHistory() {
|
|
10019
10064
|
return (this._data && this._data.pageHistory || []);
|
|
10020
10065
|
}
|
|
10021
10066
|
ngOnStart() {
|
|
10022
10067
|
console.info('[settings] Starting service...');
|
|
10023
10068
|
// Restoring local settings
|
|
10024
|
-
this._data.mobile =
|
|
10025
|
-
this._data.
|
|
10026
|
-
this._data.usageMode = this.platform.is('android') || this.platform.is('ios') ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOs
|
|
10069
|
+
this._data.mobile = isNotNil(this._data.mobile) ? this._data.mobile : isMobile(window);
|
|
10070
|
+
this._data.usageMode = (isAndroid(window) || isIOS(window)) ? 'FIELD' : 'DESK'; // FIELD by default if Android or iOS
|
|
10027
10071
|
// Restoring local settings
|
|
10028
10072
|
return this.restoreLocally();
|
|
10029
10073
|
}
|
|
@@ -10384,7 +10428,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10384
10428
|
return page;
|
|
10385
10429
|
}
|
|
10386
10430
|
}
|
|
10387
|
-
LocalSettingsService.ɵprov =
|
|
10431
|
+
LocalSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
|
|
10388
10432
|
LocalSettingsService.decorators = [
|
|
10389
10433
|
{ type: Injectable, args: [{
|
|
10390
10434
|
providedIn: 'root',
|
|
@@ -11042,7 +11086,7 @@ class NetworkService extends StartableService {
|
|
|
11042
11086
|
});
|
|
11043
11087
|
}
|
|
11044
11088
|
}
|
|
11045
|
-
NetworkService.ɵprov =
|
|
11089
|
+
NetworkService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(CryptoService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i9.Network, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i1$1.TranslateService, 8), i0.ɵɵinject(i1$4.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
|
|
11046
11090
|
NetworkService.decorators = [
|
|
11047
11091
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11048
11092
|
];
|
|
@@ -11053,16 +11097,16 @@ NetworkService.ctorParameters = () => [
|
|
|
11053
11097
|
{ type: CryptoService },
|
|
11054
11098
|
{ type: Storage },
|
|
11055
11099
|
{ type: LocalSettingsService },
|
|
11056
|
-
{ type: CacheService
|
|
11100
|
+
{ type: CacheService },
|
|
11057
11101
|
{ type: HttpClient },
|
|
11058
11102
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
11059
|
-
{ type: Network
|
|
11060
|
-
{ type: SplashScreen
|
|
11103
|
+
{ type: Network, decorators: [{ type: Optional }] },
|
|
11104
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
11061
11105
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
11062
11106
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
11063
11107
|
];
|
|
11064
11108
|
|
|
11065
|
-
const ErrorCodes = {
|
|
11109
|
+
const ErrorCodes$2 = {
|
|
11066
11110
|
UNKNOWN_ERROR: 0,
|
|
11067
11111
|
LOAD_ACCOUNT_ERROR: 1,
|
|
11068
11112
|
BAD_PASSWORD: 2,
|
|
@@ -11414,7 +11458,7 @@ class EntityStore {
|
|
|
11414
11458
|
}
|
|
11415
11459
|
catch (err) {
|
|
11416
11460
|
console.error(err);
|
|
11417
|
-
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11461
|
+
throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11418
11462
|
}
|
|
11419
11463
|
}
|
|
11420
11464
|
// Emit update event
|
|
@@ -11988,7 +12032,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11988
12032
|
}
|
|
11989
12033
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11990
12034
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11991
|
-
EntitiesStorage.ɵprov =
|
|
12035
|
+
EntitiesStorage.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(ProgressBarService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
|
|
11992
12036
|
EntitiesStorage.decorators = [
|
|
11993
12037
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11994
12038
|
];
|
|
@@ -12125,10 +12169,10 @@ function referentialToString(obj, properties) {
|
|
|
12125
12169
|
function referentialsToString(values, properties, separator) {
|
|
12126
12170
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12127
12171
|
}
|
|
12128
|
-
const ɵ0$
|
|
12172
|
+
const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12129
12173
|
const StatusList = Object.freeze([
|
|
12130
12174
|
{
|
|
12131
|
-
id: ɵ0$
|
|
12175
|
+
id: ɵ0$2,
|
|
12132
12176
|
icon: 'checkmark',
|
|
12133
12177
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12134
12178
|
},
|
|
@@ -12403,7 +12447,7 @@ function accountToString(data) {
|
|
|
12403
12447
|
(data.lastName || '')) || '';
|
|
12404
12448
|
}
|
|
12405
12449
|
|
|
12406
|
-
const uuidv4
|
|
12450
|
+
const uuidv4 = uuidv4Imported;
|
|
12407
12451
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12408
12452
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12409
12453
|
/**
|
|
@@ -12447,7 +12491,7 @@ function createTrackerLink(opts) {
|
|
|
12447
12491
|
// Skip if not tracked
|
|
12448
12492
|
if (!context || !context.tracked)
|
|
12449
12493
|
return forward(operation);
|
|
12450
|
-
const id = context.serializationKey || uuidv4
|
|
12494
|
+
const id = context.serializationKey || uuidv4();
|
|
12451
12495
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12452
12496
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12453
12497
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -13112,7 +13156,7 @@ class GraphqlService extends StartableService {
|
|
|
13112
13156
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
13113
13157
|
|| this.toAppError(err.networkError)
|
|
13114
13158
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
13115
|
-
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
13159
|
+
|| this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
|
|
13116
13160
|
// If graphQL: try to convert the first error found
|
|
13117
13161
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
13118
13162
|
|| this.toAppError(err)
|
|
@@ -13120,7 +13164,7 @@ class GraphqlService extends StartableService {
|
|
|
13120
13164
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
13121
13165
|
|| err;
|
|
13122
13166
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
13123
|
-
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13167
|
+
if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13124
13168
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
13125
13169
|
this.onNetworkError.next(error);
|
|
13126
13170
|
}
|
|
@@ -13156,7 +13200,7 @@ class GraphqlService extends StartableService {
|
|
|
13156
13200
|
return 'ERROR.UNAUTHORIZED';
|
|
13157
13201
|
case ServerErrorCodes.FORBIDDEN:
|
|
13158
13202
|
return 'ERROR.FORBIDDEN';
|
|
13159
|
-
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13203
|
+
case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
|
|
13160
13204
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13161
13205
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13162
13206
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13187,7 +13231,7 @@ class GraphqlService extends StartableService {
|
|
|
13187
13231
|
return undefined;
|
|
13188
13232
|
}
|
|
13189
13233
|
}
|
|
13190
|
-
GraphqlService.ɵprov =
|
|
13234
|
+
GraphqlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$3.Apollo), i0.ɵɵinject(i3$2.HttpLink), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(CryptoService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
|
|
13191
13235
|
GraphqlService.decorators = [
|
|
13192
13236
|
{ type: Injectable, args: [{
|
|
13193
13237
|
providedIn: 'root'
|
|
@@ -13204,7 +13248,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13204
13248
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13205
13249
|
];
|
|
13206
13250
|
|
|
13207
|
-
const sha256
|
|
13251
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13208
13252
|
class BaseGraphqlServiceOptions {
|
|
13209
13253
|
}
|
|
13210
13254
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13355,8 +13399,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13355
13399
|
}
|
|
13356
13400
|
/* -- protected methods -- */
|
|
13357
13401
|
computeMutableWatchQueryId(opts) {
|
|
13358
|
-
const queryName = opts.queryName || sha256
|
|
13359
|
-
const variablesKey = opts.variables && sha256
|
|
13402
|
+
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13403
|
+
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13360
13404
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13361
13405
|
}
|
|
13362
13406
|
findMutableWatchQueries(opts) {
|
|
@@ -13422,7 +13466,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13422
13466
|
/* ------------------------------------
|
|
13423
13467
|
* GraphQL queries
|
|
13424
13468
|
* ------------------------------------*/
|
|
13425
|
-
const Fragments = {
|
|
13469
|
+
const Fragments$1 = {
|
|
13426
13470
|
account: gql `
|
|
13427
13471
|
fragment AccountFragment on AccountVO {
|
|
13428
13472
|
id
|
|
@@ -13457,14 +13501,14 @@ const Fragments = {
|
|
|
13457
13501
|
}`
|
|
13458
13502
|
};
|
|
13459
13503
|
// Load account query
|
|
13460
|
-
const LoadQuery = gql `
|
|
13504
|
+
const LoadQuery$1 = gql `
|
|
13461
13505
|
query Account {
|
|
13462
13506
|
data: account {
|
|
13463
13507
|
...AccountFragment
|
|
13464
13508
|
}
|
|
13465
13509
|
}
|
|
13466
|
-
${Fragments.account}
|
|
13467
|
-
${Fragments.settings}
|
|
13510
|
+
${Fragments$1.account}
|
|
13511
|
+
${Fragments$1.settings}
|
|
13468
13512
|
`;
|
|
13469
13513
|
// Check email query
|
|
13470
13514
|
const IsEmailExistsQuery = gql `
|
|
@@ -13479,21 +13523,21 @@ const AccountMutations = {
|
|
|
13479
13523
|
...AccountFragment
|
|
13480
13524
|
}
|
|
13481
13525
|
}
|
|
13482
|
-
${Fragments.account}
|
|
13483
|
-
${Fragments.settings}`,
|
|
13526
|
+
${Fragments$1.account}
|
|
13527
|
+
${Fragments$1.settings}`,
|
|
13484
13528
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
13485
13529
|
data: createAccount(account: $data){
|
|
13486
13530
|
...AccountFragment
|
|
13487
13531
|
}
|
|
13488
13532
|
}
|
|
13489
|
-
${Fragments.account}
|
|
13490
|
-
${Fragments.settings}`,
|
|
13533
|
+
${Fragments$1.account}
|
|
13534
|
+
${Fragments$1.settings}`,
|
|
13491
13535
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
13492
13536
|
data: saveSettings(settings: $data){
|
|
13493
13537
|
...UserSettingsFragment
|
|
13494
13538
|
}
|
|
13495
13539
|
}
|
|
13496
|
-
${Fragments.settings}`
|
|
13540
|
+
${Fragments$1.settings}`
|
|
13497
13541
|
};
|
|
13498
13542
|
// Sent confirmation email
|
|
13499
13543
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13546,6 +13590,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13546
13590
|
this.onChange = new Subject();
|
|
13547
13591
|
this.onAuthTokenChange = new Subject();
|
|
13548
13592
|
this.onAuthBasicChange = new Subject();
|
|
13593
|
+
this._stopWatching$ = new Subject();
|
|
13549
13594
|
this._cache = {
|
|
13550
13595
|
loaded: false,
|
|
13551
13596
|
keypair: null,
|
|
@@ -13802,7 +13847,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13802
13847
|
catch (error) {
|
|
13803
13848
|
console.error(error);
|
|
13804
13849
|
this.resetData();
|
|
13805
|
-
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13850
|
+
throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13806
13851
|
}
|
|
13807
13852
|
// Store pubkey+keypair
|
|
13808
13853
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13836,7 +13881,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13836
13881
|
}
|
|
13837
13882
|
catch (err) {
|
|
13838
13883
|
// If account not found, check if email is valid
|
|
13839
|
-
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13884
|
+
if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
|
|
13840
13885
|
// Check email exists
|
|
13841
13886
|
if (data.username.indexOf('@') !== -1) {
|
|
13842
13887
|
let isEmailExists;
|
|
@@ -13848,11 +13893,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13848
13893
|
}
|
|
13849
13894
|
// Email not exists (no account)
|
|
13850
13895
|
if (!isEmailExists) {
|
|
13851
|
-
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13896
|
+
throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13852
13897
|
}
|
|
13853
13898
|
}
|
|
13854
13899
|
// Email exists, so error = 'bad password'
|
|
13855
|
-
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13900
|
+
throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13856
13901
|
}
|
|
13857
13902
|
throw err; // resend the first error
|
|
13858
13903
|
}
|
|
@@ -13948,6 +13993,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13948
13993
|
if (hadAuthBasic)
|
|
13949
13994
|
this.onAuthBasicChange.next(undefined);
|
|
13950
13995
|
this.onChange.next(undefined);
|
|
13996
|
+
this._stopWatching$.next();
|
|
13951
13997
|
});
|
|
13952
13998
|
}
|
|
13953
13999
|
/**
|
|
@@ -13977,8 +14023,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13977
14023
|
// Load remotely
|
|
13978
14024
|
else {
|
|
13979
14025
|
const { data } = yield this.graphql.query({
|
|
13980
|
-
query: LoadQuery,
|
|
13981
|
-
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
14026
|
+
query: LoadQuery$1,
|
|
14027
|
+
error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13982
14028
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13983
14029
|
});
|
|
13984
14030
|
json = data;
|
|
@@ -14005,7 +14051,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14005
14051
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14006
14052
|
const isEmailExists = yield this.isEmailExists(email);
|
|
14007
14053
|
if (isEmailExists) {
|
|
14008
|
-
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14054
|
+
throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14009
14055
|
}
|
|
14010
14056
|
});
|
|
14011
14057
|
}
|
|
@@ -14041,7 +14087,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14041
14087
|
locale
|
|
14042
14088
|
},
|
|
14043
14089
|
error: {
|
|
14044
|
-
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14090
|
+
code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14045
14091
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
14046
14092
|
}
|
|
14047
14093
|
});
|
|
@@ -14057,56 +14103,65 @@ class AccountService extends BaseGraphqlService {
|
|
|
14057
14103
|
code
|
|
14058
14104
|
},
|
|
14059
14105
|
error: {
|
|
14060
|
-
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
14106
|
+
code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
|
|
14061
14107
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
14062
14108
|
}
|
|
14063
14109
|
});
|
|
14064
14110
|
return res && res.confirmAccountEmail;
|
|
14065
14111
|
});
|
|
14066
14112
|
}
|
|
14067
|
-
|
|
14113
|
+
watch() {
|
|
14068
14114
|
if (!this._cache.pubkey)
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
14115
|
+
throw new Error('Not logged in');
|
|
14116
|
+
if (!this.started) {
|
|
14117
|
+
// Wait service ready, then loop
|
|
14118
|
+
return from(this.ready())
|
|
14119
|
+
.pipe(switchMap(() => this.watch()));
|
|
14120
|
+
}
|
|
14121
|
+
this._stopWatching$.next(); // Stop previous listening
|
|
14122
|
+
console.debug('[account] [WS] Watching changes');
|
|
14123
|
+
return this.graphql.subscribe({
|
|
14073
14124
|
query: AccountSubscriptions.listenChanges,
|
|
14074
14125
|
variables: {
|
|
14075
14126
|
interval: 10
|
|
14076
14127
|
},
|
|
14077
14128
|
error: {
|
|
14078
|
-
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
14129
|
+
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
14079
14130
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
14080
14131
|
}
|
|
14081
|
-
})
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
})
|
|
14092
|
-
|
|
14132
|
+
})
|
|
14133
|
+
.pipe(
|
|
14134
|
+
// Stop this pipe next time we call watch()
|
|
14135
|
+
takeUntil(this._stopWatching$), map(({ data }) => {
|
|
14136
|
+
var _a;
|
|
14137
|
+
if (!data)
|
|
14138
|
+
return;
|
|
14139
|
+
const existingUpdateDate = toDateISOString((_a = this._data) === null || _a === void 0 ? void 0 : _a.updateDate);
|
|
14140
|
+
if (existingUpdateDate === data.updateDate)
|
|
14141
|
+
return;
|
|
14142
|
+
console.debug(`[account] [WS] Detected update on {${data.updateDate}}`);
|
|
14143
|
+
return Account.fromObject(data);
|
|
14144
|
+
}), filter(isNotNil));
|
|
14145
|
+
}
|
|
14146
|
+
listenChanges() {
|
|
14147
|
+
const self = this;
|
|
14148
|
+
const subscription = this.watch()
|
|
14149
|
+
.subscribe({
|
|
14150
|
+
next: (data) => self.refresh(),
|
|
14151
|
+
error: (err) => {
|
|
14093
14152
|
if (err && +err.code === ServerErrorCodes.NOT_FOUND) {
|
|
14094
14153
|
console.info('[account] Account not exists anymore: force user to logout...', err);
|
|
14095
|
-
|
|
14154
|
+
self.logout();
|
|
14096
14155
|
}
|
|
14097
14156
|
else if (err && +err.code === ServerErrorCodes.UNAUTHORIZED) {
|
|
14098
14157
|
console.info('[account] Account not authorized: force user to logout...', err);
|
|
14099
|
-
|
|
14158
|
+
self.logout();
|
|
14100
14159
|
}
|
|
14101
14160
|
else {
|
|
14102
14161
|
console.warn('[account] [WS] Received error:', err);
|
|
14103
14162
|
}
|
|
14104
|
-
}),
|
|
14105
|
-
complete: () => {
|
|
14106
|
-
console.debug('[account] [WS] Completed');
|
|
14107
14163
|
}
|
|
14108
14164
|
});
|
|
14109
|
-
// Add log when closing WS
|
|
14110
14165
|
subscription.add(() => console.debug('[account] [WS] Stop listening changes'));
|
|
14111
14166
|
return subscription;
|
|
14112
14167
|
}
|
|
@@ -14176,7 +14231,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14176
14231
|
throw error;
|
|
14177
14232
|
console.error(error);
|
|
14178
14233
|
throw {
|
|
14179
|
-
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14234
|
+
code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
|
|
14180
14235
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14181
14236
|
};
|
|
14182
14237
|
}
|
|
@@ -14344,7 +14399,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14344
14399
|
if (!isNew) {
|
|
14345
14400
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14346
14401
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14347
|
-
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14402
|
+
throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14348
14403
|
}
|
|
14349
14404
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14350
14405
|
}
|
|
@@ -14356,7 +14411,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14356
14411
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14357
14412
|
variables: { data: json },
|
|
14358
14413
|
error: {
|
|
14359
|
-
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14414
|
+
code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
|
|
14360
14415
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14361
14416
|
}
|
|
14362
14417
|
});
|
|
@@ -14383,7 +14438,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14383
14438
|
mutation: AccountMutations.saveSettings,
|
|
14384
14439
|
variables: { data: json },
|
|
14385
14440
|
error: {
|
|
14386
|
-
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14441
|
+
code: ErrorCodes$2.SAVE_SETTINGS_ERROR,
|
|
14387
14442
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14388
14443
|
}
|
|
14389
14444
|
});
|
|
@@ -14405,7 +14460,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14405
14460
|
if (counter > 4) {
|
|
14406
14461
|
if (this._debug)
|
|
14407
14462
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14408
|
-
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14463
|
+
throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14409
14464
|
}
|
|
14410
14465
|
// Check if valid
|
|
14411
14466
|
if (token) {
|
|
@@ -14415,7 +14470,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14415
14470
|
token
|
|
14416
14471
|
},
|
|
14417
14472
|
error: {
|
|
14418
|
-
code: ErrorCodes.UNAUTHORIZED,
|
|
14473
|
+
code: ErrorCodes$2.UNAUTHORIZED,
|
|
14419
14474
|
message: 'ERROR.UNAUTHORIZED'
|
|
14420
14475
|
},
|
|
14421
14476
|
fetchPolicy: 'no-cache'
|
|
@@ -14431,7 +14486,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14431
14486
|
}
|
|
14432
14487
|
// Generate a new token
|
|
14433
14488
|
const challengeError = {
|
|
14434
|
-
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14489
|
+
code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
|
|
14435
14490
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14436
14491
|
};
|
|
14437
14492
|
const data = yield this.graphql.query({
|
|
@@ -14470,7 +14525,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14470
14525
|
target.updateDate = source.updateDate || target.updateDate;
|
|
14471
14526
|
}
|
|
14472
14527
|
}
|
|
14473
|
-
AccountService.ɵprov =
|
|
14528
|
+
AccountService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(i0.ɵɵinject(CryptoService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(FileService), i0.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
14474
14529
|
AccountService.decorators = [
|
|
14475
14530
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14476
14531
|
];
|
|
@@ -14730,7 +14785,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
14730
14785
|
/* ------------------------------------
|
|
14731
14786
|
* GraphQL queries
|
|
14732
14787
|
* ------------------------------------*/
|
|
14733
|
-
const Fragments
|
|
14788
|
+
const Fragments = {
|
|
14734
14789
|
config: gql `
|
|
14735
14790
|
fragment ConfigFragment on ConfigurationVO {
|
|
14736
14791
|
id
|
|
@@ -14757,13 +14812,13 @@ const Fragments$1 = {
|
|
|
14757
14812
|
}
|
|
14758
14813
|
`
|
|
14759
14814
|
};
|
|
14760
|
-
const LoadQuery
|
|
14815
|
+
const LoadQuery = gql `
|
|
14761
14816
|
query Configuration{
|
|
14762
14817
|
data: configuration{
|
|
14763
14818
|
...ConfigFragment
|
|
14764
14819
|
}
|
|
14765
14820
|
}
|
|
14766
|
-
${Fragments
|
|
14821
|
+
${Fragments.config}
|
|
14767
14822
|
`;
|
|
14768
14823
|
// Save (create or update) account mutation
|
|
14769
14824
|
const SaveMutation = gql `
|
|
@@ -14772,7 +14827,7 @@ const SaveMutation = gql `
|
|
|
14772
14827
|
...ConfigFragment
|
|
14773
14828
|
}
|
|
14774
14829
|
}
|
|
14775
|
-
${Fragments
|
|
14830
|
+
${Fragments.config}
|
|
14776
14831
|
`;
|
|
14777
14832
|
const ClearCache = gql `
|
|
14778
14833
|
query ClearCache($name: String) {
|
|
@@ -14786,7 +14841,7 @@ const CacheStatistics = gql `
|
|
|
14786
14841
|
`;
|
|
14787
14842
|
const APP_CONFIG_OPTIONS = new InjectionToken('defaultOptions');
|
|
14788
14843
|
class ConfigService extends BaseGraphqlService {
|
|
14789
|
-
constructor(platform, graphql, storage, network, file, toastController, translate, environment, defaultOptionsMap) {
|
|
14844
|
+
constructor(platform, graphql, storage, network, file, toastController, translate, accountService, environment, defaultOptionsMap) {
|
|
14790
14845
|
super(graphql, environment);
|
|
14791
14846
|
this.platform = platform;
|
|
14792
14847
|
this.graphql = graphql;
|
|
@@ -14795,6 +14850,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14795
14850
|
this.file = file;
|
|
14796
14851
|
this.toastController = toastController;
|
|
14797
14852
|
this.translate = translate;
|
|
14853
|
+
this.accountService = accountService;
|
|
14798
14854
|
this.environment = environment;
|
|
14799
14855
|
this.$data = new BehaviorSubject(null);
|
|
14800
14856
|
this._debug = !environment.production;
|
|
@@ -14822,12 +14878,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14822
14878
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14823
14879
|
const now = Date.now();
|
|
14824
14880
|
console.debug('[config] Loading Pod configuration...');
|
|
14825
|
-
const query = opts && opts.query || LoadQuery
|
|
14881
|
+
const query = opts && opts.query || LoadQuery;
|
|
14826
14882
|
const variables = opts && opts.variables || undefined;
|
|
14827
14883
|
const res = yield this.graphql.query({
|
|
14828
14884
|
query,
|
|
14829
14885
|
variables,
|
|
14830
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14886
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14831
14887
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14832
14888
|
});
|
|
14833
14889
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14841,6 +14897,9 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14841
14897
|
return this.loadDefault();
|
|
14842
14898
|
});
|
|
14843
14899
|
}
|
|
14900
|
+
canUserWrite(data, opts) {
|
|
14901
|
+
return this.accountService.isAdmin();
|
|
14902
|
+
}
|
|
14844
14903
|
/**
|
|
14845
14904
|
* Save a configuration
|
|
14846
14905
|
*
|
|
@@ -14857,7 +14916,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14857
14916
|
data: json
|
|
14858
14917
|
},
|
|
14859
14918
|
error: {
|
|
14860
|
-
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14919
|
+
code: ErrorCodes$2.SAVE_CONFIG_ERROR,
|
|
14861
14920
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14862
14921
|
}
|
|
14863
14922
|
});
|
|
@@ -14883,7 +14942,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14883
14942
|
const res = yield this.graphql.query({
|
|
14884
14943
|
query: CacheStatistics,
|
|
14885
14944
|
variables: null,
|
|
14886
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14945
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14887
14946
|
fetchPolicy: 'network-only'
|
|
14888
14947
|
});
|
|
14889
14948
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14899,7 +14958,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14899
14958
|
const res = yield this.graphql.query({
|
|
14900
14959
|
query: ClearCache,
|
|
14901
14960
|
variables,
|
|
14902
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14961
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14903
14962
|
fetchPolicy: 'network-only'
|
|
14904
14963
|
});
|
|
14905
14964
|
const data = res && res.clearCache || undefined;
|
|
@@ -15058,7 +15117,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15058
15117
|
});
|
|
15059
15118
|
}
|
|
15060
15119
|
}
|
|
15061
|
-
ConfigService.ɵprov =
|
|
15120
|
+
ConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(NetworkService), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
15062
15121
|
ConfigService.decorators = [
|
|
15063
15122
|
{ type: Injectable, args: [{
|
|
15064
15123
|
providedIn: 'root',
|
|
@@ -15073,11 +15132,12 @@ ConfigService.ctorParameters = () => [
|
|
|
15073
15132
|
{ type: FileService },
|
|
15074
15133
|
{ type: ToastController },
|
|
15075
15134
|
{ type: TranslateService },
|
|
15135
|
+
{ type: AccountService },
|
|
15076
15136
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
15077
15137
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15078
15138
|
];
|
|
15079
15139
|
|
|
15080
|
-
const moment$
|
|
15140
|
+
const moment$2 = momentImported;
|
|
15081
15141
|
class PlatformService extends StartableService {
|
|
15082
15142
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
15083
15143
|
super(platform);
|
|
@@ -15105,24 +15165,39 @@ class PlatformService extends StartableService {
|
|
|
15105
15165
|
if (this._debug)
|
|
15106
15166
|
console.debug('[platform] Creating service');
|
|
15107
15167
|
}
|
|
15108
|
-
get mobile() {
|
|
15109
|
-
return isNotNil(this._mobile) ? this._mobile : this.platform.is('mobile');
|
|
15110
|
-
}
|
|
15111
15168
|
is(platformName) {
|
|
15112
|
-
|
|
15169
|
+
switch (platformName) {
|
|
15170
|
+
case 'mobile':
|
|
15171
|
+
// Use custom mobile detection - see SUMARIS issue #323
|
|
15172
|
+
return isMobile(window);
|
|
15173
|
+
default:
|
|
15174
|
+
return this.platform.is(platformName);
|
|
15175
|
+
}
|
|
15176
|
+
}
|
|
15177
|
+
get mobile() {
|
|
15178
|
+
return isNotNil(this._mobile) ? this._mobile : isMobile(window);
|
|
15113
15179
|
}
|
|
15114
15180
|
/**
|
|
15115
|
-
* Say if opened has been opened
|
|
15181
|
+
* Say if opened has been opened inside an Android or iOs App.
|
|
15116
15182
|
* This is used to known if there is cordova features
|
|
15117
15183
|
*/
|
|
15118
|
-
|
|
15119
|
-
return
|
|
15184
|
+
isCordova() {
|
|
15185
|
+
return this._cordova;
|
|
15120
15186
|
}
|
|
15121
15187
|
isAndroidCordova() {
|
|
15122
15188
|
return this._android && this._cordova || false;
|
|
15123
15189
|
}
|
|
15190
|
+
isIOSCordova() {
|
|
15191
|
+
return this._ios && this._cordova || false;
|
|
15192
|
+
}
|
|
15193
|
+
isWeb() {
|
|
15194
|
+
return !this._cordova || (!this._android && !this._ios);
|
|
15195
|
+
}
|
|
15196
|
+
isApp() {
|
|
15197
|
+
return this._cordova && (this._android || this._ios);
|
|
15198
|
+
}
|
|
15124
15199
|
get canDownload() {
|
|
15125
|
-
return this.
|
|
15200
|
+
return !!this.downloader && this.isAndroidCordova();
|
|
15126
15201
|
}
|
|
15127
15202
|
get canOpenFile() {
|
|
15128
15203
|
return false;
|
|
@@ -15139,16 +15214,13 @@ class PlatformService extends StartableService {
|
|
|
15139
15214
|
this.accountService.tokenType = undefined;
|
|
15140
15215
|
console.info('[platform] Starting platform...');
|
|
15141
15216
|
try {
|
|
15142
|
-
this._mobile = this.
|
|
15143
|
-
this._cordova = this.
|
|
15144
|
-
this._android = this.
|
|
15145
|
-
this.
|
|
15146
|
-
this.
|
|
15147
|
-
// Force
|
|
15148
|
-
|
|
15149
|
-
this.settings.mobile = this._mobile;
|
|
15150
|
-
this.settings.touchUi = this.touchUi;
|
|
15151
|
-
}
|
|
15217
|
+
this._mobile = this.is('mobile');
|
|
15218
|
+
this._cordova = this.is('cordova');
|
|
15219
|
+
this._android = this.is('android');
|
|
15220
|
+
this._ios = this.is('ios');
|
|
15221
|
+
this.configureCordovaPlugins();
|
|
15222
|
+
// Force some settings
|
|
15223
|
+
this.settings.mobile = this._mobile;
|
|
15152
15224
|
// Configure translation
|
|
15153
15225
|
yield this.configureTranslate();
|
|
15154
15226
|
// Configure storage
|
|
@@ -15162,7 +15234,7 @@ class PlatformService extends StartableService {
|
|
|
15162
15234
|
this.networkService.ready(),
|
|
15163
15235
|
this.audioProvider.ready()
|
|
15164
15236
|
]);
|
|
15165
|
-
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile},
|
|
15237
|
+
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, downloader: ${this.canDownload}, fileOpener: ${this.canOpenFile}} in ${Date.now() - now}ms`);
|
|
15166
15238
|
// Update cache configuration when network changed
|
|
15167
15239
|
this.networkService.onNetworkStatusChanges
|
|
15168
15240
|
.pipe(skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
@@ -15174,7 +15246,7 @@ class PlatformService extends StartableService {
|
|
|
15174
15246
|
console.info(`[platform] Using auth token type {${tokenType}}`);
|
|
15175
15247
|
this.accountService.tokenType = tokenType;
|
|
15176
15248
|
});
|
|
15177
|
-
// Hide the splashscreen (if mobile) - after 1s
|
|
15249
|
+
// Hide the splashscreen (if mobile) - after 1s - and play start sound
|
|
15178
15250
|
if (this.mobile) {
|
|
15179
15251
|
setTimeout(() => {
|
|
15180
15252
|
var _a;
|
|
@@ -15249,7 +15321,7 @@ class PlatformService extends StartableService {
|
|
|
15249
15321
|
//}
|
|
15250
15322
|
}
|
|
15251
15323
|
/* -- protected methods -- */
|
|
15252
|
-
configureCordovaPlugins(
|
|
15324
|
+
configureCordovaPlugins() {
|
|
15253
15325
|
console.info('[platform] Configuring Cordova plugins...');
|
|
15254
15326
|
if (this.statusBar) {
|
|
15255
15327
|
this.statusBar.styleDefault();
|
|
@@ -15258,15 +15330,6 @@ class PlatformService extends StartableService {
|
|
|
15258
15330
|
if (this.keyboard) {
|
|
15259
15331
|
this.keyboard.hideFormAccessoryBar(true);
|
|
15260
15332
|
}
|
|
15261
|
-
// Force to use InAppBrowser instead of default window.open()
|
|
15262
|
-
if (this.browser) {
|
|
15263
|
-
// FIXME: this create a infinite loop (e.g. when downloading an extraction file)
|
|
15264
|
-
// window.open = (url?: string, target?: string, features?: string, replace?: boolean) => {
|
|
15265
|
-
// console.debug("[platform] Call to window.open() redirected to InAppBrowser.open()");
|
|
15266
|
-
// this.browser.create(url, target, features).show();
|
|
15267
|
-
// return window;
|
|
15268
|
-
// };
|
|
15269
|
-
}
|
|
15270
15333
|
}
|
|
15271
15334
|
configureTranslate() {
|
|
15272
15335
|
console.info('[platform] Configuring i18n ...');
|
|
@@ -15281,16 +15344,16 @@ class PlatformService extends StartableService {
|
|
|
15281
15344
|
}
|
|
15282
15345
|
// config moment lib
|
|
15283
15346
|
try {
|
|
15284
|
-
moment$
|
|
15347
|
+
moment$2.locale(event.lang);
|
|
15285
15348
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15286
15349
|
}
|
|
15287
15350
|
// If error, fallback to en
|
|
15288
15351
|
catch (err) {
|
|
15289
|
-
moment$
|
|
15352
|
+
moment$2.locale('en');
|
|
15290
15353
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15291
15354
|
}
|
|
15292
15355
|
// Config date adapter
|
|
15293
|
-
this.dateAdapter.setLocale(moment$
|
|
15356
|
+
this.dateAdapter.setLocale(moment$2.locale());
|
|
15294
15357
|
}
|
|
15295
15358
|
});
|
|
15296
15359
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15424,7 +15487,7 @@ class PlatformService extends StartableService {
|
|
|
15424
15487
|
});
|
|
15425
15488
|
}
|
|
15426
15489
|
}
|
|
15427
|
-
PlatformService.ɵprov =
|
|
15490
|
+
PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
|
|
15428
15491
|
PlatformService.decorators = [
|
|
15429
15492
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15430
15493
|
];
|
|
@@ -15439,15 +15502,15 @@ PlatformService.ctorParameters = () => [
|
|
|
15439
15502
|
{ type: NetworkService },
|
|
15440
15503
|
{ type: AccountService },
|
|
15441
15504
|
{ type: ConfigService },
|
|
15442
|
-
{ type: CacheService
|
|
15505
|
+
{ type: CacheService },
|
|
15443
15506
|
{ type: Storage },
|
|
15444
15507
|
{ type: AudioProvider },
|
|
15445
15508
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
15446
|
-
{ type: StatusBar
|
|
15509
|
+
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
15447
15510
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
15448
|
-
{ type: SplashScreen
|
|
15449
|
-
{ type: InAppBrowser
|
|
15450
|
-
{ type: Downloader
|
|
15511
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
15512
|
+
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
15513
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
15451
15514
|
];
|
|
15452
15515
|
|
|
15453
15516
|
class AppHelpModal {
|
|
@@ -15511,7 +15574,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
15511
15574
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
15512
15575
|
}
|
|
15513
15576
|
}
|
|
15514
|
-
MatStepperI18n.ɵprov =
|
|
15577
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
15515
15578
|
MatStepperI18n.decorators = [
|
|
15516
15579
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15517
15580
|
];
|
|
@@ -16513,7 +16576,7 @@ function state2side(state) {
|
|
|
16513
16576
|
return 1;
|
|
16514
16577
|
}
|
|
16515
16578
|
}
|
|
16516
|
-
const ɵ0$
|
|
16579
|
+
const ɵ0$1 = (defaultStateSize) => [
|
|
16517
16580
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
16518
16581
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
16519
16582
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -16521,7 +16584,7 @@ const ɵ0$a = (defaultStateSize) => [
|
|
|
16521
16584
|
const SCALE_OPTIONS_DEFAULT = {
|
|
16522
16585
|
startColor: rgbArrayMap.red,
|
|
16523
16586
|
startStates: [0, 2, 3],
|
|
16524
|
-
startStepsFn: ɵ0$
|
|
16587
|
+
startStepsFn: ɵ0$1
|
|
16525
16588
|
};
|
|
16526
16589
|
/**
|
|
16527
16590
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -16613,21 +16676,21 @@ function linearColorGradient(count, options) {
|
|
|
16613
16676
|
return result;
|
|
16614
16677
|
}
|
|
16615
16678
|
|
|
16616
|
-
class EntityTestClass {
|
|
16679
|
+
class EntityTestClass$1 {
|
|
16617
16680
|
}
|
|
16618
|
-
const FAKE_ENTITIES = [
|
|
16681
|
+
const FAKE_ENTITIES$1 = [
|
|
16619
16682
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
16620
16683
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
16621
16684
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
16622
16685
|
];
|
|
16623
|
-
function deepCopy(values, size) {
|
|
16686
|
+
function deepCopy$1(values, size) {
|
|
16624
16687
|
if (isNil(size)) {
|
|
16625
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16688
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16626
16689
|
}
|
|
16627
16690
|
let result = [];
|
|
16628
16691
|
let i = 1;
|
|
16629
16692
|
while (result.length < size) {
|
|
16630
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
16693
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
16631
16694
|
const name = entity.name + ' #' + i;
|
|
16632
16695
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
16633
16696
|
}));
|
|
@@ -16637,7 +16700,7 @@ function deepCopy(values, size) {
|
|
|
16637
16700
|
class AutocompleteTestPage {
|
|
16638
16701
|
constructor(formBuilder) {
|
|
16639
16702
|
this.formBuilder = formBuilder;
|
|
16640
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
16703
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
16641
16704
|
this._$items = new BehaviorSubject(undefined);
|
|
16642
16705
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16643
16706
|
this.memoryHide = false;
|
|
@@ -16681,7 +16744,7 @@ class AutocompleteTestPage {
|
|
|
16681
16744
|
});
|
|
16682
16745
|
// From items
|
|
16683
16746
|
this.autocompleteFields.add('entity-items-large', {
|
|
16684
|
-
items: FAKE_ENTITIES.slice(),
|
|
16747
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
16685
16748
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
16686
16749
|
displayWith: this.entityToString
|
|
16687
16750
|
});
|
|
@@ -16691,12 +16754,12 @@ class AutocompleteTestPage {
|
|
|
16691
16754
|
loadData() {
|
|
16692
16755
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16693
16756
|
const data = {
|
|
16694
|
-
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
16757
|
+
entity: deepCopy$1(FAKE_ENTITIES$1)[0],
|
|
16695
16758
|
// This item is NOT in the items list => i should be displayed anyway
|
|
16696
16759
|
missingEntity: {
|
|
16697
16760
|
id: -1, label: '??', name: 'Missing item'
|
|
16698
16761
|
},
|
|
16699
|
-
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
16762
|
+
disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
|
|
16700
16763
|
};
|
|
16701
16764
|
this.form.setValue(data);
|
|
16702
16765
|
// Load observables
|
|
@@ -16869,13 +16932,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16869
16932
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16870
16933
|
];
|
|
16871
16934
|
|
|
16872
|
-
const moment$
|
|
16935
|
+
const moment$1 = momentImported;
|
|
16873
16936
|
class SwipeTestPage {
|
|
16874
16937
|
constructor(formBuilder, dateFormatPipe) {
|
|
16875
16938
|
this.formBuilder = formBuilder;
|
|
16876
16939
|
this.dateFormatPipe = dateFormatPipe;
|
|
16877
16940
|
this.$dates = new BehaviorSubject(undefined);
|
|
16878
|
-
this._today = moment$
|
|
16941
|
+
this._today = moment$1().startOf('day');
|
|
16879
16942
|
this.form = formBuilder.group({
|
|
16880
16943
|
empty: [null, Validators.required],
|
|
16881
16944
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16888,7 +16951,7 @@ class SwipeTestPage {
|
|
|
16888
16951
|
ngOnInit() {
|
|
16889
16952
|
const dates = [];
|
|
16890
16953
|
for (let d = 0; d < 7; d++) {
|
|
16891
|
-
dates[d] = moment$
|
|
16954
|
+
dates[d] = moment$1(this._today).add(d - 3, 'day');
|
|
16892
16955
|
}
|
|
16893
16956
|
this.$dates.next(dates);
|
|
16894
16957
|
this.loadData();
|
|
@@ -16929,7 +16992,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16929
16992
|
{ type: DateFormatPipe }
|
|
16930
16993
|
];
|
|
16931
16994
|
|
|
16932
|
-
const moment
|
|
16995
|
+
const moment = momentImported;
|
|
16933
16996
|
class DateTimeTestPage {
|
|
16934
16997
|
constructor(platform, formBuilder, cd) {
|
|
16935
16998
|
this.platform = platform;
|
|
@@ -16961,7 +17024,7 @@ class DateTimeTestPage {
|
|
|
16961
17024
|
// Load the form with data
|
|
16962
17025
|
loadData() {
|
|
16963
17026
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16964
|
-
const now = moment
|
|
17027
|
+
const now = moment();
|
|
16965
17028
|
const data = {
|
|
16966
17029
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16967
17030
|
enable: toDateISOString(now),
|
|
@@ -17022,9 +17085,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
17022
17085
|
{ type: ChangeDetectorRef }
|
|
17023
17086
|
];
|
|
17024
17087
|
|
|
17025
|
-
class EntityTestClass
|
|
17088
|
+
class EntityTestClass {
|
|
17026
17089
|
}
|
|
17027
|
-
const FAKE_ENTITIES
|
|
17090
|
+
const FAKE_ENTITIES = [
|
|
17028
17091
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
17029
17092
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
17030
17093
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -17033,14 +17096,14 @@ const FAKE_ENTITIES$1 = [
|
|
|
17033
17096
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
17034
17097
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
17035
17098
|
];
|
|
17036
|
-
function deepCopy
|
|
17099
|
+
function deepCopy(values, size) {
|
|
17037
17100
|
if (isNil(size)) {
|
|
17038
|
-
return (values || FAKE_ENTITIES
|
|
17101
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
17039
17102
|
}
|
|
17040
17103
|
let result = [];
|
|
17041
17104
|
let i = 1;
|
|
17042
17105
|
while (result.length < size) {
|
|
17043
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
17106
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
17044
17107
|
const name = entity.name + ' #' + i;
|
|
17045
17108
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
17046
17109
|
}));
|
|
@@ -17050,7 +17113,7 @@ function deepCopy$1(values, size) {
|
|
|
17050
17113
|
class ChipsTestPage {
|
|
17051
17114
|
constructor(formBuilder) {
|
|
17052
17115
|
this.formBuilder = formBuilder;
|
|
17053
|
-
this._items = deepCopy
|
|
17116
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
17054
17117
|
this._$items = new BehaviorSubject(undefined);
|
|
17055
17118
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
17056
17119
|
this.form = formBuilder.group({
|
|
@@ -17089,7 +17152,7 @@ class ChipsTestPage {
|
|
|
17089
17152
|
// Load the form with data
|
|
17090
17153
|
loadData() {
|
|
17091
17154
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17092
|
-
const items = deepCopy
|
|
17155
|
+
const items = deepCopy(FAKE_ENTITIES);
|
|
17093
17156
|
const data = {
|
|
17094
17157
|
entity: items.slice(0, 1),
|
|
17095
17158
|
entityInitial: items.slice(1, 2),
|
|
@@ -17165,7 +17228,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
17165
17228
|
},] }
|
|
17166
17229
|
];
|
|
17167
17230
|
|
|
17168
|
-
const routes = [
|
|
17231
|
+
const routes$1 = [
|
|
17169
17232
|
{
|
|
17170
17233
|
path: '',
|
|
17171
17234
|
pathMatch: 'full',
|
|
@@ -17217,7 +17280,7 @@ MaterialTestingModule.decorators = [
|
|
|
17217
17280
|
ReactiveFormsModule,
|
|
17218
17281
|
SharedMaterialModule,
|
|
17219
17282
|
TranslateModule.forChild(),
|
|
17220
|
-
RouterModule.forChild(routes)
|
|
17283
|
+
RouterModule.forChild(routes$1)
|
|
17221
17284
|
],
|
|
17222
17285
|
declarations: [
|
|
17223
17286
|
MaterialTestingPage,
|
|
@@ -17986,7 +18049,7 @@ class HomePage {
|
|
|
17986
18049
|
this.appName = config.label || this.environment.defaultAppName || 'SUMARiS';
|
|
17987
18050
|
this.logo = config.largeLogo || config.smallLogo || undefined;
|
|
17988
18051
|
this.description = config.name;
|
|
17989
|
-
this.isWeb = this.platform.
|
|
18052
|
+
this.isWeb = this.platform.isWeb();
|
|
17990
18053
|
this.canRegister = config.getPropertyAsBoolean(CORE_CONFIG_OPTIONS.REGISTRATION_ENABLE);
|
|
17991
18054
|
const partners = (config.partners || []).filter(p => p && p.logo);
|
|
17992
18055
|
this.$partners.next(partners);
|
|
@@ -18232,7 +18295,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18232
18295
|
});
|
|
18233
18296
|
}
|
|
18234
18297
|
}
|
|
18235
|
-
UserSettingsValidatorService.ɵprov =
|
|
18298
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18236
18299
|
UserSettingsValidatorService.decorators = [
|
|
18237
18300
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18238
18301
|
];
|
|
@@ -18276,7 +18339,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18276
18339
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18277
18340
|
}
|
|
18278
18341
|
}
|
|
18279
|
-
AccountValidatorService.ɵprov =
|
|
18342
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18280
18343
|
AccountValidatorService.decorators = [
|
|
18281
18344
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18282
18345
|
];
|
|
@@ -18841,7 +18904,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
18841
18904
|
});
|
|
18842
18905
|
}
|
|
18843
18906
|
}
|
|
18844
|
-
LocalSettingsValidatorService.ɵprov =
|
|
18907
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
18845
18908
|
LocalSettingsValidatorService.decorators = [
|
|
18846
18909
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18847
18910
|
];
|
|
@@ -19460,7 +19523,7 @@ class IsOnFieldModePipe {
|
|
|
19460
19523
|
return value === 'FIELD';
|
|
19461
19524
|
}
|
|
19462
19525
|
}
|
|
19463
|
-
IsOnFieldModePipe.ɵprov =
|
|
19526
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
19464
19527
|
IsOnFieldModePipe.decorators = [
|
|
19465
19528
|
{ type: Pipe, args: [{
|
|
19466
19529
|
name: 'isOnField'
|
|
@@ -19472,7 +19535,7 @@ class IsNotOnFieldModePipe {
|
|
|
19472
19535
|
return value !== 'FIELD';
|
|
19473
19536
|
}
|
|
19474
19537
|
}
|
|
19475
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
19538
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
19476
19539
|
IsNotOnFieldModePipe.decorators = [
|
|
19477
19540
|
{ type: Pipe, args: [{
|
|
19478
19541
|
name: 'isNotOnField'
|
|
@@ -19487,7 +19550,7 @@ class PersonToStringPipe {
|
|
|
19487
19550
|
return PersonUtils.personToString(value);
|
|
19488
19551
|
}
|
|
19489
19552
|
}
|
|
19490
|
-
PersonToStringPipe.ɵprov =
|
|
19553
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
19491
19554
|
PersonToStringPipe.decorators = [
|
|
19492
19555
|
{ type: Pipe, args: [{
|
|
19493
19556
|
name: 'personToString'
|
|
@@ -19872,7 +19935,7 @@ class IsLoginAccountPipe {
|
|
|
19872
19935
|
return value && value.pubkey && true;
|
|
19873
19936
|
}
|
|
19874
19937
|
}
|
|
19875
|
-
IsLoginAccountPipe.ɵprov =
|
|
19938
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
19876
19939
|
IsLoginAccountPipe.decorators = [
|
|
19877
19940
|
{ type: Pipe, args: [{
|
|
19878
19941
|
name: 'isLogin'
|
|
@@ -19884,7 +19947,7 @@ class AccountToStringPipe {
|
|
|
19884
19947
|
return accountToString(value);
|
|
19885
19948
|
}
|
|
19886
19949
|
}
|
|
19887
|
-
AccountToStringPipe.ɵprov =
|
|
19950
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
19888
19951
|
AccountToStringPipe.decorators = [
|
|
19889
19952
|
{ type: Pipe, args: [{
|
|
19890
19953
|
name: 'accountToString'
|
|
@@ -19899,7 +19962,7 @@ class DepartmentToStringPipe {
|
|
|
19899
19962
|
return departmentToString(value);
|
|
19900
19963
|
}
|
|
19901
19964
|
}
|
|
19902
|
-
DepartmentToStringPipe.ɵprov =
|
|
19965
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
19903
19966
|
DepartmentToStringPipe.decorators = [
|
|
19904
19967
|
{ type: Pipe, args: [{
|
|
19905
19968
|
name: 'departmentToString'
|
|
@@ -19925,7 +19988,7 @@ class MenuService {
|
|
|
19925
19988
|
this._visibleSubject.next(value);
|
|
19926
19989
|
}
|
|
19927
19990
|
}
|
|
19928
|
-
MenuService.ɵprov =
|
|
19991
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19929
19992
|
MenuService.decorators = [
|
|
19930
19993
|
{ type: Injectable, args: [{
|
|
19931
19994
|
providedIn: 'root'
|
|
@@ -20449,7 +20512,7 @@ class AuthGuardService {
|
|
|
20449
20512
|
}));
|
|
20450
20513
|
}
|
|
20451
20514
|
}
|
|
20452
|
-
AuthGuardService.ɵprov =
|
|
20515
|
+
AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(AccountService), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(i3$3.Router), i0.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
20453
20516
|
AuthGuardService.decorators = [
|
|
20454
20517
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
20455
20518
|
];
|
|
@@ -20491,7 +20554,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20491
20554
|
query,
|
|
20492
20555
|
variables: { id },
|
|
20493
20556
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20494
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20557
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20495
20558
|
})
|
|
20496
20559
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
20497
20560
|
? (data && this.fromObject(data))
|
|
@@ -20506,7 +20569,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20506
20569
|
query,
|
|
20507
20570
|
variables: { id },
|
|
20508
20571
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20509
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20572
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20510
20573
|
});
|
|
20511
20574
|
// Convert to entity
|
|
20512
20575
|
return (!opts || opts.toEntity !== false)
|
|
@@ -20537,7 +20600,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20537
20600
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
20538
20601
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
20539
20602
|
variables,
|
|
20540
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
20603
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
20541
20604
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
20542
20605
|
})
|
|
20543
20606
|
.pipe(map(({ data, total }) => {
|
|
@@ -20573,7 +20636,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20573
20636
|
const { data, total } = yield this.graphql.query({
|
|
20574
20637
|
query,
|
|
20575
20638
|
variables,
|
|
20576
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
20639
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
20577
20640
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20578
20641
|
});
|
|
20579
20642
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -20612,12 +20675,15 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20612
20675
|
variables: {
|
|
20613
20676
|
filter: filter && filter.asPodObject()
|
|
20614
20677
|
},
|
|
20615
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
20678
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
20616
20679
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20617
20680
|
});
|
|
20618
20681
|
return res.total;
|
|
20619
20682
|
});
|
|
20620
20683
|
}
|
|
20684
|
+
canUserWrite(data, opts) {
|
|
20685
|
+
return !!data;
|
|
20686
|
+
}
|
|
20621
20687
|
saveAll(entities, opts) {
|
|
20622
20688
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20623
20689
|
if (isEmptyArray(entities))
|
|
@@ -20645,7 +20711,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20645
20711
|
variables: {
|
|
20646
20712
|
data: json
|
|
20647
20713
|
},
|
|
20648
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20714
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20649
20715
|
update: (proxy, { data }) => {
|
|
20650
20716
|
const savedEntities = data && data.data;
|
|
20651
20717
|
if (savedEntities) {
|
|
@@ -20701,7 +20767,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20701
20767
|
variables: {
|
|
20702
20768
|
data: json
|
|
20703
20769
|
},
|
|
20704
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20770
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20705
20771
|
update: (cache, { data }) => {
|
|
20706
20772
|
// Update entity
|
|
20707
20773
|
const savedEntity = data && data.data;
|
|
@@ -20749,7 +20815,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20749
20815
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20750
20816
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20751
20817
|
variables: { ids },
|
|
20752
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20818
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20753
20819
|
update: (cache, res) => {
|
|
20754
20820
|
// Remove from cache
|
|
20755
20821
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20790,7 +20856,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20790
20856
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20791
20857
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20792
20858
|
variables: { id },
|
|
20793
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20859
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20794
20860
|
update: (proxy, res) => {
|
|
20795
20861
|
// Remove from cache
|
|
20796
20862
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20823,7 +20889,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20823
20889
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
20824
20890
|
variables,
|
|
20825
20891
|
error: {
|
|
20826
|
-
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
20892
|
+
code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
|
|
20827
20893
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
20828
20894
|
}
|
|
20829
20895
|
})
|
|
@@ -21009,7 +21075,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
21009
21075
|
if (this._debug)
|
|
21010
21076
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
21011
21077
|
// Stop with an error
|
|
21012
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21078
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21013
21079
|
}
|
|
21014
21080
|
this._editingRowCount = 0;
|
|
21015
21081
|
let data;
|
|
@@ -21873,14 +21939,14 @@ class AppTable {
|
|
|
21873
21939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21874
21940
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
21875
21941
|
if (this.readOnly) {
|
|
21876
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21942
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21877
21943
|
}
|
|
21878
21944
|
this.resetError();
|
|
21879
21945
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
21880
21946
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
21881
21947
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
21882
21948
|
if (!this.confirmEditCreate()) {
|
|
21883
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21949
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21884
21950
|
}
|
|
21885
21951
|
// Mark as saving
|
|
21886
21952
|
this.markAsSaving();
|
|
@@ -21997,7 +22063,7 @@ class AppTable {
|
|
|
21997
22063
|
var _a;
|
|
21998
22064
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21999
22065
|
if (this.readOnly) {
|
|
22000
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22066
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22001
22067
|
}
|
|
22002
22068
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
22003
22069
|
return 0; // SKip
|
|
@@ -23523,7 +23589,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23523
23589
|
try {
|
|
23524
23590
|
const data = yield this.dataService.load(id, opts);
|
|
23525
23591
|
if (!data)
|
|
23526
|
-
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
23592
|
+
throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
23527
23593
|
this._usageMode = this.computeUsageMode(data);
|
|
23528
23594
|
yield this.onEntityLoaded(data, opts);
|
|
23529
23595
|
yield this.updateView(data, opts);
|
|
@@ -23844,6 +23910,10 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23844
23910
|
if (!opts || opts.emitEvent !== false)
|
|
23845
23911
|
this.markForCheck();
|
|
23846
23912
|
}
|
|
23913
|
+
/* -- public abstract methods (to override) -- */
|
|
23914
|
+
canUserWrite(data, opts) {
|
|
23915
|
+
return this.dataService.canUserWrite(data, opts);
|
|
23916
|
+
}
|
|
23847
23917
|
/* -- protected methods -- */
|
|
23848
23918
|
/**
|
|
23849
23919
|
* Return undefined to keep same tab
|
|
@@ -24446,7 +24516,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24446
24516
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
24447
24517
|
}
|
|
24448
24518
|
}
|
|
24449
|
-
UserEventService.ɵprov =
|
|
24519
|
+
UserEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(AccountService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
|
|
24450
24520
|
UserEventService.decorators = [
|
|
24451
24521
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24452
24522
|
];
|
|
@@ -24831,7 +24901,7 @@ class PersonService extends BaseEntityService {
|
|
|
24831
24901
|
return target;
|
|
24832
24902
|
}
|
|
24833
24903
|
}
|
|
24834
|
-
PersonService.ɵprov =
|
|
24904
|
+
PersonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(PlatformService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
24835
24905
|
PersonService.decorators = [
|
|
24836
24906
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24837
24907
|
];
|
|
@@ -24862,7 +24932,7 @@ class PersonValidatorService {
|
|
|
24862
24932
|
return this.formBuilder.group(formConfig);
|
|
24863
24933
|
}
|
|
24864
24934
|
}
|
|
24865
|
-
PersonValidatorService.ɵprov =
|
|
24935
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
24866
24936
|
PersonValidatorService.decorators = [
|
|
24867
24937
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24868
24938
|
];
|
|
@@ -25068,16 +25138,16 @@ AdminModule.decorators = [
|
|
|
25068
25138
|
];
|
|
25069
25139
|
AdminModule.ctorParameters = () => [];
|
|
25070
25140
|
|
|
25071
|
-
const ɵ0
|
|
25141
|
+
const ɵ0 = {
|
|
25072
25142
|
profile: 'ADMIN'
|
|
25073
25143
|
};
|
|
25074
|
-
const routes
|
|
25144
|
+
const routes = [
|
|
25075
25145
|
{
|
|
25076
25146
|
path: 'users',
|
|
25077
25147
|
pathMatch: 'full',
|
|
25078
25148
|
component: UsersPage,
|
|
25079
25149
|
canActivate: [AuthGuardService],
|
|
25080
|
-
data: ɵ0
|
|
25150
|
+
data: ɵ0
|
|
25081
25151
|
}
|
|
25082
25152
|
];
|
|
25083
25153
|
class AdminRoutingModule {
|
|
@@ -25087,13 +25157,13 @@ AdminRoutingModule.decorators = [
|
|
|
25087
25157
|
imports: [
|
|
25088
25158
|
SharedRoutingModule,
|
|
25089
25159
|
AdminModule,
|
|
25090
|
-
RouterModule.forChild(routes
|
|
25160
|
+
RouterModule.forChild(routes)
|
|
25091
25161
|
],
|
|
25092
25162
|
exports: [RouterModule]
|
|
25093
25163
|
},] }
|
|
25094
25164
|
];
|
|
25095
25165
|
|
|
25096
|
-
const ErrorCodes
|
|
25166
|
+
const ErrorCodes = {
|
|
25097
25167
|
LOAD_PERSONS_ERROR: 100,
|
|
25098
25168
|
SAVE_PERSONS_ERROR: 101,
|
|
25099
25169
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -25105,5 +25175,5 @@ const ErrorCodes$2 = {
|
|
|
25105
25175
|
* Generated bundle index. Do not edit.
|
|
25106
25176
|
*/
|
|
25107
25177
|
|
|
25108
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes
|
|
25178
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NgVarDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isControlHasInput, isCordova, isDesktop, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isTouchUi, isWindow, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0$b as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, SharedMatBadgeIconModule as ɵc, MatBadgeIconDirective as ɵd, isFocusableElement as ɵe, MatBadgeIconTestPage as ɵf, RegisterForm as ɵg, AccountValidatorService as ɵh, RegisterModal as ɵi, UserSettingsValidatorService as ɵj, LocalSettingsValidatorService as ɵk, AppIconComponent as ɵl };
|
|
25109
25179
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|