@sumaris-net/ngx-components 0.25.18 → 0.25.19
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 +333 -286
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -2
- package/esm2015/src/app/core/table/entities-table-datasource.class.js +5 -7
- package/esm2015/src/app/core/table/table.class.js +22 -15
- package/fesm2015/sumaris-net.ngx-components.js +301 -278
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/core/form/entity-editor.class.d.ts +1 -0
- package/src/app/core/table/table.class.d.ts +1 -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 } 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 [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
|
}
|
|
@@ -3513,7 +3528,7 @@ class FormErrorAdapter {
|
|
|
3513
3528
|
return errorKey;
|
|
3514
3529
|
}
|
|
3515
3530
|
}
|
|
3516
|
-
FormErrorAdapter.ɵprov =
|
|
3531
|
+
FormErrorAdapter.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorAdapter_Factory() { return new FormErrorAdapter(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorAdapter, providedIn: "root" });
|
|
3517
3532
|
FormErrorAdapter.decorators = [
|
|
3518
3533
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3519
3534
|
];
|
|
@@ -3782,9 +3797,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3782
3797
|
const hour = parseInt(durationParts[0] || '0');
|
|
3783
3798
|
const minute = parseInt(durationParts[1] || '0');
|
|
3784
3799
|
const value = hour + (minute + 0.5) / 60;
|
|
3785
|
-
return roundFloat
|
|
3800
|
+
return roundFloat(value, maxDecimals);
|
|
3786
3801
|
}
|
|
3787
|
-
function roundFloat
|
|
3802
|
+
function roundFloat(input, maxDecimals) {
|
|
3788
3803
|
if (maxDecimals > 0) {
|
|
3789
3804
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3790
3805
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3808,9 +3823,9 @@ const MASKS = {
|
|
|
3808
3823
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3809
3824
|
}
|
|
3810
3825
|
};
|
|
3811
|
-
const noop$
|
|
3826
|
+
const noop$6 = () => {
|
|
3812
3827
|
};
|
|
3813
|
-
const ɵ0$
|
|
3828
|
+
const ɵ0$9 = noop$6;
|
|
3814
3829
|
class MatLatLongField {
|
|
3815
3830
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3816
3831
|
this.platform = platform;
|
|
@@ -3818,8 +3833,8 @@ class MatLatLongField {
|
|
|
3818
3833
|
this.formBuilder = formBuilder;
|
|
3819
3834
|
this.cd = cd;
|
|
3820
3835
|
this.formGroupDir = formGroupDir;
|
|
3821
|
-
this._onChangeCallback = noop$
|
|
3822
|
-
this._onTouchedCallback = noop$
|
|
3836
|
+
this._onChangeCallback = noop$6;
|
|
3837
|
+
this._onTouchedCallback = noop$6;
|
|
3823
3838
|
this._subscription = new Subscription();
|
|
3824
3839
|
this.disabling = false;
|
|
3825
3840
|
this.writing = false;
|
|
@@ -4155,14 +4170,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4155
4170
|
},] }
|
|
4156
4171
|
];
|
|
4157
4172
|
|
|
4158
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4173
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4159
4174
|
provide: NG_VALUE_ACCESSOR,
|
|
4160
4175
|
useExisting: forwardRef(() => MatDate),
|
|
4161
4176
|
multi: true
|
|
4162
4177
|
};
|
|
4163
|
-
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4164
|
-
const noop$
|
|
4165
|
-
const ɵ0$
|
|
4178
|
+
const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4179
|
+
const noop$5 = () => { };
|
|
4180
|
+
const ɵ0$8 = noop$5;
|
|
4166
4181
|
class MatDate {
|
|
4167
4182
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4168
4183
|
this.dateAdapter = dateAdapter;
|
|
@@ -4171,12 +4186,12 @@ class MatDate {
|
|
|
4171
4186
|
this.cd = cd;
|
|
4172
4187
|
this.keyboard = keyboard;
|
|
4173
4188
|
this.formGroupDir = formGroupDir;
|
|
4174
|
-
this._onChangeCallback = noop$
|
|
4175
|
-
this._onTouchedCallback = noop$
|
|
4189
|
+
this._onChangeCallback = noop$5;
|
|
4190
|
+
this._onTouchedCallback = noop$5;
|
|
4176
4191
|
this._subscription = new Subscription();
|
|
4177
4192
|
this.writing = true;
|
|
4178
4193
|
this.disabling = false;
|
|
4179
|
-
this.dayMask = DAY_MASK;
|
|
4194
|
+
this.dayMask = DAY_MASK$2;
|
|
4180
4195
|
this.disabled = false;
|
|
4181
4196
|
this.floatLabel = 'auto';
|
|
4182
4197
|
this.readonly = false;
|
|
@@ -4413,7 +4428,7 @@ MatDate.decorators = [
|
|
|
4413
4428
|
selector: 'mat-date-field',
|
|
4414
4429
|
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",
|
|
4415
4430
|
providers: [
|
|
4416
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4431
|
+
DEFAULT_VALUE_ACCESSOR$5,
|
|
4417
4432
|
],
|
|
4418
4433
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4419
4434
|
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%}"]
|
|
@@ -4446,17 +4461,17 @@ MatDate.propDecorators = {
|
|
|
4446
4461
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4447
4462
|
};
|
|
4448
4463
|
|
|
4449
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4464
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4450
4465
|
provide: NG_VALUE_ACCESSOR,
|
|
4451
4466
|
useExisting: forwardRef(() => MatDateTime),
|
|
4452
4467
|
multi: true
|
|
4453
4468
|
};
|
|
4454
4469
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4455
4470
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4456
|
-
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4457
|
-
const noop$
|
|
4471
|
+
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4472
|
+
const noop$4 = () => {
|
|
4458
4473
|
};
|
|
4459
|
-
const ɵ0$
|
|
4474
|
+
const ɵ0$7 = noop$4;
|
|
4460
4475
|
class MatDateTime {
|
|
4461
4476
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
4462
4477
|
this.platform = platform;
|
|
@@ -4466,14 +4481,14 @@ class MatDateTime {
|
|
|
4466
4481
|
this.keyboard = keyboard;
|
|
4467
4482
|
this.cd = cd;
|
|
4468
4483
|
this.formGroupDir = formGroupDir;
|
|
4469
|
-
this._onChangeCallback = noop$
|
|
4470
|
-
this._onTouchedCallback = noop$
|
|
4484
|
+
this._onChangeCallback = noop$4;
|
|
4485
|
+
this._onTouchedCallback = noop$4;
|
|
4471
4486
|
this._subscription = new Subscription();
|
|
4472
4487
|
this.writing = true;
|
|
4473
4488
|
this.disabling = false;
|
|
4474
4489
|
this._readonly = false;
|
|
4475
4490
|
this.dayMask = DAY_MASK$1;
|
|
4476
|
-
this.hourMask = HOUR_MASK;
|
|
4491
|
+
this.hourMask = HOUR_MASK$1;
|
|
4477
4492
|
this.floatLabel = 'auto';
|
|
4478
4493
|
this.compact = false;
|
|
4479
4494
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4784,7 +4799,7 @@ MatDateTime.decorators = [
|
|
|
4784
4799
|
selector: 'mat-date-time-field',
|
|
4785
4800
|
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",
|
|
4786
4801
|
providers: [
|
|
4787
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4802
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
4788
4803
|
],
|
|
4789
4804
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4790
4805
|
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%}"]
|
|
@@ -4823,10 +4838,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4823
4838
|
useExisting: forwardRef(() => MatDateShort),
|
|
4824
4839
|
multi: true
|
|
4825
4840
|
};
|
|
4826
|
-
const DAY_MASK
|
|
4827
|
-
const noop$
|
|
4841
|
+
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4842
|
+
const noop$3 = () => {
|
|
4828
4843
|
};
|
|
4829
|
-
const ɵ0$
|
|
4844
|
+
const ɵ0$6 = noop$3;
|
|
4830
4845
|
class MatDateShort {
|
|
4831
4846
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4832
4847
|
this.dateAdapter = dateAdapter;
|
|
@@ -4835,11 +4850,11 @@ class MatDateShort {
|
|
|
4835
4850
|
this.cd = cd;
|
|
4836
4851
|
this.keyboard = keyboard;
|
|
4837
4852
|
this.formGroupDir = formGroupDir;
|
|
4838
|
-
this._onChangeCallback = noop$
|
|
4839
|
-
this._onTouchedCallback = noop$
|
|
4853
|
+
this._onChangeCallback = noop$3;
|
|
4854
|
+
this._onTouchedCallback = noop$3;
|
|
4840
4855
|
this.writing = true;
|
|
4841
4856
|
this.disabling = false;
|
|
4842
|
-
this.dayMask = DAY_MASK
|
|
4857
|
+
this.dayMask = DAY_MASK;
|
|
4843
4858
|
this.disabled = false;
|
|
4844
4859
|
this.floatLabel = 'auto';
|
|
4845
4860
|
this.readonly = false;
|
|
@@ -5152,16 +5167,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5152
5167
|
},] }
|
|
5153
5168
|
];
|
|
5154
5169
|
|
|
5155
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5170
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5156
5171
|
provide: NG_VALUE_ACCESSOR,
|
|
5157
5172
|
useExisting: forwardRef(() => MatDuration),
|
|
5158
5173
|
multi: true
|
|
5159
5174
|
};
|
|
5160
5175
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5161
|
-
const HOUR_MASK
|
|
5162
|
-
const noop$
|
|
5176
|
+
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5177
|
+
const noop$2 = () => {
|
|
5163
5178
|
};
|
|
5164
|
-
const ɵ0$5 = noop$
|
|
5179
|
+
const ɵ0$5 = noop$2;
|
|
5165
5180
|
class MatDuration {
|
|
5166
5181
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5167
5182
|
this.dateAdapter = dateAdapter;
|
|
@@ -5170,11 +5185,11 @@ class MatDuration {
|
|
|
5170
5185
|
this.cd = cd;
|
|
5171
5186
|
this.formGroupDir = formGroupDir;
|
|
5172
5187
|
this._subscription = new Subscription();
|
|
5173
|
-
this._onChangeCallback = noop$
|
|
5174
|
-
this._onTouchedCallback = noop$
|
|
5188
|
+
this._onChangeCallback = noop$2;
|
|
5189
|
+
this._onTouchedCallback = noop$2;
|
|
5175
5190
|
this.writing = true;
|
|
5176
5191
|
this.disabling = false;
|
|
5177
|
-
this.hourMask = HOUR_MASK
|
|
5192
|
+
this.hourMask = HOUR_MASK;
|
|
5178
5193
|
this.disabled = false;
|
|
5179
5194
|
this.floatLabel = 'auto';
|
|
5180
5195
|
this.readonly = false;
|
|
@@ -5354,7 +5369,7 @@ MatDuration.decorators = [
|
|
|
5354
5369
|
selector: 'mat-duration-field',
|
|
5355
5370
|
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",
|
|
5356
5371
|
providers: [
|
|
5357
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5372
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5358
5373
|
],
|
|
5359
5374
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5360
5375
|
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%}"]
|
|
@@ -5411,22 +5426,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5411
5426
|
},] }
|
|
5412
5427
|
];
|
|
5413
5428
|
|
|
5414
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5429
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5415
5430
|
provide: NG_VALUE_ACCESSOR,
|
|
5416
5431
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5417
5432
|
multi: true
|
|
5418
5433
|
};
|
|
5419
|
-
const noop$
|
|
5434
|
+
const noop$1 = () => {
|
|
5420
5435
|
};
|
|
5421
|
-
const ɵ0$
|
|
5436
|
+
const ɵ0$4 = noop$1;
|
|
5422
5437
|
class MatBooleanField {
|
|
5423
5438
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5424
5439
|
this.translate = translate;
|
|
5425
5440
|
this.formBuilder = formBuilder;
|
|
5426
5441
|
this.cd = cd;
|
|
5427
5442
|
this.formGroupDir = formGroupDir;
|
|
5428
|
-
this._onChangeCallback = noop$
|
|
5429
|
-
this._onTouchedCallback = noop$
|
|
5443
|
+
this._onChangeCallback = noop$1;
|
|
5444
|
+
this._onTouchedCallback = noop$1;
|
|
5430
5445
|
this._writing = false;
|
|
5431
5446
|
this.showRadio = false;
|
|
5432
5447
|
this.disabled = false;
|
|
@@ -5599,7 +5614,7 @@ MatBooleanField.decorators = [
|
|
|
5599
5614
|
selector: 'mat-boolean-field',
|
|
5600
5615
|
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",
|
|
5601
5616
|
providers: [
|
|
5602
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5617
|
+
DEFAULT_VALUE_ACCESSOR$1
|
|
5603
5618
|
],
|
|
5604
5619
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5605
5620
|
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}"]
|
|
@@ -5847,7 +5862,7 @@ class MatNumpadDomService {
|
|
|
5847
5862
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5848
5863
|
}
|
|
5849
5864
|
}
|
|
5850
|
-
MatNumpadDomService.ɵprov =
|
|
5865
|
+
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" });
|
|
5851
5866
|
MatNumpadDomService.decorators = [
|
|
5852
5867
|
{ type: Injectable, args: [{
|
|
5853
5868
|
providedIn: 'root'
|
|
@@ -6211,7 +6226,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6211
6226
|
},] }
|
|
6212
6227
|
];
|
|
6213
6228
|
|
|
6214
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
6229
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
6215
6230
|
provide: NG_VALUE_ACCESSOR,
|
|
6216
6231
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6217
6232
|
multi: true
|
|
@@ -6474,7 +6489,7 @@ MatSwipeField.decorators = [
|
|
|
6474
6489
|
{ type: Component, args: [{
|
|
6475
6490
|
selector: 'mat-swipe-field',
|
|
6476
6491
|
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",
|
|
6477
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
6492
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6478
6493
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6479
6494
|
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}"]
|
|
6480
6495
|
},] }
|
|
@@ -6969,7 +6984,7 @@ class ProgressBarService {
|
|
|
6969
6984
|
}
|
|
6970
6985
|
}
|
|
6971
6986
|
}
|
|
6972
|
-
ProgressBarService.ɵprov =
|
|
6987
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
6973
6988
|
ProgressBarService.decorators = [
|
|
6974
6989
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
6975
6990
|
];
|
|
@@ -7013,7 +7028,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7013
7028
|
return mc;
|
|
7014
7029
|
}
|
|
7015
7030
|
}
|
|
7016
|
-
AppGestureConfig.ɵprov =
|
|
7031
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7017
7032
|
AppGestureConfig.decorators = [
|
|
7018
7033
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7019
7034
|
];
|
|
@@ -7236,7 +7251,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7236
7251
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7237
7252
|
}
|
|
7238
7253
|
}
|
|
7239
|
-
MatPaginatorI18n.ɵprov =
|
|
7254
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7240
7255
|
MatPaginatorI18n.decorators = [
|
|
7241
7256
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7242
7257
|
];
|
|
@@ -7326,17 +7341,17 @@ function getColorContrast(color, bw) {
|
|
|
7326
7341
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
7327
7342
|
}
|
|
7328
7343
|
|
|
7329
|
-
const noop
|
|
7344
|
+
const noop = () => {
|
|
7330
7345
|
};
|
|
7331
|
-
const ɵ0$
|
|
7346
|
+
const ɵ0$3 = noop;
|
|
7332
7347
|
class AppFormField {
|
|
7333
7348
|
constructor(translate, cd, injector, formGroupDir) {
|
|
7334
7349
|
this.translate = translate;
|
|
7335
7350
|
this.cd = cd;
|
|
7336
7351
|
this.injector = injector;
|
|
7337
7352
|
this.formGroupDir = formGroupDir;
|
|
7338
|
-
this._onChangeCallback = noop
|
|
7339
|
-
this._onTouchedCallback = noop
|
|
7353
|
+
this._onChangeCallback = noop;
|
|
7354
|
+
this._onTouchedCallback = noop;
|
|
7340
7355
|
this.readonly = false;
|
|
7341
7356
|
this.compact = false;
|
|
7342
7357
|
this.floatLabel = 'auto';
|
|
@@ -7752,14 +7767,14 @@ class AudioProvider extends StartableService {
|
|
|
7752
7767
|
});
|
|
7753
7768
|
}
|
|
7754
7769
|
}
|
|
7755
|
-
AudioProvider.ɵprov =
|
|
7770
|
+
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" });
|
|
7756
7771
|
AudioProvider.decorators = [
|
|
7757
7772
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7758
7773
|
];
|
|
7759
7774
|
AudioProvider.ctorParameters = () => [
|
|
7760
7775
|
{ type: Platform },
|
|
7761
|
-
{ type: NativeAudio
|
|
7762
|
-
{ type: Vibration
|
|
7776
|
+
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7777
|
+
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7763
7778
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7764
7779
|
];
|
|
7765
7780
|
|
|
@@ -7841,7 +7856,7 @@ class Hotkeys {
|
|
|
7841
7856
|
});
|
|
7842
7857
|
}
|
|
7843
7858
|
}
|
|
7844
|
-
Hotkeys.ɵprov =
|
|
7859
|
+
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" });
|
|
7845
7860
|
Hotkeys.decorators = [
|
|
7846
7861
|
{ type: Injectable, args: [{
|
|
7847
7862
|
providedIn: 'root'
|
|
@@ -8015,7 +8030,7 @@ class Base64ImageReader {
|
|
|
8015
8030
|
}
|
|
8016
8031
|
}
|
|
8017
8032
|
|
|
8018
|
-
const uuidv4 = uuidv4Imported;
|
|
8033
|
+
const uuidv4$1 = uuidv4Imported;
|
|
8019
8034
|
class FileService {
|
|
8020
8035
|
constructor(platform,
|
|
8021
8036
|
//private transfer: FileTransfer,
|
|
@@ -8052,7 +8067,7 @@ class FileService {
|
|
|
8052
8067
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8053
8068
|
if (lastSlashIndex === -1)
|
|
8054
8069
|
throw new Error('Invalid URL: ' + source);
|
|
8055
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8070
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
8056
8071
|
// Download into the file system
|
|
8057
8072
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8058
8073
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8108,7 +8123,7 @@ class FileService {
|
|
|
8108
8123
|
this._started = true;
|
|
8109
8124
|
}
|
|
8110
8125
|
}
|
|
8111
|
-
FileService.ɵprov =
|
|
8126
|
+
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" });
|
|
8112
8127
|
FileService.decorators = [
|
|
8113
8128
|
{ type: Injectable, args: [{
|
|
8114
8129
|
providedIn: 'root',
|
|
@@ -8270,7 +8285,7 @@ class Base58 {
|
|
|
8270
8285
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
8271
8286
|
|
|
8272
8287
|
const scrypt = require('scrypt-async');
|
|
8273
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
8288
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
8274
8289
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
8275
8290
|
const nacl = {
|
|
8276
8291
|
sign,
|
|
@@ -8374,7 +8389,7 @@ class CryptoService {
|
|
|
8374
8389
|
* Hash (using SHA256) a message
|
|
8375
8390
|
*/
|
|
8376
8391
|
sha256(message) {
|
|
8377
|
-
return sha256().update(message).digest('hex');
|
|
8392
|
+
return sha256$1().update(message).digest('hex');
|
|
8378
8393
|
}
|
|
8379
8394
|
/**
|
|
8380
8395
|
* Hash (using SHA512) a message
|
|
@@ -8387,7 +8402,7 @@ class CryptoService {
|
|
|
8387
8402
|
return nacl.util.encodeBase64(m);
|
|
8388
8403
|
}
|
|
8389
8404
|
}
|
|
8390
|
-
CryptoService.ɵprov =
|
|
8405
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
8391
8406
|
CryptoService.decorators = [
|
|
8392
8407
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8393
8408
|
];
|
|
@@ -9608,7 +9623,7 @@ class LocalSettingsService extends StartableService {
|
|
|
9608
9623
|
return page;
|
|
9609
9624
|
}
|
|
9610
9625
|
}
|
|
9611
|
-
LocalSettingsService.ɵprov =
|
|
9626
|
+
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" });
|
|
9612
9627
|
LocalSettingsService.decorators = [
|
|
9613
9628
|
{ type: Injectable, args: [{
|
|
9614
9629
|
providedIn: 'root',
|
|
@@ -10268,7 +10283,7 @@ class NetworkService extends StartableService {
|
|
|
10268
10283
|
});
|
|
10269
10284
|
}
|
|
10270
10285
|
}
|
|
10271
|
-
NetworkService.ɵprov =
|
|
10286
|
+
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" });
|
|
10272
10287
|
NetworkService.decorators = [
|
|
10273
10288
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10274
10289
|
];
|
|
@@ -10279,16 +10294,16 @@ NetworkService.ctorParameters = () => [
|
|
|
10279
10294
|
{ type: CryptoService },
|
|
10280
10295
|
{ type: Storage },
|
|
10281
10296
|
{ type: LocalSettingsService },
|
|
10282
|
-
{ type: CacheService
|
|
10297
|
+
{ type: CacheService },
|
|
10283
10298
|
{ type: HttpClient },
|
|
10284
10299
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10285
|
-
{ type: Network
|
|
10286
|
-
{ type: SplashScreen
|
|
10300
|
+
{ type: Network, decorators: [{ type: Optional }] },
|
|
10301
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
10287
10302
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
10288
10303
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
10289
10304
|
];
|
|
10290
10305
|
|
|
10291
|
-
const ErrorCodes = {
|
|
10306
|
+
const ErrorCodes$2 = {
|
|
10292
10307
|
UNKNOWN_ERROR: 0,
|
|
10293
10308
|
LOAD_ACCOUNT_ERROR: 1,
|
|
10294
10309
|
BAD_PASSWORD: 2,
|
|
@@ -10635,7 +10650,7 @@ class EntityStore {
|
|
|
10635
10650
|
}
|
|
10636
10651
|
catch (err) {
|
|
10637
10652
|
console.error(err);
|
|
10638
|
-
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10653
|
+
throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10639
10654
|
}
|
|
10640
10655
|
}
|
|
10641
10656
|
// Emit update event
|
|
@@ -11206,7 +11221,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11206
11221
|
}
|
|
11207
11222
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11208
11223
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11209
|
-
EntitiesStorage.ɵprov =
|
|
11224
|
+
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" });
|
|
11210
11225
|
EntitiesStorage.decorators = [
|
|
11211
11226
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11212
11227
|
];
|
|
@@ -11306,10 +11321,10 @@ function referentialToString(obj, properties) {
|
|
|
11306
11321
|
function referentialsToString(values, properties, separator) {
|
|
11307
11322
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
11308
11323
|
}
|
|
11309
|
-
const ɵ0$
|
|
11324
|
+
const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
11310
11325
|
const StatusList = Object.freeze([
|
|
11311
11326
|
{
|
|
11312
|
-
id: ɵ0$
|
|
11327
|
+
id: ɵ0$2,
|
|
11313
11328
|
icon: 'checkmark',
|
|
11314
11329
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
11315
11330
|
},
|
|
@@ -11584,7 +11599,7 @@ function accountToString(data) {
|
|
|
11584
11599
|
(data.lastName || '')) || '';
|
|
11585
11600
|
}
|
|
11586
11601
|
|
|
11587
|
-
const uuidv4
|
|
11602
|
+
const uuidv4 = uuidv4Imported;
|
|
11588
11603
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
11589
11604
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
11590
11605
|
/**
|
|
@@ -11628,7 +11643,7 @@ function createTrackerLink(opts) {
|
|
|
11628
11643
|
// Skip if not tracked
|
|
11629
11644
|
if (!context || !context.tracked)
|
|
11630
11645
|
return forward(operation);
|
|
11631
|
-
const id = context.serializationKey || uuidv4
|
|
11646
|
+
const id = context.serializationKey || uuidv4();
|
|
11632
11647
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
11633
11648
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
11634
11649
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -12297,7 +12312,7 @@ class GraphqlService extends StartableService {
|
|
|
12297
12312
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
12298
12313
|
|| this.toAppError(err.networkError)
|
|
12299
12314
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
12300
|
-
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
12315
|
+
|| this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
|
|
12301
12316
|
// If graphQL: try to convert the first error found
|
|
12302
12317
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
12303
12318
|
|| this.toAppError(err)
|
|
@@ -12305,7 +12320,7 @@ class GraphqlService extends StartableService {
|
|
|
12305
12320
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
12306
12321
|
|| err;
|
|
12307
12322
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
12308
|
-
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12323
|
+
if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12309
12324
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
12310
12325
|
this.onNetworkError.next(error);
|
|
12311
12326
|
}
|
|
@@ -12341,7 +12356,7 @@ class GraphqlService extends StartableService {
|
|
|
12341
12356
|
return 'ERROR.UNAUTHORIZED';
|
|
12342
12357
|
case ServerErrorCodes.FORBIDDEN:
|
|
12343
12358
|
return 'ERROR.FORBIDDEN';
|
|
12344
|
-
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
12359
|
+
case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
|
|
12345
12360
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
12346
12361
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
12347
12362
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -12369,7 +12384,7 @@ class GraphqlService extends StartableService {
|
|
|
12369
12384
|
return undefined;
|
|
12370
12385
|
}
|
|
12371
12386
|
}
|
|
12372
|
-
GraphqlService.ɵprov =
|
|
12387
|
+
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" });
|
|
12373
12388
|
GraphqlService.decorators = [
|
|
12374
12389
|
{ type: Injectable, args: [{
|
|
12375
12390
|
providedIn: 'root'
|
|
@@ -12386,7 +12401,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
12386
12401
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
12387
12402
|
];
|
|
12388
12403
|
|
|
12389
|
-
const sha256
|
|
12404
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
12390
12405
|
class BaseGraphqlServiceOptions {
|
|
12391
12406
|
}
|
|
12392
12407
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -12536,8 +12551,8 @@ class BaseGraphqlService {
|
|
|
12536
12551
|
}
|
|
12537
12552
|
/* -- protected methods -- */
|
|
12538
12553
|
computeMutableWatchQueryId(opts) {
|
|
12539
|
-
const queryName = opts.queryName || sha256
|
|
12540
|
-
const variablesKey = opts.variables && sha256
|
|
12554
|
+
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
12555
|
+
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
12541
12556
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
12542
12557
|
}
|
|
12543
12558
|
findMutableWatchQueries(opts) {
|
|
@@ -12600,7 +12615,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
12600
12615
|
/* ------------------------------------
|
|
12601
12616
|
* GraphQL queries
|
|
12602
12617
|
* ------------------------------------*/
|
|
12603
|
-
const Fragments = {
|
|
12618
|
+
const Fragments$1 = {
|
|
12604
12619
|
account: gql `
|
|
12605
12620
|
fragment AccountFragment on AccountVO {
|
|
12606
12621
|
id
|
|
@@ -12633,13 +12648,13 @@ const Fragments = {
|
|
|
12633
12648
|
`
|
|
12634
12649
|
};
|
|
12635
12650
|
// Load account query
|
|
12636
|
-
const LoadQuery = gql `
|
|
12651
|
+
const LoadQuery$1 = gql `
|
|
12637
12652
|
query Account {
|
|
12638
12653
|
data: account {
|
|
12639
12654
|
...AccountFragment
|
|
12640
12655
|
}
|
|
12641
12656
|
}
|
|
12642
|
-
${Fragments.account}
|
|
12657
|
+
${Fragments$1.account}
|
|
12643
12658
|
`;
|
|
12644
12659
|
// Check email query
|
|
12645
12660
|
const IsEmailExistsQuery = gql `
|
|
@@ -12648,13 +12663,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12648
12663
|
}
|
|
12649
12664
|
`;
|
|
12650
12665
|
// Save (create or update) account mutation
|
|
12651
|
-
const SaveMutation = gql `
|
|
12666
|
+
const SaveMutation$1 = gql `
|
|
12652
12667
|
mutation SaveAccount($data:AccountVOInput){
|
|
12653
12668
|
data: saveAccount(account: $data){
|
|
12654
12669
|
...AccountFragment
|
|
12655
12670
|
}
|
|
12656
12671
|
}
|
|
12657
|
-
${Fragments.account}
|
|
12672
|
+
${Fragments$1.account}
|
|
12658
12673
|
`;
|
|
12659
12674
|
// Create account mutation
|
|
12660
12675
|
const CreateMutation = gql `
|
|
@@ -12663,7 +12678,7 @@ const CreateMutation = gql `
|
|
|
12663
12678
|
...AccountFragment
|
|
12664
12679
|
}
|
|
12665
12680
|
}
|
|
12666
|
-
${Fragments.account}
|
|
12681
|
+
${Fragments$1.account}
|
|
12667
12682
|
`;
|
|
12668
12683
|
// Sent confirmation email
|
|
12669
12684
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13001,7 +13016,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13001
13016
|
catch (error) {
|
|
13002
13017
|
console.error(error);
|
|
13003
13018
|
this.resetData();
|
|
13004
|
-
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13019
|
+
throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13005
13020
|
}
|
|
13006
13021
|
// Store pubkey+keypair
|
|
13007
13022
|
this._data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13035,7 +13050,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13035
13050
|
}
|
|
13036
13051
|
catch (err) {
|
|
13037
13052
|
// If account not found, check if email is valid
|
|
13038
|
-
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13053
|
+
if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
|
|
13039
13054
|
// Check email exists
|
|
13040
13055
|
if (data.username.indexOf('@') !== -1) {
|
|
13041
13056
|
let isEmailExists;
|
|
@@ -13047,11 +13062,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13047
13062
|
}
|
|
13048
13063
|
// Email not exists (no account)
|
|
13049
13064
|
if (!isEmailExists) {
|
|
13050
|
-
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13065
|
+
throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13051
13066
|
}
|
|
13052
13067
|
}
|
|
13053
13068
|
// Email exists, so error = 'bad password'
|
|
13054
|
-
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13069
|
+
throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13055
13070
|
}
|
|
13056
13071
|
throw err; // resend the first error
|
|
13057
13072
|
}
|
|
@@ -13176,8 +13191,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13176
13191
|
// Load remotely
|
|
13177
13192
|
else {
|
|
13178
13193
|
const { data } = yield this.graphql.query({
|
|
13179
|
-
query: LoadQuery,
|
|
13180
|
-
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13194
|
+
query: LoadQuery$1,
|
|
13195
|
+
error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13181
13196
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13182
13197
|
});
|
|
13183
13198
|
json = data;
|
|
@@ -13204,7 +13219,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13204
13219
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13205
13220
|
const isEmailExists = yield this.isEmailExists(email);
|
|
13206
13221
|
if (isEmailExists) {
|
|
13207
|
-
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13222
|
+
throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13208
13223
|
}
|
|
13209
13224
|
});
|
|
13210
13225
|
}
|
|
@@ -13240,7 +13255,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13240
13255
|
locale
|
|
13241
13256
|
},
|
|
13242
13257
|
error: {
|
|
13243
|
-
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13258
|
+
code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13244
13259
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
13245
13260
|
}
|
|
13246
13261
|
});
|
|
@@ -13256,7 +13271,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13256
13271
|
code
|
|
13257
13272
|
},
|
|
13258
13273
|
error: {
|
|
13259
|
-
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
13274
|
+
code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
|
|
13260
13275
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
13261
13276
|
}
|
|
13262
13277
|
});
|
|
@@ -13274,7 +13289,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13274
13289
|
interval: 10
|
|
13275
13290
|
},
|
|
13276
13291
|
error: {
|
|
13277
|
-
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13292
|
+
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13278
13293
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
13279
13294
|
}
|
|
13280
13295
|
}).subscribe({
|
|
@@ -13383,7 +13398,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13383
13398
|
throw error;
|
|
13384
13399
|
console.error(error);
|
|
13385
13400
|
throw {
|
|
13386
|
-
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
13401
|
+
code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
|
|
13387
13402
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
13388
13403
|
};
|
|
13389
13404
|
}
|
|
@@ -13528,7 +13543,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13528
13543
|
if (!isNew) {
|
|
13529
13544
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
13530
13545
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
13531
|
-
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13546
|
+
throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13532
13547
|
}
|
|
13533
13548
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
13534
13549
|
}
|
|
@@ -13537,10 +13552,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
13537
13552
|
delete json.profiles;
|
|
13538
13553
|
// Execute mutation
|
|
13539
13554
|
const { data } = yield this.graphql.mutate({
|
|
13540
|
-
mutation: isNew ? CreateMutation : SaveMutation,
|
|
13555
|
+
mutation: isNew ? CreateMutation : SaveMutation$1,
|
|
13541
13556
|
variables: { data: json },
|
|
13542
13557
|
error: {
|
|
13543
|
-
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
13558
|
+
code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
|
|
13544
13559
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
13545
13560
|
}
|
|
13546
13561
|
});
|
|
@@ -13560,7 +13575,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13560
13575
|
if (counter > 4) {
|
|
13561
13576
|
if (this._debug)
|
|
13562
13577
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
13563
|
-
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13578
|
+
throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13564
13579
|
}
|
|
13565
13580
|
// Check if valid
|
|
13566
13581
|
if (token) {
|
|
@@ -13570,7 +13585,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13570
13585
|
token
|
|
13571
13586
|
},
|
|
13572
13587
|
error: {
|
|
13573
|
-
code: ErrorCodes.UNAUTHORIZED,
|
|
13588
|
+
code: ErrorCodes$2.UNAUTHORIZED,
|
|
13574
13589
|
message: 'ERROR.UNAUTHORIZED'
|
|
13575
13590
|
},
|
|
13576
13591
|
fetchPolicy: 'no-cache'
|
|
@@ -13586,7 +13601,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13586
13601
|
}
|
|
13587
13602
|
// Generate a new token
|
|
13588
13603
|
const challengeError = {
|
|
13589
|
-
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
13604
|
+
code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
|
|
13590
13605
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
13591
13606
|
};
|
|
13592
13607
|
const data = yield this.graphql.query({
|
|
@@ -13620,7 +13635,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13620
13635
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13621
13636
|
}
|
|
13622
13637
|
}
|
|
13623
|
-
AccountService.ɵprov =
|
|
13638
|
+
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" });
|
|
13624
13639
|
AccountService.decorators = [
|
|
13625
13640
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13626
13641
|
];
|
|
@@ -13880,7 +13895,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13880
13895
|
/* ------------------------------------
|
|
13881
13896
|
* GraphQL queries
|
|
13882
13897
|
* ------------------------------------*/
|
|
13883
|
-
const Fragments
|
|
13898
|
+
const Fragments = {
|
|
13884
13899
|
config: gql `
|
|
13885
13900
|
fragment ConfigFragment on ConfigurationVO {
|
|
13886
13901
|
id
|
|
@@ -13907,22 +13922,22 @@ const Fragments$1 = {
|
|
|
13907
13922
|
}
|
|
13908
13923
|
`
|
|
13909
13924
|
};
|
|
13910
|
-
const LoadQuery
|
|
13925
|
+
const LoadQuery = gql `
|
|
13911
13926
|
query Configuration{
|
|
13912
13927
|
data: configuration{
|
|
13913
13928
|
...ConfigFragment
|
|
13914
13929
|
}
|
|
13915
13930
|
}
|
|
13916
|
-
${Fragments
|
|
13931
|
+
${Fragments.config}
|
|
13917
13932
|
`;
|
|
13918
13933
|
// Save (create or update) account mutation
|
|
13919
|
-
const SaveMutation
|
|
13934
|
+
const SaveMutation = gql `
|
|
13920
13935
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
13921
13936
|
data: saveConfiguration(config: $data){
|
|
13922
13937
|
...ConfigFragment
|
|
13923
13938
|
}
|
|
13924
13939
|
}
|
|
13925
|
-
${Fragments
|
|
13940
|
+
${Fragments.config}
|
|
13926
13941
|
`;
|
|
13927
13942
|
const ClearCache = gql `
|
|
13928
13943
|
query ClearCache($name: String) {
|
|
@@ -14017,12 +14032,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14017
14032
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14018
14033
|
const now = Date.now();
|
|
14019
14034
|
console.debug('[config] Loading Pod configuration...');
|
|
14020
|
-
const query = opts && opts.query || LoadQuery
|
|
14035
|
+
const query = opts && opts.query || LoadQuery;
|
|
14021
14036
|
const variables = opts && opts.variables || undefined;
|
|
14022
14037
|
const res = yield this.graphql.query({
|
|
14023
14038
|
query,
|
|
14024
14039
|
variables,
|
|
14025
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14040
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14026
14041
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14027
14042
|
});
|
|
14028
14043
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14047,12 +14062,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14047
14062
|
const json = config.asObject();
|
|
14048
14063
|
// Execute mutation
|
|
14049
14064
|
const res = yield this.graphql.mutate({
|
|
14050
|
-
mutation: SaveMutation
|
|
14065
|
+
mutation: SaveMutation,
|
|
14051
14066
|
variables: {
|
|
14052
14067
|
data: json
|
|
14053
14068
|
},
|
|
14054
14069
|
error: {
|
|
14055
|
-
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14070
|
+
code: ErrorCodes$2.SAVE_CONFIG_ERROR,
|
|
14056
14071
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14057
14072
|
}
|
|
14058
14073
|
});
|
|
@@ -14078,7 +14093,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14078
14093
|
const res = yield this.graphql.query({
|
|
14079
14094
|
query: CacheStatistics,
|
|
14080
14095
|
variables: null,
|
|
14081
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14096
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14082
14097
|
fetchPolicy: 'network-only'
|
|
14083
14098
|
});
|
|
14084
14099
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14094,7 +14109,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14094
14109
|
const res = yield this.graphql.query({
|
|
14095
14110
|
query: ClearCache,
|
|
14096
14111
|
variables,
|
|
14097
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14112
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14098
14113
|
fetchPolicy: 'network-only'
|
|
14099
14114
|
});
|
|
14100
14115
|
const data = res && res.clearCache || undefined;
|
|
@@ -14253,7 +14268,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14253
14268
|
});
|
|
14254
14269
|
}
|
|
14255
14270
|
}
|
|
14256
|
-
ConfigService.ɵprov =
|
|
14271
|
+
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" });
|
|
14257
14272
|
ConfigService.decorators = [
|
|
14258
14273
|
{ type: Injectable, args: [{
|
|
14259
14274
|
providedIn: 'root',
|
|
@@ -14272,7 +14287,7 @@ ConfigService.ctorParameters = () => [
|
|
|
14272
14287
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
14273
14288
|
];
|
|
14274
14289
|
|
|
14275
|
-
const moment$
|
|
14290
|
+
const moment$2 = momentImported;
|
|
14276
14291
|
class PlatformService {
|
|
14277
14292
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14278
14293
|
this.platform = platform;
|
|
@@ -14481,16 +14496,16 @@ class PlatformService {
|
|
|
14481
14496
|
}
|
|
14482
14497
|
// config moment lib
|
|
14483
14498
|
try {
|
|
14484
|
-
moment$
|
|
14499
|
+
moment$2.locale(event.lang);
|
|
14485
14500
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
14486
14501
|
}
|
|
14487
14502
|
// If error, fallback to en
|
|
14488
14503
|
catch (err) {
|
|
14489
|
-
moment$
|
|
14504
|
+
moment$2.locale('en');
|
|
14490
14505
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
14491
14506
|
}
|
|
14492
14507
|
// Config date adapter
|
|
14493
|
-
this.dateAdapter.setLocale(moment$
|
|
14508
|
+
this.dateAdapter.setLocale(moment$2.locale());
|
|
14494
14509
|
}
|
|
14495
14510
|
});
|
|
14496
14511
|
this.settings.onChange.subscribe(data => {
|
|
@@ -14628,7 +14643,7 @@ class PlatformService {
|
|
|
14628
14643
|
});
|
|
14629
14644
|
}
|
|
14630
14645
|
}
|
|
14631
|
-
PlatformService.ɵprov =
|
|
14646
|
+
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" });
|
|
14632
14647
|
PlatformService.decorators = [
|
|
14633
14648
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14634
14649
|
];
|
|
@@ -14643,15 +14658,15 @@ PlatformService.ctorParameters = () => [
|
|
|
14643
14658
|
{ type: NetworkService },
|
|
14644
14659
|
{ type: AccountService },
|
|
14645
14660
|
{ type: ConfigService },
|
|
14646
|
-
{ type: CacheService
|
|
14661
|
+
{ type: CacheService },
|
|
14647
14662
|
{ type: Storage },
|
|
14648
14663
|
{ type: AudioProvider },
|
|
14649
14664
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
14650
|
-
{ type: StatusBar
|
|
14665
|
+
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
14651
14666
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14652
|
-
{ type: SplashScreen
|
|
14653
|
-
{ type: InAppBrowser
|
|
14654
|
-
{ type: Downloader
|
|
14667
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14668
|
+
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14669
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14655
14670
|
];
|
|
14656
14671
|
|
|
14657
14672
|
class AppHelpModal {
|
|
@@ -14715,7 +14730,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14715
14730
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14716
14731
|
}
|
|
14717
14732
|
}
|
|
14718
|
-
MatStepperI18n.ɵprov =
|
|
14733
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14719
14734
|
MatStepperI18n.decorators = [
|
|
14720
14735
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14721
14736
|
];
|
|
@@ -15707,7 +15722,7 @@ function state2side(state) {
|
|
|
15707
15722
|
return 1;
|
|
15708
15723
|
}
|
|
15709
15724
|
}
|
|
15710
|
-
const ɵ0$
|
|
15725
|
+
const ɵ0$1 = (defaultStateSize) => [
|
|
15711
15726
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15712
15727
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15713
15728
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15715,7 +15730,7 @@ const ɵ0$9 = (defaultStateSize) => [
|
|
|
15715
15730
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15716
15731
|
startColor: rgbArrayMap.red,
|
|
15717
15732
|
startStates: [0, 2, 3],
|
|
15718
|
-
startStepsFn: ɵ0$
|
|
15733
|
+
startStepsFn: ɵ0$1
|
|
15719
15734
|
};
|
|
15720
15735
|
/**
|
|
15721
15736
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15807,21 +15822,21 @@ function linearColorGradient(count, options) {
|
|
|
15807
15822
|
return result;
|
|
15808
15823
|
}
|
|
15809
15824
|
|
|
15810
|
-
class EntityTestClass {
|
|
15825
|
+
class EntityTestClass$1 {
|
|
15811
15826
|
}
|
|
15812
|
-
const FAKE_ENTITIES = [
|
|
15827
|
+
const FAKE_ENTITIES$1 = [
|
|
15813
15828
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15814
15829
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15815
15830
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15816
15831
|
];
|
|
15817
|
-
function deepCopy(values, size) {
|
|
15832
|
+
function deepCopy$1(values, size) {
|
|
15818
15833
|
if (isNil(size)) {
|
|
15819
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15834
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
15820
15835
|
}
|
|
15821
15836
|
let result = [];
|
|
15822
15837
|
let i = 1;
|
|
15823
15838
|
while (result.length < size) {
|
|
15824
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15839
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
15825
15840
|
const name = entity.name + ' #' + i;
|
|
15826
15841
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15827
15842
|
}));
|
|
@@ -15831,7 +15846,7 @@ function deepCopy(values, size) {
|
|
|
15831
15846
|
class AutocompleteTestPage {
|
|
15832
15847
|
constructor(formBuilder) {
|
|
15833
15848
|
this.formBuilder = formBuilder;
|
|
15834
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15849
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
15835
15850
|
this.$items = new BehaviorSubject(undefined);
|
|
15836
15851
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15837
15852
|
this.memoryHide = false;
|
|
@@ -15875,7 +15890,7 @@ class AutocompleteTestPage {
|
|
|
15875
15890
|
});
|
|
15876
15891
|
// From items
|
|
15877
15892
|
this.autocompleteFields.add('entity-items-large', {
|
|
15878
|
-
items: FAKE_ENTITIES.slice(),
|
|
15893
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
15879
15894
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15880
15895
|
displayWith: this.entityToString
|
|
15881
15896
|
});
|
|
@@ -15885,12 +15900,12 @@ class AutocompleteTestPage {
|
|
|
15885
15900
|
loadData() {
|
|
15886
15901
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15887
15902
|
const data = {
|
|
15888
|
-
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15903
|
+
entity: deepCopy$1(FAKE_ENTITIES$1)[0],
|
|
15889
15904
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15890
15905
|
missingEntity: {
|
|
15891
15906
|
id: -1, label: '??', name: 'Missing item'
|
|
15892
15907
|
},
|
|
15893
|
-
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15908
|
+
disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
|
|
15894
15909
|
};
|
|
15895
15910
|
this.form.setValue(data);
|
|
15896
15911
|
// Load observables
|
|
@@ -16063,13 +16078,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16063
16078
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16064
16079
|
];
|
|
16065
16080
|
|
|
16066
|
-
const moment$
|
|
16081
|
+
const moment$1 = momentImported;
|
|
16067
16082
|
class SwipeTestPage {
|
|
16068
16083
|
constructor(formBuilder, dateFormatPipe) {
|
|
16069
16084
|
this.formBuilder = formBuilder;
|
|
16070
16085
|
this.dateFormatPipe = dateFormatPipe;
|
|
16071
16086
|
this.$dates = new BehaviorSubject(undefined);
|
|
16072
|
-
this._today = moment$
|
|
16087
|
+
this._today = moment$1().startOf('day');
|
|
16073
16088
|
this.form = formBuilder.group({
|
|
16074
16089
|
empty: [null, Validators.required],
|
|
16075
16090
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16082,7 +16097,7 @@ class SwipeTestPage {
|
|
|
16082
16097
|
ngOnInit() {
|
|
16083
16098
|
const dates = [];
|
|
16084
16099
|
for (let d = 0; d < 7; d++) {
|
|
16085
|
-
dates[d] = moment$
|
|
16100
|
+
dates[d] = moment$1(this._today).add(d - 3, 'day');
|
|
16086
16101
|
}
|
|
16087
16102
|
this.$dates.next(dates);
|
|
16088
16103
|
this.loadData();
|
|
@@ -16123,7 +16138,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16123
16138
|
{ type: DateFormatPipe }
|
|
16124
16139
|
];
|
|
16125
16140
|
|
|
16126
|
-
const moment
|
|
16141
|
+
const moment = momentImported;
|
|
16127
16142
|
class DateTimeTestPage {
|
|
16128
16143
|
constructor(platform, formBuilder, cd) {
|
|
16129
16144
|
this.platform = platform;
|
|
@@ -16155,7 +16170,7 @@ class DateTimeTestPage {
|
|
|
16155
16170
|
// Load the form with data
|
|
16156
16171
|
loadData() {
|
|
16157
16172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16158
|
-
const now = moment
|
|
16173
|
+
const now = moment();
|
|
16159
16174
|
const data = {
|
|
16160
16175
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16161
16176
|
enable: toDateISOString(now),
|
|
@@ -16216,20 +16231,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16216
16231
|
{ type: ChangeDetectorRef }
|
|
16217
16232
|
];
|
|
16218
16233
|
|
|
16219
|
-
class EntityTestClass
|
|
16234
|
+
class EntityTestClass {
|
|
16220
16235
|
}
|
|
16221
|
-
const FAKE_ENTITIES
|
|
16236
|
+
const FAKE_ENTITIES = [
|
|
16222
16237
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16223
16238
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16224
16239
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16225
16240
|
];
|
|
16226
|
-
function deepCopy
|
|
16227
|
-
return (values || FAKE_ENTITIES
|
|
16241
|
+
function deepCopy(values) {
|
|
16242
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16228
16243
|
}
|
|
16229
16244
|
class ChipsTestPage {
|
|
16230
16245
|
constructor(formBuilder) {
|
|
16231
16246
|
this.formBuilder = formBuilder;
|
|
16232
|
-
this._items = deepCopy
|
|
16247
|
+
this._items = deepCopy(FAKE_ENTITIES);
|
|
16233
16248
|
this._$items = new BehaviorSubject(undefined);
|
|
16234
16249
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16235
16250
|
this.form = formBuilder.group({
|
|
@@ -16248,7 +16263,7 @@ class ChipsTestPage {
|
|
|
16248
16263
|
});
|
|
16249
16264
|
// From items
|
|
16250
16265
|
this.autocompleteFields.add('entity-items', {
|
|
16251
|
-
items: FAKE_ENTITIES
|
|
16266
|
+
items: FAKE_ENTITIES.slice(),
|
|
16252
16267
|
attributes: ['label', 'name'],
|
|
16253
16268
|
displayWith: this.entityToString
|
|
16254
16269
|
});
|
|
@@ -16269,15 +16284,15 @@ class ChipsTestPage {
|
|
|
16269
16284
|
const data = {
|
|
16270
16285
|
entity: [],
|
|
16271
16286
|
// THis item is NOT in the items list => i should be displayed anyway
|
|
16272
|
-
entityInitial: FAKE_ENTITIES
|
|
16273
|
-
disableEntity: FAKE_ENTITIES
|
|
16287
|
+
entityInitial: FAKE_ENTITIES.slice(1, 2),
|
|
16288
|
+
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16274
16289
|
};
|
|
16275
16290
|
this.form.setValue(data);
|
|
16276
16291
|
});
|
|
16277
16292
|
}
|
|
16278
16293
|
loadItems() {
|
|
16279
16294
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16280
|
-
this._$items.next(deepCopy
|
|
16295
|
+
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16281
16296
|
});
|
|
16282
16297
|
}
|
|
16283
16298
|
entityToString(item) {
|
|
@@ -16309,7 +16324,7 @@ ChipsTestPage.ctorParameters = () => [
|
|
|
16309
16324
|
{ type: FormBuilder }
|
|
16310
16325
|
];
|
|
16311
16326
|
|
|
16312
|
-
const routes = [
|
|
16327
|
+
const routes$1 = [
|
|
16313
16328
|
{
|
|
16314
16329
|
path: '',
|
|
16315
16330
|
pathMatch: 'full',
|
|
@@ -16356,7 +16371,7 @@ MaterialTestingModule.decorators = [
|
|
|
16356
16371
|
ReactiveFormsModule,
|
|
16357
16372
|
SharedMaterialModule,
|
|
16358
16373
|
TranslateModule.forChild(),
|
|
16359
|
-
RouterModule.forChild(routes)
|
|
16374
|
+
RouterModule.forChild(routes$1)
|
|
16360
16375
|
],
|
|
16361
16376
|
declarations: [
|
|
16362
16377
|
MaterialTestingPage,
|
|
@@ -17299,7 +17314,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17299
17314
|
});
|
|
17300
17315
|
}
|
|
17301
17316
|
}
|
|
17302
|
-
UserSettingsValidatorService.ɵprov =
|
|
17317
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17303
17318
|
UserSettingsValidatorService.decorators = [
|
|
17304
17319
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17305
17320
|
];
|
|
@@ -17343,7 +17358,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17343
17358
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17344
17359
|
}
|
|
17345
17360
|
}
|
|
17346
|
-
AccountValidatorService.ɵprov =
|
|
17361
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17347
17362
|
AccountValidatorService.decorators = [
|
|
17348
17363
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17349
17364
|
];
|
|
@@ -17877,7 +17892,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17877
17892
|
});
|
|
17878
17893
|
}
|
|
17879
17894
|
}
|
|
17880
|
-
LocalSettingsValidatorService.ɵprov =
|
|
17895
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
17881
17896
|
LocalSettingsValidatorService.decorators = [
|
|
17882
17897
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17883
17898
|
];
|
|
@@ -18497,7 +18512,7 @@ class IsOnFieldModePipe {
|
|
|
18497
18512
|
return value === 'FIELD';
|
|
18498
18513
|
}
|
|
18499
18514
|
}
|
|
18500
|
-
IsOnFieldModePipe.ɵprov =
|
|
18515
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18501
18516
|
IsOnFieldModePipe.decorators = [
|
|
18502
18517
|
{ type: Pipe, args: [{
|
|
18503
18518
|
name: 'isOnField'
|
|
@@ -18509,7 +18524,7 @@ class IsNotOnFieldModePipe {
|
|
|
18509
18524
|
return value !== 'FIELD';
|
|
18510
18525
|
}
|
|
18511
18526
|
}
|
|
18512
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18527
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18513
18528
|
IsNotOnFieldModePipe.decorators = [
|
|
18514
18529
|
{ type: Pipe, args: [{
|
|
18515
18530
|
name: 'isNotOnField'
|
|
@@ -18524,7 +18539,7 @@ class PersonToStringPipe {
|
|
|
18524
18539
|
return PersonUtils.personToString(value);
|
|
18525
18540
|
}
|
|
18526
18541
|
}
|
|
18527
|
-
PersonToStringPipe.ɵprov =
|
|
18542
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18528
18543
|
PersonToStringPipe.decorators = [
|
|
18529
18544
|
{ type: Pipe, args: [{
|
|
18530
18545
|
name: 'personToString'
|
|
@@ -18870,7 +18885,7 @@ class IsLoginAccountPipe {
|
|
|
18870
18885
|
return value && value.pubkey && true;
|
|
18871
18886
|
}
|
|
18872
18887
|
}
|
|
18873
|
-
IsLoginAccountPipe.ɵprov =
|
|
18888
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18874
18889
|
IsLoginAccountPipe.decorators = [
|
|
18875
18890
|
{ type: Pipe, args: [{
|
|
18876
18891
|
name: 'isLogin'
|
|
@@ -18882,7 +18897,7 @@ class AccountToStringPipe {
|
|
|
18882
18897
|
return accountToString(value);
|
|
18883
18898
|
}
|
|
18884
18899
|
}
|
|
18885
|
-
AccountToStringPipe.ɵprov =
|
|
18900
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
18886
18901
|
AccountToStringPipe.decorators = [
|
|
18887
18902
|
{ type: Pipe, args: [{
|
|
18888
18903
|
name: 'accountToString'
|
|
@@ -18897,7 +18912,7 @@ class DepartmentToStringPipe {
|
|
|
18897
18912
|
return departmentToString(value);
|
|
18898
18913
|
}
|
|
18899
18914
|
}
|
|
18900
|
-
DepartmentToStringPipe.ɵprov =
|
|
18915
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
18901
18916
|
DepartmentToStringPipe.decorators = [
|
|
18902
18917
|
{ type: Pipe, args: [{
|
|
18903
18918
|
name: 'departmentToString'
|
|
@@ -18923,7 +18938,7 @@ class MenuService {
|
|
|
18923
18938
|
this._visibleSubject.next(value);
|
|
18924
18939
|
}
|
|
18925
18940
|
}
|
|
18926
|
-
MenuService.ɵprov =
|
|
18941
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
18927
18942
|
MenuService.decorators = [
|
|
18928
18943
|
{ type: Injectable, args: [{
|
|
18929
18944
|
providedIn: 'root'
|
|
@@ -19417,7 +19432,7 @@ class AuthGuardService {
|
|
|
19417
19432
|
}));
|
|
19418
19433
|
}
|
|
19419
19434
|
}
|
|
19420
|
-
AuthGuardService.ɵprov =
|
|
19435
|
+
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" });
|
|
19421
19436
|
AuthGuardService.decorators = [
|
|
19422
19437
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19423
19438
|
];
|
|
@@ -19465,7 +19480,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19465
19480
|
query,
|
|
19466
19481
|
variables: { id },
|
|
19467
19482
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19468
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19483
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19469
19484
|
})
|
|
19470
19485
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19471
19486
|
? (data && this.fromObject(data))
|
|
@@ -19480,7 +19495,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19480
19495
|
query,
|
|
19481
19496
|
variables: { id },
|
|
19482
19497
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19483
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19498
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19484
19499
|
});
|
|
19485
19500
|
// Convert to entity
|
|
19486
19501
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19511,7 +19526,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19511
19526
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19512
19527
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19513
19528
|
variables,
|
|
19514
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19529
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19515
19530
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19516
19531
|
})
|
|
19517
19532
|
.pipe(map(({ data, total }) => {
|
|
@@ -19547,7 +19562,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19547
19562
|
const { data, total } = yield this.graphql.query({
|
|
19548
19563
|
query,
|
|
19549
19564
|
variables,
|
|
19550
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19565
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19551
19566
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19552
19567
|
});
|
|
19553
19568
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19586,7 +19601,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19586
19601
|
variables: {
|
|
19587
19602
|
filter: filter && filter.asPodObject()
|
|
19588
19603
|
},
|
|
19589
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19604
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19590
19605
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19591
19606
|
});
|
|
19592
19607
|
return res.total;
|
|
@@ -19619,7 +19634,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19619
19634
|
variables: {
|
|
19620
19635
|
data: json
|
|
19621
19636
|
},
|
|
19622
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19637
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19623
19638
|
update: (proxy, { data }) => {
|
|
19624
19639
|
const savedEntities = data && data.data;
|
|
19625
19640
|
if (savedEntities) {
|
|
@@ -19675,7 +19690,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19675
19690
|
variables: {
|
|
19676
19691
|
data: json
|
|
19677
19692
|
},
|
|
19678
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19693
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19679
19694
|
update: (cache, { data }) => {
|
|
19680
19695
|
// Update entity
|
|
19681
19696
|
const savedEntity = data && data.data;
|
|
@@ -19723,7 +19738,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19723
19738
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19724
19739
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19725
19740
|
variables: { ids },
|
|
19726
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19741
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19727
19742
|
update: (cache, res) => {
|
|
19728
19743
|
// Remove from cache
|
|
19729
19744
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19764,7 +19779,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19764
19779
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19765
19780
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19766
19781
|
variables: { id },
|
|
19767
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19782
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19768
19783
|
update: (proxy, res) => {
|
|
19769
19784
|
// Remove from cache
|
|
19770
19785
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19797,7 +19812,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19797
19812
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19798
19813
|
variables,
|
|
19799
19814
|
error: {
|
|
19800
|
-
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19815
|
+
code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
|
|
19801
19816
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19802
19817
|
}
|
|
19803
19818
|
})
|
|
@@ -19972,7 +19987,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
19972
19987
|
if (this._debug)
|
|
19973
19988
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
19974
19989
|
// Stop with an error
|
|
19975
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
19990
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
19976
19991
|
}
|
|
19977
19992
|
this._editingRowCount = 0;
|
|
19978
19993
|
let data;
|
|
@@ -20043,12 +20058,10 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
20043
20058
|
this._stopWatching$.next();
|
|
20044
20059
|
}
|
|
20045
20060
|
waitIdle(debounceTimeMs) {
|
|
20046
|
-
return
|
|
20047
|
-
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
));
|
|
20051
|
-
});
|
|
20061
|
+
return firstFalsePromise(this.loadingSubject
|
|
20062
|
+
.asObservable()
|
|
20063
|
+
.pipe(debounceTime(debounceTimeMs || 100) // if not started yet, wait
|
|
20064
|
+
));
|
|
20052
20065
|
}
|
|
20053
20066
|
confirmCreate(row) {
|
|
20054
20067
|
if (!super.confirmCreate(row))
|
|
@@ -20683,7 +20696,7 @@ class AppTable {
|
|
|
20683
20696
|
if (previousRow && (previousRow.id === -1) && ((_a = previousRow.validator) === null || _a === void 0 ? void 0 : _a.invalid) && !((_b = previousRow.validator) === null || _b === void 0 ? void 0 : _b.dirty)) {
|
|
20684
20697
|
this.deleteNewRow(event, previousRow);
|
|
20685
20698
|
// Wait deletion is done, then edit previous row (by id, because of reloading)
|
|
20686
|
-
|
|
20699
|
+
this.waitIdle()
|
|
20687
20700
|
.then(() => this.editRowById(event, row.id, { focusColumn: this.lastUserColumn }));
|
|
20688
20701
|
return true;
|
|
20689
20702
|
}
|
|
@@ -20796,14 +20809,14 @@ class AppTable {
|
|
|
20796
20809
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20797
20810
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20798
20811
|
if (this.readOnly) {
|
|
20799
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20812
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20800
20813
|
}
|
|
20801
20814
|
this.resetError();
|
|
20802
20815
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20803
20816
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20804
20817
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20805
20818
|
if (!this.confirmEditCreate()) {
|
|
20806
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20819
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20807
20820
|
}
|
|
20808
20821
|
// Mark as saving
|
|
20809
20822
|
this.markAsSaving();
|
|
@@ -20919,7 +20932,7 @@ class AppTable {
|
|
|
20919
20932
|
deleteRows(event, rows, opts) {
|
|
20920
20933
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20921
20934
|
if (this.readOnly) {
|
|
20922
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20935
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20923
20936
|
}
|
|
20924
20937
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
20925
20938
|
return 0; // SKip
|
|
@@ -20970,30 +20983,34 @@ class AppTable {
|
|
|
20970
20983
|
});
|
|
20971
20984
|
}
|
|
20972
20985
|
selectRowById(id) {
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20986
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20987
|
+
if (id === undefined)
|
|
20988
|
+
return false;
|
|
20989
|
+
yield this.waitIdle();
|
|
20990
|
+
const row = this.dataSource.getRow(id);
|
|
20991
|
+
return this.clickRow(null, row);
|
|
20992
|
+
});
|
|
20978
20993
|
}
|
|
20979
20994
|
/**
|
|
20980
20995
|
* Try to select row by data. Will use dataEquals() (that call EntityUtils.equals()) to find same row's data
|
|
20981
20996
|
* @param data
|
|
20982
20997
|
*/
|
|
20983
20998
|
selectRowByData(data) {
|
|
20984
|
-
|
|
20985
|
-
|
|
20986
|
-
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
20999
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21000
|
+
if (data === undefined)
|
|
21001
|
+
return Promise.resolve(false);
|
|
21002
|
+
yield this.waitIdle();
|
|
21003
|
+
const row = ((yield this.dataSource.getRows()) || [])
|
|
21004
|
+
.find(row => this.equals(row.currentData, data));
|
|
21005
|
+
return row && this.clickRow(null, row);
|
|
21006
|
+
});
|
|
20990
21007
|
}
|
|
20991
21008
|
clickRow(event, row) {
|
|
20992
21009
|
if (this.loading) {
|
|
20993
21010
|
// Wait while loading, and loop
|
|
20994
21011
|
if (this.debug)
|
|
20995
21012
|
console.debug("[table] Waiting before apply clickRow() (datasource is busy)...");
|
|
20996
|
-
|
|
21013
|
+
this.waitIdle().then(() => this.clickRow(event, row));
|
|
20997
21014
|
return false;
|
|
20998
21015
|
}
|
|
20999
21016
|
// DEBUG
|
|
@@ -21019,6 +21036,9 @@ class AppTable {
|
|
|
21019
21036
|
moveRow(id, direction) {
|
|
21020
21037
|
this.dataSource.move(id, direction);
|
|
21021
21038
|
}
|
|
21039
|
+
waitIdle() {
|
|
21040
|
+
return firstFalsePromise(this.loadingSubject);
|
|
21041
|
+
}
|
|
21022
21042
|
openSelectColumnsModal(event) {
|
|
21023
21043
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21024
21044
|
// Copy current columns (deep copy)
|
|
@@ -21051,7 +21071,7 @@ class AppTable {
|
|
|
21051
21071
|
// When target wait for a complete (e.g. IonRefresher)
|
|
21052
21072
|
if ((event === null || event === void 0 ? void 0 : event.target) && event.target.complete) {
|
|
21053
21073
|
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
21054
|
-
yield
|
|
21074
|
+
yield this.waitIdle();
|
|
21055
21075
|
event.target.complete();
|
|
21056
21076
|
}));
|
|
21057
21077
|
}
|
|
@@ -22323,7 +22343,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22323
22343
|
try {
|
|
22324
22344
|
const data = yield this.dataService.load(id, opts);
|
|
22325
22345
|
if (!data)
|
|
22326
|
-
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22346
|
+
throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22327
22347
|
this._usageMode = this.computeUsageMode(data);
|
|
22328
22348
|
yield this.onEntityLoaded(data, opts);
|
|
22329
22349
|
yield this.updateView(data, opts);
|
|
@@ -22367,7 +22387,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22367
22387
|
const idChanged = isNotNil(data.id)
|
|
22368
22388
|
&& this.previousDataId !== undefined // Ignore if first loading (=undefined)
|
|
22369
22389
|
&& this.previousDataId !== data.id;
|
|
22370
|
-
opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading, openTabIndex: this._autoOpenNextTab && idChanged &&
|
|
22390
|
+
opts = Object.assign({ updateRoute: this._autoUpdateRoute && idChanged && !this.loading, openTabIndex: this._autoOpenNextTab && idChanged && this.computeNextTabIndex() }, opts);
|
|
22371
22391
|
this.data = data;
|
|
22372
22392
|
this.previousDataId = data.id || null;
|
|
22373
22393
|
const promiseOrVoid = this.setValue(data);
|
|
@@ -22623,6 +22643,9 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22623
22643
|
this.error = userMessage;
|
|
22624
22644
|
}
|
|
22625
22645
|
/* -- protected methods -- */
|
|
22646
|
+
computeNextTabIndex() {
|
|
22647
|
+
return this.selectedTabIndex + 1 < this.tabCount ? this.selectedTabIndex + 1 : undefined;
|
|
22648
|
+
}
|
|
22626
22649
|
unload() {
|
|
22627
22650
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22628
22651
|
this.form.reset();
|
|
@@ -23216,7 +23239,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23216
23239
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23217
23240
|
}
|
|
23218
23241
|
}
|
|
23219
|
-
UserEventService.ɵprov =
|
|
23242
|
+
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" });
|
|
23220
23243
|
UserEventService.decorators = [
|
|
23221
23244
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23222
23245
|
];
|
|
@@ -23601,7 +23624,7 @@ class PersonService extends BaseEntityService {
|
|
|
23601
23624
|
return target;
|
|
23602
23625
|
}
|
|
23603
23626
|
}
|
|
23604
|
-
PersonService.ɵprov =
|
|
23627
|
+
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" });
|
|
23605
23628
|
PersonService.decorators = [
|
|
23606
23629
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23607
23630
|
];
|
|
@@ -23632,7 +23655,7 @@ class PersonValidatorService {
|
|
|
23632
23655
|
return this.formBuilder.group(formConfig);
|
|
23633
23656
|
}
|
|
23634
23657
|
}
|
|
23635
|
-
PersonValidatorService.ɵprov =
|
|
23658
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23636
23659
|
PersonValidatorService.decorators = [
|
|
23637
23660
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23638
23661
|
];
|
|
@@ -23838,16 +23861,16 @@ AdminModule.decorators = [
|
|
|
23838
23861
|
];
|
|
23839
23862
|
AdminModule.ctorParameters = () => [];
|
|
23840
23863
|
|
|
23841
|
-
const ɵ0
|
|
23864
|
+
const ɵ0 = {
|
|
23842
23865
|
profile: 'ADMIN'
|
|
23843
23866
|
};
|
|
23844
|
-
const routes
|
|
23867
|
+
const routes = [
|
|
23845
23868
|
{
|
|
23846
23869
|
path: 'users',
|
|
23847
23870
|
pathMatch: 'full',
|
|
23848
23871
|
component: UsersPage,
|
|
23849
23872
|
canActivate: [AuthGuardService],
|
|
23850
|
-
data: ɵ0
|
|
23873
|
+
data: ɵ0
|
|
23851
23874
|
}
|
|
23852
23875
|
];
|
|
23853
23876
|
class AdminRoutingModule {
|
|
@@ -23857,13 +23880,13 @@ AdminRoutingModule.decorators = [
|
|
|
23857
23880
|
imports: [
|
|
23858
23881
|
SharedRoutingModule,
|
|
23859
23882
|
AdminModule,
|
|
23860
|
-
RouterModule.forChild(routes
|
|
23883
|
+
RouterModule.forChild(routes)
|
|
23861
23884
|
],
|
|
23862
23885
|
exports: [RouterModule]
|
|
23863
23886
|
},] }
|
|
23864
23887
|
];
|
|
23865
23888
|
|
|
23866
|
-
const ErrorCodes
|
|
23889
|
+
const ErrorCodes = {
|
|
23867
23890
|
LOAD_PERSONS_ERROR: 100,
|
|
23868
23891
|
SAVE_PERSONS_ERROR: 101,
|
|
23869
23892
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -23875,5 +23898,5 @@ const ErrorCodes$2 = {
|
|
|
23875
23898
|
* Generated bundle index. Do not edit.
|
|
23876
23899
|
*/
|
|
23877
23900
|
|
|
23878
|
-
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
|
|
23901
|
+
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken, FormErrorAdapter, FormErrorTranslatePipe, 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, isFocusableElement as ɵc, RegisterForm as ɵd, AccountValidatorService as ɵe, RegisterModal as ɵf, UserSettingsValidatorService as ɵg, LocalSettingsValidatorService as ɵh };
|
|
23879
23902
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|