@sumaris-net/ngx-components 0.26.4 → 0.26.5
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 +284 -306
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +3 -3
- package/esm2015/src/app/core/form/form.class.js +3 -3
- package/esm2015/src/app/core/table/table.class.js +3 -3
- package/esm2015/src/app/shared/material/badge/badge-icon.directive.js +8 -6
- package/esm2015/src/app/shared/pipes/form.pipes.js +3 -3
- package/esm2015/src/app/shared/validator/form-error-adapter.class.js +5 -5
- package/fesm2015/sumaris-net.ngx-components.js +271 -284
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +2 -2
- package/src/app/core/form/form.class.d.ts +2 -2
- package/src/app/core/table/table.class.d.ts +2 -2
- package/src/app/shared/pipes/form.pipes.d.ts +2 -2
- package/src/app/shared/validator/form-error-adapter.class.d.ts +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InjectionToken, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, HostBinding, Output, ViewChild, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, Injector, Renderer2 } from '@angular/core';
|
|
3
|
-
import * as i1$3 from '@angular/common';
|
|
1
|
+
import { InjectionToken, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, ChangeDetectorRef, Optional, Input, HostBinding, Output, ViewChild, ɵɵdefineInjectable, ɵɵinject, Pipe, Injectable, Directive, Inject, NgModule, ElementRef, ViewChildren, HostListener, ComponentFactoryResolver, ApplicationRef, INJECTOR, Injector, Renderer2 } 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,21 +27,16 @@ 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 { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
|
|
39
34
|
import { timer, merge, fromEvent, Subscription, BehaviorSubject, Subject, isObservable, of, noop as noop$8, Observable, defer, from, combineLatest, EMPTY } from 'rxjs';
|
|
40
35
|
import { filter, first, map, takeUntil, startWith, debounceTime, takeWhile, switchMap, tap, distinctUntilChanged, mergeMap, catchError, throttleTime } from 'rxjs/operators';
|
|
41
|
-
import * as i1$1 from '@ngx-translate/core';
|
|
42
36
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
|
-
import * as i1$4 from '@ionic/angular';
|
|
44
37
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent } from '@ionic/angular';
|
|
45
38
|
import * as momentImported from 'moment';
|
|
46
39
|
import { isMoment } from 'moment';
|
|
47
|
-
import * as i1 from '@angular/material-moment-adapter';
|
|
48
40
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
49
41
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
50
42
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
@@ -54,38 +46,32 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
54
46
|
import { MatDividerModule } from '@angular/material/divider';
|
|
55
47
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
56
48
|
import { MatChipsModule } from '@angular/material/chips';
|
|
57
|
-
import * as i3$3 from '@angular/router';
|
|
58
49
|
import { Router, RouterModule, RouteReuseStrategy, ActivatedRoute } from '@angular/router';
|
|
59
|
-
import * as i1$5 from '@angular/platform-browser';
|
|
60
50
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
61
|
-
import * as i2$2 from '@angular/common/http';
|
|
62
51
|
import { HttpResponse, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
63
52
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
64
|
-
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
65
|
-
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
53
|
+
import { NativeAudio as NativeAudio$1 } from '@ionic-native/native-audio/ngx';
|
|
54
|
+
import { Vibration as Vibration$1 } from '@ionic-native/vibration/ngx';
|
|
66
55
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
56
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx/index';
|
|
57
|
+
import { Vibration } from '@ionic-native/vibration/ngx/index';
|
|
58
|
+
import { AudioManagement as AudioManagement$1 } from '@ionic-native/audio-management/ngx/index';
|
|
70
59
|
import * as uuidv4Imported from 'uuid/v4';
|
|
71
60
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
72
61
|
import { MarkdownModule } from 'ngx-markdown';
|
|
73
62
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
74
|
-
import * as i3$1 from '@ionic/storage';
|
|
75
63
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
76
64
|
import 'zone.js/dist/zone-error';
|
|
77
|
-
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
|
78
|
-
import { Connection, Network } from '@ionic-native/network/ngx';
|
|
79
|
-
import { CacheService, CacheModule } from 'ionic-cache';
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
|
-
import * as i2$4 from '@angular/cdk/platform';
|
|
65
|
+
import { SplashScreen as SplashScreen$1 } from '@ionic-native/splash-screen/ngx';
|
|
66
|
+
import { Connection, Network as Network$1 } from '@ionic-native/network/ngx';
|
|
67
|
+
import { CacheService as CacheService$1, CacheModule } from 'ionic-cache';
|
|
68
|
+
import { CacheService } from 'ionic-cache/dist/cache.service';
|
|
69
|
+
import { Network } from '@ionic-native/network/ngx/index';
|
|
70
|
+
import { SplashScreen } from '@ionic-native/splash-screen/ngx/index';
|
|
71
|
+
import { StatusBar as StatusBar$1 } from '@ionic-native/status-bar/ngx';
|
|
85
72
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
86
|
-
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
73
|
+
import { InAppBrowser as InAppBrowser$1 } from '@ionic-native/in-app-browser/ngx';
|
|
87
74
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
88
|
-
import * as i2$3 from 'apollo-angular';
|
|
89
75
|
import { Apollo } from 'apollo-angular';
|
|
90
76
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
91
77
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -93,14 +79,13 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
93
79
|
import QueueLink from 'apollo-link-queue';
|
|
94
80
|
import SerializingLink from 'apollo-link-serialize';
|
|
95
81
|
import loggerLink from 'apollo-link-logger';
|
|
96
|
-
import * as i3$2 from 'apollo-angular/http';
|
|
97
82
|
import { HttpLink } from 'apollo-angular/http';
|
|
98
83
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
99
|
-
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
100
|
-
import
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
84
|
+
import { NotificationVisibility, Downloader as Downloader$1 } from '@ionic-native/downloader/ngx';
|
|
85
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx/index';
|
|
86
|
+
import { Keyboard as Keyboard$1 } from '@ionic-native/keyboard/ngx/index';
|
|
87
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx/index';
|
|
88
|
+
import { Downloader } from '@ionic-native/downloader/ngx/index';
|
|
104
89
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
105
90
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
106
91
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -885,19 +870,19 @@ class MatAutocompleteConfigHolder {
|
|
|
885
870
|
return this.fields[fieldName] || this.add(fieldName);
|
|
886
871
|
}
|
|
887
872
|
}
|
|
888
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
873
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
889
874
|
provide: NG_VALUE_ACCESSOR,
|
|
890
875
|
useExisting: forwardRef(() => MatAutocompleteField),
|
|
891
876
|
multi: true
|
|
892
877
|
};
|
|
893
|
-
const noop
|
|
894
|
-
const ɵ0
|
|
878
|
+
const noop = () => { };
|
|
879
|
+
const ɵ0 = noop;
|
|
895
880
|
class MatAutocompleteField {
|
|
896
881
|
constructor(cd, formGroupDir) {
|
|
897
882
|
this.cd = cd;
|
|
898
883
|
this.formGroupDir = formGroupDir;
|
|
899
|
-
this._onChangeCallback = noop
|
|
900
|
-
this._onTouchedCallback = noop
|
|
884
|
+
this._onChangeCallback = noop;
|
|
885
|
+
this._onTouchedCallback = noop;
|
|
901
886
|
this._subscription = new Subscription();
|
|
902
887
|
this._filter$ = new BehaviorSubject(undefined);
|
|
903
888
|
this._reload$ = new Subject();
|
|
@@ -1491,7 +1476,7 @@ MatAutocompleteField.decorators = [
|
|
|
1491
1476
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1492
1477
|
selector: 'mat-autocomplete-field',
|
|
1493
1478
|
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- readonly -->\n <ng-container>\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n [compareWith]=\"compareWith\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as isLast\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"filterInputTextFocusInEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.opened && onDropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [class.cdk-visually-hidden]=\"!searchable\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count \" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\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 <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"onDropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\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 <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
1494
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
1479
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
1495
1480
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1496
1481
|
styles: [":host{display:inline-block;position:relative}:host.ion-text-wrap ion-label{white-space:normal!important}button[hidden]{display:none}mat-icon.select-arrow{color:rgba(0,0,0,.47);font-size:150%}.fact-scroll-viewport{height:100%;width:100%}.fact-item{height:54px;display:flex}.fact-item .fact-date{min-width:100px;text-align:center;font-size:24pt}.fact-item .fact-date,.fact-item .fact-text{height:100%;align-items:center;justify-content:center;display:flex}.fact-item .fact-text{border-radius:10px}cdk-virtual-scroll-viewport{border:1px solid #000}cdk-virtual-scroll-viewport li{list-style:none}"]
|
|
1497
1482
|
},] }
|
|
@@ -1568,7 +1553,7 @@ class DateFormatPipe {
|
|
|
1568
1553
|
return this.dateAdapter.format(date, displayFormat);
|
|
1569
1554
|
}
|
|
1570
1555
|
}
|
|
1571
|
-
DateFormatPipe.ɵprov =
|
|
1556
|
+
DateFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(ɵɵinject(MomentDateAdapter), ɵɵinject(TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1572
1557
|
DateFormatPipe.decorators = [
|
|
1573
1558
|
{ type: Pipe, args: [{
|
|
1574
1559
|
name: 'dateFormat'
|
|
@@ -1580,7 +1565,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1580
1565
|
{ type: TranslateService }
|
|
1581
1566
|
];
|
|
1582
1567
|
|
|
1583
|
-
const moment
|
|
1568
|
+
const moment = momentImported;
|
|
1584
1569
|
class DateDiffDurationPipe {
|
|
1585
1570
|
constructor(dateAdapter, translate) {
|
|
1586
1571
|
this.dateAdapter = dateAdapter;
|
|
@@ -1596,17 +1581,17 @@ class DateDiffDurationPipe {
|
|
|
1596
1581
|
return this.format(startDate, endDate);
|
|
1597
1582
|
}
|
|
1598
1583
|
format(startDate, endDate) {
|
|
1599
|
-
const duration = moment
|
|
1584
|
+
const duration = moment.duration(endDate.diff(startDate));
|
|
1600
1585
|
if (duration.asMinutes() < 0)
|
|
1601
1586
|
return '';
|
|
1602
|
-
const timeDuration = moment
|
|
1587
|
+
const timeDuration = moment(0)
|
|
1603
1588
|
.hour(duration.hours())
|
|
1604
1589
|
.minute(duration.minutes());
|
|
1605
1590
|
const days = Math.floor(duration.asDays());
|
|
1606
1591
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1607
1592
|
}
|
|
1608
1593
|
}
|
|
1609
|
-
DateDiffDurationPipe.ɵprov =
|
|
1594
|
+
DateDiffDurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(ɵɵinject(DateAdapter), ɵɵinject(TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1610
1595
|
DateDiffDurationPipe.decorators = [
|
|
1611
1596
|
{ type: Pipe, args: [{
|
|
1612
1597
|
name: 'dateDiffDuration'
|
|
@@ -1627,7 +1612,7 @@ class DateFromNowPipe {
|
|
|
1627
1612
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1628
1613
|
}
|
|
1629
1614
|
}
|
|
1630
|
-
DateFromNowPipe.ɵprov =
|
|
1615
|
+
DateFromNowPipe.ɵprov = ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(ɵɵinject(MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1631
1616
|
DateFromNowPipe.decorators = [
|
|
1632
1617
|
{ type: Pipe, args: [{
|
|
1633
1618
|
name: 'dateFromNow'
|
|
@@ -1696,7 +1681,7 @@ function formatToDD(value, opts) {
|
|
|
1696
1681
|
value *= -1;
|
|
1697
1682
|
}
|
|
1698
1683
|
}
|
|
1699
|
-
let degrees = roundFloat
|
|
1684
|
+
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1700
1685
|
// Add sign
|
|
1701
1686
|
let sign = negative ? '-' : '+';
|
|
1702
1687
|
if (opts.placeholderChar) {
|
|
@@ -1747,7 +1732,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1747
1732
|
}
|
|
1748
1733
|
let degrees = Math.trunc(value);
|
|
1749
1734
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1750
|
-
let seconds = roundFloat
|
|
1735
|
+
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1751
1736
|
while (seconds >= 60) {
|
|
1752
1737
|
seconds -= 60;
|
|
1753
1738
|
minutes += 1;
|
|
@@ -1815,7 +1800,7 @@ function formatToDDMM(value, opts) {
|
|
|
1815
1800
|
}
|
|
1816
1801
|
}
|
|
1817
1802
|
let degrees = Math.trunc(value);
|
|
1818
|
-
let minutes = roundFloat
|
|
1803
|
+
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1819
1804
|
while (minutes >= 60) {
|
|
1820
1805
|
minutes -= 60;
|
|
1821
1806
|
degrees += 1;
|
|
@@ -1866,15 +1851,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
1866
1851
|
return NaN;
|
|
1867
1852
|
}
|
|
1868
1853
|
if (pattern === 'DD')
|
|
1869
|
-
return roundFloat
|
|
1854
|
+
return roundFloat(degrees, maxDecimals);
|
|
1870
1855
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
1871
1856
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
1872
1857
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
1873
1858
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
1874
1859
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
1875
|
-
return roundFloat
|
|
1860
|
+
return roundFloat(degrees, maxDecimals);
|
|
1876
1861
|
}
|
|
1877
|
-
function roundFloat
|
|
1862
|
+
function roundFloat(input, maxDecimals) {
|
|
1878
1863
|
if (maxDecimals > 0) {
|
|
1879
1864
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
1880
1865
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -1894,7 +1879,7 @@ class LatLongFormatPipe {
|
|
|
1894
1879
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
1895
1880
|
}
|
|
1896
1881
|
}
|
|
1897
|
-
LatLongFormatPipe.ɵprov =
|
|
1882
|
+
LatLongFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
1898
1883
|
LatLongFormatPipe.decorators = [
|
|
1899
1884
|
{ type: Pipe, args: [{
|
|
1900
1885
|
name: 'latLongFormat'
|
|
@@ -1906,7 +1891,7 @@ class LatitudeFormatPipe {
|
|
|
1906
1891
|
this.transform = formatLatitude;
|
|
1907
1892
|
}
|
|
1908
1893
|
}
|
|
1909
|
-
LatitudeFormatPipe.ɵprov =
|
|
1894
|
+
LatitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
1910
1895
|
LatitudeFormatPipe.decorators = [
|
|
1911
1896
|
{ type: Pipe, args: [{
|
|
1912
1897
|
name: 'latitudeFormat'
|
|
@@ -1918,7 +1903,7 @@ class LongitudeFormatPipe {
|
|
|
1918
1903
|
this.transform = formatLongitude;
|
|
1919
1904
|
}
|
|
1920
1905
|
}
|
|
1921
|
-
LongitudeFormatPipe.ɵprov =
|
|
1906
|
+
LongitudeFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
1922
1907
|
LongitudeFormatPipe.decorators = [
|
|
1923
1908
|
{ type: Pipe, args: [{
|
|
1924
1909
|
name: 'longitudeFormat'
|
|
@@ -1938,7 +1923,7 @@ class NumberFormatPipe {
|
|
|
1938
1923
|
}
|
|
1939
1924
|
}
|
|
1940
1925
|
}
|
|
1941
|
-
NumberFormatPipe.ɵprov =
|
|
1926
|
+
NumberFormatPipe.ɵprov = ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
1942
1927
|
NumberFormatPipe.decorators = [
|
|
1943
1928
|
{ type: Pipe, args: [{
|
|
1944
1929
|
name: 'numberFormat'
|
|
@@ -1978,7 +1963,7 @@ class HighlightPipe {
|
|
|
1978
1963
|
}
|
|
1979
1964
|
}
|
|
1980
1965
|
}
|
|
1981
|
-
HighlightPipe.ɵprov =
|
|
1966
|
+
HighlightPipe.ɵprov = ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
1982
1967
|
HighlightPipe.decorators = [
|
|
1983
1968
|
{ type: Pipe, args: [{
|
|
1984
1969
|
name: 'highlight'
|
|
@@ -2043,7 +2028,7 @@ FileSizePipe.decorators = [
|
|
|
2043
2028
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2044
2029
|
];
|
|
2045
2030
|
|
|
2046
|
-
const moment$
|
|
2031
|
+
const moment$1 = momentImported;
|
|
2047
2032
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2048
2033
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2049
2034
|
class DateUtils {
|
|
@@ -2077,32 +2062,32 @@ function fromDateISOString(value) {
|
|
|
2077
2062
|
if (!value || isMoment(value))
|
|
2078
2063
|
return value;
|
|
2079
2064
|
// Parse the input value, as a ISO date time
|
|
2080
|
-
const date = moment$
|
|
2065
|
+
const date = moment$1(value, DATE_ISO_PATTERN);
|
|
2081
2066
|
if (date.isValid())
|
|
2082
2067
|
return date;
|
|
2083
2068
|
// Not valid: trying to convert from unix timestamp
|
|
2084
2069
|
if (typeof value === 'string') {
|
|
2085
2070
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2086
2071
|
if (value.length === 10) {
|
|
2087
|
-
return moment$
|
|
2072
|
+
return moment$1(value, DATE_UNIX_TIMESTAMP);
|
|
2088
2073
|
}
|
|
2089
2074
|
else if (value.length === 13) {
|
|
2090
|
-
return moment$
|
|
2075
|
+
return moment$1(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2091
2076
|
}
|
|
2092
2077
|
}
|
|
2093
2078
|
console.warn('Unable to parse date: ' + value);
|
|
2094
2079
|
return undefined;
|
|
2095
2080
|
}
|
|
2096
2081
|
function fromUnixTimestamp(timeInSec) {
|
|
2097
|
-
return moment$
|
|
2082
|
+
return moment$1(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2098
2083
|
}
|
|
2099
2084
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2100
|
-
return moment$
|
|
2085
|
+
return moment$1(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2101
2086
|
}
|
|
2102
2087
|
function toDuration(value, unit) {
|
|
2103
2088
|
if (!value)
|
|
2104
2089
|
return undefined;
|
|
2105
|
-
const duration = moment$
|
|
2090
|
+
const duration = moment$1.duration(value, unit);
|
|
2106
2091
|
// fix 990+ ms
|
|
2107
2092
|
if (duration.milliseconds() >= 990) {
|
|
2108
2093
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2131,7 +2116,7 @@ class DurationPipe {
|
|
|
2131
2116
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2132
2117
|
}
|
|
2133
2118
|
}
|
|
2134
|
-
DurationPipe.ɵprov =
|
|
2119
|
+
DurationPipe.ɵprov = ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(ɵɵinject(TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2135
2120
|
DurationPipe.decorators = [
|
|
2136
2121
|
{ type: Pipe, args: [{
|
|
2137
2122
|
name: 'duration'
|
|
@@ -2152,7 +2137,7 @@ class MathAbsPipe {
|
|
|
2152
2137
|
}
|
|
2153
2138
|
}
|
|
2154
2139
|
}
|
|
2155
|
-
MathAbsPipe.ɵprov =
|
|
2140
|
+
MathAbsPipe.ɵprov = ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2156
2141
|
MathAbsPipe.decorators = [
|
|
2157
2142
|
{ type: Pipe, args: [{
|
|
2158
2143
|
name: 'mathAbs'
|
|
@@ -2164,7 +2149,7 @@ class EvenPipe {
|
|
|
2164
2149
|
return val % 2 === 0;
|
|
2165
2150
|
}
|
|
2166
2151
|
}
|
|
2167
|
-
EvenPipe.ɵprov =
|
|
2152
|
+
EvenPipe.ɵprov = ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2168
2153
|
EvenPipe.decorators = [
|
|
2169
2154
|
{ type: Pipe, args: [{
|
|
2170
2155
|
name: 'even'
|
|
@@ -2176,7 +2161,7 @@ class OddPipe {
|
|
|
2176
2161
|
return val % 2 !== 0;
|
|
2177
2162
|
}
|
|
2178
2163
|
}
|
|
2179
|
-
OddPipe.ɵprov =
|
|
2164
|
+
OddPipe.ɵprov = ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2180
2165
|
OddPipe.decorators = [
|
|
2181
2166
|
{ type: Pipe, args: [{
|
|
2182
2167
|
name: 'odd'
|
|
@@ -2284,7 +2269,7 @@ class MapGetPipe {
|
|
|
2284
2269
|
return val[key];
|
|
2285
2270
|
}
|
|
2286
2271
|
}
|
|
2287
|
-
MapGetPipe.ɵprov =
|
|
2272
|
+
MapGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2288
2273
|
MapGetPipe.decorators = [
|
|
2289
2274
|
{ type: Pipe, args: [{
|
|
2290
2275
|
name: 'mapGet'
|
|
@@ -2298,7 +2283,7 @@ class MapKeysPipe {
|
|
|
2298
2283
|
return Object.keys(map);
|
|
2299
2284
|
}
|
|
2300
2285
|
}
|
|
2301
|
-
MapKeysPipe.ɵprov =
|
|
2286
|
+
MapKeysPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2302
2287
|
MapKeysPipe.decorators = [
|
|
2303
2288
|
{ type: Pipe, args: [{
|
|
2304
2289
|
name: 'mapKeys'
|
|
@@ -2312,7 +2297,7 @@ class MapValuesPipe {
|
|
|
2312
2297
|
return Object.values(map);
|
|
2313
2298
|
}
|
|
2314
2299
|
}
|
|
2315
|
-
MapValuesPipe.ɵprov =
|
|
2300
|
+
MapValuesPipe.ɵprov = ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2316
2301
|
MapValuesPipe.decorators = [
|
|
2317
2302
|
{ type: Pipe, args: [{
|
|
2318
2303
|
name: 'mapValues'
|
|
@@ -2325,7 +2310,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2325
2310
|
return isNotNilOrBlank(value);
|
|
2326
2311
|
}
|
|
2327
2312
|
}
|
|
2328
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2313
|
+
IsNotNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2329
2314
|
IsNotNilOrBlankPipe.decorators = [
|
|
2330
2315
|
{ type: Pipe, args: [{
|
|
2331
2316
|
name: 'isNotNilOrBlank'
|
|
@@ -2337,7 +2322,7 @@ class IsNilOrBlankPipe {
|
|
|
2337
2322
|
return isNilOrBlank(value);
|
|
2338
2323
|
}
|
|
2339
2324
|
}
|
|
2340
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2325
|
+
IsNilOrBlankPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2341
2326
|
IsNilOrBlankPipe.decorators = [
|
|
2342
2327
|
{ type: Pipe, args: [{
|
|
2343
2328
|
name: 'isNilOrBlank'
|
|
@@ -2349,7 +2334,7 @@ class ToStringPipe {
|
|
|
2349
2334
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2350
2335
|
}
|
|
2351
2336
|
}
|
|
2352
|
-
ToStringPipe.ɵprov =
|
|
2337
|
+
ToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2353
2338
|
ToStringPipe.decorators = [
|
|
2354
2339
|
{ type: Pipe, args: [{
|
|
2355
2340
|
name: 'toString'
|
|
@@ -2361,7 +2346,7 @@ class StrLengthPipe {
|
|
|
2361
2346
|
return value && value.length || 0;
|
|
2362
2347
|
}
|
|
2363
2348
|
}
|
|
2364
|
-
StrLengthPipe.ɵprov =
|
|
2349
|
+
StrLengthPipe.ɵprov = ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2365
2350
|
StrLengthPipe.decorators = [
|
|
2366
2351
|
{ type: Pipe, args: [{
|
|
2367
2352
|
name: 'strLength'
|
|
@@ -2412,7 +2397,7 @@ class TranslateContextService {
|
|
|
2412
2397
|
: parts.slice(0, parts.length - 1).concat(context + parts[parts.length - 1]).join('.');
|
|
2413
2398
|
}
|
|
2414
2399
|
}
|
|
2415
|
-
TranslateContextService.ɵprov =
|
|
2400
|
+
TranslateContextService.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(ɵɵinject(TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2416
2401
|
TranslateContextService.decorators = [
|
|
2417
2402
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2418
2403
|
];
|
|
@@ -2428,7 +2413,7 @@ class TranslateContextPipe {
|
|
|
2428
2413
|
return this.translateContext.instant(key, context);
|
|
2429
2414
|
}
|
|
2430
2415
|
}
|
|
2431
|
-
TranslateContextPipe.ɵprov =
|
|
2416
|
+
TranslateContextPipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslateContextPipe_Factory() { return new TranslateContextPipe(ɵɵinject(TranslateContextService)); }, token: TranslateContextPipe, providedIn: "root" });
|
|
2432
2417
|
TranslateContextPipe.decorators = [
|
|
2433
2418
|
{ type: Pipe, args: [{
|
|
2434
2419
|
name: 'translateContext'
|
|
@@ -2445,7 +2430,7 @@ class TranslatablePipe {
|
|
|
2445
2430
|
return (_a = changeCaseToUnderscore(value)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
2446
2431
|
}
|
|
2447
2432
|
}
|
|
2448
|
-
TranslatablePipe.ɵprov =
|
|
2433
|
+
TranslatablePipe.ɵprov = ɵɵdefineInjectable({ factory: function TranslatablePipe_Factory() { return new TranslatablePipe(); }, token: TranslatablePipe, providedIn: "root" });
|
|
2449
2434
|
TranslatablePipe.decorators = [
|
|
2450
2435
|
{ type: Pipe, args: [{
|
|
2451
2436
|
name: 'translatable'
|
|
@@ -2462,7 +2447,7 @@ class PropertyGetPipe {
|
|
|
2462
2447
|
args && args.defaultValue);
|
|
2463
2448
|
}
|
|
2464
2449
|
}
|
|
2465
|
-
PropertyGetPipe.ɵprov =
|
|
2450
|
+
PropertyGetPipe.ɵprov = ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2466
2451
|
PropertyGetPipe.decorators = [
|
|
2467
2452
|
{ type: Pipe, args: [{
|
|
2468
2453
|
name: 'propertyGet'
|
|
@@ -2487,12 +2472,12 @@ NgInitDirective.propDecorators = {
|
|
|
2487
2472
|
ngInit: [{ type: Output }]
|
|
2488
2473
|
};
|
|
2489
2474
|
|
|
2490
|
-
const moment$
|
|
2475
|
+
const moment$2 = momentImported;
|
|
2491
2476
|
// @dynamic
|
|
2492
2477
|
class SharedValidators {
|
|
2493
2478
|
static validDate(control) {
|
|
2494
2479
|
const value = control.value;
|
|
2495
|
-
const date = !value || moment$
|
|
2480
|
+
const date = !value || moment$2.isMoment(value) ? value : moment$2(control.value, DATE_ISO_PATTERN);
|
|
2496
2481
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2497
2482
|
return { validDate: true };
|
|
2498
2483
|
}
|
|
@@ -3469,7 +3454,7 @@ class FormArrayHelper {
|
|
|
3469
3454
|
}
|
|
3470
3455
|
|
|
3471
3456
|
const APP_FORM_ERROR_I18N_KEYS = new InjectionToken('appFormErrorKeys');
|
|
3472
|
-
class
|
|
3457
|
+
class FormErrorTranslator {
|
|
3473
3458
|
constructor(translate, errorI18nKeys) {
|
|
3474
3459
|
this.translate = translate;
|
|
3475
3460
|
this.errorI18nKeys = Object.assign(Object.assign({}, SharedValidators.I18N_ERROR_KEYS), errorI18nKeys);
|
|
@@ -3527,11 +3512,11 @@ class FormErrorAdapter {
|
|
|
3527
3512
|
return errorKey;
|
|
3528
3513
|
}
|
|
3529
3514
|
}
|
|
3530
|
-
|
|
3531
|
-
|
|
3515
|
+
FormErrorTranslator.ɵprov = ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(ɵɵinject(TranslateService), ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
3516
|
+
FormErrorTranslator.decorators = [
|
|
3532
3517
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3533
3518
|
];
|
|
3534
|
-
|
|
3519
|
+
FormErrorTranslator.ctorParameters = () => [
|
|
3535
3520
|
{ type: TranslateService },
|
|
3536
3521
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_FORM_ERROR_I18N_KEYS,] }] }
|
|
3537
3522
|
];
|
|
@@ -3550,7 +3535,7 @@ FormErrorTranslatePipe.decorators = [
|
|
|
3550
3535
|
},] }
|
|
3551
3536
|
];
|
|
3552
3537
|
FormErrorTranslatePipe.ctorParameters = () => [
|
|
3553
|
-
{ type:
|
|
3538
|
+
{ type: FormErrorTranslator }
|
|
3554
3539
|
];
|
|
3555
3540
|
|
|
3556
3541
|
class SharedPipesModule {
|
|
@@ -3796,9 +3781,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3796
3781
|
const hour = parseInt(durationParts[0] || '0');
|
|
3797
3782
|
const minute = parseInt(durationParts[1] || '0');
|
|
3798
3783
|
const value = hour + (minute + 0.5) / 60;
|
|
3799
|
-
return roundFloat(value, maxDecimals);
|
|
3784
|
+
return roundFloat$1(value, maxDecimals);
|
|
3800
3785
|
}
|
|
3801
|
-
function roundFloat(input, maxDecimals) {
|
|
3786
|
+
function roundFloat$1(input, maxDecimals) {
|
|
3802
3787
|
if (maxDecimals > 0) {
|
|
3803
3788
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3804
3789
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3822,9 +3807,9 @@ const MASKS = {
|
|
|
3822
3807
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3823
3808
|
}
|
|
3824
3809
|
};
|
|
3825
|
-
const noop$
|
|
3810
|
+
const noop$1 = () => {
|
|
3826
3811
|
};
|
|
3827
|
-
const ɵ0$
|
|
3812
|
+
const ɵ0$1 = noop$1;
|
|
3828
3813
|
class MatLatLongField {
|
|
3829
3814
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3830
3815
|
this.platform = platform;
|
|
@@ -3832,8 +3817,8 @@ class MatLatLongField {
|
|
|
3832
3817
|
this.formBuilder = formBuilder;
|
|
3833
3818
|
this.cd = cd;
|
|
3834
3819
|
this.formGroupDir = formGroupDir;
|
|
3835
|
-
this._onChangeCallback = noop$
|
|
3836
|
-
this._onTouchedCallback = noop$
|
|
3820
|
+
this._onChangeCallback = noop$1;
|
|
3821
|
+
this._onTouchedCallback = noop$1;
|
|
3837
3822
|
this._subscription = new Subscription();
|
|
3838
3823
|
this.disabling = false;
|
|
3839
3824
|
this.writing = false;
|
|
@@ -4169,14 +4154,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4169
4154
|
},] }
|
|
4170
4155
|
];
|
|
4171
4156
|
|
|
4172
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4157
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
4173
4158
|
provide: NG_VALUE_ACCESSOR,
|
|
4174
4159
|
useExisting: forwardRef(() => MatDate),
|
|
4175
4160
|
multi: true
|
|
4176
4161
|
};
|
|
4177
|
-
const DAY_MASK
|
|
4178
|
-
const noop$
|
|
4179
|
-
const ɵ0$
|
|
4162
|
+
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4163
|
+
const noop$2 = () => { };
|
|
4164
|
+
const ɵ0$2 = noop$2;
|
|
4180
4165
|
class MatDate {
|
|
4181
4166
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4182
4167
|
this.dateAdapter = dateAdapter;
|
|
@@ -4185,12 +4170,12 @@ class MatDate {
|
|
|
4185
4170
|
this.cd = cd;
|
|
4186
4171
|
this.keyboard = keyboard;
|
|
4187
4172
|
this.formGroupDir = formGroupDir;
|
|
4188
|
-
this._onChangeCallback = noop$
|
|
4189
|
-
this._onTouchedCallback = noop$
|
|
4173
|
+
this._onChangeCallback = noop$2;
|
|
4174
|
+
this._onTouchedCallback = noop$2;
|
|
4190
4175
|
this._subscription = new Subscription();
|
|
4191
4176
|
this.writing = true;
|
|
4192
4177
|
this.disabling = false;
|
|
4193
|
-
this.dayMask = DAY_MASK
|
|
4178
|
+
this.dayMask = DAY_MASK;
|
|
4194
4179
|
this.disabled = false;
|
|
4195
4180
|
this.floatLabel = 'auto';
|
|
4196
4181
|
this.readonly = false;
|
|
@@ -4427,7 +4412,7 @@ MatDate.decorators = [
|
|
|
4427
4412
|
selector: 'mat-date-field',
|
|
4428
4413
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n\n",
|
|
4429
4414
|
providers: [
|
|
4430
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4415
|
+
DEFAULT_VALUE_ACCESSOR$1,
|
|
4431
4416
|
],
|
|
4432
4417
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4433
4418
|
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%}"]
|
|
@@ -4460,17 +4445,17 @@ MatDate.propDecorators = {
|
|
|
4460
4445
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4461
4446
|
};
|
|
4462
4447
|
|
|
4463
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4448
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
4464
4449
|
provide: NG_VALUE_ACCESSOR,
|
|
4465
4450
|
useExisting: forwardRef(() => MatDateTime),
|
|
4466
4451
|
multi: true
|
|
4467
4452
|
};
|
|
4468
4453
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4469
4454
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4470
|
-
const HOUR_MASK
|
|
4471
|
-
const noop$
|
|
4455
|
+
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4456
|
+
const noop$3 = () => {
|
|
4472
4457
|
};
|
|
4473
|
-
const ɵ0$
|
|
4458
|
+
const ɵ0$3 = noop$3;
|
|
4474
4459
|
class MatDateTime {
|
|
4475
4460
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
4476
4461
|
this.platform = platform;
|
|
@@ -4480,14 +4465,14 @@ class MatDateTime {
|
|
|
4480
4465
|
this.keyboard = keyboard;
|
|
4481
4466
|
this.cd = cd;
|
|
4482
4467
|
this.formGroupDir = formGroupDir;
|
|
4483
|
-
this._onChangeCallback = noop$
|
|
4484
|
-
this._onTouchedCallback = noop$
|
|
4468
|
+
this._onChangeCallback = noop$3;
|
|
4469
|
+
this._onTouchedCallback = noop$3;
|
|
4485
4470
|
this._subscription = new Subscription();
|
|
4486
4471
|
this.writing = true;
|
|
4487
4472
|
this.disabling = false;
|
|
4488
4473
|
this._readonly = false;
|
|
4489
4474
|
this.dayMask = DAY_MASK$1;
|
|
4490
|
-
this.hourMask = HOUR_MASK
|
|
4475
|
+
this.hourMask = HOUR_MASK;
|
|
4491
4476
|
this.floatLabel = 'auto';
|
|
4492
4477
|
this.compact = false;
|
|
4493
4478
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4798,7 +4783,7 @@ MatDateTime.decorators = [
|
|
|
4798
4783
|
selector: 'mat-date-time-field',
|
|
4799
4784
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
4800
4785
|
providers: [
|
|
4801
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4786
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
4802
4787
|
],
|
|
4803
4788
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4804
4789
|
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%}"]
|
|
@@ -4837,10 +4822,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4837
4822
|
useExisting: forwardRef(() => MatDateShort),
|
|
4838
4823
|
multi: true
|
|
4839
4824
|
};
|
|
4840
|
-
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4841
|
-
const noop$
|
|
4825
|
+
const DAY_MASK$2 = [/\d/, /\d/, /\d/, /\d/];
|
|
4826
|
+
const noop$4 = () => {
|
|
4842
4827
|
};
|
|
4843
|
-
const ɵ0$
|
|
4828
|
+
const ɵ0$4 = noop$4;
|
|
4844
4829
|
class MatDateShort {
|
|
4845
4830
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4846
4831
|
this.dateAdapter = dateAdapter;
|
|
@@ -4849,11 +4834,11 @@ class MatDateShort {
|
|
|
4849
4834
|
this.cd = cd;
|
|
4850
4835
|
this.keyboard = keyboard;
|
|
4851
4836
|
this.formGroupDir = formGroupDir;
|
|
4852
|
-
this._onChangeCallback = noop$
|
|
4853
|
-
this._onTouchedCallback = noop$
|
|
4837
|
+
this._onChangeCallback = noop$4;
|
|
4838
|
+
this._onTouchedCallback = noop$4;
|
|
4854
4839
|
this.writing = true;
|
|
4855
4840
|
this.disabling = false;
|
|
4856
|
-
this.dayMask = DAY_MASK;
|
|
4841
|
+
this.dayMask = DAY_MASK$2;
|
|
4857
4842
|
this.disabled = false;
|
|
4858
4843
|
this.floatLabel = 'auto';
|
|
4859
4844
|
this.readonly = false;
|
|
@@ -5166,16 +5151,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5166
5151
|
},] }
|
|
5167
5152
|
];
|
|
5168
5153
|
|
|
5169
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5154
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
5170
5155
|
provide: NG_VALUE_ACCESSOR,
|
|
5171
5156
|
useExisting: forwardRef(() => MatDuration),
|
|
5172
5157
|
multi: true
|
|
5173
5158
|
};
|
|
5174
5159
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5175
|
-
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5176
|
-
const noop$
|
|
5160
|
+
const HOUR_MASK$1 = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5161
|
+
const noop$5 = () => {
|
|
5177
5162
|
};
|
|
5178
|
-
const ɵ0$5 = noop$
|
|
5163
|
+
const ɵ0$5 = noop$5;
|
|
5179
5164
|
class MatDuration {
|
|
5180
5165
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5181
5166
|
this.dateAdapter = dateAdapter;
|
|
@@ -5184,11 +5169,11 @@ class MatDuration {
|
|
|
5184
5169
|
this.cd = cd;
|
|
5185
5170
|
this.formGroupDir = formGroupDir;
|
|
5186
5171
|
this._subscription = new Subscription();
|
|
5187
|
-
this._onChangeCallback = noop$
|
|
5188
|
-
this._onTouchedCallback = noop$
|
|
5172
|
+
this._onChangeCallback = noop$5;
|
|
5173
|
+
this._onTouchedCallback = noop$5;
|
|
5189
5174
|
this.writing = true;
|
|
5190
5175
|
this.disabling = false;
|
|
5191
|
-
this.hourMask = HOUR_MASK;
|
|
5176
|
+
this.hourMask = HOUR_MASK$1;
|
|
5192
5177
|
this.disabled = false;
|
|
5193
5178
|
this.floatLabel = 'auto';
|
|
5194
5179
|
this.readonly = false;
|
|
@@ -5368,7 +5353,7 @@ MatDuration.decorators = [
|
|
|
5368
5353
|
selector: 'mat-duration-field',
|
|
5369
5354
|
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",
|
|
5370
5355
|
providers: [
|
|
5371
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5356
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
5372
5357
|
],
|
|
5373
5358
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5374
5359
|
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%}"]
|
|
@@ -5425,22 +5410,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5425
5410
|
},] }
|
|
5426
5411
|
];
|
|
5427
5412
|
|
|
5428
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5413
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
5429
5414
|
provide: NG_VALUE_ACCESSOR,
|
|
5430
5415
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5431
5416
|
multi: true
|
|
5432
5417
|
};
|
|
5433
|
-
const noop$
|
|
5418
|
+
const noop$6 = () => {
|
|
5434
5419
|
};
|
|
5435
|
-
const ɵ0$
|
|
5420
|
+
const ɵ0$6 = noop$6;
|
|
5436
5421
|
class MatBooleanField {
|
|
5437
5422
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5438
5423
|
this.translate = translate;
|
|
5439
5424
|
this.formBuilder = formBuilder;
|
|
5440
5425
|
this.cd = cd;
|
|
5441
5426
|
this.formGroupDir = formGroupDir;
|
|
5442
|
-
this._onChangeCallback = noop$
|
|
5443
|
-
this._onTouchedCallback = noop$
|
|
5427
|
+
this._onChangeCallback = noop$6;
|
|
5428
|
+
this._onTouchedCallback = noop$6;
|
|
5444
5429
|
this._writing = false;
|
|
5445
5430
|
this.showRadio = false;
|
|
5446
5431
|
this.disabled = false;
|
|
@@ -5613,7 +5598,7 @@ MatBooleanField.decorators = [
|
|
|
5613
5598
|
selector: 'mat-boolean-field',
|
|
5614
5599
|
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\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</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\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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\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\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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\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 <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 <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </ng-container>\n\n <div class=\"cdk-visually-hidden\">\n <div #suffix><ng-content select=\"[matSuffix]\"></ng-content></div>\n </div>\n\n</ng-template>\n\n\n",
|
|
5615
5600
|
providers: [
|
|
5616
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5601
|
+
DEFAULT_VALUE_ACCESSOR$5
|
|
5617
5602
|
],
|
|
5618
5603
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5619
5604
|
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}"]
|
|
@@ -5861,7 +5846,7 @@ class MatNumpadDomService {
|
|
|
5861
5846
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5862
5847
|
}
|
|
5863
5848
|
}
|
|
5864
|
-
MatNumpadDomService.ɵprov =
|
|
5849
|
+
MatNumpadDomService.ɵprov = ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ApplicationRef), ɵɵinject(INJECTOR), ɵɵinject(DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
5865
5850
|
MatNumpadDomService.decorators = [
|
|
5866
5851
|
{ type: Injectable, args: [{
|
|
5867
5852
|
providedIn: 'root'
|
|
@@ -6225,7 +6210,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6225
6210
|
},] }
|
|
6226
6211
|
];
|
|
6227
6212
|
|
|
6228
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
6213
|
+
const DEFAULT_VALUE_ACCESSOR$6 = {
|
|
6229
6214
|
provide: NG_VALUE_ACCESSOR,
|
|
6230
6215
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6231
6216
|
multi: true
|
|
@@ -6488,7 +6473,7 @@ MatSwipeField.decorators = [
|
|
|
6488
6473
|
{ type: Component, args: [{
|
|
6489
6474
|
selector: 'mat-swipe-field',
|
|
6490
6475
|
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",
|
|
6491
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6476
|
+
providers: [DEFAULT_VALUE_ACCESSOR$6],
|
|
6492
6477
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6493
6478
|
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}"]
|
|
6494
6479
|
},] }
|
|
@@ -6933,14 +6918,16 @@ class MatBadgeIconDirective {
|
|
|
6933
6918
|
badge.style.display = 'flex';
|
|
6934
6919
|
badge.style.alignItems = 'center';
|
|
6935
6920
|
badge.style.justifyContent = 'center';
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
badge.style.color = `var(--ion-color-${this.color}-contrast)`;
|
|
6939
|
-
}
|
|
6940
|
-
else {
|
|
6921
|
+
// fill: 'clear'
|
|
6922
|
+
if (this.fill === 'clear') {
|
|
6941
6923
|
badge.style.color = `var(--ion-color-${this.color})`;
|
|
6942
6924
|
badge.style.background = 'transparent';
|
|
6943
6925
|
}
|
|
6926
|
+
// fill: 'solid' (default value)
|
|
6927
|
+
else {
|
|
6928
|
+
badge.style.background = `var(--ion-color-${this.color})`;
|
|
6929
|
+
badge.style.color = `var(--ion-color-${this.color}-contrast)`;
|
|
6930
|
+
}
|
|
6944
6931
|
if (this.matIcon) {
|
|
6945
6932
|
badge.innerHTML = `<i class="material-icons" style="font-size: ${fontSize};">${this.matIcon}</i>`;
|
|
6946
6933
|
}
|
|
@@ -7061,7 +7048,7 @@ class ProgressBarService {
|
|
|
7061
7048
|
}
|
|
7062
7049
|
}
|
|
7063
7050
|
}
|
|
7064
|
-
ProgressBarService.ɵprov =
|
|
7051
|
+
ProgressBarService.ɵprov = ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7065
7052
|
ProgressBarService.decorators = [
|
|
7066
7053
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7067
7054
|
];
|
|
@@ -7105,7 +7092,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7105
7092
|
return mc;
|
|
7106
7093
|
}
|
|
7107
7094
|
}
|
|
7108
|
-
AppGestureConfig.ɵprov =
|
|
7095
|
+
AppGestureConfig.ɵprov = ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7109
7096
|
AppGestureConfig.decorators = [
|
|
7110
7097
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7111
7098
|
];
|
|
@@ -7328,7 +7315,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7328
7315
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7329
7316
|
}
|
|
7330
7317
|
}
|
|
7331
|
-
MatPaginatorI18n.ɵprov =
|
|
7318
|
+
MatPaginatorI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(ɵɵinject(TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7332
7319
|
MatPaginatorI18n.decorators = [
|
|
7333
7320
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7334
7321
|
];
|
|
@@ -7418,17 +7405,17 @@ function getColorContrast(color, bw) {
|
|
|
7418
7405
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
7419
7406
|
}
|
|
7420
7407
|
|
|
7421
|
-
const noop = () => {
|
|
7408
|
+
const noop$7 = () => {
|
|
7422
7409
|
};
|
|
7423
|
-
const ɵ0$
|
|
7410
|
+
const ɵ0$7 = noop$7;
|
|
7424
7411
|
class AppFormField {
|
|
7425
7412
|
constructor(translate, cd, injector, formGroupDir) {
|
|
7426
7413
|
this.translate = translate;
|
|
7427
7414
|
this.cd = cd;
|
|
7428
7415
|
this.injector = injector;
|
|
7429
7416
|
this.formGroupDir = formGroupDir;
|
|
7430
|
-
this._onChangeCallback = noop;
|
|
7431
|
-
this._onTouchedCallback = noop;
|
|
7417
|
+
this._onChangeCallback = noop$7;
|
|
7418
|
+
this._onTouchedCallback = noop$7;
|
|
7432
7419
|
this.readonly = false;
|
|
7433
7420
|
this.compact = false;
|
|
7434
7421
|
this.floatLabel = 'auto';
|
|
@@ -7844,14 +7831,14 @@ class AudioProvider extends StartableService {
|
|
|
7844
7831
|
});
|
|
7845
7832
|
}
|
|
7846
7833
|
}
|
|
7847
|
-
AudioProvider.ɵprov =
|
|
7834
|
+
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" });
|
|
7848
7835
|
AudioProvider.decorators = [
|
|
7849
7836
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7850
7837
|
];
|
|
7851
7838
|
AudioProvider.ctorParameters = () => [
|
|
7852
7839
|
{ type: Platform },
|
|
7853
|
-
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7854
|
-
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7840
|
+
{ type: NativeAudio$1, decorators: [{ type: Optional }] },
|
|
7841
|
+
{ type: Vibration$1, decorators: [{ type: Optional }] },
|
|
7855
7842
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7856
7843
|
];
|
|
7857
7844
|
|
|
@@ -7933,7 +7920,7 @@ class Hotkeys {
|
|
|
7933
7920
|
});
|
|
7934
7921
|
}
|
|
7935
7922
|
}
|
|
7936
|
-
Hotkeys.ɵprov =
|
|
7923
|
+
Hotkeys.ɵprov = ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(ɵɵinject(EventManager), ɵɵinject(MatDialog), ɵɵinject(DOCUMENT), ɵɵinject(ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
7937
7924
|
Hotkeys.decorators = [
|
|
7938
7925
|
{ type: Injectable, args: [{
|
|
7939
7926
|
providedIn: 'root'
|
|
@@ -8107,7 +8094,7 @@ class Base64ImageReader {
|
|
|
8107
8094
|
}
|
|
8108
8095
|
}
|
|
8109
8096
|
|
|
8110
|
-
const uuidv4
|
|
8097
|
+
const uuidv4 = uuidv4Imported;
|
|
8111
8098
|
class FileService {
|
|
8112
8099
|
constructor(platform,
|
|
8113
8100
|
//private transfer: FileTransfer,
|
|
@@ -8144,7 +8131,7 @@ class FileService {
|
|
|
8144
8131
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8145
8132
|
if (lastSlashIndex === -1)
|
|
8146
8133
|
throw new Error('Invalid URL: ' + source);
|
|
8147
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4
|
|
8134
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8148
8135
|
// Download into the file system
|
|
8149
8136
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8150
8137
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8200,7 +8187,7 @@ class FileService {
|
|
|
8200
8187
|
this._started = true;
|
|
8201
8188
|
}
|
|
8202
8189
|
}
|
|
8203
|
-
FileService.ɵprov =
|
|
8190
|
+
FileService.ɵprov = ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(ɵɵinject(Platform), ɵɵinject(HttpClient), ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
8204
8191
|
FileService.decorators = [
|
|
8205
8192
|
{ type: Injectable, args: [{
|
|
8206
8193
|
providedIn: 'root',
|
|
@@ -8362,7 +8349,7 @@ class Base58 {
|
|
|
8362
8349
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
8363
8350
|
|
|
8364
8351
|
const scrypt = require('scrypt-async');
|
|
8365
|
-
const sha256
|
|
8352
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
8366
8353
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
8367
8354
|
const nacl = {
|
|
8368
8355
|
sign,
|
|
@@ -8466,7 +8453,7 @@ class CryptoService {
|
|
|
8466
8453
|
* Hash (using SHA256) a message
|
|
8467
8454
|
*/
|
|
8468
8455
|
sha256(message) {
|
|
8469
|
-
return sha256
|
|
8456
|
+
return sha256().update(message).digest('hex');
|
|
8470
8457
|
}
|
|
8471
8458
|
/**
|
|
8472
8459
|
* Hash (using SHA512) a message
|
|
@@ -8479,7 +8466,7 @@ class CryptoService {
|
|
|
8479
8466
|
return nacl.util.encodeBase64(m);
|
|
8480
8467
|
}
|
|
8481
8468
|
}
|
|
8482
|
-
CryptoService.ɵprov =
|
|
8469
|
+
CryptoService.ɵprov = ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
8483
8470
|
CryptoService.decorators = [
|
|
8484
8471
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8485
8472
|
];
|
|
@@ -9700,7 +9687,7 @@ class LocalSettingsService extends StartableService {
|
|
|
9700
9687
|
return page;
|
|
9701
9688
|
}
|
|
9702
9689
|
}
|
|
9703
|
-
LocalSettingsService.ɵprov =
|
|
9690
|
+
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" });
|
|
9704
9691
|
LocalSettingsService.decorators = [
|
|
9705
9692
|
{ type: Injectable, args: [{
|
|
9706
9693
|
providedIn: 'root',
|
|
@@ -10360,7 +10347,7 @@ class NetworkService extends StartableService {
|
|
|
10360
10347
|
});
|
|
10361
10348
|
}
|
|
10362
10349
|
}
|
|
10363
|
-
NetworkService.ɵprov =
|
|
10350
|
+
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" });
|
|
10364
10351
|
NetworkService.decorators = [
|
|
10365
10352
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10366
10353
|
];
|
|
@@ -10371,16 +10358,16 @@ NetworkService.ctorParameters = () => [
|
|
|
10371
10358
|
{ type: CryptoService },
|
|
10372
10359
|
{ type: Storage },
|
|
10373
10360
|
{ type: LocalSettingsService },
|
|
10374
|
-
{ type: CacheService },
|
|
10361
|
+
{ type: CacheService$1 },
|
|
10375
10362
|
{ type: HttpClient },
|
|
10376
10363
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10377
|
-
{ type: Network, decorators: [{ type: Optional }] },
|
|
10378
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
10364
|
+
{ type: Network$1, decorators: [{ type: Optional }] },
|
|
10365
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
10379
10366
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
10380
10367
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
10381
10368
|
];
|
|
10382
10369
|
|
|
10383
|
-
const ErrorCodes
|
|
10370
|
+
const ErrorCodes = {
|
|
10384
10371
|
UNKNOWN_ERROR: 0,
|
|
10385
10372
|
LOAD_ACCOUNT_ERROR: 1,
|
|
10386
10373
|
BAD_PASSWORD: 2,
|
|
@@ -10727,7 +10714,7 @@ class EntityStore {
|
|
|
10727
10714
|
}
|
|
10728
10715
|
catch (err) {
|
|
10729
10716
|
console.error(err);
|
|
10730
|
-
throw { code: ErrorCodes
|
|
10717
|
+
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10731
10718
|
}
|
|
10732
10719
|
}
|
|
10733
10720
|
// Emit update event
|
|
@@ -11298,7 +11285,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11298
11285
|
}
|
|
11299
11286
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11300
11287
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11301
|
-
EntitiesStorage.ɵprov =
|
|
11288
|
+
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" });
|
|
11302
11289
|
EntitiesStorage.decorators = [
|
|
11303
11290
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11304
11291
|
];
|
|
@@ -11398,10 +11385,10 @@ function referentialToString(obj, properties) {
|
|
|
11398
11385
|
function referentialsToString(values, properties, separator) {
|
|
11399
11386
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
11400
11387
|
}
|
|
11401
|
-
const ɵ0$
|
|
11388
|
+
const ɵ0$8 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
11402
11389
|
const StatusList = Object.freeze([
|
|
11403
11390
|
{
|
|
11404
|
-
id: ɵ0$
|
|
11391
|
+
id: ɵ0$8,
|
|
11405
11392
|
icon: 'checkmark',
|
|
11406
11393
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
11407
11394
|
},
|
|
@@ -11676,7 +11663,7 @@ function accountToString(data) {
|
|
|
11676
11663
|
(data.lastName || '')) || '';
|
|
11677
11664
|
}
|
|
11678
11665
|
|
|
11679
|
-
const uuidv4 = uuidv4Imported;
|
|
11666
|
+
const uuidv4$1 = uuidv4Imported;
|
|
11680
11667
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
11681
11668
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
11682
11669
|
/**
|
|
@@ -11720,7 +11707,7 @@ function createTrackerLink(opts) {
|
|
|
11720
11707
|
// Skip if not tracked
|
|
11721
11708
|
if (!context || !context.tracked)
|
|
11722
11709
|
return forward(operation);
|
|
11723
|
-
const id = context.serializationKey || uuidv4();
|
|
11710
|
+
const id = context.serializationKey || uuidv4$1();
|
|
11724
11711
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
11725
11712
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
11726
11713
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -12389,7 +12376,7 @@ class GraphqlService extends StartableService {
|
|
|
12389
12376
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
12390
12377
|
|| this.toAppError(err.networkError)
|
|
12391
12378
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
12392
|
-
|| this.createAppErrorByCode(ErrorCodes
|
|
12379
|
+
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
12393
12380
|
// If graphQL: try to convert the first error found
|
|
12394
12381
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
12395
12382
|
|| this.toAppError(err)
|
|
@@ -12397,7 +12384,7 @@ class GraphqlService extends StartableService {
|
|
|
12397
12384
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
12398
12385
|
|| err;
|
|
12399
12386
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
12400
|
-
if (error && error.code === ErrorCodes
|
|
12387
|
+
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12401
12388
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
12402
12389
|
this.onNetworkError.next(error);
|
|
12403
12390
|
}
|
|
@@ -12433,7 +12420,7 @@ class GraphqlService extends StartableService {
|
|
|
12433
12420
|
return 'ERROR.UNAUTHORIZED';
|
|
12434
12421
|
case ServerErrorCodes.FORBIDDEN:
|
|
12435
12422
|
return 'ERROR.FORBIDDEN';
|
|
12436
|
-
case ErrorCodes
|
|
12423
|
+
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
12437
12424
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
12438
12425
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
12439
12426
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -12461,7 +12448,7 @@ class GraphqlService extends StartableService {
|
|
|
12461
12448
|
return undefined;
|
|
12462
12449
|
}
|
|
12463
12450
|
}
|
|
12464
|
-
GraphqlService.ɵprov =
|
|
12451
|
+
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" });
|
|
12465
12452
|
GraphqlService.decorators = [
|
|
12466
12453
|
{ type: Injectable, args: [{
|
|
12467
12454
|
providedIn: 'root'
|
|
@@ -12478,7 +12465,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
12478
12465
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
12479
12466
|
];
|
|
12480
12467
|
|
|
12481
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
12468
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
12482
12469
|
class BaseGraphqlServiceOptions {
|
|
12483
12470
|
}
|
|
12484
12471
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -12628,8 +12615,8 @@ class BaseGraphqlService {
|
|
|
12628
12615
|
}
|
|
12629
12616
|
/* -- protected methods -- */
|
|
12630
12617
|
computeMutableWatchQueryId(opts) {
|
|
12631
|
-
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
12632
|
-
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
12618
|
+
const queryName = opts.queryName || sha256$1().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
12619
|
+
const variablesKey = opts.variables && sha256$1().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
12633
12620
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
12634
12621
|
}
|
|
12635
12622
|
findMutableWatchQueries(opts) {
|
|
@@ -12692,7 +12679,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
12692
12679
|
/* ------------------------------------
|
|
12693
12680
|
* GraphQL queries
|
|
12694
12681
|
* ------------------------------------*/
|
|
12695
|
-
const Fragments
|
|
12682
|
+
const Fragments = {
|
|
12696
12683
|
account: gql `
|
|
12697
12684
|
fragment AccountFragment on AccountVO {
|
|
12698
12685
|
id
|
|
@@ -12725,13 +12712,13 @@ const Fragments$1 = {
|
|
|
12725
12712
|
`
|
|
12726
12713
|
};
|
|
12727
12714
|
// Load account query
|
|
12728
|
-
const LoadQuery
|
|
12715
|
+
const LoadQuery = gql `
|
|
12729
12716
|
query Account {
|
|
12730
12717
|
data: account {
|
|
12731
12718
|
...AccountFragment
|
|
12732
12719
|
}
|
|
12733
12720
|
}
|
|
12734
|
-
${Fragments
|
|
12721
|
+
${Fragments.account}
|
|
12735
12722
|
`;
|
|
12736
12723
|
// Check email query
|
|
12737
12724
|
const IsEmailExistsQuery = gql `
|
|
@@ -12740,13 +12727,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12740
12727
|
}
|
|
12741
12728
|
`;
|
|
12742
12729
|
// Save (create or update) account mutation
|
|
12743
|
-
const SaveMutation
|
|
12730
|
+
const SaveMutation = gql `
|
|
12744
12731
|
mutation SaveAccount($data:AccountVOInput){
|
|
12745
12732
|
data: saveAccount(account: $data){
|
|
12746
12733
|
...AccountFragment
|
|
12747
12734
|
}
|
|
12748
12735
|
}
|
|
12749
|
-
${Fragments
|
|
12736
|
+
${Fragments.account}
|
|
12750
12737
|
`;
|
|
12751
12738
|
// Create account mutation
|
|
12752
12739
|
const CreateMutation = gql `
|
|
@@ -12755,7 +12742,7 @@ const CreateMutation = gql `
|
|
|
12755
12742
|
...AccountFragment
|
|
12756
12743
|
}
|
|
12757
12744
|
}
|
|
12758
|
-
${Fragments
|
|
12745
|
+
${Fragments.account}
|
|
12759
12746
|
`;
|
|
12760
12747
|
// Sent confirmation email
|
|
12761
12748
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13093,7 +13080,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13093
13080
|
catch (error) {
|
|
13094
13081
|
console.error(error);
|
|
13095
13082
|
this.resetData();
|
|
13096
|
-
throw { code: ErrorCodes
|
|
13083
|
+
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13097
13084
|
}
|
|
13098
13085
|
// Store pubkey+keypair
|
|
13099
13086
|
this._data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13127,7 +13114,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13127
13114
|
}
|
|
13128
13115
|
catch (err) {
|
|
13129
13116
|
// If account not found, check if email is valid
|
|
13130
|
-
if (err && +(err.code) === ErrorCodes
|
|
13117
|
+
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13131
13118
|
// Check email exists
|
|
13132
13119
|
if (data.username.indexOf('@') !== -1) {
|
|
13133
13120
|
let isEmailExists;
|
|
@@ -13139,11 +13126,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13139
13126
|
}
|
|
13140
13127
|
// Email not exists (no account)
|
|
13141
13128
|
if (!isEmailExists) {
|
|
13142
|
-
throw { code: ErrorCodes
|
|
13129
|
+
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13143
13130
|
}
|
|
13144
13131
|
}
|
|
13145
13132
|
// Email exists, so error = 'bad password'
|
|
13146
|
-
throw { code: ErrorCodes
|
|
13133
|
+
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13147
13134
|
}
|
|
13148
13135
|
throw err; // resend the first error
|
|
13149
13136
|
}
|
|
@@ -13268,8 +13255,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13268
13255
|
// Load remotely
|
|
13269
13256
|
else {
|
|
13270
13257
|
const { data } = yield this.graphql.query({
|
|
13271
|
-
query: LoadQuery
|
|
13272
|
-
error: { code: ErrorCodes
|
|
13258
|
+
query: LoadQuery,
|
|
13259
|
+
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13273
13260
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13274
13261
|
});
|
|
13275
13262
|
json = data;
|
|
@@ -13296,7 +13283,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13296
13283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13297
13284
|
const isEmailExists = yield this.isEmailExists(email);
|
|
13298
13285
|
if (isEmailExists) {
|
|
13299
|
-
throw { code: ErrorCodes
|
|
13286
|
+
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13300
13287
|
}
|
|
13301
13288
|
});
|
|
13302
13289
|
}
|
|
@@ -13332,7 +13319,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13332
13319
|
locale
|
|
13333
13320
|
},
|
|
13334
13321
|
error: {
|
|
13335
|
-
code: ErrorCodes
|
|
13322
|
+
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13336
13323
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
13337
13324
|
}
|
|
13338
13325
|
});
|
|
@@ -13348,7 +13335,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13348
13335
|
code
|
|
13349
13336
|
},
|
|
13350
13337
|
error: {
|
|
13351
|
-
code: ErrorCodes
|
|
13338
|
+
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
13352
13339
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
13353
13340
|
}
|
|
13354
13341
|
});
|
|
@@ -13366,7 +13353,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13366
13353
|
interval: 10
|
|
13367
13354
|
},
|
|
13368
13355
|
error: {
|
|
13369
|
-
code: ErrorCodes
|
|
13356
|
+
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13370
13357
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
13371
13358
|
}
|
|
13372
13359
|
}).subscribe({
|
|
@@ -13475,7 +13462,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13475
13462
|
throw error;
|
|
13476
13463
|
console.error(error);
|
|
13477
13464
|
throw {
|
|
13478
|
-
code: ErrorCodes
|
|
13465
|
+
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
13479
13466
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
13480
13467
|
};
|
|
13481
13468
|
}
|
|
@@ -13620,7 +13607,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13620
13607
|
if (!isNew) {
|
|
13621
13608
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
13622
13609
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
13623
|
-
throw { code: ErrorCodes
|
|
13610
|
+
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13624
13611
|
}
|
|
13625
13612
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
13626
13613
|
}
|
|
@@ -13629,10 +13616,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
13629
13616
|
delete json.profiles;
|
|
13630
13617
|
// Execute mutation
|
|
13631
13618
|
const { data } = yield this.graphql.mutate({
|
|
13632
|
-
mutation: isNew ? CreateMutation : SaveMutation
|
|
13619
|
+
mutation: isNew ? CreateMutation : SaveMutation,
|
|
13633
13620
|
variables: { data: json },
|
|
13634
13621
|
error: {
|
|
13635
|
-
code: ErrorCodes
|
|
13622
|
+
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
13636
13623
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
13637
13624
|
}
|
|
13638
13625
|
});
|
|
@@ -13652,7 +13639,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13652
13639
|
if (counter > 4) {
|
|
13653
13640
|
if (this._debug)
|
|
13654
13641
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
13655
|
-
throw { code: ErrorCodes
|
|
13642
|
+
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13656
13643
|
}
|
|
13657
13644
|
// Check if valid
|
|
13658
13645
|
if (token) {
|
|
@@ -13662,7 +13649,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13662
13649
|
token
|
|
13663
13650
|
},
|
|
13664
13651
|
error: {
|
|
13665
|
-
code: ErrorCodes
|
|
13652
|
+
code: ErrorCodes.UNAUTHORIZED,
|
|
13666
13653
|
message: 'ERROR.UNAUTHORIZED'
|
|
13667
13654
|
},
|
|
13668
13655
|
fetchPolicy: 'no-cache'
|
|
@@ -13678,7 +13665,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13678
13665
|
}
|
|
13679
13666
|
// Generate a new token
|
|
13680
13667
|
const challengeError = {
|
|
13681
|
-
code: ErrorCodes
|
|
13668
|
+
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
13682
13669
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
13683
13670
|
};
|
|
13684
13671
|
const data = yield this.graphql.query({
|
|
@@ -13712,7 +13699,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13712
13699
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13713
13700
|
}
|
|
13714
13701
|
}
|
|
13715
|
-
AccountService.ɵprov =
|
|
13702
|
+
AccountService.ɵprov = ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(ɵɵinject(CryptoService), ɵɵinject(NetworkService), ɵɵinject(GraphqlService), ɵɵinject(LocalSettingsService), ɵɵinject(Storage), ɵɵinject(FileService), ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
13716
13703
|
AccountService.decorators = [
|
|
13717
13704
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13718
13705
|
];
|
|
@@ -13972,7 +13959,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13972
13959
|
/* ------------------------------------
|
|
13973
13960
|
* GraphQL queries
|
|
13974
13961
|
* ------------------------------------*/
|
|
13975
|
-
const Fragments = {
|
|
13962
|
+
const Fragments$1 = {
|
|
13976
13963
|
config: gql `
|
|
13977
13964
|
fragment ConfigFragment on ConfigurationVO {
|
|
13978
13965
|
id
|
|
@@ -13999,22 +13986,22 @@ const Fragments = {
|
|
|
13999
13986
|
}
|
|
14000
13987
|
`
|
|
14001
13988
|
};
|
|
14002
|
-
const LoadQuery = gql `
|
|
13989
|
+
const LoadQuery$1 = gql `
|
|
14003
13990
|
query Configuration{
|
|
14004
13991
|
data: configuration{
|
|
14005
13992
|
...ConfigFragment
|
|
14006
13993
|
}
|
|
14007
13994
|
}
|
|
14008
|
-
${Fragments.config}
|
|
13995
|
+
${Fragments$1.config}
|
|
14009
13996
|
`;
|
|
14010
13997
|
// Save (create or update) account mutation
|
|
14011
|
-
const SaveMutation = gql `
|
|
13998
|
+
const SaveMutation$1 = gql `
|
|
14012
13999
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
14013
14000
|
data: saveConfiguration(config: $data){
|
|
14014
14001
|
...ConfigFragment
|
|
14015
14002
|
}
|
|
14016
14003
|
}
|
|
14017
|
-
${Fragments.config}
|
|
14004
|
+
${Fragments$1.config}
|
|
14018
14005
|
`;
|
|
14019
14006
|
const ClearCache = gql `
|
|
14020
14007
|
query ClearCache($name: String) {
|
|
@@ -14109,12 +14096,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14109
14096
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14110
14097
|
const now = Date.now();
|
|
14111
14098
|
console.debug('[config] Loading Pod configuration...');
|
|
14112
|
-
const query = opts && opts.query || LoadQuery;
|
|
14099
|
+
const query = opts && opts.query || LoadQuery$1;
|
|
14113
14100
|
const variables = opts && opts.variables || undefined;
|
|
14114
14101
|
const res = yield this.graphql.query({
|
|
14115
14102
|
query,
|
|
14116
14103
|
variables,
|
|
14117
|
-
error: { code: ErrorCodes
|
|
14104
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14118
14105
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14119
14106
|
});
|
|
14120
14107
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14139,12 +14126,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14139
14126
|
const json = config.asObject();
|
|
14140
14127
|
// Execute mutation
|
|
14141
14128
|
const res = yield this.graphql.mutate({
|
|
14142
|
-
mutation: SaveMutation,
|
|
14129
|
+
mutation: SaveMutation$1,
|
|
14143
14130
|
variables: {
|
|
14144
14131
|
data: json
|
|
14145
14132
|
},
|
|
14146
14133
|
error: {
|
|
14147
|
-
code: ErrorCodes
|
|
14134
|
+
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14148
14135
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14149
14136
|
}
|
|
14150
14137
|
});
|
|
@@ -14170,7 +14157,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14170
14157
|
const res = yield this.graphql.query({
|
|
14171
14158
|
query: CacheStatistics,
|
|
14172
14159
|
variables: null,
|
|
14173
|
-
error: { code: ErrorCodes
|
|
14160
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14174
14161
|
fetchPolicy: 'network-only'
|
|
14175
14162
|
});
|
|
14176
14163
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14186,7 +14173,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14186
14173
|
const res = yield this.graphql.query({
|
|
14187
14174
|
query: ClearCache,
|
|
14188
14175
|
variables,
|
|
14189
|
-
error: { code: ErrorCodes
|
|
14176
|
+
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14190
14177
|
fetchPolicy: 'network-only'
|
|
14191
14178
|
});
|
|
14192
14179
|
const data = res && res.clearCache || undefined;
|
|
@@ -14345,7 +14332,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14345
14332
|
});
|
|
14346
14333
|
}
|
|
14347
14334
|
}
|
|
14348
|
-
ConfigService.ɵprov =
|
|
14335
|
+
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(ENVIRONMENT), ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
14349
14336
|
ConfigService.decorators = [
|
|
14350
14337
|
{ type: Injectable, args: [{
|
|
14351
14338
|
providedIn: 'root',
|
|
@@ -14364,7 +14351,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14364
14351
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
14365
14352
|
];
|
|
14366
14353
|
|
|
14367
|
-
const moment$
|
|
14354
|
+
const moment$4 = momentImported;
|
|
14368
14355
|
class PlatformService {
|
|
14369
14356
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14370
14357
|
this.platform = platform;
|
|
@@ -14573,16 +14560,16 @@ class PlatformService {
|
|
|
14573
14560
|
}
|
|
14574
14561
|
// config moment lib
|
|
14575
14562
|
try {
|
|
14576
|
-
moment$
|
|
14563
|
+
moment$4.locale(event.lang);
|
|
14577
14564
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
14578
14565
|
}
|
|
14579
14566
|
// If error, fallback to en
|
|
14580
14567
|
catch (err) {
|
|
14581
|
-
moment$
|
|
14568
|
+
moment$4.locale('en');
|
|
14582
14569
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
14583
14570
|
}
|
|
14584
14571
|
// Config date adapter
|
|
14585
|
-
this.dateAdapter.setLocale(moment$
|
|
14572
|
+
this.dateAdapter.setLocale(moment$4.locale());
|
|
14586
14573
|
}
|
|
14587
14574
|
});
|
|
14588
14575
|
this.settings.onChange.subscribe(data => {
|
|
@@ -14720,7 +14707,7 @@ class PlatformService {
|
|
|
14720
14707
|
});
|
|
14721
14708
|
}
|
|
14722
14709
|
}
|
|
14723
|
-
PlatformService.ɵprov =
|
|
14710
|
+
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" });
|
|
14724
14711
|
PlatformService.decorators = [
|
|
14725
14712
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14726
14713
|
];
|
|
@@ -14735,15 +14722,15 @@ PlatformService.ctorParameters = () => [
|
|
|
14735
14722
|
{ type: NetworkService },
|
|
14736
14723
|
{ type: AccountService },
|
|
14737
14724
|
{ type: ConfigService },
|
|
14738
|
-
{ type: CacheService },
|
|
14725
|
+
{ type: CacheService$1 },
|
|
14739
14726
|
{ type: Storage },
|
|
14740
14727
|
{ type: AudioProvider },
|
|
14741
14728
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
14742
|
-
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
14729
|
+
{ type: StatusBar$1, decorators: [{ type: Optional }] },
|
|
14743
14730
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14744
|
-
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14745
|
-
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14746
|
-
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14731
|
+
{ type: SplashScreen$1, decorators: [{ type: Optional }] },
|
|
14732
|
+
{ type: InAppBrowser$1, decorators: [{ type: Optional }] },
|
|
14733
|
+
{ type: Downloader$1, decorators: [{ type: Optional }] }
|
|
14747
14734
|
];
|
|
14748
14735
|
|
|
14749
14736
|
class AppHelpModal {
|
|
@@ -14807,7 +14794,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14807
14794
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14808
14795
|
}
|
|
14809
14796
|
}
|
|
14810
|
-
MatStepperI18n.ɵprov =
|
|
14797
|
+
MatStepperI18n.ɵprov = ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(ɵɵinject(TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14811
14798
|
MatStepperI18n.decorators = [
|
|
14812
14799
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14813
14800
|
];
|
|
@@ -15799,7 +15786,7 @@ function state2side(state) {
|
|
|
15799
15786
|
return 1;
|
|
15800
15787
|
}
|
|
15801
15788
|
}
|
|
15802
|
-
const ɵ0$
|
|
15789
|
+
const ɵ0$9 = (defaultStateSize) => [
|
|
15803
15790
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15804
15791
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15805
15792
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15807,7 +15794,7 @@ const ɵ0$1 = (defaultStateSize) => [
|
|
|
15807
15794
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15808
15795
|
startColor: rgbArrayMap.red,
|
|
15809
15796
|
startStates: [0, 2, 3],
|
|
15810
|
-
startStepsFn: ɵ0$
|
|
15797
|
+
startStepsFn: ɵ0$9
|
|
15811
15798
|
};
|
|
15812
15799
|
/**
|
|
15813
15800
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15899,21 +15886,21 @@ function linearColorGradient(count, options) {
|
|
|
15899
15886
|
return result;
|
|
15900
15887
|
}
|
|
15901
15888
|
|
|
15902
|
-
class EntityTestClass
|
|
15889
|
+
class EntityTestClass {
|
|
15903
15890
|
}
|
|
15904
|
-
const FAKE_ENTITIES
|
|
15891
|
+
const FAKE_ENTITIES = [
|
|
15905
15892
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15906
15893
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15907
15894
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15908
15895
|
];
|
|
15909
|
-
function deepCopy
|
|
15896
|
+
function deepCopy(values, size) {
|
|
15910
15897
|
if (isNil(size)) {
|
|
15911
|
-
return (values || FAKE_ENTITIES
|
|
15898
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15912
15899
|
}
|
|
15913
15900
|
let result = [];
|
|
15914
15901
|
let i = 1;
|
|
15915
15902
|
while (result.length < size) {
|
|
15916
|
-
result = result.concat((values || FAKE_ENTITIES
|
|
15903
|
+
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15917
15904
|
const name = entity.name + ' #' + i;
|
|
15918
15905
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15919
15906
|
}));
|
|
@@ -15923,7 +15910,7 @@ function deepCopy$1(values, size) {
|
|
|
15923
15910
|
class AutocompleteTestPage {
|
|
15924
15911
|
constructor(formBuilder) {
|
|
15925
15912
|
this.formBuilder = formBuilder;
|
|
15926
|
-
this._items = deepCopy
|
|
15913
|
+
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15927
15914
|
this.$items = new BehaviorSubject(undefined);
|
|
15928
15915
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15929
15916
|
this.memoryHide = false;
|
|
@@ -15967,7 +15954,7 @@ class AutocompleteTestPage {
|
|
|
15967
15954
|
});
|
|
15968
15955
|
// From items
|
|
15969
15956
|
this.autocompleteFields.add('entity-items-large', {
|
|
15970
|
-
items: FAKE_ENTITIES
|
|
15957
|
+
items: FAKE_ENTITIES.slice(),
|
|
15971
15958
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15972
15959
|
displayWith: this.entityToString
|
|
15973
15960
|
});
|
|
@@ -15977,12 +15964,12 @@ class AutocompleteTestPage {
|
|
|
15977
15964
|
loadData() {
|
|
15978
15965
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15979
15966
|
const data = {
|
|
15980
|
-
entity: deepCopy
|
|
15967
|
+
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15981
15968
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15982
15969
|
missingEntity: {
|
|
15983
15970
|
id: -1, label: '??', name: 'Missing item'
|
|
15984
15971
|
},
|
|
15985
|
-
disableEntity: deepCopy
|
|
15972
|
+
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15986
15973
|
};
|
|
15987
15974
|
this.form.setValue(data);
|
|
15988
15975
|
// Load observables
|
|
@@ -16155,13 +16142,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16155
16142
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16156
16143
|
];
|
|
16157
16144
|
|
|
16158
|
-
const moment$
|
|
16145
|
+
const moment$5 = momentImported;
|
|
16159
16146
|
class SwipeTestPage {
|
|
16160
16147
|
constructor(formBuilder, dateFormatPipe) {
|
|
16161
16148
|
this.formBuilder = formBuilder;
|
|
16162
16149
|
this.dateFormatPipe = dateFormatPipe;
|
|
16163
16150
|
this.$dates = new BehaviorSubject(undefined);
|
|
16164
|
-
this._today = moment$
|
|
16151
|
+
this._today = moment$5().startOf('day');
|
|
16165
16152
|
this.form = formBuilder.group({
|
|
16166
16153
|
empty: [null, Validators.required],
|
|
16167
16154
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16174,7 +16161,7 @@ class SwipeTestPage {
|
|
|
16174
16161
|
ngOnInit() {
|
|
16175
16162
|
const dates = [];
|
|
16176
16163
|
for (let d = 0; d < 7; d++) {
|
|
16177
|
-
dates[d] = moment$
|
|
16164
|
+
dates[d] = moment$5(this._today).add(d - 3, 'day');
|
|
16178
16165
|
}
|
|
16179
16166
|
this.$dates.next(dates);
|
|
16180
16167
|
this.loadData();
|
|
@@ -16215,7 +16202,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16215
16202
|
{ type: DateFormatPipe }
|
|
16216
16203
|
];
|
|
16217
16204
|
|
|
16218
|
-
const moment = momentImported;
|
|
16205
|
+
const moment$6 = momentImported;
|
|
16219
16206
|
class DateTimeTestPage {
|
|
16220
16207
|
constructor(platform, formBuilder, cd) {
|
|
16221
16208
|
this.platform = platform;
|
|
@@ -16247,7 +16234,7 @@ class DateTimeTestPage {
|
|
|
16247
16234
|
// Load the form with data
|
|
16248
16235
|
loadData() {
|
|
16249
16236
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16250
|
-
const now = moment();
|
|
16237
|
+
const now = moment$6();
|
|
16251
16238
|
const data = {
|
|
16252
16239
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16253
16240
|
enable: toDateISOString(now),
|
|
@@ -16308,20 +16295,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16308
16295
|
{ type: ChangeDetectorRef }
|
|
16309
16296
|
];
|
|
16310
16297
|
|
|
16311
|
-
class EntityTestClass {
|
|
16298
|
+
class EntityTestClass$1 {
|
|
16312
16299
|
}
|
|
16313
|
-
const FAKE_ENTITIES = [
|
|
16300
|
+
const FAKE_ENTITIES$1 = [
|
|
16314
16301
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16315
16302
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16316
16303
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16317
16304
|
];
|
|
16318
|
-
function deepCopy(values) {
|
|
16319
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16305
|
+
function deepCopy$1(values) {
|
|
16306
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
16320
16307
|
}
|
|
16321
16308
|
class ChipsTestPage {
|
|
16322
16309
|
constructor(formBuilder) {
|
|
16323
16310
|
this.formBuilder = formBuilder;
|
|
16324
|
-
this._items = deepCopy(FAKE_ENTITIES);
|
|
16311
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1);
|
|
16325
16312
|
this._$items = new BehaviorSubject(undefined);
|
|
16326
16313
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16327
16314
|
this.form = formBuilder.group({
|
|
@@ -16340,7 +16327,7 @@ class ChipsTestPage {
|
|
|
16340
16327
|
});
|
|
16341
16328
|
// From items
|
|
16342
16329
|
this.autocompleteFields.add('entity-items', {
|
|
16343
|
-
items: FAKE_ENTITIES.slice(),
|
|
16330
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
16344
16331
|
attributes: ['label', 'name'],
|
|
16345
16332
|
displayWith: this.entityToString
|
|
16346
16333
|
});
|
|
@@ -16361,15 +16348,15 @@ class ChipsTestPage {
|
|
|
16361
16348
|
const data = {
|
|
16362
16349
|
entity: [],
|
|
16363
16350
|
// THis item is NOT in the items list => i should be displayed anyway
|
|
16364
|
-
entityInitial: FAKE_ENTITIES.slice(1, 2),
|
|
16365
|
-
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16351
|
+
entityInitial: FAKE_ENTITIES$1.slice(1, 2),
|
|
16352
|
+
disableEntity: FAKE_ENTITIES$1.slice(1, 2)
|
|
16366
16353
|
};
|
|
16367
16354
|
this.form.setValue(data);
|
|
16368
16355
|
});
|
|
16369
16356
|
}
|
|
16370
16357
|
loadItems() {
|
|
16371
16358
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16372
|
-
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16359
|
+
this._$items.next(deepCopy$1(FAKE_ENTITIES$1));
|
|
16373
16360
|
});
|
|
16374
16361
|
}
|
|
16375
16362
|
entityToString(item) {
|
|
@@ -16410,7 +16397,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
16410
16397
|
},] }
|
|
16411
16398
|
];
|
|
16412
16399
|
|
|
16413
|
-
const routes
|
|
16400
|
+
const routes = [
|
|
16414
16401
|
{
|
|
16415
16402
|
path: '',
|
|
16416
16403
|
pathMatch: 'full',
|
|
@@ -16462,7 +16449,7 @@ MaterialTestingModule.decorators = [
|
|
|
16462
16449
|
ReactiveFormsModule,
|
|
16463
16450
|
SharedMaterialModule,
|
|
16464
16451
|
TranslateModule.forChild(),
|
|
16465
|
-
RouterModule.forChild(routes
|
|
16452
|
+
RouterModule.forChild(routes)
|
|
16466
16453
|
],
|
|
16467
16454
|
declarations: [
|
|
16468
16455
|
MaterialTestingPage,
|
|
@@ -16568,7 +16555,7 @@ class AppForm {
|
|
|
16568
16555
|
if (form)
|
|
16569
16556
|
this.setForm(form);
|
|
16570
16557
|
this.settings = injector.get(LocalSettingsService);
|
|
16571
|
-
this.errorTranslator = injector.get(
|
|
16558
|
+
this.errorTranslator = injector.get(FormErrorTranslator);
|
|
16572
16559
|
this.autocompleteHelper = new MatAutocompleteConfigHolder(this.settings && {
|
|
16573
16560
|
getUserAttributes: (a, b) => this.settings.getFieldDisplayAttributes(a, b)
|
|
16574
16561
|
});
|
|
@@ -17421,7 +17408,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17421
17408
|
});
|
|
17422
17409
|
}
|
|
17423
17410
|
}
|
|
17424
|
-
UserSettingsValidatorService.ɵprov =
|
|
17411
|
+
UserSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(ɵɵinject(FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17425
17412
|
UserSettingsValidatorService.decorators = [
|
|
17426
17413
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17427
17414
|
];
|
|
@@ -17465,7 +17452,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17465
17452
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17466
17453
|
}
|
|
17467
17454
|
}
|
|
17468
|
-
AccountValidatorService.ɵprov =
|
|
17455
|
+
AccountValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17469
17456
|
AccountValidatorService.decorators = [
|
|
17470
17457
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17471
17458
|
];
|
|
@@ -17998,7 +17985,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17998
17985
|
});
|
|
17999
17986
|
}
|
|
18000
17987
|
}
|
|
18001
|
-
LocalSettingsValidatorService.ɵprov =
|
|
17988
|
+
LocalSettingsValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(ɵɵinject(FormBuilder), ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
18002
17989
|
LocalSettingsValidatorService.decorators = [
|
|
18003
17990
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
18004
17991
|
];
|
|
@@ -18616,7 +18603,7 @@ class IsOnFieldModePipe {
|
|
|
18616
18603
|
return value === 'FIELD';
|
|
18617
18604
|
}
|
|
18618
18605
|
}
|
|
18619
|
-
IsOnFieldModePipe.ɵprov =
|
|
18606
|
+
IsOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18620
18607
|
IsOnFieldModePipe.decorators = [
|
|
18621
18608
|
{ type: Pipe, args: [{
|
|
18622
18609
|
name: 'isOnField'
|
|
@@ -18628,7 +18615,7 @@ class IsNotOnFieldModePipe {
|
|
|
18628
18615
|
return value !== 'FIELD';
|
|
18629
18616
|
}
|
|
18630
18617
|
}
|
|
18631
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18618
|
+
IsNotOnFieldModePipe.ɵprov = ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18632
18619
|
IsNotOnFieldModePipe.decorators = [
|
|
18633
18620
|
{ type: Pipe, args: [{
|
|
18634
18621
|
name: 'isNotOnField'
|
|
@@ -18643,7 +18630,7 @@ class PersonToStringPipe {
|
|
|
18643
18630
|
return PersonUtils.personToString(value);
|
|
18644
18631
|
}
|
|
18645
18632
|
}
|
|
18646
|
-
PersonToStringPipe.ɵprov =
|
|
18633
|
+
PersonToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18647
18634
|
PersonToStringPipe.decorators = [
|
|
18648
18635
|
{ type: Pipe, args: [{
|
|
18649
18636
|
name: 'personToString'
|
|
@@ -18989,7 +18976,7 @@ class IsLoginAccountPipe {
|
|
|
18989
18976
|
return value && value.pubkey && true;
|
|
18990
18977
|
}
|
|
18991
18978
|
}
|
|
18992
|
-
IsLoginAccountPipe.ɵprov =
|
|
18979
|
+
IsLoginAccountPipe.ɵprov = ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18993
18980
|
IsLoginAccountPipe.decorators = [
|
|
18994
18981
|
{ type: Pipe, args: [{
|
|
18995
18982
|
name: 'isLogin'
|
|
@@ -19001,7 +18988,7 @@ class AccountToStringPipe {
|
|
|
19001
18988
|
return accountToString(value);
|
|
19002
18989
|
}
|
|
19003
18990
|
}
|
|
19004
|
-
AccountToStringPipe.ɵprov =
|
|
18991
|
+
AccountToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
19005
18992
|
AccountToStringPipe.decorators = [
|
|
19006
18993
|
{ type: Pipe, args: [{
|
|
19007
18994
|
name: 'accountToString'
|
|
@@ -19016,7 +19003,7 @@ class DepartmentToStringPipe {
|
|
|
19016
19003
|
return departmentToString(value);
|
|
19017
19004
|
}
|
|
19018
19005
|
}
|
|
19019
|
-
DepartmentToStringPipe.ɵprov =
|
|
19006
|
+
DepartmentToStringPipe.ɵprov = ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
19020
19007
|
DepartmentToStringPipe.decorators = [
|
|
19021
19008
|
{ type: Pipe, args: [{
|
|
19022
19009
|
name: 'departmentToString'
|
|
@@ -19042,7 +19029,7 @@ class MenuService {
|
|
|
19042
19029
|
this._visibleSubject.next(value);
|
|
19043
19030
|
}
|
|
19044
19031
|
}
|
|
19045
|
-
MenuService.ɵprov =
|
|
19032
|
+
MenuService.ɵprov = ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19046
19033
|
MenuService.decorators = [
|
|
19047
19034
|
{ type: Injectable, args: [{
|
|
19048
19035
|
providedIn: 'root'
|
|
@@ -19536,7 +19523,7 @@ class AuthGuardService {
|
|
|
19536
19523
|
}));
|
|
19537
19524
|
}
|
|
19538
19525
|
}
|
|
19539
|
-
AuthGuardService.ɵprov =
|
|
19526
|
+
AuthGuardService.ɵprov = ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(ɵɵinject(AccountService), ɵɵinject(ModalController), ɵɵinject(Router), ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
19540
19527
|
AuthGuardService.decorators = [
|
|
19541
19528
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19542
19529
|
];
|
|
@@ -19584,7 +19571,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19584
19571
|
query,
|
|
19585
19572
|
variables: { id },
|
|
19586
19573
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19587
|
-
error: { code: ErrorCodes
|
|
19574
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19588
19575
|
})
|
|
19589
19576
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19590
19577
|
? (data && this.fromObject(data))
|
|
@@ -19599,7 +19586,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19599
19586
|
query,
|
|
19600
19587
|
variables: { id },
|
|
19601
19588
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19602
|
-
error: { code: ErrorCodes
|
|
19589
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19603
19590
|
});
|
|
19604
19591
|
// Convert to entity
|
|
19605
19592
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19630,7 +19617,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19630
19617
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19631
19618
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19632
19619
|
variables,
|
|
19633
|
-
error: { code: ErrorCodes
|
|
19620
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19634
19621
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19635
19622
|
})
|
|
19636
19623
|
.pipe(map(({ data, total }) => {
|
|
@@ -19666,7 +19653,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19666
19653
|
const { data, total } = yield this.graphql.query({
|
|
19667
19654
|
query,
|
|
19668
19655
|
variables,
|
|
19669
|
-
error: { code: ErrorCodes
|
|
19656
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19670
19657
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19671
19658
|
});
|
|
19672
19659
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19705,7 +19692,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19705
19692
|
variables: {
|
|
19706
19693
|
filter: filter && filter.asPodObject()
|
|
19707
19694
|
},
|
|
19708
|
-
error: { code: ErrorCodes
|
|
19695
|
+
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19709
19696
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19710
19697
|
});
|
|
19711
19698
|
return res.total;
|
|
@@ -19738,7 +19725,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19738
19725
|
variables: {
|
|
19739
19726
|
data: json
|
|
19740
19727
|
},
|
|
19741
|
-
error: { code: ErrorCodes
|
|
19728
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19742
19729
|
update: (proxy, { data }) => {
|
|
19743
19730
|
const savedEntities = data && data.data;
|
|
19744
19731
|
if (savedEntities) {
|
|
@@ -19794,7 +19781,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19794
19781
|
variables: {
|
|
19795
19782
|
data: json
|
|
19796
19783
|
},
|
|
19797
|
-
error: { code: ErrorCodes
|
|
19784
|
+
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19798
19785
|
update: (cache, { data }) => {
|
|
19799
19786
|
// Update entity
|
|
19800
19787
|
const savedEntity = data && data.data;
|
|
@@ -19842,7 +19829,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19842
19829
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19843
19830
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19844
19831
|
variables: { ids },
|
|
19845
|
-
error: { code: ErrorCodes
|
|
19832
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19846
19833
|
update: (cache, res) => {
|
|
19847
19834
|
// Remove from cache
|
|
19848
19835
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19883,7 +19870,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19883
19870
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19884
19871
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19885
19872
|
variables: { id },
|
|
19886
|
-
error: { code: ErrorCodes
|
|
19873
|
+
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19887
19874
|
update: (proxy, res) => {
|
|
19888
19875
|
// Remove from cache
|
|
19889
19876
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19916,7 +19903,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19916
19903
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19917
19904
|
variables,
|
|
19918
19905
|
error: {
|
|
19919
|
-
code: ErrorCodes
|
|
19906
|
+
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19920
19907
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19921
19908
|
}
|
|
19922
19909
|
})
|
|
@@ -20091,7 +20078,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
20091
20078
|
if (this._debug)
|
|
20092
20079
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
20093
20080
|
// Stop with an error
|
|
20094
|
-
throw { code: ErrorCodes
|
|
20081
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20095
20082
|
}
|
|
20096
20083
|
this._editingRowCount = 0;
|
|
20097
20084
|
let data;
|
|
@@ -20374,7 +20361,7 @@ class AppTable {
|
|
|
20374
20361
|
this._paginator = null;
|
|
20375
20362
|
this.mobile = this.platform.is('mobile');
|
|
20376
20363
|
this.translate = injector === null || injector === void 0 ? void 0 : injector.get(TranslateService);
|
|
20377
|
-
this.formErrorAdapter = injector === null || injector === void 0 ? void 0 : injector.get(
|
|
20364
|
+
this.formErrorAdapter = injector === null || injector === void 0 ? void 0 : injector.get(FormErrorTranslator);
|
|
20378
20365
|
this.alertCtrl = injector === null || injector === void 0 ? void 0 : injector.get(AlertController);
|
|
20379
20366
|
this.toastController = injector === null || injector === void 0 ? void 0 : injector.get(ToastController);
|
|
20380
20367
|
this._autocompleteConfigHolder = new MatAutocompleteConfigHolder({
|
|
@@ -20913,14 +20900,14 @@ class AppTable {
|
|
|
20913
20900
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20914
20901
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20915
20902
|
if (this.readOnly) {
|
|
20916
|
-
throw { code: ErrorCodes
|
|
20903
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20917
20904
|
}
|
|
20918
20905
|
this.resetError();
|
|
20919
20906
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20920
20907
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20921
20908
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20922
20909
|
if (!this.confirmEditCreate()) {
|
|
20923
|
-
throw { code: ErrorCodes
|
|
20910
|
+
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20924
20911
|
}
|
|
20925
20912
|
// Mark as saving
|
|
20926
20913
|
this.markAsSaving();
|
|
@@ -21036,7 +21023,7 @@ class AppTable {
|
|
|
21036
21023
|
deleteRows(event, rows, opts) {
|
|
21037
21024
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21038
21025
|
if (this.readOnly) {
|
|
21039
|
-
throw { code: ErrorCodes
|
|
21026
|
+
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21040
21027
|
}
|
|
21041
21028
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
21042
21029
|
return 0; // SKip
|
|
@@ -22323,7 +22310,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22323
22310
|
// Default options
|
|
22324
22311
|
enableListenChanges: (injector.get(ENVIRONMENT).listenRemoteChanges === true), pathIdAttribute: 'id', autoLoad: true, autoUpdateRoute: true, i18nPrefix: '' }, options);
|
|
22325
22312
|
this.settings = injector.get(LocalSettingsService);
|
|
22326
|
-
this.formErrorAdapter = injector.get(
|
|
22313
|
+
this.formErrorAdapter = injector.get(FormErrorTranslator);
|
|
22327
22314
|
this.cd = injector.get(ChangeDetectorRef);
|
|
22328
22315
|
this.dateFormat = injector.get(DateFormatPipe);
|
|
22329
22316
|
this.toastController = injector.get(ToastController);
|
|
@@ -22447,7 +22434,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22447
22434
|
try {
|
|
22448
22435
|
const data = yield this.dataService.load(id, opts);
|
|
22449
22436
|
if (!data)
|
|
22450
|
-
throw { code: ErrorCodes
|
|
22437
|
+
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22451
22438
|
this._usageMode = this.computeUsageMode(data);
|
|
22452
22439
|
yield this.onEntityLoaded(data, opts);
|
|
22453
22440
|
yield this.updateView(data, opts);
|
|
@@ -23351,7 +23338,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23351
23338
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23352
23339
|
}
|
|
23353
23340
|
}
|
|
23354
|
-
UserEventService.ɵprov =
|
|
23341
|
+
UserEventService.ɵprov = ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(ɵɵinject(GraphqlService), ɵɵinject(AccountService), ɵɵinject(NetworkService), ɵɵinject(TranslateService), ɵɵinject(ToastController), ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
|
|
23355
23342
|
UserEventService.decorators = [
|
|
23356
23343
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23357
23344
|
];
|
|
@@ -23736,7 +23723,7 @@ class PersonService extends BaseEntityService {
|
|
|
23736
23723
|
return target;
|
|
23737
23724
|
}
|
|
23738
23725
|
}
|
|
23739
|
-
PersonService.ɵprov =
|
|
23726
|
+
PersonService.ɵprov = ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(ɵɵinject(GraphqlService), ɵɵinject(PlatformService), ɵɵinject(NetworkService), ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
23740
23727
|
PersonService.decorators = [
|
|
23741
23728
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23742
23729
|
];
|
|
@@ -23767,7 +23754,7 @@ class PersonValidatorService {
|
|
|
23767
23754
|
return this.formBuilder.group(formConfig);
|
|
23768
23755
|
}
|
|
23769
23756
|
}
|
|
23770
|
-
PersonValidatorService.ɵprov =
|
|
23757
|
+
PersonValidatorService.ɵprov = ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(ɵɵinject(FormBuilder), ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23771
23758
|
PersonValidatorService.decorators = [
|
|
23772
23759
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23773
23760
|
];
|
|
@@ -23973,16 +23960,16 @@ AdminModule.decorators = [
|
|
|
23973
23960
|
];
|
|
23974
23961
|
AdminModule.ctorParameters = () => [];
|
|
23975
23962
|
|
|
23976
|
-
const ɵ0 = {
|
|
23963
|
+
const ɵ0$a = {
|
|
23977
23964
|
profile: 'ADMIN'
|
|
23978
23965
|
};
|
|
23979
|
-
const routes = [
|
|
23966
|
+
const routes$1 = [
|
|
23980
23967
|
{
|
|
23981
23968
|
path: 'users',
|
|
23982
23969
|
pathMatch: 'full',
|
|
23983
23970
|
component: UsersPage,
|
|
23984
23971
|
canActivate: [AuthGuardService],
|
|
23985
|
-
data: ɵ0
|
|
23972
|
+
data: ɵ0$a
|
|
23986
23973
|
}
|
|
23987
23974
|
];
|
|
23988
23975
|
class AdminRoutingModule {
|
|
@@ -23992,13 +23979,13 @@ AdminRoutingModule.decorators = [
|
|
|
23992
23979
|
imports: [
|
|
23993
23980
|
SharedRoutingModule,
|
|
23994
23981
|
AdminModule,
|
|
23995
|
-
RouterModule.forChild(routes)
|
|
23982
|
+
RouterModule.forChild(routes$1)
|
|
23996
23983
|
],
|
|
23997
23984
|
exports: [RouterModule]
|
|
23998
23985
|
},] }
|
|
23999
23986
|
];
|
|
24000
23987
|
|
|
24001
|
-
const ErrorCodes = {
|
|
23988
|
+
const ErrorCodes$2 = {
|
|
24002
23989
|
LOAD_PERSONS_ERROR: 100,
|
|
24003
23990
|
SAVE_PERSONS_ERROR: 101,
|
|
24004
23991
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -24010,5 +23997,5 @@ const ErrorCodes = {
|
|
|
24010
23997
|
* Generated bundle index. Do not edit.
|
|
24011
23998
|
*/
|
|
24012
23999
|
|
|
24013
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken,
|
|
24000
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes$2 as ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, 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, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, SharedMatBadgeIconModule as ɵc, MatBadgeIconDirective as ɵd, isFocusableElement as ɵe, MatBadgeIconTestPage as ɵf, RegisterForm as ɵg, AccountValidatorService as ɵh, RegisterModal as ɵi, UserSettingsValidatorService as ɵj, LocalSettingsValidatorService as ɵk };
|
|
24014
24001
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|