@sumaris-net/ngx-components 1.18.6 → 1.19.1
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 +806 -425
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +10 -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/model/referential.model.js +1 -1
- 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 +7 -1
- package/esm2015/src/app/shared/platforms.js +20 -4
- 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 +737 -408
- 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/core/services/model/referential.model.d.ts +7 -7
- 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 +2 -0
- package/src/app/shared/platforms.d.ts +1 -1
- 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';
|
|
@@ -1069,6 +1054,10 @@ trigger('slideUpDownAnimation', [
|
|
|
1069
1054
|
/* ---
|
|
1070
1055
|
* Source: https://github.com/ionic-team/ionic-framework/blob/b0d53ca73619585671d8cf4dc24e47f826495a0a/core/src/utils/platform.ts
|
|
1071
1056
|
* --- */
|
|
1057
|
+
const _cache = {
|
|
1058
|
+
mobile: null,
|
|
1059
|
+
cordova: null
|
|
1060
|
+
};
|
|
1072
1061
|
const matchMedia = (win, query) => win.matchMedia(query).matches;
|
|
1073
1062
|
const testUserAgent = (win, expr) => {
|
|
1074
1063
|
const userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
@@ -1076,22 +1065,34 @@ const testUserAgent = (win, expr) => {
|
|
|
1076
1065
|
};
|
|
1077
1066
|
const isWindows = (win) => testUserAgent(win, /windows/i);
|
|
1078
1067
|
const isTouchUi = (win) => matchMedia(win, '(any-pointer:coarse)');
|
|
1079
|
-
const isMobile = (win) => isCordova(window) || isAndroid(win) || isIOS(window) || (isTouchUi(win) && !isWindows(win));
|
|
1080
1068
|
const isIpad = (win) => {
|
|
1081
1069
|
// iOS 12 and below
|
|
1082
1070
|
if (testUserAgent(win, /iPad/i)) {
|
|
1083
1071
|
return true;
|
|
1084
1072
|
}
|
|
1085
1073
|
// iOS 13+
|
|
1086
|
-
if (testUserAgent(win, /Macintosh/i) &&
|
|
1074
|
+
if (testUserAgent(win, /Macintosh/i) && isTouchUi(win)) {
|
|
1087
1075
|
return true;
|
|
1088
1076
|
}
|
|
1089
1077
|
return false;
|
|
1090
1078
|
};
|
|
1091
|
-
const ɵ0
|
|
1079
|
+
const ɵ0 = isIpad;
|
|
1092
1080
|
const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
|
|
1093
1081
|
const isAndroid = (win) => testUserAgent(win, /android|sink/i);
|
|
1094
|
-
const isCordova = (win) =>
|
|
1082
|
+
const isCordova = (win) => {
|
|
1083
|
+
if (_cache.cordova === undefined) {
|
|
1084
|
+
_cache.cordova = !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
|
|
1085
|
+
}
|
|
1086
|
+
return _cache.cordova;
|
|
1087
|
+
};
|
|
1088
|
+
const isMobile = (win) => {
|
|
1089
|
+
if (_cache.mobile === undefined) {
|
|
1090
|
+
_cache.mobile = isCordova(window)
|
|
1091
|
+
|| isAndroid(win) || isIOS(window)
|
|
1092
|
+
|| (isTouchUi(win) && !isWindows(win));
|
|
1093
|
+
}
|
|
1094
|
+
return _cache.mobile;
|
|
1095
|
+
};
|
|
1095
1096
|
|
|
1096
1097
|
class MatAutocompleteConfigHolder {
|
|
1097
1098
|
constructor(options) {
|
|
@@ -1147,14 +1148,14 @@ class MatAutocompleteFieldUtils {
|
|
|
1147
1148
|
return isNotNil(o1 === null || o1 === void 0 ? void 0 : o1.id) && o1.id === (o2 === null || o2 === void 0 ? void 0 : o2.id);
|
|
1148
1149
|
}
|
|
1149
1150
|
}
|
|
1150
|
-
const noop
|
|
1151
|
-
const ɵ0$
|
|
1151
|
+
const noop = (_) => { };
|
|
1152
|
+
const ɵ0$1 = noop;
|
|
1152
1153
|
class MatAutocompleteField {
|
|
1153
1154
|
constructor(cd, formGroupDir) {
|
|
1154
1155
|
this.cd = cd;
|
|
1155
1156
|
this.formGroupDir = formGroupDir;
|
|
1156
|
-
this._onChangeCallback = noop
|
|
1157
|
-
this._onTouchedCallback = noop
|
|
1157
|
+
this._onChangeCallback = noop;
|
|
1158
|
+
this._onTouchedCallback = noop;
|
|
1158
1159
|
this.logPrefix = '[mat-autocomplete] ';
|
|
1159
1160
|
this.formControlName = null;
|
|
1160
1161
|
this.required = false;
|
|
@@ -1896,8 +1897,14 @@ class DateFormatPipe {
|
|
|
1896
1897
|
const date = isMoment(value) ? value : this.dateAdapter.parse(value, DATE_ISO_PATTERN);
|
|
1897
1898
|
return date && this.dateAdapter.format(date, pattern) || '';
|
|
1898
1899
|
}
|
|
1900
|
+
format(date, pattern) {
|
|
1901
|
+
return this.dateAdapter.format(date, pattern);
|
|
1902
|
+
}
|
|
1903
|
+
parse(value, parseFormat) {
|
|
1904
|
+
return isMoment(value) ? value : this.dateAdapter.parse(value, parseFormat || DATE_ISO_PATTERN);
|
|
1905
|
+
}
|
|
1899
1906
|
}
|
|
1900
|
-
DateFormatPipe.ɵprov =
|
|
1907
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1901
1908
|
DateFormatPipe.decorators = [
|
|
1902
1909
|
{ type: Pipe, args: [{
|
|
1903
1910
|
name: 'dateFormat'
|
|
@@ -1909,7 +1916,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1909
1916
|
{ type: TranslateService }
|
|
1910
1917
|
];
|
|
1911
1918
|
|
|
1912
|
-
const moment
|
|
1919
|
+
const moment = momentImported;
|
|
1913
1920
|
class DateDiffDurationPipe {
|
|
1914
1921
|
constructor(dateAdapter, translate) {
|
|
1915
1922
|
this.dateAdapter = dateAdapter;
|
|
@@ -1925,17 +1932,17 @@ class DateDiffDurationPipe {
|
|
|
1925
1932
|
return this.format(startDate, endDate);
|
|
1926
1933
|
}
|
|
1927
1934
|
format(startDate, endDate) {
|
|
1928
|
-
const duration = moment
|
|
1935
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1929
1936
|
if (duration.asMinutes() < 0)
|
|
1930
1937
|
return '';
|
|
1931
|
-
const timeDuration = moment
|
|
1938
|
+
const timeDuration = moment(0)
|
|
1932
1939
|
.hour(duration.hours())
|
|
1933
1940
|
.minute(duration.minutes());
|
|
1934
1941
|
const days = Math.floor(duration.asDays());
|
|
1935
1942
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1936
1943
|
}
|
|
1937
1944
|
}
|
|
1938
|
-
DateDiffDurationPipe.ɵprov =
|
|
1945
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1939
1946
|
DateDiffDurationPipe.decorators = [
|
|
1940
1947
|
{ type: Pipe, args: [{
|
|
1941
1948
|
name: 'dateDiffDuration'
|
|
@@ -1956,7 +1963,7 @@ class DateFromNowPipe {
|
|
|
1956
1963
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1957
1964
|
}
|
|
1958
1965
|
}
|
|
1959
|
-
DateFromNowPipe.ɵprov =
|
|
1966
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1960
1967
|
DateFromNowPipe.decorators = [
|
|
1961
1968
|
{ type: Pipe, args: [{
|
|
1962
1969
|
name: 'dateFromNow'
|
|
@@ -2025,7 +2032,7 @@ function formatToDD(value, opts) {
|
|
|
2025
2032
|
value *= -1;
|
|
2026
2033
|
}
|
|
2027
2034
|
}
|
|
2028
|
-
let degrees = roundFloat
|
|
2035
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
2029
2036
|
// Add sign
|
|
2030
2037
|
let sign = negative ? '-' : '+';
|
|
2031
2038
|
if (opts.placeholderChar) {
|
|
@@ -2076,7 +2083,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
2076
2083
|
}
|
|
2077
2084
|
let degrees = Math.trunc(value);
|
|
2078
2085
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
2079
|
-
let seconds = roundFloat
|
|
2086
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
2080
2087
|
while (seconds >= 60) {
|
|
2081
2088
|
seconds -= 60;
|
|
2082
2089
|
minutes += 1;
|
|
@@ -2144,7 +2151,7 @@ function formatToDDMM(value, opts) {
|
|
|
2144
2151
|
}
|
|
2145
2152
|
}
|
|
2146
2153
|
let degrees = Math.trunc(value);
|
|
2147
|
-
let minutes = roundFloat
|
|
2154
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
2148
2155
|
while (minutes >= 60) {
|
|
2149
2156
|
minutes -= 60;
|
|
2150
2157
|
degrees += 1;
|
|
@@ -2195,15 +2202,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
2195
2202
|
return NaN;
|
|
2196
2203
|
}
|
|
2197
2204
|
if (pattern === 'DD')
|
|
2198
|
-
return roundFloat
|
|
2205
|
+
return roundFloat(degrees, maxDecimals);
|
|
2199
2206
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
2200
2207
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
2201
2208
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
2202
2209
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
2203
2210
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
2204
|
-
return roundFloat
|
|
2211
|
+
return roundFloat(degrees, maxDecimals);
|
|
2205
2212
|
}
|
|
2206
|
-
function roundFloat
|
|
2213
|
+
function roundFloat(input, maxDecimals) {
|
|
2207
2214
|
if (maxDecimals > 0) {
|
|
2208
2215
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
2209
2216
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -2223,7 +2230,7 @@ class LatLongFormatPipe {
|
|
|
2223
2230
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
2224
2231
|
}
|
|
2225
2232
|
}
|
|
2226
|
-
LatLongFormatPipe.ɵprov =
|
|
2233
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
2227
2234
|
LatLongFormatPipe.decorators = [
|
|
2228
2235
|
{ type: Pipe, args: [{
|
|
2229
2236
|
name: 'latLongFormat'
|
|
@@ -2235,7 +2242,7 @@ class LatitudeFormatPipe {
|
|
|
2235
2242
|
this.transform = formatLatitude;
|
|
2236
2243
|
}
|
|
2237
2244
|
}
|
|
2238
|
-
LatitudeFormatPipe.ɵprov =
|
|
2245
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
2239
2246
|
LatitudeFormatPipe.decorators = [
|
|
2240
2247
|
{ type: Pipe, args: [{
|
|
2241
2248
|
name: 'latitudeFormat'
|
|
@@ -2247,7 +2254,7 @@ class LongitudeFormatPipe {
|
|
|
2247
2254
|
this.transform = formatLongitude;
|
|
2248
2255
|
}
|
|
2249
2256
|
}
|
|
2250
|
-
LongitudeFormatPipe.ɵprov =
|
|
2257
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
2251
2258
|
LongitudeFormatPipe.decorators = [
|
|
2252
2259
|
{ type: Pipe, args: [{
|
|
2253
2260
|
name: 'longitudeFormat'
|
|
@@ -2267,7 +2274,7 @@ class NumberFormatPipe {
|
|
|
2267
2274
|
}
|
|
2268
2275
|
}
|
|
2269
2276
|
}
|
|
2270
|
-
NumberFormatPipe.ɵprov =
|
|
2277
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
2271
2278
|
NumberFormatPipe.decorators = [
|
|
2272
2279
|
{ type: Pipe, args: [{
|
|
2273
2280
|
name: 'numberFormat'
|
|
@@ -2307,7 +2314,7 @@ class HighlightPipe {
|
|
|
2307
2314
|
}
|
|
2308
2315
|
}
|
|
2309
2316
|
}
|
|
2310
|
-
HighlightPipe.ɵprov =
|
|
2317
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
2311
2318
|
HighlightPipe.decorators = [
|
|
2312
2319
|
{ type: Pipe, args: [{
|
|
2313
2320
|
name: 'highlight'
|
|
@@ -2372,7 +2379,7 @@ FileSizePipe.decorators = [
|
|
|
2372
2379
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2373
2380
|
];
|
|
2374
2381
|
|
|
2375
|
-
const moment$
|
|
2382
|
+
const moment$1 = momentImported;
|
|
2376
2383
|
const tz = momentTZImported;
|
|
2377
2384
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2378
2385
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
@@ -2383,10 +2390,10 @@ class DateUtils {
|
|
|
2383
2390
|
this.toDuration = toDuration;
|
|
2384
2391
|
}
|
|
2385
2392
|
static min(date1, date2) {
|
|
2386
|
-
return date1 && date2
|
|
2393
|
+
return date1 && (!date2 || date1.isSameOrBefore(date2)) ? date1 : date2;
|
|
2387
2394
|
}
|
|
2388
2395
|
static max(date1, date2) {
|
|
2389
|
-
return
|
|
2396
|
+
return date1 && (!date2 || date1.isSameOrAfter(date2)) ? date1 : date2;
|
|
2390
2397
|
}
|
|
2391
2398
|
static equals(date1, date2) {
|
|
2392
2399
|
return DateUtils.isSame(date1, date2);
|
|
@@ -2449,32 +2456,32 @@ function fromDateISOString(value) {
|
|
|
2449
2456
|
if (!value || isMoment(value))
|
|
2450
2457
|
return value;
|
|
2451
2458
|
// Parse the input value, as a ISO date time
|
|
2452
|
-
const date = moment$
|
|
2459
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2453
2460
|
if (date.isValid())
|
|
2454
2461
|
return date;
|
|
2455
2462
|
// Not valid: trying to convert from unix timestamp
|
|
2456
2463
|
if (typeof value === 'string') {
|
|
2457
2464
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2458
2465
|
if (value.length === 10) {
|
|
2459
|
-
return moment$
|
|
2466
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2460
2467
|
}
|
|
2461
2468
|
else if (value.length === 13) {
|
|
2462
|
-
return moment$
|
|
2469
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2463
2470
|
}
|
|
2464
2471
|
}
|
|
2465
2472
|
console.warn('Unable to parse date: ' + value);
|
|
2466
2473
|
return undefined;
|
|
2467
2474
|
}
|
|
2468
2475
|
function fromUnixTimestamp(timeInSec) {
|
|
2469
|
-
return moment$
|
|
2476
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2470
2477
|
}
|
|
2471
2478
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2472
|
-
return moment$
|
|
2479
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2473
2480
|
}
|
|
2474
2481
|
function toDuration(value, unit) {
|
|
2475
2482
|
if (!value)
|
|
2476
2483
|
return undefined;
|
|
2477
|
-
const duration = moment$
|
|
2484
|
+
const duration = moment$1.duration(value, unit);
|
|
2478
2485
|
// fix 990+ ms
|
|
2479
2486
|
if (duration.milliseconds() >= 990) {
|
|
2480
2487
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2503,7 +2510,7 @@ class DurationPipe {
|
|
|
2503
2510
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2504
2511
|
}
|
|
2505
2512
|
}
|
|
2506
|
-
DurationPipe.ɵprov =
|
|
2513
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2507
2514
|
DurationPipe.decorators = [
|
|
2508
2515
|
{ type: Pipe, args: [{
|
|
2509
2516
|
name: 'duration'
|
|
@@ -2524,7 +2531,7 @@ class MathAbsPipe {
|
|
|
2524
2531
|
}
|
|
2525
2532
|
}
|
|
2526
2533
|
}
|
|
2527
|
-
MathAbsPipe.ɵprov =
|
|
2534
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2528
2535
|
MathAbsPipe.decorators = [
|
|
2529
2536
|
{ type: Pipe, args: [{
|
|
2530
2537
|
name: 'mathAbs'
|
|
@@ -2536,7 +2543,7 @@ class EvenPipe {
|
|
|
2536
2543
|
return val % 2 === 0;
|
|
2537
2544
|
}
|
|
2538
2545
|
}
|
|
2539
|
-
EvenPipe.ɵprov =
|
|
2546
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2540
2547
|
EvenPipe.decorators = [
|
|
2541
2548
|
{ type: Pipe, args: [{
|
|
2542
2549
|
name: 'even'
|
|
@@ -2548,7 +2555,7 @@ class OddPipe {
|
|
|
2548
2555
|
return val % 2 !== 0;
|
|
2549
2556
|
}
|
|
2550
2557
|
}
|
|
2551
|
-
OddPipe.ɵprov =
|
|
2558
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2552
2559
|
OddPipe.decorators = [
|
|
2553
2560
|
{ type: Pipe, args: [{
|
|
2554
2561
|
name: 'odd'
|
|
@@ -2656,7 +2663,7 @@ class MapGetPipe {
|
|
|
2656
2663
|
return val[key];
|
|
2657
2664
|
}
|
|
2658
2665
|
}
|
|
2659
|
-
MapGetPipe.ɵprov =
|
|
2666
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2660
2667
|
MapGetPipe.decorators = [
|
|
2661
2668
|
{ type: Pipe, args: [{
|
|
2662
2669
|
name: 'mapGet'
|
|
@@ -2670,7 +2677,7 @@ class MapKeysPipe {
|
|
|
2670
2677
|
return Object.keys(map);
|
|
2671
2678
|
}
|
|
2672
2679
|
}
|
|
2673
|
-
MapKeysPipe.ɵprov =
|
|
2680
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2674
2681
|
MapKeysPipe.decorators = [
|
|
2675
2682
|
{ type: Pipe, args: [{
|
|
2676
2683
|
name: 'mapKeys'
|
|
@@ -2684,7 +2691,7 @@ class MapValuesPipe {
|
|
|
2684
2691
|
return Object.values(map);
|
|
2685
2692
|
}
|
|
2686
2693
|
}
|
|
2687
|
-
MapValuesPipe.ɵprov =
|
|
2694
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2688
2695
|
MapValuesPipe.decorators = [
|
|
2689
2696
|
{ type: Pipe, args: [{
|
|
2690
2697
|
name: 'mapValues'
|
|
@@ -2697,7 +2704,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2697
2704
|
return isNotNilOrBlank(value);
|
|
2698
2705
|
}
|
|
2699
2706
|
}
|
|
2700
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2707
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2701
2708
|
IsNotNilOrBlankPipe.decorators = [
|
|
2702
2709
|
{ type: Pipe, args: [{
|
|
2703
2710
|
name: 'isNotNilOrBlank'
|
|
@@ -2709,7 +2716,7 @@ class IsNilOrBlankPipe {
|
|
|
2709
2716
|
return isNilOrBlank(value);
|
|
2710
2717
|
}
|
|
2711
2718
|
}
|
|
2712
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2719
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2713
2720
|
IsNilOrBlankPipe.decorators = [
|
|
2714
2721
|
{ type: Pipe, args: [{
|
|
2715
2722
|
name: 'isNilOrBlank'
|
|
@@ -2721,7 +2728,7 @@ class ToStringPipe {
|
|
|
2721
2728
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2722
2729
|
}
|
|
2723
2730
|
}
|
|
2724
|
-
ToStringPipe.ɵprov =
|
|
2731
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2725
2732
|
ToStringPipe.decorators = [
|
|
2726
2733
|
{ type: Pipe, args: [{
|
|
2727
2734
|
name: 'toString'
|
|
@@ -2733,7 +2740,7 @@ class StrLengthPipe {
|
|
|
2733
2740
|
return value && value.length || 0;
|
|
2734
2741
|
}
|
|
2735
2742
|
}
|
|
2736
|
-
StrLengthPipe.ɵprov =
|
|
2743
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2737
2744
|
StrLengthPipe.decorators = [
|
|
2738
2745
|
{ type: Pipe, args: [{
|
|
2739
2746
|
name: 'strLength'
|
|
@@ -2745,7 +2752,7 @@ class StrIncludesPipe {
|
|
|
2745
2752
|
return (value === null || value === void 0 ? void 0 : value.includes(searchString, position)) || false;
|
|
2746
2753
|
}
|
|
2747
2754
|
}
|
|
2748
|
-
StrIncludesPipe.ɵprov =
|
|
2755
|
+
StrIncludesPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrIncludesPipe_Factory() { return new StrIncludesPipe(); }, token: StrIncludesPipe, providedIn: "root" });
|
|
2749
2756
|
StrIncludesPipe.decorators = [
|
|
2750
2757
|
{ type: Pipe, args: [{
|
|
2751
2758
|
name: 'strIncludes'
|
|
@@ -2822,7 +2829,7 @@ class TranslateContextService {
|
|
|
2822
2829
|
return translations[keys[keys.length - 1]]; // Return the last keys translation
|
|
2823
2830
|
}
|
|
2824
2831
|
}
|
|
2825
|
-
TranslateContextService.ɵprov =
|
|
2832
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2826
2833
|
TranslateContextService.decorators = [
|
|
2827
2834
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2828
2835
|
];
|
|
@@ -2872,7 +2879,7 @@ class PropertyGetPipe {
|
|
|
2872
2879
|
args && args.defaultValue);
|
|
2873
2880
|
}
|
|
2874
2881
|
}
|
|
2875
|
-
PropertyGetPipe.ɵprov =
|
|
2882
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2876
2883
|
PropertyGetPipe.decorators = [
|
|
2877
2884
|
{ type: Pipe, args: [{
|
|
2878
2885
|
name: 'propertyGet'
|
|
@@ -2897,7 +2904,7 @@ NgInitDirective.propDecorators = {
|
|
|
2897
2904
|
ngInit: [{ type: Output }]
|
|
2898
2905
|
};
|
|
2899
2906
|
|
|
2900
|
-
const moment$
|
|
2907
|
+
const moment$2 = momentImported;
|
|
2901
2908
|
// @dynamic
|
|
2902
2909
|
class SharedValidators {
|
|
2903
2910
|
static getDoubleRegexp(maxDecimals) {
|
|
@@ -2978,7 +2985,7 @@ class SharedValidators {
|
|
|
2978
2985
|
}
|
|
2979
2986
|
static validDate(control) {
|
|
2980
2987
|
const value = control.value;
|
|
2981
|
-
const date = !value || moment$
|
|
2988
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(value, DATE_ISO_PATTERN);
|
|
2982
2989
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2983
2990
|
return { validDate: true };
|
|
2984
2991
|
}
|
|
@@ -4090,7 +4097,7 @@ class FormErrorTranslator {
|
|
|
4090
4097
|
return errorKey;
|
|
4091
4098
|
}
|
|
4092
4099
|
}
|
|
4093
|
-
FormErrorTranslator.ɵprov =
|
|
4100
|
+
FormErrorTranslator.ɵprov = ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(ɵɵinject(TranslateService), ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
4094
4101
|
FormErrorTranslator.decorators = [
|
|
4095
4102
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
4096
4103
|
];
|
|
@@ -4170,7 +4177,7 @@ class FormGetPipe {
|
|
|
4170
4177
|
return form.get(path);
|
|
4171
4178
|
}
|
|
4172
4179
|
}
|
|
4173
|
-
FormGetPipe.ɵprov =
|
|
4180
|
+
FormGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4174
4181
|
FormGetPipe.decorators = [
|
|
4175
4182
|
{ type: Pipe, args: [{
|
|
4176
4183
|
name: 'formGet'
|
|
@@ -4182,7 +4189,7 @@ class FormGetControlPipe {
|
|
|
4182
4189
|
return form.get(path);
|
|
4183
4190
|
}
|
|
4184
4191
|
}
|
|
4185
|
-
FormGetControlPipe.ɵprov =
|
|
4192
|
+
FormGetControlPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4186
4193
|
FormGetControlPipe.decorators = [
|
|
4187
4194
|
{ type: Pipe, args: [{
|
|
4188
4195
|
name: 'formGetControl'
|
|
@@ -4194,7 +4201,7 @@ class FormGetArrayPipe {
|
|
|
4194
4201
|
return form.get(path);
|
|
4195
4202
|
}
|
|
4196
4203
|
}
|
|
4197
|
-
FormGetArrayPipe.ɵprov =
|
|
4204
|
+
FormGetArrayPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4198
4205
|
FormGetArrayPipe.decorators = [
|
|
4199
4206
|
{ type: Pipe, args: [{
|
|
4200
4207
|
name: 'formGetArray'
|
|
@@ -4206,7 +4213,7 @@ class FormGetGroupPipe {
|
|
|
4206
4213
|
return form.get(path);
|
|
4207
4214
|
}
|
|
4208
4215
|
}
|
|
4209
|
-
FormGetGroupPipe.ɵprov =
|
|
4216
|
+
FormGetGroupPipe.ɵprov = ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4210
4217
|
FormGetGroupPipe.decorators = [
|
|
4211
4218
|
{ type: Pipe, args: [{
|
|
4212
4219
|
name: 'formGetGroup'
|
|
@@ -4535,9 +4542,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
4535
4542
|
const hour = parseInt(durationParts[0] || '0');
|
|
4536
4543
|
const minute = parseInt(durationParts[1] || '0');
|
|
4537
4544
|
const value = hour + (minute + 0.5) / 60;
|
|
4538
|
-
return roundFloat(value, maxDecimals);
|
|
4545
|
+
return roundFloat$1(value, maxDecimals);
|
|
4539
4546
|
}
|
|
4540
|
-
function roundFloat(input, maxDecimals) {
|
|
4547
|
+
function roundFloat$1(input, maxDecimals) {
|
|
4541
4548
|
if (maxDecimals > 0) {
|
|
4542
4549
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
4543
4550
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -4561,17 +4568,17 @@ const MASKS = {
|
|
|
4561
4568
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
4562
4569
|
}
|
|
4563
4570
|
};
|
|
4564
|
-
const noop$
|
|
4571
|
+
const noop$1 = () => {
|
|
4565
4572
|
};
|
|
4566
|
-
const ɵ0$
|
|
4573
|
+
const ɵ0$2 = noop$1;
|
|
4567
4574
|
class MatLatLongField {
|
|
4568
4575
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
4569
4576
|
this.translate = translate;
|
|
4570
4577
|
this.formBuilder = formBuilder;
|
|
4571
4578
|
this.cd = cd;
|
|
4572
4579
|
this.formGroupDir = formGroupDir;
|
|
4573
|
-
this._onChangeCallback = noop$
|
|
4574
|
-
this._onTouchedCallback = noop$
|
|
4580
|
+
this._onChangeCallback = noop$1;
|
|
4581
|
+
this._onTouchedCallback = noop$1;
|
|
4575
4582
|
this._subscription = new Subscription();
|
|
4576
4583
|
this.disabling = false;
|
|
4577
4584
|
this.writing = false;
|
|
@@ -4907,14 +4914,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4907
4914
|
},] }
|
|
4908
4915
|
];
|
|
4909
4916
|
|
|
4910
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
4917
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
4911
4918
|
provide: NG_VALUE_ACCESSOR,
|
|
4912
4919
|
useExisting: forwardRef(() => MatDate),
|
|
4913
4920
|
multi: true
|
|
4914
4921
|
};
|
|
4915
|
-
const
|
|
4916
|
-
const noop$
|
|
4917
|
-
const ɵ0$
|
|
4922
|
+
const TEXT_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4923
|
+
const noop$2 = () => { };
|
|
4924
|
+
const ɵ0$3 = noop$2;
|
|
4918
4925
|
class MatDate {
|
|
4919
4926
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4920
4927
|
this.dateAdapter = dateAdapter;
|
|
@@ -4923,13 +4930,13 @@ class MatDate {
|
|
|
4923
4930
|
this.cd = cd;
|
|
4924
4931
|
this.keyboard = keyboard;
|
|
4925
4932
|
this.formGroupDir = formGroupDir;
|
|
4926
|
-
this._onChangeCallback = noop$
|
|
4927
|
-
this._onTouchedCallback = noop$
|
|
4933
|
+
this._onChangeCallback = noop$2;
|
|
4934
|
+
this._onTouchedCallback = noop$2;
|
|
4928
4935
|
this._subscription = new Subscription();
|
|
4929
4936
|
this._writing = true;
|
|
4930
4937
|
this._disabling = false;
|
|
4931
4938
|
this._readonly = false;
|
|
4932
|
-
this.
|
|
4939
|
+
this.mask = TEXT_MASK;
|
|
4933
4940
|
this.floatLabel = 'auto';
|
|
4934
4941
|
this.compact = false;
|
|
4935
4942
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4974,22 +4981,24 @@ class MatDate {
|
|
|
4974
4981
|
this.formControl.setValidators(this.required ? [this.formControl.validator, Validators.required, SharedValidators.validDate] :
|
|
4975
4982
|
[this.formControl.validator, SharedValidators.validDate]);
|
|
4976
4983
|
}
|
|
4977
|
-
// Create the
|
|
4978
|
-
this.
|
|
4984
|
+
// Create the text control
|
|
4985
|
+
this.textControl = this.formBuilder.control(null,
|
|
4986
|
+
// Important: should copy errors from the model formControl
|
|
4987
|
+
() => this.formControl.errors);
|
|
4979
4988
|
// Get patterns to display date
|
|
4980
4989
|
this.updatePattern(this.translate.instant('COMMON.DATE_PATTERN'));
|
|
4981
4990
|
this._subscription.add(this.translate.get('COMMON.DATE_PATTERN')
|
|
4982
4991
|
.subscribe((pattern) => this.updatePattern(pattern)));
|
|
4983
|
-
this._subscription.add(this.
|
|
4992
|
+
this._subscription.add(this.textControl.valueChanges
|
|
4984
4993
|
.subscribe((value) => this.onFormChange(value)));
|
|
4985
4994
|
// Listen status changes (when done outside the component - e.g. when setErrors() is calling on the formControl)
|
|
4986
4995
|
this._subscription.add(this.formControl.statusChanges
|
|
4987
4996
|
.pipe(filter((_) => !this.readonly && !this._writing && !this._disabling) // Skip
|
|
4988
4997
|
)
|
|
4989
4998
|
.subscribe(() => {
|
|
4990
|
-
this.
|
|
4991
|
-
if (this.formControl.touched && !this.
|
|
4992
|
-
this.
|
|
4999
|
+
this.textControl.updateValueAndValidity({ emitEvent: false });
|
|
5000
|
+
if (this.formControl.touched && !this.textControl.touched) {
|
|
5001
|
+
this.textControl.markAsTouched();
|
|
4993
5002
|
}
|
|
4994
5003
|
this.markForCheck();
|
|
4995
5004
|
}));
|
|
@@ -5005,27 +5014,25 @@ class MatDate {
|
|
|
5005
5014
|
this._writing = true;
|
|
5006
5015
|
// DEBUG
|
|
5007
5016
|
//console.debug("[mat-date] writeValue() with:", value);
|
|
5008
|
-
// Convert into date
|
|
5009
|
-
|
|
5017
|
+
// Convert into date
|
|
5018
|
+
// Important: do a clone()
|
|
5019
|
+
let date = isMoment(value) ? value.clone() : fromDateISOString(value);
|
|
5010
5020
|
if (!date || !date.isValid()) {
|
|
5011
|
-
this.
|
|
5021
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5012
5022
|
if (this.formControl.value) {
|
|
5013
5023
|
this.formControl.patchValue(null, { emitEvent: false });
|
|
5014
5024
|
this._onChangeCallback(null);
|
|
5015
5025
|
}
|
|
5016
5026
|
}
|
|
5017
5027
|
else {
|
|
5018
|
-
//
|
|
5019
|
-
|
|
5020
|
-
//
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
if (this.dayControl.value !== dayStr) {
|
|
5027
|
-
// Update control
|
|
5028
|
-
this.dayControl.patchValue(dayStr, { emitEvent: false });
|
|
5028
|
+
// Move to the expected TZ (keeping local hour - e.g. midnight)
|
|
5029
|
+
date = (this.timezone && date.tz(this.timezone) || date)
|
|
5030
|
+
// Reset hour
|
|
5031
|
+
.startOf('day');
|
|
5032
|
+
const dayStr = this.dateAdapter.format(date, this.datePattern);
|
|
5033
|
+
if (this.textControl.value !== dayStr) {
|
|
5034
|
+
// Update day control
|
|
5035
|
+
this.textControl.patchValue(dayStr, { emitEvent: false });
|
|
5029
5036
|
}
|
|
5030
5037
|
}
|
|
5031
5038
|
this._writing = false;
|
|
@@ -5042,10 +5049,10 @@ class MatDate {
|
|
|
5042
5049
|
return;
|
|
5043
5050
|
this._disabling = true;
|
|
5044
5051
|
if (isDisabled) {
|
|
5045
|
-
this.
|
|
5052
|
+
this.textControl.disable({ emitEvent: false });
|
|
5046
5053
|
}
|
|
5047
5054
|
else {
|
|
5048
|
-
this.
|
|
5055
|
+
this.textControl.enable({ emitEvent: false });
|
|
5049
5056
|
}
|
|
5050
5057
|
this._disabling = false;
|
|
5051
5058
|
this.markForCheck();
|
|
@@ -5062,12 +5069,12 @@ class MatDate {
|
|
|
5062
5069
|
.locale(this.locale) // set as time as locale time
|
|
5063
5070
|
.minute(0).seconds(0).millisecond(0) // Reset hour
|
|
5064
5071
|
.utc(true);
|
|
5065
|
-
dateStr = this.dateAdapter.format(date, this.
|
|
5072
|
+
dateStr = this.dateAdapter.format(date, this.datePattern) || null;
|
|
5066
5073
|
}
|
|
5067
|
-
if (this.
|
|
5074
|
+
if (this.textControl.value !== dateStr) {
|
|
5068
5075
|
// DEBUG
|
|
5069
5076
|
//console.debug("[mat-date] onDatePickerChange() new value:", dateStr);
|
|
5070
|
-
this.
|
|
5077
|
+
this.textControl.setValue(dateStr, {
|
|
5071
5078
|
emitEvent: true // Will call onFormChange
|
|
5072
5079
|
});
|
|
5073
5080
|
}
|
|
@@ -5112,7 +5119,7 @@ class MatDate {
|
|
|
5112
5119
|
});
|
|
5113
5120
|
}
|
|
5114
5121
|
clear() {
|
|
5115
|
-
this.
|
|
5122
|
+
this.textControl.patchValue(null, { emitEvent: false });
|
|
5116
5123
|
this.formControl.setValue(null, { emitEvent: false });
|
|
5117
5124
|
this._onChangeCallback(null);
|
|
5118
5125
|
this.markAsTouched();
|
|
@@ -5121,43 +5128,70 @@ class MatDate {
|
|
|
5121
5128
|
/* -- private method -- */
|
|
5122
5129
|
updatePattern(pattern) {
|
|
5123
5130
|
pattern = pattern !== 'COMMON.DATE_PATTERN' ? pattern : 'L';
|
|
5124
|
-
if (this.
|
|
5125
|
-
this.
|
|
5126
|
-
this.dayPattern = pattern;
|
|
5131
|
+
if (this.datePattern !== pattern) {
|
|
5132
|
+
this.datePattern = pattern;
|
|
5127
5133
|
this.markForCheck();
|
|
5128
5134
|
}
|
|
5129
5135
|
}
|
|
5130
5136
|
checkIfTouched(opts) {
|
|
5131
|
-
if (this.
|
|
5137
|
+
if (this.textControl.touched) {
|
|
5132
5138
|
this._onTouchedCallback();
|
|
5133
5139
|
if (!opts || opts.emitEvent !== false) {
|
|
5134
5140
|
this.markForCheck();
|
|
5135
5141
|
}
|
|
5136
5142
|
}
|
|
5137
5143
|
}
|
|
5138
|
-
onFormChange(
|
|
5144
|
+
onFormChange(value) {
|
|
5139
5145
|
if (this._writing)
|
|
5140
5146
|
return; // Skip if call by self
|
|
5141
5147
|
this._writing = true;
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5148
|
+
// DEBUG
|
|
5149
|
+
//console.debug(`[mat-date-time] onFormChange() from event: ${event} - controls values: `, [dayStr, time]);
|
|
5150
|
+
/*if (this.dayControl.invalid) {
|
|
5151
|
+
this.formControl.markAsPending({onlySelf: true});
|
|
5152
|
+
this.formControl.setErrors({
|
|
5153
|
+
...this.formControl.errors,
|
|
5154
|
+
...this.dayControl.errors
|
|
5155
|
+
});
|
|
5156
|
+
this.formControl.markAsDirty();
|
|
5157
|
+
this._writing = false;
|
|
5158
|
+
return;
|
|
5159
|
+
}*/
|
|
5160
|
+
if (value) {
|
|
5161
|
+
// Make to remove placeholder chars
|
|
5162
|
+
while (value.indexOf(this.placeholderChar) !== -1) {
|
|
5163
|
+
value = value.replace(this.placeholderChar, '');
|
|
5164
|
+
}
|
|
5165
|
+
// Force '0' for empty month (otherwise moment will use the current month)
|
|
5166
|
+
value = value.replace('//', '/0/')
|
|
5167
|
+
// Force '0' for empty year (otherwise moment will use the current year)
|
|
5168
|
+
.replace(/\/$/, '/0');
|
|
5152
5169
|
}
|
|
5153
|
-
// Parse
|
|
5154
|
-
let
|
|
5170
|
+
// Parse date (strict = false)
|
|
5171
|
+
let date = isNotNilOrBlank(value) && this.dateAdapter.parse(value, this.datePattern) || null;
|
|
5155
5172
|
// Move to the expected TZ, and keep the local hour (= midnight) to have midnight at local time
|
|
5156
|
-
|
|
5157
|
-
|
|
5173
|
+
date = date && (this.timezone ? date.tz(this.timezone, true) : date) || null;
|
|
5174
|
+
date = date && date
|
|
5158
5175
|
.startOf('day') // Reset hour
|
|
5159
|
-
.utc()
|
|
5160
|
-
|
|
5176
|
+
.utc() // Convert to UTC (avoid TZ offset in final string)
|
|
5177
|
+
|| null;
|
|
5178
|
+
// Convert to model value (ISO date string)
|
|
5179
|
+
// IMPORTANT: If date is invalid, then keep the invalid string value
|
|
5180
|
+
// to allow SharedValidators.validDate() to raise an error
|
|
5181
|
+
const formControlValue = date && date.isValid() ? toDateISOString(date) : (value || null);
|
|
5182
|
+
if (this.formControl.value !== formControlValue) {
|
|
5183
|
+
// DEBUG
|
|
5184
|
+
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5185
|
+
// Apply to form control. => Will call writeValue()
|
|
5186
|
+
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5187
|
+
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5188
|
+
// Changes comes from inside function: use the callback
|
|
5189
|
+
this._onChangeCallback(formControlValue);
|
|
5190
|
+
// Check if need to update controls
|
|
5191
|
+
this.checkIfTouched();
|
|
5192
|
+
}
|
|
5193
|
+
// Force the day control to update its validity (same errors as formControl - see ngOnInit())
|
|
5194
|
+
this.textControl.updateValueAndValidity();
|
|
5161
5195
|
this._writing = false;
|
|
5162
5196
|
}
|
|
5163
5197
|
waitKeyboardHide(waitKeyboardDelay) {
|
|
@@ -5174,21 +5208,6 @@ class MatDate {
|
|
|
5174
5208
|
}
|
|
5175
5209
|
});
|
|
5176
5210
|
}
|
|
5177
|
-
emitChange(value) {
|
|
5178
|
-
// Get the model value
|
|
5179
|
-
const dateStr = toDateISOString(value) || null;
|
|
5180
|
-
if (this.formControl.value !== dateStr) {
|
|
5181
|
-
// DEBUG
|
|
5182
|
-
//console.debug('[mat-date] Emit new value: ' + dateStr);
|
|
5183
|
-
// Apply to form control. => Will call writeValue()
|
|
5184
|
-
// NOT NEED, because a formControl should NOT be used by multiple fields
|
|
5185
|
-
//this.formControl.setValue(dateStr, {emitEvent: false})
|
|
5186
|
-
// Changes comes from inside function: use the callback
|
|
5187
|
-
this._onChangeCallback(dateStr);
|
|
5188
|
-
// Check if need to update controls
|
|
5189
|
-
this.checkIfTouched();
|
|
5190
|
-
}
|
|
5191
|
-
}
|
|
5192
5211
|
updateTabIndex() {
|
|
5193
5212
|
if (isNil(this._tabindex) || this._tabindex === -1)
|
|
5194
5213
|
return; // skip
|
|
@@ -5201,7 +5220,7 @@ class MatDate {
|
|
|
5201
5220
|
});
|
|
5202
5221
|
}
|
|
5203
5222
|
markAsTouched(opts) {
|
|
5204
|
-
this.
|
|
5223
|
+
this.textControl.markAsTouched(opts);
|
|
5205
5224
|
this._onTouchedCallback();
|
|
5206
5225
|
this.markForCheck();
|
|
5207
5226
|
}
|
|
@@ -5215,16 +5234,16 @@ class MatDate {
|
|
|
5215
5234
|
MatDate.decorators = [
|
|
5216
5235
|
{ type: Component, args: [{
|
|
5217
5236
|
selector: 'mat-date-field',
|
|
5218
|
-
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:
|
|
5237
|
+
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",
|
|
5219
5238
|
providers: [
|
|
5220
|
-
DEFAULT_VALUE_ACCESSOR
|
|
5239
|
+
DEFAULT_VALUE_ACCESSOR,
|
|
5221
5240
|
],
|
|
5222
5241
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5223
5242
|
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%}"]
|
|
5224
5243
|
},] }
|
|
5225
5244
|
];
|
|
5226
5245
|
MatDate.ctorParameters = () => [
|
|
5227
|
-
{ type:
|
|
5246
|
+
{ type: MomentDateAdapter },
|
|
5228
5247
|
{ type: TranslateService },
|
|
5229
5248
|
{ type: FormBuilder },
|
|
5230
5249
|
{ type: ChangeDetectorRef },
|
|
@@ -5251,16 +5270,16 @@ MatDate.propDecorators = {
|
|
|
5251
5270
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5252
5271
|
};
|
|
5253
5272
|
|
|
5254
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5273
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5255
5274
|
provide: NG_VALUE_ACCESSOR,
|
|
5256
5275
|
useExisting: forwardRef(() => MatDateTime),
|
|
5257
5276
|
multi: true
|
|
5258
5277
|
};
|
|
5259
|
-
const DAY_MASK
|
|
5278
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
5260
5279
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
5261
|
-
const HOUR_MASK
|
|
5262
|
-
const noop$
|
|
5263
|
-
const ɵ0$
|
|
5280
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
5281
|
+
const noop$3 = () => { };
|
|
5282
|
+
const ɵ0$4 = noop$3;
|
|
5264
5283
|
class MatDateTime {
|
|
5265
5284
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5266
5285
|
this.dateAdapter = dateAdapter;
|
|
@@ -5269,14 +5288,14 @@ class MatDateTime {
|
|
|
5269
5288
|
this.cd = cd;
|
|
5270
5289
|
this.keyboard = keyboard;
|
|
5271
5290
|
this.formGroupDir = formGroupDir;
|
|
5272
|
-
this._onChangeCallback = noop$
|
|
5273
|
-
this._onTouchedCallback = noop$
|
|
5291
|
+
this._onChangeCallback = noop$3;
|
|
5292
|
+
this._onTouchedCallback = noop$3;
|
|
5274
5293
|
this._subscription = new Subscription();
|
|
5275
5294
|
this._writing = true;
|
|
5276
5295
|
this._disabling = false;
|
|
5277
5296
|
this._readonly = false;
|
|
5278
|
-
this.dayMask = DAY_MASK
|
|
5279
|
-
this.hourMask = HOUR_MASK
|
|
5297
|
+
this.dayMask = DAY_MASK;
|
|
5298
|
+
this.hourMask = HOUR_MASK;
|
|
5280
5299
|
this.floatLabel = 'auto';
|
|
5281
5300
|
this.compact = false;
|
|
5282
5301
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -5590,14 +5609,14 @@ MatDateTime.decorators = [
|
|
|
5590
5609
|
selector: 'mat-date-time-field',
|
|
5591
5610
|
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",
|
|
5592
5611
|
providers: [
|
|
5593
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5612
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
5594
5613
|
],
|
|
5595
5614
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5596
5615
|
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%}"]
|
|
5597
5616
|
},] }
|
|
5598
5617
|
];
|
|
5599
5618
|
MatDateTime.ctorParameters = () => [
|
|
5600
|
-
{ type:
|
|
5619
|
+
{ type: MomentDateAdapter },
|
|
5601
5620
|
{ type: TranslateService },
|
|
5602
5621
|
{ type: FormBuilder },
|
|
5603
5622
|
{ type: ChangeDetectorRef },
|
|
@@ -5624,15 +5643,15 @@ MatDateTime.propDecorators = {
|
|
|
5624
5643
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
5625
5644
|
};
|
|
5626
5645
|
|
|
5627
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5646
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5628
5647
|
provide: NG_VALUE_ACCESSOR,
|
|
5629
5648
|
useExisting: forwardRef(() => MatDateShort),
|
|
5630
5649
|
multi: true
|
|
5631
5650
|
};
|
|
5632
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
5651
|
+
const DAY_MASK$1 = [/\d/, /\d/, /\d/, /\d/];
|
|
5633
5652
|
const noop$4 = () => {
|
|
5634
5653
|
};
|
|
5635
|
-
const ɵ0$
|
|
5654
|
+
const ɵ0$5 = noop$4;
|
|
5636
5655
|
class MatDateShort {
|
|
5637
5656
|
constructor(dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
5638
5657
|
this.dateAdapter = dateAdapter;
|
|
@@ -5645,7 +5664,7 @@ class MatDateShort {
|
|
|
5645
5664
|
this._onTouchedCallback = noop$4;
|
|
5646
5665
|
this.writing = true;
|
|
5647
5666
|
this.disabling = false;
|
|
5648
|
-
this.dayMask = DAY_MASK;
|
|
5667
|
+
this.dayMask = DAY_MASK$1;
|
|
5649
5668
|
this.disabled = false;
|
|
5650
5669
|
this.floatLabel = 'auto';
|
|
5651
5670
|
this.readonly = false;
|
|
@@ -5890,7 +5909,7 @@ MatDateShort.decorators = [
|
|
|
5890
5909
|
selector: 'mat-date-short-field',
|
|
5891
5910
|
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",
|
|
5892
5911
|
providers: [
|
|
5893
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5912
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5894
5913
|
],
|
|
5895
5914
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5896
5915
|
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%}"]
|
|
@@ -5958,16 +5977,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5958
5977
|
},] }
|
|
5959
5978
|
];
|
|
5960
5979
|
|
|
5961
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5980
|
+
const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
5962
5981
|
provide: NG_VALUE_ACCESSOR,
|
|
5963
5982
|
useExisting: forwardRef(() => MatDuration),
|
|
5964
5983
|
multi: true
|
|
5965
5984
|
};
|
|
5966
5985
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5967
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5968
|
-
const noop$
|
|
5986
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5987
|
+
const noop$5 = () => {
|
|
5969
5988
|
};
|
|
5970
|
-
const ɵ0$6 = noop$
|
|
5989
|
+
const ɵ0$6 = noop$5;
|
|
5971
5990
|
class MatDuration {
|
|
5972
5991
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5973
5992
|
this.dateAdapter = dateAdapter;
|
|
@@ -5976,11 +5995,11 @@ class MatDuration {
|
|
|
5976
5995
|
this.cd = cd;
|
|
5977
5996
|
this.formGroupDir = formGroupDir;
|
|
5978
5997
|
this._subscription = new Subscription();
|
|
5979
|
-
this._onChangeCallback = noop$
|
|
5980
|
-
this._onTouchedCallback = noop$
|
|
5998
|
+
this._onChangeCallback = noop$5;
|
|
5999
|
+
this._onTouchedCallback = noop$5;
|
|
5981
6000
|
this.writing = true;
|
|
5982
6001
|
this.disabling = false;
|
|
5983
|
-
this.hourMask = HOUR_MASK;
|
|
6002
|
+
this.hourMask = HOUR_MASK$1;
|
|
5984
6003
|
this.disabled = false;
|
|
5985
6004
|
this.floatLabel = 'auto';
|
|
5986
6005
|
this.readonly = false;
|
|
@@ -6160,7 +6179,7 @@ MatDuration.decorators = [
|
|
|
6160
6179
|
selector: 'mat-duration-field',
|
|
6161
6180
|
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",
|
|
6162
6181
|
providers: [
|
|
6163
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6182
|
+
DEFAULT_VALUE_ACCESSOR$3,
|
|
6164
6183
|
],
|
|
6165
6184
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6166
6185
|
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%}"]
|
|
@@ -6217,22 +6236,22 @@ SharedMatDurationModule.decorators = [
|
|
|
6217
6236
|
},] }
|
|
6218
6237
|
];
|
|
6219
6238
|
|
|
6220
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
6239
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
6221
6240
|
provide: NG_VALUE_ACCESSOR,
|
|
6222
6241
|
useExisting: forwardRef(() => MatBooleanField),
|
|
6223
6242
|
multi: true
|
|
6224
6243
|
};
|
|
6225
|
-
const noop$
|
|
6244
|
+
const noop$6 = () => {
|
|
6226
6245
|
};
|
|
6227
|
-
const ɵ0$
|
|
6246
|
+
const ɵ0$7 = noop$6;
|
|
6228
6247
|
class MatBooleanField {
|
|
6229
6248
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
6230
6249
|
this.translate = translate;
|
|
6231
6250
|
this.formBuilder = formBuilder;
|
|
6232
6251
|
this.cd = cd;
|
|
6233
6252
|
this.formGroupDir = formGroupDir;
|
|
6234
|
-
this._onChangeCallback = noop$
|
|
6235
|
-
this._onTouchedCallback = noop$
|
|
6253
|
+
this._onChangeCallback = noop$6;
|
|
6254
|
+
this._onTouchedCallback = noop$6;
|
|
6236
6255
|
this._writing = false;
|
|
6237
6256
|
this.showRadio = false;
|
|
6238
6257
|
this.disabled = false;
|
|
@@ -6395,7 +6414,7 @@ MatBooleanField.decorators = [
|
|
|
6395
6414
|
selector: 'mat-boolean-field',
|
|
6396
6415
|
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",
|
|
6397
6416
|
providers: [
|
|
6398
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
6417
|
+
DEFAULT_VALUE_ACCESSOR$4
|
|
6399
6418
|
],
|
|
6400
6419
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6401
6420
|
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}"]
|
|
@@ -6641,7 +6660,7 @@ class MatNumpadDomService {
|
|
|
6641
6660
|
this.appRef.detachView(this.componentRef.hostView);
|
|
6642
6661
|
}
|
|
6643
6662
|
}
|
|
6644
|
-
MatNumpadDomService.ɵprov =
|
|
6663
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
6645
6664
|
MatNumpadDomService.decorators = [
|
|
6646
6665
|
{ type: Injectable, args: [{
|
|
6647
6666
|
providedIn: 'root'
|
|
@@ -7005,7 +7024,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
7005
7024
|
},] }
|
|
7006
7025
|
];
|
|
7007
7026
|
|
|
7008
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
7027
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
7009
7028
|
provide: NG_VALUE_ACCESSOR,
|
|
7010
7029
|
useExisting: forwardRef(() => MatSwipeField),
|
|
7011
7030
|
multi: true
|
|
@@ -7268,7 +7287,7 @@ MatSwipeField.decorators = [
|
|
|
7268
7287
|
{ type: Component, args: [{
|
|
7269
7288
|
selector: 'mat-swipe-field',
|
|
7270
7289
|
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",
|
|
7271
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
7290
|
+
providers: [DEFAULT_VALUE_ACCESSOR$5],
|
|
7272
7291
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7273
7292
|
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}"]
|
|
7274
7293
|
},] }
|
|
@@ -7326,14 +7345,14 @@ SharedMatSwipeModule.decorators = [
|
|
|
7326
7345
|
},] }
|
|
7327
7346
|
];
|
|
7328
7347
|
|
|
7329
|
-
const noop$
|
|
7330
|
-
const ɵ0$
|
|
7348
|
+
const noop$7 = () => { };
|
|
7349
|
+
const ɵ0$8 = noop$7;
|
|
7331
7350
|
class MatChipsField {
|
|
7332
7351
|
constructor(cd, formGroupDir) {
|
|
7333
7352
|
this.cd = cd;
|
|
7334
7353
|
this.formGroupDir = formGroupDir;
|
|
7335
|
-
this._onChangeCallback = noop$
|
|
7336
|
-
this._onTouchedCallback = noop$
|
|
7354
|
+
this._onChangeCallback = noop$7;
|
|
7355
|
+
this._onTouchedCallback = noop$7;
|
|
7337
7356
|
this.logPrefix = '[mat-chips] ';
|
|
7338
7357
|
this.formControlName = null;
|
|
7339
7358
|
this.required = false;
|
|
@@ -8205,7 +8224,7 @@ class ProgressBarService {
|
|
|
8205
8224
|
}
|
|
8206
8225
|
}
|
|
8207
8226
|
}
|
|
8208
|
-
ProgressBarService.ɵprov =
|
|
8227
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
8209
8228
|
ProgressBarService.decorators = [
|
|
8210
8229
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8211
8230
|
];
|
|
@@ -8249,7 +8268,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
8249
8268
|
return mc;
|
|
8250
8269
|
}
|
|
8251
8270
|
}
|
|
8252
|
-
AppGestureConfig.ɵprov =
|
|
8271
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
8253
8272
|
AppGestureConfig.decorators = [
|
|
8254
8273
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8255
8274
|
];
|
|
@@ -8474,7 +8493,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
8474
8493
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
8475
8494
|
}
|
|
8476
8495
|
}
|
|
8477
|
-
MatPaginatorI18n.ɵprov =
|
|
8496
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
8478
8497
|
MatPaginatorI18n.decorators = [
|
|
8479
8498
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8480
8499
|
];
|
|
@@ -8564,17 +8583,17 @@ function getColorContrast(color, bw) {
|
|
|
8564
8583
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
8565
8584
|
}
|
|
8566
8585
|
|
|
8567
|
-
const noop = () => {
|
|
8586
|
+
const noop$8 = () => {
|
|
8568
8587
|
};
|
|
8569
|
-
const ɵ0$
|
|
8588
|
+
const ɵ0$9 = noop$8;
|
|
8570
8589
|
class AppFormField {
|
|
8571
8590
|
constructor(translate, cd, injector, formGroupDir) {
|
|
8572
8591
|
this.translate = translate;
|
|
8573
8592
|
this.cd = cd;
|
|
8574
8593
|
this.injector = injector;
|
|
8575
8594
|
this.formGroupDir = formGroupDir;
|
|
8576
|
-
this._onChangeCallback = noop;
|
|
8577
|
-
this._onTouchedCallback = noop;
|
|
8595
|
+
this._onChangeCallback = noop$8;
|
|
8596
|
+
this._onTouchedCallback = noop$8;
|
|
8578
8597
|
this.readonly = false;
|
|
8579
8598
|
this.compact = false;
|
|
8580
8599
|
this.floatLabel = 'auto';
|
|
@@ -9010,14 +9029,14 @@ class AudioProvider extends StartableService {
|
|
|
9010
9029
|
});
|
|
9011
9030
|
}
|
|
9012
9031
|
}
|
|
9013
|
-
AudioProvider.ɵprov =
|
|
9032
|
+
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" });
|
|
9014
9033
|
AudioProvider.decorators = [
|
|
9015
9034
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9016
9035
|
];
|
|
9017
9036
|
AudioProvider.ctorParameters = () => [
|
|
9018
9037
|
{ type: Platform },
|
|
9019
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
9020
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
9038
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
9039
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
9021
9040
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
9022
9041
|
];
|
|
9023
9042
|
|
|
@@ -9102,7 +9121,7 @@ class Hotkeys {
|
|
|
9102
9121
|
});
|
|
9103
9122
|
}
|
|
9104
9123
|
}
|
|
9105
|
-
Hotkeys.ɵprov =
|
|
9124
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController), ɵɵinject(PopoverController)); }, token: Hotkeys, providedIn: "root" });
|
|
9106
9125
|
Hotkeys.decorators = [
|
|
9107
9126
|
{ type: Injectable, args: [{
|
|
9108
9127
|
providedIn: 'root'
|
|
@@ -9277,7 +9296,7 @@ class Base64ImageReader {
|
|
|
9277
9296
|
}
|
|
9278
9297
|
}
|
|
9279
9298
|
|
|
9280
|
-
const uuidv4
|
|
9299
|
+
const uuidv4 = uuidv4Imported;
|
|
9281
9300
|
class FileService {
|
|
9282
9301
|
constructor(platform,
|
|
9283
9302
|
//private transfer: FileTransfer,
|
|
@@ -9314,7 +9333,7 @@ class FileService {
|
|
|
9314
9333
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
9315
9334
|
if (lastSlashIndex === -1)
|
|
9316
9335
|
throw new Error('Invalid URL: ' + source);
|
|
9317
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
9336
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
9318
9337
|
// Download into the file system
|
|
9319
9338
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
9320
9339
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -9370,7 +9389,7 @@ class FileService {
|
|
|
9370
9389
|
this._started = true;
|
|
9371
9390
|
}
|
|
9372
9391
|
}
|
|
9373
|
-
FileService.ɵprov =
|
|
9392
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
9374
9393
|
FileService.decorators = [
|
|
9375
9394
|
{ type: Injectable, args: [{
|
|
9376
9395
|
providedIn: 'root',
|
|
@@ -9536,7 +9555,7 @@ class Base58 {
|
|
|
9536
9555
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
9537
9556
|
|
|
9538
9557
|
const scrypt = require('scrypt-async');
|
|
9539
|
-
const sha256
|
|
9558
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
9540
9559
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
9541
9560
|
const nacl = {
|
|
9542
9561
|
sign,
|
|
@@ -9640,7 +9659,7 @@ class CryptoService {
|
|
|
9640
9659
|
* Hash (using SHA256) a message
|
|
9641
9660
|
*/
|
|
9642
9661
|
sha256(message) {
|
|
9643
|
-
return sha256
|
|
9662
|
+
return sha256().update(message).digest('hex');
|
|
9644
9663
|
}
|
|
9645
9664
|
/**
|
|
9646
9665
|
* Hash (using SHA512) a message
|
|
@@ -9653,7 +9672,7 @@ class CryptoService {
|
|
|
9653
9672
|
return nacl.util.encodeBase64(m);
|
|
9654
9673
|
}
|
|
9655
9674
|
}
|
|
9656
|
-
CryptoService.ɵprov =
|
|
9675
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
9657
9676
|
CryptoService.decorators = [
|
|
9658
9677
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
9659
9678
|
];
|
|
@@ -10413,7 +10432,7 @@ SelectPeerModal.propDecorators = {
|
|
|
10413
10432
|
onRefresh: [{ type: Input }]
|
|
10414
10433
|
};
|
|
10415
10434
|
|
|
10416
|
-
const moment$
|
|
10435
|
+
const moment$3 = momentImported;
|
|
10417
10436
|
const SETTINGS_STORAGE_KEY = 'settings';
|
|
10418
10437
|
const SETTINGS_TRANSIENT_PROPERTIES = ['mobile', 'touchUi' /*deprecated*/];
|
|
10419
10438
|
// fixme: this constant points to static environment
|
|
@@ -10656,11 +10675,11 @@ class LocalSettingsService extends StartableService {
|
|
|
10656
10675
|
if (!feature) {
|
|
10657
10676
|
feature = {
|
|
10658
10677
|
name: featureName.toLowerCase(),
|
|
10659
|
-
lastSyncDate: moment$
|
|
10678
|
+
lastSyncDate: moment$3().toISOString()
|
|
10660
10679
|
};
|
|
10661
10680
|
}
|
|
10662
10681
|
else {
|
|
10663
|
-
feature.lastSyncDate = moment$
|
|
10682
|
+
feature.lastSyncDate = moment$3().toISOString();
|
|
10664
10683
|
}
|
|
10665
10684
|
this.saveOfflineFeature(feature);
|
|
10666
10685
|
}
|
|
@@ -10821,7 +10840,7 @@ class LocalSettingsService extends StartableService {
|
|
|
10821
10840
|
if (!page || !page.title || !page.path)
|
|
10822
10841
|
throw Error('Missing required argument \'page\', \'page.path\' or \'page.title\'');
|
|
10823
10842
|
// Set time
|
|
10824
|
-
page.time = page.time || moment$
|
|
10843
|
+
page.time = page.time || moment$3();
|
|
10825
10844
|
// Clean the title (remove <small> tags)
|
|
10826
10845
|
if (!opts || opts.removeTitleSmallTag !== false) {
|
|
10827
10846
|
const tagIndex = page.title.indexOf('</small>');
|
|
@@ -10837,18 +10856,18 @@ class LocalSettingsService extends StartableService {
|
|
|
10837
10856
|
return page;
|
|
10838
10857
|
}
|
|
10839
10858
|
}
|
|
10840
|
-
LocalSettingsService.ɵprov =
|
|
10859
|
+
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" });
|
|
10841
10860
|
LocalSettingsService.decorators = [
|
|
10842
10861
|
{ type: Injectable, args: [{
|
|
10843
|
-
providedIn: 'root'
|
|
10844
|
-
deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10862
|
+
providedIn: 'root'
|
|
10863
|
+
//deps: [APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS]
|
|
10845
10864
|
},] }
|
|
10846
10865
|
];
|
|
10847
10866
|
LocalSettingsService.ctorParameters = () => [
|
|
10848
10867
|
{ type: TranslateService },
|
|
10849
10868
|
{ type: Platform },
|
|
10850
10869
|
{ type: Storage },
|
|
10851
|
-
{ type:
|
|
10870
|
+
{ type: Environment, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10852
10871
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS,] }] },
|
|
10853
10872
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_LOCAL_SETTINGS_OPTIONS,] }] }
|
|
10854
10873
|
];
|
|
@@ -11554,7 +11573,7 @@ class NetworkService extends StartableService {
|
|
|
11554
11573
|
});
|
|
11555
11574
|
}
|
|
11556
11575
|
}
|
|
11557
|
-
NetworkService.ɵprov =
|
|
11576
|
+
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" });
|
|
11558
11577
|
NetworkService.decorators = [
|
|
11559
11578
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11560
11579
|
];
|
|
@@ -11565,16 +11584,16 @@ NetworkService.ctorParameters = () => [
|
|
|
11565
11584
|
{ type: CryptoService },
|
|
11566
11585
|
{ type: Storage },
|
|
11567
11586
|
{ type: LocalSettingsService },
|
|
11568
|
-
{ type: CacheService },
|
|
11587
|
+
{ type: CacheService$1 },
|
|
11569
11588
|
{ type: HttpClient },
|
|
11570
11589
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
11571
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
11572
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
11590
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
11591
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
11573
11592
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
11574
11593
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
11575
11594
|
];
|
|
11576
11595
|
|
|
11577
|
-
const ErrorCodes
|
|
11596
|
+
const ErrorCodes = {
|
|
11578
11597
|
UNKNOWN_ERROR: 0,
|
|
11579
11598
|
LOAD_ACCOUNT_ERROR: 1,
|
|
11580
11599
|
BAD_PASSWORD: 2,
|
|
@@ -11926,7 +11945,7 @@ class EntityStore {
|
|
|
11926
11945
|
}
|
|
11927
11946
|
catch (err) {
|
|
11928
11947
|
console.error(err);
|
|
11929
|
-
throw { code: ErrorCodes
|
|
11948
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
11930
11949
|
}
|
|
11931
11950
|
}
|
|
11932
11951
|
// Emit update event
|
|
@@ -12500,7 +12519,7 @@ class EntitiesStorage extends StartableService {
|
|
|
12500
12519
|
}
|
|
12501
12520
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
12502
12521
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
12503
|
-
EntitiesStorage.ɵprov =
|
|
12522
|
+
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" });
|
|
12504
12523
|
EntitiesStorage.decorators = [
|
|
12505
12524
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
12506
12525
|
];
|
|
@@ -12637,10 +12656,10 @@ function referentialToString(obj, properties) {
|
|
|
12637
12656
|
function referentialsToString(values, properties, separator) {
|
|
12638
12657
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
12639
12658
|
}
|
|
12640
|
-
const ɵ0$
|
|
12659
|
+
const ɵ0$a = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
12641
12660
|
const StatusList = Object.freeze([
|
|
12642
12661
|
{
|
|
12643
|
-
id: ɵ0$
|
|
12662
|
+
id: ɵ0$a,
|
|
12644
12663
|
icon: 'checkmark',
|
|
12645
12664
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
12646
12665
|
},
|
|
@@ -12915,7 +12934,7 @@ function accountToString(data) {
|
|
|
12915
12934
|
(data.lastName || '')) || '';
|
|
12916
12935
|
}
|
|
12917
12936
|
|
|
12918
|
-
const uuidv4 = uuidv4Imported;
|
|
12937
|
+
const uuidv4$1 = uuidv4Imported;
|
|
12919
12938
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
12920
12939
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
12921
12940
|
/**
|
|
@@ -12959,7 +12978,7 @@ function createTrackerLink(opts) {
|
|
|
12959
12978
|
// Skip if not tracked
|
|
12960
12979
|
if (!context || !context.tracked)
|
|
12961
12980
|
return forward(operation);
|
|
12962
|
-
const id = context.serializationKey || uuidv4();
|
|
12981
|
+
const id = context.serializationKey || uuidv4$1();
|
|
12963
12982
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
12964
12983
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
12965
12984
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -13622,7 +13641,7 @@ class GraphqlService extends StartableService {
|
|
|
13622
13641
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
13623
13642
|
|| this.toAppError(err.networkError)
|
|
13624
13643
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
13625
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
13644
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
13626
13645
|
// If graphQL: try to convert the first error found
|
|
13627
13646
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
13628
13647
|
|| this.toAppError(err)
|
|
@@ -13630,7 +13649,7 @@ class GraphqlService extends StartableService {
|
|
|
13630
13649
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
13631
13650
|
|| err;
|
|
13632
13651
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
13633
|
-
if (error && error.code === ErrorCodes
|
|
13652
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
13634
13653
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
13635
13654
|
this.onNetworkError.next(error);
|
|
13636
13655
|
}
|
|
@@ -13666,7 +13685,7 @@ class GraphqlService extends StartableService {
|
|
|
13666
13685
|
return 'ERROR.UNAUTHORIZED';
|
|
13667
13686
|
case ServerErrorCodes.FORBIDDEN:
|
|
13668
13687
|
return 'ERROR.FORBIDDEN';
|
|
13669
|
-
case ErrorCodes
|
|
13688
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
13670
13689
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
13671
13690
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
13672
13691
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -13697,7 +13716,7 @@ class GraphqlService extends StartableService {
|
|
|
13697
13716
|
return undefined;
|
|
13698
13717
|
}
|
|
13699
13718
|
}
|
|
13700
|
-
GraphqlService.ɵprov =
|
|
13719
|
+
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" });
|
|
13701
13720
|
GraphqlService.decorators = [
|
|
13702
13721
|
{ type: Injectable, args: [{
|
|
13703
13722
|
providedIn: 'root'
|
|
@@ -13714,7 +13733,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
13714
13733
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
13715
13734
|
];
|
|
13716
13735
|
|
|
13717
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
13736
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
13718
13737
|
class BaseGraphqlServiceOptions {
|
|
13719
13738
|
}
|
|
13720
13739
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -13865,8 +13884,8 @@ class BaseGraphqlService extends StartableService {
|
|
|
13865
13884
|
}
|
|
13866
13885
|
/* -- protected methods -- */
|
|
13867
13886
|
computeMutableWatchQueryId(opts) {
|
|
13868
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13869
|
-
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13887
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
13888
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
13870
13889
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
13871
13890
|
}
|
|
13872
13891
|
findMutableWatchQueries(opts) {
|
|
@@ -13936,7 +13955,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
13936
13955
|
/* ------------------------------------
|
|
13937
13956
|
* GraphQL queries
|
|
13938
13957
|
* ------------------------------------*/
|
|
13939
|
-
const Fragments
|
|
13958
|
+
const Fragments = {
|
|
13940
13959
|
account: gql `
|
|
13941
13960
|
fragment AccountFragment on AccountVO {
|
|
13942
13961
|
id
|
|
@@ -13971,14 +13990,14 @@ const Fragments$1 = {
|
|
|
13971
13990
|
}`
|
|
13972
13991
|
};
|
|
13973
13992
|
// Load account query
|
|
13974
|
-
const LoadQuery
|
|
13993
|
+
const LoadQuery = gql `
|
|
13975
13994
|
query Account {
|
|
13976
13995
|
data: account {
|
|
13977
13996
|
...AccountFragment
|
|
13978
13997
|
}
|
|
13979
13998
|
}
|
|
13980
|
-
${Fragments
|
|
13981
|
-
${Fragments
|
|
13999
|
+
${Fragments.account}
|
|
14000
|
+
${Fragments.settings}
|
|
13982
14001
|
`;
|
|
13983
14002
|
// Check email query
|
|
13984
14003
|
const IsEmailExistsQuery = gql `
|
|
@@ -13993,21 +14012,21 @@ const AccountMutations = {
|
|
|
13993
14012
|
...AccountFragment
|
|
13994
14013
|
}
|
|
13995
14014
|
}
|
|
13996
|
-
${Fragments
|
|
13997
|
-
${Fragments
|
|
14015
|
+
${Fragments.account}
|
|
14016
|
+
${Fragments.settings}`,
|
|
13998
14017
|
create: gql `mutation CreateAccount($data:AccountVOInput){
|
|
13999
14018
|
data: createAccount(account: $data){
|
|
14000
14019
|
...AccountFragment
|
|
14001
14020
|
}
|
|
14002
14021
|
}
|
|
14003
|
-
${Fragments
|
|
14004
|
-
${Fragments
|
|
14022
|
+
${Fragments.account}
|
|
14023
|
+
${Fragments.settings}`,
|
|
14005
14024
|
saveSettings: gql `mutation SaveSettings($data:UserSettingsVOInput){
|
|
14006
14025
|
data: saveSettings(settings: $data){
|
|
14007
14026
|
...UserSettingsFragment
|
|
14008
14027
|
}
|
|
14009
14028
|
}
|
|
14010
|
-
${Fragments
|
|
14029
|
+
${Fragments.settings}`
|
|
14011
14030
|
};
|
|
14012
14031
|
// Sent confirmation email
|
|
14013
14032
|
const SendConfirmEmailMutation = gql `
|
|
@@ -14322,7 +14341,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14322
14341
|
catch (error) {
|
|
14323
14342
|
console.error(error);
|
|
14324
14343
|
this.resetData();
|
|
14325
|
-
throw { code: ErrorCodes
|
|
14344
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
14326
14345
|
}
|
|
14327
14346
|
// Store pubkey+keypair
|
|
14328
14347
|
this._cache.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -14356,7 +14375,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14356
14375
|
}
|
|
14357
14376
|
catch (err) {
|
|
14358
14377
|
// If account not found, check if email is valid
|
|
14359
|
-
if (err && +(err.code) === ErrorCodes
|
|
14378
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
14360
14379
|
// Check email exists
|
|
14361
14380
|
if (data.username.indexOf('@') !== -1) {
|
|
14362
14381
|
let isEmailExists;
|
|
@@ -14368,11 +14387,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
14368
14387
|
}
|
|
14369
14388
|
// Email not exists (no account)
|
|
14370
14389
|
if (!isEmailExists) {
|
|
14371
|
-
throw { code: ErrorCodes
|
|
14390
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
14372
14391
|
}
|
|
14373
14392
|
}
|
|
14374
14393
|
// Email exists, so error = 'bad password'
|
|
14375
|
-
throw { code: ErrorCodes
|
|
14394
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
14376
14395
|
}
|
|
14377
14396
|
throw err; // resend the first error
|
|
14378
14397
|
}
|
|
@@ -14518,8 +14537,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
14518
14537
|
// Load remotely
|
|
14519
14538
|
else {
|
|
14520
14539
|
const { data } = yield this.graphql.query({
|
|
14521
|
-
query: LoadQuery
|
|
14522
|
-
error: { code: ErrorCodes
|
|
14540
|
+
query: LoadQuery,
|
|
14541
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
14523
14542
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
14524
14543
|
});
|
|
14525
14544
|
json = data;
|
|
@@ -14546,7 +14565,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14546
14565
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14547
14566
|
const isEmailExists = yield this.isEmailExists(email);
|
|
14548
14567
|
if (isEmailExists) {
|
|
14549
|
-
throw { code: ErrorCodes
|
|
14568
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
14550
14569
|
}
|
|
14551
14570
|
});
|
|
14552
14571
|
}
|
|
@@ -14582,7 +14601,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14582
14601
|
locale
|
|
14583
14602
|
},
|
|
14584
14603
|
error: {
|
|
14585
|
-
code: ErrorCodes
|
|
14604
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
14586
14605
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
14587
14606
|
}
|
|
14588
14607
|
});
|
|
@@ -14598,7 +14617,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14598
14617
|
code
|
|
14599
14618
|
},
|
|
14600
14619
|
error: {
|
|
14601
|
-
code: ErrorCodes
|
|
14620
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
14602
14621
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
14603
14622
|
}
|
|
14604
14623
|
});
|
|
@@ -14677,7 +14696,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14677
14696
|
throw error;
|
|
14678
14697
|
console.error(error);
|
|
14679
14698
|
throw {
|
|
14680
|
-
code: ErrorCodes
|
|
14699
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
14681
14700
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
14682
14701
|
};
|
|
14683
14702
|
}
|
|
@@ -14847,7 +14866,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14847
14866
|
if (!isNew) {
|
|
14848
14867
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
14849
14868
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
14850
|
-
throw { code: ErrorCodes
|
|
14869
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
14851
14870
|
}
|
|
14852
14871
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
14853
14872
|
}
|
|
@@ -14859,7 +14878,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14859
14878
|
mutation: isNew ? AccountMutations.create : AccountMutations.save,
|
|
14860
14879
|
variables: { data: json },
|
|
14861
14880
|
error: {
|
|
14862
|
-
code: ErrorCodes
|
|
14881
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
14863
14882
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
14864
14883
|
}
|
|
14865
14884
|
});
|
|
@@ -14886,7 +14905,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14886
14905
|
mutation: AccountMutations.saveSettings,
|
|
14887
14906
|
variables: { data: json },
|
|
14888
14907
|
error: {
|
|
14889
|
-
code: ErrorCodes
|
|
14908
|
+
code: ErrorCodes.SAVE_SETTINGS_ERROR,
|
|
14890
14909
|
message: 'ERROR.SAVE_SETTINGS_ERROR'
|
|
14891
14910
|
}
|
|
14892
14911
|
});
|
|
@@ -14908,7 +14927,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14908
14927
|
if (counter > 4) {
|
|
14909
14928
|
if (this._debug)
|
|
14910
14929
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
14911
|
-
throw { code: ErrorCodes
|
|
14930
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
14912
14931
|
}
|
|
14913
14932
|
// Check if valid
|
|
14914
14933
|
if (token) {
|
|
@@ -14918,7 +14937,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14918
14937
|
token
|
|
14919
14938
|
},
|
|
14920
14939
|
error: {
|
|
14921
|
-
code: ErrorCodes
|
|
14940
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
14922
14941
|
message: 'ERROR.UNAUTHORIZED'
|
|
14923
14942
|
},
|
|
14924
14943
|
fetchPolicy: 'no-cache'
|
|
@@ -14934,7 +14953,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
14934
14953
|
}
|
|
14935
14954
|
// Generate a new token
|
|
14936
14955
|
const challengeError = {
|
|
14937
|
-
code: ErrorCodes
|
|
14956
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
14938
14957
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
14939
14958
|
};
|
|
14940
14959
|
const data = yield this.graphql.query({
|
|
@@ -15012,7 +15031,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15012
15031
|
query: AccountSubscriptions.listenChanges,
|
|
15013
15032
|
variables,
|
|
15014
15033
|
error: {
|
|
15015
|
-
code: ErrorCodes
|
|
15034
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
15016
15035
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ERROR'
|
|
15017
15036
|
}
|
|
15018
15037
|
}).pipe(map(({ data }) => data),
|
|
@@ -15041,7 +15060,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
15041
15060
|
return Toasts.show(this.toastController, this.translate, opts);
|
|
15042
15061
|
}
|
|
15043
15062
|
}
|
|
15044
|
-
AccountService.ɵprov =
|
|
15063
|
+
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" });
|
|
15045
15064
|
AccountService.decorators = [
|
|
15046
15065
|
{ type: Injectable, args: [{ providedIn: 'root', deps: [ENVIRONMENT] },] }
|
|
15047
15066
|
];
|
|
@@ -15309,7 +15328,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
15309
15328
|
/* ------------------------------------
|
|
15310
15329
|
* GraphQL queries
|
|
15311
15330
|
* ------------------------------------*/
|
|
15312
|
-
const Fragments = {
|
|
15331
|
+
const Fragments$1 = {
|
|
15313
15332
|
config: gql `
|
|
15314
15333
|
fragment ConfigFragment on ConfigurationVO {
|
|
15315
15334
|
id
|
|
@@ -15336,13 +15355,13 @@ const Fragments = {
|
|
|
15336
15355
|
}
|
|
15337
15356
|
`
|
|
15338
15357
|
};
|
|
15339
|
-
const LoadQuery = gql `
|
|
15358
|
+
const LoadQuery$1 = gql `
|
|
15340
15359
|
query Configuration{
|
|
15341
15360
|
data: configuration{
|
|
15342
15361
|
...ConfigFragment
|
|
15343
15362
|
}
|
|
15344
15363
|
}
|
|
15345
|
-
${Fragments.config}
|
|
15364
|
+
${Fragments$1.config}
|
|
15346
15365
|
`;
|
|
15347
15366
|
// Save (create or update) account mutation
|
|
15348
15367
|
const SaveMutation = gql `
|
|
@@ -15351,7 +15370,7 @@ const SaveMutation = gql `
|
|
|
15351
15370
|
...ConfigFragment
|
|
15352
15371
|
}
|
|
15353
15372
|
}
|
|
15354
|
-
${Fragments.config}
|
|
15373
|
+
${Fragments$1.config}
|
|
15355
15374
|
`;
|
|
15356
15375
|
const ClearCache = gql `
|
|
15357
15376
|
query ClearCache($name: String) {
|
|
@@ -15402,12 +15421,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15402
15421
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15403
15422
|
const now = Date.now();
|
|
15404
15423
|
console.debug('[config] Loading Pod configuration...');
|
|
15405
|
-
const query = opts && opts.query || LoadQuery;
|
|
15424
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
15406
15425
|
const variables = opts && opts.variables || undefined;
|
|
15407
15426
|
const res = yield this.graphql.query({
|
|
15408
15427
|
query,
|
|
15409
15428
|
variables,
|
|
15410
|
-
error: { code: ErrorCodes
|
|
15429
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15411
15430
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
15412
15431
|
});
|
|
15413
15432
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -15440,7 +15459,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15440
15459
|
data: json
|
|
15441
15460
|
},
|
|
15442
15461
|
error: {
|
|
15443
|
-
code: ErrorCodes
|
|
15462
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
15444
15463
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
15445
15464
|
}
|
|
15446
15465
|
});
|
|
@@ -15466,7 +15485,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15466
15485
|
const res = yield this.graphql.query({
|
|
15467
15486
|
query: CacheStatistics,
|
|
15468
15487
|
variables: null,
|
|
15469
|
-
error: { code: ErrorCodes
|
|
15488
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15470
15489
|
fetchPolicy: 'network-only'
|
|
15471
15490
|
});
|
|
15472
15491
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -15482,7 +15501,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15482
15501
|
const res = yield this.graphql.query({
|
|
15483
15502
|
query: ClearCache,
|
|
15484
15503
|
variables,
|
|
15485
|
-
error: { code: ErrorCodes
|
|
15504
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
15486
15505
|
fetchPolicy: 'no-cache'
|
|
15487
15506
|
});
|
|
15488
15507
|
const data = res && res.clearCache || undefined;
|
|
@@ -15641,7 +15660,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
15641
15660
|
});
|
|
15642
15661
|
}
|
|
15643
15662
|
}
|
|
15644
|
-
ConfigService.ɵprov =
|
|
15663
|
+
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" });
|
|
15645
15664
|
ConfigService.decorators = [
|
|
15646
15665
|
{ type: Injectable, args: [{
|
|
15647
15666
|
providedIn: 'root',
|
|
@@ -15661,7 +15680,7 @@ ConfigService.ctorParameters = () => [
|
|
|
15661
15680
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
15662
15681
|
];
|
|
15663
15682
|
|
|
15664
|
-
const moment$
|
|
15683
|
+
const moment$4 = momentImported;
|
|
15665
15684
|
const AndroidOsEnvironment = Object.freeze({
|
|
15666
15685
|
DIRECTORY_DOWNLOADS: 'Download',
|
|
15667
15686
|
DIRECTORY_DOWNLOADS_OLD: 'Downloads',
|
|
@@ -15896,16 +15915,16 @@ class PlatformService extends StartableService {
|
|
|
15896
15915
|
}
|
|
15897
15916
|
// config moment lib
|
|
15898
15917
|
try {
|
|
15899
|
-
moment$
|
|
15918
|
+
moment$4.locale(event.lang);
|
|
15900
15919
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
15901
15920
|
}
|
|
15902
15921
|
// If error, fallback to en
|
|
15903
15922
|
catch (err) {
|
|
15904
|
-
moment$
|
|
15923
|
+
moment$4.locale('en');
|
|
15905
15924
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
15906
15925
|
}
|
|
15907
15926
|
// Config date adapter
|
|
15908
|
-
this.dateAdapter.setLocale(moment$
|
|
15927
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
15909
15928
|
}
|
|
15910
15929
|
});
|
|
15911
15930
|
this.settings.onChange.subscribe(data => {
|
|
@@ -15944,8 +15963,7 @@ class PlatformService extends StartableService {
|
|
|
15944
15963
|
(_a = this.checkAppVersionTimer) === null || _a === void 0 ? void 0 : _a.unsubscribe(); // Stop timer if exists
|
|
15945
15964
|
return; // Skip
|
|
15946
15965
|
}
|
|
15947
|
-
const
|
|
15948
|
-
const remoteVersion = yield this.networkService.getAppVersion(peer);
|
|
15966
|
+
const remoteVersion = yield this.networkService.getAppVersion();
|
|
15949
15967
|
if (isNilOrBlank(remoteVersion)) {
|
|
15950
15968
|
if (production && !silent)
|
|
15951
15969
|
console.error('[platform] Cannot load remote app version. Skipping version check');
|
|
@@ -15954,7 +15972,7 @@ class PlatformService extends StartableService {
|
|
|
15954
15972
|
}
|
|
15955
15973
|
if (VersionUtils.isCompatible(remoteVersion, actualVersion)) {
|
|
15956
15974
|
if (!silent)
|
|
15957
|
-
console.info(
|
|
15975
|
+
console.info(`[platform] Checking remote app version [OK] {remote: '${remoteVersion}', actual: '${actualVersion}'}`);
|
|
15958
15976
|
return;
|
|
15959
15977
|
}
|
|
15960
15978
|
// If newer version exists
|
|
@@ -16106,7 +16124,7 @@ class PlatformService extends StartableService {
|
|
|
16106
16124
|
});
|
|
16107
16125
|
}
|
|
16108
16126
|
}
|
|
16109
|
-
PlatformService.ɵprov =
|
|
16127
|
+
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" });
|
|
16110
16128
|
PlatformService.decorators = [
|
|
16111
16129
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16112
16130
|
];
|
|
@@ -16121,15 +16139,15 @@ PlatformService.ctorParameters = () => [
|
|
|
16121
16139
|
{ type: NetworkService },
|
|
16122
16140
|
{ type: AccountService },
|
|
16123
16141
|
{ type: ConfigService },
|
|
16124
|
-
{ type: CacheService },
|
|
16142
|
+
{ type: CacheService$1 },
|
|
16125
16143
|
{ type: Storage },
|
|
16126
16144
|
{ type: AudioProvider },
|
|
16127
16145
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
16128
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
16146
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
16129
16147
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
16130
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
16131
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
16132
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
16148
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
16149
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] },
|
|
16150
|
+
{ type: Downloader$1, decorators: [{ type: Optional }] }
|
|
16133
16151
|
];
|
|
16134
16152
|
|
|
16135
16153
|
class AppHelpModal {
|
|
@@ -16193,7 +16211,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
16193
16211
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
16194
16212
|
}
|
|
16195
16213
|
}
|
|
16196
|
-
MatStepperI18n.ɵprov =
|
|
16214
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
16197
16215
|
MatStepperI18n.decorators = [
|
|
16198
16216
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
16199
16217
|
];
|
|
@@ -18029,7 +18047,7 @@ function state2side(state) {
|
|
|
18029
18047
|
return 1;
|
|
18030
18048
|
}
|
|
18031
18049
|
}
|
|
18032
|
-
const ɵ0$
|
|
18050
|
+
const ɵ0$b = (defaultStateSize) => [
|
|
18033
18051
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
18034
18052
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
18035
18053
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -18037,7 +18055,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
18037
18055
|
const SCALE_OPTIONS_DEFAULT = {
|
|
18038
18056
|
startColor: rgbArrayMap.red,
|
|
18039
18057
|
startStates: [0, 2, 3],
|
|
18040
|
-
startStepsFn: ɵ0$
|
|
18058
|
+
startStepsFn: ɵ0$b
|
|
18041
18059
|
};
|
|
18042
18060
|
/**
|
|
18043
18061
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -18834,7 +18852,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
18834
18852
|
});
|
|
18835
18853
|
}
|
|
18836
18854
|
}
|
|
18837
|
-
UserSettingsValidatorService.ɵprov =
|
|
18855
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
18838
18856
|
UserSettingsValidatorService.decorators = [
|
|
18839
18857
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18840
18858
|
];
|
|
@@ -18878,7 +18896,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
18878
18896
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
18879
18897
|
}
|
|
18880
18898
|
}
|
|
18881
|
-
AccountValidatorService.ɵprov =
|
|
18899
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
18882
18900
|
AccountValidatorService.decorators = [
|
|
18883
18901
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18884
18902
|
];
|
|
@@ -19443,7 +19461,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
19443
19461
|
});
|
|
19444
19462
|
}
|
|
19445
19463
|
}
|
|
19446
|
-
LocalSettingsValidatorService.ɵprov =
|
|
19464
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
19447
19465
|
LocalSettingsValidatorService.decorators = [
|
|
19448
19466
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19449
19467
|
];
|
|
@@ -20062,7 +20080,7 @@ class IsOnFieldModePipe {
|
|
|
20062
20080
|
return value === 'FIELD';
|
|
20063
20081
|
}
|
|
20064
20082
|
}
|
|
20065
|
-
IsOnFieldModePipe.ɵprov =
|
|
20083
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
20066
20084
|
IsOnFieldModePipe.decorators = [
|
|
20067
20085
|
{ type: Pipe, args: [{
|
|
20068
20086
|
name: 'isOnField'
|
|
@@ -20074,7 +20092,7 @@ class IsNotOnFieldModePipe {
|
|
|
20074
20092
|
return value !== 'FIELD';
|
|
20075
20093
|
}
|
|
20076
20094
|
}
|
|
20077
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
20095
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
20078
20096
|
IsNotOnFieldModePipe.decorators = [
|
|
20079
20097
|
{ type: Pipe, args: [{
|
|
20080
20098
|
name: 'isNotOnField'
|
|
@@ -20089,7 +20107,7 @@ class PersonToStringPipe {
|
|
|
20089
20107
|
return PersonUtils.personToString(value);
|
|
20090
20108
|
}
|
|
20091
20109
|
}
|
|
20092
|
-
PersonToStringPipe.ɵprov =
|
|
20110
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
20093
20111
|
PersonToStringPipe.decorators = [
|
|
20094
20112
|
{ type: Pipe, args: [{
|
|
20095
20113
|
name: 'personToString'
|
|
@@ -20474,7 +20492,7 @@ class IsLoginAccountPipe {
|
|
|
20474
20492
|
return value && value.pubkey && true;
|
|
20475
20493
|
}
|
|
20476
20494
|
}
|
|
20477
|
-
IsLoginAccountPipe.ɵprov =
|
|
20495
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
20478
20496
|
IsLoginAccountPipe.decorators = [
|
|
20479
20497
|
{ type: Pipe, args: [{
|
|
20480
20498
|
name: 'isLogin'
|
|
@@ -20486,7 +20504,7 @@ class AccountToStringPipe {
|
|
|
20486
20504
|
return accountToString(value);
|
|
20487
20505
|
}
|
|
20488
20506
|
}
|
|
20489
|
-
AccountToStringPipe.ɵprov =
|
|
20507
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
20490
20508
|
AccountToStringPipe.decorators = [
|
|
20491
20509
|
{ type: Pipe, args: [{
|
|
20492
20510
|
name: 'accountToString'
|
|
@@ -20501,7 +20519,7 @@ class DepartmentToStringPipe {
|
|
|
20501
20519
|
return departmentToString(value);
|
|
20502
20520
|
}
|
|
20503
20521
|
}
|
|
20504
|
-
DepartmentToStringPipe.ɵprov =
|
|
20522
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
20505
20523
|
DepartmentToStringPipe.decorators = [
|
|
20506
20524
|
{ type: Pipe, args: [{
|
|
20507
20525
|
name: 'departmentToString'
|
|
@@ -20597,7 +20615,7 @@ class MenuService {
|
|
|
20597
20615
|
this._visibleSubject.next(value);
|
|
20598
20616
|
}
|
|
20599
20617
|
}
|
|
20600
|
-
MenuService.ɵprov =
|
|
20618
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
20601
20619
|
MenuService.decorators = [
|
|
20602
20620
|
{ type: Injectable, args: [{
|
|
20603
20621
|
providedIn: 'root'
|
|
@@ -21053,7 +21071,7 @@ class AuthGuardService {
|
|
|
21053
21071
|
}));
|
|
21054
21072
|
}
|
|
21055
21073
|
}
|
|
21056
|
-
AuthGuardService.ɵprov =
|
|
21074
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
21057
21075
|
AuthGuardService.decorators = [
|
|
21058
21076
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
21059
21077
|
];
|
|
@@ -21095,7 +21113,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21095
21113
|
query,
|
|
21096
21114
|
variables: { id },
|
|
21097
21115
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21098
|
-
error: { code: ErrorCodes
|
|
21116
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21099
21117
|
})
|
|
21100
21118
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
21101
21119
|
? (data && this.fromObject(data))
|
|
@@ -21110,7 +21128,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21110
21128
|
query,
|
|
21111
21129
|
variables: { id },
|
|
21112
21130
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
21113
|
-
error: { code: ErrorCodes
|
|
21131
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
21114
21132
|
});
|
|
21115
21133
|
// Convert to entity
|
|
21116
21134
|
return (!opts || opts.toEntity !== false)
|
|
@@ -21141,7 +21159,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21141
21159
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
21142
21160
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
21143
21161
|
variables,
|
|
21144
|
-
error: { code: ErrorCodes
|
|
21162
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
21145
21163
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
21146
21164
|
})
|
|
21147
21165
|
.pipe(map(({ data, total }) => {
|
|
@@ -21177,7 +21195,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21177
21195
|
const { data, total } = yield this.graphql.query({
|
|
21178
21196
|
query,
|
|
21179
21197
|
variables,
|
|
21180
|
-
error: { code: ErrorCodes
|
|
21198
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
21181
21199
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21182
21200
|
});
|
|
21183
21201
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -21216,7 +21234,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21216
21234
|
variables: {
|
|
21217
21235
|
filter: filter && filter.asPodObject()
|
|
21218
21236
|
},
|
|
21219
|
-
error: { code: ErrorCodes
|
|
21237
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
21220
21238
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
21221
21239
|
});
|
|
21222
21240
|
return res.total;
|
|
@@ -21252,7 +21270,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21252
21270
|
variables: {
|
|
21253
21271
|
data: json
|
|
21254
21272
|
},
|
|
21255
|
-
error: { code: ErrorCodes
|
|
21273
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21256
21274
|
update: (proxy, { data }) => {
|
|
21257
21275
|
const savedEntities = data && data.data;
|
|
21258
21276
|
if (savedEntities) {
|
|
@@ -21308,7 +21326,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21308
21326
|
variables: {
|
|
21309
21327
|
data: json
|
|
21310
21328
|
},
|
|
21311
|
-
error: { code: ErrorCodes
|
|
21329
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
21312
21330
|
update: (cache, { data }) => {
|
|
21313
21331
|
// Update entity
|
|
21314
21332
|
const savedEntity = data && data.data;
|
|
@@ -21356,7 +21374,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21356
21374
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21357
21375
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21358
21376
|
variables: { ids },
|
|
21359
|
-
error: { code: ErrorCodes
|
|
21377
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21360
21378
|
update: (cache, res) => {
|
|
21361
21379
|
// Remove from cache
|
|
21362
21380
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21397,7 +21415,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21397
21415
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
21398
21416
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
21399
21417
|
variables: { id },
|
|
21400
|
-
error: { code: ErrorCodes
|
|
21418
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
21401
21419
|
update: (proxy, res) => {
|
|
21402
21420
|
// Remove from cache
|
|
21403
21421
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -21433,7 +21451,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
21433
21451
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache',
|
|
21434
21452
|
variables,
|
|
21435
21453
|
error: {
|
|
21436
|
-
code: ErrorCodes
|
|
21454
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
21437
21455
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
21438
21456
|
}
|
|
21439
21457
|
})
|
|
@@ -21619,7 +21637,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
21619
21637
|
if (this._debug)
|
|
21620
21638
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
21621
21639
|
// Stop with an error
|
|
21622
|
-
throw { code: ErrorCodes
|
|
21640
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
21623
21641
|
}
|
|
21624
21642
|
this._editingRowCount = 0;
|
|
21625
21643
|
let data;
|
|
@@ -22490,14 +22508,14 @@ class AppTable {
|
|
|
22490
22508
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22491
22509
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
22492
22510
|
if (this.readOnly) {
|
|
22493
|
-
throw { code: ErrorCodes
|
|
22511
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22494
22512
|
}
|
|
22495
22513
|
this.resetError();
|
|
22496
22514
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
22497
22515
|
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;
|
|
22498
22516
|
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;
|
|
22499
22517
|
if (!this.confirmEditCreate()) {
|
|
22500
|
-
throw { code: ErrorCodes
|
|
22518
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
22501
22519
|
}
|
|
22502
22520
|
// Mark as saving
|
|
22503
22521
|
this.markAsSaving();
|
|
@@ -22616,7 +22634,7 @@ class AppTable {
|
|
|
22616
22634
|
var _a;
|
|
22617
22635
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22618
22636
|
if (this.readOnly) {
|
|
22619
|
-
throw { code: ErrorCodes
|
|
22637
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
22620
22638
|
}
|
|
22621
22639
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
22622
22640
|
return 0; // SKip
|
|
@@ -24196,7 +24214,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
24196
24214
|
try {
|
|
24197
24215
|
const data = yield this.dataService.load(id, opts);
|
|
24198
24216
|
if (!data)
|
|
24199
|
-
throw { code: ErrorCodes
|
|
24217
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
24200
24218
|
this._usageMode = this.computeUsageMode(data);
|
|
24201
24219
|
yield this.onEntityLoaded(data, opts);
|
|
24202
24220
|
yield this.updateView(data, opts);
|
|
@@ -24750,9 +24768,10 @@ AppInMemoryTable.propDecorators = {
|
|
|
24750
24768
|
canDelete: [{ type: Input }]
|
|
24751
24769
|
};
|
|
24752
24770
|
|
|
24753
|
-
const
|
|
24771
|
+
const SocialErrorCodes = {
|
|
24754
24772
|
LOAD_USER_EVENTS_ERROR: 50000,
|
|
24755
|
-
SAVE_USER_EVENT_ERROR: 50001
|
|
24773
|
+
SAVE_USER_EVENT_ERROR: 50001,
|
|
24774
|
+
SEND_MESSAGE_ERROR: 50003
|
|
24756
24775
|
};
|
|
24757
24776
|
|
|
24758
24777
|
var UserEvent_1;
|
|
@@ -24796,7 +24815,7 @@ UserEvent = UserEvent_1 = __decorate([
|
|
|
24796
24815
|
EntityClass({ typename: 'UserEventVO' })
|
|
24797
24816
|
], UserEvent);
|
|
24798
24817
|
|
|
24799
|
-
const
|
|
24818
|
+
const UserEventFragments = {
|
|
24800
24819
|
userEvent: gql `fragment UserEventFragment on UserEventVO {
|
|
24801
24820
|
id
|
|
24802
24821
|
issuer
|
|
@@ -24847,7 +24866,7 @@ let UserEventFilter = class UserEventFilter extends EntityFilter {
|
|
|
24847
24866
|
}
|
|
24848
24867
|
};
|
|
24849
24868
|
UserEventFilter = __decorate([
|
|
24850
|
-
EntityClass({ typename: '
|
|
24869
|
+
EntityClass({ typename: 'UserEventFilterVO' })
|
|
24851
24870
|
], UserEventFilter);
|
|
24852
24871
|
const SaveQuery = gql `
|
|
24853
24872
|
mutation SaveUserEvent($data: UserEventVOInput){
|
|
@@ -24855,7 +24874,7 @@ const SaveQuery = gql `
|
|
|
24855
24874
|
...UserEventFragment
|
|
24856
24875
|
}
|
|
24857
24876
|
}
|
|
24858
|
-
${
|
|
24877
|
+
${UserEventFragments.userEvent}
|
|
24859
24878
|
`;
|
|
24860
24879
|
const LoadAllQuery = gql `
|
|
24861
24880
|
query UserEvents($filter: UserEventFilterVOInput, $page: PageInput){
|
|
@@ -24863,7 +24882,7 @@ const LoadAllQuery = gql `
|
|
|
24863
24882
|
...LightUserEventFragment
|
|
24864
24883
|
}
|
|
24865
24884
|
}
|
|
24866
|
-
${
|
|
24885
|
+
${UserEventFragments.lightUserEvent}
|
|
24867
24886
|
`;
|
|
24868
24887
|
const DeleteByIdsMutation = gql `
|
|
24869
24888
|
mutation DeleteUserEvents($ids:[Int]){
|
|
@@ -24876,7 +24895,7 @@ const LoadAllWithContentQuery = gql `
|
|
|
24876
24895
|
...UserEventFragment
|
|
24877
24896
|
}
|
|
24878
24897
|
}
|
|
24879
|
-
${
|
|
24898
|
+
${UserEventFragments.userEvent}
|
|
24880
24899
|
`;
|
|
24881
24900
|
class UserEventService extends BaseGraphqlService {
|
|
24882
24901
|
constructor(graphql, accountService, network, translate, toastController, environment) {
|
|
@@ -24889,7 +24908,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24889
24908
|
this.environment = environment;
|
|
24890
24909
|
this._userEventActions = [];
|
|
24891
24910
|
// For DEV only
|
|
24892
|
-
this._debug = !environment.production;
|
|
24911
|
+
this._debug = environment && !environment.production;
|
|
24893
24912
|
}
|
|
24894
24913
|
/**
|
|
24895
24914
|
*
|
|
@@ -24926,7 +24945,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24926
24945
|
filter: filter && filter.asPodObject()
|
|
24927
24946
|
},
|
|
24928
24947
|
arrayFieldName: 'data',
|
|
24929
|
-
error: { code:
|
|
24948
|
+
error: { code: SocialErrorCodes.LOAD_USER_EVENTS_ERROR, message: 'SOCIAL.ERROR.LOAD_USER_EVENTS_ERROR' },
|
|
24930
24949
|
fetchPolicy: options && options.fetchPolicy || undefined
|
|
24931
24950
|
})
|
|
24932
24951
|
.pipe(map(res => {
|
|
@@ -24964,7 +24983,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
24964
24983
|
variables: {
|
|
24965
24984
|
data: json
|
|
24966
24985
|
},
|
|
24967
|
-
error: { code:
|
|
24986
|
+
error: { code: SocialErrorCodes.SAVE_USER_EVENT_ERROR, message: 'SOCIAL.ERROR.SAVE_USER_EVENT_ERROR' },
|
|
24968
24987
|
update: (proxy, { data }) => {
|
|
24969
24988
|
// Update entity
|
|
24970
24989
|
const savedEntity = data && data.data;
|
|
@@ -25148,7 +25167,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
25148
25167
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
25149
25168
|
}
|
|
25150
25169
|
}
|
|
25151
|
-
UserEventService.ɵprov =
|
|
25170
|
+
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" });
|
|
25152
25171
|
UserEventService.decorators = [
|
|
25153
25172
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25154
25173
|
];
|
|
@@ -25158,7 +25177,7 @@ UserEventService.ctorParameters = () => [
|
|
|
25158
25177
|
{ type: NetworkService },
|
|
25159
25178
|
{ type: TranslateService },
|
|
25160
25179
|
{ type: ToastController },
|
|
25161
|
-
{ type:
|
|
25180
|
+
{ type: Environment, decorators: [{ type: Optional }, { type: Inject, args: [ENVIRONMENT,] }] }
|
|
25162
25181
|
];
|
|
25163
25182
|
|
|
25164
25183
|
const ICONS_MAP = {
|
|
@@ -25285,7 +25304,7 @@ class UserEventsTable extends AppTable {
|
|
|
25285
25304
|
UserEventsTable.decorators = [
|
|
25286
25305
|
{ type: Component, args: [{
|
|
25287
25306
|
selector: 'app-user-events-table',
|
|
25288
|
-
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.
|
|
25307
|
+
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",
|
|
25289
25308
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25290
25309
|
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}"]
|
|
25291
25310
|
},] }
|
|
@@ -25305,32 +25324,309 @@ UserEventsTable.propDecorators = {
|
|
|
25305
25324
|
defaultSortDirection: [{ type: Input }]
|
|
25306
25325
|
};
|
|
25307
25326
|
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25327
|
+
const MessageTypes = {
|
|
25328
|
+
INBOX_MESSAGE: 'INBOX_MESSAGE',
|
|
25329
|
+
EMAIL: 'EMAIL',
|
|
25330
|
+
FEED: 'FEED',
|
|
25331
|
+
};
|
|
25332
|
+
const MessageTypeList = Object.freeze([
|
|
25333
|
+
{
|
|
25334
|
+
id: MessageTypes.INBOX_MESSAGE,
|
|
25335
|
+
icon: 'notifications',
|
|
25336
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.INBOX_MESSAGE'
|
|
25337
|
+
},
|
|
25338
|
+
{
|
|
25339
|
+
id: MessageTypes.EMAIL,
|
|
25340
|
+
icon: 'mail',
|
|
25341
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.EMAIL'
|
|
25342
|
+
},
|
|
25343
|
+
{
|
|
25344
|
+
id: MessageTypes.FEED,
|
|
25345
|
+
icon: 'paper',
|
|
25346
|
+
label: 'SOCIAL.MESSAGE.TYPE_ENUM.FEED'
|
|
25347
|
+
}
|
|
25348
|
+
]);
|
|
25349
|
+
// @dynamic
|
|
25350
|
+
let Message = class Message extends Entity {
|
|
25351
|
+
constructor() {
|
|
25352
|
+
super();
|
|
25353
|
+
}
|
|
25354
|
+
fromObject(source, opts) {
|
|
25355
|
+
super.fromObject(source, opts);
|
|
25356
|
+
this.type = source.type;
|
|
25357
|
+
this.issuer = source.issuer && Person.fromObject(source.issuer);
|
|
25358
|
+
this.recipients = source.recipients && source.recipients.map(Person.fromObject);
|
|
25359
|
+
this.subject = source.subject;
|
|
25360
|
+
this.body = source.body;
|
|
25361
|
+
}
|
|
25362
|
+
asObject(opts) {
|
|
25363
|
+
const target = super.asObject(opts);
|
|
25364
|
+
target.recipients = this.recipients && this.recipients.map(p => p.asObject(opts));
|
|
25365
|
+
return target;
|
|
25366
|
+
}
|
|
25367
|
+
};
|
|
25368
|
+
Message = __decorate([
|
|
25369
|
+
EntityClass({ typename: 'MessageVO' })
|
|
25370
|
+
], Message);
|
|
25371
|
+
// @dynamic
|
|
25372
|
+
let MessageFilter = class MessageFilter extends EntityFilter {
|
|
25373
|
+
fromObject(source, opts) {
|
|
25374
|
+
super.fromObject(source, opts);
|
|
25375
|
+
}
|
|
25376
|
+
buildFilter() {
|
|
25377
|
+
const filterFns = super.buildFilter();
|
|
25378
|
+
return filterFns;
|
|
25379
|
+
}
|
|
25380
|
+
};
|
|
25381
|
+
MessageFilter = __decorate([
|
|
25382
|
+
EntityClass({ typename: 'MessageFilterVO' })
|
|
25383
|
+
], MessageFilter);
|
|
25384
|
+
|
|
25385
|
+
class MessageModal {
|
|
25386
|
+
constructor(settings, viewCtrl, accountService, cd) {
|
|
25387
|
+
this.settings = settings;
|
|
25388
|
+
this.viewCtrl = viewCtrl;
|
|
25389
|
+
this.accountService = accountService;
|
|
25390
|
+
this.cd = cd;
|
|
25391
|
+
this.mobile = this.settings.mobile;
|
|
25392
|
+
}
|
|
25393
|
+
ngOnInit() {
|
|
25394
|
+
this.canSelectType = toBoolean(this.canSelectType, this.accountService.isAdmin());
|
|
25395
|
+
}
|
|
25396
|
+
ngAfterViewInit() {
|
|
25397
|
+
this.form.markAsReady({ emitEvent: false });
|
|
25398
|
+
if (this.data) {
|
|
25399
|
+
this.data.type = this.data.type || MessageTypes.INBOX_MESSAGE;
|
|
25400
|
+
this.form.setValue(this.data);
|
|
25401
|
+
}
|
|
25402
|
+
this.form.markAsLoaded();
|
|
25403
|
+
this.form.enable();
|
|
25404
|
+
}
|
|
25405
|
+
cancel(event) {
|
|
25406
|
+
this.viewCtrl.dismiss();
|
|
25407
|
+
}
|
|
25408
|
+
doSubmit(event) {
|
|
25409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25410
|
+
if (this.form.disabled)
|
|
25411
|
+
return;
|
|
25412
|
+
if (!this.form.valid) {
|
|
25413
|
+
yield AppFormUtils.waitWhilePending(this.form);
|
|
25414
|
+
if (this.form.invalid) {
|
|
25415
|
+
AppFormUtils.logFormErrors(this.form.form, '[message-modal] ');
|
|
25416
|
+
this.form.markAllAsTouched();
|
|
25417
|
+
return;
|
|
25418
|
+
}
|
|
25419
|
+
}
|
|
25420
|
+
this.markAsLoading();
|
|
25421
|
+
try {
|
|
25422
|
+
const data = this.form.value;
|
|
25423
|
+
// Disable the form
|
|
25424
|
+
this.form.disable();
|
|
25425
|
+
const entity = Message.fromObject(data);
|
|
25426
|
+
return this.viewCtrl.dismiss(entity);
|
|
25427
|
+
}
|
|
25428
|
+
catch (err) {
|
|
25429
|
+
this.form.error = err && err.message || err;
|
|
25430
|
+
this.markAsLoaded();
|
|
25431
|
+
// Enable the form
|
|
25432
|
+
this.form.enable();
|
|
25433
|
+
// Reset form error on next changes
|
|
25434
|
+
firstNotNilPromise(this.form.form.valueChanges).then(() => {
|
|
25435
|
+
this.form.error = null;
|
|
25436
|
+
this.markForCheck();
|
|
25437
|
+
});
|
|
25438
|
+
return;
|
|
25439
|
+
}
|
|
25440
|
+
});
|
|
25441
|
+
}
|
|
25442
|
+
markForCheck() {
|
|
25443
|
+
this.cd.markForCheck();
|
|
25444
|
+
}
|
|
25445
|
+
markAsLoading(opts) {
|
|
25446
|
+
this.form.markAsLoading(opts);
|
|
25447
|
+
}
|
|
25448
|
+
markAsLoaded(opts) {
|
|
25449
|
+
this.form.markAsLoaded(opts);
|
|
25317
25450
|
}
|
|
25318
25451
|
}
|
|
25452
|
+
MessageModal.decorators = [
|
|
25453
|
+
{ type: Component, args: [{
|
|
25454
|
+
selector: 'app-message-modal',
|
|
25455
|
+
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",
|
|
25456
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
25457
|
+
},] }
|
|
25458
|
+
];
|
|
25459
|
+
MessageModal.ctorParameters = () => [
|
|
25460
|
+
{ type: LocalSettingsService },
|
|
25461
|
+
{ type: ModalController },
|
|
25462
|
+
{ type: AccountService },
|
|
25463
|
+
{ type: ChangeDetectorRef }
|
|
25464
|
+
];
|
|
25465
|
+
MessageModal.propDecorators = {
|
|
25466
|
+
suggestFn: [{ type: Input }],
|
|
25467
|
+
data: [{ type: Input }],
|
|
25468
|
+
canSelectType: [{ type: Input }],
|
|
25469
|
+
form: [{ type: ViewChild, args: ['form', { static: true },] }]
|
|
25470
|
+
};
|
|
25471
|
+
|
|
25472
|
+
class MessageForm extends AppForm {
|
|
25473
|
+
constructor(injector, formBuilder, cd) {
|
|
25474
|
+
super(injector);
|
|
25475
|
+
this.formBuilder = formBuilder;
|
|
25476
|
+
this.cd = cd;
|
|
25477
|
+
this.subjectMinLength = 5;
|
|
25478
|
+
this.subjectMaxLength = 255;
|
|
25479
|
+
this.bodyMaxLength = 2000;
|
|
25480
|
+
this.bodyAutoHeight = true;
|
|
25481
|
+
this.canSelectType = false;
|
|
25482
|
+
this.types = MessageTypeList;
|
|
25483
|
+
this.mobile = this.settings.mobile;
|
|
25484
|
+
}
|
|
25485
|
+
ngOnInit() {
|
|
25486
|
+
this.setForm(this.formBuilder.group({
|
|
25487
|
+
type: [MessageTypes.INBOX_MESSAGE, Validators.required],
|
|
25488
|
+
recipients: [null, Validators.required],
|
|
25489
|
+
subject: [null, this.subjectMaxLength
|
|
25490
|
+
? Validators.compose([Validators.required, Validators.minLength(this.subjectMinLength), Validators.maxLength(this.subjectMaxLength)])
|
|
25491
|
+
: Validators.required],
|
|
25492
|
+
body: [null, this.bodyMaxLength
|
|
25493
|
+
? Validators.compose([Validators.maxLength(this.bodyMaxLength)])
|
|
25494
|
+
: Validators.required]
|
|
25495
|
+
}));
|
|
25496
|
+
const personAttributes = this.settings.getFieldDisplayAttributes('person', ['lastName', 'firstName', 'department.name']);
|
|
25497
|
+
this.registerAutocompleteField('recipients', {
|
|
25498
|
+
showAllOnFocus: false,
|
|
25499
|
+
suggestFn: this.suggestFn,
|
|
25500
|
+
filter: {
|
|
25501
|
+
statusIds: [StatusIds.TEMPORARY, StatusIds.ENABLE]
|
|
25502
|
+
},
|
|
25503
|
+
attributes: personAttributes,
|
|
25504
|
+
displayWith: PersonUtils.personToString,
|
|
25505
|
+
multiple: true,
|
|
25506
|
+
mobile: this.mobile
|
|
25507
|
+
});
|
|
25508
|
+
}
|
|
25509
|
+
isSamePerson(o1, o2) {
|
|
25510
|
+
return EntityUtils.equals(o1, o2, 'id');
|
|
25511
|
+
}
|
|
25512
|
+
markForCheck() {
|
|
25513
|
+
this.cd.markForCheck();
|
|
25514
|
+
}
|
|
25515
|
+
}
|
|
25516
|
+
MessageForm.decorators = [
|
|
25517
|
+
{ type: Component, args: [{
|
|
25518
|
+
selector: 'app-message-form',
|
|
25519
|
+
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",
|
|
25520
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
25521
|
+
styles: ["textarea.fixed-height{height:11.5em}textarea{min-height:11.5em}"]
|
|
25522
|
+
},] }
|
|
25523
|
+
];
|
|
25524
|
+
MessageForm.ctorParameters = () => [
|
|
25525
|
+
{ type: Injector },
|
|
25526
|
+
{ type: FormBuilder },
|
|
25527
|
+
{ type: ChangeDetectorRef }
|
|
25528
|
+
];
|
|
25529
|
+
MessageForm.propDecorators = {
|
|
25530
|
+
suggestFn: [{ type: Input }],
|
|
25531
|
+
subjectMinLength: [{ type: Input }],
|
|
25532
|
+
subjectMaxLength: [{ type: Input }],
|
|
25533
|
+
bodyMaxLength: [{ type: Input }],
|
|
25534
|
+
bodyAutoHeight: [{ type: Input }],
|
|
25535
|
+
canSelectType: [{ type: Input }]
|
|
25536
|
+
};
|
|
25537
|
+
|
|
25538
|
+
class SocialModule {
|
|
25539
|
+
}
|
|
25319
25540
|
SocialModule.decorators = [
|
|
25320
25541
|
{ type: NgModule, args: [{
|
|
25321
25542
|
imports: [
|
|
25322
25543
|
CommonModule,
|
|
25323
|
-
CoreModule
|
|
25544
|
+
CoreModule,
|
|
25545
|
+
SharedModule
|
|
25324
25546
|
],
|
|
25325
25547
|
declarations: [
|
|
25326
|
-
UserEventsTable
|
|
25548
|
+
UserEventsTable,
|
|
25549
|
+
MessageModal,
|
|
25550
|
+
MessageForm
|
|
25327
25551
|
],
|
|
25328
25552
|
exports: [
|
|
25329
|
-
UserEventsTable
|
|
25553
|
+
UserEventsTable,
|
|
25554
|
+
MessageModal
|
|
25330
25555
|
]
|
|
25331
25556
|
},] }
|
|
25332
25557
|
];
|
|
25333
25558
|
|
|
25559
|
+
const Mutations = {
|
|
25560
|
+
send: gql `mutation SendMessage($data: MessageVOInput){
|
|
25561
|
+
done: sendMessage(message: $data)
|
|
25562
|
+
}`
|
|
25563
|
+
};
|
|
25564
|
+
class MessageService extends BaseGraphqlService {
|
|
25565
|
+
constructor(graphql, translate, toastController, environment) {
|
|
25566
|
+
super(graphql, environment);
|
|
25567
|
+
this.graphql = graphql;
|
|
25568
|
+
this.translate = translate;
|
|
25569
|
+
this.toastController = toastController;
|
|
25570
|
+
this.environment = environment;
|
|
25571
|
+
// For DEV only
|
|
25572
|
+
this._debug = !environment.production;
|
|
25573
|
+
}
|
|
25574
|
+
/**
|
|
25575
|
+
* Send a message to recipient(s)
|
|
25576
|
+
*
|
|
25577
|
+
* @param entity
|
|
25578
|
+
* @param opts
|
|
25579
|
+
*/
|
|
25580
|
+
send(entity, opts) {
|
|
25581
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25582
|
+
// Transform into json
|
|
25583
|
+
const data = entity.asObject(MINIFY_ENTITY_FOR_POD);
|
|
25584
|
+
const now = Date.now();
|
|
25585
|
+
if (this._debug)
|
|
25586
|
+
console.debug(`[message-service] Send message...`, data);
|
|
25587
|
+
try {
|
|
25588
|
+
const { done } = yield this.graphql.mutate({
|
|
25589
|
+
mutation: Mutations.send,
|
|
25590
|
+
variables: { data },
|
|
25591
|
+
error: { code: SocialErrorCodes.SEND_MESSAGE_ERROR, message: 'SOCIAL.ERROR.SEND_MESSAGE_ERROR' }
|
|
25592
|
+
});
|
|
25593
|
+
if (this._debug)
|
|
25594
|
+
console.debug(`[message-service] Send message [OK] in ${Date.now() - now}ms`);
|
|
25595
|
+
if (done && (!opts || opts.showToast !== false)) {
|
|
25596
|
+
yield this.showToast({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' });
|
|
25597
|
+
}
|
|
25598
|
+
return done;
|
|
25599
|
+
}
|
|
25600
|
+
catch (err) {
|
|
25601
|
+
const error = err && err.message || err;
|
|
25602
|
+
console.error(error);
|
|
25603
|
+
// Show error
|
|
25604
|
+
if (!opts || opts.showToast !== false) {
|
|
25605
|
+
let message = error || 'SOCIAL.ERROR.SEND_MESSAGE_ERROR';
|
|
25606
|
+
yield this.showToast({ type: 'error', message });
|
|
25607
|
+
}
|
|
25608
|
+
return false;
|
|
25609
|
+
}
|
|
25610
|
+
});
|
|
25611
|
+
}
|
|
25612
|
+
/* -- protected methods -- */
|
|
25613
|
+
showToast(opts) {
|
|
25614
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25615
|
+
return Toasts.show(this.toastController, this.translate, Object.assign({ type: 'info', message: 'SOCIAL.INFO.MESSAGE_SENT' }, opts));
|
|
25616
|
+
});
|
|
25617
|
+
}
|
|
25618
|
+
}
|
|
25619
|
+
MessageService.ɵprov = ɵɵdefineInjectable({ factory: function MessageService_Factory() { return new MessageService(ɵɵinject(GraphqlService), ɵɵinject(TranslateService), ɵɵinject(ToastController), ɵɵinject(ENVIRONMENT, 8)); }, token: MessageService, providedIn: "root" });
|
|
25620
|
+
MessageService.decorators = [
|
|
25621
|
+
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25622
|
+
];
|
|
25623
|
+
MessageService.ctorParameters = () => [
|
|
25624
|
+
{ type: GraphqlService },
|
|
25625
|
+
{ type: TranslateService },
|
|
25626
|
+
{ type: ToastController },
|
|
25627
|
+
{ type: Environment, decorators: [{ type: Optional }, { type: Inject, args: [ENVIRONMENT,] }] }
|
|
25628
|
+
];
|
|
25629
|
+
|
|
25334
25630
|
var PersonFilter_1;
|
|
25335
25631
|
// @dynamic
|
|
25336
25632
|
let PersonFilter = PersonFilter_1 = class PersonFilter extends EntityFilter {
|
|
@@ -25529,7 +25825,7 @@ class PersonService extends BaseEntityService {
|
|
|
25529
25825
|
return target;
|
|
25530
25826
|
}
|
|
25531
25827
|
}
|
|
25532
|
-
PersonService.ɵprov =
|
|
25828
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
25533
25829
|
PersonService.decorators = [
|
|
25534
25830
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25535
25831
|
];
|
|
@@ -25560,7 +25856,7 @@ class PersonValidatorService {
|
|
|
25560
25856
|
return this.formBuilder.group(formConfig);
|
|
25561
25857
|
}
|
|
25562
25858
|
}
|
|
25563
|
-
PersonValidatorService.ɵprov =
|
|
25859
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
25564
25860
|
PersonValidatorService.decorators = [
|
|
25565
25861
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
25566
25862
|
];
|
|
@@ -25570,7 +25866,7 @@ PersonValidatorService.ctorParameters = () => [
|
|
|
25570
25866
|
];
|
|
25571
25867
|
|
|
25572
25868
|
class UsersPage extends AppTable {
|
|
25573
|
-
constructor(injector, accountService, validatorService, configService, dataService,
|
|
25869
|
+
constructor(injector, formBuilder, accountService, validatorService, configService, dataService, messageService, cd, environment) {
|
|
25574
25870
|
super(injector, RESERVED_START_COLUMNS
|
|
25575
25871
|
.concat([
|
|
25576
25872
|
'avatar',
|
|
@@ -25595,16 +25891,17 @@ class UsersPage extends AppTable {
|
|
|
25595
25891
|
this.validatorService = validatorService;
|
|
25596
25892
|
this.configService = configService;
|
|
25597
25893
|
this.dataService = dataService;
|
|
25894
|
+
this.messageService = messageService;
|
|
25598
25895
|
this.cd = cd;
|
|
25599
|
-
this.canEdit = false;
|
|
25600
25896
|
this.profiles = [...PRIORITIZED_AUTHORITIES].reverse();
|
|
25601
|
-
this.filterCriteriaCount = 0;
|
|
25602
25897
|
this.statusList = StatusList;
|
|
25603
25898
|
this.statusById = StatusById;
|
|
25899
|
+
this.filterCriteriaCount = 0;
|
|
25604
25900
|
this.useSticky = false;
|
|
25605
25901
|
this.referentialToString = referentialToString;
|
|
25606
|
-
this.inlineEdition = accountService.isAdmin(); // Allow inline edition only if admin
|
|
25607
25902
|
this.canEdit = accountService.isAdmin();
|
|
25903
|
+
this.canSendMessage = this.canEdit;
|
|
25904
|
+
this.inlineEdition = this.canEdit;
|
|
25608
25905
|
this.confirmBeforeDelete = true;
|
|
25609
25906
|
this.autoLoad = false; // Wait config loading
|
|
25610
25907
|
this.i18nColumnPrefix = 'USER.';
|
|
@@ -25697,6 +25994,39 @@ class UsersPage extends AppTable {
|
|
|
25697
25994
|
formControl.setValue(null);
|
|
25698
25995
|
return false;
|
|
25699
25996
|
}
|
|
25997
|
+
openComposeMessageModal(event) {
|
|
25998
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25999
|
+
// Get recipients
|
|
26000
|
+
const recipients = (this.selection.selected || [])
|
|
26001
|
+
.map(row => row.currentData)
|
|
26002
|
+
.map(Person.fromObject)
|
|
26003
|
+
.map(p => {
|
|
26004
|
+
var _a;
|
|
26005
|
+
const target = p.asObject({ minify: true });
|
|
26006
|
+
target.department = (_a = p.department) === null || _a === void 0 ? void 0 : _a.asObject();
|
|
26007
|
+
return target;
|
|
26008
|
+
});
|
|
26009
|
+
const hasTopModal = !!(yield this.modalCtrl.getTop());
|
|
26010
|
+
const modal = yield this.modalCtrl.create({
|
|
26011
|
+
component: MessageModal,
|
|
26012
|
+
componentProps: {
|
|
26013
|
+
suggestFn: (value, filter, sortBy, sortDirection) => this.dataService.suggest(value, filter, sortBy, sortDirection),
|
|
26014
|
+
data: {
|
|
26015
|
+
recipients
|
|
26016
|
+
}
|
|
26017
|
+
},
|
|
26018
|
+
cssClass: hasTopModal && 'stack-modal'
|
|
26019
|
+
});
|
|
26020
|
+
// Open the modal
|
|
26021
|
+
yield modal.present();
|
|
26022
|
+
// On dismiss
|
|
26023
|
+
const { data } = yield modal.onDidDismiss();
|
|
26024
|
+
if (!data || !(data instanceof Message))
|
|
26025
|
+
return; // CANCELLED
|
|
26026
|
+
console.info('[users] received message to send: ', data);
|
|
26027
|
+
yield this.messageService.send(data);
|
|
26028
|
+
});
|
|
26029
|
+
}
|
|
25700
26030
|
/* -- protected methods -- */
|
|
25701
26031
|
markForCheck() {
|
|
25702
26032
|
this.cd.markForCheck();
|
|
@@ -25705,7 +26035,7 @@ class UsersPage extends AppTable {
|
|
|
25705
26035
|
UsersPage.decorators = [
|
|
25706
26036
|
{ type: Component, args: [{
|
|
25707
26037
|
selector: 'app-users-table',
|
|
25708
|
-
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",
|
|
26038
|
+
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",
|
|
25709
26039
|
providers: [
|
|
25710
26040
|
{ provide: ValidatorService, useExisting: PersonValidatorService }
|
|
25711
26041
|
],
|
|
@@ -25716,12 +26046,13 @@ UsersPage.decorators = [
|
|
|
25716
26046
|
];
|
|
25717
26047
|
UsersPage.ctorParameters = () => [
|
|
25718
26048
|
{ type: Injector },
|
|
26049
|
+
{ type: FormBuilder },
|
|
25719
26050
|
{ type: AccountService },
|
|
25720
26051
|
{ type: ValidatorService },
|
|
25721
26052
|
{ type: ConfigService },
|
|
25722
26053
|
{ type: PersonService },
|
|
26054
|
+
{ type: MessageService },
|
|
25723
26055
|
{ type: ChangeDetectorRef },
|
|
25724
|
-
{ type: FormBuilder },
|
|
25725
26056
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] }
|
|
25726
26057
|
];
|
|
25727
26058
|
UsersPage.propDecorators = {
|
|
@@ -25748,22 +26079,24 @@ AdminModule.decorators = [
|
|
|
25748
26079
|
UsersPage
|
|
25749
26080
|
],
|
|
25750
26081
|
exports: [
|
|
26082
|
+
SocialModule,
|
|
25751
26083
|
UsersPage
|
|
25752
26084
|
]
|
|
25753
26085
|
},] }
|
|
25754
26086
|
];
|
|
25755
26087
|
AdminModule.ctorParameters = () => [];
|
|
25756
26088
|
|
|
25757
|
-
const ɵ0 = {
|
|
26089
|
+
const ɵ0$c = {
|
|
25758
26090
|
profile: 'ADMIN'
|
|
25759
26091
|
};
|
|
25760
|
-
const routes
|
|
26092
|
+
const routes = [
|
|
25761
26093
|
{
|
|
25762
26094
|
path: 'users',
|
|
25763
26095
|
pathMatch: 'full',
|
|
25764
26096
|
component: UsersPage,
|
|
25765
26097
|
canActivate: [AuthGuardService],
|
|
25766
|
-
|
|
26098
|
+
canDeactivate: [ComponentDirtyGuard],
|
|
26099
|
+
data: ɵ0$c
|
|
25767
26100
|
}
|
|
25768
26101
|
];
|
|
25769
26102
|
class AdminRoutingModule {
|
|
@@ -25773,33 +26106,27 @@ AdminRoutingModule.decorators = [
|
|
|
25773
26106
|
imports: [
|
|
25774
26107
|
SharedRoutingModule,
|
|
25775
26108
|
AdminModule,
|
|
25776
|
-
RouterModule.forChild(routes
|
|
26109
|
+
RouterModule.forChild(routes)
|
|
25777
26110
|
],
|
|
25778
26111
|
exports: [RouterModule]
|
|
25779
26112
|
},] }
|
|
25780
26113
|
];
|
|
25781
26114
|
|
|
25782
|
-
|
|
25783
|
-
LOAD_PERSONS_ERROR: 100,
|
|
25784
|
-
SAVE_PERSONS_ERROR: 101,
|
|
25785
|
-
DELETE_PERSONS_ERROR: 102,
|
|
25786
|
-
};
|
|
25787
|
-
|
|
25788
|
-
class EntityTestClass$1 {
|
|
26115
|
+
class EntityTestClass {
|
|
25789
26116
|
}
|
|
25790
|
-
const FAKE_ENTITIES
|
|
26117
|
+
const FAKE_ENTITIES = [
|
|
25791
26118
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
25792
26119
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
25793
26120
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
25794
26121
|
];
|
|
25795
|
-
function deepCopy
|
|
26122
|
+
function deepCopy(values, size) {
|
|
25796
26123
|
if (isNil(size)) {
|
|
25797
|
-
return (values || FAKE_ENTITIES
|
|
26124
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
25798
26125
|
}
|
|
25799
26126
|
let result = [];
|
|
25800
26127
|
let i = 1;
|
|
25801
26128
|
while (result.length < size) {
|
|
25802
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
26129
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
25803
26130
|
const name = entity.name + ' #' + i;
|
|
25804
26131
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
25805
26132
|
}));
|
|
@@ -25809,7 +26136,7 @@ function deepCopy$1(values, size) {
|
|
|
25809
26136
|
class AutocompleteTestPage {
|
|
25810
26137
|
constructor(formBuilder) {
|
|
25811
26138
|
this.formBuilder = formBuilder;
|
|
25812
|
-
this._items = deepCopy
|
|
26139
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
25813
26140
|
this._$items = new BehaviorSubject(undefined);
|
|
25814
26141
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
25815
26142
|
this.memoryHide = false;
|
|
@@ -25854,7 +26181,7 @@ class AutocompleteTestPage {
|
|
|
25854
26181
|
});
|
|
25855
26182
|
// From items
|
|
25856
26183
|
this.autocompleteFields.add('entity-items-large', {
|
|
25857
|
-
items: FAKE_ENTITIES
|
|
26184
|
+
items: FAKE_ENTITIES.slice(),
|
|
25858
26185
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
25859
26186
|
displayWith: this.entityToString
|
|
25860
26187
|
});
|
|
@@ -25873,13 +26200,13 @@ class AutocompleteTestPage {
|
|
|
25873
26200
|
loadData() {
|
|
25874
26201
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25875
26202
|
const data = {
|
|
25876
|
-
entity: deepCopy
|
|
26203
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
25877
26204
|
// This item is NOT in the items list => i should be displayed anyway
|
|
25878
26205
|
missingEntity: {
|
|
25879
26206
|
id: -1, label: '??', name: 'Missing item'
|
|
25880
26207
|
},
|
|
25881
|
-
disableEntity: deepCopy
|
|
25882
|
-
entities: deepCopy
|
|
26208
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2],
|
|
26209
|
+
entities: deepCopy(FAKE_ENTITIES)
|
|
25883
26210
|
};
|
|
25884
26211
|
this.form.setValue(data);
|
|
25885
26212
|
// Load observables
|
|
@@ -26026,13 +26353,13 @@ LatLongTestPage.ctorParameters = () => [
|
|
|
26026
26353
|
{ type: FormBuilder }
|
|
26027
26354
|
];
|
|
26028
26355
|
|
|
26029
|
-
const moment$
|
|
26356
|
+
const moment$5 = momentImported;
|
|
26030
26357
|
class SwipeTestPage {
|
|
26031
26358
|
constructor(formBuilder, dateFormatPipe) {
|
|
26032
26359
|
this.formBuilder = formBuilder;
|
|
26033
26360
|
this.dateFormatPipe = dateFormatPipe;
|
|
26034
26361
|
this.$dates = new BehaviorSubject(undefined);
|
|
26035
|
-
this._today = moment$
|
|
26362
|
+
this._today = moment$5().startOf('day');
|
|
26036
26363
|
this.form = formBuilder.group({
|
|
26037
26364
|
empty: [null, Validators.required],
|
|
26038
26365
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -26045,7 +26372,7 @@ class SwipeTestPage {
|
|
|
26045
26372
|
ngOnInit() {
|
|
26046
26373
|
const dates = [];
|
|
26047
26374
|
for (let d = 0; d < 7; d++) {
|
|
26048
|
-
dates[d] = moment$
|
|
26375
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
26049
26376
|
}
|
|
26050
26377
|
this.$dates.next(dates);
|
|
26051
26378
|
this.loadData();
|
|
@@ -26086,7 +26413,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
26086
26413
|
{ type: DateFormatPipe }
|
|
26087
26414
|
];
|
|
26088
26415
|
|
|
26089
|
-
const moment$
|
|
26416
|
+
const moment$6 = momentImported;
|
|
26090
26417
|
class DateTimeTestPage {
|
|
26091
26418
|
constructor(platform, formBuilder, cd) {
|
|
26092
26419
|
this.platform = platform;
|
|
@@ -26117,7 +26444,7 @@ class DateTimeTestPage {
|
|
|
26117
26444
|
// Load the form with data
|
|
26118
26445
|
loadData() {
|
|
26119
26446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26120
|
-
const now = moment$
|
|
26447
|
+
const now = moment$6();
|
|
26121
26448
|
const data = {
|
|
26122
26449
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
26123
26450
|
enable: toDateISOString(now),
|
|
@@ -26178,9 +26505,9 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
26178
26505
|
{ type: ChangeDetectorRef }
|
|
26179
26506
|
];
|
|
26180
26507
|
|
|
26181
|
-
class EntityTestClass {
|
|
26508
|
+
class EntityTestClass$1 {
|
|
26182
26509
|
}
|
|
26183
|
-
const FAKE_ENTITIES = [
|
|
26510
|
+
const FAKE_ENTITIES$1 = [
|
|
26184
26511
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
26185
26512
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
26186
26513
|
{ id: 3, label: 'CCC', name: 'Item C' },
|
|
@@ -26189,14 +26516,14 @@ const FAKE_ENTITIES = [
|
|
|
26189
26516
|
{ id: 6, label: 'FFF', name: 'Item F' },
|
|
26190
26517
|
{ id: 7, label: 'GGG', name: 'Item G' }
|
|
26191
26518
|
];
|
|
26192
|
-
function deepCopy(values, size) {
|
|
26519
|
+
function deepCopy$1(values, size) {
|
|
26193
26520
|
if (isNil(size)) {
|
|
26194
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
26521
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
26195
26522
|
}
|
|
26196
26523
|
let result = [];
|
|
26197
26524
|
let i = 1;
|
|
26198
26525
|
while (result.length < size) {
|
|
26199
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
26526
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
26200
26527
|
const name = entity.name + ' #' + i;
|
|
26201
26528
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
26202
26529
|
}));
|
|
@@ -26206,7 +26533,7 @@ function deepCopy(values, size) {
|
|
|
26206
26533
|
class ChipsTestPage {
|
|
26207
26534
|
constructor(formBuilder) {
|
|
26208
26535
|
this.formBuilder = formBuilder;
|
|
26209
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
26536
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
26210
26537
|
this._$items = new BehaviorSubject(undefined);
|
|
26211
26538
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
26212
26539
|
this.form = formBuilder.group({
|
|
@@ -26245,7 +26572,7 @@ class ChipsTestPage {
|
|
|
26245
26572
|
// Load the form with data
|
|
26246
26573
|
loadData() {
|
|
26247
26574
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26248
|
-
const items = deepCopy(FAKE_ENTITIES);
|
|
26575
|
+
const items = deepCopy$1(FAKE_ENTITIES$1);
|
|
26249
26576
|
const data = {
|
|
26250
26577
|
entity: items.slice(0, 1),
|
|
26251
26578
|
entityInitial: items.slice(1, 2),
|
|
@@ -26361,7 +26688,7 @@ NumpadTestPage.ctorParameters = () => [
|
|
|
26361
26688
|
{ type: FormBuilder }
|
|
26362
26689
|
];
|
|
26363
26690
|
|
|
26364
|
-
const moment = momentImported;
|
|
26691
|
+
const moment$7 = momentImported;
|
|
26365
26692
|
class DateTestPage {
|
|
26366
26693
|
constructor(formBuilder, cd) {
|
|
26367
26694
|
this.formBuilder = formBuilder;
|
|
@@ -26373,7 +26700,8 @@ class DateTestPage {
|
|
|
26373
26700
|
this.timezone = 'Indian/Mahe';
|
|
26374
26701
|
this.stringify = JSON.stringify;
|
|
26375
26702
|
this.form = formBuilder.group({
|
|
26376
|
-
empty: [null,
|
|
26703
|
+
empty: [null, SharedValidators.validDate],
|
|
26704
|
+
emptyRequired: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
26377
26705
|
enable: [null, Validators.required],
|
|
26378
26706
|
disable: [null, Validators.required],
|
|
26379
26707
|
readonly: [null],
|
|
@@ -26393,10 +26721,11 @@ class DateTestPage {
|
|
|
26393
26721
|
// Load the form with data
|
|
26394
26722
|
loadData() {
|
|
26395
26723
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26396
|
-
const now = moment();
|
|
26724
|
+
const now = moment$7();
|
|
26397
26725
|
const nowAtMahe = now.clone().tz(this.timezone).startOf('day');
|
|
26398
26726
|
const data = {
|
|
26399
|
-
empty:
|
|
26727
|
+
empty: null,
|
|
26728
|
+
emptyRequired: null,
|
|
26400
26729
|
enable: toDateISOString(now),
|
|
26401
26730
|
disable: now.clone(),
|
|
26402
26731
|
readonly: now.clone(),
|
|
@@ -26450,7 +26779,7 @@ class DateTestPage {
|
|
|
26450
26779
|
DateTestPage.decorators = [
|
|
26451
26780
|
{ type: Component, args: [{
|
|
26452
26781
|
selector: 'app-data-test',
|
|
26453
|
-
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"
|
|
26782
|
+
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"
|
|
26454
26783
|
},] }
|
|
26455
26784
|
];
|
|
26456
26785
|
DateTestPage.ctorParameters = () => [
|
|
@@ -26470,7 +26799,7 @@ const SHARED_MATERIAL_TESTING_PAGES = [
|
|
|
26470
26799
|
{ label: 'Shared directives', divider: true },
|
|
26471
26800
|
{ label: 'Badge icon directive', page: '/testing/shared/badge-icon' }
|
|
26472
26801
|
];
|
|
26473
|
-
const routes$
|
|
26802
|
+
const routes$1 = [
|
|
26474
26803
|
{
|
|
26475
26804
|
path: '',
|
|
26476
26805
|
pathMatch: 'full',
|
|
@@ -26527,7 +26856,7 @@ MaterialTestingModule.decorators = [
|
|
|
26527
26856
|
ReactiveFormsModule,
|
|
26528
26857
|
SharedMaterialModule,
|
|
26529
26858
|
TranslateModule.forChild(),
|
|
26530
|
-
RouterModule.forChild(routes$
|
|
26859
|
+
RouterModule.forChild(routes$1)
|
|
26531
26860
|
],
|
|
26532
26861
|
declarations: [
|
|
26533
26862
|
DateTimeTestPage,
|
|
@@ -26588,7 +26917,7 @@ ToastTestingPage.ctorParameters = () => [
|
|
|
26588
26917
|
{ type: TranslateService }
|
|
26589
26918
|
];
|
|
26590
26919
|
|
|
26591
|
-
const routes$
|
|
26920
|
+
const routes$2 = [
|
|
26592
26921
|
{
|
|
26593
26922
|
path: 'toast',
|
|
26594
26923
|
pathMatch: 'full',
|
|
@@ -26603,7 +26932,7 @@ ToastTestingModule.decorators = [
|
|
|
26603
26932
|
CommonModule,
|
|
26604
26933
|
IonicModule,
|
|
26605
26934
|
TranslateModule.forChild(),
|
|
26606
|
-
RouterModule.forChild(routes$
|
|
26935
|
+
RouterModule.forChild(routes$2)
|
|
26607
26936
|
],
|
|
26608
26937
|
declarations: [
|
|
26609
26938
|
ToastTestingPage
|
|
@@ -26666,7 +26995,7 @@ UploadFileTestingPage.ctorParameters = () => [
|
|
|
26666
26995
|
{ type: PopoverController }
|
|
26667
26996
|
];
|
|
26668
26997
|
|
|
26669
|
-
const routes$
|
|
26998
|
+
const routes$3 = [
|
|
26670
26999
|
{
|
|
26671
27000
|
path: 'upload-file',
|
|
26672
27001
|
pathMatch: 'full',
|
|
@@ -26681,7 +27010,7 @@ UploadFileTestingModule.decorators = [
|
|
|
26681
27010
|
CommonModule,
|
|
26682
27011
|
IonicModule,
|
|
26683
27012
|
TranslateModule.forChild(),
|
|
26684
|
-
RouterModule.forChild(routes$
|
|
27013
|
+
RouterModule.forChild(routes$3)
|
|
26685
27014
|
],
|
|
26686
27015
|
declarations: [
|
|
26687
27016
|
UploadFileTestingPage
|
|
@@ -27062,7 +27391,7 @@ TextPopoverTestingPage.ctorParameters = () => [
|
|
|
27062
27391
|
{ type: PopoverController }
|
|
27063
27392
|
];
|
|
27064
27393
|
|
|
27065
|
-
const routes$
|
|
27394
|
+
const routes$4 = [
|
|
27066
27395
|
{
|
|
27067
27396
|
path: 'text-popover',
|
|
27068
27397
|
pathMatch: 'full',
|
|
@@ -27077,7 +27406,7 @@ TextPopoverTestingModule.decorators = [
|
|
|
27077
27406
|
CommonModule,
|
|
27078
27407
|
IonicModule,
|
|
27079
27408
|
TranslateModule.forChild(),
|
|
27080
|
-
RouterModule.forChild(routes$
|
|
27409
|
+
RouterModule.forChild(routes$4)
|
|
27081
27410
|
],
|
|
27082
27411
|
declarations: [
|
|
27083
27412
|
TextPopoverTestingPage
|
|
@@ -27094,7 +27423,7 @@ const CORE_TESTING_PAGES = [
|
|
|
27094
27423
|
{ label: 'Table', page: '/testing/core/table' },
|
|
27095
27424
|
{ label: 'Text popover', page: '/testing/core/text-popover' }
|
|
27096
27425
|
];
|
|
27097
|
-
const routes = [
|
|
27426
|
+
const routes$5 = [
|
|
27098
27427
|
{
|
|
27099
27428
|
path: '',
|
|
27100
27429
|
pathMatch: 'full',
|
|
@@ -27118,7 +27447,7 @@ CoreTestingModule.decorators = [
|
|
|
27118
27447
|
imports: [
|
|
27119
27448
|
CommonModule,
|
|
27120
27449
|
TranslateModule.forChild(),
|
|
27121
|
-
RouterModule.forChild(routes),
|
|
27450
|
+
RouterModule.forChild(routes$5),
|
|
27122
27451
|
// Sub modules
|
|
27123
27452
|
TableTestingModule,
|
|
27124
27453
|
TextPopoverTestingModule
|
|
@@ -27138,5 +27467,5 @@ CoreTestingModule.decorators = [
|
|
|
27138
27467
|
* Generated bundle index. Do not edit.
|
|
27139
27468
|
*/
|
|
27140
27469
|
|
|
27141
|
-
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,
|
|
27470
|
+
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 };
|
|
27142
27471
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|