@sumaris-net/ngx-components 1.7.2 → 1.7.3
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 +318 -276
- 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/esm2015/src/app/core/form/entity-editor.class.js +34 -16
- package/esm2015/src/app/core/table/table.class.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +302 -269
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +17 -1
- 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$b = 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
|
];
|
|
@@ -4099,9 +4114,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4099
4114
|
const hour = parseInt(durationParts[0] || '0');
|
|
4100
4115
|
const minute = parseInt(durationParts[1] || '0');
|
|
4101
4116
|
const value = hour + (minute + 0.5) / 60;
|
|
4102
|
-
return roundFloat
|
|
4117
|
+
return roundFloat(value, maxDecimals);
|
|
4103
4118
|
}
|
|
4104
|
-
function roundFloat
|
|
4119
|
+
function roundFloat(input, maxDecimals) {
|
|
4105
4120
|
if (maxDecimals > 0) {
|
|
4106
4121
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4107
4122
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4125,9 +4140,9 @@ const MASKS = {
|
|
|
4125
4140
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4126
4141
|
}
|
|
4127
4142
|
};
|
|
4128
|
-
const noop$
|
|
4143
|
+
const noop$7 = () => {
|
|
4129
4144
|
};
|
|
4130
|
-
const ɵ0$
|
|
4145
|
+
const ɵ0$a = noop$7;
|
|
4131
4146
|
class MatLatLongField {
|
|
4132
4147
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
4133
4148
|
this.platform = platform;
|
|
@@ -4135,8 +4150,8 @@ class MatLatLongField {
|
|
|
4135
4150
|
this.formBuilder = formBuilder;
|
|
4136
4151
|
this.cd = cd;
|
|
4137
4152
|
this.formGroupDir = formGroupDir;
|
|
4138
|
-
this._onChangeCallback = noop$
|
|
4139
|
-
this._onTouchedCallback = noop$
|
|
4153
|
+
this._onChangeCallback = noop$7;
|
|
4154
|
+
this._onTouchedCallback = noop$7;
|
|
4140
4155
|
this._subscription = new Subscription();
|
|
4141
4156
|
this.disabling = false;
|
|
4142
4157
|
this.writing = false;
|
|
@@ -4473,14 +4488,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4473
4488
|
},] }
|
|
4474
4489
|
];
|
|
4475
4490
|
|
|
4476
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
4491
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4477
4492
|
provide: NG_VALUE_ACCESSOR,
|
|
4478
4493
|
useExisting: forwardRef(() => MatDate),
|
|
4479
4494
|
multi: true
|
|
4480
4495
|
};
|
|
4481
|
-
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4482
|
-
const noop$
|
|
4483
|
-
const ɵ0$
|
|
4496
|
+
const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4497
|
+
const noop$6 = () => { };
|
|
4498
|
+
const ɵ0$9 = noop$6;
|
|
4484
4499
|
class MatDate {
|
|
4485
4500
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4486
4501
|
this.dateAdapter = dateAdapter;
|
|
@@ -4489,12 +4504,12 @@ class MatDate {
|
|
|
4489
4504
|
this.cd = cd;
|
|
4490
4505
|
this.keyboard = keyboard;
|
|
4491
4506
|
this.formGroupDir = formGroupDir;
|
|
4492
|
-
this._onChangeCallback = noop$
|
|
4493
|
-
this._onTouchedCallback = noop$
|
|
4507
|
+
this._onChangeCallback = noop$6;
|
|
4508
|
+
this._onTouchedCallback = noop$6;
|
|
4494
4509
|
this._subscription = new Subscription();
|
|
4495
4510
|
this.writing = true;
|
|
4496
4511
|
this.disabling = false;
|
|
4497
|
-
this.dayMask = DAY_MASK;
|
|
4512
|
+
this.dayMask = DAY_MASK$2;
|
|
4498
4513
|
this.disabled = false;
|
|
4499
4514
|
this.floatLabel = 'auto';
|
|
4500
4515
|
this.readonly = false;
|
|
@@ -4731,7 +4746,7 @@ MatDate.decorators = [
|
|
|
4731
4746
|
selector: 'mat-date-field',
|
|
4732
4747
|
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
4748
|
providers: [
|
|
4734
|
-
DEFAULT_VALUE_ACCESSOR,
|
|
4749
|
+
DEFAULT_VALUE_ACCESSOR$5,
|
|
4735
4750
|
],
|
|
4736
4751
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4737
4752
|
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 +4779,17 @@ MatDate.propDecorators = {
|
|
|
4764
4779
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4765
4780
|
};
|
|
4766
4781
|
|
|
4767
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4782
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4768
4783
|
provide: NG_VALUE_ACCESSOR,
|
|
4769
4784
|
useExisting: forwardRef(() => MatDateTime),
|
|
4770
4785
|
multi: true
|
|
4771
4786
|
};
|
|
4772
4787
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4773
4788
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4774
|
-
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4775
|
-
const noop$
|
|
4789
|
+
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4790
|
+
const noop$5 = () => {
|
|
4776
4791
|
};
|
|
4777
|
-
const ɵ0$
|
|
4792
|
+
const ɵ0$8 = noop$5;
|
|
4778
4793
|
class MatDateTime {
|
|
4779
4794
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4780
4795
|
this.platform = platform;
|
|
@@ -4784,14 +4799,14 @@ class MatDateTime {
|
|
|
4784
4799
|
this.cd = cd;
|
|
4785
4800
|
this.keyboard = keyboard;
|
|
4786
4801
|
this.formGroupDir = formGroupDir;
|
|
4787
|
-
this._onChangeCallback = noop$
|
|
4788
|
-
this._onTouchedCallback = noop$
|
|
4802
|
+
this._onChangeCallback = noop$5;
|
|
4803
|
+
this._onTouchedCallback = noop$5;
|
|
4789
4804
|
this._subscription = new Subscription();
|
|
4790
4805
|
this.writing = true;
|
|
4791
4806
|
this.disabling = false;
|
|
4792
4807
|
this._readonly = false;
|
|
4793
4808
|
this.dayMask = DAY_MASK$1;
|
|
4794
|
-
this.hourMask = HOUR_MASK;
|
|
4809
|
+
this.hourMask = HOUR_MASK$1;
|
|
4795
4810
|
this.floatLabel = 'auto';
|
|
4796
4811
|
this.compact = false;
|
|
4797
4812
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5103,7 +5118,7 @@ MatDateTime.decorators = [
|
|
|
5103
5118
|
selector: 'mat-date-time-field',
|
|
5104
5119
|
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
5120
|
providers: [
|
|
5106
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5121
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
5107
5122
|
],
|
|
5108
5123
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5109
5124
|
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 +5152,15 @@ MatDateTime.propDecorators = {
|
|
|
5137
5152
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5138
5153
|
};
|
|
5139
5154
|
|
|
5140
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5155
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5141
5156
|
provide: NG_VALUE_ACCESSOR,
|
|
5142
5157
|
useExisting: forwardRef(() => MatDateShort),
|
|
5143
5158
|
multi: true
|
|
5144
5159
|
};
|
|
5145
|
-
const DAY_MASK
|
|
5160
|
+
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5146
5161
|
const noop$4 = () => {
|
|
5147
5162
|
};
|
|
5148
|
-
const ɵ0$
|
|
5163
|
+
const ɵ0$7 = noop$4;
|
|
5149
5164
|
class MatDateShort {
|
|
5150
5165
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5151
5166
|
this.dateAdapter = dateAdapter;
|
|
@@ -5158,7 +5173,7 @@ class MatDateShort {
|
|
|
5158
5173
|
this._onTouchedCallback = noop$4;
|
|
5159
5174
|
this.writing = true;
|
|
5160
5175
|
this.disabling = false;
|
|
5161
|
-
this.dayMask = DAY_MASK
|
|
5176
|
+
this.dayMask = DAY_MASK;
|
|
5162
5177
|
this.disabled = false;
|
|
5163
5178
|
this.floatLabel = 'auto';
|
|
5164
5179
|
this.readonly = false;
|
|
@@ -5403,7 +5418,7 @@ MatDateShort.decorators = [
|
|
|
5403
5418
|
selector: 'mat-date-short-field',
|
|
5404
5419
|
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
5420
|
providers: [
|
|
5406
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5421
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
5407
5422
|
],
|
|
5408
5423
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5409
5424
|
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 +5486,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5471
5486
|
},] }
|
|
5472
5487
|
];
|
|
5473
5488
|
|
|
5474
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5489
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5475
5490
|
provide: NG_VALUE_ACCESSOR,
|
|
5476
5491
|
useExisting: forwardRef(() => MatDuration),
|
|
5477
5492
|
multi: true
|
|
5478
5493
|
};
|
|
5479
5494
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5480
|
-
const HOUR_MASK
|
|
5481
|
-
const noop$
|
|
5495
|
+
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5496
|
+
const noop$3 = () => {
|
|
5482
5497
|
};
|
|
5483
|
-
const ɵ0$
|
|
5498
|
+
const ɵ0$6 = noop$3;
|
|
5484
5499
|
class MatDuration {
|
|
5485
5500
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5486
5501
|
this.dateAdapter = dateAdapter;
|
|
@@ -5489,11 +5504,11 @@ class MatDuration {
|
|
|
5489
5504
|
this.cd = cd;
|
|
5490
5505
|
this.formGroupDir = formGroupDir;
|
|
5491
5506
|
this._subscription = new Subscription();
|
|
5492
|
-
this._onChangeCallback = noop$
|
|
5493
|
-
this._onTouchedCallback = noop$
|
|
5507
|
+
this._onChangeCallback = noop$3;
|
|
5508
|
+
this._onTouchedCallback = noop$3;
|
|
5494
5509
|
this.writing = true;
|
|
5495
5510
|
this.disabling = false;
|
|
5496
|
-
this.hourMask = HOUR_MASK
|
|
5511
|
+
this.hourMask = HOUR_MASK;
|
|
5497
5512
|
this.disabled = false;
|
|
5498
5513
|
this.floatLabel = 'auto';
|
|
5499
5514
|
this.readonly = false;
|
|
@@ -5673,7 +5688,7 @@ MatDuration.decorators = [
|
|
|
5673
5688
|
selector: 'mat-duration-field',
|
|
5674
5689
|
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
5690
|
providers: [
|
|
5676
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5691
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5677
5692
|
],
|
|
5678
5693
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5679
5694
|
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 +5745,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5730
5745
|
},] }
|
|
5731
5746
|
];
|
|
5732
5747
|
|
|
5733
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5748
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5734
5749
|
provide: NG_VALUE_ACCESSOR,
|
|
5735
5750
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5736
5751
|
multi: true
|
|
5737
5752
|
};
|
|
5738
|
-
const noop$
|
|
5753
|
+
const noop$2 = () => {
|
|
5739
5754
|
};
|
|
5740
|
-
const ɵ0$
|
|
5755
|
+
const ɵ0$5 = noop$2;
|
|
5741
5756
|
class MatBooleanField {
|
|
5742
5757
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5743
5758
|
this.translate = translate;
|
|
5744
5759
|
this.formBuilder = formBuilder;
|
|
5745
5760
|
this.cd = cd;
|
|
5746
5761
|
this.formGroupDir = formGroupDir;
|
|
5747
|
-
this._onChangeCallback = noop$
|
|
5748
|
-
this._onTouchedCallback = noop$
|
|
5762
|
+
this._onChangeCallback = noop$2;
|
|
5763
|
+
this._onTouchedCallback = noop$2;
|
|
5749
5764
|
this._writing = false;
|
|
5750
5765
|
this.showRadio = false;
|
|
5751
5766
|
this.disabled = false;
|
|
@@ -5908,7 +5923,7 @@ MatBooleanField.decorators = [
|
|
|
5908
5923
|
selector: 'mat-boolean-field',
|
|
5909
5924
|
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
5925
|
providers: [
|
|
5911
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5926
|
+
DEFAULT_VALUE_ACCESSOR$1
|
|
5912
5927
|
],
|
|
5913
5928
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5914
5929
|
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 +6169,7 @@ class MatNumpadDomService {
|
|
|
6154
6169
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6155
6170
|
}
|
|
6156
6171
|
}
|
|
6157
|
-
MatNumpadDomService.ɵprov =
|
|
6172
|
+
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
6173
|
MatNumpadDomService.decorators = [
|
|
6159
6174
|
{ type: Injectable, args: [{
|
|
6160
6175
|
providedIn: 'root'
|
|
@@ -6518,7 +6533,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6518
6533
|
},] }
|
|
6519
6534
|
];
|
|
6520
6535
|
|
|
6521
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
6536
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
6522
6537
|
provide: NG_VALUE_ACCESSOR,
|
|
6523
6538
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6524
6539
|
multi: true
|
|
@@ -6781,7 +6796,7 @@ MatSwipeField.decorators = [
|
|
|
6781
6796
|
{ type: Component, args: [{
|
|
6782
6797
|
selector: 'mat-swipe-field',
|
|
6783
6798
|
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
|
|
6799
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6785
6800
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6786
6801
|
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
6802
|
},] }
|
|
@@ -6839,14 +6854,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
6839
6854
|
},] }
|
|
6840
6855
|
];
|
|
6841
6856
|
|
|
6842
|
-
const noop$
|
|
6843
|
-
const ɵ0$
|
|
6857
|
+
const noop$1 = () => { };
|
|
6858
|
+
const ɵ0$4 = noop$1;
|
|
6844
6859
|
class MatChipsField {
|
|
6845
6860
|
constructor(cd, formGroupDir) {
|
|
6846
6861
|
this.cd = cd;
|
|
6847
6862
|
this.formGroupDir = formGroupDir;
|
|
6848
|
-
this._onChangeCallback = noop$
|
|
6849
|
-
this._onTouchedCallback = noop$
|
|
6863
|
+
this._onChangeCallback = noop$1;
|
|
6864
|
+
this._onTouchedCallback = noop$1;
|
|
6850
6865
|
this.logPrefix = '[mat-chips] ';
|
|
6851
6866
|
this.formControlName = null;
|
|
6852
6867
|
this.required = false;
|
|
@@ -7715,7 +7730,7 @@ class ProgressBarService {
|
|
|
7715
7730
|
}
|
|
7716
7731
|
}
|
|
7717
7732
|
}
|
|
7718
|
-
ProgressBarService.ɵprov =
|
|
7733
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7719
7734
|
ProgressBarService.decorators = [
|
|
7720
7735
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7721
7736
|
];
|
|
@@ -7759,7 +7774,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7759
7774
|
return mc;
|
|
7760
7775
|
}
|
|
7761
7776
|
}
|
|
7762
|
-
AppGestureConfig.ɵprov =
|
|
7777
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7763
7778
|
AppGestureConfig.decorators = [
|
|
7764
7779
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7765
7780
|
];
|
|
@@ -7984,7 +7999,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7984
7999
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7985
8000
|
}
|
|
7986
8001
|
}
|
|
7987
|
-
MatPaginatorI18n.ɵprov =
|
|
8002
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7988
8003
|
MatPaginatorI18n.decorators = [
|
|
7989
8004
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7990
8005
|
];
|
|
@@ -8074,17 +8089,17 @@ function getColorContrast(color, bw) {
|
|
|
8074
8089
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
8075
8090
|
}
|
|
8076
8091
|
|
|
8077
|
-
const noop
|
|
8092
|
+
const noop = () => {
|
|
8078
8093
|
};
|
|
8079
|
-
const ɵ0$
|
|
8094
|
+
const ɵ0$3 = noop;
|
|
8080
8095
|
class AppFormField {
|
|
8081
8096
|
constructor(translate, cd, injector, formGroupDir) {
|
|
8082
8097
|
this.translate = translate;
|
|
8083
8098
|
this.cd = cd;
|
|
8084
8099
|
this.injector = injector;
|
|
8085
8100
|
this.formGroupDir = formGroupDir;
|
|
8086
|
-
this._onChangeCallback = noop
|
|
8087
|
-
this._onTouchedCallback = noop
|
|
8101
|
+
this._onChangeCallback = noop;
|
|
8102
|
+
this._onTouchedCallback = noop;
|
|
8088
8103
|
this.readonly = false;
|
|
8089
8104
|
this.compact = false;
|
|
8090
8105
|
this.floatLabel = 'auto';
|
|
@@ -8517,14 +8532,14 @@ class AudioProvider extends StartableService {
|
|
|
8517
8532
|
});
|
|
8518
8533
|
}
|
|
8519
8534
|
}
|
|
8520
|
-
AudioProvider.ɵprov =
|
|
8535
|
+
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
8536
|
AudioProvider.decorators = [
|
|
8522
8537
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8523
8538
|
];
|
|
8524
8539
|
AudioProvider.ctorParameters = () => [
|
|
8525
8540
|
{ type: Platform },
|
|
8526
|
-
{ type: NativeAudio
|
|
8527
|
-
{ type: Vibration
|
|
8541
|
+
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
8542
|
+
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
8528
8543
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
8529
8544
|
];
|
|
8530
8545
|
|
|
@@ -8606,7 +8621,7 @@ class Hotkeys {
|
|
|
8606
8621
|
});
|
|
8607
8622
|
}
|
|
8608
8623
|
}
|
|
8609
|
-
Hotkeys.ɵprov =
|
|
8624
|
+
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
8625
|
Hotkeys.decorators = [
|
|
8611
8626
|
{ type: Injectable, args: [{
|
|
8612
8627
|
providedIn: 'root'
|
|
@@ -8780,7 +8795,7 @@ class Base64ImageReader {
|
|
|
8780
8795
|
}
|
|
8781
8796
|
}
|
|
8782
8797
|
|
|
8783
|
-
const uuidv4 = uuidv4Imported;
|
|
8798
|
+
const uuidv4$1 = uuidv4Imported;
|
|
8784
8799
|
class FileService {
|
|
8785
8800
|
constructor(platform,
|
|
8786
8801
|
//private transfer: FileTransfer,
|
|
@@ -8817,7 +8832,7 @@ class FileService {
|
|
|
8817
8832
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8818
8833
|
if (lastSlashIndex === -1)
|
|
8819
8834
|
throw new Error('Invalid URL: ' + source);
|
|
8820
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8835
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
8821
8836
|
// Download into the file system
|
|
8822
8837
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8823
8838
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8873,7 +8888,7 @@ class FileService {
|
|
|
8873
8888
|
this._started = true;
|
|
8874
8889
|
}
|
|
8875
8890
|
}
|
|
8876
|
-
FileService.ɵprov =
|
|
8891
|
+
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
8892
|
FileService.decorators = [
|
|
8878
8893
|
{ type: Injectable, args: [{
|
|
8879
8894
|
providedIn: 'root',
|
|
@@ -9039,7 +9054,7 @@ class Base58 {
|
|
|
9039
9054
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9040
9055
|
|
|
9041
9056
|
const scrypt = require('scrypt-async');
|
|
9042
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
9057
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
9043
9058
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
9044
9059
|
const nacl = {
|
|
9045
9060
|
sign,
|
|
@@ -9143,7 +9158,7 @@ class CryptoService {
|
|
|
9143
9158
|
* Hash (using SHA256) a message
|
|
9144
9159
|
*/
|
|
9145
9160
|
sha256(message) {
|
|
9146
|
-
return sha256().update(message).digest('hex');
|
|
9161
|
+
return sha256$1().update(message).digest('hex');
|
|
9147
9162
|
}
|
|
9148
9163
|
/**
|
|
9149
9164
|
* Hash (using SHA512) a message
|
|
@@ -9156,7 +9171,7 @@ class CryptoService {
|
|
|
9156
9171
|
return nacl.util.encodeBase64(m);
|
|
9157
9172
|
}
|
|
9158
9173
|
}
|
|
9159
|
-
CryptoService.ɵprov =
|
|
9174
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9160
9175
|
CryptoService.decorators = [
|
|
9161
9176
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9162
9177
|
];
|
|
@@ -10384,7 +10399,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10384
10399
|
return page;
|
|
10385
10400
|
}
|
|
10386
10401
|
}
|
|
10387
|
-
LocalSettingsService.ɵprov =
|
|
10402
|
+
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
10403
|
LocalSettingsService.decorators = [
|
|
10389
10404
|
{ type: Injectable, args: [{
|
|
10390
10405
|
providedIn: 'root',
|
|
@@ -11042,7 +11057,7 @@ class NetworkService extends StartableService {
|
|
|
11042
11057
|
});
|
|
11043
11058
|
}
|
|
11044
11059
|
}
|
|
11045
|
-
NetworkService.ɵprov =
|
|
11060
|
+
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
11061
|
NetworkService.decorators = [
|
|
11047
11062
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11048
11063
|
];
|
|
@@ -11053,16 +11068,16 @@ NetworkService.ctorParameters = () => [
|
|
|
11053
11068
|
{ type: CryptoService },
|
|
11054
11069
|
{ type: Storage },
|
|
11055
11070
|
{ type: LocalSettingsService },
|
|
11056
|
-
{ type: CacheService
|
|
11071
|
+
{ type: CacheService },
|
|
11057
11072
|
{ type: HttpClient },
|
|
11058
11073
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
11059
|
-
{ type: Network
|
|
11060
|
-
{ type: SplashScreen
|
|
11074
|
+
{ type: Network, decorators: [{ type: Optional }] },
|
|
11075
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
11061
11076
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
11062
11077
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
11063
11078
|
];
|
|
11064
11079
|
|
|
11065
|
-
const ErrorCodes = {
|
|
11080
|
+
const ErrorCodes$2 = {
|
|
11066
11081
|
UNKNOWN_ERROR: 0,
|
|
11067
11082
|
LOAD_ACCOUNT_ERROR: 1,
|
|
11068
11083
|
BAD_PASSWORD: 2,
|
|
@@ -11414,7 +11429,7 @@ class EntityStore {
|
|
|
11414
11429
|
}
|
|
11415
11430
|
catch (err) {
|
|
11416
11431
|
console.error(err);
|
|
11417
|
-
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11432
|
+
throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11418
11433
|
}
|
|
11419
11434
|
}
|
|
11420
11435
|
// Emit update event
|
|
@@ -11988,7 +12003,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11988
12003
|
}
|
|
11989
12004
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11990
12005
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11991
|
-
EntitiesStorage.ɵprov =
|
|
12006
|
+
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
12007
|
EntitiesStorage.decorators = [
|
|
11993
12008
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11994
12009
|
];
|
|
@@ -12125,10 +12140,10 @@ function referentialToString(obj, properties) {
|
|
|
12125
12140
|
function referentialsToString(values, properties, separator) {
|
|
12126
12141
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12127
12142
|
}
|
|
12128
|
-
const ɵ0$
|
|
12143
|
+
const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12129
12144
|
const StatusList = Object.freeze([
|
|
12130
12145
|
{
|
|
12131
|
-
id: ɵ0$
|
|
12146
|
+
id: ɵ0$2,
|
|
12132
12147
|
icon: 'checkmark',
|
|
12133
12148
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12134
12149
|
},
|
|
@@ -12403,7 +12418,7 @@ function accountToString(data) {
|
|
|
12403
12418
|
(data.lastName || '')) || '';
|
|
12404
12419
|
}
|
|
12405
12420
|
|
|
12406
|
-
const uuidv4
|
|
12421
|
+
const uuidv4 = uuidv4Imported;
|
|
12407
12422
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12408
12423
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12409
12424
|
/**
|
|
@@ -12447,7 +12462,7 @@ function createTrackerLink(opts) {
|
|
|
12447
12462
|
// Skip if not tracked
|
|
12448
12463
|
if (!context || !context.tracked)
|
|
12449
12464
|
return forward(operation);
|
|
12450
|
-
const id = context.serializationKey || uuidv4
|
|
12465
|
+
const id = context.serializationKey || uuidv4();
|
|
12451
12466
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12452
12467
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12453
12468
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -13112,7 +13127,7 @@ class GraphqlService extends StartableService {
|
|
|
13112
13127
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
13113
13128
|
|| this.toAppError(err.networkError)
|
|
13114
13129
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
13115
|
-
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
13130
|
+
|| this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
|
|
13116
13131
|
// If graphQL: try to convert the first error found
|
|
13117
13132
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
13118
13133
|
|| this.toAppError(err)
|
|
@@ -13120,7 +13135,7 @@ class GraphqlService extends StartableService {
|
|
|
13120
13135
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
13121
13136
|
|| err;
|
|
13122
13137
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
13123
|
-
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13138
|
+
if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13124
13139
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
13125
13140
|
this.onNetworkError.next(error);
|
|
13126
13141
|
}
|
|
@@ -13156,7 +13171,7 @@ class GraphqlService extends StartableService {
|
|
|
13156
13171
|
return 'ERROR.UNAUTHORIZED';
|
|
13157
13172
|
case ServerErrorCodes.FORBIDDEN:
|
|
13158
13173
|
return 'ERROR.FORBIDDEN';
|
|
13159
|
-
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13174
|
+
case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
|
|
13160
13175
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13161
13176
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13162
13177
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13187,7 +13202,7 @@ class GraphqlService extends StartableService {
|
|
|
13187
13202
|
return undefined;
|
|
13188
13203
|
}
|
|
13189
13204
|
}
|
|
13190
|
-
GraphqlService.ɵprov =
|
|
13205
|
+
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
13206
|
GraphqlService.decorators = [
|
|
13192
13207
|
{ type: Injectable, args: [{
|
|
13193
13208
|
providedIn: 'root'
|
|
@@ -13204,7 +13219,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13204
13219
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13205
13220
|
];
|
|
13206
13221
|
|
|
13207
|
-
const sha256
|
|
13222
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13208
13223
|
class BaseGraphqlServiceOptions {
|
|
13209
13224
|
}
|
|
13210
13225
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13355,8 +13370,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13355
13370
|
}
|
|
13356
13371
|
/* -- protected methods -- */
|
|
13357
13372
|
computeMutableWatchQueryId(opts) {
|
|
13358
|
-
const queryName = opts.queryName || sha256
|
|
13359
|
-
const variablesKey = opts.variables && sha256
|
|
13373
|
+
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13374
|
+
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13360
13375
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13361
13376
|
}
|
|
13362
13377
|
findMutableWatchQueries(opts) {
|
|
@@ -13422,7 +13437,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13422
13437
|
/* ------------------------------------
|
|
13423
13438
|
* GraphQL queries
|
|
13424
13439
|
* ------------------------------------*/
|
|
13425
|
-
const Fragments = {
|
|
13440
|
+
const Fragments$1 = {
|
|
13426
13441
|
account: gql `
|
|
13427
13442
|
fragment AccountFragment on AccountVO {
|
|
13428
13443
|
id
|
|
@@ -13457,14 +13472,14 @@ const Fragments = {
|
|
|
13457
13472
|
}`
|
|
13458
13473
|
};
|
|
13459
13474
|
// Load account query
|
|
13460
|
-
const LoadQuery = gql `
|
|
13475
|
+
const LoadQuery$1 = gql `
|
|
13461
13476
|
query Account {
|
|
13462
13477
|
data: account {
|
|
13463
13478
|
...AccountFragment
|
|
13464
13479
|
}
|
|
13465
13480
|
}
|
|
13466
|
-
${Fragments.account}
|
|
13467
|
-
${Fragments.settings}
|
|
13481
|
+
${Fragments$1.account}
|
|
13482
|
+
${Fragments$1.settings}
|
|
13468
13483
|
`;
|
|
13469
13484
|
// Check email query
|
|
13470
13485
|
const IsEmailExistsQuery = gql `
|
|
@@ -13479,21 +13494,21 @@ const AccountMutations = {
|
|
|
13479
13494
|
...AccountFragment
|
|
13480
13495
|
}
|
|
13481
13496
|
}
|
|
13482
|
-
${Fragments.account}
|
|
13483
|
-
${Fragments.settings}`,
|
|
13497
|
+
${Fragments$1.account}
|
|
13498
|
+
${Fragments$1.settings}`,
|
|
13484
13499
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
13485
13500
|
data: createAccount(account: $data){
|
|
13486
13501
|
...AccountFragment
|
|
13487
13502
|
}
|
|
13488
13503
|
}
|
|
13489
|
-
${Fragments.account}
|
|
13490
|
-
${Fragments.settings}`,
|
|
13504
|
+
${Fragments$1.account}
|
|
13505
|
+
${Fragments$1.settings}`,
|
|
13491
13506
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
13492
13507
|
data: saveSettings(settings: $data){
|
|
13493
13508
|
...UserSettingsFragment
|
|
13494
13509
|
}
|
|
13495
13510
|
}
|
|
13496
|
-
${Fragments.settings}`
|
|
13511
|
+
${Fragments$1.settings}`
|
|
13497
13512
|
};
|
|
13498
13513
|
// Sent confirmation email
|
|
13499
13514
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13802,7 +13817,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13802
13817
|
catch (error) {
|
|
13803
13818
|
console.error(error);
|
|
13804
13819
|
this.resetData();
|
|
13805
|
-
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13820
|
+
throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13806
13821
|
}
|
|
13807
13822
|
// Store pubkey+keypair
|
|
13808
13823
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13836,7 +13851,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13836
13851
|
}
|
|
13837
13852
|
catch (err) {
|
|
13838
13853
|
// If account not found, check if email is valid
|
|
13839
|
-
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13854
|
+
if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
|
|
13840
13855
|
// Check email exists
|
|
13841
13856
|
if (data.username.indexOf('@') !== -1) {
|
|
13842
13857
|
let isEmailExists;
|
|
@@ -13848,11 +13863,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13848
13863
|
}
|
|
13849
13864
|
// Email not exists (no account)
|
|
13850
13865
|
if (!isEmailExists) {
|
|
13851
|
-
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13866
|
+
throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13852
13867
|
}
|
|
13853
13868
|
}
|
|
13854
13869
|
// Email exists, so error = 'bad password'
|
|
13855
|
-
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13870
|
+
throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13856
13871
|
}
|
|
13857
13872
|
throw err; // resend the first error
|
|
13858
13873
|
}
|
|
@@ -13977,8 +13992,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13977
13992
|
// Load remotely
|
|
13978
13993
|
else {
|
|
13979
13994
|
const { data } = yield this.graphql.query({
|
|
13980
|
-
query: LoadQuery,
|
|
13981
|
-
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13995
|
+
query: LoadQuery$1,
|
|
13996
|
+
error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13982
13997
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13983
13998
|
});
|
|
13984
13999
|
json = data;
|
|
@@ -14005,7 +14020,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14005
14020
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14006
14021
|
const isEmailExists = yield this.isEmailExists(email);
|
|
14007
14022
|
if (isEmailExists) {
|
|
14008
|
-
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14023
|
+
throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14009
14024
|
}
|
|
14010
14025
|
});
|
|
14011
14026
|
}
|
|
@@ -14041,7 +14056,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14041
14056
|
locale
|
|
14042
14057
|
},
|
|
14043
14058
|
error: {
|
|
14044
|
-
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14059
|
+
code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14045
14060
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
14046
14061
|
}
|
|
14047
14062
|
});
|
|
@@ -14057,7 +14072,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14057
14072
|
code
|
|
14058
14073
|
},
|
|
14059
14074
|
error: {
|
|
14060
|
-
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
14075
|
+
code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
|
|
14061
14076
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
14062
14077
|
}
|
|
14063
14078
|
});
|
|
@@ -14075,7 +14090,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14075
14090
|
interval: 10
|
|
14076
14091
|
},
|
|
14077
14092
|
error: {
|
|
14078
|
-
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
14093
|
+
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
14079
14094
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
14080
14095
|
}
|
|
14081
14096
|
}).subscribe({
|
|
@@ -14176,7 +14191,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14176
14191
|
throw error;
|
|
14177
14192
|
console.error(error);
|
|
14178
14193
|
throw {
|
|
14179
|
-
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14194
|
+
code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
|
|
14180
14195
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14181
14196
|
};
|
|
14182
14197
|
}
|
|
@@ -14344,7 +14359,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14344
14359
|
if (!isNew) {
|
|
14345
14360
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14346
14361
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14347
|
-
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14362
|
+
throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14348
14363
|
}
|
|
14349
14364
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14350
14365
|
}
|
|
@@ -14356,7 +14371,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14356
14371
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14357
14372
|
variables: { data: json },
|
|
14358
14373
|
error: {
|
|
14359
|
-
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14374
|
+
code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
|
|
14360
14375
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14361
14376
|
}
|
|
14362
14377
|
});
|
|
@@ -14383,7 +14398,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14383
14398
|
mutation: AccountMutations.saveSettings,
|
|
14384
14399
|
variables: { data: json },
|
|
14385
14400
|
error: {
|
|
14386
|
-
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14401
|
+
code: ErrorCodes$2.SAVE_SETTINGS_ERROR,
|
|
14387
14402
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14388
14403
|
}
|
|
14389
14404
|
});
|
|
@@ -14405,7 +14420,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14405
14420
|
if (counter > 4) {
|
|
14406
14421
|
if (this._debug)
|
|
14407
14422
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14408
|
-
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14423
|
+
throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14409
14424
|
}
|
|
14410
14425
|
// Check if valid
|
|
14411
14426
|
if (token) {
|
|
@@ -14415,7 +14430,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14415
14430
|
token
|
|
14416
14431
|
},
|
|
14417
14432
|
error: {
|
|
14418
|
-
code: ErrorCodes.UNAUTHORIZED,
|
|
14433
|
+
code: ErrorCodes$2.UNAUTHORIZED,
|
|
14419
14434
|
message: 'ERROR.UNAUTHORIZED'
|
|
14420
14435
|
},
|
|
14421
14436
|
fetchPolicy: 'no-cache'
|
|
@@ -14431,7 +14446,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14431
14446
|
}
|
|
14432
14447
|
// Generate a new token
|
|
14433
14448
|
const challengeError = {
|
|
14434
|
-
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14449
|
+
code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
|
|
14435
14450
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14436
14451
|
};
|
|
14437
14452
|
const data = yield this.graphql.query({
|
|
@@ -14470,7 +14485,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14470
14485
|
target.updateDate = source.updateDate || target.updateDate;
|
|
14471
14486
|
}
|
|
14472
14487
|
}
|
|
14473
|
-
AccountService.ɵprov =
|
|
14488
|
+
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
14489
|
AccountService.decorators = [
|
|
14475
14490
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14476
14491
|
];
|
|
@@ -14730,7 +14745,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
14730
14745
|
/* ------------------------------------
|
|
14731
14746
|
* GraphQL queries
|
|
14732
14747
|
* ------------------------------------*/
|
|
14733
|
-
const Fragments
|
|
14748
|
+
const Fragments = {
|
|
14734
14749
|
config: gql `
|
|
14735
14750
|
fragment ConfigFragment on ConfigurationVO {
|
|
14736
14751
|
id
|
|
@@ -14757,13 +14772,13 @@ const Fragments$1 = {
|
|
|
14757
14772
|
}
|
|
14758
14773
|
`
|
|
14759
14774
|
};
|
|
14760
|
-
const LoadQuery
|
|
14775
|
+
const LoadQuery = gql `
|
|
14761
14776
|
query Configuration{
|
|
14762
14777
|
data: configuration{
|
|
14763
14778
|
...ConfigFragment
|
|
14764
14779
|
}
|
|
14765
14780
|
}
|
|
14766
|
-
${Fragments
|
|
14781
|
+
${Fragments.config}
|
|
14767
14782
|
`;
|
|
14768
14783
|
// Save (create or update) account mutation
|
|
14769
14784
|
const SaveMutation = gql `
|
|
@@ -14772,7 +14787,7 @@ const SaveMutation = gql `
|
|
|
14772
14787
|
...ConfigFragment
|
|
14773
14788
|
}
|
|
14774
14789
|
}
|
|
14775
|
-
${Fragments
|
|
14790
|
+
${Fragments.config}
|
|
14776
14791
|
`;
|
|
14777
14792
|
const ClearCache = gql `
|
|
14778
14793
|
query ClearCache($name: String) {
|
|
@@ -14822,12 +14837,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14822
14837
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14823
14838
|
const now = Date.now();
|
|
14824
14839
|
console.debug('[config] Loading Pod configuration...');
|
|
14825
|
-
const query = opts && opts.query || LoadQuery
|
|
14840
|
+
const query = opts && opts.query || LoadQuery;
|
|
14826
14841
|
const variables = opts && opts.variables || undefined;
|
|
14827
14842
|
const res = yield this.graphql.query({
|
|
14828
14843
|
query,
|
|
14829
14844
|
variables,
|
|
14830
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14845
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14831
14846
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14832
14847
|
});
|
|
14833
14848
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14857,7 +14872,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14857
14872
|
data: json
|
|
14858
14873
|
},
|
|
14859
14874
|
error: {
|
|
14860
|
-
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14875
|
+
code: ErrorCodes$2.SAVE_CONFIG_ERROR,
|
|
14861
14876
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14862
14877
|
}
|
|
14863
14878
|
});
|
|
@@ -14883,7 +14898,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14883
14898
|
const res = yield this.graphql.query({
|
|
14884
14899
|
query: CacheStatistics,
|
|
14885
14900
|
variables: null,
|
|
14886
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14901
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14887
14902
|
fetchPolicy: 'network-only'
|
|
14888
14903
|
});
|
|
14889
14904
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14899,7 +14914,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14899
14914
|
const res = yield this.graphql.query({
|
|
14900
14915
|
query: ClearCache,
|
|
14901
14916
|
variables,
|
|
14902
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14917
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14903
14918
|
fetchPolicy: 'network-only'
|
|
14904
14919
|
});
|
|
14905
14920
|
const data = res && res.clearCache || undefined;
|
|
@@ -15058,7 +15073,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15058
15073
|
});
|
|
15059
15074
|
}
|
|
15060
15075
|
}
|
|
15061
|
-
ConfigService.ɵprov =
|
|
15076
|
+
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(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
15062
15077
|
ConfigService.decorators = [
|
|
15063
15078
|
{ type: Injectable, args: [{
|
|
15064
15079
|
providedIn: 'root',
|
|
@@ -15077,7 +15092,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15077
15092
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15078
15093
|
];
|
|
15079
15094
|
|
|
15080
|
-
const moment$
|
|
15095
|
+
const moment$2 = momentImported;
|
|
15081
15096
|
class PlatformService extends StartableService {
|
|
15082
15097
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
15083
15098
|
super(platform);
|
|
@@ -15281,16 +15296,16 @@ class PlatformService extends StartableService {
|
|
|
15281
15296
|
}
|
|
15282
15297
|
// config moment lib
|
|
15283
15298
|
try {
|
|
15284
|
-
moment$
|
|
15299
|
+
moment$2.locale(event.lang);
|
|
15285
15300
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15286
15301
|
}
|
|
15287
15302
|
// If error, fallback to en
|
|
15288
15303
|
catch (err) {
|
|
15289
|
-
moment$
|
|
15304
|
+
moment$2.locale('en');
|
|
15290
15305
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15291
15306
|
}
|
|
15292
15307
|
// Config date adapter
|
|
15293
|
-
this.dateAdapter.setLocale(moment$
|
|
15308
|
+
this.dateAdapter.setLocale(moment$2.locale());
|
|
15294
15309
|
}
|
|
15295
15310
|
});
|
|
15296
15311
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15424,7 +15439,7 @@ class PlatformService extends StartableService {
|
|
|
15424
15439
|
});
|
|
15425
15440
|
}
|
|
15426
15441
|
}
|
|
15427
|
-
PlatformService.ɵprov =
|
|
15442
|
+
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
15443
|
PlatformService.decorators = [
|
|
15429
15444
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15430
15445
|
];
|
|
@@ -15439,15 +15454,15 @@ PlatformService.ctorParameters = () => [
|
|
|
15439
15454
|
{ type: NetworkService },
|
|
15440
15455
|
{ type: AccountService },
|
|
15441
15456
|
{ type: ConfigService },
|
|
15442
|
-
{ type: CacheService
|
|
15457
|
+
{ type: CacheService },
|
|
15443
15458
|
{ type: Storage },
|
|
15444
15459
|
{ type: AudioProvider },
|
|
15445
15460
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
15446
|
-
{ type: StatusBar
|
|
15461
|
+
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
15447
15462
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
15448
|
-
{ type: SplashScreen
|
|
15449
|
-
{ type: InAppBrowser
|
|
15450
|
-
{ type: Downloader
|
|
15463
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
15464
|
+
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
15465
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
15451
15466
|
];
|
|
15452
15467
|
|
|
15453
15468
|
class AppHelpModal {
|
|
@@ -15511,7 +15526,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
15511
15526
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
15512
15527
|
}
|
|
15513
15528
|
}
|
|
15514
|
-
MatStepperI18n.ɵprov =
|
|
15529
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
15515
15530
|
MatStepperI18n.decorators = [
|
|
15516
15531
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
15517
15532
|
];
|
|
@@ -16513,7 +16528,7 @@ function state2side(state) {
|
|
|
16513
16528
|
return 1;
|
|
16514
16529
|
}
|
|
16515
16530
|
}
|
|
16516
|
-
const ɵ0$
|
|
16531
|
+
const ɵ0$1 = (defaultStateSize) => [
|
|
16517
16532
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
16518
16533
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
16519
16534
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -16521,7 +16536,7 @@ const ɵ0$a = (defaultStateSize) => [
|
|
|
16521
16536
|
const SCALE_OPTIONS_DEFAULT = {
|
|
16522
16537
|
startColor: rgbArrayMap.red,
|
|
16523
16538
|
startStates: [0, 2, 3],
|
|
16524
|
-
startStepsFn: ɵ0$
|
|
16539
|
+
startStepsFn: ɵ0$1
|
|
16525
16540
|
};
|
|
16526
16541
|
/**
|
|
16527
16542
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -16613,21 +16628,21 @@ function linearColorGradient(count, options) {
|
|
|
16613
16628
|
return result;
|
|
16614
16629
|
}
|
|
16615
16630
|
|
|
16616
|
-
class EntityTestClass {
|
|
16631
|
+
class EntityTestClass$1 {
|
|
16617
16632
|
}
|
|
16618
|
-
const FAKE_ENTITIES = [
|
|
16633
|
+
const FAKE_ENTITIES$1 = [
|
|
16619
16634
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
16620
16635
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
16621
16636
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
16622
16637
|
];
|
|
16623
|
-
function deepCopy(values, size) {
|
|
16638
|
+
function deepCopy$1(values, size) {
|
|
16624
16639
|
if (isNil(size)) {
|
|
16625
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16640
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16626
16641
|
}
|
|
16627
16642
|
let result = [];
|
|
16628
16643
|
let i = 1;
|
|
16629
16644
|
while (result.length < size) {
|
|
16630
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
16645
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
16631
16646
|
const name = entity.name + ' #' + i;
|
|
16632
16647
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
16633
16648
|
}));
|
|
@@ -16637,7 +16652,7 @@ function deepCopy(values, size) {
|
|
|
16637
16652
|
class AutocompleteTestPage {
|
|
16638
16653
|
constructor(formBuilder) {
|
|
16639
16654
|
this.formBuilder = formBuilder;
|
|
16640
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
16655
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
16641
16656
|
this._$items = new BehaviorSubject(undefined);
|
|
16642
16657
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16643
16658
|
this.memoryHide = false;
|
|
@@ -16681,7 +16696,7 @@ class AutocompleteTestPage {
|
|
|
16681
16696
|
});
|
|
16682
16697
|
// From items
|
|
16683
16698
|
this.autocompleteFields.add('entity-items-large', {
|
|
16684
|
-
items: FAKE_ENTITIES.slice(),
|
|
16699
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
16685
16700
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
16686
16701
|
displayWith: this.entityToString
|
|
16687
16702
|
});
|
|
@@ -16691,12 +16706,12 @@ class AutocompleteTestPage {
|
|
|
16691
16706
|
loadData() {
|
|
16692
16707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16693
16708
|
const data = {
|
|
16694
|
-
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
16709
|
+
entity: deepCopy$1(FAKE_ENTITIES$1)[0],
|
|
16695
16710
|
// This item is NOT in the items list => i should be displayed anyway
|
|
16696
16711
|
missingEntity: {
|
|
16697
16712
|
id: -1, label: '??', name: 'Missing item'
|
|
16698
16713
|
},
|
|
16699
|
-
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
16714
|
+
disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
|
|
16700
16715
|
};
|
|
16701
16716
|
this.form.setValue(data);
|
|
16702
16717
|
// Load observables
|
|
@@ -16869,13 +16884,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16869
16884
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16870
16885
|
];
|
|
16871
16886
|
|
|
16872
|
-
const moment$
|
|
16887
|
+
const moment$1 = momentImported;
|
|
16873
16888
|
class SwipeTestPage {
|
|
16874
16889
|
constructor(formBuilder, dateFormatPipe) {
|
|
16875
16890
|
this.formBuilder = formBuilder;
|
|
16876
16891
|
this.dateFormatPipe = dateFormatPipe;
|
|
16877
16892
|
this.$dates = new BehaviorSubject(undefined);
|
|
16878
|
-
this._today = moment$
|
|
16893
|
+
this._today = moment$1().startOf('day');
|
|
16879
16894
|
this.form = formBuilder.group({
|
|
16880
16895
|
empty: [null, Validators.required],
|
|
16881
16896
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16888,7 +16903,7 @@ class SwipeTestPage {
|
|
|
16888
16903
|
ngOnInit() {
|
|
16889
16904
|
const dates = [];
|
|
16890
16905
|
for (let d = 0; d < 7; d++) {
|
|
16891
|
-
dates[d] = moment$
|
|
16906
|
+
dates[d] = moment$1(this._today).add(d - 3, 'day');
|
|
16892
16907
|
}
|
|
16893
16908
|
this.$dates.next(dates);
|
|
16894
16909
|
this.loadData();
|
|
@@ -16929,7 +16944,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16929
16944
|
{ type: DateFormatPipe }
|
|
16930
16945
|
];
|
|
16931
16946
|
|
|
16932
|
-
const moment
|
|
16947
|
+
const moment = momentImported;
|
|
16933
16948
|
class DateTimeTestPage {
|
|
16934
16949
|
constructor(platform, formBuilder, cd) {
|
|
16935
16950
|
this.platform = platform;
|
|
@@ -16961,7 +16976,7 @@ class DateTimeTestPage {
|
|
|
16961
16976
|
// Load the form with data
|
|
16962
16977
|
loadData() {
|
|
16963
16978
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16964
|
-
const now = moment
|
|
16979
|
+
const now = moment();
|
|
16965
16980
|
const data = {
|
|
16966
16981
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16967
16982
|
enable: toDateISOString(now),
|
|
@@ -17022,9 +17037,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
17022
17037
|
{ type: ChangeDetectorRef }
|
|
17023
17038
|
];
|
|
17024
17039
|
|
|
17025
|
-
class EntityTestClass
|
|
17040
|
+
class EntityTestClass {
|
|
17026
17041
|
}
|
|
17027
|
-
const FAKE_ENTITIES
|
|
17042
|
+
const FAKE_ENTITIES = [
|
|
17028
17043
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
17029
17044
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
17030
17045
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -17033,14 +17048,14 @@ const FAKE_ENTITIES$1 = [
|
|
|
17033
17048
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
17034
17049
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
17035
17050
|
];
|
|
17036
|
-
function deepCopy
|
|
17051
|
+
function deepCopy(values, size) {
|
|
17037
17052
|
if (isNil(size)) {
|
|
17038
|
-
return (values || FAKE_ENTITIES
|
|
17053
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
17039
17054
|
}
|
|
17040
17055
|
let result = [];
|
|
17041
17056
|
let i = 1;
|
|
17042
17057
|
while (result.length < size) {
|
|
17043
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
17058
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
17044
17059
|
const name = entity.name + ' #' + i;
|
|
17045
17060
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
17046
17061
|
}));
|
|
@@ -17050,7 +17065,7 @@ function deepCopy$1(values, size) {
|
|
|
17050
17065
|
class ChipsTestPage {
|
|
17051
17066
|
constructor(formBuilder) {
|
|
17052
17067
|
this.formBuilder = formBuilder;
|
|
17053
|
-
this._items = deepCopy
|
|
17068
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
17054
17069
|
this._$items = new BehaviorSubject(undefined);
|
|
17055
17070
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
17056
17071
|
this.form = formBuilder.group({
|
|
@@ -17089,7 +17104,7 @@ class ChipsTestPage {
|
|
|
17089
17104
|
// Load the form with data
|
|
17090
17105
|
loadData() {
|
|
17091
17106
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17092
|
-
const items = deepCopy
|
|
17107
|
+
const items = deepCopy(FAKE_ENTITIES);
|
|
17093
17108
|
const data = {
|
|
17094
17109
|
entity: items.slice(0, 1),
|
|
17095
17110
|
entityInitial: items.slice(1, 2),
|
|
@@ -17165,7 +17180,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
17165
17180
|
},] }
|
|
17166
17181
|
];
|
|
17167
17182
|
|
|
17168
|
-
const routes = [
|
|
17183
|
+
const routes$1 = [
|
|
17169
17184
|
{
|
|
17170
17185
|
path: '',
|
|
17171
17186
|
pathMatch: 'full',
|
|
@@ -17217,7 +17232,7 @@ MaterialTestingModule.decorators = [
|
|
|
17217
17232
|
ReactiveFormsModule,
|
|
17218
17233
|
SharedMaterialModule,
|
|
17219
17234
|
TranslateModule.forChild(),
|
|
17220
|
-
RouterModule.forChild(routes)
|
|
17235
|
+
RouterModule.forChild(routes$1)
|
|
17221
17236
|
],
|
|
17222
17237
|
declarations: [
|
|
17223
17238
|
MaterialTestingPage,
|
|
@@ -18232,7 +18247,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18232
18247
|
});
|
|
18233
18248
|
}
|
|
18234
18249
|
}
|
|
18235
|
-
UserSettingsValidatorService.ɵprov =
|
|
18250
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18236
18251
|
UserSettingsValidatorService.decorators = [
|
|
18237
18252
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18238
18253
|
];
|
|
@@ -18276,7 +18291,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18276
18291
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18277
18292
|
}
|
|
18278
18293
|
}
|
|
18279
|
-
AccountValidatorService.ɵprov =
|
|
18294
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18280
18295
|
AccountValidatorService.decorators = [
|
|
18281
18296
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18282
18297
|
];
|
|
@@ -18841,7 +18856,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
18841
18856
|
});
|
|
18842
18857
|
}
|
|
18843
18858
|
}
|
|
18844
|
-
LocalSettingsValidatorService.ɵprov =
|
|
18859
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
18845
18860
|
LocalSettingsValidatorService.decorators = [
|
|
18846
18861
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18847
18862
|
];
|
|
@@ -19460,7 +19475,7 @@ class IsOnFieldModePipe {
|
|
|
19460
19475
|
return value === 'FIELD';
|
|
19461
19476
|
}
|
|
19462
19477
|
}
|
|
19463
|
-
IsOnFieldModePipe.ɵprov =
|
|
19478
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
19464
19479
|
IsOnFieldModePipe.decorators = [
|
|
19465
19480
|
{ type: Pipe, args: [{
|
|
19466
19481
|
name: 'isOnField'
|
|
@@ -19472,7 +19487,7 @@ class IsNotOnFieldModePipe {
|
|
|
19472
19487
|
return value !== 'FIELD';
|
|
19473
19488
|
}
|
|
19474
19489
|
}
|
|
19475
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
19490
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
19476
19491
|
IsNotOnFieldModePipe.decorators = [
|
|
19477
19492
|
{ type: Pipe, args: [{
|
|
19478
19493
|
name: 'isNotOnField'
|
|
@@ -19487,7 +19502,7 @@ class PersonToStringPipe {
|
|
|
19487
19502
|
return PersonUtils.personToString(value);
|
|
19488
19503
|
}
|
|
19489
19504
|
}
|
|
19490
|
-
PersonToStringPipe.ɵprov =
|
|
19505
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
19491
19506
|
PersonToStringPipe.decorators = [
|
|
19492
19507
|
{ type: Pipe, args: [{
|
|
19493
19508
|
name: 'personToString'
|
|
@@ -19872,7 +19887,7 @@ class IsLoginAccountPipe {
|
|
|
19872
19887
|
return value && value.pubkey && true;
|
|
19873
19888
|
}
|
|
19874
19889
|
}
|
|
19875
|
-
IsLoginAccountPipe.ɵprov =
|
|
19890
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
19876
19891
|
IsLoginAccountPipe.decorators = [
|
|
19877
19892
|
{ type: Pipe, args: [{
|
|
19878
19893
|
name: 'isLogin'
|
|
@@ -19884,7 +19899,7 @@ class AccountToStringPipe {
|
|
|
19884
19899
|
return accountToString(value);
|
|
19885
19900
|
}
|
|
19886
19901
|
}
|
|
19887
|
-
AccountToStringPipe.ɵprov =
|
|
19902
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
19888
19903
|
AccountToStringPipe.decorators = [
|
|
19889
19904
|
{ type: Pipe, args: [{
|
|
19890
19905
|
name: 'accountToString'
|
|
@@ -19899,7 +19914,7 @@ class DepartmentToStringPipe {
|
|
|
19899
19914
|
return departmentToString(value);
|
|
19900
19915
|
}
|
|
19901
19916
|
}
|
|
19902
|
-
DepartmentToStringPipe.ɵprov =
|
|
19917
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
19903
19918
|
DepartmentToStringPipe.decorators = [
|
|
19904
19919
|
{ type: Pipe, args: [{
|
|
19905
19920
|
name: 'departmentToString'
|
|
@@ -19925,7 +19940,7 @@ class MenuService {
|
|
|
19925
19940
|
this._visibleSubject.next(value);
|
|
19926
19941
|
}
|
|
19927
19942
|
}
|
|
19928
|
-
MenuService.ɵprov =
|
|
19943
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19929
19944
|
MenuService.decorators = [
|
|
19930
19945
|
{ type: Injectable, args: [{
|
|
19931
19946
|
providedIn: 'root'
|
|
@@ -20449,7 +20464,7 @@ class AuthGuardService {
|
|
|
20449
20464
|
}));
|
|
20450
20465
|
}
|
|
20451
20466
|
}
|
|
20452
|
-
AuthGuardService.ɵprov =
|
|
20467
|
+
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
20468
|
AuthGuardService.decorators = [
|
|
20454
20469
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
20455
20470
|
];
|
|
@@ -20491,7 +20506,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20491
20506
|
query,
|
|
20492
20507
|
variables: { id },
|
|
20493
20508
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20494
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20509
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20495
20510
|
})
|
|
20496
20511
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
20497
20512
|
? (data && this.fromObject(data))
|
|
@@ -20506,7 +20521,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20506
20521
|
query,
|
|
20507
20522
|
variables: { id },
|
|
20508
20523
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
20509
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20524
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
20510
20525
|
});
|
|
20511
20526
|
// Convert to entity
|
|
20512
20527
|
return (!opts || opts.toEntity !== false)
|
|
@@ -20537,7 +20552,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20537
20552
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
20538
20553
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
20539
20554
|
variables,
|
|
20540
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
20555
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
20541
20556
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
20542
20557
|
})
|
|
20543
20558
|
.pipe(map(({ data, total }) => {
|
|
@@ -20573,7 +20588,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20573
20588
|
const { data, total } = yield this.graphql.query({
|
|
20574
20589
|
query,
|
|
20575
20590
|
variables,
|
|
20576
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
20591
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
20577
20592
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20578
20593
|
});
|
|
20579
20594
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -20612,7 +20627,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20612
20627
|
variables: {
|
|
20613
20628
|
filter: filter && filter.asPodObject()
|
|
20614
20629
|
},
|
|
20615
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
20630
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
20616
20631
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
20617
20632
|
});
|
|
20618
20633
|
return res.total;
|
|
@@ -20645,7 +20660,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20645
20660
|
variables: {
|
|
20646
20661
|
data: json
|
|
20647
20662
|
},
|
|
20648
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20663
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20649
20664
|
update: (proxy, { data }) => {
|
|
20650
20665
|
const savedEntities = data && data.data;
|
|
20651
20666
|
if (savedEntities) {
|
|
@@ -20701,7 +20716,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20701
20716
|
variables: {
|
|
20702
20717
|
data: json
|
|
20703
20718
|
},
|
|
20704
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20719
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
20705
20720
|
update: (cache, { data }) => {
|
|
20706
20721
|
// Update entity
|
|
20707
20722
|
const savedEntity = data && data.data;
|
|
@@ -20749,7 +20764,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20749
20764
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20750
20765
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20751
20766
|
variables: { ids },
|
|
20752
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20767
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20753
20768
|
update: (cache, res) => {
|
|
20754
20769
|
// Remove from cache
|
|
20755
20770
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20790,7 +20805,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20790
20805
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
20791
20806
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
20792
20807
|
variables: { id },
|
|
20793
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20808
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
20794
20809
|
update: (proxy, res) => {
|
|
20795
20810
|
// Remove from cache
|
|
20796
20811
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -20823,7 +20838,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
20823
20838
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
20824
20839
|
variables,
|
|
20825
20840
|
error: {
|
|
20826
|
-
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
20841
|
+
code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
|
|
20827
20842
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
20828
20843
|
}
|
|
20829
20844
|
})
|
|
@@ -21009,7 +21024,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
21009
21024
|
if (this._debug)
|
|
21010
21025
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
21011
21026
|
// Stop with an error
|
|
21012
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21027
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21013
21028
|
}
|
|
21014
21029
|
this._editingRowCount = 0;
|
|
21015
21030
|
let data;
|
|
@@ -21873,14 +21888,14 @@ class AppTable {
|
|
|
21873
21888
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21874
21889
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
21875
21890
|
if (this.readOnly) {
|
|
21876
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21891
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21877
21892
|
}
|
|
21878
21893
|
this.resetError();
|
|
21879
21894
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
21880
21895
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
21881
21896
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
21882
21897
|
if (!this.confirmEditCreate()) {
|
|
21883
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21898
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21884
21899
|
}
|
|
21885
21900
|
// Mark as saving
|
|
21886
21901
|
this.markAsSaving();
|
|
@@ -21997,7 +22012,7 @@ class AppTable {
|
|
|
21997
22012
|
var _a;
|
|
21998
22013
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21999
22014
|
if (this.readOnly) {
|
|
22000
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22015
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22001
22016
|
}
|
|
22002
22017
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
22003
22018
|
return 0; // SKip
|
|
@@ -23500,7 +23515,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23500
23515
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23501
23516
|
if (!this.dataService)
|
|
23502
23517
|
throw new Error('Cannot load data: missing \'dataService\'!');
|
|
23503
|
-
this.
|
|
23518
|
+
this.resetError();
|
|
23504
23519
|
// New data
|
|
23505
23520
|
if (isNil(id)) {
|
|
23506
23521
|
try {
|
|
@@ -23511,7 +23526,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23511
23526
|
yield this.updateView(data, Object.assign({ openTabIndex: 0 }, opts));
|
|
23512
23527
|
}
|
|
23513
23528
|
catch (err) {
|
|
23514
|
-
this.setError(err);
|
|
23529
|
+
this.setError(err, { emitEvent: false });
|
|
23515
23530
|
this.selectedTabIndex = 0;
|
|
23516
23531
|
}
|
|
23517
23532
|
finally {
|
|
@@ -23523,7 +23538,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23523
23538
|
try {
|
|
23524
23539
|
const data = yield this.dataService.load(id, opts);
|
|
23525
23540
|
if (!data)
|
|
23526
|
-
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
23541
|
+
throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
23527
23542
|
this._usageMode = this.computeUsageMode(data);
|
|
23528
23543
|
yield this.onEntityLoaded(data, opts);
|
|
23529
23544
|
yield this.updateView(data, opts);
|
|
@@ -23691,7 +23706,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23691
23706
|
return false;
|
|
23692
23707
|
}
|
|
23693
23708
|
this.markAsSaving();
|
|
23694
|
-
this.
|
|
23709
|
+
this.resetError();
|
|
23695
23710
|
if (this.debug)
|
|
23696
23711
|
console.debug('[data-editor] Saving data...');
|
|
23697
23712
|
try {
|
|
@@ -23766,7 +23781,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23766
23781
|
return;
|
|
23767
23782
|
console.debug('[data-editor] Asking to delete...');
|
|
23768
23783
|
this.markAsSaving();
|
|
23769
|
-
this.
|
|
23784
|
+
this.resetError();
|
|
23770
23785
|
try {
|
|
23771
23786
|
// Get data
|
|
23772
23787
|
const data = yield this.getValue();
|
|
@@ -23814,17 +23829,35 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
23814
23829
|
}
|
|
23815
23830
|
});
|
|
23816
23831
|
}
|
|
23817
|
-
|
|
23818
|
-
|
|
23819
|
-
|
|
23820
|
-
|
|
23821
|
-
|
|
23822
|
-
|
|
23823
|
-
|
|
23824
|
-
|
|
23825
|
-
|
|
23832
|
+
resetError(opts) {
|
|
23833
|
+
if (isNotNilOrBlank(this.error)) {
|
|
23834
|
+
this.error = null;
|
|
23835
|
+
if (!opts || opts.emitEvent !== false)
|
|
23836
|
+
this.markForCheck();
|
|
23837
|
+
}
|
|
23838
|
+
}
|
|
23839
|
+
setError(err, opts) {
|
|
23840
|
+
if (!err || typeof err === 'string') {
|
|
23841
|
+
console.error('[entity-editor] Error: ' + (err || ''));
|
|
23842
|
+
this.error = err;
|
|
23843
|
+
}
|
|
23844
|
+
else {
|
|
23845
|
+
console.error('[entity-editor] Error: ' + err.message || '', err);
|
|
23846
|
+
let userMessage = err.message && this.translate.instant(err.message) || err;
|
|
23847
|
+
// Add details error (if any) under the main message
|
|
23848
|
+
const detailMessage = (!err.details || typeof err.details === 'string')
|
|
23849
|
+
? err.details
|
|
23850
|
+
: err.details.message;
|
|
23851
|
+
if (isNotNilOrBlank(detailMessage)) {
|
|
23852
|
+
const cssClass = (opts === null || opts === void 0 ? void 0 : opts.detailsCssClass) || 'hidden-xs hidden-sm';
|
|
23853
|
+
userMessage += `<br/><small class="${cssClass}" title="${detailMessage}">`;
|
|
23854
|
+
userMessage += detailMessage.length < 70 ? detailMessage : detailMessage.substring(0, 67) + '...';
|
|
23855
|
+
userMessage += '</small>';
|
|
23856
|
+
}
|
|
23857
|
+
this.error = userMessage;
|
|
23826
23858
|
}
|
|
23827
|
-
|
|
23859
|
+
if (!opts || opts.emitEvent !== false)
|
|
23860
|
+
this.markForCheck();
|
|
23828
23861
|
}
|
|
23829
23862
|
/* -- protected methods -- */
|
|
23830
23863
|
/**
|
|
@@ -24428,7 +24461,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24428
24461
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
24429
24462
|
}
|
|
24430
24463
|
}
|
|
24431
|
-
UserEventService.ɵprov =
|
|
24464
|
+
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" });
|
|
24432
24465
|
UserEventService.decorators = [
|
|
24433
24466
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24434
24467
|
];
|
|
@@ -24813,7 +24846,7 @@ class PersonService extends BaseEntityService {
|
|
|
24813
24846
|
return target;
|
|
24814
24847
|
}
|
|
24815
24848
|
}
|
|
24816
|
-
PersonService.ɵprov =
|
|
24849
|
+
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" });
|
|
24817
24850
|
PersonService.decorators = [
|
|
24818
24851
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24819
24852
|
];
|
|
@@ -24844,7 +24877,7 @@ class PersonValidatorService {
|
|
|
24844
24877
|
return this.formBuilder.group(formConfig);
|
|
24845
24878
|
}
|
|
24846
24879
|
}
|
|
24847
|
-
PersonValidatorService.ɵprov =
|
|
24880
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
24848
24881
|
PersonValidatorService.decorators = [
|
|
24849
24882
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
24850
24883
|
];
|
|
@@ -25050,16 +25083,16 @@ AdminModule.decorators = [
|
|
|
25050
25083
|
];
|
|
25051
25084
|
AdminModule.ctorParameters = () => [];
|
|
25052
25085
|
|
|
25053
|
-
const ɵ0
|
|
25086
|
+
const ɵ0 = {
|
|
25054
25087
|
profile: 'ADMIN'
|
|
25055
25088
|
};
|
|
25056
|
-
const routes
|
|
25089
|
+
const routes = [
|
|
25057
25090
|
{
|
|
25058
25091
|
path: 'users',
|
|
25059
25092
|
pathMatch: 'full',
|
|
25060
25093
|
component: UsersPage,
|
|
25061
25094
|
canActivate: [AuthGuardService],
|
|
25062
|
-
data: ɵ0
|
|
25095
|
+
data: ɵ0
|
|
25063
25096
|
}
|
|
25064
25097
|
];
|
|
25065
25098
|
class AdminRoutingModule {
|
|
@@ -25069,13 +25102,13 @@ AdminRoutingModule.decorators = [
|
|
|
25069
25102
|
imports: [
|
|
25070
25103
|
SharedRoutingModule,
|
|
25071
25104
|
AdminModule,
|
|
25072
|
-
RouterModule.forChild(routes
|
|
25105
|
+
RouterModule.forChild(routes)
|
|
25073
25106
|
],
|
|
25074
25107
|
exports: [RouterModule]
|
|
25075
25108
|
},] }
|
|
25076
25109
|
];
|
|
25077
25110
|
|
|
25078
|
-
const ErrorCodes
|
|
25111
|
+
const ErrorCodes = {
|
|
25079
25112
|
LOAD_PERSONS_ERROR: 100,
|
|
25080
25113
|
SAVE_PERSONS_ERROR: 101,
|
|
25081
25114
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -25087,5 +25120,5 @@ const ErrorCodes$2 = {
|
|
|
25087
25120
|
* Generated bundle index. Do not edit.
|
|
25088
25121
|
*/
|
|
25089
25122
|
|
|
25090
|
-
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
|
|
25123
|
+
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, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, 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 };
|
|
25091
25124
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|