@sumaris-net/ngx-components 0.27.2 → 0.27.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +555 -431
- 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/editor.class.js +174 -127
- package/esm2015/src/app/core/form/entity-editor.class.js +1 -1
- package/esm2015/src/app/core/form/form.class.js +17 -1
- package/esm2015/src/app/core/form/form.utils.js +14 -1
- package/esm2015/src/app/core/table/table.class.js +14 -2
- package/esm2015/src/app/shared/pipes/number-format.pipe.js +1 -1
- package/fesm2015/sumaris-net.ngx-components.js +483 -382
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +2 -2
- package/src/app/core/form/editor.class.d.ts +43 -26
- package/src/app/core/form/form.class.d.ts +10 -0
- package/src/app/core/form/form.utils.d.ts +16 -0
- package/src/app/core/table/table.class.d.ts +5 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, 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';
|
|
2
4
|
import { CommonModule, DOCUMENT, Location } from '@angular/common';
|
|
3
5
|
import { CdkTableModule } from '@angular/cdk/table';
|
|
4
6
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
5
7
|
import { OverlayModule, OverlayContainer, FullscreenOverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
6
8
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
9
|
+
import * as i1$2 from '@angular/material/core';
|
|
7
10
|
import { DateAdapter, MatCommonModule, MatRippleModule } from '@angular/material/core';
|
|
8
11
|
import { MatTableModule, MatTable, MatColumnDef } from '@angular/material/table';
|
|
9
12
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
@@ -27,16 +30,21 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
|
27
30
|
import { MatRadioModule } from '@angular/material/radio';
|
|
28
31
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
29
32
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
33
|
+
import * as i2$1 from '@angular/material/dialog';
|
|
30
34
|
import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
31
35
|
import { MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteModule, MAT_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
32
36
|
import { __awaiter, __decorate } from 'tslib';
|
|
37
|
+
import * as i1$6 from '@angular/forms';
|
|
33
38
|
import { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
|
|
34
39
|
import { timer, merge, fromEvent, Subscription, BehaviorSubject, Subject, isObservable, of, noop as noop$8, Observable, defer, from, combineLatest, EMPTY } from 'rxjs';
|
|
35
40
|
import { filter, first, map, takeUntil, startWith, debounceTime, takeWhile, switchMap, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
|
|
41
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
36
42
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
|
+
import * as i1$4 from '@ionic/angular';
|
|
37
44
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent } from '@ionic/angular';
|
|
38
45
|
import * as momentImported from 'moment';
|
|
39
46
|
import { isMoment } from 'moment';
|
|
47
|
+
import * as i1 from '@angular/material-moment-adapter';
|
|
40
48
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
41
49
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
42
50
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
@@ -46,32 +54,38 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
46
54
|
import { MatDividerModule } from '@angular/material/divider';
|
|
47
55
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
48
56
|
import { MatChipsModule } from '@angular/material/chips';
|
|
57
|
+
import * as i3$3 from '@angular/router';
|
|
49
58
|
import { Router, RouterModule, RouteReuseStrategy, ActivatedRoute } from '@angular/router';
|
|
59
|
+
import * as i1$5 from '@angular/platform-browser';
|
|
50
60
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
61
|
+
import * as i2$2 from '@angular/common/http';
|
|
51
62
|
import { HttpResponse, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
52
63
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
53
|
-
import { NativeAudio
|
|
54
|
-
import { Vibration
|
|
64
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
65
|
+
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
55
66
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
67
|
+
import * as i2 from '@ionic-native/native-audio/ngx/index';
|
|
68
|
+
import * as i3 from '@ionic-native/vibration/ngx/index';
|
|
69
|
+
import * as i4 from '@ionic-native/audio-management/ngx/index';
|
|
59
70
|
import * as uuidv4Imported from 'uuid/v4';
|
|
60
71
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
61
72
|
import { MarkdownModule } from 'ngx-markdown';
|
|
62
73
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
74
|
+
import * as i3$1 from '@ionic/storage';
|
|
63
75
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
64
76
|
import 'zone.js/dist/zone-error';
|
|
65
|
-
import { SplashScreen
|
|
66
|
-
import { Connection, Network
|
|
67
|
-
import { CacheService
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import { StatusBar
|
|
77
|
+
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
|
78
|
+
import { Connection, Network } from '@ionic-native/network/ngx';
|
|
79
|
+
import { CacheService, CacheModule } from 'ionic-cache';
|
|
80
|
+
import * as i6 from 'ionic-cache/dist/cache.service';
|
|
81
|
+
import * as i9 from '@ionic-native/network/ngx/index';
|
|
82
|
+
import * as i10 from '@ionic-native/splash-screen/ngx/index';
|
|
83
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
|
+
import * as i2$4 from '@angular/cdk/platform';
|
|
72
85
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
73
|
-
import { InAppBrowser
|
|
86
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
74
87
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
88
|
+
import * as i2$3 from 'apollo-angular';
|
|
75
89
|
import { Apollo } from 'apollo-angular';
|
|
76
90
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
77
91
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -79,13 +93,14 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
79
93
|
import QueueLink from 'apollo-link-queue';
|
|
80
94
|
import SerializingLink from 'apollo-link-serialize';
|
|
81
95
|
import loggerLink from 'apollo-link-logger';
|
|
96
|
+
import * as i3$2 from 'apollo-angular/http';
|
|
82
97
|
import { HttpLink } from 'apollo-angular/http';
|
|
83
98
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
84
|
-
import { NotificationVisibility, Downloader
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
99
|
+
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
100
|
+
import * as i14 from '@ionic-native/status-bar/ngx/index';
|
|
101
|
+
import * as i15 from '@ionic-native/keyboard/ngx/index';
|
|
102
|
+
import * as i17 from '@ionic-native/in-app-browser/ngx/index';
|
|
103
|
+
import * as i18 from '@ionic-native/downloader/ngx/index';
|
|
89
104
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
90
105
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
91
106
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -870,19 +885,19 @@ class MatAutocompleteConfigHolder {
|
|
|
870
885
|
return this.fields[fieldName] || this.add(fieldName);
|
|
871
886
|
}
|
|
872
887
|
}
|
|
873
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
888
|
+
const DEFAULT_VALUE_ACCESSOR$6 = {
|
|
874
889
|
provide: NG_VALUE_ACCESSOR,
|
|
875
890
|
useExisting: forwardRef(() => MatAutocompleteField),
|
|
876
891
|
multi: true
|
|
877
892
|
};
|
|
878
|
-
const noop = () => { };
|
|
879
|
-
const ɵ0 = noop;
|
|
893
|
+
const noop$7 = () => { };
|
|
894
|
+
const ɵ0$a = noop$7;
|
|
880
895
|
class MatAutocompleteField {
|
|
881
896
|
constructor(cd, formGroupDir) {
|
|
882
897
|
this.cd = cd;
|
|
883
898
|
this.formGroupDir = formGroupDir;
|
|
884
|
-
this._onChangeCallback = noop;
|
|
885
|
-
this._onTouchedCallback = noop;
|
|
899
|
+
this._onChangeCallback = noop$7;
|
|
900
|
+
this._onTouchedCallback = noop$7;
|
|
886
901
|
this._subscription = new Subscription();
|
|
887
902
|
this._filter$ = new BehaviorSubject(undefined);
|
|
888
903
|
this._reload$ = new Subject();
|
|
@@ -1476,7 +1491,7 @@ MatAutocompleteField.decorators = [
|
|
|
1476
1491
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1477
1492
|
selector: 'mat-autocomplete-field',
|
|
1478
1493
|
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 (keyup.enter)=\"onKeyupEnter.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",
|
|
1479
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
1494
|
+
providers: [DEFAULT_VALUE_ACCESSOR$6],
|
|
1480
1495
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1481
1496
|
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}"]
|
|
1482
1497
|
},] }
|
|
@@ -1553,7 +1568,7 @@ class DateFormatPipe {
|
|
|
1553
1568
|
return this.dateAdapter.format(date, displayFormat);
|
|
1554
1569
|
}
|
|
1555
1570
|
}
|
|
1556
|
-
DateFormatPipe.ɵprov =
|
|
1571
|
+
DateFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFormatPipe_Factory() { return new DateFormatPipe(i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateFormatPipe, providedIn: "root" });
|
|
1557
1572
|
DateFormatPipe.decorators = [
|
|
1558
1573
|
{ type: Pipe, args: [{
|
|
1559
1574
|
name: 'dateFormat'
|
|
@@ -1565,7 +1580,7 @@ DateFormatPipe.ctorParameters = () => [
|
|
|
1565
1580
|
{ type: TranslateService }
|
|
1566
1581
|
];
|
|
1567
1582
|
|
|
1568
|
-
const moment = momentImported;
|
|
1583
|
+
const moment$6 = momentImported;
|
|
1569
1584
|
class DateDiffDurationPipe {
|
|
1570
1585
|
constructor(dateAdapter, translate) {
|
|
1571
1586
|
this.dateAdapter = dateAdapter;
|
|
@@ -1581,17 +1596,17 @@ class DateDiffDurationPipe {
|
|
|
1581
1596
|
return this.format(startDate, endDate);
|
|
1582
1597
|
}
|
|
1583
1598
|
format(startDate, endDate) {
|
|
1584
|
-
const duration = moment.duration(endDate.diff(startDate));
|
|
1599
|
+
const duration = moment$6.duration(endDate.diff(startDate));
|
|
1585
1600
|
if (duration.asMinutes() < 0)
|
|
1586
1601
|
return '';
|
|
1587
|
-
const timeDuration = moment(0)
|
|
1602
|
+
const timeDuration = moment$6(0)
|
|
1588
1603
|
.hour(duration.hours())
|
|
1589
1604
|
.minute(duration.minutes());
|
|
1590
1605
|
const days = Math.floor(duration.asDays());
|
|
1591
1606
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + timeDuration.format('HH:mm');
|
|
1592
1607
|
}
|
|
1593
1608
|
}
|
|
1594
|
-
DateDiffDurationPipe.ɵprov =
|
|
1609
|
+
DateDiffDurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateDiffDurationPipe_Factory() { return new DateDiffDurationPipe(i0.ɵɵinject(i1$2.DateAdapter), i0.ɵɵinject(i1$1.TranslateService)); }, token: DateDiffDurationPipe, providedIn: "root" });
|
|
1595
1610
|
DateDiffDurationPipe.decorators = [
|
|
1596
1611
|
{ type: Pipe, args: [{
|
|
1597
1612
|
name: 'dateDiffDuration'
|
|
@@ -1612,7 +1627,7 @@ class DateFromNowPipe {
|
|
|
1612
1627
|
return date ? date.fromNow(args && args.withoutSuffix) : '';
|
|
1613
1628
|
}
|
|
1614
1629
|
}
|
|
1615
|
-
DateFromNowPipe.ɵprov =
|
|
1630
|
+
DateFromNowPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DateFromNowPipe_Factory() { return new DateFromNowPipe(i0.ɵɵinject(i1.MomentDateAdapter)); }, token: DateFromNowPipe, providedIn: "root" });
|
|
1616
1631
|
DateFromNowPipe.decorators = [
|
|
1617
1632
|
{ type: Pipe, args: [{
|
|
1618
1633
|
name: 'dateFromNow'
|
|
@@ -1681,7 +1696,7 @@ function formatToDD(value, opts) {
|
|
|
1681
1696
|
value *= -1;
|
|
1682
1697
|
}
|
|
1683
1698
|
}
|
|
1684
|
-
let degrees = roundFloat(value, opts.maxDecimals).toString();
|
|
1699
|
+
let degrees = roundFloat$1(value, opts.maxDecimals).toString();
|
|
1685
1700
|
// Add sign
|
|
1686
1701
|
let sign = negative ? '-' : '+';
|
|
1687
1702
|
if (opts.placeholderChar) {
|
|
@@ -1732,7 +1747,7 @@ function formatToDDMMSS(value, opts) {
|
|
|
1732
1747
|
}
|
|
1733
1748
|
let degrees = Math.trunc(value);
|
|
1734
1749
|
let minutes = Math.trunc((value - degrees) * 60);
|
|
1735
|
-
let seconds = roundFloat(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1750
|
+
let seconds = roundFloat$1(((value - degrees) * 60 - minutes) * 60, opts.maxDecimals);
|
|
1736
1751
|
while (seconds >= 60) {
|
|
1737
1752
|
seconds -= 60;
|
|
1738
1753
|
minutes += 1;
|
|
@@ -1800,7 +1815,7 @@ function formatToDDMM(value, opts) {
|
|
|
1800
1815
|
}
|
|
1801
1816
|
}
|
|
1802
1817
|
let degrees = Math.trunc(value);
|
|
1803
|
-
let minutes = roundFloat((value - degrees) * 60, opts.maxDecimals);
|
|
1818
|
+
let minutes = roundFloat$1((value - degrees) * 60, opts.maxDecimals);
|
|
1804
1819
|
while (minutes >= 60) {
|
|
1805
1820
|
minutes -= 60;
|
|
1806
1821
|
degrees += 1;
|
|
@@ -1851,15 +1866,15 @@ function parseLatitudeOrLongitude(input, pattern, maxDecimals, placeholderChar)
|
|
|
1851
1866
|
return NaN;
|
|
1852
1867
|
}
|
|
1853
1868
|
if (pattern === 'DD')
|
|
1854
|
-
return roundFloat(degrees, maxDecimals);
|
|
1869
|
+
return roundFloat$1(degrees, maxDecimals);
|
|
1855
1870
|
const minutes = (pattern === 'DDMMSS' || pattern === 'DDMM') && parts[1] && parseFloat(parts[1].replace(/,/g, '.')) || 0;
|
|
1856
1871
|
const seconds = (pattern === 'DDMMSS') && parts[2] && parseFloat(parts[2].replace(/,/g, '.')) || 0;
|
|
1857
1872
|
const direction = ((pattern === 'DDMMSS') && parts[3]) || ((pattern === 'DDMM') && parts[2]) || undefined;
|
|
1858
1873
|
const sign = (direction && (direction === 's' || direction === 'S' || direction === 'w' || direction === 'W')) ? -1 : 1;
|
|
1859
1874
|
degrees = sign * (degrees + minutes / 60 + seconds / (60 * 60));
|
|
1860
|
-
return roundFloat(degrees, maxDecimals);
|
|
1875
|
+
return roundFloat$1(degrees, maxDecimals);
|
|
1861
1876
|
}
|
|
1862
|
-
function roundFloat(input, maxDecimals) {
|
|
1877
|
+
function roundFloat$1(input, maxDecimals) {
|
|
1863
1878
|
if (maxDecimals > 0) {
|
|
1864
1879
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
1865
1880
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -1879,7 +1894,7 @@ class LatLongFormatPipe {
|
|
|
1879
1894
|
return ((!args.type || args.type !== 'latitude') ? formatLongitude : formatLatitude)(value, args);
|
|
1880
1895
|
}
|
|
1881
1896
|
}
|
|
1882
|
-
LatLongFormatPipe.ɵprov =
|
|
1897
|
+
LatLongFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatLongFormatPipe_Factory() { return new LatLongFormatPipe(); }, token: LatLongFormatPipe, providedIn: "root" });
|
|
1883
1898
|
LatLongFormatPipe.decorators = [
|
|
1884
1899
|
{ type: Pipe, args: [{
|
|
1885
1900
|
name: 'latLongFormat'
|
|
@@ -1891,7 +1906,7 @@ class LatitudeFormatPipe {
|
|
|
1891
1906
|
this.transform = formatLatitude;
|
|
1892
1907
|
}
|
|
1893
1908
|
}
|
|
1894
|
-
LatitudeFormatPipe.ɵprov =
|
|
1909
|
+
LatitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LatitudeFormatPipe_Factory() { return new LatitudeFormatPipe(); }, token: LatitudeFormatPipe, providedIn: "root" });
|
|
1895
1910
|
LatitudeFormatPipe.decorators = [
|
|
1896
1911
|
{ type: Pipe, args: [{
|
|
1897
1912
|
name: 'latitudeFormat'
|
|
@@ -1903,7 +1918,7 @@ class LongitudeFormatPipe {
|
|
|
1903
1918
|
this.transform = formatLongitude;
|
|
1904
1919
|
}
|
|
1905
1920
|
}
|
|
1906
|
-
LongitudeFormatPipe.ɵprov =
|
|
1921
|
+
LongitudeFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function LongitudeFormatPipe_Factory() { return new LongitudeFormatPipe(); }, token: LongitudeFormatPipe, providedIn: "root" });
|
|
1907
1922
|
LongitudeFormatPipe.decorators = [
|
|
1908
1923
|
{ type: Pipe, args: [{
|
|
1909
1924
|
name: 'longitudeFormat'
|
|
@@ -1923,7 +1938,7 @@ class NumberFormatPipe {
|
|
|
1923
1938
|
}
|
|
1924
1939
|
}
|
|
1925
1940
|
}
|
|
1926
|
-
NumberFormatPipe.ɵprov =
|
|
1941
|
+
NumberFormatPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function NumberFormatPipe_Factory() { return new NumberFormatPipe(); }, token: NumberFormatPipe, providedIn: "root" });
|
|
1927
1942
|
NumberFormatPipe.decorators = [
|
|
1928
1943
|
{ type: Pipe, args: [{
|
|
1929
1944
|
name: 'numberFormat'
|
|
@@ -1963,7 +1978,7 @@ class HighlightPipe {
|
|
|
1963
1978
|
}
|
|
1964
1979
|
}
|
|
1965
1980
|
}
|
|
1966
|
-
HighlightPipe.ɵprov =
|
|
1981
|
+
HighlightPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function HighlightPipe_Factory() { return new HighlightPipe(); }, token: HighlightPipe, providedIn: "root" });
|
|
1967
1982
|
HighlightPipe.decorators = [
|
|
1968
1983
|
{ type: Pipe, args: [{
|
|
1969
1984
|
name: 'highlight'
|
|
@@ -2028,7 +2043,7 @@ FileSizePipe.decorators = [
|
|
|
2028
2043
|
{ type: Pipe, args: [{ name: 'fileSize' },] }
|
|
2029
2044
|
];
|
|
2030
2045
|
|
|
2031
|
-
const moment$
|
|
2046
|
+
const moment$5 = momentImported;
|
|
2032
2047
|
const DATE_UNIX_TIMESTAMP = 'X';
|
|
2033
2048
|
const DATE_UNIX_MS_TIMESTAMP = 'x';
|
|
2034
2049
|
class DateUtils {
|
|
@@ -2062,32 +2077,32 @@ function fromDateISOString(value) {
|
|
|
2062
2077
|
if (!value || isMoment(value))
|
|
2063
2078
|
return value;
|
|
2064
2079
|
// Parse the input value, as a ISO date time
|
|
2065
|
-
const date = moment$
|
|
2080
|
+
const date = moment$5(value, DATE_ISO_PATTERN);
|
|
2066
2081
|
if (date.isValid())
|
|
2067
2082
|
return date;
|
|
2068
2083
|
// Not valid: trying to convert from unix timestamp
|
|
2069
2084
|
if (typeof value === 'string') {
|
|
2070
2085
|
console.warn('Wrong date format - Trying to convert from local time: ' + value);
|
|
2071
2086
|
if (value.length === 10) {
|
|
2072
|
-
return moment$
|
|
2087
|
+
return moment$5(value, DATE_UNIX_TIMESTAMP);
|
|
2073
2088
|
}
|
|
2074
2089
|
else if (value.length === 13) {
|
|
2075
|
-
return moment$
|
|
2090
|
+
return moment$5(value, DATE_UNIX_MS_TIMESTAMP);
|
|
2076
2091
|
}
|
|
2077
2092
|
}
|
|
2078
2093
|
console.warn('Unable to parse date: ' + value);
|
|
2079
2094
|
return undefined;
|
|
2080
2095
|
}
|
|
2081
2096
|
function fromUnixTimestamp(timeInSec) {
|
|
2082
|
-
return moment$
|
|
2097
|
+
return moment$5(timeInSec, DATE_UNIX_TIMESTAMP);
|
|
2083
2098
|
}
|
|
2084
2099
|
function fromUnixMsTimestamp(timeInMs) {
|
|
2085
|
-
return moment$
|
|
2100
|
+
return moment$5(timeInMs, DATE_UNIX_MS_TIMESTAMP);
|
|
2086
2101
|
}
|
|
2087
2102
|
function toDuration(value, unit) {
|
|
2088
2103
|
if (!value)
|
|
2089
2104
|
return undefined;
|
|
2090
|
-
const duration = moment$
|
|
2105
|
+
const duration = moment$5.duration(value, unit);
|
|
2091
2106
|
// fix 990+ ms
|
|
2092
2107
|
if (duration.milliseconds() >= 990) {
|
|
2093
2108
|
duration.add(1000 - duration.milliseconds(), 'ms');
|
|
@@ -2116,7 +2131,7 @@ class DurationPipe {
|
|
|
2116
2131
|
return (days > 0 ? days.toString() + (this.dayUnit + ' ') : '') + hour + ':' + minute;
|
|
2117
2132
|
}
|
|
2118
2133
|
}
|
|
2119
|
-
DurationPipe.ɵprov =
|
|
2134
|
+
DurationPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DurationPipe_Factory() { return new DurationPipe(i0.ɵɵinject(i1$1.TranslateService)); }, token: DurationPipe, providedIn: "root" });
|
|
2120
2135
|
DurationPipe.decorators = [
|
|
2121
2136
|
{ type: Pipe, args: [{
|
|
2122
2137
|
name: 'duration'
|
|
@@ -2137,7 +2152,7 @@ class MathAbsPipe {
|
|
|
2137
2152
|
}
|
|
2138
2153
|
}
|
|
2139
2154
|
}
|
|
2140
|
-
MathAbsPipe.ɵprov =
|
|
2155
|
+
MathAbsPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MathAbsPipe_Factory() { return new MathAbsPipe(); }, token: MathAbsPipe, providedIn: "root" });
|
|
2141
2156
|
MathAbsPipe.decorators = [
|
|
2142
2157
|
{ type: Pipe, args: [{
|
|
2143
2158
|
name: 'mathAbs'
|
|
@@ -2149,7 +2164,7 @@ class EvenPipe {
|
|
|
2149
2164
|
return val % 2 === 0;
|
|
2150
2165
|
}
|
|
2151
2166
|
}
|
|
2152
|
-
EvenPipe.ɵprov =
|
|
2167
|
+
EvenPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function EvenPipe_Factory() { return new EvenPipe(); }, token: EvenPipe, providedIn: "root" });
|
|
2153
2168
|
EvenPipe.decorators = [
|
|
2154
2169
|
{ type: Pipe, args: [{
|
|
2155
2170
|
name: 'even'
|
|
@@ -2161,7 +2176,7 @@ class OddPipe {
|
|
|
2161
2176
|
return val % 2 !== 0;
|
|
2162
2177
|
}
|
|
2163
2178
|
}
|
|
2164
|
-
OddPipe.ɵprov =
|
|
2179
|
+
OddPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function OddPipe_Factory() { return new OddPipe(); }, token: OddPipe, providedIn: "root" });
|
|
2165
2180
|
OddPipe.decorators = [
|
|
2166
2181
|
{ type: Pipe, args: [{
|
|
2167
2182
|
name: 'odd'
|
|
@@ -2269,7 +2284,7 @@ class MapGetPipe {
|
|
|
2269
2284
|
return val[key];
|
|
2270
2285
|
}
|
|
2271
2286
|
}
|
|
2272
|
-
MapGetPipe.ɵprov =
|
|
2287
|
+
MapGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapGetPipe_Factory() { return new MapGetPipe(); }, token: MapGetPipe, providedIn: "root" });
|
|
2273
2288
|
MapGetPipe.decorators = [
|
|
2274
2289
|
{ type: Pipe, args: [{
|
|
2275
2290
|
name: 'mapGet'
|
|
@@ -2283,7 +2298,7 @@ class MapKeysPipe {
|
|
|
2283
2298
|
return Object.keys(map);
|
|
2284
2299
|
}
|
|
2285
2300
|
}
|
|
2286
|
-
MapKeysPipe.ɵprov =
|
|
2301
|
+
MapKeysPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapKeysPipe_Factory() { return new MapKeysPipe(); }, token: MapKeysPipe, providedIn: "root" });
|
|
2287
2302
|
MapKeysPipe.decorators = [
|
|
2288
2303
|
{ type: Pipe, args: [{
|
|
2289
2304
|
name: 'mapKeys'
|
|
@@ -2297,7 +2312,7 @@ class MapValuesPipe {
|
|
|
2297
2312
|
return Object.values(map);
|
|
2298
2313
|
}
|
|
2299
2314
|
}
|
|
2300
|
-
MapValuesPipe.ɵprov =
|
|
2315
|
+
MapValuesPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function MapValuesPipe_Factory() { return new MapValuesPipe(); }, token: MapValuesPipe, providedIn: "root" });
|
|
2301
2316
|
MapValuesPipe.decorators = [
|
|
2302
2317
|
{ type: Pipe, args: [{
|
|
2303
2318
|
name: 'mapValues'
|
|
@@ -2310,7 +2325,7 @@ class IsNotNilOrBlankPipe {
|
|
|
2310
2325
|
return isNotNilOrBlank(value);
|
|
2311
2326
|
}
|
|
2312
2327
|
}
|
|
2313
|
-
IsNotNilOrBlankPipe.ɵprov =
|
|
2328
|
+
IsNotNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotNilOrBlankPipe_Factory() { return new IsNotNilOrBlankPipe(); }, token: IsNotNilOrBlankPipe, providedIn: "root" });
|
|
2314
2329
|
IsNotNilOrBlankPipe.decorators = [
|
|
2315
2330
|
{ type: Pipe, args: [{
|
|
2316
2331
|
name: 'isNotNilOrBlank'
|
|
@@ -2322,7 +2337,7 @@ class IsNilOrBlankPipe {
|
|
|
2322
2337
|
return isNilOrBlank(value);
|
|
2323
2338
|
}
|
|
2324
2339
|
}
|
|
2325
|
-
IsNilOrBlankPipe.ɵprov =
|
|
2340
|
+
IsNilOrBlankPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNilOrBlankPipe_Factory() { return new IsNilOrBlankPipe(); }, token: IsNilOrBlankPipe, providedIn: "root" });
|
|
2326
2341
|
IsNilOrBlankPipe.decorators = [
|
|
2327
2342
|
{ type: Pipe, args: [{
|
|
2328
2343
|
name: 'isNilOrBlank'
|
|
@@ -2334,7 +2349,7 @@ class ToStringPipe {
|
|
|
2334
2349
|
return (value !== null && value !== undefined) ? value.toString() : '';
|
|
2335
2350
|
}
|
|
2336
2351
|
}
|
|
2337
|
-
ToStringPipe.ɵprov =
|
|
2352
|
+
ToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToStringPipe_Factory() { return new ToStringPipe(); }, token: ToStringPipe, providedIn: "root" });
|
|
2338
2353
|
ToStringPipe.decorators = [
|
|
2339
2354
|
{ type: Pipe, args: [{
|
|
2340
2355
|
name: 'toString'
|
|
@@ -2346,7 +2361,7 @@ class StrLengthPipe {
|
|
|
2346
2361
|
return value && value.length || 0;
|
|
2347
2362
|
}
|
|
2348
2363
|
}
|
|
2349
|
-
StrLengthPipe.ɵprov =
|
|
2364
|
+
StrLengthPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function StrLengthPipe_Factory() { return new StrLengthPipe(); }, token: StrLengthPipe, providedIn: "root" });
|
|
2350
2365
|
StrLengthPipe.decorators = [
|
|
2351
2366
|
{ type: Pipe, args: [{
|
|
2352
2367
|
name: 'strLength'
|
|
@@ -2397,7 +2412,7 @@ class TranslateContextService {
|
|
|
2397
2412
|
: parts.slice(0, parts.length - 1).concat(context + parts[parts.length - 1]).join('.');
|
|
2398
2413
|
}
|
|
2399
2414
|
}
|
|
2400
|
-
TranslateContextService.ɵprov =
|
|
2415
|
+
TranslateContextService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextService_Factory() { return new TranslateContextService(i0.ɵɵinject(i1$1.TranslateService)); }, token: TranslateContextService, providedIn: "root" });
|
|
2401
2416
|
TranslateContextService.decorators = [
|
|
2402
2417
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
2403
2418
|
];
|
|
@@ -2413,7 +2428,7 @@ class TranslateContextPipe {
|
|
|
2413
2428
|
return this.translateContext.instant(key, context);
|
|
2414
2429
|
}
|
|
2415
2430
|
}
|
|
2416
|
-
TranslateContextPipe.ɵprov =
|
|
2431
|
+
TranslateContextPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslateContextPipe_Factory() { return new TranslateContextPipe(i0.ɵɵinject(TranslateContextService)); }, token: TranslateContextPipe, providedIn: "root" });
|
|
2417
2432
|
TranslateContextPipe.decorators = [
|
|
2418
2433
|
{ type: Pipe, args: [{
|
|
2419
2434
|
name: 'translateContext'
|
|
@@ -2430,7 +2445,7 @@ class TranslatablePipe {
|
|
|
2430
2445
|
return (_a = changeCaseToUnderscore(value)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
|
2431
2446
|
}
|
|
2432
2447
|
}
|
|
2433
|
-
TranslatablePipe.ɵprov =
|
|
2448
|
+
TranslatablePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function TranslatablePipe_Factory() { return new TranslatablePipe(); }, token: TranslatablePipe, providedIn: "root" });
|
|
2434
2449
|
TranslatablePipe.decorators = [
|
|
2435
2450
|
{ type: Pipe, args: [{
|
|
2436
2451
|
name: 'translatable'
|
|
@@ -2447,7 +2462,7 @@ class PropertyGetPipe {
|
|
|
2447
2462
|
args && args.defaultValue);
|
|
2448
2463
|
}
|
|
2449
2464
|
}
|
|
2450
|
-
PropertyGetPipe.ɵprov =
|
|
2465
|
+
PropertyGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PropertyGetPipe_Factory() { return new PropertyGetPipe(); }, token: PropertyGetPipe, providedIn: "root" });
|
|
2451
2466
|
PropertyGetPipe.decorators = [
|
|
2452
2467
|
{ type: Pipe, args: [{
|
|
2453
2468
|
name: 'propertyGet'
|
|
@@ -2472,12 +2487,12 @@ NgInitDirective.propDecorators = {
|
|
|
2472
2487
|
ngInit: [{ type: Output }]
|
|
2473
2488
|
};
|
|
2474
2489
|
|
|
2475
|
-
const moment$
|
|
2490
|
+
const moment$4 = momentImported;
|
|
2476
2491
|
// @dynamic
|
|
2477
2492
|
class SharedValidators {
|
|
2478
2493
|
static validDate(control) {
|
|
2479
2494
|
const value = control.value;
|
|
2480
|
-
const date = !value || moment$
|
|
2495
|
+
const date = !value || moment$4.isMoment(value) ? value : moment$4(control.value, DATE_ISO_PATTERN);
|
|
2481
2496
|
if (date && (!date.isValid() || date.year() < 1970)) {
|
|
2482
2497
|
return { validDate: true };
|
|
2483
2498
|
}
|
|
@@ -2903,6 +2918,13 @@ class AppNullForm {
|
|
|
2903
2918
|
markAsDirty(opts) { }
|
|
2904
2919
|
markAsLoading(opts) { }
|
|
2905
2920
|
markAsLoaded(opts) { }
|
|
2921
|
+
markAsReady(opts) { }
|
|
2922
|
+
waitIdle(opts) {
|
|
2923
|
+
return Promise.reject(false);
|
|
2924
|
+
}
|
|
2925
|
+
ready() {
|
|
2926
|
+
return Promise.reject(true);
|
|
2927
|
+
}
|
|
2906
2928
|
}
|
|
2907
2929
|
class AppFormProvider {
|
|
2908
2930
|
constructor(getterFn) {
|
|
@@ -2946,6 +2968,9 @@ class AppFormProvider {
|
|
|
2946
2968
|
get loading() {
|
|
2947
2969
|
return this.delegate.loading;
|
|
2948
2970
|
}
|
|
2971
|
+
ready() {
|
|
2972
|
+
return this.delegate.ready();
|
|
2973
|
+
}
|
|
2949
2974
|
disable(opts) {
|
|
2950
2975
|
return this.delegate.disable(opts);
|
|
2951
2976
|
}
|
|
@@ -2973,6 +2998,9 @@ class AppFormProvider {
|
|
|
2973
2998
|
markAsLoaded(opts) {
|
|
2974
2999
|
return this.delegate.markAsLoaded(opts);
|
|
2975
3000
|
}
|
|
3001
|
+
markAsReady(opts) {
|
|
3002
|
+
return this.delegate.markAsReady(opts);
|
|
3003
|
+
}
|
|
2976
3004
|
}
|
|
2977
3005
|
AppFormProvider.NULL_FORM = new AppNullForm();
|
|
2978
3006
|
// TODO continue to use this kind of declaration ?
|
|
@@ -3512,7 +3540,7 @@ class FormErrorTranslator {
|
|
|
3512
3540
|
return errorKey;
|
|
3513
3541
|
}
|
|
3514
3542
|
}
|
|
3515
|
-
FormErrorTranslator.ɵprov =
|
|
3543
|
+
FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
3516
3544
|
FormErrorTranslator.decorators = [
|
|
3517
3545
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3518
3546
|
];
|
|
@@ -3781,9 +3809,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3781
3809
|
const hour = parseInt(durationParts[0] || '0');
|
|
3782
3810
|
const minute = parseInt(durationParts[1] || '0');
|
|
3783
3811
|
const value = hour + (minute + 0.5) / 60;
|
|
3784
|
-
return roundFloat
|
|
3812
|
+
return roundFloat(value, maxDecimals);
|
|
3785
3813
|
}
|
|
3786
|
-
function roundFloat
|
|
3814
|
+
function roundFloat(input, maxDecimals) {
|
|
3787
3815
|
if (maxDecimals > 0) {
|
|
3788
3816
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3789
3817
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3807,9 +3835,9 @@ const MASKS = {
|
|
|
3807
3835
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3808
3836
|
}
|
|
3809
3837
|
};
|
|
3810
|
-
const noop$
|
|
3838
|
+
const noop$6 = () => {
|
|
3811
3839
|
};
|
|
3812
|
-
const ɵ0$
|
|
3840
|
+
const ɵ0$9 = noop$6;
|
|
3813
3841
|
class MatLatLongField {
|
|
3814
3842
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3815
3843
|
this.platform = platform;
|
|
@@ -3817,8 +3845,8 @@ class MatLatLongField {
|
|
|
3817
3845
|
this.formBuilder = formBuilder;
|
|
3818
3846
|
this.cd = cd;
|
|
3819
3847
|
this.formGroupDir = formGroupDir;
|
|
3820
|
-
this._onChangeCallback = noop$
|
|
3821
|
-
this._onTouchedCallback = noop$
|
|
3848
|
+
this._onChangeCallback = noop$6;
|
|
3849
|
+
this._onTouchedCallback = noop$6;
|
|
3822
3850
|
this._subscription = new Subscription();
|
|
3823
3851
|
this.disabling = false;
|
|
3824
3852
|
this.writing = false;
|
|
@@ -4154,14 +4182,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4154
4182
|
},] }
|
|
4155
4183
|
];
|
|
4156
4184
|
|
|
4157
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4185
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4158
4186
|
provide: NG_VALUE_ACCESSOR,
|
|
4159
4187
|
useExisting: forwardRef(() => MatDate),
|
|
4160
4188
|
multi: true
|
|
4161
4189
|
};
|
|
4162
|
-
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4163
|
-
const noop$
|
|
4164
|
-
const ɵ0$
|
|
4190
|
+
const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4191
|
+
const noop$5 = () => { };
|
|
4192
|
+
const ɵ0$8 = noop$5;
|
|
4165
4193
|
class MatDate {
|
|
4166
4194
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4167
4195
|
this.dateAdapter = dateAdapter;
|
|
@@ -4170,12 +4198,12 @@ class MatDate {
|
|
|
4170
4198
|
this.cd = cd;
|
|
4171
4199
|
this.keyboard = keyboard;
|
|
4172
4200
|
this.formGroupDir = formGroupDir;
|
|
4173
|
-
this._onChangeCallback = noop$
|
|
4174
|
-
this._onTouchedCallback = noop$
|
|
4201
|
+
this._onChangeCallback = noop$5;
|
|
4202
|
+
this._onTouchedCallback = noop$5;
|
|
4175
4203
|
this._subscription = new Subscription();
|
|
4176
4204
|
this.writing = true;
|
|
4177
4205
|
this.disabling = false;
|
|
4178
|
-
this.dayMask = DAY_MASK;
|
|
4206
|
+
this.dayMask = DAY_MASK$2;
|
|
4179
4207
|
this.disabled = false;
|
|
4180
4208
|
this.floatLabel = 'auto';
|
|
4181
4209
|
this.readonly = false;
|
|
@@ -4412,7 +4440,7 @@ MatDate.decorators = [
|
|
|
4412
4440
|
selector: 'mat-date-field',
|
|
4413
4441
|
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",
|
|
4414
4442
|
providers: [
|
|
4415
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4443
|
+
DEFAULT_VALUE_ACCESSOR$5,
|
|
4416
4444
|
],
|
|
4417
4445
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4418
4446
|
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%}"]
|
|
@@ -4445,17 +4473,17 @@ MatDate.propDecorators = {
|
|
|
4445
4473
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4446
4474
|
};
|
|
4447
4475
|
|
|
4448
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4476
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4449
4477
|
provide: NG_VALUE_ACCESSOR,
|
|
4450
4478
|
useExisting: forwardRef(() => MatDateTime),
|
|
4451
4479
|
multi: true
|
|
4452
4480
|
};
|
|
4453
4481
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4454
4482
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4455
|
-
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4456
|
-
const noop$
|
|
4483
|
+
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4484
|
+
const noop$4 = () => {
|
|
4457
4485
|
};
|
|
4458
|
-
const ɵ0$
|
|
4486
|
+
const ɵ0$7 = noop$4;
|
|
4459
4487
|
class MatDateTime {
|
|
4460
4488
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
4461
4489
|
this.platform = platform;
|
|
@@ -4465,14 +4493,14 @@ class MatDateTime {
|
|
|
4465
4493
|
this.keyboard = keyboard;
|
|
4466
4494
|
this.cd = cd;
|
|
4467
4495
|
this.formGroupDir = formGroupDir;
|
|
4468
|
-
this._onChangeCallback = noop$
|
|
4469
|
-
this._onTouchedCallback = noop$
|
|
4496
|
+
this._onChangeCallback = noop$4;
|
|
4497
|
+
this._onTouchedCallback = noop$4;
|
|
4470
4498
|
this._subscription = new Subscription();
|
|
4471
4499
|
this.writing = true;
|
|
4472
4500
|
this.disabling = false;
|
|
4473
4501
|
this._readonly = false;
|
|
4474
4502
|
this.dayMask = DAY_MASK$1;
|
|
4475
|
-
this.hourMask = HOUR_MASK;
|
|
4503
|
+
this.hourMask = HOUR_MASK$1;
|
|
4476
4504
|
this.floatLabel = 'auto';
|
|
4477
4505
|
this.compact = false;
|
|
4478
4506
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4783,7 +4811,7 @@ MatDateTime.decorators = [
|
|
|
4783
4811
|
selector: 'mat-date-time-field',
|
|
4784
4812
|
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",
|
|
4785
4813
|
providers: [
|
|
4786
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4814
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
4787
4815
|
],
|
|
4788
4816
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4789
4817
|
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%}"]
|
|
@@ -4822,10 +4850,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4822
4850
|
useExisting: forwardRef(() => MatDateShort),
|
|
4823
4851
|
multi: true
|
|
4824
4852
|
};
|
|
4825
|
-
const DAY_MASK
|
|
4826
|
-
const noop$
|
|
4853
|
+
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4854
|
+
const noop$3 = () => {
|
|
4827
4855
|
};
|
|
4828
|
-
const ɵ0$
|
|
4856
|
+
const ɵ0$6 = noop$3;
|
|
4829
4857
|
class MatDateShort {
|
|
4830
4858
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4831
4859
|
this.dateAdapter = dateAdapter;
|
|
@@ -4834,11 +4862,11 @@ class MatDateShort {
|
|
|
4834
4862
|
this.cd = cd;
|
|
4835
4863
|
this.keyboard = keyboard;
|
|
4836
4864
|
this.formGroupDir = formGroupDir;
|
|
4837
|
-
this._onChangeCallback = noop$
|
|
4838
|
-
this._onTouchedCallback = noop$
|
|
4865
|
+
this._onChangeCallback = noop$3;
|
|
4866
|
+
this._onTouchedCallback = noop$3;
|
|
4839
4867
|
this.writing = true;
|
|
4840
4868
|
this.disabling = false;
|
|
4841
|
-
this.dayMask = DAY_MASK
|
|
4869
|
+
this.dayMask = DAY_MASK;
|
|
4842
4870
|
this.disabled = false;
|
|
4843
4871
|
this.floatLabel = 'auto';
|
|
4844
4872
|
this.readonly = false;
|
|
@@ -5151,16 +5179,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5151
5179
|
},] }
|
|
5152
5180
|
];
|
|
5153
5181
|
|
|
5154
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5182
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5155
5183
|
provide: NG_VALUE_ACCESSOR,
|
|
5156
5184
|
useExisting: forwardRef(() => MatDuration),
|
|
5157
5185
|
multi: true
|
|
5158
5186
|
};
|
|
5159
5187
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5160
|
-
const HOUR_MASK
|
|
5161
|
-
const noop$
|
|
5188
|
+
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5189
|
+
const noop$2 = () => {
|
|
5162
5190
|
};
|
|
5163
|
-
const ɵ0$5 = noop$
|
|
5191
|
+
const ɵ0$5 = noop$2;
|
|
5164
5192
|
class MatDuration {
|
|
5165
5193
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5166
5194
|
this.dateAdapter = dateAdapter;
|
|
@@ -5169,11 +5197,11 @@ class MatDuration {
|
|
|
5169
5197
|
this.cd = cd;
|
|
5170
5198
|
this.formGroupDir = formGroupDir;
|
|
5171
5199
|
this._subscription = new Subscription();
|
|
5172
|
-
this._onChangeCallback = noop$
|
|
5173
|
-
this._onTouchedCallback = noop$
|
|
5200
|
+
this._onChangeCallback = noop$2;
|
|
5201
|
+
this._onTouchedCallback = noop$2;
|
|
5174
5202
|
this.writing = true;
|
|
5175
5203
|
this.disabling = false;
|
|
5176
|
-
this.hourMask = HOUR_MASK
|
|
5204
|
+
this.hourMask = HOUR_MASK;
|
|
5177
5205
|
this.disabled = false;
|
|
5178
5206
|
this.floatLabel = 'auto';
|
|
5179
5207
|
this.readonly = false;
|
|
@@ -5353,7 +5381,7 @@ MatDuration.decorators = [
|
|
|
5353
5381
|
selector: 'mat-duration-field',
|
|
5354
5382
|
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",
|
|
5355
5383
|
providers: [
|
|
5356
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5384
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5357
5385
|
],
|
|
5358
5386
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5359
5387
|
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%}"]
|
|
@@ -5410,22 +5438,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5410
5438
|
},] }
|
|
5411
5439
|
];
|
|
5412
5440
|
|
|
5413
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5441
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5414
5442
|
provide: NG_VALUE_ACCESSOR,
|
|
5415
5443
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5416
5444
|
multi: true
|
|
5417
5445
|
};
|
|
5418
|
-
const noop$
|
|
5446
|
+
const noop$1 = () => {
|
|
5419
5447
|
};
|
|
5420
|
-
const ɵ0$
|
|
5448
|
+
const ɵ0$4 = noop$1;
|
|
5421
5449
|
class MatBooleanField {
|
|
5422
5450
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5423
5451
|
this.translate = translate;
|
|
5424
5452
|
this.formBuilder = formBuilder;
|
|
5425
5453
|
this.cd = cd;
|
|
5426
5454
|
this.formGroupDir = formGroupDir;
|
|
5427
|
-
this._onChangeCallback = noop$
|
|
5428
|
-
this._onTouchedCallback = noop$
|
|
5455
|
+
this._onChangeCallback = noop$1;
|
|
5456
|
+
this._onTouchedCallback = noop$1;
|
|
5429
5457
|
this._writing = false;
|
|
5430
5458
|
this.showRadio = false;
|
|
5431
5459
|
this.disabled = false;
|
|
@@ -5598,7 +5626,7 @@ MatBooleanField.decorators = [
|
|
|
5598
5626
|
selector: 'mat-boolean-field',
|
|
5599
5627
|
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",
|
|
5600
5628
|
providers: [
|
|
5601
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5629
|
+
DEFAULT_VALUE_ACCESSOR$1
|
|
5602
5630
|
],
|
|
5603
5631
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5604
5632
|
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}"]
|
|
@@ -5846,7 +5874,7 @@ class MatNumpadDomService {
|
|
|
5846
5874
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5847
5875
|
}
|
|
5848
5876
|
}
|
|
5849
|
-
MatNumpadDomService.ɵprov =
|
|
5877
|
+
MatNumpadDomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$3.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
5850
5878
|
MatNumpadDomService.decorators = [
|
|
5851
5879
|
{ type: Injectable, args: [{
|
|
5852
5880
|
providedIn: 'root'
|
|
@@ -6210,7 +6238,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6210
6238
|
},] }
|
|
6211
6239
|
];
|
|
6212
6240
|
|
|
6213
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
6241
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
6214
6242
|
provide: NG_VALUE_ACCESSOR,
|
|
6215
6243
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6216
6244
|
multi: true
|
|
@@ -6473,7 +6501,7 @@ MatSwipeField.decorators = [
|
|
|
6473
6501
|
{ type: Component, args: [{
|
|
6474
6502
|
selector: 'mat-swipe-field',
|
|
6475
6503
|
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",
|
|
6476
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
6504
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6477
6505
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6478
6506
|
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}"]
|
|
6479
6507
|
},] }
|
|
@@ -7048,7 +7076,7 @@ class ProgressBarService {
|
|
|
7048
7076
|
}
|
|
7049
7077
|
}
|
|
7050
7078
|
}
|
|
7051
|
-
ProgressBarService.ɵprov =
|
|
7079
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7052
7080
|
ProgressBarService.decorators = [
|
|
7053
7081
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7054
7082
|
];
|
|
@@ -7092,7 +7120,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7092
7120
|
return mc;
|
|
7093
7121
|
}
|
|
7094
7122
|
}
|
|
7095
|
-
AppGestureConfig.ɵprov =
|
|
7123
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7096
7124
|
AppGestureConfig.decorators = [
|
|
7097
7125
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7098
7126
|
];
|
|
@@ -7315,7 +7343,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7315
7343
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7316
7344
|
}
|
|
7317
7345
|
}
|
|
7318
|
-
MatPaginatorI18n.ɵprov =
|
|
7346
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7319
7347
|
MatPaginatorI18n.decorators = [
|
|
7320
7348
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7321
7349
|
];
|
|
@@ -7405,17 +7433,17 @@ function getColorContrast(color, bw) {
|
|
|
7405
7433
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
7406
7434
|
}
|
|
7407
7435
|
|
|
7408
|
-
const noop
|
|
7436
|
+
const noop = () => {
|
|
7409
7437
|
};
|
|
7410
|
-
const ɵ0$
|
|
7438
|
+
const ɵ0$3 = noop;
|
|
7411
7439
|
class AppFormField {
|
|
7412
7440
|
constructor(translate, cd, injector, formGroupDir) {
|
|
7413
7441
|
this.translate = translate;
|
|
7414
7442
|
this.cd = cd;
|
|
7415
7443
|
this.injector = injector;
|
|
7416
7444
|
this.formGroupDir = formGroupDir;
|
|
7417
|
-
this._onChangeCallback = noop
|
|
7418
|
-
this._onTouchedCallback = noop
|
|
7445
|
+
this._onChangeCallback = noop;
|
|
7446
|
+
this._onTouchedCallback = noop;
|
|
7419
7447
|
this.readonly = false;
|
|
7420
7448
|
this.compact = false;
|
|
7421
7449
|
this.floatLabel = 'auto';
|
|
@@ -7837,14 +7865,14 @@ class AudioProvider extends StartableService {
|
|
|
7837
7865
|
});
|
|
7838
7866
|
}
|
|
7839
7867
|
}
|
|
7840
|
-
AudioProvider.ɵprov =
|
|
7868
|
+
AudioProvider.ɵprov = i0.ɵɵdefineInjectable({ factory: function AudioProvider_Factory() { return new AudioProvider(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2.NativeAudio, 8), i0.ɵɵinject(i3.Vibration, 8), i0.ɵɵinject(i4.AudioManagement, 8)); }, token: AudioProvider, providedIn: "root" });
|
|
7841
7869
|
AudioProvider.decorators = [
|
|
7842
7870
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7843
7871
|
];
|
|
7844
7872
|
AudioProvider.ctorParameters = () => [
|
|
7845
7873
|
{ type: Platform },
|
|
7846
|
-
{ type: NativeAudio
|
|
7847
|
-
{ type: Vibration
|
|
7874
|
+
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7875
|
+
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7848
7876
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7849
7877
|
];
|
|
7850
7878
|
|
|
@@ -7926,7 +7954,7 @@ class Hotkeys {
|
|
|
7926
7954
|
});
|
|
7927
7955
|
}
|
|
7928
7956
|
}
|
|
7929
|
-
Hotkeys.ɵprov =
|
|
7957
|
+
Hotkeys.ɵprov = i0.ɵɵdefineInjectable({ factory: function Hotkeys_Factory() { return new Hotkeys(i0.ɵɵinject(i1$5.EventManager), i0.ɵɵinject(i2$1.MatDialog), i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.ModalController)); }, token: Hotkeys, providedIn: "root" });
|
|
7930
7958
|
Hotkeys.decorators = [
|
|
7931
7959
|
{ type: Injectable, args: [{
|
|
7932
7960
|
providedIn: 'root'
|
|
@@ -8100,7 +8128,7 @@ class Base64ImageReader {
|
|
|
8100
8128
|
}
|
|
8101
8129
|
}
|
|
8102
8130
|
|
|
8103
|
-
const uuidv4 = uuidv4Imported;
|
|
8131
|
+
const uuidv4$1 = uuidv4Imported;
|
|
8104
8132
|
class FileService {
|
|
8105
8133
|
constructor(platform,
|
|
8106
8134
|
//private transfer: FileTransfer,
|
|
@@ -8137,7 +8165,7 @@ class FileService {
|
|
|
8137
8165
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8138
8166
|
if (lastSlashIndex === -1)
|
|
8139
8167
|
throw new Error('Invalid URL: ' + source);
|
|
8140
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8168
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
8141
8169
|
// Download into the file system
|
|
8142
8170
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8143
8171
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8193,7 +8221,7 @@ class FileService {
|
|
|
8193
8221
|
this._started = true;
|
|
8194
8222
|
}
|
|
8195
8223
|
}
|
|
8196
|
-
FileService.ɵprov =
|
|
8224
|
+
FileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileService_Factory() { return new FileService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT)); }, token: FileService, providedIn: "root" });
|
|
8197
8225
|
FileService.decorators = [
|
|
8198
8226
|
{ type: Injectable, args: [{
|
|
8199
8227
|
providedIn: 'root',
|
|
@@ -8359,7 +8387,7 @@ class Base58 {
|
|
|
8359
8387
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
8360
8388
|
|
|
8361
8389
|
const scrypt = require('scrypt-async');
|
|
8362
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
8390
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
8363
8391
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
8364
8392
|
const nacl = {
|
|
8365
8393
|
sign,
|
|
@@ -8463,7 +8491,7 @@ class CryptoService {
|
|
|
8463
8491
|
* Hash (using SHA256) a message
|
|
8464
8492
|
*/
|
|
8465
8493
|
sha256(message) {
|
|
8466
|
-
return sha256().update(message).digest('hex');
|
|
8494
|
+
return sha256$1().update(message).digest('hex');
|
|
8467
8495
|
}
|
|
8468
8496
|
/**
|
|
8469
8497
|
* Hash (using SHA512) a message
|
|
@@ -8476,7 +8504,7 @@ class CryptoService {
|
|
|
8476
8504
|
return nacl.util.encodeBase64(m);
|
|
8477
8505
|
}
|
|
8478
8506
|
}
|
|
8479
|
-
CryptoService.ɵprov =
|
|
8507
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
8480
8508
|
CryptoService.decorators = [
|
|
8481
8509
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8482
8510
|
];
|
|
@@ -9697,7 +9725,7 @@ class LocalSettingsService extends StartableService {
|
|
|
9697
9725
|
return page;
|
|
9698
9726
|
}
|
|
9699
9727
|
}
|
|
9700
|
-
LocalSettingsService.ɵprov =
|
|
9728
|
+
LocalSettingsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsService_Factory() { return new LocalSettingsService(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_SETTINGS, 8), i0.ɵɵinject(APP_LOCAL_SETTINGS_OPTIONS, 8)); }, token: LocalSettingsService, providedIn: "root" });
|
|
9701
9729
|
LocalSettingsService.decorators = [
|
|
9702
9730
|
{ type: Injectable, args: [{
|
|
9703
9731
|
providedIn: 'root',
|
|
@@ -10357,7 +10385,7 @@ class NetworkService extends StartableService {
|
|
|
10357
10385
|
});
|
|
10358
10386
|
}
|
|
10359
10387
|
}
|
|
10360
|
-
NetworkService.ɵprov =
|
|
10388
|
+
NetworkService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NetworkService_Factory() { return new NetworkService(i0.ɵɵinject(i1$3.DOCUMENT), i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(CryptoService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i2$2.HttpClient), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i9.Network, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i1$1.TranslateService, 8), i0.ɵɵinject(i1$4.ToastController, 8)); }, token: NetworkService, providedIn: "root" });
|
|
10361
10389
|
NetworkService.decorators = [
|
|
10362
10390
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10363
10391
|
];
|
|
@@ -10368,16 +10396,16 @@ NetworkService.ctorParameters = () => [
|
|
|
10368
10396
|
{ type: CryptoService },
|
|
10369
10397
|
{ type: Storage },
|
|
10370
10398
|
{ type: LocalSettingsService },
|
|
10371
|
-
{ type: CacheService
|
|
10399
|
+
{ type: CacheService },
|
|
10372
10400
|
{ type: HttpClient },
|
|
10373
10401
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10374
|
-
{ type: Network
|
|
10375
|
-
{ type: SplashScreen
|
|
10402
|
+
{ type: Network, decorators: [{ type: Optional }] },
|
|
10403
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
10376
10404
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
10377
10405
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
10378
10406
|
];
|
|
10379
10407
|
|
|
10380
|
-
const ErrorCodes = {
|
|
10408
|
+
const ErrorCodes$2 = {
|
|
10381
10409
|
UNKNOWN_ERROR: 0,
|
|
10382
10410
|
LOAD_ACCOUNT_ERROR: 1,
|
|
10383
10411
|
BAD_PASSWORD: 2,
|
|
@@ -10724,7 +10752,7 @@ class EntityStore {
|
|
|
10724
10752
|
}
|
|
10725
10753
|
catch (err) {
|
|
10726
10754
|
console.error(err);
|
|
10727
|
-
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10755
|
+
throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10728
10756
|
}
|
|
10729
10757
|
}
|
|
10730
10758
|
// Emit update event
|
|
@@ -11295,7 +11323,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11295
11323
|
}
|
|
11296
11324
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11297
11325
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11298
|
-
EntitiesStorage.ɵprov =
|
|
11326
|
+
EntitiesStorage.ɵprov = i0.ɵɵdefineInjectable({ factory: function EntitiesStorage_Factory() { return new EntitiesStorage(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(ProgressBarService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_LOCAL_STORAGE_TYPE_POLICIES, 8)); }, token: EntitiesStorage, providedIn: "root" });
|
|
11299
11327
|
EntitiesStorage.decorators = [
|
|
11300
11328
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11301
11329
|
];
|
|
@@ -11395,10 +11423,10 @@ function referentialToString(obj, properties) {
|
|
|
11395
11423
|
function referentialsToString(values, properties, separator) {
|
|
11396
11424
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
11397
11425
|
}
|
|
11398
|
-
const ɵ0$
|
|
11426
|
+
const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
11399
11427
|
const StatusList = Object.freeze([
|
|
11400
11428
|
{
|
|
11401
|
-
id: ɵ0$
|
|
11429
|
+
id: ɵ0$2,
|
|
11402
11430
|
icon: 'checkmark',
|
|
11403
11431
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
11404
11432
|
},
|
|
@@ -11673,7 +11701,7 @@ function accountToString(data) {
|
|
|
11673
11701
|
(data.lastName || '')) || '';
|
|
11674
11702
|
}
|
|
11675
11703
|
|
|
11676
|
-
const uuidv4
|
|
11704
|
+
const uuidv4 = uuidv4Imported;
|
|
11677
11705
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
11678
11706
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
11679
11707
|
/**
|
|
@@ -11717,7 +11745,7 @@ function createTrackerLink(opts) {
|
|
|
11717
11745
|
// Skip if not tracked
|
|
11718
11746
|
if (!context || !context.tracked)
|
|
11719
11747
|
return forward(operation);
|
|
11720
|
-
const id = context.serializationKey || uuidv4
|
|
11748
|
+
const id = context.serializationKey || uuidv4();
|
|
11721
11749
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
11722
11750
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
11723
11751
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -12385,7 +12413,7 @@ class GraphqlService extends StartableService {
|
|
|
12385
12413
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
12386
12414
|
|| this.toAppError(err.networkError)
|
|
12387
12415
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
12388
|
-
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
12416
|
+
|| this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
|
|
12389
12417
|
// If graphQL: try to convert the first error found
|
|
12390
12418
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
12391
12419
|
|| this.toAppError(err)
|
|
@@ -12393,7 +12421,7 @@ class GraphqlService extends StartableService {
|
|
|
12393
12421
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
12394
12422
|
|| err;
|
|
12395
12423
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
12396
|
-
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12424
|
+
if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12397
12425
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
12398
12426
|
this.onNetworkError.next(error);
|
|
12399
12427
|
}
|
|
@@ -12429,7 +12457,7 @@ class GraphqlService extends StartableService {
|
|
|
12429
12457
|
return 'ERROR.UNAUTHORIZED';
|
|
12430
12458
|
case ServerErrorCodes.FORBIDDEN:
|
|
12431
12459
|
return 'ERROR.FORBIDDEN';
|
|
12432
|
-
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
12460
|
+
case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
|
|
12433
12461
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
12434
12462
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
12435
12463
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -12457,7 +12485,7 @@ class GraphqlService extends StartableService {
|
|
|
12457
12485
|
return undefined;
|
|
12458
12486
|
}
|
|
12459
12487
|
}
|
|
12460
|
-
GraphqlService.ɵprov =
|
|
12488
|
+
GraphqlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function GraphqlService_Factory() { return new GraphqlService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$3.Apollo), i0.ɵɵinject(i3$2.HttpLink), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(CryptoService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_GRAPHQL_TYPE_POLICIES, 8)); }, token: GraphqlService, providedIn: "root" });
|
|
12461
12489
|
GraphqlService.decorators = [
|
|
12462
12490
|
{ type: Injectable, args: [{
|
|
12463
12491
|
providedIn: 'root'
|
|
@@ -12474,7 +12502,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
12474
12502
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
12475
12503
|
];
|
|
12476
12504
|
|
|
12477
|
-
const sha256
|
|
12505
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
12478
12506
|
class BaseGraphqlServiceOptions {
|
|
12479
12507
|
}
|
|
12480
12508
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -12624,8 +12652,8 @@ class BaseGraphqlService {
|
|
|
12624
12652
|
}
|
|
12625
12653
|
/* -- protected methods -- */
|
|
12626
12654
|
computeMutableWatchQueryId(opts) {
|
|
12627
|
-
const queryName = opts.queryName || sha256
|
|
12628
|
-
const variablesKey = opts.variables && sha256
|
|
12655
|
+
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
12656
|
+
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
12629
12657
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
12630
12658
|
}
|
|
12631
12659
|
findMutableWatchQueries(opts) {
|
|
@@ -12688,7 +12716,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
12688
12716
|
/* ------------------------------------
|
|
12689
12717
|
* GraphQL queries
|
|
12690
12718
|
* ------------------------------------*/
|
|
12691
|
-
const Fragments = {
|
|
12719
|
+
const Fragments$1 = {
|
|
12692
12720
|
account: gql `
|
|
12693
12721
|
fragment AccountFragment on AccountVO {
|
|
12694
12722
|
id
|
|
@@ -12721,13 +12749,13 @@ const Fragments = {
|
|
|
12721
12749
|
`
|
|
12722
12750
|
};
|
|
12723
12751
|
// Load account query
|
|
12724
|
-
const LoadQuery = gql `
|
|
12752
|
+
const LoadQuery$1 = gql `
|
|
12725
12753
|
query Account {
|
|
12726
12754
|
data: account {
|
|
12727
12755
|
...AccountFragment
|
|
12728
12756
|
}
|
|
12729
12757
|
}
|
|
12730
|
-
${Fragments.account}
|
|
12758
|
+
${Fragments$1.account}
|
|
12731
12759
|
`;
|
|
12732
12760
|
// Check email query
|
|
12733
12761
|
const IsEmailExistsQuery = gql `
|
|
@@ -12736,13 +12764,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12736
12764
|
}
|
|
12737
12765
|
`;
|
|
12738
12766
|
// Save (create or update) account mutation
|
|
12739
|
-
const SaveMutation = gql `
|
|
12767
|
+
const SaveMutation$1 = gql `
|
|
12740
12768
|
mutation SaveAccount($data:AccountVOInput){
|
|
12741
12769
|
data: saveAccount(account: $data){
|
|
12742
12770
|
...AccountFragment
|
|
12743
12771
|
}
|
|
12744
12772
|
}
|
|
12745
|
-
${Fragments.account}
|
|
12773
|
+
${Fragments$1.account}
|
|
12746
12774
|
`;
|
|
12747
12775
|
// Create account mutation
|
|
12748
12776
|
const CreateMutation = gql `
|
|
@@ -12751,7 +12779,7 @@ const CreateMutation = gql `
|
|
|
12751
12779
|
...AccountFragment
|
|
12752
12780
|
}
|
|
12753
12781
|
}
|
|
12754
|
-
${Fragments.account}
|
|
12782
|
+
${Fragments$1.account}
|
|
12755
12783
|
`;
|
|
12756
12784
|
// Sent confirmation email
|
|
12757
12785
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13089,7 +13117,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13089
13117
|
catch (error) {
|
|
13090
13118
|
console.error(error);
|
|
13091
13119
|
this.resetData();
|
|
13092
|
-
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13120
|
+
throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13093
13121
|
}
|
|
13094
13122
|
// Store pubkey+keypair
|
|
13095
13123
|
this._data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13123,7 +13151,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13123
13151
|
}
|
|
13124
13152
|
catch (err) {
|
|
13125
13153
|
// If account not found, check if email is valid
|
|
13126
|
-
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13154
|
+
if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
|
|
13127
13155
|
// Check email exists
|
|
13128
13156
|
if (data.username.indexOf('@') !== -1) {
|
|
13129
13157
|
let isEmailExists;
|
|
@@ -13135,11 +13163,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13135
13163
|
}
|
|
13136
13164
|
// Email not exists (no account)
|
|
13137
13165
|
if (!isEmailExists) {
|
|
13138
|
-
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13166
|
+
throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13139
13167
|
}
|
|
13140
13168
|
}
|
|
13141
13169
|
// Email exists, so error = 'bad password'
|
|
13142
|
-
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13170
|
+
throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13143
13171
|
}
|
|
13144
13172
|
throw err; // resend the first error
|
|
13145
13173
|
}
|
|
@@ -13264,8 +13292,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13264
13292
|
// Load remotely
|
|
13265
13293
|
else {
|
|
13266
13294
|
const { data } = yield this.graphql.query({
|
|
13267
|
-
query: LoadQuery,
|
|
13268
|
-
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13295
|
+
query: LoadQuery$1,
|
|
13296
|
+
error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13269
13297
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13270
13298
|
});
|
|
13271
13299
|
json = data;
|
|
@@ -13292,7 +13320,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13292
13320
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13293
13321
|
const isEmailExists = yield this.isEmailExists(email);
|
|
13294
13322
|
if (isEmailExists) {
|
|
13295
|
-
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13323
|
+
throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13296
13324
|
}
|
|
13297
13325
|
});
|
|
13298
13326
|
}
|
|
@@ -13328,7 +13356,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13328
13356
|
locale
|
|
13329
13357
|
},
|
|
13330
13358
|
error: {
|
|
13331
|
-
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13359
|
+
code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13332
13360
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
13333
13361
|
}
|
|
13334
13362
|
});
|
|
@@ -13344,7 +13372,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13344
13372
|
code
|
|
13345
13373
|
},
|
|
13346
13374
|
error: {
|
|
13347
|
-
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
13375
|
+
code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
|
|
13348
13376
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
13349
13377
|
}
|
|
13350
13378
|
});
|
|
@@ -13362,7 +13390,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13362
13390
|
interval: 10
|
|
13363
13391
|
},
|
|
13364
13392
|
error: {
|
|
13365
|
-
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13393
|
+
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13366
13394
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
13367
13395
|
}
|
|
13368
13396
|
}).subscribe({
|
|
@@ -13471,7 +13499,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13471
13499
|
throw error;
|
|
13472
13500
|
console.error(error);
|
|
13473
13501
|
throw {
|
|
13474
|
-
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
13502
|
+
code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
|
|
13475
13503
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
13476
13504
|
};
|
|
13477
13505
|
}
|
|
@@ -13616,7 +13644,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13616
13644
|
if (!isNew) {
|
|
13617
13645
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
13618
13646
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
13619
|
-
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13647
|
+
throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13620
13648
|
}
|
|
13621
13649
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
13622
13650
|
}
|
|
@@ -13625,10 +13653,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
13625
13653
|
delete json.profiles;
|
|
13626
13654
|
// Execute mutation
|
|
13627
13655
|
const { data } = yield this.graphql.mutate({
|
|
13628
|
-
mutation: isNew ? CreateMutation : SaveMutation,
|
|
13656
|
+
mutation: isNew ? CreateMutation : SaveMutation$1,
|
|
13629
13657
|
variables: { data: json },
|
|
13630
13658
|
error: {
|
|
13631
|
-
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
13659
|
+
code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
|
|
13632
13660
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
13633
13661
|
}
|
|
13634
13662
|
});
|
|
@@ -13648,7 +13676,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13648
13676
|
if (counter > 4) {
|
|
13649
13677
|
if (this._debug)
|
|
13650
13678
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
13651
|
-
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13679
|
+
throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13652
13680
|
}
|
|
13653
13681
|
// Check if valid
|
|
13654
13682
|
if (token) {
|
|
@@ -13658,7 +13686,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13658
13686
|
token
|
|
13659
13687
|
},
|
|
13660
13688
|
error: {
|
|
13661
|
-
code: ErrorCodes.UNAUTHORIZED,
|
|
13689
|
+
code: ErrorCodes$2.UNAUTHORIZED,
|
|
13662
13690
|
message: 'ERROR.UNAUTHORIZED'
|
|
13663
13691
|
},
|
|
13664
13692
|
fetchPolicy: 'no-cache'
|
|
@@ -13674,7 +13702,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13674
13702
|
}
|
|
13675
13703
|
// Generate a new token
|
|
13676
13704
|
const challengeError = {
|
|
13677
|
-
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
13705
|
+
code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
|
|
13678
13706
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
13679
13707
|
};
|
|
13680
13708
|
const data = yield this.graphql.query({
|
|
@@ -13708,7 +13736,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13708
13736
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13709
13737
|
}
|
|
13710
13738
|
}
|
|
13711
|
-
AccountService.ɵprov =
|
|
13739
|
+
AccountService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountService_Factory() { return new AccountService(i0.ɵɵinject(CryptoService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(FileService), i0.ɵɵinject(ENVIRONMENT)); }, token: AccountService, providedIn: "root" });
|
|
13712
13740
|
AccountService.decorators = [
|
|
13713
13741
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13714
13742
|
];
|
|
@@ -13968,7 +13996,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13968
13996
|
/* ------------------------------------
|
|
13969
13997
|
* GraphQL queries
|
|
13970
13998
|
* ------------------------------------*/
|
|
13971
|
-
const Fragments
|
|
13999
|
+
const Fragments = {
|
|
13972
14000
|
config: gql `
|
|
13973
14001
|
fragment ConfigFragment on ConfigurationVO {
|
|
13974
14002
|
id
|
|
@@ -13995,22 +14023,22 @@ const Fragments$1 = {
|
|
|
13995
14023
|
}
|
|
13996
14024
|
`
|
|
13997
14025
|
};
|
|
13998
|
-
const LoadQuery
|
|
14026
|
+
const LoadQuery = gql `
|
|
13999
14027
|
query Configuration{
|
|
14000
14028
|
data: configuration{
|
|
14001
14029
|
...ConfigFragment
|
|
14002
14030
|
}
|
|
14003
14031
|
}
|
|
14004
|
-
${Fragments
|
|
14032
|
+
${Fragments.config}
|
|
14005
14033
|
`;
|
|
14006
14034
|
// Save (create or update) account mutation
|
|
14007
|
-
const SaveMutation
|
|
14035
|
+
const SaveMutation = gql `
|
|
14008
14036
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
14009
14037
|
data: saveConfiguration(config: $data){
|
|
14010
14038
|
...ConfigFragment
|
|
14011
14039
|
}
|
|
14012
14040
|
}
|
|
14013
|
-
${Fragments
|
|
14041
|
+
${Fragments.config}
|
|
14014
14042
|
`;
|
|
14015
14043
|
const ClearCache = gql `
|
|
14016
14044
|
query ClearCache($name: String) {
|
|
@@ -14105,12 +14133,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14105
14133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14106
14134
|
const now = Date.now();
|
|
14107
14135
|
console.debug('[config] Loading Pod configuration...');
|
|
14108
|
-
const query = opts && opts.query || LoadQuery
|
|
14136
|
+
const query = opts && opts.query || LoadQuery;
|
|
14109
14137
|
const variables = opts && opts.variables || undefined;
|
|
14110
14138
|
const res = yield this.graphql.query({
|
|
14111
14139
|
query,
|
|
14112
14140
|
variables,
|
|
14113
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14141
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14114
14142
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14115
14143
|
});
|
|
14116
14144
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14135,12 +14163,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14135
14163
|
const json = config.asObject();
|
|
14136
14164
|
// Execute mutation
|
|
14137
14165
|
const res = yield this.graphql.mutate({
|
|
14138
|
-
mutation: SaveMutation
|
|
14166
|
+
mutation: SaveMutation,
|
|
14139
14167
|
variables: {
|
|
14140
14168
|
data: json
|
|
14141
14169
|
},
|
|
14142
14170
|
error: {
|
|
14143
|
-
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14171
|
+
code: ErrorCodes$2.SAVE_CONFIG_ERROR,
|
|
14144
14172
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14145
14173
|
}
|
|
14146
14174
|
});
|
|
@@ -14166,7 +14194,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14166
14194
|
const res = yield this.graphql.query({
|
|
14167
14195
|
query: CacheStatistics,
|
|
14168
14196
|
variables: null,
|
|
14169
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14197
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14170
14198
|
fetchPolicy: 'network-only'
|
|
14171
14199
|
});
|
|
14172
14200
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14182,7 +14210,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14182
14210
|
const res = yield this.graphql.query({
|
|
14183
14211
|
query: ClearCache,
|
|
14184
14212
|
variables,
|
|
14185
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14213
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14186
14214
|
fetchPolicy: 'network-only'
|
|
14187
14215
|
});
|
|
14188
14216
|
const data = res && res.clearCache || undefined;
|
|
@@ -14341,7 +14369,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14341
14369
|
});
|
|
14342
14370
|
}
|
|
14343
14371
|
}
|
|
14344
|
-
ConfigService.ɵprov =
|
|
14372
|
+
ConfigService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(GraphqlService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(NetworkService), i0.ɵɵinject(FileService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(APP_CONFIG_OPTIONS, 8)); }, token: ConfigService, providedIn: "root" });
|
|
14345
14373
|
ConfigService.decorators = [
|
|
14346
14374
|
{ type: Injectable, args: [{
|
|
14347
14375
|
providedIn: 'root',
|
|
@@ -14360,7 +14388,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14360
14388
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
14361
14389
|
];
|
|
14362
14390
|
|
|
14363
|
-
const moment$
|
|
14391
|
+
const moment$2 = momentImported;
|
|
14364
14392
|
class PlatformService extends StartableService {
|
|
14365
14393
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14366
14394
|
super(platform);
|
|
@@ -14549,16 +14577,16 @@ class PlatformService extends StartableService {
|
|
|
14549
14577
|
}
|
|
14550
14578
|
// config moment lib
|
|
14551
14579
|
try {
|
|
14552
|
-
moment$
|
|
14580
|
+
moment$2.locale(event.lang);
|
|
14553
14581
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
14554
14582
|
}
|
|
14555
14583
|
// If error, fallback to en
|
|
14556
14584
|
catch (err) {
|
|
14557
|
-
moment$
|
|
14585
|
+
moment$2.locale('en');
|
|
14558
14586
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
14559
14587
|
}
|
|
14560
14588
|
// Config date adapter
|
|
14561
|
-
this.dateAdapter.setLocale(moment$
|
|
14589
|
+
this.dateAdapter.setLocale(moment$2.locale());
|
|
14562
14590
|
}
|
|
14563
14591
|
});
|
|
14564
14592
|
this.settings.onChange.subscribe(data => {
|
|
@@ -14696,7 +14724,7 @@ class PlatformService extends StartableService {
|
|
|
14696
14724
|
});
|
|
14697
14725
|
}
|
|
14698
14726
|
}
|
|
14699
|
-
PlatformService.ɵprov =
|
|
14727
|
+
PlatformService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlatformService_Factory() { return new PlatformService(i0.ɵɵinject(i1$4.Platform), i0.ɵɵinject(i2$4.Platform), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1.MomentDateAdapter), i0.ɵɵinject(EntitiesStorage), i0.ɵɵinject(LocalSettingsService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(AccountService), i0.ɵɵinject(ConfigService), i0.ɵɵinject(i6.CacheService), i0.ɵɵinject(i3$1.Storage), i0.ɵɵinject(AudioProvider), i0.ɵɵinject(ENVIRONMENT), i0.ɵɵinject(i14.StatusBar, 8), i0.ɵɵinject(i15.Keyboard, 8), i0.ɵɵinject(i10.SplashScreen, 8), i0.ɵɵinject(i17.InAppBrowser, 8), i0.ɵɵinject(i18.Downloader, 8)); }, token: PlatformService, providedIn: "root" });
|
|
14700
14728
|
PlatformService.decorators = [
|
|
14701
14729
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14702
14730
|
];
|
|
@@ -14711,15 +14739,15 @@ PlatformService.ctorParameters = () => [
|
|
|
14711
14739
|
{ type: NetworkService },
|
|
14712
14740
|
{ type: AccountService },
|
|
14713
14741
|
{ type: ConfigService },
|
|
14714
|
-
{ type: CacheService
|
|
14742
|
+
{ type: CacheService },
|
|
14715
14743
|
{ type: Storage },
|
|
14716
14744
|
{ type: AudioProvider },
|
|
14717
14745
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
14718
|
-
{ type: StatusBar
|
|
14746
|
+
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
14719
14747
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14720
|
-
{ type: SplashScreen
|
|
14721
|
-
{ type: InAppBrowser
|
|
14722
|
-
{ type: Downloader
|
|
14748
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14749
|
+
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14750
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14723
14751
|
];
|
|
14724
14752
|
|
|
14725
14753
|
class AppHelpModal {
|
|
@@ -14783,7 +14811,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14783
14811
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14784
14812
|
}
|
|
14785
14813
|
}
|
|
14786
|
-
MatStepperI18n.ɵprov =
|
|
14814
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14787
14815
|
MatStepperI18n.decorators = [
|
|
14788
14816
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14789
14817
|
];
|
|
@@ -15775,7 +15803,7 @@ function state2side(state) {
|
|
|
15775
15803
|
return 1;
|
|
15776
15804
|
}
|
|
15777
15805
|
}
|
|
15778
|
-
const ɵ0$
|
|
15806
|
+
const ɵ0$1 = (defaultStateSize) => [
|
|
15779
15807
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15780
15808
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15781
15809
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15783,7 +15811,7 @@ const ɵ0$9 = (defaultStateSize) => [
|
|
|
15783
15811
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15784
15812
|
startColor: rgbArrayMap.red,
|
|
15785
15813
|
startStates: [0, 2, 3],
|
|
15786
|
-
startStepsFn: ɵ0$
|
|
15814
|
+
startStepsFn: ɵ0$1
|
|
15787
15815
|
};
|
|
15788
15816
|
/**
|
|
15789
15817
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15875,21 +15903,21 @@ function linearColorGradient(count, options) {
|
|
|
15875
15903
|
return result;
|
|
15876
15904
|
}
|
|
15877
15905
|
|
|
15878
|
-
class EntityTestClass {
|
|
15906
|
+
class EntityTestClass$1 {
|
|
15879
15907
|
}
|
|
15880
|
-
const FAKE_ENTITIES = [
|
|
15908
|
+
const FAKE_ENTITIES$1 = [
|
|
15881
15909
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15882
15910
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15883
15911
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15884
15912
|
];
|
|
15885
|
-
function deepCopy(values, size) {
|
|
15913
|
+
function deepCopy$1(values, size) {
|
|
15886
15914
|
if (isNil(size)) {
|
|
15887
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15915
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
15888
15916
|
}
|
|
15889
15917
|
let result = [];
|
|
15890
15918
|
let i = 1;
|
|
15891
15919
|
while (result.length < size) {
|
|
15892
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15920
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
15893
15921
|
const name = entity.name + ' #' + i;
|
|
15894
15922
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15895
15923
|
}));
|
|
@@ -15899,7 +15927,7 @@ function deepCopy(values, size) {
|
|
|
15899
15927
|
class AutocompleteTestPage {
|
|
15900
15928
|
constructor(formBuilder) {
|
|
15901
15929
|
this.formBuilder = formBuilder;
|
|
15902
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15930
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
15903
15931
|
this.$items = new BehaviorSubject(undefined);
|
|
15904
15932
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15905
15933
|
this.memoryHide = false;
|
|
@@ -15943,7 +15971,7 @@ class AutocompleteTestPage {
|
|
|
15943
15971
|
});
|
|
15944
15972
|
// From items
|
|
15945
15973
|
this.autocompleteFields.add('entity-items-large', {
|
|
15946
|
-
items: FAKE_ENTITIES.slice(),
|
|
15974
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
15947
15975
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15948
15976
|
displayWith: this.entityToString
|
|
15949
15977
|
});
|
|
@@ -15953,12 +15981,12 @@ class AutocompleteTestPage {
|
|
|
15953
15981
|
loadData() {
|
|
15954
15982
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15955
15983
|
const data = {
|
|
15956
|
-
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15984
|
+
entity: deepCopy$1(FAKE_ENTITIES$1)[0],
|
|
15957
15985
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15958
15986
|
missingEntity: {
|
|
15959
15987
|
id: -1, label: '??', name: 'Missing item'
|
|
15960
15988
|
},
|
|
15961
|
-
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15989
|
+
disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
|
|
15962
15990
|
};
|
|
15963
15991
|
this.form.setValue(data);
|
|
15964
15992
|
// Load observables
|
|
@@ -16131,13 +16159,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16131
16159
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16132
16160
|
];
|
|
16133
16161
|
|
|
16134
|
-
const moment$
|
|
16162
|
+
const moment$1 = momentImported;
|
|
16135
16163
|
class SwipeTestPage {
|
|
16136
16164
|
constructor(formBuilder, dateFormatPipe) {
|
|
16137
16165
|
this.formBuilder = formBuilder;
|
|
16138
16166
|
this.dateFormatPipe = dateFormatPipe;
|
|
16139
16167
|
this.$dates = new BehaviorSubject(undefined);
|
|
16140
|
-
this._today = moment$
|
|
16168
|
+
this._today = moment$1().startOf('day');
|
|
16141
16169
|
this.form = formBuilder.group({
|
|
16142
16170
|
empty: [null, Validators.required],
|
|
16143
16171
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16150,7 +16178,7 @@ class SwipeTestPage {
|
|
|
16150
16178
|
ngOnInit() {
|
|
16151
16179
|
const dates = [];
|
|
16152
16180
|
for (let d = 0; d < 7; d++) {
|
|
16153
|
-
dates[d] = moment$
|
|
16181
|
+
dates[d] = moment$1(this._today).add(d - 3, 'day');
|
|
16154
16182
|
}
|
|
16155
16183
|
this.$dates.next(dates);
|
|
16156
16184
|
this.loadData();
|
|
@@ -16191,7 +16219,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16191
16219
|
{ type: DateFormatPipe }
|
|
16192
16220
|
];
|
|
16193
16221
|
|
|
16194
|
-
const moment
|
|
16222
|
+
const moment = momentImported;
|
|
16195
16223
|
class DateTimeTestPage {
|
|
16196
16224
|
constructor(platform, formBuilder, cd) {
|
|
16197
16225
|
this.platform = platform;
|
|
@@ -16223,7 +16251,7 @@ class DateTimeTestPage {
|
|
|
16223
16251
|
// Load the form with data
|
|
16224
16252
|
loadData() {
|
|
16225
16253
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16226
|
-
const now = moment
|
|
16254
|
+
const now = moment();
|
|
16227
16255
|
const data = {
|
|
16228
16256
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16229
16257
|
enable: toDateISOString(now),
|
|
@@ -16284,20 +16312,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16284
16312
|
{ type: ChangeDetectorRef }
|
|
16285
16313
|
];
|
|
16286
16314
|
|
|
16287
|
-
class EntityTestClass
|
|
16315
|
+
class EntityTestClass {
|
|
16288
16316
|
}
|
|
16289
|
-
const FAKE_ENTITIES
|
|
16317
|
+
const FAKE_ENTITIES = [
|
|
16290
16318
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16291
16319
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16292
16320
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16293
16321
|
];
|
|
16294
|
-
function deepCopy
|
|
16295
|
-
return (values || FAKE_ENTITIES
|
|
16322
|
+
function deepCopy(values) {
|
|
16323
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16296
16324
|
}
|
|
16297
16325
|
class ChipsTestPage {
|
|
16298
16326
|
constructor(formBuilder) {
|
|
16299
16327
|
this.formBuilder = formBuilder;
|
|
16300
|
-
this._items = deepCopy
|
|
16328
|
+
this._items = deepCopy(FAKE_ENTITIES);
|
|
16301
16329
|
this._$items = new BehaviorSubject(undefined);
|
|
16302
16330
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16303
16331
|
this.form = formBuilder.group({
|
|
@@ -16316,7 +16344,7 @@ class ChipsTestPage {
|
|
|
16316
16344
|
});
|
|
16317
16345
|
// From items
|
|
16318
16346
|
this.autocompleteFields.add('entity-items', {
|
|
16319
|
-
items: FAKE_ENTITIES
|
|
16347
|
+
items: FAKE_ENTITIES.slice(),
|
|
16320
16348
|
attributes: ['label', 'name'],
|
|
16321
16349
|
displayWith: this.entityToString
|
|
16322
16350
|
});
|
|
@@ -16337,15 +16365,15 @@ class ChipsTestPage {
|
|
|
16337
16365
|
const data = {
|
|
16338
16366
|
entity: [],
|
|
16339
16367
|
// THis item is NOT in the items list => i should be displayed anyway
|
|
16340
|
-
entityInitial: FAKE_ENTITIES
|
|
16341
|
-
disableEntity: FAKE_ENTITIES
|
|
16368
|
+
entityInitial: FAKE_ENTITIES.slice(1, 2),
|
|
16369
|
+
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16342
16370
|
};
|
|
16343
16371
|
this.form.setValue(data);
|
|
16344
16372
|
});
|
|
16345
16373
|
}
|
|
16346
16374
|
loadItems() {
|
|
16347
16375
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16348
|
-
this._$items.next(deepCopy
|
|
16376
|
+
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16349
16377
|
});
|
|
16350
16378
|
}
|
|
16351
16379
|
entityToString(item) {
|
|
@@ -16386,7 +16414,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
16386
16414
|
},] }
|
|
16387
16415
|
];
|
|
16388
16416
|
|
|
16389
|
-
const routes = [
|
|
16417
|
+
const routes$1 = [
|
|
16390
16418
|
{
|
|
16391
16419
|
path: '',
|
|
16392
16420
|
pathMatch: 'full',
|
|
@@ -16438,7 +16466,7 @@ MaterialTestingModule.decorators = [
|
|
|
16438
16466
|
ReactiveFormsModule,
|
|
16439
16467
|
SharedMaterialModule,
|
|
16440
16468
|
TranslateModule.forChild(),
|
|
16441
|
-
RouterModule.forChild(routes)
|
|
16469
|
+
RouterModule.forChild(routes$1)
|
|
16442
16470
|
],
|
|
16443
16471
|
declarations: [
|
|
16444
16472
|
MaterialTestingPage,
|
|
@@ -16536,6 +16564,7 @@ class AppForm {
|
|
|
16536
16564
|
this.error = null;
|
|
16537
16565
|
this._enable = false;
|
|
16538
16566
|
this._loading = true;
|
|
16567
|
+
this._ready = true;
|
|
16539
16568
|
this.i18nFieldPrefix = null;
|
|
16540
16569
|
this._subscription = new Subscription();
|
|
16541
16570
|
this.debug = false;
|
|
@@ -16705,6 +16734,20 @@ class AppForm {
|
|
|
16705
16734
|
this.markForCheck();
|
|
16706
16735
|
}
|
|
16707
16736
|
}
|
|
16737
|
+
markAsReady(opts) {
|
|
16738
|
+
if (!this._ready) {
|
|
16739
|
+
this._ready = true;
|
|
16740
|
+
if (!opts || opts.emitEvent !== false)
|
|
16741
|
+
this.markForCheck();
|
|
16742
|
+
}
|
|
16743
|
+
}
|
|
16744
|
+
/**
|
|
16745
|
+
* Wait form is ready
|
|
16746
|
+
* @param opts
|
|
16747
|
+
*/
|
|
16748
|
+
ready(opts) {
|
|
16749
|
+
return waitFor(() => this._ready, opts);
|
|
16750
|
+
}
|
|
16708
16751
|
/**
|
|
16709
16752
|
* Wait form is idle (not loading)
|
|
16710
16753
|
* @param opts
|
|
@@ -17397,7 +17440,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17397
17440
|
});
|
|
17398
17441
|
}
|
|
17399
17442
|
}
|
|
17400
|
-
UserSettingsValidatorService.ɵprov =
|
|
17443
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17401
17444
|
UserSettingsValidatorService.decorators = [
|
|
17402
17445
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17403
17446
|
];
|
|
@@ -17441,7 +17484,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17441
17484
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17442
17485
|
}
|
|
17443
17486
|
}
|
|
17444
|
-
AccountValidatorService.ɵprov =
|
|
17487
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17445
17488
|
AccountValidatorService.decorators = [
|
|
17446
17489
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17447
17490
|
];
|
|
@@ -17975,7 +18018,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17975
18018
|
});
|
|
17976
18019
|
}
|
|
17977
18020
|
}
|
|
17978
|
-
LocalSettingsValidatorService.ɵprov =
|
|
18021
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
17979
18022
|
LocalSettingsValidatorService.decorators = [
|
|
17980
18023
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17981
18024
|
];
|
|
@@ -18593,7 +18636,7 @@ class IsOnFieldModePipe {
|
|
|
18593
18636
|
return value === 'FIELD';
|
|
18594
18637
|
}
|
|
18595
18638
|
}
|
|
18596
|
-
IsOnFieldModePipe.ɵprov =
|
|
18639
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18597
18640
|
IsOnFieldModePipe.decorators = [
|
|
18598
18641
|
{ type: Pipe, args: [{
|
|
18599
18642
|
name: 'isOnField'
|
|
@@ -18605,7 +18648,7 @@ class IsNotOnFieldModePipe {
|
|
|
18605
18648
|
return value !== 'FIELD';
|
|
18606
18649
|
}
|
|
18607
18650
|
}
|
|
18608
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18651
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18609
18652
|
IsNotOnFieldModePipe.decorators = [
|
|
18610
18653
|
{ type: Pipe, args: [{
|
|
18611
18654
|
name: 'isNotOnField'
|
|
@@ -18620,7 +18663,7 @@ class PersonToStringPipe {
|
|
|
18620
18663
|
return PersonUtils.personToString(value);
|
|
18621
18664
|
}
|
|
18622
18665
|
}
|
|
18623
|
-
PersonToStringPipe.ɵprov =
|
|
18666
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18624
18667
|
PersonToStringPipe.decorators = [
|
|
18625
18668
|
{ type: Pipe, args: [{
|
|
18626
18669
|
name: 'personToString'
|
|
@@ -18966,7 +19009,7 @@ class IsLoginAccountPipe {
|
|
|
18966
19009
|
return value && value.pubkey && true;
|
|
18967
19010
|
}
|
|
18968
19011
|
}
|
|
18969
|
-
IsLoginAccountPipe.ɵprov =
|
|
19012
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18970
19013
|
IsLoginAccountPipe.decorators = [
|
|
18971
19014
|
{ type: Pipe, args: [{
|
|
18972
19015
|
name: 'isLogin'
|
|
@@ -18978,7 +19021,7 @@ class AccountToStringPipe {
|
|
|
18978
19021
|
return accountToString(value);
|
|
18979
19022
|
}
|
|
18980
19023
|
}
|
|
18981
|
-
AccountToStringPipe.ɵprov =
|
|
19024
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
18982
19025
|
AccountToStringPipe.decorators = [
|
|
18983
19026
|
{ type: Pipe, args: [{
|
|
18984
19027
|
name: 'accountToString'
|
|
@@ -18993,7 +19036,7 @@ class DepartmentToStringPipe {
|
|
|
18993
19036
|
return departmentToString(value);
|
|
18994
19037
|
}
|
|
18995
19038
|
}
|
|
18996
|
-
DepartmentToStringPipe.ɵprov =
|
|
19039
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
18997
19040
|
DepartmentToStringPipe.decorators = [
|
|
18998
19041
|
{ type: Pipe, args: [{
|
|
18999
19042
|
name: 'departmentToString'
|
|
@@ -19019,7 +19062,7 @@ class MenuService {
|
|
|
19019
19062
|
this._visibleSubject.next(value);
|
|
19020
19063
|
}
|
|
19021
19064
|
}
|
|
19022
|
-
MenuService.ɵprov =
|
|
19065
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19023
19066
|
MenuService.decorators = [
|
|
19024
19067
|
{ type: Injectable, args: [{
|
|
19025
19068
|
providedIn: 'root'
|
|
@@ -19513,7 +19556,7 @@ class AuthGuardService {
|
|
|
19513
19556
|
}));
|
|
19514
19557
|
}
|
|
19515
19558
|
}
|
|
19516
|
-
AuthGuardService.ɵprov =
|
|
19559
|
+
AuthGuardService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthGuardService_Factory() { return new AuthGuardService(i0.ɵɵinject(AccountService), i0.ɵɵinject(i1$4.ModalController), i0.ɵɵinject(i3$3.Router), i0.ɵɵinject(ENVIRONMENT)); }, token: AuthGuardService, providedIn: "root" });
|
|
19517
19560
|
AuthGuardService.decorators = [
|
|
19518
19561
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19519
19562
|
];
|
|
@@ -19561,7 +19604,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19561
19604
|
query,
|
|
19562
19605
|
variables: { id },
|
|
19563
19606
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19564
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19607
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19565
19608
|
})
|
|
19566
19609
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19567
19610
|
? (data && this.fromObject(data))
|
|
@@ -19576,7 +19619,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19576
19619
|
query,
|
|
19577
19620
|
variables: { id },
|
|
19578
19621
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19579
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19622
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19580
19623
|
});
|
|
19581
19624
|
// Convert to entity
|
|
19582
19625
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19607,7 +19650,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19607
19650
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19608
19651
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19609
19652
|
variables,
|
|
19610
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19653
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19611
19654
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19612
19655
|
})
|
|
19613
19656
|
.pipe(map(({ data, total }) => {
|
|
@@ -19643,7 +19686,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19643
19686
|
const { data, total } = yield this.graphql.query({
|
|
19644
19687
|
query,
|
|
19645
19688
|
variables,
|
|
19646
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19689
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19647
19690
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19648
19691
|
});
|
|
19649
19692
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19682,7 +19725,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19682
19725
|
variables: {
|
|
19683
19726
|
filter: filter && filter.asPodObject()
|
|
19684
19727
|
},
|
|
19685
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19728
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19686
19729
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19687
19730
|
});
|
|
19688
19731
|
return res.total;
|
|
@@ -19715,7 +19758,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19715
19758
|
variables: {
|
|
19716
19759
|
data: json
|
|
19717
19760
|
},
|
|
19718
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19761
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19719
19762
|
update: (proxy, { data }) => {
|
|
19720
19763
|
const savedEntities = data && data.data;
|
|
19721
19764
|
if (savedEntities) {
|
|
@@ -19771,7 +19814,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19771
19814
|
variables: {
|
|
19772
19815
|
data: json
|
|
19773
19816
|
},
|
|
19774
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19817
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19775
19818
|
update: (cache, { data }) => {
|
|
19776
19819
|
// Update entity
|
|
19777
19820
|
const savedEntity = data && data.data;
|
|
@@ -19819,7 +19862,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19819
19862
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19820
19863
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19821
19864
|
variables: { ids },
|
|
19822
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19865
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19823
19866
|
update: (cache, res) => {
|
|
19824
19867
|
// Remove from cache
|
|
19825
19868
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19860,7 +19903,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19860
19903
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19861
19904
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19862
19905
|
variables: { id },
|
|
19863
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19906
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19864
19907
|
update: (proxy, res) => {
|
|
19865
19908
|
// Remove from cache
|
|
19866
19909
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19893,7 +19936,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19893
19936
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19894
19937
|
variables,
|
|
19895
19938
|
error: {
|
|
19896
|
-
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19939
|
+
code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
|
|
19897
19940
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19898
19941
|
}
|
|
19899
19942
|
})
|
|
@@ -20068,7 +20111,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
20068
20111
|
if (this._debug)
|
|
20069
20112
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
20070
20113
|
// Stop with an error
|
|
20071
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20114
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20072
20115
|
}
|
|
20073
20116
|
this._editingRowCount = 0;
|
|
20074
20117
|
let data;
|
|
@@ -20319,6 +20362,7 @@ class AppTable {
|
|
|
20319
20362
|
this.allowRowDetail = true;
|
|
20320
20363
|
this.excludesColumns = [];
|
|
20321
20364
|
this.totalRowCount = null;
|
|
20365
|
+
this.readySubject = new BehaviorSubject(false);
|
|
20322
20366
|
this.loadingSubject = new BehaviorSubject(true);
|
|
20323
20367
|
this.savingSubject = new BehaviorSubject(false);
|
|
20324
20368
|
this.dirtySubject = new BehaviorSubject(false);
|
|
@@ -20522,6 +20566,14 @@ class AppTable {
|
|
|
20522
20566
|
(_a = row.validator) === null || _a === void 0 ? void 0 : _a.markAsDirty(opts);
|
|
20523
20567
|
this.markAsDirty(opts);
|
|
20524
20568
|
}
|
|
20569
|
+
markAsReady(opts) {
|
|
20570
|
+
if (this.readySubject.value !== false) {
|
|
20571
|
+
this.readySubject.next(false);
|
|
20572
|
+
if (!opts || opts.emitEvent !== false) {
|
|
20573
|
+
this.markForCheck();
|
|
20574
|
+
}
|
|
20575
|
+
}
|
|
20576
|
+
}
|
|
20525
20577
|
get loading() {
|
|
20526
20578
|
return this.loadingSubject.value;
|
|
20527
20579
|
}
|
|
@@ -20890,14 +20942,14 @@ class AppTable {
|
|
|
20890
20942
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20891
20943
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20892
20944
|
if (this.readOnly) {
|
|
20893
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20945
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20894
20946
|
}
|
|
20895
20947
|
this.resetError();
|
|
20896
20948
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20897
20949
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20898
20950
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20899
20951
|
if (!this.confirmEditCreate()) {
|
|
20900
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20952
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20901
20953
|
}
|
|
20902
20954
|
// Mark as saving
|
|
20903
20955
|
this.markAsSaving();
|
|
@@ -21013,7 +21065,7 @@ class AppTable {
|
|
|
21013
21065
|
deleteRows(event, rows, opts) {
|
|
21014
21066
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21015
21067
|
if (this.readOnly) {
|
|
21016
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21068
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21017
21069
|
}
|
|
21018
21070
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
21019
21071
|
return 0; // SKip
|
|
@@ -21117,6 +21169,9 @@ class AppTable {
|
|
|
21117
21169
|
moveRow(id, direction) {
|
|
21118
21170
|
this.dataSource.move(id, direction);
|
|
21119
21171
|
}
|
|
21172
|
+
ready() {
|
|
21173
|
+
return firstTruePromise(this.readySubject);
|
|
21174
|
+
}
|
|
21120
21175
|
waitIdle() {
|
|
21121
21176
|
return firstFalsePromise(this.loadingSubject);
|
|
21122
21177
|
}
|
|
@@ -21799,8 +21854,8 @@ AppTable.propDecorators = {
|
|
|
21799
21854
|
class AppTabEditorOptions {
|
|
21800
21855
|
}
|
|
21801
21856
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
21802
|
-
class
|
|
21803
|
-
constructor(route, router, alertCtrl, translate
|
|
21857
|
+
class AppEditor {
|
|
21858
|
+
constructor(route, router, alertCtrl, translate) {
|
|
21804
21859
|
this.route = route;
|
|
21805
21860
|
this.router = router;
|
|
21806
21861
|
this.alertCtrl = alertCtrl;
|
|
@@ -21809,16 +21864,11 @@ class AppTabEditor {
|
|
|
21809
21864
|
this._enabled = false;
|
|
21810
21865
|
this._dirty = false;
|
|
21811
21866
|
this._loading = true;
|
|
21812
|
-
this.
|
|
21867
|
+
this._$ready = new BehaviorSubject(false);
|
|
21813
21868
|
this.debug = false;
|
|
21814
21869
|
this.submitted = false;
|
|
21815
21870
|
this.toolbar = null;
|
|
21816
21871
|
this.formButtonsBar = null;
|
|
21817
|
-
this.selectedTabIndexChange = new EventEmitter();
|
|
21818
|
-
options = Object.assign({ tabCount: 1, enableSwipe: true, tabGroupAnimationDuration: '200ms' }, options);
|
|
21819
|
-
this.tabCount = options.tabCount;
|
|
21820
|
-
this.enableSwipe = options.enableSwipe;
|
|
21821
|
-
this.tabGroupAnimationDuration = options.tabGroupAnimationDuration;
|
|
21822
21872
|
}
|
|
21823
21873
|
get tables() {
|
|
21824
21874
|
return this._children && this._children.filter(c => c instanceof AppTable);
|
|
@@ -21858,31 +21908,7 @@ class AppTabEditor {
|
|
|
21858
21908
|
get empty() {
|
|
21859
21909
|
return this._enabled;
|
|
21860
21910
|
}
|
|
21861
|
-
get selectedTabIndex() {
|
|
21862
|
-
return this._selectedTabIndex;
|
|
21863
|
-
}
|
|
21864
|
-
set selectedTabIndex(value) {
|
|
21865
|
-
this.setSelectedTabIndex(value);
|
|
21866
|
-
}
|
|
21867
21911
|
ngOnInit() {
|
|
21868
|
-
this.queryTabIndexParamName = this.queryTabIndexParamName || 'tab';
|
|
21869
|
-
// Read the selected tab index, from path query params
|
|
21870
|
-
if (this.tabGroup) {
|
|
21871
|
-
this.registerSubscription(this.route.queryParams
|
|
21872
|
-
.subscribe(queryParams => {
|
|
21873
|
-
this.queryParams = Object.assign({}, queryParams);
|
|
21874
|
-
// Parse tab param
|
|
21875
|
-
if (this.tabCount > 1 && this.queryTabIndexParamName) {
|
|
21876
|
-
const tabIndex = queryParams[this.queryTabIndexParamName];
|
|
21877
|
-
this.queryParams[this.queryTabIndexParamName] = tabIndex && parseInt(tabIndex) || undefined;
|
|
21878
|
-
if (isNotNil(this.queryParams[this.queryTabIndexParamName])) {
|
|
21879
|
-
this.selectedTabIndex = this.queryParams[this.queryTabIndexParamName];
|
|
21880
|
-
}
|
|
21881
|
-
}
|
|
21882
|
-
// Realign tab, after a delay because the tab can be disabled when component is created
|
|
21883
|
-
setTimeout(() => this.tabGroup.realignInkBar(), 500);
|
|
21884
|
-
}));
|
|
21885
|
-
}
|
|
21886
21912
|
if (this.formButtonsBar) {
|
|
21887
21913
|
this.registerSubscription(this.formButtonsBar.onBack.subscribe(event => this.goBack(event)));
|
|
21888
21914
|
}
|
|
@@ -21892,7 +21918,6 @@ class AppTabEditor {
|
|
|
21892
21918
|
}
|
|
21893
21919
|
ngOnDestroy() {
|
|
21894
21920
|
this._subscription.unsubscribe();
|
|
21895
|
-
this.selectedTabIndexChange.complete();
|
|
21896
21921
|
}
|
|
21897
21922
|
addChildForm(form) {
|
|
21898
21923
|
if (!form)
|
|
@@ -21974,65 +21999,18 @@ class AppTabEditor {
|
|
|
21974
21999
|
this.markForCheck();
|
|
21975
22000
|
}
|
|
21976
22001
|
}
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21980
|
-
|
|
21981
|
-
if (!this.
|
|
21982
|
-
this.queryParams = this.queryParams || {};
|
|
21983
|
-
this.queryParams[queryTabIndexParamName] = event.index;
|
|
21984
|
-
if (queryTabIndexParamName === 'tab' && isNotNil(this.queryParams['subtab'])) {
|
|
21985
|
-
delete this.queryParams.subtab; // clean subtab
|
|
21986
|
-
}
|
|
21987
|
-
this.router.navigate(['.'], {
|
|
21988
|
-
relativeTo: this.route,
|
|
21989
|
-
queryParams: this.queryParams,
|
|
21990
|
-
replaceUrl: true
|
|
21991
|
-
});
|
|
21992
|
-
return true;
|
|
21993
|
-
}
|
|
21994
|
-
return false;
|
|
21995
|
-
}
|
|
21996
|
-
/**
|
|
21997
|
-
* Action triggered when user swipes
|
|
21998
|
-
*/
|
|
21999
|
-
onSwipeTab(event) {
|
|
22000
|
-
// DEBUG
|
|
22001
|
-
// if (this.debug) console.debug("[tab-page] onSwipeTab()");
|
|
22002
|
-
// Skip, if not a valid swipe event
|
|
22003
|
-
if (!this.enableSwipe || !event
|
|
22004
|
-
|| event.defaultPrevented || (event.srcEvent && event.srcEvent.defaultPrevented)
|
|
22005
|
-
|| event.pointerType !== 'touch') {
|
|
22006
|
-
return false;
|
|
22007
|
-
}
|
|
22008
|
-
// DEBUG
|
|
22009
|
-
//if (this.debug)
|
|
22010
|
-
//console.debug("[tab-page] Detected swipe: " + event.type, event);
|
|
22011
|
-
let selectTabIndex = this.selectedTabIndex;
|
|
22012
|
-
switch (event.type) {
|
|
22013
|
-
// Open next tab
|
|
22014
|
-
case 'swipeleft':
|
|
22015
|
-
const isLast = selectTabIndex >= (this.tabCount - 1);
|
|
22016
|
-
selectTabIndex = isLast ? 0 : selectTabIndex + 1;
|
|
22017
|
-
break;
|
|
22018
|
-
// Open previous tab
|
|
22019
|
-
case 'swiperight':
|
|
22020
|
-
const isFirst = selectTabIndex <= 0;
|
|
22021
|
-
selectTabIndex = isFirst ? this.tabCount : selectTabIndex - 1;
|
|
22022
|
-
break;
|
|
22023
|
-
// Other case
|
|
22024
|
-
default:
|
|
22025
|
-
console.error('[tab-page] Unknown swipe action: ' + event.type);
|
|
22026
|
-
return false;
|
|
22027
|
-
}
|
|
22028
|
-
setTimeout(() => {
|
|
22029
|
-
this.selectedTabIndex = selectTabIndex;
|
|
22002
|
+
markAsReady(opts) {
|
|
22003
|
+
var _a;
|
|
22004
|
+
(_a = this._children) === null || _a === void 0 ? void 0 : _a.forEach(c => c.markAsReady(opts));
|
|
22005
|
+
this._$ready.next(true);
|
|
22006
|
+
if (!this.loading && (!opts || opts.emitEvent !== false))
|
|
22030
22007
|
this.markForCheck();
|
|
22031
|
-
});
|
|
22032
|
-
return true;
|
|
22033
22008
|
}
|
|
22034
|
-
|
|
22035
|
-
this.
|
|
22009
|
+
ready(opts) {
|
|
22010
|
+
return firstTruePromise(this._$ready);
|
|
22011
|
+
}
|
|
22012
|
+
waitIdle(opts) {
|
|
22013
|
+
return AppFormUtils.waitIdle(this, opts);
|
|
22036
22014
|
}
|
|
22037
22015
|
cancel(event) {
|
|
22038
22016
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -22053,7 +22031,6 @@ class AppTabEditor {
|
|
|
22053
22031
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22054
22032
|
console.debug('[tab-page] Unloading data...');
|
|
22055
22033
|
this.markAsLoading();
|
|
22056
|
-
this.selectedTabIndex = 0;
|
|
22057
22034
|
this._children.forEach(f => {
|
|
22058
22035
|
if (f instanceof AppForm) {
|
|
22059
22036
|
f.reset(null, opts);
|
|
@@ -22114,28 +22091,11 @@ class AppTabEditor {
|
|
|
22114
22091
|
}
|
|
22115
22092
|
});
|
|
22116
22093
|
}
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
if (
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
else if (value > this.tabCount - 1) {
|
|
22123
|
-
value = this.tabCount - 1;
|
|
22124
|
-
}
|
|
22125
|
-
this._selectedTabIndex = value;
|
|
22126
|
-
this.selectedTabIndexChange.next(value);
|
|
22127
|
-
if (this.tabGroup && (!opts || opts.realignInkBar !== false)) {
|
|
22128
|
-
this.tabGroup.selectedIndex = value;
|
|
22129
|
-
this.markForCheck();
|
|
22130
|
-
// Wait tab change in UI, before realign ink tab
|
|
22131
|
-
setTimeout(() => this.tabGroup.realignInkBar(), 200);
|
|
22132
|
-
}
|
|
22133
|
-
else if (!opts || opts.emitEvent !== false) {
|
|
22134
|
-
this.markForCheck();
|
|
22135
|
-
}
|
|
22136
|
-
}
|
|
22137
|
-
waitIdle(opts) {
|
|
22138
|
-
return AppFormUtils.waitIdle(this, opts);
|
|
22094
|
+
logFormErrors() {
|
|
22095
|
+
var _a;
|
|
22096
|
+
if (this.debug)
|
|
22097
|
+
console.debug('[app-tab-editor] Page not valid. Checking where (forms, tables)...');
|
|
22098
|
+
(_a = this._children) === null || _a === void 0 ? void 0 : _a.forEach(c => this.logChildrenFormErrors(c));
|
|
22139
22099
|
}
|
|
22140
22100
|
/* -- protected methods -- */
|
|
22141
22101
|
scrollToTop(duration) {
|
|
@@ -22212,16 +22172,10 @@ class AppTabEditor {
|
|
|
22212
22172
|
yield Toasts.show(this.toastController, this.translate, opts);
|
|
22213
22173
|
});
|
|
22214
22174
|
}
|
|
22215
|
-
logFormErrors() {
|
|
22216
|
-
var _a;
|
|
22217
|
-
if (this.debug)
|
|
22218
|
-
console.debug('[app-tab-editor] Page not valid. Checking where (forms, tables)...');
|
|
22219
|
-
(_a = this._children) === null || _a === void 0 ? void 0 : _a.forEach(c => this.logChildrenFormErrors(c));
|
|
22220
|
-
}
|
|
22221
22175
|
logChildrenFormErrors(c, prefix, path) {
|
|
22222
22176
|
prefix = prefix || '[app-tab-editor] ';
|
|
22223
22177
|
// If editor
|
|
22224
|
-
if (c instanceof
|
|
22178
|
+
if (c instanceof AppEditor) {
|
|
22225
22179
|
c.logFormErrors();
|
|
22226
22180
|
}
|
|
22227
22181
|
// Angular form control
|
|
@@ -22263,6 +22217,156 @@ class AppTabEditor {
|
|
|
22263
22217
|
// Should be override by subclasses, if change detection is Push
|
|
22264
22218
|
}
|
|
22265
22219
|
}
|
|
22220
|
+
AppEditor.decorators = [
|
|
22221
|
+
{ type: Directive }
|
|
22222
|
+
];
|
|
22223
|
+
AppEditor.ctorParameters = () => [
|
|
22224
|
+
{ type: ActivatedRoute },
|
|
22225
|
+
{ type: Router },
|
|
22226
|
+
{ type: AlertController },
|
|
22227
|
+
{ type: TranslateService }
|
|
22228
|
+
];
|
|
22229
|
+
AppEditor.propDecorators = {
|
|
22230
|
+
toolbar: [{ type: ViewChild, args: [ToolbarToken,] }],
|
|
22231
|
+
formButtonsBar: [{ type: ViewChild, args: [FormButtonsBarToken, { static: true },] }],
|
|
22232
|
+
content: [{ type: ViewChild, args: [IonContent, { static: true },] }]
|
|
22233
|
+
};
|
|
22234
|
+
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
22235
|
+
class AppTabEditor extends AppEditor {
|
|
22236
|
+
constructor(route, router, alertCtrl, translate, options) {
|
|
22237
|
+
super(route, router, alertCtrl, translate);
|
|
22238
|
+
this.route = route;
|
|
22239
|
+
this.router = router;
|
|
22240
|
+
this.alertCtrl = alertCtrl;
|
|
22241
|
+
this.translate = translate;
|
|
22242
|
+
this._selectedTabIndex = 0;
|
|
22243
|
+
this.selectedTabIndexChange = new EventEmitter();
|
|
22244
|
+
options = Object.assign({ tabCount: 1, enableSwipe: true, tabGroupAnimationDuration: '200ms' }, options);
|
|
22245
|
+
this.tabCount = options.tabCount;
|
|
22246
|
+
this.enableSwipe = options.enableSwipe;
|
|
22247
|
+
this.tabGroupAnimationDuration = options.tabGroupAnimationDuration;
|
|
22248
|
+
}
|
|
22249
|
+
set selectedTabIndex(value) {
|
|
22250
|
+
this.setSelectedTabIndex(value);
|
|
22251
|
+
}
|
|
22252
|
+
get selectedTabIndex() {
|
|
22253
|
+
return this._selectedTabIndex;
|
|
22254
|
+
}
|
|
22255
|
+
ngOnInit() {
|
|
22256
|
+
super.ngOnInit();
|
|
22257
|
+
this.queryTabIndexParamName = this.queryTabIndexParamName || 'tab';
|
|
22258
|
+
// Read the selected tab index, from path query params
|
|
22259
|
+
if (this.tabGroup) {
|
|
22260
|
+
this.registerSubscription(this.route.queryParams
|
|
22261
|
+
.subscribe(queryParams => {
|
|
22262
|
+
this.queryParams = Object.assign({}, queryParams);
|
|
22263
|
+
// Parse tab param
|
|
22264
|
+
if (this.tabCount > 1 && this.queryTabIndexParamName) {
|
|
22265
|
+
const tabIndex = queryParams[this.queryTabIndexParamName];
|
|
22266
|
+
this.queryParams[this.queryTabIndexParamName] = tabIndex && parseInt(tabIndex) || undefined;
|
|
22267
|
+
if (isNotNil(this.queryParams[this.queryTabIndexParamName])) {
|
|
22268
|
+
this.selectedTabIndex = this.queryParams[this.queryTabIndexParamName];
|
|
22269
|
+
}
|
|
22270
|
+
}
|
|
22271
|
+
// Realign tab, after a delay because the tab can be disabled when component is created
|
|
22272
|
+
setTimeout(() => this.tabGroup.realignInkBar(), 500);
|
|
22273
|
+
}));
|
|
22274
|
+
}
|
|
22275
|
+
}
|
|
22276
|
+
ngOnDestroy() {
|
|
22277
|
+
super.ngOnDestroy();
|
|
22278
|
+
this.selectedTabIndexChange.complete();
|
|
22279
|
+
}
|
|
22280
|
+
setSelectedTabIndex(value, opts) {
|
|
22281
|
+
// Fix value
|
|
22282
|
+
if (value < 0) {
|
|
22283
|
+
value = 0;
|
|
22284
|
+
}
|
|
22285
|
+
else if (value > this.tabCount - 1) {
|
|
22286
|
+
value = this.tabCount - 1;
|
|
22287
|
+
}
|
|
22288
|
+
this._selectedTabIndex = value;
|
|
22289
|
+
this.selectedTabIndexChange.next(value);
|
|
22290
|
+
if (this.tabGroup && (!opts || opts.realignInkBar !== false)) {
|
|
22291
|
+
this.tabGroup.selectedIndex = value;
|
|
22292
|
+
this.markForCheck();
|
|
22293
|
+
// Wait tab change in UI, before realign ink tab
|
|
22294
|
+
setTimeout(() => this.tabGroup.realignInkBar(), 200);
|
|
22295
|
+
}
|
|
22296
|
+
else if (!opts || opts.emitEvent !== false) {
|
|
22297
|
+
this.markForCheck();
|
|
22298
|
+
}
|
|
22299
|
+
}
|
|
22300
|
+
onTabChange(event, queryTabIndexParamName) {
|
|
22301
|
+
queryTabIndexParamName = queryTabIndexParamName || this.queryTabIndexParamName;
|
|
22302
|
+
if (!queryTabIndexParamName)
|
|
22303
|
+
return true; // Skip if tab query param not set
|
|
22304
|
+
if (!this.queryParams || +this.queryParams[queryTabIndexParamName] !== event.index) {
|
|
22305
|
+
this.queryParams = this.queryParams || {};
|
|
22306
|
+
this.queryParams[queryTabIndexParamName] = event.index;
|
|
22307
|
+
if (queryTabIndexParamName === 'tab' && isNotNil(this.queryParams['subtab'])) {
|
|
22308
|
+
delete this.queryParams.subtab; // clean subtab
|
|
22309
|
+
}
|
|
22310
|
+
this.router.navigate(['.'], {
|
|
22311
|
+
relativeTo: this.route,
|
|
22312
|
+
queryParams: this.queryParams,
|
|
22313
|
+
replaceUrl: true
|
|
22314
|
+
});
|
|
22315
|
+
return true;
|
|
22316
|
+
}
|
|
22317
|
+
return false;
|
|
22318
|
+
}
|
|
22319
|
+
/**
|
|
22320
|
+
* Action triggered when user swipes
|
|
22321
|
+
*/
|
|
22322
|
+
onSwipeTab(event) {
|
|
22323
|
+
// DEBUG
|
|
22324
|
+
// if (this.debug) console.debug("[tab-page] onSwipeTab()");
|
|
22325
|
+
// Skip, if not a valid swipe event
|
|
22326
|
+
if (!this.enableSwipe || !event
|
|
22327
|
+
|| event.defaultPrevented || (event.srcEvent && event.srcEvent.defaultPrevented)
|
|
22328
|
+
|| event.pointerType !== 'touch') {
|
|
22329
|
+
return false;
|
|
22330
|
+
}
|
|
22331
|
+
// DEBUG
|
|
22332
|
+
//if (this.debug)
|
|
22333
|
+
//console.debug("[tab-page] Detected swipe: " + event.type, event);
|
|
22334
|
+
let selectTabIndex = this.selectedTabIndex;
|
|
22335
|
+
switch (event.type) {
|
|
22336
|
+
// Open next tab
|
|
22337
|
+
case 'swipeleft':
|
|
22338
|
+
const isLast = selectTabIndex >= (this.tabCount - 1);
|
|
22339
|
+
selectTabIndex = isLast ? 0 : selectTabIndex + 1;
|
|
22340
|
+
break;
|
|
22341
|
+
// Open previous tab
|
|
22342
|
+
case 'swiperight':
|
|
22343
|
+
const isFirst = selectTabIndex <= 0;
|
|
22344
|
+
selectTabIndex = isFirst ? this.tabCount : selectTabIndex - 1;
|
|
22345
|
+
break;
|
|
22346
|
+
// Other case
|
|
22347
|
+
default:
|
|
22348
|
+
console.error('[tab-page] Unknown swipe action: ' + event.type);
|
|
22349
|
+
return false;
|
|
22350
|
+
}
|
|
22351
|
+
setTimeout(() => {
|
|
22352
|
+
this.selectedTabIndex = selectTabIndex;
|
|
22353
|
+
this.markForCheck();
|
|
22354
|
+
});
|
|
22355
|
+
return true;
|
|
22356
|
+
}
|
|
22357
|
+
onSubTabChange(event) {
|
|
22358
|
+
this.onTabChange(event, 'subtab');
|
|
22359
|
+
}
|
|
22360
|
+
unload(opts) {
|
|
22361
|
+
const _super = Object.create(null, {
|
|
22362
|
+
unload: { get: () => super.unload }
|
|
22363
|
+
});
|
|
22364
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22365
|
+
this.selectedTabIndex = 0;
|
|
22366
|
+
yield _super.unload.call(this, opts);
|
|
22367
|
+
});
|
|
22368
|
+
}
|
|
22369
|
+
}
|
|
22266
22370
|
AppTabEditor.decorators = [
|
|
22267
22371
|
{ type: Directive }
|
|
22268
22372
|
];
|
|
@@ -22275,12 +22379,9 @@ AppTabEditor.ctorParameters = () => [
|
|
|
22275
22379
|
];
|
|
22276
22380
|
AppTabEditor.propDecorators = {
|
|
22277
22381
|
queryTabIndexParamName: [{ type: Input }],
|
|
22278
|
-
tabGroup: [{ type: ViewChild, args: ['tabGroup', { static: true },] }],
|
|
22279
|
-
toolbar: [{ type: ViewChild, args: [ToolbarToken,] }],
|
|
22280
|
-
formButtonsBar: [{ type: ViewChild, args: [FormButtonsBarToken, { static: true },] }],
|
|
22281
|
-
content: [{ type: ViewChild, args: [IonContent, { static: true },] }],
|
|
22282
22382
|
selectedTabIndex: [{ type: Input }],
|
|
22283
|
-
selectedTabIndexChange: [{ type: Output }]
|
|
22383
|
+
selectedTabIndexChange: [{ type: Output }],
|
|
22384
|
+
tabGroup: [{ type: ViewChild, args: ['tabGroup', { static: true },] }]
|
|
22284
22385
|
};
|
|
22285
22386
|
|
|
22286
22387
|
class AppEditorOptions extends AppTabEditorOptions {
|
|
@@ -22424,7 +22525,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22424
22525
|
try {
|
|
22425
22526
|
const data = yield this.dataService.load(id, opts);
|
|
22426
22527
|
if (!data)
|
|
22427
|
-
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22528
|
+
throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22428
22529
|
this._usageMode = this.computeUsageMode(data);
|
|
22429
22530
|
yield this.onEntityLoaded(data, opts);
|
|
22430
22531
|
yield this.updateView(data, opts);
|
|
@@ -23328,7 +23429,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23328
23429
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23329
23430
|
}
|
|
23330
23431
|
}
|
|
23331
|
-
UserEventService.ɵprov =
|
|
23432
|
+
UserEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserEventService_Factory() { return new UserEventService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(AccountService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(i1$4.ToastController), i0.ɵɵinject(ENVIRONMENT)); }, token: UserEventService, providedIn: "root" });
|
|
23332
23433
|
UserEventService.decorators = [
|
|
23333
23434
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23334
23435
|
];
|
|
@@ -23713,7 +23814,7 @@ class PersonService extends BaseEntityService {
|
|
|
23713
23814
|
return target;
|
|
23714
23815
|
}
|
|
23715
23816
|
}
|
|
23716
|
-
PersonService.ɵprov =
|
|
23817
|
+
PersonService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonService_Factory() { return new PersonService(i0.ɵɵinject(GraphqlService), i0.ɵɵinject(PlatformService), i0.ɵɵinject(NetworkService), i0.ɵɵinject(EntitiesStorage)); }, token: PersonService, providedIn: "root" });
|
|
23717
23818
|
PersonService.decorators = [
|
|
23718
23819
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23719
23820
|
];
|
|
@@ -23744,7 +23845,7 @@ class PersonValidatorService {
|
|
|
23744
23845
|
return this.formBuilder.group(formConfig);
|
|
23745
23846
|
}
|
|
23746
23847
|
}
|
|
23747
|
-
PersonValidatorService.ɵprov =
|
|
23848
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23748
23849
|
PersonValidatorService.decorators = [
|
|
23749
23850
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23750
23851
|
];
|
|
@@ -23950,16 +24051,16 @@ AdminModule.decorators = [
|
|
|
23950
24051
|
];
|
|
23951
24052
|
AdminModule.ctorParameters = () => [];
|
|
23952
24053
|
|
|
23953
|
-
const ɵ0
|
|
24054
|
+
const ɵ0 = {
|
|
23954
24055
|
profile: 'ADMIN'
|
|
23955
24056
|
};
|
|
23956
|
-
const routes
|
|
24057
|
+
const routes = [
|
|
23957
24058
|
{
|
|
23958
24059
|
path: 'users',
|
|
23959
24060
|
pathMatch: 'full',
|
|
23960
24061
|
component: UsersPage,
|
|
23961
24062
|
canActivate: [AuthGuardService],
|
|
23962
|
-
data: ɵ0
|
|
24063
|
+
data: ɵ0
|
|
23963
24064
|
}
|
|
23964
24065
|
];
|
|
23965
24066
|
class AdminRoutingModule {
|
|
@@ -23969,13 +24070,13 @@ AdminRoutingModule.decorators = [
|
|
|
23969
24070
|
imports: [
|
|
23970
24071
|
SharedRoutingModule,
|
|
23971
24072
|
AdminModule,
|
|
23972
|
-
RouterModule.forChild(routes
|
|
24073
|
+
RouterModule.forChild(routes)
|
|
23973
24074
|
],
|
|
23974
24075
|
exports: [RouterModule]
|
|
23975
24076
|
},] }
|
|
23976
24077
|
];
|
|
23977
24078
|
|
|
23978
|
-
const ErrorCodes
|
|
24079
|
+
const ErrorCodes = {
|
|
23979
24080
|
LOAD_PERSONS_ERROR: 100,
|
|
23980
24081
|
SAVE_PERSONS_ERROR: 101,
|
|
23981
24082
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -23987,5 +24088,5 @@ const ErrorCodes$2 = {
|
|
|
23987
24088
|
* Generated bundle index. Do not edit.
|
|
23988
24089
|
*/
|
|
23989
24090
|
|
|
23990
|
-
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
|
|
24091
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditor, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, 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 };
|
|
23991
24092
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|