@sumaris-net/ngx-components 1.18.7 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +779 -420
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +4 -0
- package/esm2015/public_api.js +10 -5
- package/esm2015/src/app/admin/admin-routing.module.js +3 -1
- package/esm2015/src/app/admin/admin.module.js +2 -1
- package/esm2015/src/app/admin/users/list/users.js +45 -7
- package/esm2015/src/app/core/services/local-settings.service.js +5 -5
- package/esm2015/src/app/core/services/platform.service.js +3 -4
- package/esm2015/src/app/shared/material/datetime/material.date.js +82 -70
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +3 -3
- package/esm2015/src/app/shared/material/datetime/testing/mat-date.test.js +7 -5
- package/esm2015/src/app/shared/validator/validators.js +2 -2
- package/esm2015/src/app/social/message/message.form.js +73 -0
- package/esm2015/src/app/social/message/message.modal.js +96 -0
- package/esm2015/src/app/social/message/message.model.js +65 -0
- package/esm2015/src/app/social/message/message.service.js +87 -0
- package/esm2015/src/app/social/social.errors.js +6 -0
- package/esm2015/src/app/social/social.module.js +12 -15
- package/esm2015/src/app/social/user-event/user-event.fragments.js +27 -0
- package/esm2015/src/app/social/user-event/user-event.model.js +46 -0
- package/esm2015/src/app/social/user-event/user-event.service.js +367 -0
- package/esm2015/src/app/social/user-event/user-events.table.js +154 -0
- package/fesm2015/sumaris-net.ngx-components.js +710 -403
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +4 -3
- package/public_api.d.ts +9 -4
- package/src/app/admin/users/list/users.d.ts +10 -6
- package/src/app/core/services/local-settings.service.d.ts +3 -2
- package/src/app/shared/material/datetime/material.date.d.ts +6 -8
- package/src/app/shared/material/datetime/material.datetime.d.ts +2 -2
- package/src/app/social/message/message.form.d.ts +27 -0
- package/src/app/social/message/message.modal.d.ts +36 -0
- package/src/app/social/message/message.model.d.ts +31 -0
- package/src/app/social/message/message.service.d.ts +24 -0
- package/src/app/social/{services/errors.d.ts → social.errors.d.ts} +2 -1
- package/src/app/social/social.module.d.ts +0 -2
- package/src/app/social/{services/social.fragments.d.ts → user-event/user-event.fragments.d.ts} +1 -1
- package/src/app/social/{services/model → user-event}/user-event.model.d.ts +1 -1
- package/src/app/social/{services → user-event}/user-event.service.d.ts +4 -3
- package/src/app/social/{list → user-event}/user-events.table.d.ts +2 -2
- package/src/assets/i18n/en-US.json +4 -4
- package/src/assets/i18n/en.json +5 -4
- package/src/assets/i18n/fr.json +24 -4
- package/src/theme/_ionic.globals.scss +2 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
- package/esm2015/src/app/admin/services/errors.js +0 -6
- package/esm2015/src/app/social/list/user-events.table.js +0 -154
- package/esm2015/src/app/social/services/errors.js +0 -5
- package/esm2015/src/app/social/services/model/user-event.model.js +0 -46
- package/esm2015/src/app/social/services/social.fragments.js +0 -27
- package/esm2015/src/app/social/services/user-event.service.js +0 -367
- package/src/app/admin/services/errors.d.ts +0 -5
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, TemplateRef, ViewContainerRef, HostBinding, HostListener, ViewChildren, ComponentFactoryResolver, ApplicationRef, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
|
|
3
|
-
import * as i1$3 from '@angular/common';
|
|
1
|
+
import { InjectionToken, EventEmitter, Component, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, Output, ViewChild, ɵɵdefineInjectable, ɵɵinject, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, TemplateRef, ViewContainerRef, HostBinding, HostListener, ViewChildren, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injector, Renderer2, ViewEncapsulation } from '@angular/core';
|
|
4
2
|
import { CommonModule, DOCUMENT, Location } from '@angular/common';
|
|
5
3
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
6
4
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
7
5
|
import { OverlayModule, OverlayContainer, FullscreenOverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
8
6
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
|
-
import * as i1$2 from '@angular/material/core';
|
|
10
7
|
import { DateAdapter, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
11
8
|
import { MatTableModule, MatTable, MatColumnDef } from '@angular/material/table';
|
|
12
9
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
@@ -30,22 +27,17 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
30
27
|
import { MatRadioModule } from '@angular/material/radio';
|
|
31
28
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
32
29
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
33
|
-
import * as i2$1 from '@angular/material/dialog';
|
|
34
30
|
import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
35
31
|
import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
36
32
|
import { __awaiter, __decorate } from 'tslib';
|
|
37
|
-
import * as i1$6 from '@angular/forms';
|
|
38
33
|
import { Validators, NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, FormBuilder } from '@angular/forms';
|
|
39
34
|
import { timer, merge, fromEvent, BehaviorSubject, Subscription, Subject, isObservable, from, of, noop as noop$9, Observable, defer, forkJoin, combineLatest, EMPTY } from 'rxjs';
|
|
40
35
|
import { filter, first, map, takeUntil, switchMap, startWith, debounceTime, takeWhile, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
|
|
41
36
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
42
|
-
import * as i1$1 from '@ngx-translate/core';
|
|
43
37
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
44
|
-
import * as i1$4 from '@ionic/angular';
|
|
45
38
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, PopoverController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent, IonInfiniteScroll } from '@ionic/angular';
|
|
46
39
|
import * as momentImported from 'moment';
|
|
47
40
|
import { isMoment } from 'moment';
|
|
48
|
-
import * as i1 from '@angular/material-moment-adapter';
|
|
49
41
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
50
42
|
import * as momentTZImported from 'moment-timezone';
|
|
51
43
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
@@ -55,38 +47,32 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
|
55
47
|
import { MatDividerModule } from '@angular/material/divider';
|
|
56
48
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
57
49
|
import { MatChipsModule } from '@angular/material/chips';
|
|
58
|
-
import * as i3$3 from '@angular/router';
|
|
59
50
|
import { Router, ActivatedRoute, RouterModule, RouteReuseStrategy } from '@angular/router';
|
|
60
|
-
import * as i1$5 from '@angular/platform-browser';
|
|
61
51
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
62
|
-
import * as i2$2 from '@angular/common/http';
|
|
63
52
|
import { HttpResponse, HttpClient, HttpHeaders, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
64
53
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
65
|
-
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
66
|
-
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
54
|
+
import { NativeAudio as NativeAudio$1 } from '@ionic-native/native-audio/ngx';
|
|
55
|
+
import { Vibration as Vibration$1 } from '@ionic-native/vibration/ngx';
|
|
67
56
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
57
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx/index';
|
|
58
|
+
import { Vibration } from '@ionic-native/vibration/ngx/index';
|
|
59
|
+
import { AudioManagement as AudioManagement$1 } from '@ionic-native/audio-management/ngx/index';
|
|
71
60
|
import * as uuidv4Imported from 'uuid/v4';
|
|
72
61
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
73
62
|
import { MarkdownModule } from 'ngx-markdown';
|
|
74
63
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
75
|
-
import * as i3$1 from '@ionic/storage';
|
|
76
64
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
77
65
|
import 'zone.js/dist/zone-error';
|
|
78
|
-
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
|
79
|
-
import { Connection, Network } from '@ionic-native/network/ngx';
|
|
80
|
-
import { CacheService, CacheModule } from 'ionic-cache';
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
85
|
-
import * as i2$4 from '@angular/cdk/platform';
|
|
66
|
+
import { SplashScreen as SplashScreen$1 } from '@ionic-native/splash-screen/ngx';
|
|
67
|
+
import { Connection, Network as Network$1 } from '@ionic-native/network/ngx';
|
|
68
|
+
import { CacheService as CacheService$1, CacheModule } from 'ionic-cache';
|
|
69
|
+
import { CacheService } from 'ionic-cache/dist/cache.service';
|
|
70
|
+
import { Network } from '@ionic-native/network/ngx/index';
|
|
71
|
+
import { SplashScreen } from '@ionic-native/splash-screen/ngx/index';
|
|
72
|
+
import { StatusBar as StatusBar$1 } from '@ionic-native/status-bar/ngx';
|
|
86
73
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
87
|
-
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
74
|
+
import { InAppBrowser as InAppBrowser$1 } from '@ionic-native/in-app-browser/ngx';
|
|
88
75
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
89
|
-
import * as i2$3 from 'apollo-angular';
|
|
90
76
|
import { Apollo } from 'apollo-angular';
|
|
91
77
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
92
78
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -94,14 +80,13 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
94
80
|
import QueueLink from 'apollo-link-queue';
|
|
95
81
|
import SerializingLink from 'apollo-link-serialize';
|
|
96
82
|
import loggerLink from 'apollo-link-logger';
|
|
97
|
-
import * as i3$2 from 'apollo-angular/http';
|
|
98
83
|
import { HttpLink } from 'apollo-angular/http';
|
|
99
84
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
100
|
-
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
import
|
|
85
|
+
import { NotificationVisibility, Downloader as Downloader$1 } from '@ionic-native/downloader/ngx';
|
|
86
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx/index';
|
|
87
|
+
import { Keyboard as Keyboard$1 } from '@ionic-native/keyboard/ngx/index';
|
|
88
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx/index';
|
|
89
|
+
import { Downloader } from '@ionic-native/downloader/ngx/index';
|
|
105
90
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
106
91
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
107
92
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
@@ -1088,7 +1073,7 @@ const isIpad = (win) => {
|
|
|
1088
1073
|
}
|
|
1089
1074
|
return false;
|
|
1090
1075
|
};
|
|
1091
|
-
const ɵ0
|
|
1076
|
+
const ɵ0 = isIpad;
|
|
1092
1077
|
const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
|
|
1093
1078
|
const isAndroid = (win) => testUserAgent(win, /android|sink/i);
|
|
1094
1079
|
const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
|
|
@@ -1147,14 +1132,14 @@ class MatAutocompleteFieldUtils {
|
|
|
1147
1132
|
return isNotNil(o1 === null || o1 === void 0 ? void 0 : o1.id) && o1.id === (o2 === null || o2 === void 0 ? void 0 : o2.id);
|
|
1148
1133
|
}
|
|
1149
1134
|
}
|
|
1150
|
-
const noop
|
|
1151
|
-
const ɵ0$
|
|
1135
|
+
const noop = (_) => { };
|
|
1136
|
+
const ɵ0$1 = noop;
|
|
1152
1137
|
class MatAutocompleteField {
|
|
1153
1138
|
constructor(cd, formGroupDir) {
|
|
1154
1139
|
this.cd = cd;
|
|
1155
1140
|
this.formGroupDir = formGroupDir;
|
|
1156
|
-
this._onChangeCallback = noop
|
|
1157
|
-
this._onTouchedCallback = noop
|
|
1141
|
+
this._onChangeCallback = noop;
|
|
1142
|
+
this._onTouchedCallback = noop;
|
|
1158
1143
|
this.logPrefix = '[mat-autocomplete] ';
|
|
1159
1144
|
this.formControlName = null;
|
|
1160
1145
|
this.required = false;
|
|
@@ -1903,7 +1888,7 @@ class DateFormatPipe {
|
|
|
1903
1888
|
return isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
1904
1889
|
}
|
|
1905
1890
|
}
|
|
1906
|
-
DateFormatPipe.ɵprov =
|
|
1891
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1907
1892
|
DateFormatPipe.decorators = [
|
|
1908
1893
|
{ type: Pipe, args: [{
|
|
1909
1894
|
name: 'dateFormat'
|
|
@@ -1915,7 +1900,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1915
1900
|
{ type: TranslateService }
|
|
1916
1901
|
];
|
|
1917
1902
|
|
|
1918
|
-
const moment
|
|
1903
|
+
const moment = momentImported;
|
|
1919
1904
|
class DateDiffDurationPipe {
|
|
1920
1905
|
constructor(dateAdapter, translate) {
|
|
1921
1906
|
this.dateAdapter = dateAdapter;
|
|
@@ -1931,17 +1916,17 @@ class DateDiffDurationPipe {
|
|
|
1931
1916
|
return this.format(startDate, endDate);
|
|
1932
1917
|
}
|
|
1933
1918
|
format(startDate, endDate) {
|
|
1934
|
-
const duration = moment
|
|
1919
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1935
1920
|
if (duration.asMinutes() < 0)
|
|
1936
1921
|
return '';
|
|
1937
|
-
const timeDuration = moment
|
|
1922
|
+
const timeDuration = moment(0)
|
|
1938
1923
|
.hour(duration.hours())
|
|
1939
1924
|
.minute(duration.minutes());
|
|
1940
1925
|
const days = Math.floor(duration.asDays());
|
|
1941
1926
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1942
1927
|
}
|
|
1943
1928
|
}
|
|
1944
|
-
DateDiffDurationPipe.ɵprov =
|
|
1929
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1945
1930
|
DateDiffDurationPipe.decorators = [
|
|
1946
1931
|
{ type: Pipe, args: [{
|
|
1947
1932
|
name: 'dateDiffDuration'
|
|
@@ -1962,7 +1947,7 @@ class DateFromNowPipe {
|
|
|
1962
1947
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1963
1948
|
}
|
|
1964
1949
|
}
|
|
1965
|
-
DateFromNowPipe.ɵprov =
|
|
1950
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1966
1951
|
DateFromNowPipe.decorators = [
|
|
1967
1952
|
{ type: Pipe, args: [{
|
|
1968
1953
|
name: 'dateFromNow'
|
|
@@ -2031,7 +2016,7 @@ function formatToDD(value, opts) {
|
|
|
2031
2016
|
value *= -1;
|
|
2032
2017
|
}
|
|
2033
2018
|
}
|
|
2034
|
-
let degrees = roundFloat
|
|
2019
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2035
2020
|
// Add sign
|
|
2036
2021
|
let sign = negative ? '-' : '+';
|
|
2037
2022
|
if (opts.placeholderChar) {
|
|
@@ -2082,7 +2067,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
2082
2067
|
}
|
|
2083
2068
|
let degrees = Math.trunc(value);
|
|
2084
2069
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
2085
|
-
let seconds = roundFloat
|
|
2070
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2086
2071
|
while (seconds >= 60) {
|
|
2087
2072
|
seconds -= 60;
|
|
2088
2073
|
minutes += 1;
|
|
@@ -2150,7 +2135,7 @@ function formatToDDMM(value, opts) {
|
|
|
2150
2135
|
}
|
|
2151
2136
|
}
|
|
2152
2137
|
let degrees = Math.trunc(value);
|
|
2153
|
-
let minutes = roundFloat
|
|
2138
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2154
2139
|
while (minutes >= 60) {
|
|
2155
2140
|
minutes -= 60;
|
|
2156
2141
|
degrees += 1;
|
|
@@ -2201,15 +2186,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
2201
2186
|
return NaN;
|
|
2202
2187
|
}
|
|
2203
2188
|
if (pattern === 'DD')
|
|
2204
|
-
return roundFloat
|
|
2189
|
+
return roundFloat(degrees, maxDecimals);
|
|
2205
2190
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2206
2191
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2207
2192
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2208
2193
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2209
2194
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2210
|
-
return roundFloat
|
|
2195
|
+
return roundFloat(degrees, maxDecimals);
|
|
2211
2196
|
}
|
|
2212
|
-
function roundFloat
|
|
2197
|
+
function roundFloat(input, maxDecimals) {
|
|
2213
2198
|
if (maxDecimals > 0) {
|
|
2214
2199
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
2215
2200
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2229,7 +2214,7 @@ class LatLongFormatPipe {
|
|
|
2229
2214
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
2230
2215
|
}
|
|
2231
2216
|
}
|
|
2232
|
-
LatLongFormatPipe.ɵprov =
|
|
2217
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2233
2218
|
LatLongFormatPipe.decorators = [
|
|
2234
2219
|
{ type: Pipe, args: [{
|
|
2235
2220
|
name: 'latLongFormat'
|
|
@@ -2241,7 +2226,7 @@ class LatitudeFormatPipe {
|
|
|
2241
2226
|
this.transform = formatLatitude;
|
|
2242
2227
|
}
|
|
2243
2228
|
}
|
|
2244
|
-
LatitudeFormatPipe.ɵprov =
|
|
2229
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2245
2230
|
LatitudeFormatPipe.decorators = [
|
|
2246
2231
|
{ type: Pipe, args: [{
|
|
2247
2232
|
name: 'latitudeFormat'
|
|
@@ -2253,7 +2238,7 @@ class LongitudeFormatPipe {
|
|
|
2253
2238
|
this.transform = formatLongitude;
|
|
2254
2239
|
}
|
|
2255
2240
|
}
|
|
2256
|
-
LongitudeFormatPipe.ɵprov =
|
|
2241
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2257
2242
|
LongitudeFormatPipe.decorators = [
|
|
2258
2243
|
{ type: Pipe, args: [{
|
|
2259
2244
|
name: 'longitudeFormat'
|
|
@@ -2273,7 +2258,7 @@ class NumberFormatPipe {
|
|
|
2273
2258
|
}
|
|
2274
2259
|
}
|
|
2275
2260
|
}
|
|
2276
|
-
NumberFormatPipe.ɵprov =
|
|
2261
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2277
2262
|
NumberFormatPipe.decorators = [
|
|
2278
2263
|
{ type: Pipe, args: [{
|
|
2279
2264
|
name: 'numberFormat'
|
|
@@ -2313,7 +2298,7 @@ class HighlightPipe {
|
|
|
2313
2298
|
}
|
|
2314
2299
|
}
|
|
2315
2300
|
}
|
|
2316
|
-
HighlightPipe.ɵprov =
|
|
2301
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2317
2302
|
HighlightPipe.decorators = [
|
|
2318
2303
|
{ type: Pipe, args: [{
|
|
2319
2304
|
name: 'highlight'
|
|
@@ -2378,7 +2363,7 @@ FileSizePipe.decorators = [
|
|
|
2378
2363
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2379
2364
|
];
|
|
2380
2365
|
|
|
2381
|
-
const moment$
|
|
2366
|
+
const moment$1 = momentImported;
|
|
2382
2367
|
const tz = momentTZImported;
|
|
2383
2368
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2384
2369
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2455,32 +2440,32 @@ function fromDateISOString(value) {
|
|
|
2455
2440
|
if (!value || isMoment(value))
|
|
2456
2441
|
return value;
|
|
2457
2442
|
// Parse the input value, as a ISO date time
|
|
2458
|
-
const date = moment$
|
|
2443
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2459
2444
|
if (date.isValid())
|
|
2460
2445
|
return date;
|
|
2461
2446
|
// Not valid: trying to convert from unix timestamp
|
|
2462
2447
|
if (typeof value === 'string') {
|
|
2463
2448
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2464
2449
|
if (value.length === 10) {
|
|
2465
|
-
return moment$
|
|
2450
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2466
2451
|
}
|
|
2467
2452
|
else if (value.length === 13) {
|
|
2468
|
-
return moment$
|
|
2453
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2469
2454
|
}
|
|
2470
2455
|
}
|
|
2471
2456
|
console.warn('Unable to parse date: ' + value);
|
|
2472
2457
|
return undefined;
|
|
2473
2458
|
}
|
|
2474
2459
|
function fromUnixTimestamp(timeInSec) {
|
|
2475
|
-
return moment$
|
|
2460
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2476
2461
|
}
|
|
2477
2462
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2478
|
-
return moment$
|
|
2463
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2479
2464
|
}
|
|
2480
2465
|
function toDuration(value, unit) {
|
|
2481
2466
|
if (!value)
|
|
2482
2467
|
return undefined;
|
|
2483
|
-
const duration = moment$
|
|
2468
|
+
const duration = moment$1.duration(value, unit);
|
|
2484
2469
|
// fix 990+ ms
|
|
2485
2470
|
if (duration.milliseconds() >= 990) {
|
|
2486
2471
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2509,7 +2494,7 @@ class DurationPipe {
|
|
|
2509
2494
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2510
2495
|
}
|
|
2511
2496
|
}
|
|
2512
|
-
DurationPipe.ɵprov =
|
|
2497
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2513
2498
|
DurationPipe.decorators = [
|
|
2514
2499
|
{ type: Pipe, args: [{
|
|
2515
2500
|
name: 'duration'
|
|
@@ -2530,7 +2515,7 @@ class MathAbsPipe {
|
|
|
2530
2515
|
}
|
|
2531
2516
|
}
|
|
2532
2517
|
}
|
|
2533
|
-
MathAbsPipe.ɵprov =
|
|
2518
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2534
2519
|
MathAbsPipe.decorators = [
|
|
2535
2520
|
{ type: Pipe, args: [{
|
|
2536
2521
|
name: 'mathAbs'
|
|
@@ -2542,7 +2527,7 @@ class EvenPipe {
|
|
|
2542
2527
|
return val % 2 === 0;
|
|
2543
2528
|
}
|
|
2544
2529
|
}
|
|
2545
|
-
EvenPipe.ɵprov =
|
|
2530
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2546
2531
|
EvenPipe.decorators = [
|
|
2547
2532
|
{ type: Pipe, args: [{
|
|
2548
2533
|
name: 'even'
|
|
@@ -2554,7 +2539,7 @@ class OddPipe {
|
|
|
2554
2539
|
return val % 2 !== 0;
|
|
2555
2540
|
}
|
|
2556
2541
|
}
|
|
2557
|
-
OddPipe.ɵprov =
|
|
2542
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2558
2543
|
OddPipe.decorators = [
|
|
2559
2544
|
{ type: Pipe, args: [{
|
|
2560
2545
|
name: 'odd'
|
|
@@ -2662,7 +2647,7 @@ class MapGetPipe {
|
|
|
2662
2647
|
return val[key];
|
|
2663
2648
|
}
|
|
2664
2649
|
}
|
|
2665
|
-
MapGetPipe.ɵprov =
|
|
2650
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2666
2651
|
MapGetPipe.decorators = [
|
|
2667
2652
|
{ type: Pipe, args: [{
|
|
2668
2653
|
name: 'mapGet'
|
|
@@ -2676,7 +2661,7 @@ class MapKeysPipe {
|
|
|
2676
2661
|
return Object.keys(map);
|
|
2677
2662
|
}
|
|
2678
2663
|
}
|
|
2679
|
-
MapKeysPipe.ɵprov =
|
|
2664
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2680
2665
|
MapKeysPipe.decorators = [
|
|
2681
2666
|
{ type: Pipe, args: [{
|
|
2682
2667
|
name: 'mapKeys'
|
|
@@ -2690,7 +2675,7 @@ class MapValuesPipe {
|
|
|
2690
2675
|
return Object.values(map);
|
|
2691
2676
|
}
|
|
2692
2677
|
}
|
|
2693
|
-
MapValuesPipe.ɵprov =
|
|
2678
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2694
2679
|
MapValuesPipe.decorators = [
|
|
2695
2680
|
{ type: Pipe, args: [{
|
|
2696
2681
|
name: 'mapValues'
|
|
@@ -2703,7 +2688,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2703
2688
|
return isNotNilOrBlank(value);
|
|
2704
2689
|
}
|
|
2705
2690
|
}
|
|
2706
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2691
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2707
2692
|
IsNotNilOrBlankPipe.decorators = [
|
|
2708
2693
|
{ type: Pipe, args: [{
|
|
2709
2694
|
name: 'isNotNilOrBlank'
|
|
@@ -2715,7 +2700,7 @@ class IsNilOrBlankPipe {
|
|
|
2715
2700
|
return isNilOrBlank(value);
|
|
2716
2701
|
}
|
|
2717
2702
|
}
|
|
2718
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2703
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2719
2704
|
IsNilOrBlankPipe.decorators = [
|
|
2720
2705
|
{ type: Pipe, args: [{
|
|
2721
2706
|
name: 'isNilOrBlank'
|
|
@@ -2727,7 +2712,7 @@ class ToStringPipe {
|
|
|
2727
2712
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2728
2713
|
}
|
|
2729
2714
|
}
|
|
2730
|
-
ToStringPipe.ɵprov =
|
|
2715
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2731
2716
|
ToStringPipe.decorators = [
|
|
2732
2717
|
{ type: Pipe, args: [{
|
|
2733
2718
|
name: 'toString'
|
|
@@ -2739,7 +2724,7 @@ class StrLengthPipe {
|
|
|
2739
2724
|
return value && value.length || 0;
|
|
2740
2725
|
}
|
|
2741
2726
|
}
|
|
2742
|
-
StrLengthPipe.ɵprov =
|
|
2727
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2743
2728
|
StrLengthPipe.decorators = [
|
|
2744
2729
|
{ type: Pipe, args: [{
|
|
2745
2730
|
name: 'strLength'
|
|
@@ -2751,7 +2736,7 @@ class StrIncludesPipe {
|
|
|
2751
2736
|
return (value === null || value === void 0 ? void 0 : value.includes(searchString, position)) || false;
|
|
2752
2737
|
}
|
|
2753
2738
|
}
|
|
2754
|
-
StrIncludesPipe.ɵprov =
|
|
2739
|
+
StrIncludesPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
|
|
2755
2740
|
StrIncludesPipe.decorators = [
|
|
2756
2741
|
{ type: Pipe, args: [{
|
|
2757
2742
|
name: 'strIncludes'
|
|
@@ -2828,7 +2813,7 @@ class TranslateContextService {
|
|
|
2828
2813
|
return translations[keys[keys.length - 1]]; // Return the last keys translation
|
|
2829
2814
|
}
|
|
2830
2815
|
}
|
|
2831
|
-
TranslateContextService.ɵprov =
|
|
2816
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2832
2817
|
TranslateContextService.decorators = [
|
|
2833
2818
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2834
2819
|
];
|
|
@@ -2878,7 +2863,7 @@ class PropertyGetPipe {
|
|
|
2878
2863
|
args && args.defaultValue);
|
|
2879
2864
|
}
|
|
2880
2865
|
}
|
|
2881
|
-
PropertyGetPipe.ɵprov =
|
|
2866
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2882
2867
|
PropertyGetPipe.decorators = [
|
|
2883
2868
|
{ type: Pipe, args: [{
|
|
2884
2869
|
name: 'propertyGet'
|
|
@@ -2903,7 +2888,7 @@ NgInitDirective.propDecorators = {
|
|
|
2903
2888
|
ngInit: [{ type: Output }]
|
|
2904
2889
|
};
|
|
2905
2890
|
|
|
2906
|
-
const moment$
|
|
2891
|
+
const moment$2 = momentImported;
|
|
2907
2892
|
// @dynamic
|
|
2908
2893
|
class SharedValidators {
|
|
2909
2894
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2984,7 +2969,7 @@ class SharedValidators {
|
|
|
2984
2969
|
}
|
|
2985
2970
|
static validDate(control) {
|
|
2986
2971
|
const value = control.value;
|
|
2987
|
-
const date = !value || moment$
|
|
2972
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(value, DATE_ISO_PATTERN);
|
|
2988
2973
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2989
2974
|
return { validDate: true };
|
|
2990
2975
|
}
|
|
@@ -4096,7 +4081,7 @@ class FormErrorTranslator {
|
|
|
4096
4081
|
return errorKey;
|
|
4097
4082
|
}
|
|
4098
4083
|
}
|
|
4099
|
-
FormErrorTranslator.ɵprov =
|
|
4084
|
+
FormErrorTranslator.ɵprov = ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(ɵɵinject(TranslateService), ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
4100
4085
|
FormErrorTranslator.decorators = [
|
|
4101
4086
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
4102
4087
|
];
|
|
@@ -4176,7 +4161,7 @@ class FormGetPipe {
|
|
|
4176
4161
|
return form.get(path);
|
|
4177
4162
|
}
|
|
4178
4163
|
}
|
|
4179
|
-
FormGetPipe.ɵprov =
|
|
4164
|
+
FormGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4180
4165
|
FormGetPipe.decorators = [
|
|
4181
4166
|
{ type: Pipe, args: [{
|
|
4182
4167
|
name: 'formGet'
|
|
@@ -4188,7 +4173,7 @@ class FormGetControlPipe {
|
|
|
4188
4173
|
return form.get(path);
|
|
4189
4174
|
}
|
|
4190
4175
|
}
|
|
4191
|
-
FormGetControlPipe.ɵprov =
|
|
4176
|
+
FormGetControlPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4192
4177
|
FormGetControlPipe.decorators = [
|
|
4193
4178
|
{ type: Pipe, args: [{
|
|
4194
4179
|
name: 'formGetControl'
|
|
@@ -4200,7 +4185,7 @@ class FormGetArrayPipe {
|
|
|
4200
4185
|
return form.get(path);
|
|
4201
4186
|
}
|
|
4202
4187
|
}
|
|
4203
|
-
FormGetArrayPipe.ɵprov =
|
|
4188
|
+
FormGetArrayPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4204
4189
|
FormGetArrayPipe.decorators = [
|
|
4205
4190
|
{ type: Pipe, args: [{
|
|
4206
4191
|
name: 'formGetArray'
|
|
@@ -4212,7 +4197,7 @@ class FormGetGroupPipe {
|
|
|
4212
4197
|
return form.get(path);
|
|
4213
4198
|
}
|
|
4214
4199
|
}
|
|
4215
|
-
FormGetGroupPipe.ɵprov =
|
|
4200
|
+
FormGetGroupPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4216
4201
|
FormGetGroupPipe.decorators = [
|
|
4217
4202
|
{ type: Pipe, args: [{
|
|
4218
4203
|
name: 'formGetGroup'
|
|
@@ -4541,9 +4526,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4541
4526
|
const hour = parseInt(durationParts[0] || '0');
|
|
4542
4527
|
const minute = parseInt(durationParts[1] || '0');
|
|
4543
4528
|
const value = hour + (minute + 0.5) / 60;
|
|
4544
|
-
return roundFloat(value, maxDecimals);
|
|
4529
|
+
return roundFloat$1(value, maxDecimals);
|
|
4545
4530
|
}
|
|
4546
|
-
function roundFloat(input, maxDecimals) {
|
|
4531
|
+
function roundFloat$1(input, maxDecimals) {
|
|
4547
4532
|
if (maxDecimals > 0) {
|
|
4548
4533
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4549
4534
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4567,17 +4552,17 @@ const MASKS = {
|
|
|
4567
4552
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4568
4553
|
}
|
|
4569
4554
|
};
|
|
4570
|
-
const noop$
|
|
4555
|
+
const noop$1 = () => {
|
|
4571
4556
|
};
|
|
4572
|
-
const ɵ0$
|
|
4557
|
+
const ɵ0$2 = noop$1;
|
|
4573
4558
|
class MatLatLongField {
|
|
4574
4559
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
4575
4560
|
this.translate = translate;
|
|
4576
4561
|
this.formBuilder = formBuilder;
|
|
4577
4562
|
this.cd = cd;
|
|
4578
4563
|
this.formGroupDir = formGroupDir;
|
|
4579
|
-
this._onChangeCallback = noop$
|
|
4580
|
-
this._onTouchedCallback = noop$
|
|
4564
|
+
this._onChangeCallback = noop$1;
|
|
4565
|
+
this._onTouchedCallback = noop$1;
|
|
4581
4566
|
this._subscription = new Subscription();
|
|
4582
4567
|
this.disabling = false;
|
|
4583
4568
|
this.writing = false;
|
|
@@ -4913,14 +4898,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4913
4898
|
},] }
|
|
4914
4899
|
];
|
|
4915
4900
|
|
|
4916
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
4901
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
4917
4902
|
provide: NG_VALUE_ACCESSOR,
|
|
4918
4903
|
useExisting: forwardRef(() => MatDate),
|
|
4919
4904
|
multi: true
|
|
4920
4905
|
};
|
|
4921
|
-
const
|
|
4922
|
-
const noop$
|
|
4923
|
-
const ɵ0$
|
|
4906
|
+
const TEXT_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4907
|
+
const noop$2 = () => { };
|
|
4908
|
+
const ɵ0$3 = noop$2;
|
|
4924
4909
|
class MatDate {
|
|
4925
4910
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4926
4911
|
this.dateAdapter = dateAdapter;
|
|
@@ -4929,13 +4914,13 @@ class MatDate {
|
|
|
4929
4914
|
this.cd = cd;
|
|
4930
4915
|
this.keyboard = keyboard;
|
|
4931
4916
|
this.formGroupDir = formGroupDir;
|
|
4932
|
-
this._onChangeCallback = noop$
|
|
4933
|
-
this._onTouchedCallback = noop$
|
|
4917
|
+
this._onChangeCallback = noop$2;
|
|
4918
|
+
this._onTouchedCallback = noop$2;
|
|
4934
4919
|
this._subscription = new Subscription();
|
|
4935
4920
|
this._writing = true;
|
|
4936
4921
|
this._disabling = false;
|
|
4937
4922
|
this._readonly = false;
|
|
4938
|
-
this.
|
|
4923
|
+
this.mask = TEXT_MASK;
|
|
4939
4924
|
this.floatLabel = 'auto';
|
|
4940
4925
|
this.compact = false;
|
|
4941
4926
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4980,22 +4965,24 @@ class MatDate {
|
|
|
4980
4965
|
this.formControl.setValidators(this.required ? [this.formControl.validator, Validators.required, SharedValidators.validDate] :
|
|
4981
4966
|
[this.formControl.validator, SharedValidators.validDate]);
|
|
4982
4967
|
}
|
|
4983
|
-
// Create the
|
|
4984
|
-
this.
|
|
4968
|
+
// Create the text control
|
|
4969
|
+
this.textControl = this.formBuilder.control(null,
|
|
4970
|
+
// Important: should copy errors from the model formControl
|
|
4971
|
+
() => this.formControl.errors);
|
|
4985
4972
|
// Get patterns to display date
|
|
4986
4973
|
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
4987
4974
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
4988
4975
|
.subscribe((pattern) => this.updatePattern(pattern)));
|
|
4989
|
-
this._subscription.add(this.
|
|
4976
|
+
this._subscription.add(this.textControl.valueChanges
|
|
4990
4977
|
.subscribe((value) => this.onFormChange(value)));
|
|
4991
4978
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
4992
4979
|
this._subscription.add(this.formControl.statusChanges
|
|
4993
4980
|
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
4994
4981
|
)
|
|
4995
4982
|
.subscribe(() => {
|
|
4996
|
-
this.
|
|
4997
|
-
if (this.formControl.touched && !this.
|
|
4998
|
-
this.
|
|
4983
|
+
this.textControl.updateValueAndValidity({ emitEvent: false });
|
|
4984
|
+
if (this.formControl.touched && !this.textControl.touched) {
|
|
4985
|
+
this.textControl.markAsTouched();
|
|
4999
4986
|
}
|
|
5000
4987
|
this.markForCheck();
|
|
5001
4988
|
}));
|
|
@@ -5011,27 +4998,25 @@ class MatDate {
|
|
|
5011
4998
|
this._writing = true;
|
|
5012
4999
|
// DEBUG
|
|
5013
5000
|
//console.debug("[mat-date] writeValue() with:", value);
|
|
5014
|
-
// Convert into date
|
|
5015
|
-
|
|
5001
|
+
// Convert into date
|
|
5002
|
+
// Important: do a clone()
|
|
5003
|
+
let date = isMoment(value) ? value.clone() : fromDateISOString(value);
|
|
5016
5004
|
if (!date || !date.isValid()) {
|
|
5017
|
-
this.
|
|
5005
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5018
5006
|
if (this.formControl.value) {
|
|
5019
5007
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5020
5008
|
this._onChangeCallback(null);
|
|
5021
5009
|
}
|
|
5022
5010
|
}
|
|
5023
5011
|
else {
|
|
5024
|
-
//
|
|
5025
|
-
|
|
5026
|
-
//
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
if (this.dayControl.value !== dayStr) {
|
|
5033
|
-
// Update control
|
|
5034
|
-
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
5012
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
5013
|
+
date = (this.timezone && date.tz(this.timezone) || date)
|
|
5014
|
+
// Reset hour
|
|
5015
|
+
.startOf('day');
|
|
5016
|
+
const dayStr = this.dateAdapter.format(date, this.datePattern);
|
|
5017
|
+
if (this.textControl.value !== dayStr) {
|
|
5018
|
+
// Update day control
|
|
5019
|
+
this.textControl.patchValue(dayStr, { emitEvent: false });
|
|
5035
5020
|
}
|
|
5036
5021
|
}
|
|
5037
5022
|
this._writing = false;
|
|
@@ -5048,10 +5033,10 @@ class MatDate {
|
|
|
5048
5033
|
return;
|
|
5049
5034
|
this._disabling = true;
|
|
5050
5035
|
if (isDisabled) {
|
|
5051
|
-
this.
|
|
5036
|
+
this.textControl.disable({ emitEvent: false });
|
|
5052
5037
|
}
|
|
5053
5038
|
else {
|
|
5054
|
-
this.
|
|
5039
|
+
this.textControl.enable({ emitEvent: false });
|
|
5055
5040
|
}
|
|
5056
5041
|
this._disabling = false;
|
|
5057
5042
|
this.markForCheck();
|
|
@@ -5068,12 +5053,12 @@ class MatDate {
|
|
|
5068
5053
|
.locale(this.locale) // set as time as locale time
|
|
5069
5054
|
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5070
5055
|
.utc(true);
|
|
5071
|
-
dateStr = this.dateAdapter.format(date, this.
|
|
5056
|
+
dateStr = this.dateAdapter.format(date, this.datePattern) || null;
|
|
5072
5057
|
}
|
|
5073
|
-
if (this.
|
|
5058
|
+
if (this.textControl.value !== dateStr) {
|
|
5074
5059
|
// DEBUG
|
|
5075
5060
|
//console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5076
|
-
this.
|
|
5061
|
+
this.textControl.setValue(dateStr, {
|
|
5077
5062
|
emitEvent: true // Will call onFormChange
|
|
5078
5063
|
});
|
|
5079
5064
|
}
|
|
@@ -5118,7 +5103,7 @@ class MatDate {
|
|
|
5118
5103
|
});
|
|
5119
5104
|
}
|
|
5120
5105
|
clear() {
|
|
5121
|
-
this.
|
|
5106
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5122
5107
|
this.formControl.setValue(null, { emitEvent: false });
|
|
5123
5108
|
this._onChangeCallback(null);
|
|
5124
5109
|
this.markAsTouched();
|
|
@@ -5127,43 +5112,70 @@ class MatDate {
|
|
|
5127
5112
|
/* -- private method -- */
|
|
5128
5113
|
updatePattern(pattern) {
|
|
5129
5114
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5130
|
-
if (this.
|
|
5131
|
-
this.
|
|
5132
|
-
this.dayPattern = pattern;
|
|
5115
|
+
if (this.datePattern !== pattern) {
|
|
5116
|
+
this.datePattern = pattern;
|
|
5133
5117
|
this.markForCheck();
|
|
5134
5118
|
}
|
|
5135
5119
|
}
|
|
5136
5120
|
checkIfTouched(opts) {
|
|
5137
|
-
if (this.
|
|
5121
|
+
if (this.textControl.touched) {
|
|
5138
5122
|
this._onTouchedCallback();
|
|
5139
5123
|
if (!opts || opts.emitEvent !== false) {
|
|
5140
5124
|
this.markForCheck();
|
|
5141
5125
|
}
|
|
5142
5126
|
}
|
|
5143
5127
|
}
|
|
5144
|
-
onFormChange(
|
|
5128
|
+
onFormChange(value) {
|
|
5145
5129
|
if (this._writing)
|
|
5146
5130
|
return; // Skip if call by self
|
|
5147
5131
|
this._writing = true;
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5132
|
+
// DEBUG
|
|
5133
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5134
|
+
/*if (this.dayControl.invalid) {
|
|
5135
|
+
this.formControl.markAsPending({onlySelf: true});
|
|
5136
|
+
this.formControl.setErrors({
|
|
5137
|
+
...this.formControl.errors,
|
|
5138
|
+
...this.dayControl.errors
|
|
5139
|
+
});
|
|
5140
|
+
this.formControl.markAsDirty();
|
|
5141
|
+
this._writing = false;
|
|
5142
|
+
return;
|
|
5143
|
+
}*/
|
|
5144
|
+
if (value) {
|
|
5145
|
+
// Make to remove placeholder chars
|
|
5146
|
+
while (value.indexOf(this.placeholderChar) !== -1) {
|
|
5147
|
+
value = value.replace(this.placeholderChar, '');
|
|
5148
|
+
}
|
|
5149
|
+
// Force '0' for empty month (otherwise moment will use the current month)
|
|
5150
|
+
value = value.replace('//', '/0/')
|
|
5151
|
+
// Force '0' for empty year (otherwise moment will use the current year)
|
|
5152
|
+
.replace(/\/$/, '/0');
|
|
5158
5153
|
}
|
|
5159
|
-
// Parse
|
|
5160
|
-
let
|
|
5154
|
+
// Parse date (strict = false)
|
|
5155
|
+
let date = isNotNilOrBlank(value) && this.dateAdapter.parse(value, this.datePattern) || null;
|
|
5161
5156
|
// Move to the expected TZ, and keep the local hour (= midnight) to have midnight at local time
|
|
5162
|
-
|
|
5163
|
-
|
|
5157
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date) || null;
|
|
5158
|
+
date = date && date
|
|
5164
5159
|
.startOf('day') // Reset hour
|
|
5165
|
-
.utc()
|
|
5166
|
-
|
|
5160
|
+
.utc() // Convert to UTC (avoid TZ offset in final string)
|
|
5161
|
+
|| null;
|
|
5162
|
+
// Convert to model value (ISO date string)
|
|
5163
|
+
// IMPORTANT: If date is invalid, then keep the invalid string value
|
|
5164
|
+
// to allow SharedValidators.validDate() to raise an error
|
|
5165
|
+
const formControlValue = date && date.isValid() ? toDateISOString(date) : (value || null);
|
|
5166
|
+
if (this.formControl.value !== formControlValue) {
|
|
5167
|
+
// DEBUG
|
|
5168
|
+
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5169
|
+
// Apply to form control. => Will call writeValue()
|
|
5170
|
+
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5171
|
+
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5172
|
+
// Changes comes from inside function: use the callback
|
|
5173
|
+
this._onChangeCallback(formControlValue);
|
|
5174
|
+
// Check if need to update controls
|
|
5175
|
+
this.checkIfTouched();
|
|
5176
|
+
}
|
|
5177
|
+
// Force the day control to update its validity (same errors as formControl - see ngOnInit())
|
|
5178
|
+
this.textControl.updateValueAndValidity();
|
|
5167
5179
|
this._writing = false;
|
|
5168
5180
|
}
|
|
5169
5181
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
@@ -5180,21 +5192,6 @@ class MatDate {
|
|
|
5180
5192
|
}
|
|
5181
5193
|
});
|
|
5182
5194
|
}
|
|
5183
|
-
emitChange(value) {
|
|
5184
|
-
// Get the model value
|
|
5185
|
-
const dateStr = toDateISOString(value) || null;
|
|
5186
|
-
if (this.formControl.value !== dateStr) {
|
|
5187
|
-
// DEBUG
|
|
5188
|
-
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5189
|
-
// Apply to form control. => Will call writeValue()
|
|
5190
|
-
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5191
|
-
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5192
|
-
// Changes comes from inside function: use the callback
|
|
5193
|
-
this._onChangeCallback(dateStr);
|
|
5194
|
-
// Check if need to update controls
|
|
5195
|
-
this.checkIfTouched();
|
|
5196
|
-
}
|
|
5197
|
-
}
|
|
5198
5195
|
updateTabIndex() {
|
|
5199
5196
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
5200
5197
|
return; // skip
|
|
@@ -5207,7 +5204,7 @@ class MatDate {
|
|
|
5207
5204
|
});
|
|
5208
5205
|
}
|
|
5209
5206
|
markAsTouched(opts) {
|
|
5210
|
-
this.
|
|
5207
|
+
this.textControl.markAsTouched(opts);
|
|
5211
5208
|
this._onTouchedCallback();
|
|
5212
5209
|
this.markForCheck();
|
|
5213
5210
|
}
|
|
@@ -5221,16 +5218,16 @@ class MatDate {
|
|
|
5221
5218
|
MatDate.decorators = [
|
|
5222
5219
|
{ type: Component, args: [{
|
|
5223
5220
|
selector: 'mat-date-field',
|
|
5224
|
-
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:
|
|
5221
|
+
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: datePattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\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]=\"textControl\"\n [textMask]=\"{mask: mask, 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]=\"textControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\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)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <!-- errors -->\n <mat-error *ngIf=\"formControl.touched && formControl.errors|mapKeys|arrayFirst; let errorKey\">\n <ng-container [ngSwitch]=\"errorKey\">\n <span *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</span>\n <span *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE</span>\n <span *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</span>\n <span *ngSwitchCase=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</span>\n <span *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</span>\n <span *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</span>\n <span *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</span>\n <span *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</span>\n </ng-container>\n </mat-error>\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 </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"\n ></mat-datepicker>\n\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",
|
|
5225
5222
|
providers: [
|
|
5226
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5223
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5227
5224
|
],
|
|
5228
5225
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5229
5226
|
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%}"]
|
|
5230
5227
|
},] }
|
|
5231
5228
|
];
|
|
5232
5229
|
MatDate.ctorParameters = () => [
|
|
5233
|
-
{ type:
|
|
5230
|
+
{ type: MomentDateAdapter },
|
|
5234
5231
|
{ type: TranslateService },
|
|
5235
5232
|
{ type: FormBuilder },
|
|
5236
5233
|
{ type: ChangeDetectorRef },
|
|
@@ -5257,16 +5254,16 @@ MatDate.propDecorators = {
|
|
|
5257
5254
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5258
5255
|
};
|
|
5259
5256
|
|
|
5260
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5257
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5261
5258
|
provide: NG_VALUE_ACCESSOR,
|
|
5262
5259
|
useExisting: forwardRef(() => MatDateTime),
|
|
5263
5260
|
multi: true
|
|
5264
5261
|
};
|
|
5265
|
-
const DAY_MASK
|
|
5262
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5266
5263
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5267
|
-
const HOUR_MASK
|
|
5268
|
-
const noop$
|
|
5269
|
-
const ɵ0$
|
|
5264
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5265
|
+
const noop$3 = () => { };
|
|
5266
|
+
const ɵ0$4 = noop$3;
|
|
5270
5267
|
class MatDateTime {
|
|
5271
5268
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5272
5269
|
this.dateAdapter = dateAdapter;
|
|
@@ -5275,14 +5272,14 @@ class MatDateTime {
|
|
|
5275
5272
|
this.cd = cd;
|
|
5276
5273
|
this.keyboard = keyboard;
|
|
5277
5274
|
this.formGroupDir = formGroupDir;
|
|
5278
|
-
this._onChangeCallback = noop$
|
|
5279
|
-
this._onTouchedCallback = noop$
|
|
5275
|
+
this._onChangeCallback = noop$3;
|
|
5276
|
+
this._onTouchedCallback = noop$3;
|
|
5280
5277
|
this._subscription = new Subscription();
|
|
5281
5278
|
this._writing = true;
|
|
5282
5279
|
this._disabling = false;
|
|
5283
5280
|
this._readonly = false;
|
|
5284
|
-
this.dayMask = DAY_MASK
|
|
5285
|
-
this.hourMask = HOUR_MASK
|
|
5281
|
+
this.dayMask = DAY_MASK;
|
|
5282
|
+
this.hourMask = HOUR_MASK;
|
|
5286
5283
|
this.floatLabel = 'auto';
|
|
5287
5284
|
this.compact = false;
|
|
5288
5285
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5596,14 +5593,14 @@ MatDateTime.decorators = [
|
|
|
5596
5593
|
selector: 'mat-date-time-field',
|
|
5597
5594
|
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]=\"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 input -->\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n [matDatepickerFilter]=\"datePickerFilter\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix\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)=\"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=\"'dateIsBefore'\">{{'ERROR.FIELD_NOT_VALID_DATE_BEFORE' | translate: formControl.errors.dateIsBefore }}</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 && (hourControl.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]=\"hourControl\"\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]=\"hourControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"hourControl\"\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",
|
|
5598
5595
|
providers: [
|
|
5599
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5596
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
5600
5597
|
],
|
|
5601
5598
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5602
5599
|
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%}"]
|
|
5603
5600
|
},] }
|
|
5604
5601
|
];
|
|
5605
5602
|
MatDateTime.ctorParameters = () => [
|
|
5606
|
-
{ type:
|
|
5603
|
+
{ type: MomentDateAdapter },
|
|
5607
5604
|
{ type: TranslateService },
|
|
5608
5605
|
{ type: FormBuilder },
|
|
5609
5606
|
{ type: ChangeDetectorRef },
|
|
@@ -5630,15 +5627,15 @@ MatDateTime.propDecorators = {
|
|
|
5630
5627
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5631
5628
|
};
|
|
5632
5629
|
|
|
5633
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5630
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5634
5631
|
provide: NG_VALUE_ACCESSOR,
|
|
5635
5632
|
useExisting: forwardRef(() => MatDateShort),
|
|
5636
5633
|
multi: true
|
|
5637
5634
|
};
|
|
5638
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5635
|
+
const DAY_MASK$1 = [/\d/, /\d/, /\d/, /\d/];
|
|
5639
5636
|
const noop$4 = () => {
|
|
5640
5637
|
};
|
|
5641
|
-
const ɵ0$
|
|
5638
|
+
const ɵ0$5 = noop$4;
|
|
5642
5639
|
class MatDateShort {
|
|
5643
5640
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5644
5641
|
this.dateAdapter = dateAdapter;
|
|
@@ -5651,7 +5648,7 @@ class MatDateShort {
|
|
|
5651
5648
|
this._onTouchedCallback = noop$4;
|
|
5652
5649
|
this.writing = true;
|
|
5653
5650
|
this.disabling = false;
|
|
5654
|
-
this.dayMask = DAY_MASK;
|
|
5651
|
+
this.dayMask = DAY_MASK$1;
|
|
5655
5652
|
this.disabled = false;
|
|
5656
5653
|
this.floatLabel = 'auto';
|
|
5657
5654
|
this.readonly = false;
|
|
@@ -5896,7 +5893,7 @@ MatDateShort.decorators = [
|
|
|
5896
5893
|
selector: 'mat-date-short-field',
|
|
5897
5894
|
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",
|
|
5898
5895
|
providers: [
|
|
5899
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5896
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5900
5897
|
],
|
|
5901
5898
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5902
5899
|
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%}"]
|
|
@@ -5964,16 +5961,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5964
5961
|
},] }
|
|
5965
5962
|
];
|
|
5966
5963
|
|
|
5967
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5964
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5968
5965
|
provide: NG_VALUE_ACCESSOR,
|
|
5969
5966
|
useExisting: forwardRef(() => MatDuration),
|
|
5970
5967
|
multi: true
|
|
5971
5968
|
};
|
|
5972
5969
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5973
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5974
|
-
const noop$
|
|
5970
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5971
|
+
const noop$5 = () => {
|
|
5975
5972
|
};
|
|
5976
|
-
const ɵ0$6 = noop$
|
|
5973
|
+
const ɵ0$6 = noop$5;
|
|
5977
5974
|
class MatDuration {
|
|
5978
5975
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5979
5976
|
this.dateAdapter = dateAdapter;
|
|
@@ -5982,11 +5979,11 @@ class MatDuration {
|
|
|
5982
5979
|
this.cd = cd;
|
|
5983
5980
|
this.formGroupDir = formGroupDir;
|
|
5984
5981
|
this._subscription = new Subscription();
|
|
5985
|
-
this._onChangeCallback = noop$
|
|
5986
|
-
this._onTouchedCallback = noop$
|
|
5982
|
+
this._onChangeCallback = noop$5;
|
|
5983
|
+
this._onTouchedCallback = noop$5;
|
|
5987
5984
|
this.writing = true;
|
|
5988
5985
|
this.disabling = false;
|
|
5989
|
-
this.hourMask = HOUR_MASK;
|
|
5986
|
+
this.hourMask = HOUR_MASK$1;
|
|
5990
5987
|
this.disabled = false;
|
|
5991
5988
|
this.floatLabel = 'auto';
|
|
5992
5989
|
this.readonly = false;
|
|
@@ -6166,7 +6163,7 @@ MatDuration.decorators = [
|
|
|
6166
6163
|
selector: 'mat-duration-field',
|
|
6167
6164
|
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",
|
|
6168
6165
|
providers: [
|
|
6169
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6166
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6170
6167
|
],
|
|
6171
6168
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6172
6169
|
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%}"]
|
|
@@ -6223,22 +6220,22 @@ SharedMatDurationModule.decorators = [
|
|
|
6223
6220
|
},] }
|
|
6224
6221
|
];
|
|
6225
6222
|
|
|
6226
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
6223
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6227
6224
|
provide: NG_VALUE_ACCESSOR,
|
|
6228
6225
|
useExisting: forwardRef(() => MatBooleanField),
|
|
6229
6226
|
multi: true
|
|
6230
6227
|
};
|
|
6231
|
-
const noop$
|
|
6228
|
+
const noop$6 = () => {
|
|
6232
6229
|
};
|
|
6233
|
-
const ɵ0$
|
|
6230
|
+
const ɵ0$7 = noop$6;
|
|
6234
6231
|
class MatBooleanField {
|
|
6235
6232
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
6236
6233
|
this.translate = translate;
|
|
6237
6234
|
this.formBuilder = formBuilder;
|
|
6238
6235
|
this.cd = cd;
|
|
6239
6236
|
this.formGroupDir = formGroupDir;
|
|
6240
|
-
this._onChangeCallback = noop$
|
|
6241
|
-
this._onTouchedCallback = noop$
|
|
6237
|
+
this._onChangeCallback = noop$6;
|
|
6238
|
+
this._onTouchedCallback = noop$6;
|
|
6242
6239
|
this._writing = false;
|
|
6243
6240
|
this.showRadio = false;
|
|
6244
6241
|
this.disabled = false;
|
|
@@ -6401,7 +6398,7 @@ MatBooleanField.decorators = [
|
|
|
6401
6398
|
selector: 'mat-boolean-field',
|
|
6402
6399
|
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",
|
|
6403
6400
|
providers: [
|
|
6404
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6401
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
6405
6402
|
],
|
|
6406
6403
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6407
6404
|
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}"]
|
|
@@ -6647,7 +6644,7 @@ class MatNumpadDomService {
|
|
|
6647
6644
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6648
6645
|
}
|
|
6649
6646
|
}
|
|
6650
|
-
MatNumpadDomService.ɵprov =
|
|
6647
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
6651
6648
|
MatNumpadDomService.decorators = [
|
|
6652
6649
|
{ type: Injectable, args: [{
|
|
6653
6650
|
providedIn: 'root'
|
|
@@ -7011,7 +7008,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
7011
7008
|
},] }
|
|
7012
7009
|
];
|
|
7013
7010
|
|
|
7014
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
7011
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7015
7012
|
provide: NG_VALUE_ACCESSOR,
|
|
7016
7013
|
useExisting: forwardRef(() => MatSwipeField),
|
|
7017
7014
|
multi: true
|
|
@@ -7274,7 +7271,7 @@ MatSwipeField.decorators = [
|
|
|
7274
7271
|
{ type: Component, args: [{
|
|
7275
7272
|
selector: 'mat-swipe-field',
|
|
7276
7273
|
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",
|
|
7277
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
7274
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
7278
7275
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7279
7276
|
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}"]
|
|
7280
7277
|
},] }
|
|
@@ -7332,14 +7329,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
7332
7329
|
},] }
|
|
7333
7330
|
];
|
|
7334
7331
|
|
|
7335
|
-
const noop$
|
|
7336
|
-
const ɵ0$
|
|
7332
|
+
const noop$7 = () => { };
|
|
7333
|
+
const ɵ0$8 = noop$7;
|
|
7337
7334
|
class MatChipsField {
|
|
7338
7335
|
constructor(cd, formGroupDir) {
|
|
7339
7336
|
this.cd = cd;
|
|
7340
7337
|
this.formGroupDir = formGroupDir;
|
|
7341
|
-
this._onChangeCallback = noop$
|
|
7342
|
-
this._onTouchedCallback = noop$
|
|
7338
|
+
this._onChangeCallback = noop$7;
|
|
7339
|
+
this._onTouchedCallback = noop$7;
|
|
7343
7340
|
this.logPrefix = '[mat-chips] ';
|
|
7344
7341
|
this.formControlName = null;
|
|
7345
7342
|
this.required = false;
|
|
@@ -8211,7 +8208,7 @@ class ProgressBarService {
|
|
|
8211
8208
|
}
|
|
8212
8209
|
}
|
|
8213
8210
|
}
|
|
8214
|
-
ProgressBarService.ɵprov =
|
|
8211
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
8215
8212
|
ProgressBarService.decorators = [
|
|
8216
8213
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8217
8214
|
];
|
|
@@ -8255,7 +8252,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
8255
8252
|
return mc;
|
|
8256
8253
|
}
|
|
8257
8254
|
}
|
|
8258
|
-
AppGestureConfig.ɵprov =
|
|
8255
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
8259
8256
|
AppGestureConfig.decorators = [
|
|
8260
8257
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8261
8258
|
];
|
|
@@ -8480,7 +8477,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
8480
8477
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
8481
8478
|
}
|
|
8482
8479
|
}
|
|
8483
|
-
MatPaginatorI18n.ɵprov =
|
|
8480
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
8484
8481
|
MatPaginatorI18n.decorators = [
|
|
8485
8482
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8486
8483
|
];
|
|
@@ -8570,17 +8567,17 @@ function getColorContrast(color, bw) {
|
|
|
8570
8567
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
8571
8568
|
}
|
|
8572
8569
|
|
|
8573
|
-
const noop = () => {
|
|
8570
|
+
const noop$8 = () => {
|
|
8574
8571
|
};
|
|
8575
|
-
const ɵ0$
|
|
8572
|
+
const ɵ0$9 = noop$8;
|
|
8576
8573
|
class AppFormField {
|
|
8577
8574
|
constructor(translate, cd, injector, formGroupDir) {
|
|
8578
8575
|
this.translate = translate;
|
|
8579
8576
|
this.cd = cd;
|
|
8580
8577
|
this.injector = injector;
|
|
8581
8578
|
this.formGroupDir = formGroupDir;
|
|
8582
|
-
this._onChangeCallback = noop;
|
|
8583
|
-
this._onTouchedCallback = noop;
|
|
8579
|
+
this._onChangeCallback = noop$8;
|
|
8580
|
+
this._onTouchedCallback = noop$8;
|
|
8584
8581
|
this.readonly = false;
|
|
8585
8582
|
this.compact = false;
|
|
8586
8583
|
this.floatLabel = 'auto';
|
|
@@ -9016,14 +9013,14 @@ class AudioProvider extends StartableService {
|
|
|
9016
9013
|
});
|
|
9017
9014
|
}
|
|
9018
9015
|
}
|
|
9019
|
-
AudioProvider.ɵprov =
|
|
9016
|
+
AudioProvider.ɵprov = ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(ɵɵinject(Platform), ɵɵinject(NativeAudio, 8), ɵɵinject(Vibration, 8), ɵɵinject(AudioManagement$1, 8)); }, token: AudioProvider, providedIn: "root" });
|
|
9020
9017
|
AudioProvider.decorators = [
|
|
9021
9018
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9022
9019
|
];
|
|
9023
9020
|
AudioProvider.ctorParameters = () => [
|
|
9024
9021
|
{ type: Platform },
|
|
9025
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
9026
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
9022
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
9023
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
9027
9024
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
9028
9025
|
];
|
|
9029
9026
|
|
|
@@ -9108,7 +9105,7 @@ class Hotkeys {
|
|
|
9108
9105
|
});
|
|
9109
9106
|
}
|
|
9110
9107
|
}
|
|
9111
|
-
Hotkeys.ɵprov =
|
|
9108
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController), ɵɵinject(PopoverController)); }, token: Hotkeys, providedIn: "root" });
|
|
9112
9109
|
Hotkeys.decorators = [
|
|
9113
9110
|
{ type: Injectable, args: [{
|
|
9114
9111
|
providedIn: 'root'
|
|
@@ -9283,7 +9280,7 @@ class Base64ImageReader {
|
|
|
9283
9280
|
}
|
|
9284
9281
|
}
|
|
9285
9282
|
|
|
9286
|
-
const uuidv4
|
|
9283
|
+
const uuidv4 = uuidv4Imported;
|
|
9287
9284
|
class FileService {
|
|
9288
9285
|
constructor(platform,
|
|
9289
9286
|
//private transfer: FileTransfer,
|
|
@@ -9320,7 +9317,7 @@ class FileService {
|
|
|
9320
9317
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
9321
9318
|
if (lastSlashIndex === -1)
|
|
9322
9319
|
throw new Error('Invalid URL: ' + source);
|
|
9323
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
9320
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
9324
9321
|
// Download into the file system
|
|
9325
9322
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
9326
9323
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -9376,7 +9373,7 @@ class FileService {
|
|
|
9376
9373
|
this._started = true;
|
|
9377
9374
|
}
|
|
9378
9375
|
}
|
|
9379
|
-
FileService.ɵprov =
|
|
9376
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
9380
9377
|
FileService.decorators = [
|
|
9381
9378
|
{ type: Injectable, args: [{
|
|
9382
9379
|
providedIn: 'root',
|
|
@@ -9542,7 +9539,7 @@ class Base58 {
|
|
|
9542
9539
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9543
9540
|
|
|
9544
9541
|
const scrypt = require('scrypt-async');
|
|
9545
|
-
const sha256
|
|
9542
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
9546
9543
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
9547
9544
|
const nacl = {
|
|
9548
9545
|
sign,
|
|
@@ -9646,7 +9643,7 @@ class CryptoService {
|
|
|
9646
9643
|
* Hash (using SHA256) a message
|
|
9647
9644
|
*/
|
|
9648
9645
|
sha256(message) {
|
|
9649
|
-
return sha256
|
|
9646
|
+
return sha256().update(message).digest('hex');
|
|
9650
9647
|
}
|
|
9651
9648
|
/**
|
|
9652
9649
|
* Hash (using SHA512) a message
|
|
@@ -9659,7 +9656,7 @@ class CryptoService {
|
|
|
9659
9656
|
return nacl.util.encodeBase64(m);
|
|
9660
9657
|
}
|
|
9661
9658
|
}
|
|
9662
|
-
CryptoService.ɵprov =
|
|
9659
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9663
9660
|
CryptoService.decorators = [
|
|
9664
9661
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9665
9662
|
];
|
|
@@ -10419,7 +10416,7 @@ SelectPeerModal.propDecorators = {
|
|
|
10419
10416
|
onRefresh: [{ type: Input }]
|
|
10420
10417
|
};
|
|
10421
10418
|
|
|
10422
|
-
const moment$
|
|
10419
|
+
const moment$3 = momentImported;
|
|
10423
10420
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
10424
10421
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
10425
10422
|
// fixme: this constant points to static environment
|
|
@@ -10662,11 +10659,11 @@ class LocalSettingsService extends StartableService {
|
|
|
10662
10659
|
if (!feature) {
|
|
10663
10660
|
feature = {
|
|
10664
10661
|
name: featureName.toLowerCase(),
|
|
10665
|
-
lastSyncDate: moment$
|
|
10662
|
+
lastSyncDate: moment$3().toISOString()
|
|
10666
10663
|
};
|
|
10667
10664
|
}
|
|
10668
10665
|
else {
|
|
10669
|
-
feature.lastSyncDate = moment$
|
|
10666
|
+
feature.lastSyncDate = moment$3().toISOString();
|
|
10670
10667
|
}
|
|
10671
10668
|
this.saveOfflineFeature(feature);
|
|
10672
10669
|
}
|
|
@@ -10827,7 +10824,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10827
10824
|
if (!page || !page.title || !page.path)
|
|
10828
10825
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
10829
10826
|
// Set time
|
|
10830
|
-
page.time = page.time || moment$
|
|
10827
|
+
page.time = page.time || moment$3();
|
|
10831
10828
|
// Clean the title (remove <small> tags)
|
|
10832
10829
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
10833
10830
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -10843,18 +10840,18 @@ class LocalSettingsService extends StartableService {
|
|
|
10843
10840
|
return page;
|
|
10844
10841
|
}
|
|
10845
10842
|
}
|
|
10846
|
-
LocalSettingsService.ɵprov =
|
|
10843
|
+
LocalSettingsService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(ɵɵinject(TranslateService), ɵɵinject(Platform), ɵɵinject(Storage), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_LOCAL_SETTINGS, 8), ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
|
|
10847
10844
|
LocalSettingsService.decorators = [
|
|
10848
10845
|
{ type: Injectable, args: [{
|
|
10849
|
-
providedIn: 'root'
|
|
10850
|
-
deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10846
|
+
providedIn: 'root'
|
|
10847
|
+
//deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10851
10848
|
},] }
|
|
10852
10849
|
];
|
|
10853
10850
|
LocalSettingsService.ctorParameters = () => [
|
|
10854
10851
|
{ type: TranslateService },
|
|
10855
10852
|
{ type: Platform },
|
|
10856
10853
|
{ type: Storage },
|
|
10857
|
-
{ type:
|
|
10854
|
+
{ type: Environment, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10858
10855
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS,] }] },
|
|
10859
10856
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS_OPTIONS,] }] }
|
|
10860
10857
|
];
|
|
@@ -11560,7 +11557,7 @@ class NetworkService extends StartableService {
|
|
|
11560
11557
|
});
|
|
11561
11558
|
}
|
|
11562
11559
|
}
|
|
11563
|
-
NetworkService.ɵprov =
|
|
11560
|
+
NetworkService.ɵprov = ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(ɵɵinject(DOCUMENT), ɵɵinject(Platform), ɵɵinject(ModalController), ɵɵinject(CryptoService), ɵɵinject(Storage), ɵɵinject(LocalSettingsService), ɵɵinject(CacheService), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT), ɵɵinject(Network, 8), ɵɵinject(SplashScreen, 8), ɵɵinject(TranslateService, 8), ɵɵinject(ToastController, 8)); }, token: NetworkService, providedIn: "root" });
|
|
11564
11561
|
NetworkService.decorators = [
|
|
11565
11562
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11566
11563
|
];
|
|
@@ -11571,16 +11568,16 @@ NetworkService.ctorParameters = () => [
|
|
|
11571
11568
|
{ type: CryptoService },
|
|
11572
11569
|
{ type: Storage },
|
|
11573
11570
|
{ type: LocalSettingsService },
|
|
11574
|
-
{ type: CacheService },
|
|
11571
|
+
{ type: CacheService$1 },
|
|
11575
11572
|
{ type: HttpClient },
|
|
11576
11573
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
11577
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
11578
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
11574
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
11575
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
11579
11576
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
11580
11577
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
11581
11578
|
];
|
|
11582
11579
|
|
|
11583
|
-
const ErrorCodes
|
|
11580
|
+
const ErrorCodes = {
|
|
11584
11581
|
UNKNOWN_ERROR: 0,
|
|
11585
11582
|
LOAD_ACCOUNT_ERROR: 1,
|
|
11586
11583
|
BAD_PASSWORD: 2,
|
|
@@ -11932,7 +11929,7 @@ class EntityStore {
|
|
|
11932
11929
|
}
|
|
11933
11930
|
catch (err) {
|
|
11934
11931
|
console.error(err);
|
|
11935
|
-
throw { code: ErrorCodes
|
|
11932
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11936
11933
|
}
|
|
11937
11934
|
}
|
|
11938
11935
|
// Emit update event
|
|
@@ -12506,7 +12503,7 @@ class EntitiesStorage extends StartableService {
|
|
|
12506
12503
|
}
|
|
12507
12504
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
12508
12505
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
12509
|
-
EntitiesStorage.ɵprov =
|
|
12506
|
+
EntitiesStorage.ɵprov = ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(ɵɵinject(Platform), ɵɵinject(ProgressBarService), ɵɵinject(Storage), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
|
|
12510
12507
|
EntitiesStorage.decorators = [
|
|
12511
12508
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
12512
12509
|
];
|
|
@@ -12643,10 +12640,10 @@ function referentialToString(obj, properties) {
|
|
|
12643
12640
|
function referentialsToString(values, properties, separator) {
|
|
12644
12641
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12645
12642
|
}
|
|
12646
|
-
const ɵ0$
|
|
12643
|
+
const ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12647
12644
|
const StatusList = Object.freeze([
|
|
12648
12645
|
{
|
|
12649
|
-
id: ɵ0$
|
|
12646
|
+
id: ɵ0$a,
|
|
12650
12647
|
icon: 'checkmark',
|
|
12651
12648
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12652
12649
|
},
|
|
@@ -12921,7 +12918,7 @@ function accountToString(data) {
|
|
|
12921
12918
|
(data.lastName || '')) || '';
|
|
12922
12919
|
}
|
|
12923
12920
|
|
|
12924
|
-
const uuidv4 = uuidv4Imported;
|
|
12921
|
+
const uuidv4$1 = uuidv4Imported;
|
|
12925
12922
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12926
12923
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12927
12924
|
/**
|
|
@@ -12965,7 +12962,7 @@ function createTrackerLink(opts) {
|
|
|
12965
12962
|
// Skip if not tracked
|
|
12966
12963
|
if (!context || !context.tracked)
|
|
12967
12964
|
return forward(operation);
|
|
12968
|
-
const id = context.serializationKey || uuidv4();
|
|
12965
|
+
const id = context.serializationKey || uuidv4$1();
|
|
12969
12966
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12970
12967
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12971
12968
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -13628,7 +13625,7 @@ class GraphqlService extends StartableService {
|
|
|
13628
13625
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
13629
13626
|
|| this.toAppError(err.networkError)
|
|
13630
13627
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
13631
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
13628
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
13632
13629
|
// If graphQL: try to convert the first error found
|
|
13633
13630
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
13634
13631
|
|| this.toAppError(err)
|
|
@@ -13636,7 +13633,7 @@ class GraphqlService extends StartableService {
|
|
|
13636
13633
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
13637
13634
|
|| err;
|
|
13638
13635
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
13639
|
-
if (error && error.code === ErrorCodes
|
|
13636
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13640
13637
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
13641
13638
|
this.onNetworkError.next(error);
|
|
13642
13639
|
}
|
|
@@ -13672,7 +13669,7 @@ class GraphqlService extends StartableService {
|
|
|
13672
13669
|
return 'ERROR.UNAUTHORIZED';
|
|
13673
13670
|
case ServerErrorCodes.FORBIDDEN:
|
|
13674
13671
|
return 'ERROR.FORBIDDEN';
|
|
13675
|
-
case ErrorCodes
|
|
13672
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13676
13673
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13677
13674
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13678
13675
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13703,7 +13700,7 @@ class GraphqlService extends StartableService {
|
|
|
13703
13700
|
return undefined;
|
|
13704
13701
|
}
|
|
13705
13702
|
}
|
|
13706
|
-
GraphqlService.ɵprov =
|
|
13703
|
+
GraphqlService.ɵprov = ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(ɵɵinject(Platform), ɵɵinject(Apollo), ɵɵinject(HttpLink), ɵɵinject(NetworkService), ɵɵinject(Storage), ɵɵinject(CryptoService), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
|
|
13707
13704
|
GraphqlService.decorators = [
|
|
13708
13705
|
{ type: Injectable, args: [{
|
|
13709
13706
|
providedIn: 'root'
|
|
@@ -13720,7 +13717,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13720
13717
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13721
13718
|
];
|
|
13722
13719
|
|
|
13723
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13720
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
13724
13721
|
class BaseGraphqlServiceOptions {
|
|
13725
13722
|
}
|
|
13726
13723
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13871,8 +13868,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13871
13868
|
}
|
|
13872
13869
|
/* -- protected methods -- */
|
|
13873
13870
|
computeMutableWatchQueryId(opts) {
|
|
13874
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13875
|
-
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13871
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13872
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13876
13873
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13877
13874
|
}
|
|
13878
13875
|
findMutableWatchQueries(opts) {
|
|
@@ -13942,7 +13939,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13942
13939
|
/* ------------------------------------
|
|
13943
13940
|
* GraphQL queries
|
|
13944
13941
|
* ------------------------------------*/
|
|
13945
|
-
const Fragments
|
|
13942
|
+
const Fragments = {
|
|
13946
13943
|
account: gql `
|
|
13947
13944
|
fragment AccountFragment on AccountVO {
|
|
13948
13945
|
id
|
|
@@ -13977,14 +13974,14 @@ const Fragments$1 = {
|
|
|
13977
13974
|
}`
|
|
13978
13975
|
};
|
|
13979
13976
|
// Load account query
|
|
13980
|
-
const LoadQuery
|
|
13977
|
+
const LoadQuery = gql `
|
|
13981
13978
|
query Account {
|
|
13982
13979
|
data: account {
|
|
13983
13980
|
...AccountFragment
|
|
13984
13981
|
}
|
|
13985
13982
|
}
|
|
13986
|
-
${Fragments
|
|
13987
|
-
${Fragments
|
|
13983
|
+
${Fragments.account}
|
|
13984
|
+
${Fragments.settings}
|
|
13988
13985
|
`;
|
|
13989
13986
|
// Check email query
|
|
13990
13987
|
const IsEmailExistsQuery = gql `
|
|
@@ -13999,21 +13996,21 @@ const AccountMutations = {
|
|
|
13999
13996
|
...AccountFragment
|
|
14000
13997
|
}
|
|
14001
13998
|
}
|
|
14002
|
-
${Fragments
|
|
14003
|
-
${Fragments
|
|
13999
|
+
${Fragments.account}
|
|
14000
|
+
${Fragments.settings}`,
|
|
14004
14001
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
14005
14002
|
data: createAccount(account: $data){
|
|
14006
14003
|
...AccountFragment
|
|
14007
14004
|
}
|
|
14008
14005
|
}
|
|
14009
|
-
${Fragments
|
|
14010
|
-
${Fragments
|
|
14006
|
+
${Fragments.account}
|
|
14007
|
+
${Fragments.settings}`,
|
|
14011
14008
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
14012
14009
|
data: saveSettings(settings: $data){
|
|
14013
14010
|
...UserSettingsFragment
|
|
14014
14011
|
}
|
|
14015
14012
|
}
|
|
14016
|
-
${Fragments
|
|
14013
|
+
${Fragments.settings}`
|
|
14017
14014
|
};
|
|
14018
14015
|
// Sent confirmation email
|
|
14019
14016
|
const SendConfirmEmailMutation = gql `
|
|
@@ -14328,7 +14325,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14328
14325
|
catch (error) {
|
|
14329
14326
|
console.error(error);
|
|
14330
14327
|
this.resetData();
|
|
14331
|
-
throw { code: ErrorCodes
|
|
14328
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
14332
14329
|
}
|
|
14333
14330
|
// Store pubkey+keypair
|
|
14334
14331
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -14362,7 +14359,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14362
14359
|
}
|
|
14363
14360
|
catch (err) {
|
|
14364
14361
|
// If account not found, check if email is valid
|
|
14365
|
-
if (err && +(err.code) === ErrorCodes
|
|
14362
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
14366
14363
|
// Check email exists
|
|
14367
14364
|
if (data.username.indexOf('@') !== -1) {
|
|
14368
14365
|
let isEmailExists;
|
|
@@ -14374,11 +14371,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
14374
14371
|
}
|
|
14375
14372
|
// Email not exists (no account)
|
|
14376
14373
|
if (!isEmailExists) {
|
|
14377
|
-
throw { code: ErrorCodes
|
|
14374
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
14378
14375
|
}
|
|
14379
14376
|
}
|
|
14380
14377
|
// Email exists, so error = 'bad password'
|
|
14381
|
-
throw { code: ErrorCodes
|
|
14378
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
14382
14379
|
}
|
|
14383
14380
|
throw err; // resend the first error
|
|
14384
14381
|
}
|
|
@@ -14524,8 +14521,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
14524
14521
|
// Load remotely
|
|
14525
14522
|
else {
|
|
14526
14523
|
const { data } = yield this.graphql.query({
|
|
14527
|
-
query: LoadQuery
|
|
14528
|
-
error: { code: ErrorCodes
|
|
14524
|
+
query: LoadQuery,
|
|
14525
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
14529
14526
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
14530
14527
|
});
|
|
14531
14528
|
json = data;
|
|
@@ -14552,7 +14549,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14552
14549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14553
14550
|
const isEmailExists = yield this.isEmailExists(email);
|
|
14554
14551
|
if (isEmailExists) {
|
|
14555
|
-
throw { code: ErrorCodes
|
|
14552
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14556
14553
|
}
|
|
14557
14554
|
});
|
|
14558
14555
|
}
|
|
@@ -14588,7 +14585,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14588
14585
|
locale
|
|
14589
14586
|
},
|
|
14590
14587
|
error: {
|
|
14591
|
-
code: ErrorCodes
|
|
14588
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14592
14589
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
14593
14590
|
}
|
|
14594
14591
|
});
|
|
@@ -14604,7 +14601,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14604
14601
|
code
|
|
14605
14602
|
},
|
|
14606
14603
|
error: {
|
|
14607
|
-
code: ErrorCodes
|
|
14604
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
14608
14605
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
14609
14606
|
}
|
|
14610
14607
|
});
|
|
@@ -14683,7 +14680,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14683
14680
|
throw error;
|
|
14684
14681
|
console.error(error);
|
|
14685
14682
|
throw {
|
|
14686
|
-
code: ErrorCodes
|
|
14683
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14687
14684
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14688
14685
|
};
|
|
14689
14686
|
}
|
|
@@ -14853,7 +14850,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14853
14850
|
if (!isNew) {
|
|
14854
14851
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14855
14852
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14856
|
-
throw { code: ErrorCodes
|
|
14853
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14857
14854
|
}
|
|
14858
14855
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14859
14856
|
}
|
|
@@ -14865,7 +14862,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14865
14862
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14866
14863
|
variables: { data: json },
|
|
14867
14864
|
error: {
|
|
14868
|
-
code: ErrorCodes
|
|
14865
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14869
14866
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14870
14867
|
}
|
|
14871
14868
|
});
|
|
@@ -14892,7 +14889,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14892
14889
|
mutation: AccountMutations.saveSettings,
|
|
14893
14890
|
variables: { data: json },
|
|
14894
14891
|
error: {
|
|
14895
|
-
code: ErrorCodes
|
|
14892
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14896
14893
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14897
14894
|
}
|
|
14898
14895
|
});
|
|
@@ -14914,7 +14911,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14914
14911
|
if (counter > 4) {
|
|
14915
14912
|
if (this._debug)
|
|
14916
14913
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14917
|
-
throw { code: ErrorCodes
|
|
14914
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14918
14915
|
}
|
|
14919
14916
|
// Check if valid
|
|
14920
14917
|
if (token) {
|
|
@@ -14924,7 +14921,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14924
14921
|
token
|
|
14925
14922
|
},
|
|
14926
14923
|
error: {
|
|
14927
|
-
code: ErrorCodes
|
|
14924
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
14928
14925
|
message: 'ERROR.UNAUTHORIZED'
|
|
14929
14926
|
},
|
|
14930
14927
|
fetchPolicy: 'no-cache'
|
|
@@ -14940,7 +14937,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14940
14937
|
}
|
|
14941
14938
|
// Generate a new token
|
|
14942
14939
|
const challengeError = {
|
|
14943
|
-
code: ErrorCodes
|
|
14940
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14944
14941
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14945
14942
|
};
|
|
14946
14943
|
const data = yield this.graphql.query({
|
|
@@ -15018,7 +15015,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15018
15015
|
query: AccountSubscriptions.listenChanges,
|
|
15019
15016
|
variables,
|
|
15020
15017
|
error: {
|
|
15021
|
-
code: ErrorCodes
|
|
15018
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
15022
15019
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
|
|
15023
15020
|
}
|
|
15024
15021
|
}).pipe(map(({ data }) => data),
|
|
@@ -15047,7 +15044,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15047
15044
|
return Toasts.show(this.toastController, this.translate, opts);
|
|
15048
15045
|
}
|
|
15049
15046
|
}
|
|
15050
|
-
AccountService.ɵprov =
|
|
15047
|
+
AccountService.ɵprov = ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(ɵɵinject(CryptoService), ɵɵinject(NetworkService), ɵɵinject(GraphqlService), ɵɵinject(LocalSettingsService), ɵɵinject(Storage), ɵɵinject(FileService), ɵɵinject(TranslateService, 8), ɵɵinject(ToastController, 8), ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
15051
15048
|
AccountService.decorators = [
|
|
15052
15049
|
{ type: Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
|
|
15053
15050
|
];
|
|
@@ -15315,7 +15312,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
15315
15312
|
/* ------------------------------------
|
|
15316
15313
|
* GraphQL queries
|
|
15317
15314
|
* ------------------------------------*/
|
|
15318
|
-
const Fragments = {
|
|
15315
|
+
const Fragments$1 = {
|
|
15319
15316
|
config: gql `
|
|
15320
15317
|
fragment ConfigFragment on ConfigurationVO {
|
|
15321
15318
|
id
|
|
@@ -15342,13 +15339,13 @@ const Fragments = {
|
|
|
15342
15339
|
}
|
|
15343
15340
|
`
|
|
15344
15341
|
};
|
|
15345
|
-
const LoadQuery = gql `
|
|
15342
|
+
const LoadQuery$1 = gql `
|
|
15346
15343
|
query Configuration{
|
|
15347
15344
|
data: configuration{
|
|
15348
15345
|
...ConfigFragment
|
|
15349
15346
|
}
|
|
15350
15347
|
}
|
|
15351
|
-
${Fragments.config}
|
|
15348
|
+
${Fragments$1.config}
|
|
15352
15349
|
`;
|
|
15353
15350
|
// Save (create or update) account mutation
|
|
15354
15351
|
const SaveMutation = gql `
|
|
@@ -15357,7 +15354,7 @@ const SaveMutation = gql `
|
|
|
15357
15354
|
...ConfigFragment
|
|
15358
15355
|
}
|
|
15359
15356
|
}
|
|
15360
|
-
${Fragments.config}
|
|
15357
|
+
${Fragments$1.config}
|
|
15361
15358
|
`;
|
|
15362
15359
|
const ClearCache = gql `
|
|
15363
15360
|
query ClearCache($name: String) {
|
|
@@ -15408,12 +15405,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15408
15405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15409
15406
|
const now = Date.now();
|
|
15410
15407
|
console.debug('[config] Loading Pod configuration...');
|
|
15411
|
-
const query = opts && opts.query || LoadQuery;
|
|
15408
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
15412
15409
|
const variables = opts && opts.variables || undefined;
|
|
15413
15410
|
const res = yield this.graphql.query({
|
|
15414
15411
|
query,
|
|
15415
15412
|
variables,
|
|
15416
|
-
error: { code: ErrorCodes
|
|
15413
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15417
15414
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
15418
15415
|
});
|
|
15419
15416
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -15446,7 +15443,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15446
15443
|
data: json
|
|
15447
15444
|
},
|
|
15448
15445
|
error: {
|
|
15449
|
-
code: ErrorCodes
|
|
15446
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
15450
15447
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
15451
15448
|
}
|
|
15452
15449
|
});
|
|
@@ -15472,7 +15469,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15472
15469
|
const res = yield this.graphql.query({
|
|
15473
15470
|
query: CacheStatistics,
|
|
15474
15471
|
variables: null,
|
|
15475
|
-
error: { code: ErrorCodes
|
|
15472
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15476
15473
|
fetchPolicy: 'network-only'
|
|
15477
15474
|
});
|
|
15478
15475
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -15488,7 +15485,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15488
15485
|
const res = yield this.graphql.query({
|
|
15489
15486
|
query: ClearCache,
|
|
15490
15487
|
variables,
|
|
15491
|
-
error: { code: ErrorCodes
|
|
15488
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15492
15489
|
fetchPolicy: 'no-cache'
|
|
15493
15490
|
});
|
|
15494
15491
|
const data = res && res.clearCache || undefined;
|
|
@@ -15647,7 +15644,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15647
15644
|
});
|
|
15648
15645
|
}
|
|
15649
15646
|
}
|
|
15650
|
-
ConfigService.ɵprov =
|
|
15647
|
+
ConfigService.ɵprov = ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(ɵɵinject(Platform), ɵɵinject(GraphqlService), ɵɵinject(Storage), ɵɵinject(NetworkService), ɵɵinject(FileService), ɵɵinject(ToastController), ɵɵinject(TranslateService), ɵɵinject(AccountService), ɵɵinject(ENVIRONMENT), ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
15651
15648
|
ConfigService.decorators = [
|
|
15652
15649
|
{ type: Injectable, args: [{
|
|
15653
15650
|
providedIn: 'root',
|
|
@@ -15667,7 +15664,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15667
15664
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15668
15665
|
];
|
|
15669
15666
|
|
|
15670
|
-
const moment$
|
|
15667
|
+
const moment$4 = momentImported;
|
|
15671
15668
|
const AndroidOsEnvironment = Object.freeze({
|
|
15672
15669
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
15673
15670
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
@@ -15902,16 +15899,16 @@ class PlatformService extends StartableService {
|
|
|
15902
15899
|
}
|
|
15903
15900
|
// config moment lib
|
|
15904
15901
|
try {
|
|
15905
|
-
moment$
|
|
15902
|
+
moment$4.locale(event.lang);
|
|
15906
15903
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15907
15904
|
}
|
|
15908
15905
|
// If error, fallback to en
|
|
15909
15906
|
catch (err) {
|
|
15910
|
-
moment$
|
|
15907
|
+
moment$4.locale('en');
|
|
15911
15908
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15912
15909
|
}
|
|
15913
15910
|
// Config date adapter
|
|
15914
|
-
this.dateAdapter.setLocale(moment$
|
|
15911
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
15915
15912
|
}
|
|
15916
15913
|
});
|
|
15917
15914
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15950,8 +15947,7 @@ class PlatformService extends StartableService {
|
|
|
15950
15947
|
(_a = this.checkAppVersionTimer) === null || _a === void 0 ? void 0 : _a.unsubscribe(); // Stop timer if exists
|
|
15951
15948
|
return; // Skip
|
|
15952
15949
|
}
|
|
15953
|
-
const
|
|
15954
|
-
const remoteVersion = yield this.networkService.getAppVersion(peer);
|
|
15950
|
+
const remoteVersion = yield this.networkService.getAppVersion();
|
|
15955
15951
|
if (isNilOrBlank(remoteVersion)) {
|
|
15956
15952
|
if (production && !silent)
|
|
15957
15953
|
console.error('[platform] Cannot load remote app version. Skipping version check');
|
|
@@ -15960,7 +15956,7 @@ class PlatformService extends StartableService {
|
|
|
15960
15956
|
}
|
|
15961
15957
|
if (VersionUtils.isCompatible(remoteVersion, actualVersion)) {
|
|
15962
15958
|
if (!silent)
|
|
15963
|
-
console.info(
|
|
15959
|
+
console.info(`[platform] Checking remote app version [OK] {remote: '${remoteVersion}', actual: '${actualVersion}'}`);
|
|
15964
15960
|
return;
|
|
15965
15961
|
}
|
|
15966
15962
|
// If newer version exists
|
|
@@ -16112,7 +16108,7 @@ class PlatformService extends StartableService {
|
|
|
16112
16108
|
});
|
|
16113
16109
|
}
|
|
16114
16110
|
}
|
|
16115
|
-
PlatformService.ɵprov =
|
|
16111
|
+
PlatformService.ɵprov = ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(ɵɵinject(Platform), ɵɵinject(Platform$1), ɵɵinject(ToastController), ɵɵinject(TranslateService), ɵɵinject(MomentDateAdapter), ɵɵinject(EntitiesStorage), ɵɵinject(LocalSettingsService), ɵɵinject(NetworkService), ɵɵinject(AccountService), ɵɵinject(ConfigService), ɵɵinject(CacheService), ɵɵinject(Storage), ɵɵinject(AudioProvider), ɵɵinject(ENVIRONMENT), ɵɵinject(StatusBar, 8), ɵɵinject(Keyboard$1, 8), ɵɵinject(SplashScreen, 8), ɵɵinject(InAppBrowser, 8), ɵɵinject(Downloader, 8)); }, token: PlatformService, providedIn: "root" });
|
|
16116
16112
|
PlatformService.decorators = [
|
|
16117
16113
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16118
16114
|
];
|
|
@@ -16127,15 +16123,15 @@ PlatformService.ctorParameters = () => [
|
|
|
16127
16123
|
{ type: NetworkService },
|
|
16128
16124
|
{ type: AccountService },
|
|
16129
16125
|
{ type: ConfigService },
|
|
16130
|
-
{ type: CacheService },
|
|
16126
|
+
{ type: CacheService$1 },
|
|
16131
16127
|
{ type: Storage },
|
|
16132
16128
|
{ type: AudioProvider },
|
|
16133
16129
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
16134
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
16130
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
16135
16131
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
16136
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
16137
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
16138
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
16132
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
16133
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] },
|
|
16134
|
+
{ type: Downloader$1, decorators: [{ type: Optional }] }
|
|
16139
16135
|
];
|
|
16140
16136
|
|
|
16141
16137
|
class AppHelpModal {
|
|
@@ -16199,7 +16195,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
16199
16195
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
16200
16196
|
}
|
|
16201
16197
|
}
|
|
16202
|
-
MatStepperI18n.ɵprov =
|
|
16198
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
16203
16199
|
MatStepperI18n.decorators = [
|
|
16204
16200
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16205
16201
|
];
|
|
@@ -18035,7 +18031,7 @@ function state2side(state) {
|
|
|
18035
18031
|
return 1;
|
|
18036
18032
|
}
|
|
18037
18033
|
}
|
|
18038
|
-
const ɵ0$
|
|
18034
|
+
const ɵ0$b = (defaultStateSize) => [
|
|
18039
18035
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
18040
18036
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
18041
18037
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -18043,7 +18039,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
18043
18039
|
const SCALE_OPTIONS_DEFAULT = {
|
|
18044
18040
|
startColor: rgbArrayMap.red,
|
|
18045
18041
|
startStates: [0, 2, 3],
|
|
18046
|
-
startStepsFn: ɵ0$
|
|
18042
|
+
startStepsFn: ɵ0$b
|
|
18047
18043
|
};
|
|
18048
18044
|
/**
|
|
18049
18045
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -18840,7 +18836,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18840
18836
|
});
|
|
18841
18837
|
}
|
|
18842
18838
|
}
|
|
18843
|
-
UserSettingsValidatorService.ɵprov =
|
|
18839
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18844
18840
|
UserSettingsValidatorService.decorators = [
|
|
18845
18841
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18846
18842
|
];
|
|
@@ -18884,7 +18880,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18884
18880
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18885
18881
|
}
|
|
18886
18882
|
}
|
|
18887
|
-
AccountValidatorService.ɵprov =
|
|
18883
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18888
18884
|
AccountValidatorService.decorators = [
|
|
18889
18885
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18890
18886
|
];
|
|
@@ -19449,7 +19445,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
19449
19445
|
});
|
|
19450
19446
|
}
|
|
19451
19447
|
}
|
|
19452
|
-
LocalSettingsValidatorService.ɵprov =
|
|
19448
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
19453
19449
|
LocalSettingsValidatorService.decorators = [
|
|
19454
19450
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19455
19451
|
];
|
|
@@ -20068,7 +20064,7 @@ class IsOnFieldModePipe {
|
|
|
20068
20064
|
return value === 'FIELD';
|
|
20069
20065
|
}
|
|
20070
20066
|
}
|
|
20071
|
-
IsOnFieldModePipe.ɵprov =
|
|
20067
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
20072
20068
|
IsOnFieldModePipe.decorators = [
|
|
20073
20069
|
{ type: Pipe, args: [{
|
|
20074
20070
|
name: 'isOnField'
|
|
@@ -20080,7 +20076,7 @@ class IsNotOnFieldModePipe {
|
|
|
20080
20076
|
return value !== 'FIELD';
|
|
20081
20077
|
}
|
|
20082
20078
|
}
|
|
20083
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
20079
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
20084
20080
|
IsNotOnFieldModePipe.decorators = [
|
|
20085
20081
|
{ type: Pipe, args: [{
|
|
20086
20082
|
name: 'isNotOnField'
|
|
@@ -20095,7 +20091,7 @@ class PersonToStringPipe {
|
|
|
20095
20091
|
return PersonUtils.personToString(value);
|
|
20096
20092
|
}
|
|
20097
20093
|
}
|
|
20098
|
-
PersonToStringPipe.ɵprov =
|
|
20094
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
20099
20095
|
PersonToStringPipe.decorators = [
|
|
20100
20096
|
{ type: Pipe, args: [{
|
|
20101
20097
|
name: 'personToString'
|
|
@@ -20480,7 +20476,7 @@ class IsLoginAccountPipe {
|
|
|
20480
20476
|
return value && value.pubkey && true;
|
|
20481
20477
|
}
|
|
20482
20478
|
}
|
|
20483
|
-
IsLoginAccountPipe.ɵprov =
|
|
20479
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
20484
20480
|
IsLoginAccountPipe.decorators = [
|
|
20485
20481
|
{ type: Pipe, args: [{
|
|
20486
20482
|
name: 'isLogin'
|
|
@@ -20492,7 +20488,7 @@ class AccountToStringPipe {
|
|
|
20492
20488
|
return accountToString(value);
|
|
20493
20489
|
}
|
|
20494
20490
|
}
|
|
20495
|
-
AccountToStringPipe.ɵprov =
|
|
20491
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
20496
20492
|
AccountToStringPipe.decorators = [
|
|
20497
20493
|
{ type: Pipe, args: [{
|
|
20498
20494
|
name: 'accountToString'
|
|
@@ -20507,7 +20503,7 @@ class DepartmentToStringPipe {
|
|
|
20507
20503
|
return departmentToString(value);
|
|
20508
20504
|
}
|
|
20509
20505
|
}
|
|
20510
|
-
DepartmentToStringPipe.ɵprov =
|
|
20506
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
20511
20507
|
DepartmentToStringPipe.decorators = [
|
|
20512
20508
|
{ type: Pipe, args: [{
|
|
20513
20509
|
name: 'departmentToString'
|
|
@@ -20603,7 +20599,7 @@ class MenuService {
|
|
|
20603
20599
|
this._visibleSubject.next(value);
|
|
20604
20600
|
}
|
|
20605
20601
|
}
|
|
20606
|
-
MenuService.ɵprov =
|
|
20602
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
20607
20603
|
MenuService.decorators = [
|
|
20608
20604
|
{ type: Injectable, args: [{
|
|
20609
20605
|
providedIn: 'root'
|
|
@@ -21059,7 +21055,7 @@ class AuthGuardService {
|
|
|
21059
21055
|
}));
|
|
21060
21056
|
}
|
|
21061
21057
|
}
|
|
21062
|
-
AuthGuardService.ɵprov =
|
|
21058
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
21063
21059
|
AuthGuardService.decorators = [
|
|
21064
21060
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
21065
21061
|
];
|
|
@@ -21101,7 +21097,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21101
21097
|
query,
|
|
21102
21098
|
variables: { id },
|
|
21103
21099
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21104
|
-
error: { code: ErrorCodes
|
|
21100
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21105
21101
|
})
|
|
21106
21102
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
21107
21103
|
? (data && this.fromObject(data))
|
|
@@ -21116,7 +21112,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21116
21112
|
query,
|
|
21117
21113
|
variables: { id },
|
|
21118
21114
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21119
|
-
error: { code: ErrorCodes
|
|
21115
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21120
21116
|
});
|
|
21121
21117
|
// Convert to entity
|
|
21122
21118
|
return (!opts || opts.toEntity !== false)
|
|
@@ -21147,7 +21143,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21147
21143
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
21148
21144
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
21149
21145
|
variables,
|
|
21150
|
-
error: { code: ErrorCodes
|
|
21146
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
21151
21147
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
21152
21148
|
})
|
|
21153
21149
|
.pipe(map(({ data, total }) => {
|
|
@@ -21183,7 +21179,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21183
21179
|
const { data, total } = yield this.graphql.query({
|
|
21184
21180
|
query,
|
|
21185
21181
|
variables,
|
|
21186
|
-
error: { code: ErrorCodes
|
|
21182
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
21187
21183
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21188
21184
|
});
|
|
21189
21185
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -21222,7 +21218,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21222
21218
|
variables: {
|
|
21223
21219
|
filter: filter && filter.asPodObject()
|
|
21224
21220
|
},
|
|
21225
|
-
error: { code: ErrorCodes
|
|
21221
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
21226
21222
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21227
21223
|
});
|
|
21228
21224
|
return res.total;
|
|
@@ -21258,7 +21254,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21258
21254
|
variables: {
|
|
21259
21255
|
data: json
|
|
21260
21256
|
},
|
|
21261
|
-
error: { code: ErrorCodes
|
|
21257
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21262
21258
|
update: (proxy, { data }) => {
|
|
21263
21259
|
const savedEntities = data && data.data;
|
|
21264
21260
|
if (savedEntities) {
|
|
@@ -21314,7 +21310,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21314
21310
|
variables: {
|
|
21315
21311
|
data: json
|
|
21316
21312
|
},
|
|
21317
|
-
error: { code: ErrorCodes
|
|
21313
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21318
21314
|
update: (cache, { data }) => {
|
|
21319
21315
|
// Update entity
|
|
21320
21316
|
const savedEntity = data && data.data;
|
|
@@ -21362,7 +21358,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21362
21358
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21363
21359
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21364
21360
|
variables: { ids },
|
|
21365
|
-
error: { code: ErrorCodes
|
|
21361
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21366
21362
|
update: (cache, res) => {
|
|
21367
21363
|
// Remove from cache
|
|
21368
21364
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21403,7 +21399,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21403
21399
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21404
21400
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21405
21401
|
variables: { id },
|
|
21406
|
-
error: { code: ErrorCodes
|
|
21402
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21407
21403
|
update: (proxy, res) => {
|
|
21408
21404
|
// Remove from cache
|
|
21409
21405
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21439,7 +21435,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21439
21435
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
|
|
21440
21436
|
variables,
|
|
21441
21437
|
error: {
|
|
21442
|
-
code: ErrorCodes
|
|
21438
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
21443
21439
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
21444
21440
|
}
|
|
21445
21441
|
})
|
|
@@ -21625,7 +21621,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
21625
21621
|
if (this._debug)
|
|
21626
21622
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
21627
21623
|
// Stop with an error
|
|
21628
|
-
throw { code: ErrorCodes
|
|
21624
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21629
21625
|
}
|
|
21630
21626
|
this._editingRowCount = 0;
|
|
21631
21627
|
let data;
|
|
@@ -22496,14 +22492,14 @@ class AppTable {
|
|
|
22496
22492
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22497
22493
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
22498
22494
|
if (this.readOnly) {
|
|
22499
|
-
throw { code: ErrorCodes
|
|
22495
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22500
22496
|
}
|
|
22501
22497
|
this.resetError();
|
|
22502
22498
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
22503
22499
|
this.previouslyEditedRowId = opts.keepEditing ? ((((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined) || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.id)) : undefined;
|
|
22504
22500
|
const previouslyEditedData = opts.keepEditing ? (isNotNil(this.previouslyEditedRowId) && ((_c = this.editedRow) === null || _c === void 0 ? void 0 : _c.currentData) || ((_d = this.singleSelectedRow) === null || _d === void 0 ? void 0 : _d.currentData)) : undefined;
|
|
22505
22501
|
if (!this.confirmEditCreate()) {
|
|
22506
|
-
throw { code: ErrorCodes
|
|
22502
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
22507
22503
|
}
|
|
22508
22504
|
// Mark as saving
|
|
22509
22505
|
this.markAsSaving();
|
|
@@ -22622,7 +22618,7 @@ class AppTable {
|
|
|
22622
22618
|
var _a;
|
|
22623
22619
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22624
22620
|
if (this.readOnly) {
|
|
22625
|
-
throw { code: ErrorCodes
|
|
22621
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22626
22622
|
}
|
|
22627
22623
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
22628
22624
|
return 0; // SKip
|
|
@@ -24202,7 +24198,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
24202
24198
|
try {
|
|
24203
24199
|
const data = yield this.dataService.load(id, opts);
|
|
24204
24200
|
if (!data)
|
|
24205
|
-
throw { code: ErrorCodes
|
|
24201
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
24206
24202
|
this._usageMode = this.computeUsageMode(data);
|
|
24207
24203
|
yield this.onEntityLoaded(data, opts);
|
|
24208
24204
|
yield this.updateView(data, opts);
|
|
@@ -24756,9 +24752,10 @@ AppInMemoryTable.propDecorators = {
|
|
|
24756
24752
|
canDelete: [{ type: Input }]
|
|
24757
24753
|
};
|
|
24758
24754
|
|
|
24759
|
-
const
|
|
24755
|
+
const SocialErrorCodes = {
|
|
24760
24756
|
LOAD_USER_EVENTS_ERROR: 50000,
|
|
24761
|
-
SAVE_USER_EVENT_ERROR: 50001
|
|
24757
|
+
SAVE_USER_EVENT_ERROR: 50001,
|
|
24758
|
+
SEND_MESSAGE_ERROR: 50003
|
|
24762
24759
|
};
|
|
24763
24760
|
|
|
24764
24761
|
var UserEvent_1;
|
|
@@ -24802,7 +24799,7 @@ UserEvent = UserEvent_1 = __decorate([
|
|
|
24802
24799
|
EntityClass({ typename: 'UserEventVO' })
|
|
24803
24800
|
], UserEvent);
|
|
24804
24801
|
|
|
24805
|
-
const
|
|
24802
|
+
const UserEventFragments = {
|
|
24806
24803
|
userEvent: gql `fragment UserEventFragment on UserEventVO {
|
|
24807
24804
|
id
|
|
24808
24805
|
issuer
|
|
@@ -24853,7 +24850,7 @@ let UserEventFilter = class UserEventFilter extends EntityFilter {
|
|
|
24853
24850
|
}
|
|
24854
24851
|
};
|
|
24855
24852
|
UserEventFilter = __decorate([
|
|
24856
|
-
EntityClass({ typename: '
|
|
24853
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
24857
24854
|
], UserEventFilter);
|
|
24858
24855
|
const SaveQuery = gql `
|
|
24859
24856
|
mutation SaveUserEvent($data: UserEventVOInput){
|
|
@@ -24861,7 +24858,7 @@ const SaveQuery = gql `
|
|
|
24861
24858
|
...UserEventFragment
|
|
24862
24859
|
}
|
|
24863
24860
|
}
|
|
24864
|
-
${
|
|
24861
|
+
${UserEventFragments.userEvent}
|
|
24865
24862
|
`;
|
|
24866
24863
|
const LoadAllQuery = gql `
|
|
24867
24864
|
query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){
|
|
@@ -24869,7 +24866,7 @@ const LoadAllQuery = gql `
|
|
|
24869
24866
|
...LightUserEventFragment
|
|
24870
24867
|
}
|
|
24871
24868
|
}
|
|
24872
|
-
${
|
|
24869
|
+
${UserEventFragments.lightUserEvent}
|
|
24873
24870
|
`;
|
|
24874
24871
|
const DeleteByIdsMutation = gql `
|
|
24875
24872
|
mutation DeleteUserEvents($ids:[Int]){
|
|
@@ -24882,7 +24879,7 @@ const LoadAllWithContentQuery = gql `
|
|
|
24882
24879
|
...UserEventFragment
|
|
24883
24880
|
}
|
|
24884
24881
|
}
|
|
24885
|
-
${
|
|
24882
|
+
${UserEventFragments.userEvent}
|
|
24886
24883
|
`;
|
|
24887
24884
|
class UserEventService extends BaseGraphqlService {
|
|
24888
24885
|
constructor(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -24895,7 +24892,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24895
24892
|
this.environment = environment;
|
|
24896
24893
|
this._userEventActions = [];
|
|
24897
24894
|
// For DEV only
|
|
24898
|
-
this._debug = !environment.production;
|
|
24895
|
+
this._debug = environment && !environment.production;
|
|
24899
24896
|
}
|
|
24900
24897
|
/**
|
|
24901
24898
|
*
|
|
@@ -24932,7 +24929,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24932
24929
|
filter: filter && filter.asPodObject()
|
|
24933
24930
|
},
|
|
24934
24931
|
arrayFieldName: 'data',
|
|
24935
|
-
error: { code:
|
|
24932
|
+
error: { code: SocialErrorCodes.LOAD_USER_EVENTS_ERROR, message: 'SOCIAL.ERROR.LOAD_USER_EVENTS_ERROR' },
|
|
24936
24933
|
fetchPolicy: options && options.fetchPolicy || undefined
|
|
24937
24934
|
})
|
|
24938
24935
|
.pipe(map(res => {
|
|
@@ -24970,7 +24967,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24970
24967
|
variables: {
|
|
24971
24968
|
data: json
|
|
24972
24969
|
},
|
|
24973
|
-
error: { code:
|
|
24970
|
+
error: { code: SocialErrorCodes.SAVE_USER_EVENT_ERROR, message: 'SOCIAL.ERROR.SAVE_USER_EVENT_ERROR' },
|
|
24974
24971
|
update: (proxy, { data }) => {
|
|
24975
24972
|
// Update entity
|
|
24976
24973
|
const savedEntity = data && data.data;
|
|
@@ -25154,7 +25151,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
25154
25151
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
25155
25152
|
}
|
|
25156
25153
|
}
|
|
25157
|
-
UserEventService.ɵprov =
|
|
25154
|
+
UserEventService.ɵprov = ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(ɵɵinject(GraphqlService), ɵɵinject(AccountService), ɵɵinject(NetworkService), ɵɵinject(TranslateService), ɵɵinject(ToastController), ɵɵinject(ENVIRONMENT, 8)); }, token: UserEventService, providedIn: "root" });
|
|
25158
25155
|
UserEventService.decorators = [
|
|
25159
25156
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25160
25157
|
];
|
|
@@ -25164,7 +25161,7 @@ UserEventService.ctorParameters = () => [
|
|
|
25164
25161
|
{ type: NetworkService },
|
|
25165
25162
|
{ type: TranslateService },
|
|
25166
25163
|
{ type: ToastController },
|
|
25167
|
-
{ type:
|
|
25164
|
+
{ type: Environment, decorators: [{ type: Optional }, { type: Inject, args: [ENVIRONMENT,] }] }
|
|
25168
25165
|
];
|
|
25169
25166
|
|
|
25170
25167
|
const ICONS_MAP = {
|
|
@@ -25291,7 +25288,7 @@ class UserEventsTable extends AppTable {
|
|
|
25291
25288
|
UserEventsTable.decorators = [
|
|
25292
25289
|
{ type: Component, args: [{
|
|
25293
25290
|
selector: 'app-user-events-table',
|
|
25294
|
-
template: "\n<!-- Type = options menu -->\n<mat-menu #optionsMenu=\"matMenu\" xPosition=\"after\">\n\n <!-- display columns -->\n <button mat-menu-item\n (click)=\"openSelectColumnsModal($event)\">\n <mat-icon>view_column</mat-icon>\n <ion-label translate>COMMON.DISPLAYED_COLUMNS_DOTS</ion-label>\n </button>\n\n</mat-menu>\n\n<!-- top header -->\n<mat-toolbar>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n\n <button mat-icon-button [title]=\"'COMMON.BTN_REFRESH'|translate\" (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n </ng-container>\n\n <!-- if row selection -->\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button class=\"hidden-xs hidden-sm\" *ngIf=\"canDelete\"\n [title]=\"'COMMON.BTN_DELETE'|translate\" (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" hidden-xs hidden-sm hidden-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_OPTIONS'|translate\"\n [matMenuTriggerFor]=\"optionsMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n</mat-toolbar>\n\n\n<mat-table [dataSource]=\"dataSource\" matSort\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <!-- select -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <!-- id -->\n <ng-container matColumnDef=\"id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header [class.cdk-visually-hidden]=\"!isAdmin\">\n <app-loading-spinner [loading]=\"loadingSubject|async\"><ion-label>#</ion-label></app-loading-spinner>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!isAdmin\">{{ row.currentData.id | mathAbs }}</mat-cell>\n </ng-container>\n\n <!-- creationDate -->\n <ng-container matColumnDef=\"creationDate\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.CREATION_DATE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ion-text>\n {{row.currentData.creationDate | dateFromNow }}<br/>\n <ion-text color=\"medium\"><small>{{row.currentData.creationDate | dateFormat: {time: true} }}</small></ion-text>\n </ion-text>\n </mat-cell>\n </ng-container>\n\n <!-- icon -->\n <ng-container matColumnDef=\"icon\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getIcon(row.currentData); let details\">\n <ion-icon slot=\"start\" *ngIf=\"details.icon\" [name]=\"details.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"details.matIcon\">{{details.matIcon}}</mat-icon>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- event type -->\n <ng-container matColumnDef=\"eventType\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.EVENT_TYPE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <span>{{'SOCIAL.
|
|
25291
|
+
template: "\n<!-- Type = options menu -->\n<mat-menu #optionsMenu=\"matMenu\" xPosition=\"after\">\n\n <!-- display columns -->\n <button mat-menu-item\n (click)=\"openSelectColumnsModal($event)\">\n <mat-icon>view_column</mat-icon>\n <ion-label translate>COMMON.DISPLAYED_COLUMNS_DOTS</ion-label>\n </button>\n\n</mat-menu>\n\n<!-- top header -->\n<mat-toolbar>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n\n <button mat-icon-button [title]=\"'COMMON.BTN_REFRESH'|translate\" (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n </ng-container>\n\n <!-- if row selection -->\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button class=\"hidden-xs hidden-sm\" *ngIf=\"canDelete\"\n [title]=\"'COMMON.BTN_DELETE'|translate\" (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" hidden-xs hidden-sm hidden-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"toolbar-spacer\"></div>\n\n <button mat-icon-button\n [title]=\"'COMMON.BTN_OPTIONS'|translate\"\n [matMenuTriggerFor]=\"optionsMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n</mat-toolbar>\n\n\n<mat-table [dataSource]=\"dataSource\" matSort\n [matSortActive]=\"defaultSortBy\"\n [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <!-- select -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!canEdit\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <!-- id -->\n <ng-container matColumnDef=\"id\">\n <mat-header-cell *matHeaderCellDef mat-sort-header [class.cdk-visually-hidden]=\"!isAdmin\">\n <app-loading-spinner [loading]=\"loadingSubject|async\"><ion-label>#</ion-label></app-loading-spinner>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!isAdmin\">{{ row.currentData.id | mathAbs }}</mat-cell>\n </ng-container>\n\n <!-- creationDate -->\n <ng-container matColumnDef=\"creationDate\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.CREATION_DATE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ion-text>\n {{row.currentData.creationDate | dateFromNow }}<br/>\n <ion-text color=\"medium\"><small>{{row.currentData.creationDate | dateFormat: {time: true} }}</small></ion-text>\n </ion-text>\n </mat-cell>\n </ng-container>\n\n <!-- icon -->\n <ng-container matColumnDef=\"icon\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getIcon(row.currentData); let details\">\n <ion-icon slot=\"start\" *ngIf=\"details.icon\" [name]=\"details.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"details.matIcon\">{{details.matIcon}}</mat-icon>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- event type -->\n <ng-container matColumnDef=\"eventType\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label translate>SOCIAL.USER_EVENT.EVENT_TYPE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <span>{{'SOCIAL.USER_EVENT.TYPE_ENUM.' + row.currentData.eventType | translate}}</span>\n </mat-cell>\n </ng-container>\n\n <!-- message -->\n <ng-container matColumnDef=\"message\">\n <mat-header-cell *matHeaderCellDef>\n <ion-label translate>SOCIAL.USER_EVENT.MESSAGE</ion-label>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row;\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <ion-text [innerHTML]=\"details.title|translate\">\n </ion-text>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <!-- Actions buttons column -->\n <ng-container matColumnDef=\"actions\">\n <mat-header-cell *matHeaderCellDef>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let row\">\n <ng-container *ngIf=\"getDetail(row.currentData); let details\">\n <button mat-icon-button color=\"light\"\n *ngFor=\"let action of details.actions\"\n [title]=\"action.title |translate\"\n [color]=\"action.color\"\n (click)=\"doAction(action, row)\">\n <ion-icon slot=\"start\" *ngIf=\"action.icon\" [name]=\"action.icon\"></ion-icon>\n <mat-icon slot=\"start\" *ngIf=\"action.matIcon\">{{action.matIcon}}</mat-icon>\n </button>\n </ng-container>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n class=\"mat-row-disabled\"\n (click)=\"clickRow($event, row)\"></mat-row>\n\n</mat-table>\n\n<ion-row class=\"ion-no-padding\">\n <ion-col></ion-col>\n <ion-col class=\"ion-no-padding\" size=\"auto\">\n <mat-paginator [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\" [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n </ion-col>\n</ion-row>\n",
|
|
25295
25292
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25296
25293
|
styles: [".mat-header-row .mat-column-icon,.mat-row .mat-column-icon{max-width:40px;padding-left:0}.mat-header-row .mat-column-icon ion-icon,.mat-header-row .mat-column-icon mat-icon,.mat-row .mat-column-icon ion-icon,.mat-row .mat-column-icon mat-icon{font-size:1.2em;height:1.2em;width:1.2em}.mat-header-row .mat-column-creationDate,.mat-row .mat-column-creationDate{min-width:100px;max-width:120px}"]
|
|
25297
25294
|
},] }
|
|
@@ -25311,32 +25308,309 @@ UserEventsTable.propDecorators = {
|
|
|
25311
25308
|
defaultSortDirection: [{ type: Input }]
|
|
25312
25309
|
};
|
|
25313
25310
|
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25311
|
+
const MessageTypes = {
|
|
25312
|
+
INBOX_MESSAGE: 'INBOX_MESSAGE',
|
|
25313
|
+
EMAIL: 'EMAIL',
|
|
25314
|
+
FEED: 'FEED',
|
|
25315
|
+
};
|
|
25316
|
+
const MessageTypeList = Object.freeze([
|
|
25317
|
+
{
|
|
25318
|
+
id: MessageTypes.INBOX_MESSAGE,
|
|
25319
|
+
icon: 'notifications',
|
|
25320
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.INBOX_MESSAGE'
|
|
25321
|
+
},
|
|
25322
|
+
{
|
|
25323
|
+
id: MessageTypes.EMAIL,
|
|
25324
|
+
icon: 'mail',
|
|
25325
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.EMAIL'
|
|
25326
|
+
},
|
|
25327
|
+
{
|
|
25328
|
+
id: MessageTypes.FEED,
|
|
25329
|
+
icon: 'paper',
|
|
25330
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.FEED'
|
|
25331
|
+
}
|
|
25332
|
+
]);
|
|
25333
|
+
// @dynamic
|
|
25334
|
+
let Message = class Message extends Entity {
|
|
25335
|
+
constructor() {
|
|
25336
|
+
super();
|
|
25337
|
+
}
|
|
25338
|
+
fromObject(source, opts) {
|
|
25339
|
+
super.fromObject(source, opts);
|
|
25340
|
+
this.type = source.type;
|
|
25341
|
+
this.issuer = source.issuer && Person.fromObject(source.issuer);
|
|
25342
|
+
this.recipients = source.recipients && source.recipients.map(Person.fromObject);
|
|
25343
|
+
this.subject = source.subject;
|
|
25344
|
+
this.body = source.body;
|
|
25345
|
+
}
|
|
25346
|
+
asObject(opts) {
|
|
25347
|
+
const target = super.asObject(opts);
|
|
25348
|
+
target.recipients = this.recipients && this.recipients.map(p => p.asObject(opts));
|
|
25349
|
+
return target;
|
|
25350
|
+
}
|
|
25351
|
+
};
|
|
25352
|
+
Message = __decorate([
|
|
25353
|
+
EntityClass({ typename: 'MessageVO' })
|
|
25354
|
+
], Message);
|
|
25355
|
+
// @dynamic
|
|
25356
|
+
let MessageFilter = class MessageFilter extends EntityFilter {
|
|
25357
|
+
fromObject(source, opts) {
|
|
25358
|
+
super.fromObject(source, opts);
|
|
25359
|
+
}
|
|
25360
|
+
buildFilter() {
|
|
25361
|
+
const filterFns = super.buildFilter();
|
|
25362
|
+
return filterFns;
|
|
25363
|
+
}
|
|
25364
|
+
};
|
|
25365
|
+
MessageFilter = __decorate([
|
|
25366
|
+
EntityClass({ typename: 'MessageFilterVO' })
|
|
25367
|
+
], MessageFilter);
|
|
25368
|
+
|
|
25369
|
+
class MessageModal {
|
|
25370
|
+
constructor(settings, viewCtrl, accountService, cd) {
|
|
25371
|
+
this.settings = settings;
|
|
25372
|
+
this.viewCtrl = viewCtrl;
|
|
25373
|
+
this.accountService = accountService;
|
|
25374
|
+
this.cd = cd;
|
|
25375
|
+
this.mobile = this.settings.mobile;
|
|
25376
|
+
}
|
|
25377
|
+
ngOnInit() {
|
|
25378
|
+
this.canSelectType = toBoolean(this.canSelectType, this.accountService.isAdmin());
|
|
25379
|
+
}
|
|
25380
|
+
ngAfterViewInit() {
|
|
25381
|
+
this.form.markAsReady({ emitEvent: false });
|
|
25382
|
+
if (this.data) {
|
|
25383
|
+
this.data.type = this.data.type || MessageTypes.INBOX_MESSAGE;
|
|
25384
|
+
this.form.setValue(this.data);
|
|
25385
|
+
}
|
|
25386
|
+
this.form.markAsLoaded();
|
|
25387
|
+
this.form.enable();
|
|
25388
|
+
}
|
|
25389
|
+
cancel(event) {
|
|
25390
|
+
this.viewCtrl.dismiss();
|
|
25391
|
+
}
|
|
25392
|
+
doSubmit(event) {
|
|
25393
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25394
|
+
if (this.form.disabled)
|
|
25395
|
+
return;
|
|
25396
|
+
if (!this.form.valid) {
|
|
25397
|
+
yield AppFormUtils.waitWhilePending(this.form);
|
|
25398
|
+
if (this.form.invalid) {
|
|
25399
|
+
AppFormUtils.logFormErrors(this.form.form, '[message-modal] ');
|
|
25400
|
+
this.form.markAllAsTouched();
|
|
25401
|
+
return;
|
|
25402
|
+
}
|
|
25403
|
+
}
|
|
25404
|
+
this.markAsLoading();
|
|
25405
|
+
try {
|
|
25406
|
+
const data = this.form.value;
|
|
25407
|
+
// Disable the form
|
|
25408
|
+
this.form.disable();
|
|
25409
|
+
const entity = Message.fromObject(data);
|
|
25410
|
+
return this.viewCtrl.dismiss(entity);
|
|
25411
|
+
}
|
|
25412
|
+
catch (err) {
|
|
25413
|
+
this.form.error = err && err.message || err;
|
|
25414
|
+
this.markAsLoaded();
|
|
25415
|
+
// Enable the form
|
|
25416
|
+
this.form.enable();
|
|
25417
|
+
// Reset form error on next changes
|
|
25418
|
+
firstNotNilPromise(this.form.form.valueChanges).then(() => {
|
|
25419
|
+
this.form.error = null;
|
|
25420
|
+
this.markForCheck();
|
|
25421
|
+
});
|
|
25422
|
+
return;
|
|
25423
|
+
}
|
|
25424
|
+
});
|
|
25425
|
+
}
|
|
25426
|
+
markForCheck() {
|
|
25427
|
+
this.cd.markForCheck();
|
|
25428
|
+
}
|
|
25429
|
+
markAsLoading(opts) {
|
|
25430
|
+
this.form.markAsLoading(opts);
|
|
25431
|
+
}
|
|
25432
|
+
markAsLoaded(opts) {
|
|
25433
|
+
this.form.markAsLoaded(opts);
|
|
25323
25434
|
}
|
|
25324
25435
|
}
|
|
25436
|
+
MessageModal.decorators = [
|
|
25437
|
+
{ type: Component, args: [{
|
|
25438
|
+
selector: 'app-message-modal',
|
|
25439
|
+
template: "<ion-header>\n <ion-toolbar color=\"secondary\">\n <ion-buttons slot=\"start\">\n <ion-button class=\"back-button\" (click)=\"cancel($event)\" visible-xs visible-sm visible-mobile>\n <ion-icon slot=\"icon-only\" name=\"arrow-back\"></ion-icon>\n </ion-button>\n </ion-buttons>\n\n <ion-title>\n {{'SOCIAL.MESSAGE.NEW.TITLE' | translate}}\n </ion-title>\n\n <ion-buttons slot=\"end\">\n\n <ion-button class=\"back-button\" (click)=\"doSubmit($event)\"\n [disabled]=\"!form.valid\"\n visible-xs visible-sm visible-mobile>\n <ion-icon slot=\"icon-only\" name=\"checkmark\"></ion-icon>\n </ion-button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n\n<ion-content class=\"ion-padding\" >\n\n <ion-item *ngIf=\"form.error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"form.error|translate\"></ion-label>\n </ion-item>\n\n <app-message-form #form (onSubmit)=\"doSubmit($event)\"\n (onCancel)=\"cancel($event)\"\n [canSelectType]=\"canSelectType\"\n [suggestFn]=\"suggestFn\">\n </app-message-form>\n\n</ion-content>\n\n\n<ion-footer hidden-xs hidden-sm hidden-mobile>\n\n <ion-toolbar>\n\n <ion-row class=\"ion-no-padding\" nowrap>\n <ion-col></ion-col>\n\n <!-- buttons -->\n <ion-col size=\"auto\">\n <ion-button fill=\"clear\" color=\"dark\" (click)=\"cancel($event)\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n\n <ion-button [fill]=\"form.invalid ? 'clear' : 'solid'\"\n [disabled]=\"form.loading || form.invalid\"\n (keyup.enter)=\"doSubmit($event)\"\n (click)=\"doSubmit($event)\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_SEND</ion-label>\n </ion-button>\n </ion-col>\n </ion-row>\n\n\n </ion-toolbar>\n</ion-footer>\n",
|
|
25440
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
25441
|
+
},] }
|
|
25442
|
+
];
|
|
25443
|
+
MessageModal.ctorParameters = () => [
|
|
25444
|
+
{ type: LocalSettingsService },
|
|
25445
|
+
{ type: ModalController },
|
|
25446
|
+
{ type: AccountService },
|
|
25447
|
+
{ type: ChangeDetectorRef }
|
|
25448
|
+
];
|
|
25449
|
+
MessageModal.propDecorators = {
|
|
25450
|
+
suggestFn: [{ type: Input }],
|
|
25451
|
+
data: [{ type: Input }],
|
|
25452
|
+
canSelectType: [{ type: Input }],
|
|
25453
|
+
form: [{ type: ViewChild, args: ['form', { static: true },] }]
|
|
25454
|
+
};
|
|
25455
|
+
|
|
25456
|
+
class MessageForm extends AppForm {
|
|
25457
|
+
constructor(injector, formBuilder, cd) {
|
|
25458
|
+
super(injector);
|
|
25459
|
+
this.formBuilder = formBuilder;
|
|
25460
|
+
this.cd = cd;
|
|
25461
|
+
this.subjectMinLength = 5;
|
|
25462
|
+
this.subjectMaxLength = 255;
|
|
25463
|
+
this.bodyMaxLength = 2000;
|
|
25464
|
+
this.bodyAutoHeight = true;
|
|
25465
|
+
this.canSelectType = false;
|
|
25466
|
+
this.types = MessageTypeList;
|
|
25467
|
+
this.mobile = this.settings.mobile;
|
|
25468
|
+
}
|
|
25469
|
+
ngOnInit() {
|
|
25470
|
+
this.setForm(this.formBuilder.group({
|
|
25471
|
+
type: [MessageTypes.INBOX_MESSAGE, Validators.required],
|
|
25472
|
+
recipients: [null, Validators.required],
|
|
25473
|
+
subject: [null, this.subjectMaxLength
|
|
25474
|
+
? Validators.compose([Validators.required, Validators.minLength(this.subjectMinLength), Validators.maxLength(this.subjectMaxLength)])
|
|
25475
|
+
: Validators.required],
|
|
25476
|
+
body: [null, this.bodyMaxLength
|
|
25477
|
+
? Validators.compose([Validators.maxLength(this.bodyMaxLength)])
|
|
25478
|
+
: Validators.required]
|
|
25479
|
+
}));
|
|
25480
|
+
const personAttributes = this.settings.getFieldDisplayAttributes('person', ['lastName', 'firstName', 'department.name']);
|
|
25481
|
+
this.registerAutocompleteField('recipients', {
|
|
25482
|
+
showAllOnFocus: false,
|
|
25483
|
+
suggestFn: this.suggestFn,
|
|
25484
|
+
filter: {
|
|
25485
|
+
statusIds: [StatusIds.TEMPORARY, StatusIds.ENABLE]
|
|
25486
|
+
},
|
|
25487
|
+
attributes: personAttributes,
|
|
25488
|
+
displayWith: PersonUtils.personToString,
|
|
25489
|
+
multiple: true,
|
|
25490
|
+
mobile: this.mobile
|
|
25491
|
+
});
|
|
25492
|
+
}
|
|
25493
|
+
isSamePerson(o1, o2) {
|
|
25494
|
+
return EntityUtils.equals(o1, o2, 'id');
|
|
25495
|
+
}
|
|
25496
|
+
markForCheck() {
|
|
25497
|
+
this.cd.markForCheck();
|
|
25498
|
+
}
|
|
25499
|
+
}
|
|
25500
|
+
MessageForm.decorators = [
|
|
25501
|
+
{ type: Component, args: [{
|
|
25502
|
+
selector: 'app-message-form',
|
|
25503
|
+
template: "\n\n<form [formGroup]=\"form\" class=\"form-container\">\n\n <!-- type -->\n <mat-form-field *ngIf=\"canSelectType\">\n <mat-select formControlName=\"type\" [placeholder]=\"'SOCIAL.MESSAGE.TYPE'|translate\">\n <mat-option *ngFor=\"let item of types\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <!-- Recipients -->\n <mat-chips-field *ngIf=\"(form.controls.type.valueChanges|async) !== 'FEED'\"\n formControlName=\"recipients\"\n [placeholder]=\"'SOCIAL.MESSAGE.RECIPIENTS'|translate\"\n [config]=\"autocompleteFields.recipients\"\n [equals]=\"isSamePerson\">\n </mat-chips-field>\n\n <!-- Subject -->\n <mat-form-field>\n <input matInput type=\"text\"\n [placeholder]=\"'SOCIAL.MESSAGE.SUBJECT'|translate\"\n formControlName=\"subject\"\n autocomplete=\"off\"\n required>\n <mat-error *ngIf=\"form.controls.subject.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"form.controls.subject.hasError('minlength')\">\n {{ 'ERROR.FIELD_MIN_LENGTH_COMPACT'|translate }}\n </mat-error>\n <mat-error *ngIf=\"form.controls.subject.hasError('maxlength')\">\n {{ 'ERROR.FIELD_MAX_LENGTH_COMPACT'|translate }}\n </mat-error>\n <mat-hint *ngIf=\"subjectMaxLength\" align=\"end\">\n {{ 'INFO.TEXT_PROGRESS' | translate: { current: form.controls.subject.value?.length || 0, max: subjectMaxLength } }}\n </mat-hint>\n </mat-form-field>\n\n <!-- Body -->\n <mat-form-field floatLabel=\"never\">\n <textarea matInput type=\"text\"\n [placeholder]=\"'SOCIAL.MESSAGE.BODY_HELP'|translate\"\n formControlName=\"body\"\n [class.fixed-height]=\"!bodyAutoHeight\"\n [cdkTextareaAutosize]=\"bodyAutoHeight\"\n (keydown.control.enter)=\"doSubmit($event)\"\n >\n </textarea>\n <mat-error *ngIf=\"form.controls.body.hasError('maxlength')\">\n {{ 'ERROR.FIELD_MAX_LENGTH' | translate: form.controls.body.errors.maxlength }}\n </mat-error>\n <mat-hint *ngIf=\"bodyMaxLength\" align=\"end\">\n {{ 'INFO.TEXT_PROGRESS' | translate: { current: form.controls.body.value?.length || 0, max: bodyMaxLength } }}\n </mat-hint>\n </mat-form-field>\n\n</form>\n",
|
|
25504
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25505
|
+
styles: ["textarea.fixed-height{height:11.5em}textarea{min-height:11.5em}"]
|
|
25506
|
+
},] }
|
|
25507
|
+
];
|
|
25508
|
+
MessageForm.ctorParameters = () => [
|
|
25509
|
+
{ type: Injector },
|
|
25510
|
+
{ type: FormBuilder },
|
|
25511
|
+
{ type: ChangeDetectorRef }
|
|
25512
|
+
];
|
|
25513
|
+
MessageForm.propDecorators = {
|
|
25514
|
+
suggestFn: [{ type: Input }],
|
|
25515
|
+
subjectMinLength: [{ type: Input }],
|
|
25516
|
+
subjectMaxLength: [{ type: Input }],
|
|
25517
|
+
bodyMaxLength: [{ type: Input }],
|
|
25518
|
+
bodyAutoHeight: [{ type: Input }],
|
|
25519
|
+
canSelectType: [{ type: Input }]
|
|
25520
|
+
};
|
|
25521
|
+
|
|
25522
|
+
class SocialModule {
|
|
25523
|
+
}
|
|
25325
25524
|
SocialModule.decorators = [
|
|
25326
25525
|
{ type: NgModule, args: [{
|
|
25327
25526
|
imports: [
|
|
25328
25527
|
CommonModule,
|
|
25329
|
-
CoreModule
|
|
25528
|
+
CoreModule,
|
|
25529
|
+
SharedModule
|
|
25330
25530
|
],
|
|
25331
25531
|
declarations: [
|
|
25332
|
-
UserEventsTable
|
|
25532
|
+
UserEventsTable,
|
|
25533
|
+
MessageModal,
|
|
25534
|
+
MessageForm
|
|
25333
25535
|
],
|
|
25334
25536
|
exports: [
|
|
25335
|
-
UserEventsTable
|
|
25537
|
+
UserEventsTable,
|
|
25538
|
+
MessageModal
|
|
25336
25539
|
]
|
|
25337
25540
|
},] }
|
|
25338
25541
|
];
|
|
25339
25542
|
|
|
25543
|
+
const Mutations = {
|
|
25544
|
+
send: gql `mutation SendMessage($data: MessageVOInput){
|
|
25545
|
+
done: sendMessage(message: $data)
|
|
25546
|
+
}`
|
|
25547
|
+
};
|
|
25548
|
+
class MessageService extends BaseGraphqlService {
|
|
25549
|
+
constructor(graphql, translate, toastController, environment) {
|
|
25550
|
+
super(graphql, environment);
|
|
25551
|
+
this.graphql = graphql;
|
|
25552
|
+
this.translate = translate;
|
|
25553
|
+
this.toastController = toastController;
|
|
25554
|
+
this.environment = environment;
|
|
25555
|
+
// For DEV only
|
|
25556
|
+
this._debug = !environment.production;
|
|
25557
|
+
}
|
|
25558
|
+
/**
|
|
25559
|
+
* Send a message to recipient(s)
|
|
25560
|
+
*
|
|
25561
|
+
* @param entity
|
|
25562
|
+
* @param opts
|
|
25563
|
+
*/
|
|
25564
|
+
send(entity, opts) {
|
|
25565
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25566
|
+
// Transform into json
|
|
25567
|
+
const data = entity.asObject(MINIFY_ENTITY_FOR_POD);
|
|
25568
|
+
const now = Date.now();
|
|
25569
|
+
if (this._debug)
|
|
25570
|
+
console.debug(`[message-service] Send message...`, data);
|
|
25571
|
+
try {
|
|
25572
|
+
const { done } = yield this.graphql.mutate({
|
|
25573
|
+
mutation: Mutations.send,
|
|
25574
|
+
variables: { data },
|
|
25575
|
+
error: { code: SocialErrorCodes.SEND_MESSAGE_ERROR, message: 'SOCIAL.ERROR.SEND_MESSAGE_ERROR' }
|
|
25576
|
+
});
|
|
25577
|
+
if (this._debug)
|
|
25578
|
+
console.debug(`[message-service] Send message [OK] in ${Date.now() - now}ms`);
|
|
25579
|
+
if (done && (!opts || opts.showToast !== false)) {
|
|
25580
|
+
yield this.showToast({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' });
|
|
25581
|
+
}
|
|
25582
|
+
return done;
|
|
25583
|
+
}
|
|
25584
|
+
catch (err) {
|
|
25585
|
+
const error = err && err.message || err;
|
|
25586
|
+
console.error(error);
|
|
25587
|
+
// Show error
|
|
25588
|
+
if (!opts || opts.showToast !== false) {
|
|
25589
|
+
let message = error || 'SOCIAL.ERROR.SEND_MESSAGE_ERROR';
|
|
25590
|
+
yield this.showToast({ type: 'error', message });
|
|
25591
|
+
}
|
|
25592
|
+
return false;
|
|
25593
|
+
}
|
|
25594
|
+
});
|
|
25595
|
+
}
|
|
25596
|
+
/* -- protected methods -- */
|
|
25597
|
+
showToast(opts) {
|
|
25598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25599
|
+
return Toasts.show(this.toastController, this.translate, Object.assign({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' }, opts));
|
|
25600
|
+
});
|
|
25601
|
+
}
|
|
25602
|
+
}
|
|
25603
|
+
MessageService.ɵprov = ɵɵdefineInjectable({ factory: function MessageService_Factory() { return new MessageService(ɵɵinject(GraphqlService), ɵɵinject(TranslateService), ɵɵinject(ToastController), ɵɵinject(ENVIRONMENT, 8)); }, token: MessageService, providedIn: "root" });
|
|
25604
|
+
MessageService.decorators = [
|
|
25605
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25606
|
+
];
|
|
25607
|
+
MessageService.ctorParameters = () => [
|
|
25608
|
+
{ type: GraphqlService },
|
|
25609
|
+
{ type: TranslateService },
|
|
25610
|
+
{ type: ToastController },
|
|
25611
|
+
{ type: Environment, decorators: [{ type: Optional }, { type: Inject, args: [ENVIRONMENT,] }] }
|
|
25612
|
+
];
|
|
25613
|
+
|
|
25340
25614
|
var PersonFilter_1;
|
|
25341
25615
|
// @dynamic
|
|
25342
25616
|
let PersonFilter = PersonFilter_1 = class PersonFilter extends EntityFilter {
|
|
@@ -25535,7 +25809,7 @@ class PersonService extends BaseEntityService {
|
|
|
25535
25809
|
return target;
|
|
25536
25810
|
}
|
|
25537
25811
|
}
|
|
25538
|
-
PersonService.ɵprov =
|
|
25812
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
25539
25813
|
PersonService.decorators = [
|
|
25540
25814
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25541
25815
|
];
|
|
@@ -25566,7 +25840,7 @@ class PersonValidatorService {
|
|
|
25566
25840
|
return this.formBuilder.group(formConfig);
|
|
25567
25841
|
}
|
|
25568
25842
|
}
|
|
25569
|
-
PersonValidatorService.ɵprov =
|
|
25843
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
25570
25844
|
PersonValidatorService.decorators = [
|
|
25571
25845
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25572
25846
|
];
|
|
@@ -25576,7 +25850,7 @@ PersonValidatorService.ctorParameters = () => [
|
|
|
25576
25850
|
];
|
|
25577
25851
|
|
|
25578
25852
|
class UsersPage extends AppTable {
|
|
25579
|
-
constructor(injector, accountService, validatorService, configService, dataService,
|
|
25853
|
+
constructor(injector, formBuilder, accountService, validatorService, configService, dataService, messageService, cd, environment) {
|
|
25580
25854
|
super(injector, RESERVED_START_COLUMNS
|
|
25581
25855
|
.concat([
|
|
25582
25856
|
'avatar',
|
|
@@ -25601,16 +25875,17 @@ class UsersPage extends AppTable {
|
|
|
25601
25875
|
this.validatorService = validatorService;
|
|
25602
25876
|
this.configService = configService;
|
|
25603
25877
|
this.dataService = dataService;
|
|
25878
|
+
this.messageService = messageService;
|
|
25604
25879
|
this.cd = cd;
|
|
25605
|
-
this.canEdit = false;
|
|
25606
25880
|
this.profiles = [...PRIORITIZED_AUTHORITIES].reverse();
|
|
25607
|
-
this.filterCriteriaCount = 0;
|
|
25608
25881
|
this.statusList = StatusList;
|
|
25609
25882
|
this.statusById = StatusById;
|
|
25883
|
+
this.filterCriteriaCount = 0;
|
|
25610
25884
|
this.useSticky = false;
|
|
25611
25885
|
this.referentialToString = referentialToString;
|
|
25612
|
-
this.inlineEdition = accountService.isAdmin(); // Allow inline edition only if admin
|
|
25613
25886
|
this.canEdit = accountService.isAdmin();
|
|
25887
|
+
this.canSendMessage = this.canEdit;
|
|
25888
|
+
this.inlineEdition = this.canEdit;
|
|
25614
25889
|
this.confirmBeforeDelete = true;
|
|
25615
25890
|
this.autoLoad = false; // Wait config loading
|
|
25616
25891
|
this.i18nColumnPrefix = 'USER.';
|
|
@@ -25703,6 +25978,39 @@ class UsersPage extends AppTable {
|
|
|
25703
25978
|
formControl.setValue(null);
|
|
25704
25979
|
return false;
|
|
25705
25980
|
}
|
|
25981
|
+
openComposeMessageModal(event) {
|
|
25982
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25983
|
+
// Get recipients
|
|
25984
|
+
const recipients = (this.selection.selected || [])
|
|
25985
|
+
.map(row => row.currentData)
|
|
25986
|
+
.map(Person.fromObject)
|
|
25987
|
+
.map(p => {
|
|
25988
|
+
var _a;
|
|
25989
|
+
const target = p.asObject({ minify: true });
|
|
25990
|
+
target.department = (_a = p.department) === null || _a === void 0 ? void 0 : _a.asObject();
|
|
25991
|
+
return target;
|
|
25992
|
+
});
|
|
25993
|
+
const hasTopModal = !!(yield this.modalCtrl.getTop());
|
|
25994
|
+
const modal = yield this.modalCtrl.create({
|
|
25995
|
+
component: MessageModal,
|
|
25996
|
+
componentProps: {
|
|
25997
|
+
suggestFn: (value, filter, sortBy, sortDirection) => this.dataService.suggest(value, filter, sortBy, sortDirection),
|
|
25998
|
+
data: {
|
|
25999
|
+
recipients
|
|
26000
|
+
}
|
|
26001
|
+
},
|
|
26002
|
+
cssClass: hasTopModal && 'stack-modal'
|
|
26003
|
+
});
|
|
26004
|
+
// Open the modal
|
|
26005
|
+
yield modal.present();
|
|
26006
|
+
// On dismiss
|
|
26007
|
+
const { data } = yield modal.onDidDismiss();
|
|
26008
|
+
if (!data || !(data instanceof Message))
|
|
26009
|
+
return; // CANCELLED
|
|
26010
|
+
console.info('[users] received message to send: ', data);
|
|
26011
|
+
yield this.messageService.send(data);
|
|
26012
|
+
});
|
|
26013
|
+
}
|
|
25706
26014
|
/* -- protected methods -- */
|
|
25707
26015
|
markForCheck() {
|
|
25708
26016
|
this.cd.markForCheck();
|
|
@@ -25711,7 +26019,7 @@ class UsersPage extends AppTable {
|
|
|
25711
26019
|
UsersPage.decorators = [
|
|
25712
26020
|
{ type: Component, args: [{
|
|
25713
26021
|
selector: 'app-users-table',
|
|
25714
|
-
template: "<app-toolbar [title]=\"'USER.LIST.TITLE'|translate\"\n color=\"primary\"\n [canGoBack]=\"false\"\n [hasValidate]=\"!(loadingSubject|async) && dirty\"\n (onValidate)=\"save()\">\n <ion-buttons slot=\"end\">\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n <!-- Add -->\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addRow()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <!-- reset filter -->\n <button mat-icon-button (click)=\"resetFilter()\"\n *ngIf=\"filterCriteriaCount\">\n <mat-icon color=\"accent\">filter_list_alt</mat-icon>\n <mat-icon class=\"icon-secondary\" style=\"left: 16px; top: 5px; font-weight: bold;\">close</mat-icon>\n </button>\n\n <!-- show filter -->\n <button mat-icon-button (click)=\"filterExpansionPanel.toggle()\">\n <mat-icon *ngIf=\"filterCriteriaCount; else emptyFilter\"\n [matBadge]=\"filterCriteriaCount\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\">filter_list_alt\n </mat-icon>\n <ng-template #emptyFilter>\n <mat-icon>filter_list_alt</mat-icon>\n </ng-template>\n </button>\n </ng-container>\n\n <ng-template #hasSelection>\n <!-- delete -->\n <button mat-icon-button\n class=\"hidden-xs hidden-sm\"\n [title]=\"'COMMON.BTN_DELETE'|translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n </ion-buttons>\n</app-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"errorSubject|async ; let error\" lines=\"none\" @slideUpDownAnimation>\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <!-- search -->\n <mat-expansion-panel #filterExpansionPanel class=\"ion-no-padding filter-panel filter-panel-floating\">\n <form class=\"form-container ion-padding\" [formGroup]=\"filterForm\" (ngSubmit)=\"onRefresh.emit()\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <!-- search -->\n <mat-form-field>\n <input matInput [placeholder]=\"'USER.LIST.FILTER.SEARCH'|translate\" formControlName=\"searchText\">\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.searchText)\"\n [hidden]=\"filterForm.controls.searchText.disabled || !filterForm.controls.searchText.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n\n <ion-col>\n <!-- status -->\n <mat-form-field>\n <mat-select formControlName=\"statusId\" [placeholder]=\"'USER.STATUS'|translate\">\n <mat-option [value]=\"null\"><i><span translate>COMMON.EMPTY_OPTION</span></i></mat-option>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.statusId)\"\n [hidden]=\"filterForm.controls.statusId.disabled || !filterForm.controls.statusId.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n <mat-action-row>\n <!-- Counter -->\n <ion-label [hidden]=\"(loadingSubject|async) || filterForm.dirty\"\n [color]=\"empty && 'danger'\"\n class=\"ion-padding\">\n {{ (totalRowCount ? 'COMMON.RESULT_COUNT' : 'COMMON.NO_RESULT') | translate: {\n count: (totalRowCount |\n numberFormat)\n } }}\n </ion-label>\n\n <div class=\"toolbar-spacer\"></div>\n\n <!-- Close panel -->\n <ion-button mat-button fill=\"clear\" color=\"dark\"\n (click)=\"filterExpansionPanel.close()\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_CLOSE</ion-text>\n </ion-button>\n\n <!-- Search button -->\n <ion-button mat-button\n [color]=\"filterForm.dirty ? 'tertiary' : 'dark'\"\n [fill]=\"filterForm.dirty ? 'solid' : 'clear'\"\n (click)=\"applyFilterAndClosePanel($event)\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_APPLY</ion-text>\n </ion-button>\n\n </mat-action-row>\n </mat-expansion-panel>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"table-container\">\n <table #table mat-table matSort\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\" [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- avatar Column -->\n <ng-container matColumnDef=\"avatar\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n <div class=\"avatar\" *ngIf=\"row.currentData.avatar; else generateIcon\"\n [ngStyle]=\"{'background-image':'url('+row.currentData.avatar+')'}\"></div>\n <ng-template #generateIcon>\n <div class=\"avatar\">\n <svg width=\"38\" width=\"38\" [data-jdenticon-value]=\"row.currentData.id\"></svg>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <!-- lastName -->\n <ng-container matColumnDef=\"lastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.LAST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='lastName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput\n [formControl]=\"row.validator.controls['lastName']\"\n [placeholder]=\"'USER.LAST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='lastName'\">\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n\n </td>\n\n </ng-container>\n\n <!-- firstname -->\n <ng-container matColumnDef=\"firstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.FIRST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n\n (click)=\"focusColumn='firstName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['firstName']\"\n [placeholder]=\"'USER.FIRST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='firstName'\">\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- email -->\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.EMAIL</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='email'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['email']\"\n [placeholder]=\"'USER.EMAIL'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='email'\">\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('email')\">\n <span translate>ERROR.FIELD_NOT_VALID_EMAIL</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- additional fields -->\n <ng-container *ngFor=\"let definition of additionalFields\" [matColumnDef]=\"definition.key\">\n <th mat-header-cell *matHeaderCellDef>\n <span>{{definition.label|translate}}</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn=definition.key\">\n <app-form-field floatLabel=\"never\"\n [definition]=\"definition\"\n [formControl]=\"row.validator.controls[definition.key]\"\n [required]=\"definition.extra?.account?.required\"\n [autofocus]=\"row.editing && focusColumn===definition.ke\">\n </app-form-field>\n </td>\n </ng-container>\n\n <!-- profile column -->\n <ng-container matColumnDef=\"profile\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.PROFILE</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='profile'\">\n <mat-form-field floatLabel=\"never\">\n <mat-select [formControl]=\"row.validator.controls['mainProfile']\"\n [placeholder]=\"'USER.PROFILE'|translate\">\n <mat-option *ngFor=\"let item of profiles\" [value]=\"item\">\n {{ ('USER.PROFILE_ENUM.' + item) | uppercase |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['mainProfile'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Status column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.STATUS</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='status'\">\n <mat-form-field floatLabel=\"never\">\n <ion-icon matPrefix *ngIf=\"row.validator.controls['statusId'].value >=0\" [name]=\"statusById[row.validator.controls['statusId'].value]?.icon\"></ion-icon>\n\n <mat-select [formControl]=\"row.validator.controls['statusId']\"\n [placeholder]=\"'REFERENTIAL.STATUS'|translate\">\n <mat-select-trigger>\n <span *ngIf=\"row.validator.controls['statusId'].value >=0\">\n {{ statusById[row.validator.controls['statusId'].value]?.label | translate}}</span>\n </mat-select-trigger>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['statusId'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username -->\n <ng-container matColumnDef=\"username\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='username'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls.username\"\n [placeholder]=\"'USER.USERNAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='username'\">\n <mat-error *ngIf=\"row.validator.controls.username.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username extranet -->\n <ng-container matColumnDef=\"usernameExtranet\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME_EXTRANET</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='usernameExtranet'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls.usernameExtranet\"\n [placeholder]=\"'USER.USERNAME_EXTRANET'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='usernameExtranet'\">\n <mat-error *ngIf=\"row.validator.controls.usernameExtranet.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- pubkey -->\n <ng-container matColumnDef=\"pubkey\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.PUBKEY</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [title]=\"row.validator.controls['pubkey'].value\"\n (click)=\"focusColumn='pubkey'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls['pubkey']\" [placeholder]=\"'USER.PUBKEY'|translate\"\n [readonly]=\"!row.editing\" autocomplete=\"off\">\n <mat-error *ngIf=\"row.validator.controls['pubkey'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['pubkey'].hasError('pubkey')\">\n <span translate>ERROR.FIELD_NOT_VALID_PUBKEY</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-error]=\"row.validator.invalid\"\n [class.mat-row-dirty]=\"row.currentData.dirty\"\n [class.mat-row-disabled]=\"!row.editing\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n </div>\n</ion-content>\n\n<ion-footer>\n <mat-paginator class=\"mat-paginator-footer\"\n [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n\n <app-form-buttons-bar *ngIf=\"!mobile && inlineEdition\"\n (onCancel)=\"onRefresh.emit()\" (onSave)=\"save()\" [disabled]=\"(loadingSubject|async) || !dirty\"></app-form-buttons-bar>\n</ion-footer>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addRow()\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n",
|
|
26022
|
+
template: "<app-toolbar [title]=\"'USER.LIST.TITLE'|translate\"\n color=\"primary\"\n [canGoBack]=\"false\"\n [hasValidate]=\"!(loadingSubject|async) && dirty\"\n (onValidate)=\"save()\">\n <ion-buttons slot=\"end\">\n\n <!-- Compose message -->\n <button mat-icon-button *ngIf=\"canSendMessage\"\n [title]=\"'USER.LIST.BTN_SEND_MESSAGE'|translate\"\n (click)=\"openComposeMessageModal($event)\">\n <ion-icon name=\"mail\" slot=\"icon-only\"></ion-icon>\n </button>\n\n <ng-container *ngIf=\"!selection.hasValue(); else hasSelection\">\n <!-- Add -->\n <button mat-icon-button\n *ngIf=\"canEdit && !mobile\"\n [title]=\"'COMMON.BTN_ADD'|translate\"\n (click)=\"addRow()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Refresh -->\n <button mat-icon-button *ngIf=\"!mobile\"\n [title]=\"'COMMON.BTN_REFRESH'|translate\"\n (click)=\"onRefresh.emit()\">\n <mat-icon>refresh</mat-icon>\n </button>\n\n <!-- reset filter -->\n <button mat-icon-button (click)=\"resetFilter()\"\n *ngIf=\"filterCriteriaCount\">\n <mat-icon color=\"accent\">filter_list_alt</mat-icon>\n <mat-icon class=\"icon-secondary\" style=\"left: 16px; top: 5px; font-weight: bold;\">close</mat-icon>\n </button>\n\n <!-- show filter -->\n <button mat-icon-button (click)=\"filterExpansionPanel.toggle()\">\n <mat-icon *ngIf=\"filterCriteriaCount; else emptyFilter\"\n [matBadge]=\"filterCriteriaCount\"\n matBadgeColor=\"accent\"\n matBadgeSize=\"small\"\n matBadgePosition=\"above after\">filter_list_alt\n </mat-icon>\n <ng-template #emptyFilter>\n <mat-icon>filter_list_alt</mat-icon>\n </ng-template>\n </button>\n </ng-container>\n\n <ng-template #hasSelection>\n\n <!-- delete -->\n <button mat-icon-button\n class=\"hidden-xs hidden-sm\"\n [title]=\"'COMMON.BTN_DELETE'|translate\"\n (click)=\"deleteSelection($event)\">\n <mat-icon>delete</mat-icon>\n </button>\n </ng-template>\n </ion-buttons>\n</app-toolbar>\n\n<ion-content class=\"ion-no-padding\">\n\n <!-- error -->\n <ion-item *ngIf=\"errorSubject|async ; let error\" lines=\"none\" @slideUpDownAnimation>\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <!-- search -->\n <mat-expansion-panel #filterExpansionPanel class=\"ion-no-padding filter-panel filter-panel-floating\">\n <form class=\"form-container ion-padding\" [formGroup]=\"filterForm\" (ngSubmit)=\"onRefresh.emit()\">\n <ion-grid>\n <ion-row>\n <ion-col>\n <!-- search -->\n <mat-form-field>\n <input matInput [placeholder]=\"'USER.LIST.FILTER.SEARCH'|translate\" formControlName=\"searchText\">\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.searchText)\"\n [hidden]=\"filterForm.controls.searchText.disabled || !filterForm.controls.searchText.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n\n <ion-col>\n <!-- status -->\n <mat-form-field>\n <mat-select formControlName=\"statusId\" [placeholder]=\"'USER.STATUS'|translate\">\n <mat-option [value]=\"null\"><i><span translate>COMMON.EMPTY_OPTION</span></i></mat-option>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n\n <button mat-icon-button matSuffix tabindex=\"-1\"\n type=\"button\"\n (click)=\"clearControlValue($event, filterForm.controls.statusId)\"\n [hidden]=\"filterForm.controls.statusId.disabled || !filterForm.controls.statusId.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n </form>\n\n <mat-action-row>\n <!-- Counter -->\n <ion-label [hidden]=\"(loadingSubject|async) || filterForm.dirty\"\n [color]=\"empty && 'danger'\"\n class=\"ion-padding\">\n {{ (totalRowCount ? 'COMMON.RESULT_COUNT' : 'COMMON.NO_RESULT') | translate: {\n count: (totalRowCount |\n numberFormat)\n } }}\n </ion-label>\n\n <div class=\"toolbar-spacer\"></div>\n\n <!-- Close panel -->\n <ion-button mat-button fill=\"clear\" color=\"dark\"\n (click)=\"filterExpansionPanel.close()\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_CLOSE</ion-text>\n </ion-button>\n\n <!-- Search button -->\n <ion-button mat-button\n [color]=\"filterForm.dirty ? 'tertiary' : 'dark'\"\n [fill]=\"filterForm.dirty ? 'solid' : 'clear'\"\n (click)=\"applyFilterAndClosePanel($event)\"\n [disabled]=\"loadingSubject|async\">\n <ion-text translate>COMMON.BTN_APPLY</ion-text>\n </ion-button>\n\n </mat-action-row>\n </mat-expansion-panel>\n\n <!-- error -->\n <ion-item *ngIf=\"error\" visible-xs visible-sm visible-mobile lines=\"none\">\n <ion-icon color=\"danger\" slot=\"start\" name=\"alert-circle\"></ion-icon>\n <ion-label color=\"danger\" class=\"error\" [innerHTML]=\"error|translate\"></ion-label>\n </ion-item>\n\n <div class=\"table-container\">\n <table #table mat-table matSort\n [dataSource]=\"dataSource\"\n [matSortActive]=\"defaultSortBy\" [matSortDirection]=\"defaultSortDirection\"\n matSortDisableClear [trackBy]=\"trackByFn\">\n\n <ng-container matColumnDef=\"select\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\"\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\n </mat-checkbox>\n </th>\n <td mat-cell *matCellDef=\"let row\" [class.cdk-visually-hidden]=\"!inlineEdition\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <!-- Id Column -->\n <ng-container matColumnDef=\"id\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <ion-label>#</ion-label>\n </th>\n <td mat-cell *matCellDef=\"let row\">{{ row.currentData.id }}</td>\n </ng-container>\n\n <!-- avatar Column -->\n <ng-container matColumnDef=\"avatar\" [sticky]=\"useSticky\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td mat-cell *matCellDef=\"let row\">\n <div class=\"avatar\" *ngIf=\"row.currentData.avatar; else generateIcon\"\n [ngStyle]=\"{'background-image':'url('+row.currentData.avatar+')'}\"></div>\n <ng-template #generateIcon>\n <div class=\"avatar\">\n <svg width=\"38\" width=\"38\" [data-jdenticon-value]=\"row.currentData.id\"></svg>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n <!-- lastName -->\n <ng-container matColumnDef=\"lastName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.LAST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='lastName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput\n [formControl]=\"row.validator.controls['lastName']\"\n [placeholder]=\"'USER.LAST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='lastName'\">\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['lastName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n\n </td>\n\n </ng-container>\n\n <!-- firstname -->\n <ng-container matColumnDef=\"firstName\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.FIRST_NAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n\n (click)=\"focusColumn='firstName'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['firstName']\"\n [placeholder]=\"'USER.FIRST_NAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='firstName'\">\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['firstName'].hasError('minlength')\">\n <span>{{'ERROR.FIELD_MIN_LENGTH' | translate: {minLength: 2} }}</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- email -->\n <ng-container matColumnDef=\"email\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.EMAIL</span>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"focusColumn='email'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['email']\"\n [placeholder]=\"'USER.EMAIL'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='email'\">\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls['email'].hasError('email')\">\n <span translate>ERROR.FIELD_NOT_VALID_EMAIL</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- additional fields -->\n <ng-container *ngFor=\"let definition of additionalFields\" [matColumnDef]=\"definition.key\">\n <th mat-header-cell *matHeaderCellDef>\n <span>{{definition.label|translate}}</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn=definition.key\">\n <app-form-field floatLabel=\"never\"\n [definition]=\"definition\"\n [formControl]=\"row.validator.controls[definition.key]\"\n [required]=\"definition.extra?.account?.required\"\n [autofocus]=\"row.editing && focusColumn===definition.ke\">\n </app-form-field>\n </td>\n </ng-container>\n\n <!-- profile column -->\n <ng-container matColumnDef=\"profile\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.PROFILE</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='profile'\">\n <mat-form-field floatLabel=\"never\">\n <mat-select [formControl]=\"row.validator.controls['mainProfile']\"\n [placeholder]=\"'USER.PROFILE'|translate\">\n <mat-option *ngFor=\"let item of profiles\" [value]=\"item\">\n {{ ('USER.PROFILE_ENUM.' + item) | uppercase |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['mainProfile'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Status column -->\n <ng-container matColumnDef=\"status\">\n <th mat-header-cell *matHeaderCellDef>\n <span translate>USER.STATUS</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='status'\">\n <mat-form-field floatLabel=\"never\">\n <ion-icon matPrefix *ngIf=\"row.validator.controls['statusId'].value >=0\" [name]=\"statusById[row.validator.controls['statusId'].value]?.icon\"></ion-icon>\n\n <mat-select [formControl]=\"row.validator.controls['statusId']\"\n [placeholder]=\"'REFERENTIAL.STATUS'|translate\">\n <mat-select-trigger>\n <span *ngIf=\"row.validator.controls['statusId'].value >=0\">\n {{ statusById[row.validator.controls['statusId'].value]?.label | translate}}</span>\n </mat-select-trigger>\n <mat-option *ngFor=\"let item of statusList\" [value]=\"item.id\">\n <ion-icon [name]=\"item.icon\"></ion-icon>\n {{ item.label |translate }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"row.validator.controls['statusId'].hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username -->\n <ng-container matColumnDef=\"username\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='username'\">\n <mat-form-field floatLabel=\"never\" >\n <input matInput [formControl]=\"row.validator.controls.username\"\n [placeholder]=\"'USER.USERNAME'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='username'\">\n <mat-error *ngIf=\"row.validator.controls.username.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- username extranet -->\n <ng-container matColumnDef=\"usernameExtranet\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.USERNAME_EXTRANET</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n (click)=\"focusColumn='usernameExtranet'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls.usernameExtranet\"\n [placeholder]=\"'USER.USERNAME_EXTRANET'|translate\"\n [readonly]=\"!row.editing\"\n [appAutofocus]=\"row.editing && focusColumn==='usernameExtranet'\">\n <mat-error *ngIf=\"row.validator.controls.usernameExtranet.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- pubkey -->\n <ng-container matColumnDef=\"pubkey\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>\n <span translate>USER.PUBKEY</span>\n </th>\n <td mat-cell *matCellDef=\"let row\"\n [title]=\"row.validator.controls.pubkey.valueChanges|async\"\n (click)=\"focusColumn='pubkey'\">\n <mat-form-field floatLabel=\"never\">\n <input matInput [formControl]=\"row.validator.controls['pubkey']\" [placeholder]=\"'USER.PUBKEY'|translate\"\n [readonly]=\"!row.editing\" autocomplete=\"off\">\n <mat-error *ngIf=\"row.validator.controls.pubkey.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"row.validator.controls.pubkey.hasError('pubkey')\">\n <span translate>ERROR.FIELD_NOT_VALID_PUBKEY</span>\n </mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n <!-- Actions buttons column -->\n <app-actions-column [stickyEnd]=\"useSticky\"\n (optionsClick)=\"openSelectColumnsModal($event)\"\n (cancelOrDeleteClick)=\"cancelOrDelete($event.event, $event.row)\"\n (confirmAndAddClick)=\"confirmAndAdd($event.event, $event.row)\"\n (backward)=\"confirmAndBackward($event.event, $event.row)\"\n (forward)=\"confirmAndForward($event.event, $event.row)\"\n [canCancel]=\"false\">\n </app-actions-column>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"\n [class.mat-row-error]=\"row.validator.invalid\"\n [class.mat-row-dirty]=\"row.currentData.dirty\"\n [class.mat-row-disabled]=\"!row.editing\"\n (click)=\"clickRow($event, row)\"\n (keydown.escape)=\"escapeEditingRow($event)\"\n [cdkTrapFocus]=\"row.validator.invalid\"></tr>\n </table>\n\n <ng-container *ngIf=\"loadingSubject|async; else noResult\">\n <ion-item>\n <ion-skeleton-text animated></ion-skeleton-text>\n </ion-item>\n </ng-container>\n\n <ng-template #noResult>\n <ion-item *ngIf=\"totalRowCount === 0\">\n <ion-text color=\"danger\" class=\"text-italic\" translate>COMMON.NO_RESULT</ion-text>\n </ion-item>\n </ng-template>\n </div>\n</ion-content>\n\n<ion-footer>\n <mat-paginator class=\"mat-paginator-footer\"\n [length]=\"totalRowCount\" [pageSize]=\"defaultPageSize\"\n [pageSizeOptions]=\"defaultPageSizeOptions\" showFirstLastButtons>\n </mat-paginator>\n\n <app-form-buttons-bar *ngIf=\"!mobile && inlineEdition\"\n (onCancel)=\"onRefresh.emit()\" (onSave)=\"save()\" [disabled]=\"(loadingSubject|async) || !dirty\"></app-form-buttons-bar>\n</ion-footer>\n\n<ion-fab slot=\"fixed\" vertical=\"bottom\" horizontal=\"end\" *ngIf=\"mobile\">\n <ion-fab-button color=\"tertiary\" (click)=\"addRow()\">\n <ion-icon name=\"add\"></ion-icon>\n </ion-fab-button>\n</ion-fab>\n",
|
|
25715
26023
|
providers: [
|
|
25716
26024
|
{ provide: ValidatorService, useExisting: PersonValidatorService }
|
|
25717
26025
|
],
|
|
@@ -25722,12 +26030,13 @@ UsersPage.decorators = [
|
|
|
25722
26030
|
];
|
|
25723
26031
|
UsersPage.ctorParameters = () => [
|
|
25724
26032
|
{ type: Injector },
|
|
26033
|
+
{ type: FormBuilder },
|
|
25725
26034
|
{ type: AccountService },
|
|
25726
26035
|
{ type: ValidatorService },
|
|
25727
26036
|
{ type: ConfigService },
|
|
25728
26037
|
{ type: PersonService },
|
|
26038
|
+
{ type: MessageService },
|
|
25729
26039
|
{ type: ChangeDetectorRef },
|
|
25730
|
-
{ type: FormBuilder },
|
|
25731
26040
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] }
|
|
25732
26041
|
];
|
|
25733
26042
|
UsersPage.propDecorators = {
|
|
@@ -25754,22 +26063,24 @@ AdminModule.decorators = [
|
|
|
25754
26063
|
UsersPage
|
|
25755
26064
|
],
|
|
25756
26065
|
exports: [
|
|
26066
|
+
SocialModule,
|
|
25757
26067
|
UsersPage
|
|
25758
26068
|
]
|
|
25759
26069
|
},] }
|
|
25760
26070
|
];
|
|
25761
26071
|
AdminModule.ctorParameters = () => [];
|
|
25762
26072
|
|
|
25763
|
-
const ɵ0 = {
|
|
26073
|
+
const ɵ0$c = {
|
|
25764
26074
|
profile: 'ADMIN'
|
|
25765
26075
|
};
|
|
25766
|
-
const routes
|
|
26076
|
+
const routes = [
|
|
25767
26077
|
{
|
|
25768
26078
|
path: 'users',
|
|
25769
26079
|
pathMatch: 'full',
|
|
25770
26080
|
component: UsersPage,
|
|
25771
26081
|
canActivate: [AuthGuardService],
|
|
25772
|
-
|
|
26082
|
+
canDeactivate: [ComponentDirtyGuard],
|
|
26083
|
+
data: ɵ0$c
|
|
25773
26084
|
}
|
|
25774
26085
|
];
|
|
25775
26086
|
class AdminRoutingModule {
|
|
@@ -25779,33 +26090,27 @@ AdminRoutingModule.decorators = [
|
|
|
25779
26090
|
imports: [
|
|
25780
26091
|
SharedRoutingModule,
|
|
25781
26092
|
AdminModule,
|
|
25782
|
-
RouterModule.forChild(routes
|
|
26093
|
+
RouterModule.forChild(routes)
|
|
25783
26094
|
],
|
|
25784
26095
|
exports: [RouterModule]
|
|
25785
26096
|
},] }
|
|
25786
26097
|
];
|
|
25787
26098
|
|
|
25788
|
-
|
|
25789
|
-
LOAD_PERSONS_ERROR: 100,
|
|
25790
|
-
SAVE_PERSONS_ERROR: 101,
|
|
25791
|
-
DELETE_PERSONS_ERROR: 102,
|
|
25792
|
-
};
|
|
25793
|
-
|
|
25794
|
-
class EntityTestClass$1 {
|
|
26099
|
+
class EntityTestClass {
|
|
25795
26100
|
}
|
|
25796
|
-
const FAKE_ENTITIES
|
|
26101
|
+
const FAKE_ENTITIES = [
|
|
25797
26102
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
25798
26103
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
25799
26104
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
25800
26105
|
];
|
|
25801
|
-
function deepCopy
|
|
26106
|
+
function deepCopy(values, size) {
|
|
25802
26107
|
if (isNil(size)) {
|
|
25803
|
-
return (values || FAKE_ENTITIES
|
|
26108
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
25804
26109
|
}
|
|
25805
26110
|
let result = [];
|
|
25806
26111
|
let i = 1;
|
|
25807
26112
|
while (result.length < size) {
|
|
25808
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
26113
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
25809
26114
|
const name = entity.name + ' #' + i;
|
|
25810
26115
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
25811
26116
|
}));
|
|
@@ -25815,7 +26120,7 @@ function deepCopy$1(values, size) {
|
|
|
25815
26120
|
class AutocompleteTestPage {
|
|
25816
26121
|
constructor(formBuilder) {
|
|
25817
26122
|
this.formBuilder = formBuilder;
|
|
25818
|
-
this._items = deepCopy
|
|
26123
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
25819
26124
|
this._$items = new BehaviorSubject(undefined);
|
|
25820
26125
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
25821
26126
|
this.memoryHide = false;
|
|
@@ -25860,7 +26165,7 @@ class AutocompleteTestPage {
|
|
|
25860
26165
|
});
|
|
25861
26166
|
// From items
|
|
25862
26167
|
this.autocompleteFields.add('entity-items-large', {
|
|
25863
|
-
items: FAKE_ENTITIES
|
|
26168
|
+
items: FAKE_ENTITIES.slice(),
|
|
25864
26169
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
25865
26170
|
displayWith: this.entityToString
|
|
25866
26171
|
});
|
|
@@ -25879,13 +26184,13 @@ class AutocompleteTestPage {
|
|
|
25879
26184
|
loadData() {
|
|
25880
26185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25881
26186
|
const data = {
|
|
25882
|
-
entity: deepCopy
|
|
26187
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
25883
26188
|
// This item is NOT in the items list => i should be displayed anyway
|
|
25884
26189
|
missingEntity: {
|
|
25885
26190
|
id: -1, label: '??', name: 'Missing item'
|
|
25886
26191
|
},
|
|
25887
|
-
disableEntity: deepCopy
|
|
25888
|
-
entities: deepCopy
|
|
26192
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2],
|
|
26193
|
+
entities: deepCopy(FAKE_ENTITIES)
|
|
25889
26194
|
};
|
|
25890
26195
|
this.form.setValue(data);
|
|
25891
26196
|
// Load observables
|
|
@@ -26032,13 +26337,13 @@ LatLongTestPage.ctorParameters = () => [
|
|
|
26032
26337
|
{ type: FormBuilder }
|
|
26033
26338
|
];
|
|
26034
26339
|
|
|
26035
|
-
const moment$
|
|
26340
|
+
const moment$5 = momentImported;
|
|
26036
26341
|
class SwipeTestPage {
|
|
26037
26342
|
constructor(formBuilder, dateFormatPipe) {
|
|
26038
26343
|
this.formBuilder = formBuilder;
|
|
26039
26344
|
this.dateFormatPipe = dateFormatPipe;
|
|
26040
26345
|
this.$dates = new BehaviorSubject(undefined);
|
|
26041
|
-
this._today = moment$
|
|
26346
|
+
this._today = moment$5().startOf('day');
|
|
26042
26347
|
this.form = formBuilder.group({
|
|
26043
26348
|
empty: [null, Validators.required],
|
|
26044
26349
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -26051,7 +26356,7 @@ class SwipeTestPage {
|
|
|
26051
26356
|
ngOnInit() {
|
|
26052
26357
|
const dates = [];
|
|
26053
26358
|
for (let d = 0; d < 7; d++) {
|
|
26054
|
-
dates[d] = moment$
|
|
26359
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
26055
26360
|
}
|
|
26056
26361
|
this.$dates.next(dates);
|
|
26057
26362
|
this.loadData();
|
|
@@ -26092,7 +26397,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
26092
26397
|
{ type: DateFormatPipe }
|
|
26093
26398
|
];
|
|
26094
26399
|
|
|
26095
|
-
const moment$
|
|
26400
|
+
const moment$6 = momentImported;
|
|
26096
26401
|
class DateTimeTestPage {
|
|
26097
26402
|
constructor(platform, formBuilder, cd) {
|
|
26098
26403
|
this.platform = platform;
|
|
@@ -26123,7 +26428,7 @@ class DateTimeTestPage {
|
|
|
26123
26428
|
// Load the form with data
|
|
26124
26429
|
loadData() {
|
|
26125
26430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26126
|
-
const now = moment$
|
|
26431
|
+
const now = moment$6();
|
|
26127
26432
|
const data = {
|
|
26128
26433
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
26129
26434
|
enable: toDateISOString(now),
|
|
@@ -26184,9 +26489,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
26184
26489
|
{ type: ChangeDetectorRef }
|
|
26185
26490
|
];
|
|
26186
26491
|
|
|
26187
|
-
class EntityTestClass {
|
|
26492
|
+
class EntityTestClass$1 {
|
|
26188
26493
|
}
|
|
26189
|
-
const FAKE_ENTITIES = [
|
|
26494
|
+
const FAKE_ENTITIES$1 = [
|
|
26190
26495
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
26191
26496
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
26192
26497
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -26195,14 +26500,14 @@ const FAKE_ENTITIES = [
|
|
|
26195
26500
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
26196
26501
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
26197
26502
|
];
|
|
26198
|
-
function deepCopy(values, size) {
|
|
26503
|
+
function deepCopy$1(values, size) {
|
|
26199
26504
|
if (isNil(size)) {
|
|
26200
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
26505
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
26201
26506
|
}
|
|
26202
26507
|
let result = [];
|
|
26203
26508
|
let i = 1;
|
|
26204
26509
|
while (result.length < size) {
|
|
26205
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
26510
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
26206
26511
|
const name = entity.name + ' #' + i;
|
|
26207
26512
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
26208
26513
|
}));
|
|
@@ -26212,7 +26517,7 @@ function deepCopy(values, size) {
|
|
|
26212
26517
|
class ChipsTestPage {
|
|
26213
26518
|
constructor(formBuilder) {
|
|
26214
26519
|
this.formBuilder = formBuilder;
|
|
26215
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
26520
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
26216
26521
|
this._$items = new BehaviorSubject(undefined);
|
|
26217
26522
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
26218
26523
|
this.form = formBuilder.group({
|
|
@@ -26251,7 +26556,7 @@ class ChipsTestPage {
|
|
|
26251
26556
|
// Load the form with data
|
|
26252
26557
|
loadData() {
|
|
26253
26558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26254
|
-
const items = deepCopy(FAKE_ENTITIES);
|
|
26559
|
+
const items = deepCopy$1(FAKE_ENTITIES$1);
|
|
26255
26560
|
const data = {
|
|
26256
26561
|
entity: items.slice(0, 1),
|
|
26257
26562
|
entityInitial: items.slice(1, 2),
|
|
@@ -26367,7 +26672,7 @@ NumpadTestPage.ctorParameters = () => [
|
|
|
26367
26672
|
{ type: FormBuilder }
|
|
26368
26673
|
];
|
|
26369
26674
|
|
|
26370
|
-
const moment = momentImported;
|
|
26675
|
+
const moment$7 = momentImported;
|
|
26371
26676
|
class DateTestPage {
|
|
26372
26677
|
constructor(formBuilder, cd) {
|
|
26373
26678
|
this.formBuilder = formBuilder;
|
|
@@ -26379,7 +26684,8 @@ class DateTestPage {
|
|
|
26379
26684
|
this.timezone = 'Indian/Mahe';
|
|
26380
26685
|
this.stringify = JSON.stringify;
|
|
26381
26686
|
this.form = formBuilder.group({
|
|
26382
|
-
empty: [null,
|
|
26687
|
+
empty: [null, SharedValidators.validDate],
|
|
26688
|
+
emptyRequired: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
26383
26689
|
enable: [null, Validators.required],
|
|
26384
26690
|
disable: [null, Validators.required],
|
|
26385
26691
|
readonly: [null],
|
|
@@ -26399,10 +26705,11 @@ class DateTestPage {
|
|
|
26399
26705
|
// Load the form with data
|
|
26400
26706
|
loadData() {
|
|
26401
26707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26402
|
-
const now = moment();
|
|
26708
|
+
const now = moment$7();
|
|
26403
26709
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
26404
26710
|
const data = {
|
|
26405
|
-
empty:
|
|
26711
|
+
empty: null,
|
|
26712
|
+
emptyRequired: null,
|
|
26406
26713
|
enable: toDateISOString(now),
|
|
26407
26714
|
disable: now.clone(),
|
|
26408
26715
|
readonly: now.clone(),
|
|
@@ -26456,7 +26763,7 @@ class DateTestPage {
|
|
|
26456
26763
|
DateTestPage.decorators = [
|
|
26457
26764
|
{ type: Component, args: [{
|
|
26458
26765
|
selector: 'app-data-test',
|
|
26459
|
-
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <hr/>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value={{stringify(form.controls.timezone.value)}}</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field #readonlyField formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"readonlyField.readonly=$event.checked\" [checked]=\"readonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #readonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n </form>\n\n</ion-content>\n"
|
|
26766
|
+
template: "<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Date field test page</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <form class=\"form-container\" [formGroup]=\"form\" (ngSubmit)=\"doSubmit($event)\">\n\n\n <ion-grid>\n\n <!-- debugging memory leak -->\n <ion-row><ion-col><ion-text><h4>Debug memory leak</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col size=\"2\">\n <ion-button *ngIf=\"!memoryTimer\" (click)=\"startMemoryTimer()\">Start timer</ion-button>\n <ion-button *ngIf=\"memoryTimer\" (click)=\"stopMemoryTimer()\">Stop timer</ion-button>\n </ion-col>\n <ion-col size=\"2\">\n <mat-form-field floatLabel=\"never\">\n <input matInput type=\"text\" hidden>\n <mat-checkbox (change)=\"memoryMobile=$event.checked\" [value]=\"memoryMobile\">\n Mobile ?\n </mat-checkbox>\n </mat-form-field>\n </ion-col>\n <ion-col>\n <mat-date-field formControlName=\"empty\"\n *ngIf=\"!memoryHide\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"memoryMobile\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-col>\n </ion-row>\n\n <!-- Mobile mode -->\n <ion-row><ion-col><ion-text><h4>Mobile mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value=\"{{stringify(form.controls.timezone.value)}}\"</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"true\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"mobileReadonlyField.readonly=$event.checked\" [checked]=\"mobileReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #mobileReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"true\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n </ion-row>\n <!-- debug console -->\n <ion-row>\n <!-- buttons -->\n <ion-col size=\"2\">\n <!-- submit form -->\n <ion-button (click)=\"doSubmit($event)\"\n fill=\"outline\">\n <ion-icon name=\"checkmark\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n\n <!-- clear log -->\n <ion-button (click)=\"clearLogPanel()\"\n fill=\"outline\">\n <ion-icon name=\"trash\" slot=\"icon-only\"></ion-icon>\n </ion-button>\n </ion-col>\n <ion-col size=\"10\" *ngIf=\"showLogPanel\">\n <ion-text color=\"primary\">Log:<br/></ion-text>\n <div class=\"ion-padding-start\">\n <ion-text color=\"medium\">\n <small [innerHTML]=\"logContent\"></small>\n </ion-text>\n </div>\n </ion-col>\n </ion-row>\n\n <hr/>\n\n <!-- Desktop mode -->\n <ion-row><ion-col><ion-text><h4>Desktop mode</h4></ion-text></ion-col></ion-row>\n <ion-row>\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.empty.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"empty\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <ion-col>\n\n <!-- Empty value -->\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Empty value (required)\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.emptyRequired.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"emptyRequired\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Enable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n With value\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.enable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"enable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Disable -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Disable\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.disable.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"disable\"\n placeholder=\"Date\"\n [required]=\"true\"\n [mobile]=\"false\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- TimeZone -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n TimeZone\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>timezone=\"{{timezone}}\" value={{stringify(form.controls.timezone.value)}}</pre></small>\n <pre>Should display using the browser TZ,<br/>but serialize/deserialize for the given TZ</pre>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-date-field formControlName=\"timezone\"\n placeholder=\"Date\"\n [mobile]=\"false\"\n [clearable]=\"true\"\n [timezone]=\"timezone\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n <!-- Readonly -->\n <ion-col>\n <ion-card>\n <ion-card-header>\n <ion-card-title>\n <ion-label color=\"primary\">\n Readonly toggle\n </ion-label>\n </ion-card-title>\n <ion-card-subtitle>\n <ion-text color=\"medium\">\n <small><pre>{{stringify(form.controls.readonly.value)}}</pre></small>\n </ion-text>\n </ion-card-subtitle>\n </ion-card-header>\n <ion-card-content>\n <mat-checkbox (change)=\"desktopReadonlyField.readonly=$event.checked\" [checked]=\"desktopReadonlyField.readonly\">\n </mat-checkbox>\n\n <mat-date-field #desktopReadonlyField formControlName=\"readonly\"\n placeholder=\"Date\"\n [readonly]=\"true\"\n [mobile]=\"false\"\n [clearable]=\"true\">\n <ion-icon matPrefix name=\"calendar-outline\"></ion-icon>\n </mat-date-field>\n </ion-card-content>\n </ion-card>\n </ion-col>\n\n </ion-row>\n </ion-grid>\n\n </form>\n</ion-content>\n"
|
|
26460
26767
|
},] }
|
|
26461
26768
|
];
|
|
26462
26769
|
DateTestPage.ctorParameters = () => [
|
|
@@ -26476,7 +26783,7 @@ const SHARED_MATERIAL_TESTING_PAGES = [
|
|
|
26476
26783
|
{ label: 'Shared directives', divider: true },
|
|
26477
26784
|
{ label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
|
|
26478
26785
|
];
|
|
26479
|
-
const routes$
|
|
26786
|
+
const routes$1 = [
|
|
26480
26787
|
{
|
|
26481
26788
|
path: '',
|
|
26482
26789
|
pathMatch: 'full',
|
|
@@ -26533,7 +26840,7 @@ MaterialTestingModule.decorators = [
|
|
|
26533
26840
|
ReactiveFormsModule,
|
|
26534
26841
|
SharedMaterialModule,
|
|
26535
26842
|
TranslateModule.forChild(),
|
|
26536
|
-
RouterModule.forChild(routes$
|
|
26843
|
+
RouterModule.forChild(routes$1)
|
|
26537
26844
|
],
|
|
26538
26845
|
declarations: [
|
|
26539
26846
|
DateTimeTestPage,
|
|
@@ -26594,7 +26901,7 @@ ToastTestingPage.ctorParameters = () => [
|
|
|
26594
26901
|
{ type: TranslateService }
|
|
26595
26902
|
];
|
|
26596
26903
|
|
|
26597
|
-
const routes$
|
|
26904
|
+
const routes$2 = [
|
|
26598
26905
|
{
|
|
26599
26906
|
path: 'toast',
|
|
26600
26907
|
pathMatch: 'full',
|
|
@@ -26609,7 +26916,7 @@ ToastTestingModule.decorators = [
|
|
|
26609
26916
|
CommonModule,
|
|
26610
26917
|
IonicModule,
|
|
26611
26918
|
TranslateModule.forChild(),
|
|
26612
|
-
RouterModule.forChild(routes$
|
|
26919
|
+
RouterModule.forChild(routes$2)
|
|
26613
26920
|
],
|
|
26614
26921
|
declarations: [
|
|
26615
26922
|
ToastTestingPage
|
|
@@ -26672,7 +26979,7 @@ UploadFileTestingPage.ctorParameters = () => [
|
|
|
26672
26979
|
{ type: PopoverController }
|
|
26673
26980
|
];
|
|
26674
26981
|
|
|
26675
|
-
const routes$
|
|
26982
|
+
const routes$3 = [
|
|
26676
26983
|
{
|
|
26677
26984
|
path: 'upload-file',
|
|
26678
26985
|
pathMatch: 'full',
|
|
@@ -26687,7 +26994,7 @@ UploadFileTestingModule.decorators = [
|
|
|
26687
26994
|
CommonModule,
|
|
26688
26995
|
IonicModule,
|
|
26689
26996
|
TranslateModule.forChild(),
|
|
26690
|
-
RouterModule.forChild(routes$
|
|
26997
|
+
RouterModule.forChild(routes$3)
|
|
26691
26998
|
],
|
|
26692
26999
|
declarations: [
|
|
26693
27000
|
UploadFileTestingPage
|
|
@@ -27068,7 +27375,7 @@ TextPopoverTestingPage.ctorParameters = () => [
|
|
|
27068
27375
|
{ type: PopoverController }
|
|
27069
27376
|
];
|
|
27070
27377
|
|
|
27071
|
-
const routes$
|
|
27378
|
+
const routes$4 = [
|
|
27072
27379
|
{
|
|
27073
27380
|
path: 'text-popover',
|
|
27074
27381
|
pathMatch: 'full',
|
|
@@ -27083,7 +27390,7 @@ TextPopoverTestingModule.decorators = [
|
|
|
27083
27390
|
CommonModule,
|
|
27084
27391
|
IonicModule,
|
|
27085
27392
|
TranslateModule.forChild(),
|
|
27086
|
-
RouterModule.forChild(routes$
|
|
27393
|
+
RouterModule.forChild(routes$4)
|
|
27087
27394
|
],
|
|
27088
27395
|
declarations: [
|
|
27089
27396
|
TextPopoverTestingPage
|
|
@@ -27100,7 +27407,7 @@ const CORE_TESTING_PAGES = [
|
|
|
27100
27407
|
{ label: 'Table', page: '/testing/core/table' },
|
|
27101
27408
|
{ label: 'Text popover', page: '/testing/core/text-popover' }
|
|
27102
27409
|
];
|
|
27103
|
-
const routes = [
|
|
27410
|
+
const routes$5 = [
|
|
27104
27411
|
{
|
|
27105
27412
|
path: '',
|
|
27106
27413
|
pathMatch: 'full',
|
|
@@ -27124,7 +27431,7 @@ CoreTestingModule.decorators = [
|
|
|
27124
27431
|
imports: [
|
|
27125
27432
|
CommonModule,
|
|
27126
27433
|
TranslateModule.forChild(),
|
|
27127
|
-
RouterModule.forChild(routes),
|
|
27434
|
+
RouterModule.forChild(routes$5),
|
|
27128
27435
|
// Sub modules
|
|
27129
27436
|
TableTestingModule,
|
|
27130
27437
|
TextPopoverTestingModule
|
|
@@ -27144,5 +27451,5 @@ CoreTestingModule.decorators = [
|
|
|
27144
27451
|
* Generated bundle index. Do not edit.
|
|
27145
27452
|
*/
|
|
27146
27453
|
|
|
27147
|
-
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, AndroidOsEnvironment, 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, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, 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, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment,
|
|
27454
|
+
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, AndroidOsEnvironment, 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, CORE_TESTING_PAGES, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CoreTestingModule, 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, DragAndDropDirective, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, EvenPipe, FileResponse, FileService, FileSizePipe, FilesUtils, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, FormGetArrayPipe, FormGetControlPipe, FormGetGroupPipe, FormGetPipe, Fragments$1 as Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBadgeIconDirective, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialTestingModule, MathAbsPipe, MenuComponent, MenuItems, MenuService, Message, MessageFilter, MessageForm, MessageModal, MessageService, MessageTypeList, MessageTypes, 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, ReferentialFilter, ReferentialRef, ReferentialUtils, ReferentialValidatorService, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SHARED_MATERIAL_TESTING_PAGES, SHARED_TESTING_PAGES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedAsyncValidators, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBadgeIconModule, SharedMatBooleanModule, SharedMatChipsModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedTestsPage, SharedValidators, SocialErrorCodes, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrIncludesPipe, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, TableTestPage, TableTestingModule, TextForm, TextPopover, TextPopoverTestingModule, TextPopoverTestingPage, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UploadFile, UploadFileComponent, UploadFilePopover, UploadFileTestingModule, UploadFileTestingPage, UserEvent, UserEventFilter, UserEventFragments, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equals, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalse, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTrue, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isAndroid, isBlankString, isControlHasInput, isCordova, isEmptyArray, isIOS, isInputElement, isInstanceOf, isInt, isMobile, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilBoolean, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, isProgressEvent, isResponseEvent, isTouchUi, isWindows, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchMedia, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, testUserAgent, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitForTrue, waitIdle, waitWhilePending, ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh, AppIconComponent as ɵi, DateTestPage as ɵj, NumpadTestPage as ɵk, MatBadgeIconTestPage as ɵl, ToastTestingModule as ɵm, ToastTestingPage as ɵn };
|
|
27148
27455
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|