@sumaris-net/ngx-components 1.18.5 → 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 +786 -424
- 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 +7 -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/dates.js +3 -3
- 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/pipes/date-format.pipe.js +6 -3
- 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 +717 -407
- 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/shared/pipes/date-format.pipe.d.ts +3 -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;
|
|
@@ -1896,11 +1881,14 @@ class DateFormatPipe {
|
|
|
1896
1881
|
const date = isMoment(value) ? value : this.dateAdapter.parse(value, DATE_ISO_PATTERN);
|
|
1897
1882
|
return date && this.dateAdapter.format(date, pattern) || '';
|
|
1898
1883
|
}
|
|
1899
|
-
format(date,
|
|
1900
|
-
return this.dateAdapter.format(date,
|
|
1884
|
+
format(date, pattern) {
|
|
1885
|
+
return this.dateAdapter.format(date, pattern);
|
|
1886
|
+
}
|
|
1887
|
+
parse(value, parseFormat) {
|
|
1888
|
+
return isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
1901
1889
|
}
|
|
1902
1890
|
}
|
|
1903
|
-
DateFormatPipe.ɵprov =
|
|
1891
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1904
1892
|
DateFormatPipe.decorators = [
|
|
1905
1893
|
{ type: Pipe, args: [{
|
|
1906
1894
|
name: 'dateFormat'
|
|
@@ -1912,7 +1900,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1912
1900
|
{ type: TranslateService }
|
|
1913
1901
|
];
|
|
1914
1902
|
|
|
1915
|
-
const moment
|
|
1903
|
+
const moment = momentImported;
|
|
1916
1904
|
class DateDiffDurationPipe {
|
|
1917
1905
|
constructor(dateAdapter, translate) {
|
|
1918
1906
|
this.dateAdapter = dateAdapter;
|
|
@@ -1928,17 +1916,17 @@ class DateDiffDurationPipe {
|
|
|
1928
1916
|
return this.format(startDate, endDate);
|
|
1929
1917
|
}
|
|
1930
1918
|
format(startDate, endDate) {
|
|
1931
|
-
const duration = moment
|
|
1919
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1932
1920
|
if (duration.asMinutes() < 0)
|
|
1933
1921
|
return '';
|
|
1934
|
-
const timeDuration = moment
|
|
1922
|
+
const timeDuration = moment(0)
|
|
1935
1923
|
.hour(duration.hours())
|
|
1936
1924
|
.minute(duration.minutes());
|
|
1937
1925
|
const days = Math.floor(duration.asDays());
|
|
1938
1926
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1939
1927
|
}
|
|
1940
1928
|
}
|
|
1941
|
-
DateDiffDurationPipe.ɵprov =
|
|
1929
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1942
1930
|
DateDiffDurationPipe.decorators = [
|
|
1943
1931
|
{ type: Pipe, args: [{
|
|
1944
1932
|
name: 'dateDiffDuration'
|
|
@@ -1959,7 +1947,7 @@ class DateFromNowPipe {
|
|
|
1959
1947
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1960
1948
|
}
|
|
1961
1949
|
}
|
|
1962
|
-
DateFromNowPipe.ɵprov =
|
|
1950
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1963
1951
|
DateFromNowPipe.decorators = [
|
|
1964
1952
|
{ type: Pipe, args: [{
|
|
1965
1953
|
name: 'dateFromNow'
|
|
@@ -2028,7 +2016,7 @@ function formatToDD(value, opts) {
|
|
|
2028
2016
|
value *= -1;
|
|
2029
2017
|
}
|
|
2030
2018
|
}
|
|
2031
|
-
let degrees = roundFloat
|
|
2019
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2032
2020
|
// Add sign
|
|
2033
2021
|
let sign = negative ? '-' : '+';
|
|
2034
2022
|
if (opts.placeholderChar) {
|
|
@@ -2079,7 +2067,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
2079
2067
|
}
|
|
2080
2068
|
let degrees = Math.trunc(value);
|
|
2081
2069
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
2082
|
-
let seconds = roundFloat
|
|
2070
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2083
2071
|
while (seconds >= 60) {
|
|
2084
2072
|
seconds -= 60;
|
|
2085
2073
|
minutes += 1;
|
|
@@ -2147,7 +2135,7 @@ function formatToDDMM(value, opts) {
|
|
|
2147
2135
|
}
|
|
2148
2136
|
}
|
|
2149
2137
|
let degrees = Math.trunc(value);
|
|
2150
|
-
let minutes = roundFloat
|
|
2138
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2151
2139
|
while (minutes >= 60) {
|
|
2152
2140
|
minutes -= 60;
|
|
2153
2141
|
degrees += 1;
|
|
@@ -2198,15 +2186,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
2198
2186
|
return NaN;
|
|
2199
2187
|
}
|
|
2200
2188
|
if (pattern === 'DD')
|
|
2201
|
-
return roundFloat
|
|
2189
|
+
return roundFloat(degrees, maxDecimals);
|
|
2202
2190
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2203
2191
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2204
2192
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2205
2193
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2206
2194
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2207
|
-
return roundFloat
|
|
2195
|
+
return roundFloat(degrees, maxDecimals);
|
|
2208
2196
|
}
|
|
2209
|
-
function roundFloat
|
|
2197
|
+
function roundFloat(input, maxDecimals) {
|
|
2210
2198
|
if (maxDecimals > 0) {
|
|
2211
2199
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
2212
2200
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2226,7 +2214,7 @@ class LatLongFormatPipe {
|
|
|
2226
2214
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
2227
2215
|
}
|
|
2228
2216
|
}
|
|
2229
|
-
LatLongFormatPipe.ɵprov =
|
|
2217
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2230
2218
|
LatLongFormatPipe.decorators = [
|
|
2231
2219
|
{ type: Pipe, args: [{
|
|
2232
2220
|
name: 'latLongFormat'
|
|
@@ -2238,7 +2226,7 @@ class LatitudeFormatPipe {
|
|
|
2238
2226
|
this.transform = formatLatitude;
|
|
2239
2227
|
}
|
|
2240
2228
|
}
|
|
2241
|
-
LatitudeFormatPipe.ɵprov =
|
|
2229
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2242
2230
|
LatitudeFormatPipe.decorators = [
|
|
2243
2231
|
{ type: Pipe, args: [{
|
|
2244
2232
|
name: 'latitudeFormat'
|
|
@@ -2250,7 +2238,7 @@ class LongitudeFormatPipe {
|
|
|
2250
2238
|
this.transform = formatLongitude;
|
|
2251
2239
|
}
|
|
2252
2240
|
}
|
|
2253
|
-
LongitudeFormatPipe.ɵprov =
|
|
2241
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2254
2242
|
LongitudeFormatPipe.decorators = [
|
|
2255
2243
|
{ type: Pipe, args: [{
|
|
2256
2244
|
name: 'longitudeFormat'
|
|
@@ -2270,7 +2258,7 @@ class NumberFormatPipe {
|
|
|
2270
2258
|
}
|
|
2271
2259
|
}
|
|
2272
2260
|
}
|
|
2273
|
-
NumberFormatPipe.ɵprov =
|
|
2261
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2274
2262
|
NumberFormatPipe.decorators = [
|
|
2275
2263
|
{ type: Pipe, args: [{
|
|
2276
2264
|
name: 'numberFormat'
|
|
@@ -2310,7 +2298,7 @@ class HighlightPipe {
|
|
|
2310
2298
|
}
|
|
2311
2299
|
}
|
|
2312
2300
|
}
|
|
2313
|
-
HighlightPipe.ɵprov =
|
|
2301
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2314
2302
|
HighlightPipe.decorators = [
|
|
2315
2303
|
{ type: Pipe, args: [{
|
|
2316
2304
|
name: 'highlight'
|
|
@@ -2375,7 +2363,7 @@ FileSizePipe.decorators = [
|
|
|
2375
2363
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2376
2364
|
];
|
|
2377
2365
|
|
|
2378
|
-
const moment$
|
|
2366
|
+
const moment$1 = momentImported;
|
|
2379
2367
|
const tz = momentTZImported;
|
|
2380
2368
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2381
2369
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2386,10 +2374,10 @@ class DateUtils {
|
|
|
2386
2374
|
this.toDuration = toDuration;
|
|
2387
2375
|
}
|
|
2388
2376
|
static min(date1, date2) {
|
|
2389
|
-
return date1 && date2
|
|
2377
|
+
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2390
2378
|
}
|
|
2391
2379
|
static max(date1, date2) {
|
|
2392
|
-
return
|
|
2380
|
+
return date1 && (!date2 || date1.isSameOrAfter(date2)) ? date1 : date2;
|
|
2393
2381
|
}
|
|
2394
2382
|
static equals(date1, date2) {
|
|
2395
2383
|
return DateUtils.isSame(date1, date2);
|
|
@@ -2452,32 +2440,32 @@ function fromDateISOString(value) {
|
|
|
2452
2440
|
if (!value || isMoment(value))
|
|
2453
2441
|
return value;
|
|
2454
2442
|
// Parse the input value, as a ISO date time
|
|
2455
|
-
const date = moment$
|
|
2443
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2456
2444
|
if (date.isValid())
|
|
2457
2445
|
return date;
|
|
2458
2446
|
// Not valid: trying to convert from unix timestamp
|
|
2459
2447
|
if (typeof value === 'string') {
|
|
2460
2448
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2461
2449
|
if (value.length === 10) {
|
|
2462
|
-
return moment$
|
|
2450
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2463
2451
|
}
|
|
2464
2452
|
else if (value.length === 13) {
|
|
2465
|
-
return moment$
|
|
2453
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2466
2454
|
}
|
|
2467
2455
|
}
|
|
2468
2456
|
console.warn('Unable to parse date: ' + value);
|
|
2469
2457
|
return undefined;
|
|
2470
2458
|
}
|
|
2471
2459
|
function fromUnixTimestamp(timeInSec) {
|
|
2472
|
-
return moment$
|
|
2460
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2473
2461
|
}
|
|
2474
2462
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2475
|
-
return moment$
|
|
2463
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2476
2464
|
}
|
|
2477
2465
|
function toDuration(value, unit) {
|
|
2478
2466
|
if (!value)
|
|
2479
2467
|
return undefined;
|
|
2480
|
-
const duration = moment$
|
|
2468
|
+
const duration = moment$1.duration(value, unit);
|
|
2481
2469
|
// fix 990+ ms
|
|
2482
2470
|
if (duration.milliseconds() >= 990) {
|
|
2483
2471
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2506,7 +2494,7 @@ class DurationPipe {
|
|
|
2506
2494
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2507
2495
|
}
|
|
2508
2496
|
}
|
|
2509
|
-
DurationPipe.ɵprov =
|
|
2497
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2510
2498
|
DurationPipe.decorators = [
|
|
2511
2499
|
{ type: Pipe, args: [{
|
|
2512
2500
|
name: 'duration'
|
|
@@ -2527,7 +2515,7 @@ class MathAbsPipe {
|
|
|
2527
2515
|
}
|
|
2528
2516
|
}
|
|
2529
2517
|
}
|
|
2530
|
-
MathAbsPipe.ɵprov =
|
|
2518
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2531
2519
|
MathAbsPipe.decorators = [
|
|
2532
2520
|
{ type: Pipe, args: [{
|
|
2533
2521
|
name: 'mathAbs'
|
|
@@ -2539,7 +2527,7 @@ class EvenPipe {
|
|
|
2539
2527
|
return val % 2 === 0;
|
|
2540
2528
|
}
|
|
2541
2529
|
}
|
|
2542
|
-
EvenPipe.ɵprov =
|
|
2530
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2543
2531
|
EvenPipe.decorators = [
|
|
2544
2532
|
{ type: Pipe, args: [{
|
|
2545
2533
|
name: 'even'
|
|
@@ -2551,7 +2539,7 @@ class OddPipe {
|
|
|
2551
2539
|
return val % 2 !== 0;
|
|
2552
2540
|
}
|
|
2553
2541
|
}
|
|
2554
|
-
OddPipe.ɵprov =
|
|
2542
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2555
2543
|
OddPipe.decorators = [
|
|
2556
2544
|
{ type: Pipe, args: [{
|
|
2557
2545
|
name: 'odd'
|
|
@@ -2659,7 +2647,7 @@ class MapGetPipe {
|
|
|
2659
2647
|
return val[key];
|
|
2660
2648
|
}
|
|
2661
2649
|
}
|
|
2662
|
-
MapGetPipe.ɵprov =
|
|
2650
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2663
2651
|
MapGetPipe.decorators = [
|
|
2664
2652
|
{ type: Pipe, args: [{
|
|
2665
2653
|
name: 'mapGet'
|
|
@@ -2673,7 +2661,7 @@ class MapKeysPipe {
|
|
|
2673
2661
|
return Object.keys(map);
|
|
2674
2662
|
}
|
|
2675
2663
|
}
|
|
2676
|
-
MapKeysPipe.ɵprov =
|
|
2664
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2677
2665
|
MapKeysPipe.decorators = [
|
|
2678
2666
|
{ type: Pipe, args: [{
|
|
2679
2667
|
name: 'mapKeys'
|
|
@@ -2687,7 +2675,7 @@ class MapValuesPipe {
|
|
|
2687
2675
|
return Object.values(map);
|
|
2688
2676
|
}
|
|
2689
2677
|
}
|
|
2690
|
-
MapValuesPipe.ɵprov =
|
|
2678
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2691
2679
|
MapValuesPipe.decorators = [
|
|
2692
2680
|
{ type: Pipe, args: [{
|
|
2693
2681
|
name: 'mapValues'
|
|
@@ -2700,7 +2688,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2700
2688
|
return isNotNilOrBlank(value);
|
|
2701
2689
|
}
|
|
2702
2690
|
}
|
|
2703
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2691
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2704
2692
|
IsNotNilOrBlankPipe.decorators = [
|
|
2705
2693
|
{ type: Pipe, args: [{
|
|
2706
2694
|
name: 'isNotNilOrBlank'
|
|
@@ -2712,7 +2700,7 @@ class IsNilOrBlankPipe {
|
|
|
2712
2700
|
return isNilOrBlank(value);
|
|
2713
2701
|
}
|
|
2714
2702
|
}
|
|
2715
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2703
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2716
2704
|
IsNilOrBlankPipe.decorators = [
|
|
2717
2705
|
{ type: Pipe, args: [{
|
|
2718
2706
|
name: 'isNilOrBlank'
|
|
@@ -2724,7 +2712,7 @@ class ToStringPipe {
|
|
|
2724
2712
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2725
2713
|
}
|
|
2726
2714
|
}
|
|
2727
|
-
ToStringPipe.ɵprov =
|
|
2715
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2728
2716
|
ToStringPipe.decorators = [
|
|
2729
2717
|
{ type: Pipe, args: [{
|
|
2730
2718
|
name: 'toString'
|
|
@@ -2736,7 +2724,7 @@ class StrLengthPipe {
|
|
|
2736
2724
|
return value && value.length || 0;
|
|
2737
2725
|
}
|
|
2738
2726
|
}
|
|
2739
|
-
StrLengthPipe.ɵprov =
|
|
2727
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2740
2728
|
StrLengthPipe.decorators = [
|
|
2741
2729
|
{ type: Pipe, args: [{
|
|
2742
2730
|
name: 'strLength'
|
|
@@ -2748,7 +2736,7 @@ class StrIncludesPipe {
|
|
|
2748
2736
|
return (value === null || value === void 0 ? void 0 : value.includes(searchString, position)) || false;
|
|
2749
2737
|
}
|
|
2750
2738
|
}
|
|
2751
|
-
StrIncludesPipe.ɵprov =
|
|
2739
|
+
StrIncludesPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
|
|
2752
2740
|
StrIncludesPipe.decorators = [
|
|
2753
2741
|
{ type: Pipe, args: [{
|
|
2754
2742
|
name: 'strIncludes'
|
|
@@ -2825,7 +2813,7 @@ class TranslateContextService {
|
|
|
2825
2813
|
return translations[keys[keys.length - 1]]; // Return the last keys translation
|
|
2826
2814
|
}
|
|
2827
2815
|
}
|
|
2828
|
-
TranslateContextService.ɵprov =
|
|
2816
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2829
2817
|
TranslateContextService.decorators = [
|
|
2830
2818
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2831
2819
|
];
|
|
@@ -2875,7 +2863,7 @@ class PropertyGetPipe {
|
|
|
2875
2863
|
args && args.defaultValue);
|
|
2876
2864
|
}
|
|
2877
2865
|
}
|
|
2878
|
-
PropertyGetPipe.ɵprov =
|
|
2866
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2879
2867
|
PropertyGetPipe.decorators = [
|
|
2880
2868
|
{ type: Pipe, args: [{
|
|
2881
2869
|
name: 'propertyGet'
|
|
@@ -2900,7 +2888,7 @@ NgInitDirective.propDecorators = {
|
|
|
2900
2888
|
ngInit: [{ type: Output }]
|
|
2901
2889
|
};
|
|
2902
2890
|
|
|
2903
|
-
const moment$
|
|
2891
|
+
const moment$2 = momentImported;
|
|
2904
2892
|
// @dynamic
|
|
2905
2893
|
class SharedValidators {
|
|
2906
2894
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2981,7 +2969,7 @@ class SharedValidators {
|
|
|
2981
2969
|
}
|
|
2982
2970
|
static validDate(control) {
|
|
2983
2971
|
const value = control.value;
|
|
2984
|
-
const date = !value || moment$
|
|
2972
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(value, DATE_ISO_PATTERN);
|
|
2985
2973
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2986
2974
|
return { validDate: true };
|
|
2987
2975
|
}
|
|
@@ -4093,7 +4081,7 @@ class FormErrorTranslator {
|
|
|
4093
4081
|
return errorKey;
|
|
4094
4082
|
}
|
|
4095
4083
|
}
|
|
4096
|
-
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" });
|
|
4097
4085
|
FormErrorTranslator.decorators = [
|
|
4098
4086
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
4099
4087
|
];
|
|
@@ -4173,7 +4161,7 @@ class FormGetPipe {
|
|
|
4173
4161
|
return form.get(path);
|
|
4174
4162
|
}
|
|
4175
4163
|
}
|
|
4176
|
-
FormGetPipe.ɵprov =
|
|
4164
|
+
FormGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4177
4165
|
FormGetPipe.decorators = [
|
|
4178
4166
|
{ type: Pipe, args: [{
|
|
4179
4167
|
name: 'formGet'
|
|
@@ -4185,7 +4173,7 @@ class FormGetControlPipe {
|
|
|
4185
4173
|
return form.get(path);
|
|
4186
4174
|
}
|
|
4187
4175
|
}
|
|
4188
|
-
FormGetControlPipe.ɵprov =
|
|
4176
|
+
FormGetControlPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4189
4177
|
FormGetControlPipe.decorators = [
|
|
4190
4178
|
{ type: Pipe, args: [{
|
|
4191
4179
|
name: 'formGetControl'
|
|
@@ -4197,7 +4185,7 @@ class FormGetArrayPipe {
|
|
|
4197
4185
|
return form.get(path);
|
|
4198
4186
|
}
|
|
4199
4187
|
}
|
|
4200
|
-
FormGetArrayPipe.ɵprov =
|
|
4188
|
+
FormGetArrayPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4201
4189
|
FormGetArrayPipe.decorators = [
|
|
4202
4190
|
{ type: Pipe, args: [{
|
|
4203
4191
|
name: 'formGetArray'
|
|
@@ -4209,7 +4197,7 @@ class FormGetGroupPipe {
|
|
|
4209
4197
|
return form.get(path);
|
|
4210
4198
|
}
|
|
4211
4199
|
}
|
|
4212
|
-
FormGetGroupPipe.ɵprov =
|
|
4200
|
+
FormGetGroupPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4213
4201
|
FormGetGroupPipe.decorators = [
|
|
4214
4202
|
{ type: Pipe, args: [{
|
|
4215
4203
|
name: 'formGetGroup'
|
|
@@ -4538,9 +4526,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4538
4526
|
const hour = parseInt(durationParts[0] || '0');
|
|
4539
4527
|
const minute = parseInt(durationParts[1] || '0');
|
|
4540
4528
|
const value = hour + (minute + 0.5) / 60;
|
|
4541
|
-
return roundFloat(value, maxDecimals);
|
|
4529
|
+
return roundFloat$1(value, maxDecimals);
|
|
4542
4530
|
}
|
|
4543
|
-
function roundFloat(input, maxDecimals) {
|
|
4531
|
+
function roundFloat$1(input, maxDecimals) {
|
|
4544
4532
|
if (maxDecimals > 0) {
|
|
4545
4533
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4546
4534
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4564,17 +4552,17 @@ const MASKS = {
|
|
|
4564
4552
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4565
4553
|
}
|
|
4566
4554
|
};
|
|
4567
|
-
const noop$
|
|
4555
|
+
const noop$1 = () => {
|
|
4568
4556
|
};
|
|
4569
|
-
const ɵ0$
|
|
4557
|
+
const ɵ0$2 = noop$1;
|
|
4570
4558
|
class MatLatLongField {
|
|
4571
4559
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
4572
4560
|
this.translate = translate;
|
|
4573
4561
|
this.formBuilder = formBuilder;
|
|
4574
4562
|
this.cd = cd;
|
|
4575
4563
|
this.formGroupDir = formGroupDir;
|
|
4576
|
-
this._onChangeCallback = noop$
|
|
4577
|
-
this._onTouchedCallback = noop$
|
|
4564
|
+
this._onChangeCallback = noop$1;
|
|
4565
|
+
this._onTouchedCallback = noop$1;
|
|
4578
4566
|
this._subscription = new Subscription();
|
|
4579
4567
|
this.disabling = false;
|
|
4580
4568
|
this.writing = false;
|
|
@@ -4910,14 +4898,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4910
4898
|
},] }
|
|
4911
4899
|
];
|
|
4912
4900
|
|
|
4913
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
4901
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
4914
4902
|
provide: NG_VALUE_ACCESSOR,
|
|
4915
4903
|
useExisting: forwardRef(() => MatDate),
|
|
4916
4904
|
multi: true
|
|
4917
4905
|
};
|
|
4918
|
-
const
|
|
4919
|
-
const noop$
|
|
4920
|
-
const ɵ0$
|
|
4906
|
+
const TEXT_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4907
|
+
const noop$2 = () => { };
|
|
4908
|
+
const ɵ0$3 = noop$2;
|
|
4921
4909
|
class MatDate {
|
|
4922
4910
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4923
4911
|
this.dateAdapter = dateAdapter;
|
|
@@ -4926,13 +4914,13 @@ class MatDate {
|
|
|
4926
4914
|
this.cd = cd;
|
|
4927
4915
|
this.keyboard = keyboard;
|
|
4928
4916
|
this.formGroupDir = formGroupDir;
|
|
4929
|
-
this._onChangeCallback = noop$
|
|
4930
|
-
this._onTouchedCallback = noop$
|
|
4917
|
+
this._onChangeCallback = noop$2;
|
|
4918
|
+
this._onTouchedCallback = noop$2;
|
|
4931
4919
|
this._subscription = new Subscription();
|
|
4932
4920
|
this._writing = true;
|
|
4933
4921
|
this._disabling = false;
|
|
4934
4922
|
this._readonly = false;
|
|
4935
|
-
this.
|
|
4923
|
+
this.mask = TEXT_MASK;
|
|
4936
4924
|
this.floatLabel = 'auto';
|
|
4937
4925
|
this.compact = false;
|
|
4938
4926
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4977,22 +4965,24 @@ class MatDate {
|
|
|
4977
4965
|
this.formControl.setValidators(this.required ? [this.formControl.validator, Validators.required, SharedValidators.validDate] :
|
|
4978
4966
|
[this.formControl.validator, SharedValidators.validDate]);
|
|
4979
4967
|
}
|
|
4980
|
-
// Create the
|
|
4981
|
-
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);
|
|
4982
4972
|
// Get patterns to display date
|
|
4983
4973
|
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
4984
4974
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
4985
4975
|
.subscribe((pattern) => this.updatePattern(pattern)));
|
|
4986
|
-
this._subscription.add(this.
|
|
4976
|
+
this._subscription.add(this.textControl.valueChanges
|
|
4987
4977
|
.subscribe((value) => this.onFormChange(value)));
|
|
4988
4978
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
4989
4979
|
this._subscription.add(this.formControl.statusChanges
|
|
4990
4980
|
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
4991
4981
|
)
|
|
4992
4982
|
.subscribe(() => {
|
|
4993
|
-
this.
|
|
4994
|
-
if (this.formControl.touched && !this.
|
|
4995
|
-
this.
|
|
4983
|
+
this.textControl.updateValueAndValidity({ emitEvent: false });
|
|
4984
|
+
if (this.formControl.touched && !this.textControl.touched) {
|
|
4985
|
+
this.textControl.markAsTouched();
|
|
4996
4986
|
}
|
|
4997
4987
|
this.markForCheck();
|
|
4998
4988
|
}));
|
|
@@ -5008,27 +4998,25 @@ class MatDate {
|
|
|
5008
4998
|
this._writing = true;
|
|
5009
4999
|
// DEBUG
|
|
5010
5000
|
//console.debug("[mat-date] writeValue() with:", value);
|
|
5011
|
-
// Convert into date
|
|
5012
|
-
|
|
5001
|
+
// Convert into date
|
|
5002
|
+
// Important: do a clone()
|
|
5003
|
+
let date = isMoment(value) ? value.clone() : fromDateISOString(value);
|
|
5013
5004
|
if (!date || !date.isValid()) {
|
|
5014
|
-
this.
|
|
5005
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5015
5006
|
if (this.formControl.value) {
|
|
5016
5007
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5017
5008
|
this._onChangeCallback(null);
|
|
5018
5009
|
}
|
|
5019
5010
|
}
|
|
5020
5011
|
else {
|
|
5021
|
-
//
|
|
5022
|
-
|
|
5023
|
-
//
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
if (this.dayControl.value !== dayStr) {
|
|
5030
|
-
// Update control
|
|
5031
|
-
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 });
|
|
5032
5020
|
}
|
|
5033
5021
|
}
|
|
5034
5022
|
this._writing = false;
|
|
@@ -5045,10 +5033,10 @@ class MatDate {
|
|
|
5045
5033
|
return;
|
|
5046
5034
|
this._disabling = true;
|
|
5047
5035
|
if (isDisabled) {
|
|
5048
|
-
this.
|
|
5036
|
+
this.textControl.disable({ emitEvent: false });
|
|
5049
5037
|
}
|
|
5050
5038
|
else {
|
|
5051
|
-
this.
|
|
5039
|
+
this.textControl.enable({ emitEvent: false });
|
|
5052
5040
|
}
|
|
5053
5041
|
this._disabling = false;
|
|
5054
5042
|
this.markForCheck();
|
|
@@ -5065,12 +5053,12 @@ class MatDate {
|
|
|
5065
5053
|
.locale(this.locale) // set as time as locale time
|
|
5066
5054
|
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5067
5055
|
.utc(true);
|
|
5068
|
-
dateStr = this.dateAdapter.format(date, this.
|
|
5056
|
+
dateStr = this.dateAdapter.format(date, this.datePattern) || null;
|
|
5069
5057
|
}
|
|
5070
|
-
if (this.
|
|
5058
|
+
if (this.textControl.value !== dateStr) {
|
|
5071
5059
|
// DEBUG
|
|
5072
5060
|
//console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5073
|
-
this.
|
|
5061
|
+
this.textControl.setValue(dateStr, {
|
|
5074
5062
|
emitEvent: true // Will call onFormChange
|
|
5075
5063
|
});
|
|
5076
5064
|
}
|
|
@@ -5115,7 +5103,7 @@ class MatDate {
|
|
|
5115
5103
|
});
|
|
5116
5104
|
}
|
|
5117
5105
|
clear() {
|
|
5118
|
-
this.
|
|
5106
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5119
5107
|
this.formControl.setValue(null, { emitEvent: false });
|
|
5120
5108
|
this._onChangeCallback(null);
|
|
5121
5109
|
this.markAsTouched();
|
|
@@ -5124,43 +5112,70 @@ class MatDate {
|
|
|
5124
5112
|
/* -- private method -- */
|
|
5125
5113
|
updatePattern(pattern) {
|
|
5126
5114
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5127
|
-
if (this.
|
|
5128
|
-
this.
|
|
5129
|
-
this.dayPattern = pattern;
|
|
5115
|
+
if (this.datePattern !== pattern) {
|
|
5116
|
+
this.datePattern = pattern;
|
|
5130
5117
|
this.markForCheck();
|
|
5131
5118
|
}
|
|
5132
5119
|
}
|
|
5133
5120
|
checkIfTouched(opts) {
|
|
5134
|
-
if (this.
|
|
5121
|
+
if (this.textControl.touched) {
|
|
5135
5122
|
this._onTouchedCallback();
|
|
5136
5123
|
if (!opts || opts.emitEvent !== false) {
|
|
5137
5124
|
this.markForCheck();
|
|
5138
5125
|
}
|
|
5139
5126
|
}
|
|
5140
5127
|
}
|
|
5141
|
-
onFormChange(
|
|
5128
|
+
onFormChange(value) {
|
|
5142
5129
|
if (this._writing)
|
|
5143
5130
|
return; // Skip if call by self
|
|
5144
5131
|
this._writing = true;
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
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');
|
|
5155
5153
|
}
|
|
5156
|
-
// Parse
|
|
5157
|
-
let
|
|
5154
|
+
// Parse date (strict = false)
|
|
5155
|
+
let date = isNotNilOrBlank(value) && this.dateAdapter.parse(value, this.datePattern) || null;
|
|
5158
5156
|
// Move to the expected TZ, and keep the local hour (= midnight) to have midnight at local time
|
|
5159
|
-
|
|
5160
|
-
|
|
5157
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date) || null;
|
|
5158
|
+
date = date && date
|
|
5161
5159
|
.startOf('day') // Reset hour
|
|
5162
|
-
.utc()
|
|
5163
|
-
|
|
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();
|
|
5164
5179
|
this._writing = false;
|
|
5165
5180
|
}
|
|
5166
5181
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
@@ -5177,21 +5192,6 @@ class MatDate {
|
|
|
5177
5192
|
}
|
|
5178
5193
|
});
|
|
5179
5194
|
}
|
|
5180
|
-
emitChange(value) {
|
|
5181
|
-
// Get the model value
|
|
5182
|
-
const dateStr = toDateISOString(value) || null;
|
|
5183
|
-
if (this.formControl.value !== dateStr) {
|
|
5184
|
-
// DEBUG
|
|
5185
|
-
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5186
|
-
// Apply to form control. => Will call writeValue()
|
|
5187
|
-
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5188
|
-
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5189
|
-
// Changes comes from inside function: use the callback
|
|
5190
|
-
this._onChangeCallback(dateStr);
|
|
5191
|
-
// Check if need to update controls
|
|
5192
|
-
this.checkIfTouched();
|
|
5193
|
-
}
|
|
5194
|
-
}
|
|
5195
5195
|
updateTabIndex() {
|
|
5196
5196
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
5197
5197
|
return; // skip
|
|
@@ -5204,7 +5204,7 @@ class MatDate {
|
|
|
5204
5204
|
});
|
|
5205
5205
|
}
|
|
5206
5206
|
markAsTouched(opts) {
|
|
5207
|
-
this.
|
|
5207
|
+
this.textControl.markAsTouched(opts);
|
|
5208
5208
|
this._onTouchedCallback();
|
|
5209
5209
|
this.markForCheck();
|
|
5210
5210
|
}
|
|
@@ -5218,16 +5218,16 @@ class MatDate {
|
|
|
5218
5218
|
MatDate.decorators = [
|
|
5219
5219
|
{ type: Component, args: [{
|
|
5220
5220
|
selector: 'mat-date-field',
|
|
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:
|
|
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",
|
|
5222
5222
|
providers: [
|
|
5223
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5223
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5224
5224
|
],
|
|
5225
5225
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5226
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%}"]
|
|
5227
5227
|
},] }
|
|
5228
5228
|
];
|
|
5229
5229
|
MatDate.ctorParameters = () => [
|
|
5230
|
-
{ type:
|
|
5230
|
+
{ type: MomentDateAdapter },
|
|
5231
5231
|
{ type: TranslateService },
|
|
5232
5232
|
{ type: FormBuilder },
|
|
5233
5233
|
{ type: ChangeDetectorRef },
|
|
@@ -5254,16 +5254,16 @@ MatDate.propDecorators = {
|
|
|
5254
5254
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5255
5255
|
};
|
|
5256
5256
|
|
|
5257
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5257
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5258
5258
|
provide: NG_VALUE_ACCESSOR,
|
|
5259
5259
|
useExisting: forwardRef(() => MatDateTime),
|
|
5260
5260
|
multi: true
|
|
5261
5261
|
};
|
|
5262
|
-
const DAY_MASK
|
|
5262
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5263
5263
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5264
|
-
const HOUR_MASK
|
|
5265
|
-
const noop$
|
|
5266
|
-
const ɵ0$
|
|
5264
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5265
|
+
const noop$3 = () => { };
|
|
5266
|
+
const ɵ0$4 = noop$3;
|
|
5267
5267
|
class MatDateTime {
|
|
5268
5268
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5269
5269
|
this.dateAdapter = dateAdapter;
|
|
@@ -5272,14 +5272,14 @@ class MatDateTime {
|
|
|
5272
5272
|
this.cd = cd;
|
|
5273
5273
|
this.keyboard = keyboard;
|
|
5274
5274
|
this.formGroupDir = formGroupDir;
|
|
5275
|
-
this._onChangeCallback = noop$
|
|
5276
|
-
this._onTouchedCallback = noop$
|
|
5275
|
+
this._onChangeCallback = noop$3;
|
|
5276
|
+
this._onTouchedCallback = noop$3;
|
|
5277
5277
|
this._subscription = new Subscription();
|
|
5278
5278
|
this._writing = true;
|
|
5279
5279
|
this._disabling = false;
|
|
5280
5280
|
this._readonly = false;
|
|
5281
|
-
this.dayMask = DAY_MASK
|
|
5282
|
-
this.hourMask = HOUR_MASK
|
|
5281
|
+
this.dayMask = DAY_MASK;
|
|
5282
|
+
this.hourMask = HOUR_MASK;
|
|
5283
5283
|
this.floatLabel = 'auto';
|
|
5284
5284
|
this.compact = false;
|
|
5285
5285
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5593,14 +5593,14 @@ MatDateTime.decorators = [
|
|
|
5593
5593
|
selector: 'mat-date-time-field',
|
|
5594
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",
|
|
5595
5595
|
providers: [
|
|
5596
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5596
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
5597
5597
|
],
|
|
5598
5598
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5599
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%}"]
|
|
5600
5600
|
},] }
|
|
5601
5601
|
];
|
|
5602
5602
|
MatDateTime.ctorParameters = () => [
|
|
5603
|
-
{ type:
|
|
5603
|
+
{ type: MomentDateAdapter },
|
|
5604
5604
|
{ type: TranslateService },
|
|
5605
5605
|
{ type: FormBuilder },
|
|
5606
5606
|
{ type: ChangeDetectorRef },
|
|
@@ -5627,15 +5627,15 @@ MatDateTime.propDecorators = {
|
|
|
5627
5627
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5628
5628
|
};
|
|
5629
5629
|
|
|
5630
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5630
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5631
5631
|
provide: NG_VALUE_ACCESSOR,
|
|
5632
5632
|
useExisting: forwardRef(() => MatDateShort),
|
|
5633
5633
|
multi: true
|
|
5634
5634
|
};
|
|
5635
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5635
|
+
const DAY_MASK$1 = [/\d/, /\d/, /\d/, /\d/];
|
|
5636
5636
|
const noop$4 = () => {
|
|
5637
5637
|
};
|
|
5638
|
-
const ɵ0$
|
|
5638
|
+
const ɵ0$5 = noop$4;
|
|
5639
5639
|
class MatDateShort {
|
|
5640
5640
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5641
5641
|
this.dateAdapter = dateAdapter;
|
|
@@ -5648,7 +5648,7 @@ class MatDateShort {
|
|
|
5648
5648
|
this._onTouchedCallback = noop$4;
|
|
5649
5649
|
this.writing = true;
|
|
5650
5650
|
this.disabling = false;
|
|
5651
|
-
this.dayMask = DAY_MASK;
|
|
5651
|
+
this.dayMask = DAY_MASK$1;
|
|
5652
5652
|
this.disabled = false;
|
|
5653
5653
|
this.floatLabel = 'auto';
|
|
5654
5654
|
this.readonly = false;
|
|
@@ -5893,7 +5893,7 @@ MatDateShort.decorators = [
|
|
|
5893
5893
|
selector: 'mat-date-short-field',
|
|
5894
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",
|
|
5895
5895
|
providers: [
|
|
5896
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5896
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5897
5897
|
],
|
|
5898
5898
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5899
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%}"]
|
|
@@ -5961,16 +5961,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5961
5961
|
},] }
|
|
5962
5962
|
];
|
|
5963
5963
|
|
|
5964
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5964
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5965
5965
|
provide: NG_VALUE_ACCESSOR,
|
|
5966
5966
|
useExisting: forwardRef(() => MatDuration),
|
|
5967
5967
|
multi: true
|
|
5968
5968
|
};
|
|
5969
5969
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5970
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5971
|
-
const noop$
|
|
5970
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5971
|
+
const noop$5 = () => {
|
|
5972
5972
|
};
|
|
5973
|
-
const ɵ0$6 = noop$
|
|
5973
|
+
const ɵ0$6 = noop$5;
|
|
5974
5974
|
class MatDuration {
|
|
5975
5975
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5976
5976
|
this.dateAdapter = dateAdapter;
|
|
@@ -5979,11 +5979,11 @@ class MatDuration {
|
|
|
5979
5979
|
this.cd = cd;
|
|
5980
5980
|
this.formGroupDir = formGroupDir;
|
|
5981
5981
|
this._subscription = new Subscription();
|
|
5982
|
-
this._onChangeCallback = noop$
|
|
5983
|
-
this._onTouchedCallback = noop$
|
|
5982
|
+
this._onChangeCallback = noop$5;
|
|
5983
|
+
this._onTouchedCallback = noop$5;
|
|
5984
5984
|
this.writing = true;
|
|
5985
5985
|
this.disabling = false;
|
|
5986
|
-
this.hourMask = HOUR_MASK;
|
|
5986
|
+
this.hourMask = HOUR_MASK$1;
|
|
5987
5987
|
this.disabled = false;
|
|
5988
5988
|
this.floatLabel = 'auto';
|
|
5989
5989
|
this.readonly = false;
|
|
@@ -6163,7 +6163,7 @@ MatDuration.decorators = [
|
|
|
6163
6163
|
selector: 'mat-duration-field',
|
|
6164
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",
|
|
6165
6165
|
providers: [
|
|
6166
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6166
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6167
6167
|
],
|
|
6168
6168
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6169
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%}"]
|
|
@@ -6220,22 +6220,22 @@ SharedMatDurationModule.decorators = [
|
|
|
6220
6220
|
},] }
|
|
6221
6221
|
];
|
|
6222
6222
|
|
|
6223
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
6223
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6224
6224
|
provide: NG_VALUE_ACCESSOR,
|
|
6225
6225
|
useExisting: forwardRef(() => MatBooleanField),
|
|
6226
6226
|
multi: true
|
|
6227
6227
|
};
|
|
6228
|
-
const noop$
|
|
6228
|
+
const noop$6 = () => {
|
|
6229
6229
|
};
|
|
6230
|
-
const ɵ0$
|
|
6230
|
+
const ɵ0$7 = noop$6;
|
|
6231
6231
|
class MatBooleanField {
|
|
6232
6232
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
6233
6233
|
this.translate = translate;
|
|
6234
6234
|
this.formBuilder = formBuilder;
|
|
6235
6235
|
this.cd = cd;
|
|
6236
6236
|
this.formGroupDir = formGroupDir;
|
|
6237
|
-
this._onChangeCallback = noop$
|
|
6238
|
-
this._onTouchedCallback = noop$
|
|
6237
|
+
this._onChangeCallback = noop$6;
|
|
6238
|
+
this._onTouchedCallback = noop$6;
|
|
6239
6239
|
this._writing = false;
|
|
6240
6240
|
this.showRadio = false;
|
|
6241
6241
|
this.disabled = false;
|
|
@@ -6398,7 +6398,7 @@ MatBooleanField.decorators = [
|
|
|
6398
6398
|
selector: 'mat-boolean-field',
|
|
6399
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",
|
|
6400
6400
|
providers: [
|
|
6401
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6401
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
6402
6402
|
],
|
|
6403
6403
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6404
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}"]
|
|
@@ -6644,7 +6644,7 @@ class MatNumpadDomService {
|
|
|
6644
6644
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6645
6645
|
}
|
|
6646
6646
|
}
|
|
6647
|
-
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" });
|
|
6648
6648
|
MatNumpadDomService.decorators = [
|
|
6649
6649
|
{ type: Injectable, args: [{
|
|
6650
6650
|
providedIn: 'root'
|
|
@@ -7008,7 +7008,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
7008
7008
|
},] }
|
|
7009
7009
|
];
|
|
7010
7010
|
|
|
7011
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
7011
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7012
7012
|
provide: NG_VALUE_ACCESSOR,
|
|
7013
7013
|
useExisting: forwardRef(() => MatSwipeField),
|
|
7014
7014
|
multi: true
|
|
@@ -7271,7 +7271,7 @@ MatSwipeField.decorators = [
|
|
|
7271
7271
|
{ type: Component, args: [{
|
|
7272
7272
|
selector: 'mat-swipe-field',
|
|
7273
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",
|
|
7274
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
7274
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
7275
7275
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7276
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}"]
|
|
7277
7277
|
},] }
|
|
@@ -7329,14 +7329,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
7329
7329
|
},] }
|
|
7330
7330
|
];
|
|
7331
7331
|
|
|
7332
|
-
const noop$
|
|
7333
|
-
const ɵ0$
|
|
7332
|
+
const noop$7 = () => { };
|
|
7333
|
+
const ɵ0$8 = noop$7;
|
|
7334
7334
|
class MatChipsField {
|
|
7335
7335
|
constructor(cd, formGroupDir) {
|
|
7336
7336
|
this.cd = cd;
|
|
7337
7337
|
this.formGroupDir = formGroupDir;
|
|
7338
|
-
this._onChangeCallback = noop$
|
|
7339
|
-
this._onTouchedCallback = noop$
|
|
7338
|
+
this._onChangeCallback = noop$7;
|
|
7339
|
+
this._onTouchedCallback = noop$7;
|
|
7340
7340
|
this.logPrefix = '[mat-chips] ';
|
|
7341
7341
|
this.formControlName = null;
|
|
7342
7342
|
this.required = false;
|
|
@@ -8208,7 +8208,7 @@ class ProgressBarService {
|
|
|
8208
8208
|
}
|
|
8209
8209
|
}
|
|
8210
8210
|
}
|
|
8211
|
-
ProgressBarService.ɵprov =
|
|
8211
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
8212
8212
|
ProgressBarService.decorators = [
|
|
8213
8213
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8214
8214
|
];
|
|
@@ -8252,7 +8252,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
8252
8252
|
return mc;
|
|
8253
8253
|
}
|
|
8254
8254
|
}
|
|
8255
|
-
AppGestureConfig.ɵprov =
|
|
8255
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
8256
8256
|
AppGestureConfig.decorators = [
|
|
8257
8257
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8258
8258
|
];
|
|
@@ -8477,7 +8477,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
8477
8477
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
8478
8478
|
}
|
|
8479
8479
|
}
|
|
8480
|
-
MatPaginatorI18n.ɵprov =
|
|
8480
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
8481
8481
|
MatPaginatorI18n.decorators = [
|
|
8482
8482
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8483
8483
|
];
|
|
@@ -8567,17 +8567,17 @@ function getColorContrast(color, bw) {
|
|
|
8567
8567
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
8568
8568
|
}
|
|
8569
8569
|
|
|
8570
|
-
const noop = () => {
|
|
8570
|
+
const noop$8 = () => {
|
|
8571
8571
|
};
|
|
8572
|
-
const ɵ0$
|
|
8572
|
+
const ɵ0$9 = noop$8;
|
|
8573
8573
|
class AppFormField {
|
|
8574
8574
|
constructor(translate, cd, injector, formGroupDir) {
|
|
8575
8575
|
this.translate = translate;
|
|
8576
8576
|
this.cd = cd;
|
|
8577
8577
|
this.injector = injector;
|
|
8578
8578
|
this.formGroupDir = formGroupDir;
|
|
8579
|
-
this._onChangeCallback = noop;
|
|
8580
|
-
this._onTouchedCallback = noop;
|
|
8579
|
+
this._onChangeCallback = noop$8;
|
|
8580
|
+
this._onTouchedCallback = noop$8;
|
|
8581
8581
|
this.readonly = false;
|
|
8582
8582
|
this.compact = false;
|
|
8583
8583
|
this.floatLabel = 'auto';
|
|
@@ -9013,14 +9013,14 @@ class AudioProvider extends StartableService {
|
|
|
9013
9013
|
});
|
|
9014
9014
|
}
|
|
9015
9015
|
}
|
|
9016
|
-
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" });
|
|
9017
9017
|
AudioProvider.decorators = [
|
|
9018
9018
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9019
9019
|
];
|
|
9020
9020
|
AudioProvider.ctorParameters = () => [
|
|
9021
9021
|
{ type: Platform },
|
|
9022
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
9023
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
9022
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
9023
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
9024
9024
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
9025
9025
|
];
|
|
9026
9026
|
|
|
@@ -9105,7 +9105,7 @@ class Hotkeys {
|
|
|
9105
9105
|
});
|
|
9106
9106
|
}
|
|
9107
9107
|
}
|
|
9108
|
-
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" });
|
|
9109
9109
|
Hotkeys.decorators = [
|
|
9110
9110
|
{ type: Injectable, args: [{
|
|
9111
9111
|
providedIn: 'root'
|
|
@@ -9280,7 +9280,7 @@ class Base64ImageReader {
|
|
|
9280
9280
|
}
|
|
9281
9281
|
}
|
|
9282
9282
|
|
|
9283
|
-
const uuidv4
|
|
9283
|
+
const uuidv4 = uuidv4Imported;
|
|
9284
9284
|
class FileService {
|
|
9285
9285
|
constructor(platform,
|
|
9286
9286
|
//private transfer: FileTransfer,
|
|
@@ -9317,7 +9317,7 @@ class FileService {
|
|
|
9317
9317
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
9318
9318
|
if (lastSlashIndex === -1)
|
|
9319
9319
|
throw new Error('Invalid URL: ' + source);
|
|
9320
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
9320
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
9321
9321
|
// Download into the file system
|
|
9322
9322
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
9323
9323
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -9373,7 +9373,7 @@ class FileService {
|
|
|
9373
9373
|
this._started = true;
|
|
9374
9374
|
}
|
|
9375
9375
|
}
|
|
9376
|
-
FileService.ɵprov =
|
|
9376
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
9377
9377
|
FileService.decorators = [
|
|
9378
9378
|
{ type: Injectable, args: [{
|
|
9379
9379
|
providedIn: 'root',
|
|
@@ -9539,7 +9539,7 @@ class Base58 {
|
|
|
9539
9539
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9540
9540
|
|
|
9541
9541
|
const scrypt = require('scrypt-async');
|
|
9542
|
-
const sha256
|
|
9542
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
9543
9543
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
9544
9544
|
const nacl = {
|
|
9545
9545
|
sign,
|
|
@@ -9643,7 +9643,7 @@ class CryptoService {
|
|
|
9643
9643
|
* Hash (using SHA256) a message
|
|
9644
9644
|
*/
|
|
9645
9645
|
sha256(message) {
|
|
9646
|
-
return sha256
|
|
9646
|
+
return sha256().update(message).digest('hex');
|
|
9647
9647
|
}
|
|
9648
9648
|
/**
|
|
9649
9649
|
* Hash (using SHA512) a message
|
|
@@ -9656,7 +9656,7 @@ class CryptoService {
|
|
|
9656
9656
|
return nacl.util.encodeBase64(m);
|
|
9657
9657
|
}
|
|
9658
9658
|
}
|
|
9659
|
-
CryptoService.ɵprov =
|
|
9659
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9660
9660
|
CryptoService.decorators = [
|
|
9661
9661
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9662
9662
|
];
|
|
@@ -10416,7 +10416,7 @@ SelectPeerModal.propDecorators = {
|
|
|
10416
10416
|
onRefresh: [{ type: Input }]
|
|
10417
10417
|
};
|
|
10418
10418
|
|
|
10419
|
-
const moment$
|
|
10419
|
+
const moment$3 = momentImported;
|
|
10420
10420
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
10421
10421
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
10422
10422
|
// fixme: this constant points to static environment
|
|
@@ -10659,11 +10659,11 @@ class LocalSettingsService extends StartableService {
|
|
|
10659
10659
|
if (!feature) {
|
|
10660
10660
|
feature = {
|
|
10661
10661
|
name: featureName.toLowerCase(),
|
|
10662
|
-
lastSyncDate: moment$
|
|
10662
|
+
lastSyncDate: moment$3().toISOString()
|
|
10663
10663
|
};
|
|
10664
10664
|
}
|
|
10665
10665
|
else {
|
|
10666
|
-
feature.lastSyncDate = moment$
|
|
10666
|
+
feature.lastSyncDate = moment$3().toISOString();
|
|
10667
10667
|
}
|
|
10668
10668
|
this.saveOfflineFeature(feature);
|
|
10669
10669
|
}
|
|
@@ -10824,7 +10824,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10824
10824
|
if (!page || !page.title || !page.path)
|
|
10825
10825
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
10826
10826
|
// Set time
|
|
10827
|
-
page.time = page.time || moment$
|
|
10827
|
+
page.time = page.time || moment$3();
|
|
10828
10828
|
// Clean the title (remove <small> tags)
|
|
10829
10829
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
10830
10830
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -10840,18 +10840,18 @@ class LocalSettingsService extends StartableService {
|
|
|
10840
10840
|
return page;
|
|
10841
10841
|
}
|
|
10842
10842
|
}
|
|
10843
|
-
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" });
|
|
10844
10844
|
LocalSettingsService.decorators = [
|
|
10845
10845
|
{ type: Injectable, args: [{
|
|
10846
|
-
providedIn: 'root'
|
|
10847
|
-
deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10846
|
+
providedIn: 'root'
|
|
10847
|
+
//deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10848
10848
|
},] }
|
|
10849
10849
|
];
|
|
10850
10850
|
LocalSettingsService.ctorParameters = () => [
|
|
10851
10851
|
{ type: TranslateService },
|
|
10852
10852
|
{ type: Platform },
|
|
10853
10853
|
{ type: Storage },
|
|
10854
|
-
{ type:
|
|
10854
|
+
{ type: Environment, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10855
10855
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS,] }] },
|
|
10856
10856
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS_OPTIONS,] }] }
|
|
10857
10857
|
];
|
|
@@ -11557,7 +11557,7 @@ class NetworkService extends StartableService {
|
|
|
11557
11557
|
});
|
|
11558
11558
|
}
|
|
11559
11559
|
}
|
|
11560
|
-
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" });
|
|
11561
11561
|
NetworkService.decorators = [
|
|
11562
11562
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11563
11563
|
];
|
|
@@ -11568,16 +11568,16 @@ NetworkService.ctorParameters = () => [
|
|
|
11568
11568
|
{ type: CryptoService },
|
|
11569
11569
|
{ type: Storage },
|
|
11570
11570
|
{ type: LocalSettingsService },
|
|
11571
|
-
{ type: CacheService },
|
|
11571
|
+
{ type: CacheService$1 },
|
|
11572
11572
|
{ type: HttpClient },
|
|
11573
11573
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
11574
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
11575
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
11574
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
11575
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
11576
11576
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
11577
11577
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
11578
11578
|
];
|
|
11579
11579
|
|
|
11580
|
-
const ErrorCodes
|
|
11580
|
+
const ErrorCodes = {
|
|
11581
11581
|
UNKNOWN_ERROR: 0,
|
|
11582
11582
|
LOAD_ACCOUNT_ERROR: 1,
|
|
11583
11583
|
BAD_PASSWORD: 2,
|
|
@@ -11929,7 +11929,7 @@ class EntityStore {
|
|
|
11929
11929
|
}
|
|
11930
11930
|
catch (err) {
|
|
11931
11931
|
console.error(err);
|
|
11932
|
-
throw { code: ErrorCodes
|
|
11932
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11933
11933
|
}
|
|
11934
11934
|
}
|
|
11935
11935
|
// Emit update event
|
|
@@ -12503,7 +12503,7 @@ class EntitiesStorage extends StartableService {
|
|
|
12503
12503
|
}
|
|
12504
12504
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
12505
12505
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
12506
|
-
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" });
|
|
12507
12507
|
EntitiesStorage.decorators = [
|
|
12508
12508
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
12509
12509
|
];
|
|
@@ -12640,10 +12640,10 @@ function referentialToString(obj, properties) {
|
|
|
12640
12640
|
function referentialsToString(values, properties, separator) {
|
|
12641
12641
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12642
12642
|
}
|
|
12643
|
-
const ɵ0$
|
|
12643
|
+
const ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12644
12644
|
const StatusList = Object.freeze([
|
|
12645
12645
|
{
|
|
12646
|
-
id: ɵ0$
|
|
12646
|
+
id: ɵ0$a,
|
|
12647
12647
|
icon: 'checkmark',
|
|
12648
12648
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12649
12649
|
},
|
|
@@ -12918,7 +12918,7 @@ function accountToString(data) {
|
|
|
12918
12918
|
(data.lastName || '')) || '';
|
|
12919
12919
|
}
|
|
12920
12920
|
|
|
12921
|
-
const uuidv4 = uuidv4Imported;
|
|
12921
|
+
const uuidv4$1 = uuidv4Imported;
|
|
12922
12922
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12923
12923
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12924
12924
|
/**
|
|
@@ -12962,7 +12962,7 @@ function createTrackerLink(opts) {
|
|
|
12962
12962
|
// Skip if not tracked
|
|
12963
12963
|
if (!context || !context.tracked)
|
|
12964
12964
|
return forward(operation);
|
|
12965
|
-
const id = context.serializationKey || uuidv4();
|
|
12965
|
+
const id = context.serializationKey || uuidv4$1();
|
|
12966
12966
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12967
12967
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12968
12968
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -13625,7 +13625,7 @@ class GraphqlService extends StartableService {
|
|
|
13625
13625
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
13626
13626
|
|| this.toAppError(err.networkError)
|
|
13627
13627
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
13628
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
13628
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
13629
13629
|
// If graphQL: try to convert the first error found
|
|
13630
13630
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
13631
13631
|
|| this.toAppError(err)
|
|
@@ -13633,7 +13633,7 @@ class GraphqlService extends StartableService {
|
|
|
13633
13633
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
13634
13634
|
|| err;
|
|
13635
13635
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
13636
|
-
if (error && error.code === ErrorCodes
|
|
13636
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13637
13637
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
13638
13638
|
this.onNetworkError.next(error);
|
|
13639
13639
|
}
|
|
@@ -13669,7 +13669,7 @@ class GraphqlService extends StartableService {
|
|
|
13669
13669
|
return 'ERROR.UNAUTHORIZED';
|
|
13670
13670
|
case ServerErrorCodes.FORBIDDEN:
|
|
13671
13671
|
return 'ERROR.FORBIDDEN';
|
|
13672
|
-
case ErrorCodes
|
|
13672
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13673
13673
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13674
13674
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13675
13675
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13700,7 +13700,7 @@ class GraphqlService extends StartableService {
|
|
|
13700
13700
|
return undefined;
|
|
13701
13701
|
}
|
|
13702
13702
|
}
|
|
13703
|
-
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" });
|
|
13704
13704
|
GraphqlService.decorators = [
|
|
13705
13705
|
{ type: Injectable, args: [{
|
|
13706
13706
|
providedIn: 'root'
|
|
@@ -13717,7 +13717,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13717
13717
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13718
13718
|
];
|
|
13719
13719
|
|
|
13720
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13720
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
13721
13721
|
class BaseGraphqlServiceOptions {
|
|
13722
13722
|
}
|
|
13723
13723
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13868,8 +13868,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13868
13868
|
}
|
|
13869
13869
|
/* -- protected methods -- */
|
|
13870
13870
|
computeMutableWatchQueryId(opts) {
|
|
13871
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13872
|
-
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) || '';
|
|
13873
13873
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13874
13874
|
}
|
|
13875
13875
|
findMutableWatchQueries(opts) {
|
|
@@ -13939,7 +13939,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13939
13939
|
/* ------------------------------------
|
|
13940
13940
|
* GraphQL queries
|
|
13941
13941
|
* ------------------------------------*/
|
|
13942
|
-
const Fragments
|
|
13942
|
+
const Fragments = {
|
|
13943
13943
|
account: gql `
|
|
13944
13944
|
fragment AccountFragment on AccountVO {
|
|
13945
13945
|
id
|
|
@@ -13974,14 +13974,14 @@ const Fragments$1 = {
|
|
|
13974
13974
|
}`
|
|
13975
13975
|
};
|
|
13976
13976
|
// Load account query
|
|
13977
|
-
const LoadQuery
|
|
13977
|
+
const LoadQuery = gql `
|
|
13978
13978
|
query Account {
|
|
13979
13979
|
data: account {
|
|
13980
13980
|
...AccountFragment
|
|
13981
13981
|
}
|
|
13982
13982
|
}
|
|
13983
|
-
${Fragments
|
|
13984
|
-
${Fragments
|
|
13983
|
+
${Fragments.account}
|
|
13984
|
+
${Fragments.settings}
|
|
13985
13985
|
`;
|
|
13986
13986
|
// Check email query
|
|
13987
13987
|
const IsEmailExistsQuery = gql `
|
|
@@ -13996,21 +13996,21 @@ const AccountMutations = {
|
|
|
13996
13996
|
...AccountFragment
|
|
13997
13997
|
}
|
|
13998
13998
|
}
|
|
13999
|
-
${Fragments
|
|
14000
|
-
${Fragments
|
|
13999
|
+
${Fragments.account}
|
|
14000
|
+
${Fragments.settings}`,
|
|
14001
14001
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
14002
14002
|
data: createAccount(account: $data){
|
|
14003
14003
|
...AccountFragment
|
|
14004
14004
|
}
|
|
14005
14005
|
}
|
|
14006
|
-
${Fragments
|
|
14007
|
-
${Fragments
|
|
14006
|
+
${Fragments.account}
|
|
14007
|
+
${Fragments.settings}`,
|
|
14008
14008
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
14009
14009
|
data: saveSettings(settings: $data){
|
|
14010
14010
|
...UserSettingsFragment
|
|
14011
14011
|
}
|
|
14012
14012
|
}
|
|
14013
|
-
${Fragments
|
|
14013
|
+
${Fragments.settings}`
|
|
14014
14014
|
};
|
|
14015
14015
|
// Sent confirmation email
|
|
14016
14016
|
const SendConfirmEmailMutation = gql `
|
|
@@ -14325,7 +14325,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14325
14325
|
catch (error) {
|
|
14326
14326
|
console.error(error);
|
|
14327
14327
|
this.resetData();
|
|
14328
|
-
throw { code: ErrorCodes
|
|
14328
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
14329
14329
|
}
|
|
14330
14330
|
// Store pubkey+keypair
|
|
14331
14331
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -14359,7 +14359,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14359
14359
|
}
|
|
14360
14360
|
catch (err) {
|
|
14361
14361
|
// If account not found, check if email is valid
|
|
14362
|
-
if (err && +(err.code) === ErrorCodes
|
|
14362
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
14363
14363
|
// Check email exists
|
|
14364
14364
|
if (data.username.indexOf('@') !== -1) {
|
|
14365
14365
|
let isEmailExists;
|
|
@@ -14371,11 +14371,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
14371
14371
|
}
|
|
14372
14372
|
// Email not exists (no account)
|
|
14373
14373
|
if (!isEmailExists) {
|
|
14374
|
-
throw { code: ErrorCodes
|
|
14374
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
14375
14375
|
}
|
|
14376
14376
|
}
|
|
14377
14377
|
// Email exists, so error = 'bad password'
|
|
14378
|
-
throw { code: ErrorCodes
|
|
14378
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
14379
14379
|
}
|
|
14380
14380
|
throw err; // resend the first error
|
|
14381
14381
|
}
|
|
@@ -14521,8 +14521,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
14521
14521
|
// Load remotely
|
|
14522
14522
|
else {
|
|
14523
14523
|
const { data } = yield this.graphql.query({
|
|
14524
|
-
query: LoadQuery
|
|
14525
|
-
error: { code: ErrorCodes
|
|
14524
|
+
query: LoadQuery,
|
|
14525
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
14526
14526
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
14527
14527
|
});
|
|
14528
14528
|
json = data;
|
|
@@ -14549,7 +14549,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14549
14549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14550
14550
|
const isEmailExists = yield this.isEmailExists(email);
|
|
14551
14551
|
if (isEmailExists) {
|
|
14552
|
-
throw { code: ErrorCodes
|
|
14552
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14553
14553
|
}
|
|
14554
14554
|
});
|
|
14555
14555
|
}
|
|
@@ -14585,7 +14585,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14585
14585
|
locale
|
|
14586
14586
|
},
|
|
14587
14587
|
error: {
|
|
14588
|
-
code: ErrorCodes
|
|
14588
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14589
14589
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
14590
14590
|
}
|
|
14591
14591
|
});
|
|
@@ -14601,7 +14601,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14601
14601
|
code
|
|
14602
14602
|
},
|
|
14603
14603
|
error: {
|
|
14604
|
-
code: ErrorCodes
|
|
14604
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
14605
14605
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
14606
14606
|
}
|
|
14607
14607
|
});
|
|
@@ -14680,7 +14680,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14680
14680
|
throw error;
|
|
14681
14681
|
console.error(error);
|
|
14682
14682
|
throw {
|
|
14683
|
-
code: ErrorCodes
|
|
14683
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14684
14684
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14685
14685
|
};
|
|
14686
14686
|
}
|
|
@@ -14850,7 +14850,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14850
14850
|
if (!isNew) {
|
|
14851
14851
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14852
14852
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14853
|
-
throw { code: ErrorCodes
|
|
14853
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14854
14854
|
}
|
|
14855
14855
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14856
14856
|
}
|
|
@@ -14862,7 +14862,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14862
14862
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14863
14863
|
variables: { data: json },
|
|
14864
14864
|
error: {
|
|
14865
|
-
code: ErrorCodes
|
|
14865
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14866
14866
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14867
14867
|
}
|
|
14868
14868
|
});
|
|
@@ -14889,7 +14889,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14889
14889
|
mutation: AccountMutations.saveSettings,
|
|
14890
14890
|
variables: { data: json },
|
|
14891
14891
|
error: {
|
|
14892
|
-
code: ErrorCodes
|
|
14892
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14893
14893
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14894
14894
|
}
|
|
14895
14895
|
});
|
|
@@ -14911,7 +14911,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14911
14911
|
if (counter > 4) {
|
|
14912
14912
|
if (this._debug)
|
|
14913
14913
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14914
|
-
throw { code: ErrorCodes
|
|
14914
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14915
14915
|
}
|
|
14916
14916
|
// Check if valid
|
|
14917
14917
|
if (token) {
|
|
@@ -14921,7 +14921,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14921
14921
|
token
|
|
14922
14922
|
},
|
|
14923
14923
|
error: {
|
|
14924
|
-
code: ErrorCodes
|
|
14924
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
14925
14925
|
message: 'ERROR.UNAUTHORIZED'
|
|
14926
14926
|
},
|
|
14927
14927
|
fetchPolicy: 'no-cache'
|
|
@@ -14937,7 +14937,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14937
14937
|
}
|
|
14938
14938
|
// Generate a new token
|
|
14939
14939
|
const challengeError = {
|
|
14940
|
-
code: ErrorCodes
|
|
14940
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14941
14941
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14942
14942
|
};
|
|
14943
14943
|
const data = yield this.graphql.query({
|
|
@@ -15015,7 +15015,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15015
15015
|
query: AccountSubscriptions.listenChanges,
|
|
15016
15016
|
variables,
|
|
15017
15017
|
error: {
|
|
15018
|
-
code: ErrorCodes
|
|
15018
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
15019
15019
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
|
|
15020
15020
|
}
|
|
15021
15021
|
}).pipe(map(({ data }) => data),
|
|
@@ -15044,7 +15044,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15044
15044
|
return Toasts.show(this.toastController, this.translate, opts);
|
|
15045
15045
|
}
|
|
15046
15046
|
}
|
|
15047
|
-
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" });
|
|
15048
15048
|
AccountService.decorators = [
|
|
15049
15049
|
{ type: Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
|
|
15050
15050
|
];
|
|
@@ -15312,7 +15312,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
15312
15312
|
/* ------------------------------------
|
|
15313
15313
|
* GraphQL queries
|
|
15314
15314
|
* ------------------------------------*/
|
|
15315
|
-
const Fragments = {
|
|
15315
|
+
const Fragments$1 = {
|
|
15316
15316
|
config: gql `
|
|
15317
15317
|
fragment ConfigFragment on ConfigurationVO {
|
|
15318
15318
|
id
|
|
@@ -15339,13 +15339,13 @@ const Fragments = {
|
|
|
15339
15339
|
}
|
|
15340
15340
|
`
|
|
15341
15341
|
};
|
|
15342
|
-
const LoadQuery = gql `
|
|
15342
|
+
const LoadQuery$1 = gql `
|
|
15343
15343
|
query Configuration{
|
|
15344
15344
|
data: configuration{
|
|
15345
15345
|
...ConfigFragment
|
|
15346
15346
|
}
|
|
15347
15347
|
}
|
|
15348
|
-
${Fragments.config}
|
|
15348
|
+
${Fragments$1.config}
|
|
15349
15349
|
`;
|
|
15350
15350
|
// Save (create or update) account mutation
|
|
15351
15351
|
const SaveMutation = gql `
|
|
@@ -15354,7 +15354,7 @@ const SaveMutation = gql `
|
|
|
15354
15354
|
...ConfigFragment
|
|
15355
15355
|
}
|
|
15356
15356
|
}
|
|
15357
|
-
${Fragments.config}
|
|
15357
|
+
${Fragments$1.config}
|
|
15358
15358
|
`;
|
|
15359
15359
|
const ClearCache = gql `
|
|
15360
15360
|
query ClearCache($name: String) {
|
|
@@ -15405,12 +15405,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15405
15405
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15406
15406
|
const now = Date.now();
|
|
15407
15407
|
console.debug('[config] Loading Pod configuration...');
|
|
15408
|
-
const query = opts && opts.query || LoadQuery;
|
|
15408
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
15409
15409
|
const variables = opts && opts.variables || undefined;
|
|
15410
15410
|
const res = yield this.graphql.query({
|
|
15411
15411
|
query,
|
|
15412
15412
|
variables,
|
|
15413
|
-
error: { code: ErrorCodes
|
|
15413
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15414
15414
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
15415
15415
|
});
|
|
15416
15416
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -15443,7 +15443,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15443
15443
|
data: json
|
|
15444
15444
|
},
|
|
15445
15445
|
error: {
|
|
15446
|
-
code: ErrorCodes
|
|
15446
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
15447
15447
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
15448
15448
|
}
|
|
15449
15449
|
});
|
|
@@ -15469,7 +15469,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15469
15469
|
const res = yield this.graphql.query({
|
|
15470
15470
|
query: CacheStatistics,
|
|
15471
15471
|
variables: null,
|
|
15472
|
-
error: { code: ErrorCodes
|
|
15472
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15473
15473
|
fetchPolicy: 'network-only'
|
|
15474
15474
|
});
|
|
15475
15475
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -15485,7 +15485,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15485
15485
|
const res = yield this.graphql.query({
|
|
15486
15486
|
query: ClearCache,
|
|
15487
15487
|
variables,
|
|
15488
|
-
error: { code: ErrorCodes
|
|
15488
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15489
15489
|
fetchPolicy: 'no-cache'
|
|
15490
15490
|
});
|
|
15491
15491
|
const data = res && res.clearCache || undefined;
|
|
@@ -15644,7 +15644,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15644
15644
|
});
|
|
15645
15645
|
}
|
|
15646
15646
|
}
|
|
15647
|
-
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" });
|
|
15648
15648
|
ConfigService.decorators = [
|
|
15649
15649
|
{ type: Injectable, args: [{
|
|
15650
15650
|
providedIn: 'root',
|
|
@@ -15664,7 +15664,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15664
15664
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15665
15665
|
];
|
|
15666
15666
|
|
|
15667
|
-
const moment$
|
|
15667
|
+
const moment$4 = momentImported;
|
|
15668
15668
|
const AndroidOsEnvironment = Object.freeze({
|
|
15669
15669
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
15670
15670
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
@@ -15899,16 +15899,16 @@ class PlatformService extends StartableService {
|
|
|
15899
15899
|
}
|
|
15900
15900
|
// config moment lib
|
|
15901
15901
|
try {
|
|
15902
|
-
moment$
|
|
15902
|
+
moment$4.locale(event.lang);
|
|
15903
15903
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15904
15904
|
}
|
|
15905
15905
|
// If error, fallback to en
|
|
15906
15906
|
catch (err) {
|
|
15907
|
-
moment$
|
|
15907
|
+
moment$4.locale('en');
|
|
15908
15908
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15909
15909
|
}
|
|
15910
15910
|
// Config date adapter
|
|
15911
|
-
this.dateAdapter.setLocale(moment$
|
|
15911
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
15912
15912
|
}
|
|
15913
15913
|
});
|
|
15914
15914
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15947,8 +15947,7 @@ class PlatformService extends StartableService {
|
|
|
15947
15947
|
(_a = this.checkAppVersionTimer) === null || _a === void 0 ? void 0 : _a.unsubscribe(); // Stop timer if exists
|
|
15948
15948
|
return; // Skip
|
|
15949
15949
|
}
|
|
15950
|
-
const
|
|
15951
|
-
const remoteVersion = yield this.networkService.getAppVersion(peer);
|
|
15950
|
+
const remoteVersion = yield this.networkService.getAppVersion();
|
|
15952
15951
|
if (isNilOrBlank(remoteVersion)) {
|
|
15953
15952
|
if (production && !silent)
|
|
15954
15953
|
console.error('[platform] Cannot load remote app version. Skipping version check');
|
|
@@ -15957,7 +15956,7 @@ class PlatformService extends StartableService {
|
|
|
15957
15956
|
}
|
|
15958
15957
|
if (VersionUtils.isCompatible(remoteVersion, actualVersion)) {
|
|
15959
15958
|
if (!silent)
|
|
15960
|
-
console.info(
|
|
15959
|
+
console.info(`[platform] Checking remote app version [OK] {remote: '${remoteVersion}', actual: '${actualVersion}'}`);
|
|
15961
15960
|
return;
|
|
15962
15961
|
}
|
|
15963
15962
|
// If newer version exists
|
|
@@ -16109,7 +16108,7 @@ class PlatformService extends StartableService {
|
|
|
16109
16108
|
});
|
|
16110
16109
|
}
|
|
16111
16110
|
}
|
|
16112
|
-
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" });
|
|
16113
16112
|
PlatformService.decorators = [
|
|
16114
16113
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16115
16114
|
];
|
|
@@ -16124,15 +16123,15 @@ PlatformService.ctorParameters = () => [
|
|
|
16124
16123
|
{ type: NetworkService },
|
|
16125
16124
|
{ type: AccountService },
|
|
16126
16125
|
{ type: ConfigService },
|
|
16127
|
-
{ type: CacheService },
|
|
16126
|
+
{ type: CacheService$1 },
|
|
16128
16127
|
{ type: Storage },
|
|
16129
16128
|
{ type: AudioProvider },
|
|
16130
16129
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
16131
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
16130
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
16132
16131
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
16133
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
16134
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
16135
|
-
{ 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 }] }
|
|
16136
16135
|
];
|
|
16137
16136
|
|
|
16138
16137
|
class AppHelpModal {
|
|
@@ -16196,7 +16195,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
16196
16195
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
16197
16196
|
}
|
|
16198
16197
|
}
|
|
16199
|
-
MatStepperI18n.ɵprov =
|
|
16198
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
16200
16199
|
MatStepperI18n.decorators = [
|
|
16201
16200
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16202
16201
|
];
|
|
@@ -18032,7 +18031,7 @@ function state2side(state) {
|
|
|
18032
18031
|
return 1;
|
|
18033
18032
|
}
|
|
18034
18033
|
}
|
|
18035
|
-
const ɵ0$
|
|
18034
|
+
const ɵ0$b = (defaultStateSize) => [
|
|
18036
18035
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
18037
18036
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
18038
18037
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -18040,7 +18039,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
18040
18039
|
const SCALE_OPTIONS_DEFAULT = {
|
|
18041
18040
|
startColor: rgbArrayMap.red,
|
|
18042
18041
|
startStates: [0, 2, 3],
|
|
18043
|
-
startStepsFn: ɵ0$
|
|
18042
|
+
startStepsFn: ɵ0$b
|
|
18044
18043
|
};
|
|
18045
18044
|
/**
|
|
18046
18045
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -18837,7 +18836,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18837
18836
|
});
|
|
18838
18837
|
}
|
|
18839
18838
|
}
|
|
18840
|
-
UserSettingsValidatorService.ɵprov =
|
|
18839
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18841
18840
|
UserSettingsValidatorService.decorators = [
|
|
18842
18841
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18843
18842
|
];
|
|
@@ -18881,7 +18880,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18881
18880
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18882
18881
|
}
|
|
18883
18882
|
}
|
|
18884
|
-
AccountValidatorService.ɵprov =
|
|
18883
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18885
18884
|
AccountValidatorService.decorators = [
|
|
18886
18885
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18887
18886
|
];
|
|
@@ -19446,7 +19445,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
19446
19445
|
});
|
|
19447
19446
|
}
|
|
19448
19447
|
}
|
|
19449
|
-
LocalSettingsValidatorService.ɵprov =
|
|
19448
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
19450
19449
|
LocalSettingsValidatorService.decorators = [
|
|
19451
19450
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19452
19451
|
];
|
|
@@ -20065,7 +20064,7 @@ class IsOnFieldModePipe {
|
|
|
20065
20064
|
return value === 'FIELD';
|
|
20066
20065
|
}
|
|
20067
20066
|
}
|
|
20068
|
-
IsOnFieldModePipe.ɵprov =
|
|
20067
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
20069
20068
|
IsOnFieldModePipe.decorators = [
|
|
20070
20069
|
{ type: Pipe, args: [{
|
|
20071
20070
|
name: 'isOnField'
|
|
@@ -20077,7 +20076,7 @@ class IsNotOnFieldModePipe {
|
|
|
20077
20076
|
return value !== 'FIELD';
|
|
20078
20077
|
}
|
|
20079
20078
|
}
|
|
20080
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
20079
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
20081
20080
|
IsNotOnFieldModePipe.decorators = [
|
|
20082
20081
|
{ type: Pipe, args: [{
|
|
20083
20082
|
name: 'isNotOnField'
|
|
@@ -20092,7 +20091,7 @@ class PersonToStringPipe {
|
|
|
20092
20091
|
return PersonUtils.personToString(value);
|
|
20093
20092
|
}
|
|
20094
20093
|
}
|
|
20095
|
-
PersonToStringPipe.ɵprov =
|
|
20094
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
20096
20095
|
PersonToStringPipe.decorators = [
|
|
20097
20096
|
{ type: Pipe, args: [{
|
|
20098
20097
|
name: 'personToString'
|
|
@@ -20477,7 +20476,7 @@ class IsLoginAccountPipe {
|
|
|
20477
20476
|
return value && value.pubkey && true;
|
|
20478
20477
|
}
|
|
20479
20478
|
}
|
|
20480
|
-
IsLoginAccountPipe.ɵprov =
|
|
20479
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
20481
20480
|
IsLoginAccountPipe.decorators = [
|
|
20482
20481
|
{ type: Pipe, args: [{
|
|
20483
20482
|
name: 'isLogin'
|
|
@@ -20489,7 +20488,7 @@ class AccountToStringPipe {
|
|
|
20489
20488
|
return accountToString(value);
|
|
20490
20489
|
}
|
|
20491
20490
|
}
|
|
20492
|
-
AccountToStringPipe.ɵprov =
|
|
20491
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
20493
20492
|
AccountToStringPipe.decorators = [
|
|
20494
20493
|
{ type: Pipe, args: [{
|
|
20495
20494
|
name: 'accountToString'
|
|
@@ -20504,7 +20503,7 @@ class DepartmentToStringPipe {
|
|
|
20504
20503
|
return departmentToString(value);
|
|
20505
20504
|
}
|
|
20506
20505
|
}
|
|
20507
|
-
DepartmentToStringPipe.ɵprov =
|
|
20506
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
20508
20507
|
DepartmentToStringPipe.decorators = [
|
|
20509
20508
|
{ type: Pipe, args: [{
|
|
20510
20509
|
name: 'departmentToString'
|
|
@@ -20600,7 +20599,7 @@ class MenuService {
|
|
|
20600
20599
|
this._visibleSubject.next(value);
|
|
20601
20600
|
}
|
|
20602
20601
|
}
|
|
20603
|
-
MenuService.ɵprov =
|
|
20602
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
20604
20603
|
MenuService.decorators = [
|
|
20605
20604
|
{ type: Injectable, args: [{
|
|
20606
20605
|
providedIn: 'root'
|
|
@@ -21056,7 +21055,7 @@ class AuthGuardService {
|
|
|
21056
21055
|
}));
|
|
21057
21056
|
}
|
|
21058
21057
|
}
|
|
21059
|
-
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" });
|
|
21060
21059
|
AuthGuardService.decorators = [
|
|
21061
21060
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
21062
21061
|
];
|
|
@@ -21098,7 +21097,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21098
21097
|
query,
|
|
21099
21098
|
variables: { id },
|
|
21100
21099
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21101
|
-
error: { code: ErrorCodes
|
|
21100
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21102
21101
|
})
|
|
21103
21102
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
21104
21103
|
? (data && this.fromObject(data))
|
|
@@ -21113,7 +21112,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21113
21112
|
query,
|
|
21114
21113
|
variables: { id },
|
|
21115
21114
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21116
|
-
error: { code: ErrorCodes
|
|
21115
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21117
21116
|
});
|
|
21118
21117
|
// Convert to entity
|
|
21119
21118
|
return (!opts || opts.toEntity !== false)
|
|
@@ -21144,7 +21143,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21144
21143
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
21145
21144
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
21146
21145
|
variables,
|
|
21147
|
-
error: { code: ErrorCodes
|
|
21146
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
21148
21147
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
21149
21148
|
})
|
|
21150
21149
|
.pipe(map(({ data, total }) => {
|
|
@@ -21180,7 +21179,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21180
21179
|
const { data, total } = yield this.graphql.query({
|
|
21181
21180
|
query,
|
|
21182
21181
|
variables,
|
|
21183
|
-
error: { code: ErrorCodes
|
|
21182
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
21184
21183
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21185
21184
|
});
|
|
21186
21185
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -21219,7 +21218,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21219
21218
|
variables: {
|
|
21220
21219
|
filter: filter && filter.asPodObject()
|
|
21221
21220
|
},
|
|
21222
|
-
error: { code: ErrorCodes
|
|
21221
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
21223
21222
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21224
21223
|
});
|
|
21225
21224
|
return res.total;
|
|
@@ -21255,7 +21254,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21255
21254
|
variables: {
|
|
21256
21255
|
data: json
|
|
21257
21256
|
},
|
|
21258
|
-
error: { code: ErrorCodes
|
|
21257
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21259
21258
|
update: (proxy, { data }) => {
|
|
21260
21259
|
const savedEntities = data && data.data;
|
|
21261
21260
|
if (savedEntities) {
|
|
@@ -21311,7 +21310,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21311
21310
|
variables: {
|
|
21312
21311
|
data: json
|
|
21313
21312
|
},
|
|
21314
|
-
error: { code: ErrorCodes
|
|
21313
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21315
21314
|
update: (cache, { data }) => {
|
|
21316
21315
|
// Update entity
|
|
21317
21316
|
const savedEntity = data && data.data;
|
|
@@ -21359,7 +21358,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21359
21358
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21360
21359
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21361
21360
|
variables: { ids },
|
|
21362
|
-
error: { code: ErrorCodes
|
|
21361
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21363
21362
|
update: (cache, res) => {
|
|
21364
21363
|
// Remove from cache
|
|
21365
21364
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21400,7 +21399,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21400
21399
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21401
21400
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21402
21401
|
variables: { id },
|
|
21403
|
-
error: { code: ErrorCodes
|
|
21402
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21404
21403
|
update: (proxy, res) => {
|
|
21405
21404
|
// Remove from cache
|
|
21406
21405
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21436,7 +21435,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21436
21435
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
|
|
21437
21436
|
variables,
|
|
21438
21437
|
error: {
|
|
21439
|
-
code: ErrorCodes
|
|
21438
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
21440
21439
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
21441
21440
|
}
|
|
21442
21441
|
})
|
|
@@ -21622,7 +21621,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
21622
21621
|
if (this._debug)
|
|
21623
21622
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
21624
21623
|
// Stop with an error
|
|
21625
|
-
throw { code: ErrorCodes
|
|
21624
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21626
21625
|
}
|
|
21627
21626
|
this._editingRowCount = 0;
|
|
21628
21627
|
let data;
|
|
@@ -22493,14 +22492,14 @@ class AppTable {
|
|
|
22493
22492
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22494
22493
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
22495
22494
|
if (this.readOnly) {
|
|
22496
|
-
throw { code: ErrorCodes
|
|
22495
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22497
22496
|
}
|
|
22498
22497
|
this.resetError();
|
|
22499
22498
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
22500
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;
|
|
22501
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;
|
|
22502
22501
|
if (!this.confirmEditCreate()) {
|
|
22503
|
-
throw { code: ErrorCodes
|
|
22502
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
22504
22503
|
}
|
|
22505
22504
|
// Mark as saving
|
|
22506
22505
|
this.markAsSaving();
|
|
@@ -22619,7 +22618,7 @@ class AppTable {
|
|
|
22619
22618
|
var _a;
|
|
22620
22619
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22621
22620
|
if (this.readOnly) {
|
|
22622
|
-
throw { code: ErrorCodes
|
|
22621
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22623
22622
|
}
|
|
22624
22623
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
22625
22624
|
return 0; // SKip
|
|
@@ -24199,7 +24198,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
24199
24198
|
try {
|
|
24200
24199
|
const data = yield this.dataService.load(id, opts);
|
|
24201
24200
|
if (!data)
|
|
24202
|
-
throw { code: ErrorCodes
|
|
24201
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
24203
24202
|
this._usageMode = this.computeUsageMode(data);
|
|
24204
24203
|
yield this.onEntityLoaded(data, opts);
|
|
24205
24204
|
yield this.updateView(data, opts);
|
|
@@ -24753,9 +24752,10 @@ AppInMemoryTable.propDecorators = {
|
|
|
24753
24752
|
canDelete: [{ type: Input }]
|
|
24754
24753
|
};
|
|
24755
24754
|
|
|
24756
|
-
const
|
|
24755
|
+
const SocialErrorCodes = {
|
|
24757
24756
|
LOAD_USER_EVENTS_ERROR: 50000,
|
|
24758
|
-
SAVE_USER_EVENT_ERROR: 50001
|
|
24757
|
+
SAVE_USER_EVENT_ERROR: 50001,
|
|
24758
|
+
SEND_MESSAGE_ERROR: 50003
|
|
24759
24759
|
};
|
|
24760
24760
|
|
|
24761
24761
|
var UserEvent_1;
|
|
@@ -24799,7 +24799,7 @@ UserEvent = UserEvent_1 = __decorate([
|
|
|
24799
24799
|
EntityClass({ typename: 'UserEventVO' })
|
|
24800
24800
|
], UserEvent);
|
|
24801
24801
|
|
|
24802
|
-
const
|
|
24802
|
+
const UserEventFragments = {
|
|
24803
24803
|
userEvent: gql `fragment UserEventFragment on UserEventVO {
|
|
24804
24804
|
id
|
|
24805
24805
|
issuer
|
|
@@ -24850,7 +24850,7 @@ let UserEventFilter = class UserEventFilter extends EntityFilter {
|
|
|
24850
24850
|
}
|
|
24851
24851
|
};
|
|
24852
24852
|
UserEventFilter = __decorate([
|
|
24853
|
-
EntityClass({ typename: '
|
|
24853
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
24854
24854
|
], UserEventFilter);
|
|
24855
24855
|
const SaveQuery = gql `
|
|
24856
24856
|
mutation SaveUserEvent($data: UserEventVOInput){
|
|
@@ -24858,7 +24858,7 @@ const SaveQuery = gql `
|
|
|
24858
24858
|
...UserEventFragment
|
|
24859
24859
|
}
|
|
24860
24860
|
}
|
|
24861
|
-
${
|
|
24861
|
+
${UserEventFragments.userEvent}
|
|
24862
24862
|
`;
|
|
24863
24863
|
const LoadAllQuery = gql `
|
|
24864
24864
|
query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){
|
|
@@ -24866,7 +24866,7 @@ const LoadAllQuery = gql `
|
|
|
24866
24866
|
...LightUserEventFragment
|
|
24867
24867
|
}
|
|
24868
24868
|
}
|
|
24869
|
-
${
|
|
24869
|
+
${UserEventFragments.lightUserEvent}
|
|
24870
24870
|
`;
|
|
24871
24871
|
const DeleteByIdsMutation = gql `
|
|
24872
24872
|
mutation DeleteUserEvents($ids:[Int]){
|
|
@@ -24879,7 +24879,7 @@ const LoadAllWithContentQuery = gql `
|
|
|
24879
24879
|
...UserEventFragment
|
|
24880
24880
|
}
|
|
24881
24881
|
}
|
|
24882
|
-
${
|
|
24882
|
+
${UserEventFragments.userEvent}
|
|
24883
24883
|
`;
|
|
24884
24884
|
class UserEventService extends BaseGraphqlService {
|
|
24885
24885
|
constructor(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -24892,7 +24892,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24892
24892
|
this.environment = environment;
|
|
24893
24893
|
this._userEventActions = [];
|
|
24894
24894
|
// For DEV only
|
|
24895
|
-
this._debug = !environment.production;
|
|
24895
|
+
this._debug = environment && !environment.production;
|
|
24896
24896
|
}
|
|
24897
24897
|
/**
|
|
24898
24898
|
*
|
|
@@ -24929,7 +24929,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24929
24929
|
filter: filter && filter.asPodObject()
|
|
24930
24930
|
},
|
|
24931
24931
|
arrayFieldName: 'data',
|
|
24932
|
-
error: { code:
|
|
24932
|
+
error: { code: SocialErrorCodes.LOAD_USER_EVENTS_ERROR, message: 'SOCIAL.ERROR.LOAD_USER_EVENTS_ERROR' },
|
|
24933
24933
|
fetchPolicy: options && options.fetchPolicy || undefined
|
|
24934
24934
|
})
|
|
24935
24935
|
.pipe(map(res => {
|
|
@@ -24967,7 +24967,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24967
24967
|
variables: {
|
|
24968
24968
|
data: json
|
|
24969
24969
|
},
|
|
24970
|
-
error: { code:
|
|
24970
|
+
error: { code: SocialErrorCodes.SAVE_USER_EVENT_ERROR, message: 'SOCIAL.ERROR.SAVE_USER_EVENT_ERROR' },
|
|
24971
24971
|
update: (proxy, { data }) => {
|
|
24972
24972
|
// Update entity
|
|
24973
24973
|
const savedEntity = data && data.data;
|
|
@@ -25151,7 +25151,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
25151
25151
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
25152
25152
|
}
|
|
25153
25153
|
}
|
|
25154
|
-
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" });
|
|
25155
25155
|
UserEventService.decorators = [
|
|
25156
25156
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25157
25157
|
];
|
|
@@ -25161,7 +25161,7 @@ UserEventService.ctorParameters = () => [
|
|
|
25161
25161
|
{ type: NetworkService },
|
|
25162
25162
|
{ type: TranslateService },
|
|
25163
25163
|
{ type: ToastController },
|
|
25164
|
-
{ type:
|
|
25164
|
+
{ type: Environment, decorators: [{ type: Optional }, { type: Inject, args: [ENVIRONMENT,] }] }
|
|
25165
25165
|
];
|
|
25166
25166
|
|
|
25167
25167
|
const ICONS_MAP = {
|
|
@@ -25288,7 +25288,7 @@ class UserEventsTable extends AppTable {
|
|
|
25288
25288
|
UserEventsTable.decorators = [
|
|
25289
25289
|
{ type: Component, args: [{
|
|
25290
25290
|
selector: 'app-user-events-table',
|
|
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.
|
|
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",
|
|
25292
25292
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25293
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}"]
|
|
25294
25294
|
},] }
|
|
@@ -25308,32 +25308,309 @@ UserEventsTable.propDecorators = {
|
|
|
25308
25308
|
defaultSortDirection: [{ type: Input }]
|
|
25309
25309
|
};
|
|
25310
25310
|
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
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);
|
|
25320
25434
|
}
|
|
25321
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
|
+
}
|
|
25322
25524
|
SocialModule.decorators = [
|
|
25323
25525
|
{ type: NgModule, args: [{
|
|
25324
25526
|
imports: [
|
|
25325
25527
|
CommonModule,
|
|
25326
|
-
CoreModule
|
|
25528
|
+
CoreModule,
|
|
25529
|
+
SharedModule
|
|
25327
25530
|
],
|
|
25328
25531
|
declarations: [
|
|
25329
|
-
UserEventsTable
|
|
25532
|
+
UserEventsTable,
|
|
25533
|
+
MessageModal,
|
|
25534
|
+
MessageForm
|
|
25330
25535
|
],
|
|
25331
25536
|
exports: [
|
|
25332
|
-
UserEventsTable
|
|
25537
|
+
UserEventsTable,
|
|
25538
|
+
MessageModal
|
|
25333
25539
|
]
|
|
25334
25540
|
},] }
|
|
25335
25541
|
];
|
|
25336
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
|
+
|
|
25337
25614
|
var PersonFilter_1;
|
|
25338
25615
|
// @dynamic
|
|
25339
25616
|
let PersonFilter = PersonFilter_1 = class PersonFilter extends EntityFilter {
|
|
@@ -25532,7 +25809,7 @@ class PersonService extends BaseEntityService {
|
|
|
25532
25809
|
return target;
|
|
25533
25810
|
}
|
|
25534
25811
|
}
|
|
25535
|
-
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" });
|
|
25536
25813
|
PersonService.decorators = [
|
|
25537
25814
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25538
25815
|
];
|
|
@@ -25563,7 +25840,7 @@ class PersonValidatorService {
|
|
|
25563
25840
|
return this.formBuilder.group(formConfig);
|
|
25564
25841
|
}
|
|
25565
25842
|
}
|
|
25566
|
-
PersonValidatorService.ɵprov =
|
|
25843
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
25567
25844
|
PersonValidatorService.decorators = [
|
|
25568
25845
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25569
25846
|
];
|
|
@@ -25573,7 +25850,7 @@ PersonValidatorService.ctorParameters = () => [
|
|
|
25573
25850
|
];
|
|
25574
25851
|
|
|
25575
25852
|
class UsersPage extends AppTable {
|
|
25576
|
-
constructor(injector, accountService, validatorService, configService, dataService,
|
|
25853
|
+
constructor(injector, formBuilder, accountService, validatorService, configService, dataService, messageService, cd, environment) {
|
|
25577
25854
|
super(injector, RESERVED_START_COLUMNS
|
|
25578
25855
|
.concat([
|
|
25579
25856
|
'avatar',
|
|
@@ -25598,16 +25875,17 @@ class UsersPage extends AppTable {
|
|
|
25598
25875
|
this.validatorService = validatorService;
|
|
25599
25876
|
this.configService = configService;
|
|
25600
25877
|
this.dataService = dataService;
|
|
25878
|
+
this.messageService = messageService;
|
|
25601
25879
|
this.cd = cd;
|
|
25602
|
-
this.canEdit = false;
|
|
25603
25880
|
this.profiles = [...PRIORITIZED_AUTHORITIES].reverse();
|
|
25604
|
-
this.filterCriteriaCount = 0;
|
|
25605
25881
|
this.statusList = StatusList;
|
|
25606
25882
|
this.statusById = StatusById;
|
|
25883
|
+
this.filterCriteriaCount = 0;
|
|
25607
25884
|
this.useSticky = false;
|
|
25608
25885
|
this.referentialToString = referentialToString;
|
|
25609
|
-
this.inlineEdition = accountService.isAdmin(); // Allow inline edition only if admin
|
|
25610
25886
|
this.canEdit = accountService.isAdmin();
|
|
25887
|
+
this.canSendMessage = this.canEdit;
|
|
25888
|
+
this.inlineEdition = this.canEdit;
|
|
25611
25889
|
this.confirmBeforeDelete = true;
|
|
25612
25890
|
this.autoLoad = false; // Wait config loading
|
|
25613
25891
|
this.i18nColumnPrefix = 'USER.';
|
|
@@ -25700,6 +25978,39 @@ class UsersPage extends AppTable {
|
|
|
25700
25978
|
formControl.setValue(null);
|
|
25701
25979
|
return false;
|
|
25702
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
|
+
}
|
|
25703
26014
|
/* -- protected methods -- */
|
|
25704
26015
|
markForCheck() {
|
|
25705
26016
|
this.cd.markForCheck();
|
|
@@ -25708,7 +26019,7 @@ class UsersPage extends AppTable {
|
|
|
25708
26019
|
UsersPage.decorators = [
|
|
25709
26020
|
{ type: Component, args: [{
|
|
25710
26021
|
selector: 'app-users-table',
|
|
25711
|
-
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",
|
|
25712
26023
|
providers: [
|
|
25713
26024
|
{ provide: ValidatorService, useExisting: PersonValidatorService }
|
|
25714
26025
|
],
|
|
@@ -25719,12 +26030,13 @@ UsersPage.decorators = [
|
|
|
25719
26030
|
];
|
|
25720
26031
|
UsersPage.ctorParameters = () => [
|
|
25721
26032
|
{ type: Injector },
|
|
26033
|
+
{ type: FormBuilder },
|
|
25722
26034
|
{ type: AccountService },
|
|
25723
26035
|
{ type: ValidatorService },
|
|
25724
26036
|
{ type: ConfigService },
|
|
25725
26037
|
{ type: PersonService },
|
|
26038
|
+
{ type: MessageService },
|
|
25726
26039
|
{ type: ChangeDetectorRef },
|
|
25727
|
-
{ type: FormBuilder },
|
|
25728
26040
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] }
|
|
25729
26041
|
];
|
|
25730
26042
|
UsersPage.propDecorators = {
|
|
@@ -25751,22 +26063,24 @@ AdminModule.decorators = [
|
|
|
25751
26063
|
UsersPage
|
|
25752
26064
|
],
|
|
25753
26065
|
exports: [
|
|
26066
|
+
SocialModule,
|
|
25754
26067
|
UsersPage
|
|
25755
26068
|
]
|
|
25756
26069
|
},] }
|
|
25757
26070
|
];
|
|
25758
26071
|
AdminModule.ctorParameters = () => [];
|
|
25759
26072
|
|
|
25760
|
-
const ɵ0 = {
|
|
26073
|
+
const ɵ0$c = {
|
|
25761
26074
|
profile: 'ADMIN'
|
|
25762
26075
|
};
|
|
25763
|
-
const routes
|
|
26076
|
+
const routes = [
|
|
25764
26077
|
{
|
|
25765
26078
|
path: 'users',
|
|
25766
26079
|
pathMatch: 'full',
|
|
25767
26080
|
component: UsersPage,
|
|
25768
26081
|
canActivate: [AuthGuardService],
|
|
25769
|
-
|
|
26082
|
+
canDeactivate: [ComponentDirtyGuard],
|
|
26083
|
+
data: ɵ0$c
|
|
25770
26084
|
}
|
|
25771
26085
|
];
|
|
25772
26086
|
class AdminRoutingModule {
|
|
@@ -25776,33 +26090,27 @@ AdminRoutingModule.decorators = [
|
|
|
25776
26090
|
imports: [
|
|
25777
26091
|
SharedRoutingModule,
|
|
25778
26092
|
AdminModule,
|
|
25779
|
-
RouterModule.forChild(routes
|
|
26093
|
+
RouterModule.forChild(routes)
|
|
25780
26094
|
],
|
|
25781
26095
|
exports: [RouterModule]
|
|
25782
26096
|
},] }
|
|
25783
26097
|
];
|
|
25784
26098
|
|
|
25785
|
-
|
|
25786
|
-
LOAD_PERSONS_ERROR: 100,
|
|
25787
|
-
SAVE_PERSONS_ERROR: 101,
|
|
25788
|
-
DELETE_PERSONS_ERROR: 102,
|
|
25789
|
-
};
|
|
25790
|
-
|
|
25791
|
-
class EntityTestClass$1 {
|
|
26099
|
+
class EntityTestClass {
|
|
25792
26100
|
}
|
|
25793
|
-
const FAKE_ENTITIES
|
|
26101
|
+
const FAKE_ENTITIES = [
|
|
25794
26102
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
25795
26103
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
25796
26104
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
25797
26105
|
];
|
|
25798
|
-
function deepCopy
|
|
26106
|
+
function deepCopy(values, size) {
|
|
25799
26107
|
if (isNil(size)) {
|
|
25800
|
-
return (values || FAKE_ENTITIES
|
|
26108
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
25801
26109
|
}
|
|
25802
26110
|
let result = [];
|
|
25803
26111
|
let i = 1;
|
|
25804
26112
|
while (result.length < size) {
|
|
25805
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
26113
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
25806
26114
|
const name = entity.name + ' #' + i;
|
|
25807
26115
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
25808
26116
|
}));
|
|
@@ -25812,7 +26120,7 @@ function deepCopy$1(values, size) {
|
|
|
25812
26120
|
class AutocompleteTestPage {
|
|
25813
26121
|
constructor(formBuilder) {
|
|
25814
26122
|
this.formBuilder = formBuilder;
|
|
25815
|
-
this._items = deepCopy
|
|
26123
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
25816
26124
|
this._$items = new BehaviorSubject(undefined);
|
|
25817
26125
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
25818
26126
|
this.memoryHide = false;
|
|
@@ -25857,7 +26165,7 @@ class AutocompleteTestPage {
|
|
|
25857
26165
|
});
|
|
25858
26166
|
// From items
|
|
25859
26167
|
this.autocompleteFields.add('entity-items-large', {
|
|
25860
|
-
items: FAKE_ENTITIES
|
|
26168
|
+
items: FAKE_ENTITIES.slice(),
|
|
25861
26169
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
25862
26170
|
displayWith: this.entityToString
|
|
25863
26171
|
});
|
|
@@ -25876,13 +26184,13 @@ class AutocompleteTestPage {
|
|
|
25876
26184
|
loadData() {
|
|
25877
26185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25878
26186
|
const data = {
|
|
25879
|
-
entity: deepCopy
|
|
26187
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
25880
26188
|
// This item is NOT in the items list => i should be displayed anyway
|
|
25881
26189
|
missingEntity: {
|
|
25882
26190
|
id: -1, label: '??', name: 'Missing item'
|
|
25883
26191
|
},
|
|
25884
|
-
disableEntity: deepCopy
|
|
25885
|
-
entities: deepCopy
|
|
26192
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2],
|
|
26193
|
+
entities: deepCopy(FAKE_ENTITIES)
|
|
25886
26194
|
};
|
|
25887
26195
|
this.form.setValue(data);
|
|
25888
26196
|
// Load observables
|
|
@@ -26029,13 +26337,13 @@ LatLongTestPage.ctorParameters = () => [
|
|
|
26029
26337
|
{ type: FormBuilder }
|
|
26030
26338
|
];
|
|
26031
26339
|
|
|
26032
|
-
const moment$
|
|
26340
|
+
const moment$5 = momentImported;
|
|
26033
26341
|
class SwipeTestPage {
|
|
26034
26342
|
constructor(formBuilder, dateFormatPipe) {
|
|
26035
26343
|
this.formBuilder = formBuilder;
|
|
26036
26344
|
this.dateFormatPipe = dateFormatPipe;
|
|
26037
26345
|
this.$dates = new BehaviorSubject(undefined);
|
|
26038
|
-
this._today = moment$
|
|
26346
|
+
this._today = moment$5().startOf('day');
|
|
26039
26347
|
this.form = formBuilder.group({
|
|
26040
26348
|
empty: [null, Validators.required],
|
|
26041
26349
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -26048,7 +26356,7 @@ class SwipeTestPage {
|
|
|
26048
26356
|
ngOnInit() {
|
|
26049
26357
|
const dates = [];
|
|
26050
26358
|
for (let d = 0; d < 7; d++) {
|
|
26051
|
-
dates[d] = moment$
|
|
26359
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
26052
26360
|
}
|
|
26053
26361
|
this.$dates.next(dates);
|
|
26054
26362
|
this.loadData();
|
|
@@ -26089,7 +26397,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
26089
26397
|
{ type: DateFormatPipe }
|
|
26090
26398
|
];
|
|
26091
26399
|
|
|
26092
|
-
const moment$
|
|
26400
|
+
const moment$6 = momentImported;
|
|
26093
26401
|
class DateTimeTestPage {
|
|
26094
26402
|
constructor(platform, formBuilder, cd) {
|
|
26095
26403
|
this.platform = platform;
|
|
@@ -26120,7 +26428,7 @@ class DateTimeTestPage {
|
|
|
26120
26428
|
// Load the form with data
|
|
26121
26429
|
loadData() {
|
|
26122
26430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26123
|
-
const now = moment$
|
|
26431
|
+
const now = moment$6();
|
|
26124
26432
|
const data = {
|
|
26125
26433
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
26126
26434
|
enable: toDateISOString(now),
|
|
@@ -26181,9 +26489,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
26181
26489
|
{ type: ChangeDetectorRef }
|
|
26182
26490
|
];
|
|
26183
26491
|
|
|
26184
|
-
class EntityTestClass {
|
|
26492
|
+
class EntityTestClass$1 {
|
|
26185
26493
|
}
|
|
26186
|
-
const FAKE_ENTITIES = [
|
|
26494
|
+
const FAKE_ENTITIES$1 = [
|
|
26187
26495
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
26188
26496
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
26189
26497
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -26192,14 +26500,14 @@ const FAKE_ENTITIES = [
|
|
|
26192
26500
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
26193
26501
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
26194
26502
|
];
|
|
26195
|
-
function deepCopy(values, size) {
|
|
26503
|
+
function deepCopy$1(values, size) {
|
|
26196
26504
|
if (isNil(size)) {
|
|
26197
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
26505
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
26198
26506
|
}
|
|
26199
26507
|
let result = [];
|
|
26200
26508
|
let i = 1;
|
|
26201
26509
|
while (result.length < size) {
|
|
26202
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
26510
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
26203
26511
|
const name = entity.name + ' #' + i;
|
|
26204
26512
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
26205
26513
|
}));
|
|
@@ -26209,7 +26517,7 @@ function deepCopy(values, size) {
|
|
|
26209
26517
|
class ChipsTestPage {
|
|
26210
26518
|
constructor(formBuilder) {
|
|
26211
26519
|
this.formBuilder = formBuilder;
|
|
26212
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
26520
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
26213
26521
|
this._$items = new BehaviorSubject(undefined);
|
|
26214
26522
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
26215
26523
|
this.form = formBuilder.group({
|
|
@@ -26248,7 +26556,7 @@ class ChipsTestPage {
|
|
|
26248
26556
|
// Load the form with data
|
|
26249
26557
|
loadData() {
|
|
26250
26558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26251
|
-
const items = deepCopy(FAKE_ENTITIES);
|
|
26559
|
+
const items = deepCopy$1(FAKE_ENTITIES$1);
|
|
26252
26560
|
const data = {
|
|
26253
26561
|
entity: items.slice(0, 1),
|
|
26254
26562
|
entityInitial: items.slice(1, 2),
|
|
@@ -26364,7 +26672,7 @@ NumpadTestPage.ctorParameters = () => [
|
|
|
26364
26672
|
{ type: FormBuilder }
|
|
26365
26673
|
];
|
|
26366
26674
|
|
|
26367
|
-
const moment = momentImported;
|
|
26675
|
+
const moment$7 = momentImported;
|
|
26368
26676
|
class DateTestPage {
|
|
26369
26677
|
constructor(formBuilder, cd) {
|
|
26370
26678
|
this.formBuilder = formBuilder;
|
|
@@ -26376,7 +26684,8 @@ class DateTestPage {
|
|
|
26376
26684
|
this.timezone = 'Indian/Mahe';
|
|
26377
26685
|
this.stringify = JSON.stringify;
|
|
26378
26686
|
this.form = formBuilder.group({
|
|
26379
|
-
empty: [null,
|
|
26687
|
+
empty: [null, SharedValidators.validDate],
|
|
26688
|
+
emptyRequired: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
26380
26689
|
enable: [null, Validators.required],
|
|
26381
26690
|
disable: [null, Validators.required],
|
|
26382
26691
|
readonly: [null],
|
|
@@ -26396,10 +26705,11 @@ class DateTestPage {
|
|
|
26396
26705
|
// Load the form with data
|
|
26397
26706
|
loadData() {
|
|
26398
26707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26399
|
-
const now = moment();
|
|
26708
|
+
const now = moment$7();
|
|
26400
26709
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
26401
26710
|
const data = {
|
|
26402
|
-
empty:
|
|
26711
|
+
empty: null,
|
|
26712
|
+
emptyRequired: null,
|
|
26403
26713
|
enable: toDateISOString(now),
|
|
26404
26714
|
disable: now.clone(),
|
|
26405
26715
|
readonly: now.clone(),
|
|
@@ -26453,7 +26763,7 @@ class DateTestPage {
|
|
|
26453
26763
|
DateTestPage.decorators = [
|
|
26454
26764
|
{ type: Component, args: [{
|
|
26455
26765
|
selector: 'app-data-test',
|
|
26456
|
-
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"
|
|
26457
26767
|
},] }
|
|
26458
26768
|
];
|
|
26459
26769
|
DateTestPage.ctorParameters = () => [
|
|
@@ -26473,7 +26783,7 @@ const SHARED_MATERIAL_TESTING_PAGES = [
|
|
|
26473
26783
|
{ label: 'Shared directives', divider: true },
|
|
26474
26784
|
{ label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
|
|
26475
26785
|
];
|
|
26476
|
-
const routes$
|
|
26786
|
+
const routes$1 = [
|
|
26477
26787
|
{
|
|
26478
26788
|
path: '',
|
|
26479
26789
|
pathMatch: 'full',
|
|
@@ -26530,7 +26840,7 @@ MaterialTestingModule.decorators = [
|
|
|
26530
26840
|
ReactiveFormsModule,
|
|
26531
26841
|
SharedMaterialModule,
|
|
26532
26842
|
TranslateModule.forChild(),
|
|
26533
|
-
RouterModule.forChild(routes$
|
|
26843
|
+
RouterModule.forChild(routes$1)
|
|
26534
26844
|
],
|
|
26535
26845
|
declarations: [
|
|
26536
26846
|
DateTimeTestPage,
|
|
@@ -26591,7 +26901,7 @@ ToastTestingPage.ctorParameters = () => [
|
|
|
26591
26901
|
{ type: TranslateService }
|
|
26592
26902
|
];
|
|
26593
26903
|
|
|
26594
|
-
const routes$
|
|
26904
|
+
const routes$2 = [
|
|
26595
26905
|
{
|
|
26596
26906
|
path: 'toast',
|
|
26597
26907
|
pathMatch: 'full',
|
|
@@ -26606,7 +26916,7 @@ ToastTestingModule.decorators = [
|
|
|
26606
26916
|
CommonModule,
|
|
26607
26917
|
IonicModule,
|
|
26608
26918
|
TranslateModule.forChild(),
|
|
26609
|
-
RouterModule.forChild(routes$
|
|
26919
|
+
RouterModule.forChild(routes$2)
|
|
26610
26920
|
],
|
|
26611
26921
|
declarations: [
|
|
26612
26922
|
ToastTestingPage
|
|
@@ -26669,7 +26979,7 @@ UploadFileTestingPage.ctorParameters = () => [
|
|
|
26669
26979
|
{ type: PopoverController }
|
|
26670
26980
|
];
|
|
26671
26981
|
|
|
26672
|
-
const routes$
|
|
26982
|
+
const routes$3 = [
|
|
26673
26983
|
{
|
|
26674
26984
|
path: 'upload-file',
|
|
26675
26985
|
pathMatch: 'full',
|
|
@@ -26684,7 +26994,7 @@ UploadFileTestingModule.decorators = [
|
|
|
26684
26994
|
CommonModule,
|
|
26685
26995
|
IonicModule,
|
|
26686
26996
|
TranslateModule.forChild(),
|
|
26687
|
-
RouterModule.forChild(routes$
|
|
26997
|
+
RouterModule.forChild(routes$3)
|
|
26688
26998
|
],
|
|
26689
26999
|
declarations: [
|
|
26690
27000
|
UploadFileTestingPage
|
|
@@ -27065,7 +27375,7 @@ TextPopoverTestingPage.ctorParameters = () => [
|
|
|
27065
27375
|
{ type: PopoverController }
|
|
27066
27376
|
];
|
|
27067
27377
|
|
|
27068
|
-
const routes$
|
|
27378
|
+
const routes$4 = [
|
|
27069
27379
|
{
|
|
27070
27380
|
path: 'text-popover',
|
|
27071
27381
|
pathMatch: 'full',
|
|
@@ -27080,7 +27390,7 @@ TextPopoverTestingModule.decorators = [
|
|
|
27080
27390
|
CommonModule,
|
|
27081
27391
|
IonicModule,
|
|
27082
27392
|
TranslateModule.forChild(),
|
|
27083
|
-
RouterModule.forChild(routes$
|
|
27393
|
+
RouterModule.forChild(routes$4)
|
|
27084
27394
|
],
|
|
27085
27395
|
declarations: [
|
|
27086
27396
|
TextPopoverTestingPage
|
|
@@ -27097,7 +27407,7 @@ const CORE_TESTING_PAGES = [
|
|
|
27097
27407
|
{ label: 'Table', page: '/testing/core/table' },
|
|
27098
27408
|
{ label: 'Text popover', page: '/testing/core/text-popover' }
|
|
27099
27409
|
];
|
|
27100
|
-
const routes = [
|
|
27410
|
+
const routes$5 = [
|
|
27101
27411
|
{
|
|
27102
27412
|
path: '',
|
|
27103
27413
|
pathMatch: 'full',
|
|
@@ -27121,7 +27431,7 @@ CoreTestingModule.decorators = [
|
|
|
27121
27431
|
imports: [
|
|
27122
27432
|
CommonModule,
|
|
27123
27433
|
TranslateModule.forChild(),
|
|
27124
|
-
RouterModule.forChild(routes),
|
|
27434
|
+
RouterModule.forChild(routes$5),
|
|
27125
27435
|
// Sub modules
|
|
27126
27436
|
TableTestingModule,
|
|
27127
27437
|
TextPopoverTestingModule
|
|
@@ -27141,5 +27451,5 @@ CoreTestingModule.decorators = [
|
|
|
27141
27451
|
* Generated bundle index. Do not edit.
|
|
27142
27452
|
*/
|
|
27143
27453
|
|
|
27144
|
-
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 };
|
|
27145
27455
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|