@sumaris-net/ngx-components 0.26.5 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sumaris-net.ngx-components.umd.js +435 -405
- 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 +2 -3
- package/esm2015/src/app/core/form/form-buttons-bar.component.js +2 -1
- package/esm2015/src/app/core/form/form.class.js +1 -1
- package/esm2015/src/app/core/graphql/graphql.service.js +1 -2
- package/esm2015/src/app/core/services/config.service.js +1 -1
- package/esm2015/src/app/core/services/platform.service.js +65 -84
- package/esm2015/src/app/shared/help/help.modal.js +1 -1
- package/esm2015/src/app/shared/material/autocomplete/material.autocomplete.js +2 -2
- package/esm2015/src/app/shared/material/badge/badge-icon.directive.js +2 -2
- package/esm2015/src/app/shared/pipes/form.pipes.js +1 -1
- package/esm2015/src/app/shared/services/startable-service.class.js +12 -5
- package/esm2015/src/app/shared/toolbar/modal-toolbar.js +6 -1
- package/fesm2015/sumaris-net.ngx-components.js +351 -346
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +2 -2
- package/src/app/core/services/platform.service.d.ts +3 -15
- package/src/app/shared/help/help.modal.d.ts +7 -1
- package/src/app/shared/services/startable-service.class.d.ts +2 -1
- 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
|
-
import { filter, first, map, takeUntil, startWith, debounceTime, takeWhile, switchMap, tap, distinctUntilChanged, mergeMap, catchError, throttleTime } from 'rxjs/operators';
|
|
40
|
+
import { filter, first, map, takeUntil, startWith, debounceTime, takeWhile, switchMap, tap, distinctUntilChanged, mergeMap, catchError, throttleTime, skip } from 'rxjs/operators';
|
|
41
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
36
42
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
|
+
import * as i1$4 from '@ionic/angular';
|
|
37
44
|
import { IonicModule, Platform, IonRouterOutlet, ModalController, IonicSafeString, createAnimation, ToastController, AlertController, IonicRouteStrategy, NavParams, MenuController, IonContent } from '@ionic/angular';
|
|
38
45
|
import * as momentImported from 'moment';
|
|
39
46
|
import { isMoment } from 'moment';
|
|
47
|
+
import * as i1 from '@angular/material-moment-adapter';
|
|
40
48
|
import { MomentDateAdapter, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
41
49
|
import { Keyboard } from '@ionic-native/keyboard/ngx';
|
|
42
50
|
import { TextMaskModule } from 'angular2-text-mask';
|
|
@@ -46,32 +54,38 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
46
54
|
import { MatDividerModule } from '@angular/material/divider';
|
|
47
55
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
48
56
|
import { MatChipsModule } from '@angular/material/chips';
|
|
57
|
+
import * as i3$3 from '@angular/router';
|
|
49
58
|
import { Router, RouterModule, RouteReuseStrategy, ActivatedRoute } from '@angular/router';
|
|
59
|
+
import * as i1$5 from '@angular/platform-browser';
|
|
50
60
|
import { HammerGestureConfig, EventManager } from '@angular/platform-browser';
|
|
61
|
+
import * as i2$2 from '@angular/common/http';
|
|
51
62
|
import { HttpResponse, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
52
63
|
import { ColorPickerModule } from 'ngx-color-picker';
|
|
53
|
-
import { NativeAudio
|
|
54
|
-
import { Vibration
|
|
64
|
+
import { NativeAudio } from '@ionic-native/native-audio/ngx';
|
|
65
|
+
import { Vibration } from '@ionic-native/vibration/ngx';
|
|
55
66
|
import { AudioManagement } from '@ionic-native/audio-management/ngx';
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
67
|
+
import * as i2 from '@ionic-native/native-audio/ngx/index';
|
|
68
|
+
import * as i3 from '@ionic-native/vibration/ngx/index';
|
|
69
|
+
import * as i4 from '@ionic-native/audio-management/ngx/index';
|
|
59
70
|
import * as uuidv4Imported from 'uuid/v4';
|
|
60
71
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
61
72
|
import { MarkdownModule } from 'ngx-markdown';
|
|
62
73
|
import { sign, box, hash, verify } from 'tweetnacl';
|
|
74
|
+
import * as i3$1 from '@ionic/storage';
|
|
63
75
|
import { Storage, IonicStorageModule } from '@ionic/storage';
|
|
64
76
|
import 'zone.js/dist/zone-error';
|
|
65
|
-
import { SplashScreen
|
|
66
|
-
import { Connection, Network
|
|
67
|
-
import { CacheService
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import { StatusBar
|
|
77
|
+
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
|
|
78
|
+
import { Connection, Network } from '@ionic-native/network/ngx';
|
|
79
|
+
import { CacheService, CacheModule } from 'ionic-cache';
|
|
80
|
+
import * as i6 from 'ionic-cache/dist/cache.service';
|
|
81
|
+
import * as i9 from '@ionic-native/network/ngx/index';
|
|
82
|
+
import * as i10 from '@ionic-native/splash-screen/ngx/index';
|
|
83
|
+
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
|
84
|
+
import * as i2$4 from '@angular/cdk/platform';
|
|
72
85
|
import { Platform as Platform$1 } from '@angular/cdk/platform';
|
|
73
|
-
import { InAppBrowser
|
|
86
|
+
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
|
74
87
|
import { ApolloLink, NetworkStatus, InMemoryCache, ApolloClient, gql } from '@apollo/client/core';
|
|
88
|
+
import * as i2$3 from 'apollo-angular';
|
|
75
89
|
import { Apollo } from 'apollo-angular';
|
|
76
90
|
import { WebSocketLink } from '@apollo/client/link/ws';
|
|
77
91
|
import { getMainDefinition } from '@apollo/client/utilities';
|
|
@@ -79,13 +93,14 @@ import { RetryLink } from '@apollo/client/link/retry';
|
|
|
79
93
|
import QueueLink from 'apollo-link-queue';
|
|
80
94
|
import SerializingLink from 'apollo-link-serialize';
|
|
81
95
|
import loggerLink from 'apollo-link-logger';
|
|
96
|
+
import * as i3$2 from 'apollo-angular/http';
|
|
82
97
|
import { HttpLink } from 'apollo-angular/http';
|
|
83
98
|
import { IonicStorageWrapper, persistCache } from 'apollo3-cache-persist';
|
|
84
|
-
import { NotificationVisibility, Downloader
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
99
|
+
import { NotificationVisibility, Downloader } from '@ionic-native/downloader/ngx';
|
|
100
|
+
import * as i14 from '@ionic-native/status-bar/ngx/index';
|
|
101
|
+
import * as i15 from '@ionic-native/keyboard/ngx/index';
|
|
102
|
+
import * as i17 from '@ionic-native/in-app-browser/ngx/index';
|
|
103
|
+
import * as i18 from '@ionic-native/downloader/ngx/index';
|
|
89
104
|
import { ValidatorService, TableDataSource } from '@e-is/ngx-material-table';
|
|
90
105
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
91
106
|
import { NgxJdenticonModule } from 'ngx-jdenticon';
|
|
@@ -870,19 +885,19 @@ class MatAutocompleteConfigHolder {
|
|
|
870
885
|
return this.fields[fieldName] || this.add(fieldName);
|
|
871
886
|
}
|
|
872
887
|
}
|
|
873
|
-
const DEFAULT_VALUE_ACCESSOR = {
|
|
888
|
+
const DEFAULT_VALUE_ACCESSOR$6 = {
|
|
874
889
|
provide: NG_VALUE_ACCESSOR,
|
|
875
890
|
useExisting: forwardRef(() => MatAutocompleteField),
|
|
876
891
|
multi: true
|
|
877
892
|
};
|
|
878
|
-
const noop = () => { };
|
|
879
|
-
const ɵ0 = noop;
|
|
893
|
+
const noop$7 = () => { };
|
|
894
|
+
const ɵ0$a = noop$7;
|
|
880
895
|
class MatAutocompleteField {
|
|
881
896
|
constructor(cd, formGroupDir) {
|
|
882
897
|
this.cd = cd;
|
|
883
898
|
this.formGroupDir = formGroupDir;
|
|
884
|
-
this._onChangeCallback = noop;
|
|
885
|
-
this._onTouchedCallback = noop;
|
|
899
|
+
this._onChangeCallback = noop$7;
|
|
900
|
+
this._onTouchedCallback = noop$7;
|
|
886
901
|
this._subscription = new Subscription();
|
|
887
902
|
this._filter$ = new BehaviorSubject(undefined);
|
|
888
903
|
this._reload$ = new Subject();
|
|
@@ -1475,8 +1490,8 @@ MatAutocompleteField.decorators = [
|
|
|
1475
1490
|
{ type: Component, args: [{
|
|
1476
1491
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1477
1492
|
selector: 'mat-autocomplete-field',
|
|
1478
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- readonly -->\n <ng-container>\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n [compareWith]=\"compareWith\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as isLast\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"filterInputTextFocusInEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.opened && onDropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [class.cdk-visually-hidden]=\"!searchable\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count \" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"onDropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
1479
|
-
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
1493
|
+
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- readonly -->\n <ng-container>\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n [compareWith]=\"compareWith\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as isLast\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"filterInputTextFocusInEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.opened && onDropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [class.cdk-visually-hidden]=\"!searchable\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count \" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"onDropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
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
|
}
|
|
@@ -3512,7 +3527,7 @@ class FormErrorTranslator {
|
|
|
3512
3527
|
return errorKey;
|
|
3513
3528
|
}
|
|
3514
3529
|
}
|
|
3515
|
-
FormErrorTranslator.ɵprov =
|
|
3530
|
+
FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1$1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
3516
3531
|
FormErrorTranslator.decorators = [
|
|
3517
3532
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3518
3533
|
];
|
|
@@ -3781,9 +3796,9 @@ function parseDuration(input, maxDecimals, placeholderChar) {
|
|
|
3781
3796
|
const hour = parseInt(durationParts[0] || '0');
|
|
3782
3797
|
const minute = parseInt(durationParts[1] || '0');
|
|
3783
3798
|
const value = hour + (minute + 0.5) / 60;
|
|
3784
|
-
return roundFloat
|
|
3799
|
+
return roundFloat(value, maxDecimals);
|
|
3785
3800
|
}
|
|
3786
|
-
function roundFloat
|
|
3801
|
+
function roundFloat(input, maxDecimals) {
|
|
3787
3802
|
if (maxDecimals > 0) {
|
|
3788
3803
|
const powDecimal = Math.pow(10, maxDecimals);
|
|
3789
3804
|
return Math.trunc(input * powDecimal + 0.5) / powDecimal;
|
|
@@ -3807,9 +3822,9 @@ const MASKS = {
|
|
|
3807
3822
|
DD: [/[+-]/, /\d/, /\d/, /\d/, '.', /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, /\d/, '°']
|
|
3808
3823
|
}
|
|
3809
3824
|
};
|
|
3810
|
-
const noop$
|
|
3825
|
+
const noop$6 = () => {
|
|
3811
3826
|
};
|
|
3812
|
-
const ɵ0$
|
|
3827
|
+
const ɵ0$9 = noop$6;
|
|
3813
3828
|
class MatLatLongField {
|
|
3814
3829
|
constructor(platform, translate, formBuilder, cd, formGroupDir) {
|
|
3815
3830
|
this.platform = platform;
|
|
@@ -3817,8 +3832,8 @@ class MatLatLongField {
|
|
|
3817
3832
|
this.formBuilder = formBuilder;
|
|
3818
3833
|
this.cd = cd;
|
|
3819
3834
|
this.formGroupDir = formGroupDir;
|
|
3820
|
-
this._onChangeCallback = noop$
|
|
3821
|
-
this._onTouchedCallback = noop$
|
|
3835
|
+
this._onChangeCallback = noop$6;
|
|
3836
|
+
this._onTouchedCallback = noop$6;
|
|
3822
3837
|
this._subscription = new Subscription();
|
|
3823
3838
|
this.disabling = false;
|
|
3824
3839
|
this.writing = false;
|
|
@@ -4154,14 +4169,14 @@ SharedMatLatLongModule.decorators = [
|
|
|
4154
4169
|
},] }
|
|
4155
4170
|
];
|
|
4156
4171
|
|
|
4157
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4172
|
+
const DEFAULT_VALUE_ACCESSOR$5 = {
|
|
4158
4173
|
provide: NG_VALUE_ACCESSOR,
|
|
4159
4174
|
useExisting: forwardRef(() => MatDate),
|
|
4160
4175
|
multi: true
|
|
4161
4176
|
};
|
|
4162
|
-
const DAY_MASK = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4163
|
-
const noop$
|
|
4164
|
-
const ɵ0$
|
|
4177
|
+
const DAY_MASK$2 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4178
|
+
const noop$5 = () => { };
|
|
4179
|
+
const ɵ0$8 = noop$5;
|
|
4165
4180
|
class MatDate {
|
|
4166
4181
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4167
4182
|
this.dateAdapter = dateAdapter;
|
|
@@ -4170,12 +4185,12 @@ class MatDate {
|
|
|
4170
4185
|
this.cd = cd;
|
|
4171
4186
|
this.keyboard = keyboard;
|
|
4172
4187
|
this.formGroupDir = formGroupDir;
|
|
4173
|
-
this._onChangeCallback = noop$
|
|
4174
|
-
this._onTouchedCallback = noop$
|
|
4188
|
+
this._onChangeCallback = noop$5;
|
|
4189
|
+
this._onTouchedCallback = noop$5;
|
|
4175
4190
|
this._subscription = new Subscription();
|
|
4176
4191
|
this.writing = true;
|
|
4177
4192
|
this.disabling = false;
|
|
4178
|
-
this.dayMask = DAY_MASK;
|
|
4193
|
+
this.dayMask = DAY_MASK$2;
|
|
4179
4194
|
this.disabled = false;
|
|
4180
4195
|
this.floatLabel = 'auto';
|
|
4181
4196
|
this.readonly = false;
|
|
@@ -4412,7 +4427,7 @@ MatDate.decorators = [
|
|
|
4412
4427
|
selector: 'mat-date-field',
|
|
4413
4428
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dayControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dayControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n\n <!-- Hide the final control -->\n <input matInput type=\"text\"\n [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n (click)=\"openDatePicker($event, datePicker)\"\n [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"writeValue(null)\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('validDate')\" translate>ERROR.FIELD_NOT_VALID_DATE</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateIsAfter')\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('dateRange')\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMaxDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngIf=\"!formControl.hasError('dateRange') && formControl.hasError('dateMinDuration')\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngIf=\"formControl.hasError('msg')\">{{formControl.errors.msg}}</mat-error>\n </mat-form-field>\n\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n\n <ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n </ng-template>\n\n <ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n </ng-template>\n\n</ng-template>\n\n",
|
|
4414
4429
|
providers: [
|
|
4415
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4430
|
+
DEFAULT_VALUE_ACCESSOR$5,
|
|
4416
4431
|
],
|
|
4417
4432
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4418
4433
|
styles: [":host{display:inline-block;width:100%;position:relative}:host [no-padding]{--ion-grid-column-padding:0}:host [nowrap]{flex-wrap:nowrap}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md,mat-form-field ion-datetime{padding:0!important}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
|
|
@@ -4445,17 +4460,17 @@ MatDate.propDecorators = {
|
|
|
4445
4460
|
matInputs: [{ type: ViewChildren, args: ['matInput',] }]
|
|
4446
4461
|
};
|
|
4447
4462
|
|
|
4448
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
4463
|
+
const DEFAULT_VALUE_ACCESSOR$4 = {
|
|
4449
4464
|
provide: NG_VALUE_ACCESSOR,
|
|
4450
4465
|
useExisting: forwardRef(() => MatDateTime),
|
|
4451
4466
|
multi: true
|
|
4452
4467
|
};
|
|
4453
4468
|
const DAY_MASK$1 = [/\d/, /\d/, '/', /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/];
|
|
4454
4469
|
const HOUR_REGEXP = /^[012][0-9][:][012345][0-9]$/;
|
|
4455
|
-
const HOUR_MASK = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4456
|
-
const noop$
|
|
4470
|
+
const HOUR_MASK$1 = [/[012]/, /\d/, ':', /[012345]/, /\d/];
|
|
4471
|
+
const noop$4 = () => {
|
|
4457
4472
|
};
|
|
4458
|
-
const ɵ0$
|
|
4473
|
+
const ɵ0$7 = noop$4;
|
|
4459
4474
|
class MatDateTime {
|
|
4460
4475
|
constructor(platform, dateAdapter, translate, formBuilder, keyboard, cd, formGroupDir) {
|
|
4461
4476
|
this.platform = platform;
|
|
@@ -4465,14 +4480,14 @@ class MatDateTime {
|
|
|
4465
4480
|
this.keyboard = keyboard;
|
|
4466
4481
|
this.cd = cd;
|
|
4467
4482
|
this.formGroupDir = formGroupDir;
|
|
4468
|
-
this._onChangeCallback = noop$
|
|
4469
|
-
this._onTouchedCallback = noop$
|
|
4483
|
+
this._onChangeCallback = noop$4;
|
|
4484
|
+
this._onTouchedCallback = noop$4;
|
|
4470
4485
|
this._subscription = new Subscription();
|
|
4471
4486
|
this.writing = true;
|
|
4472
4487
|
this.disabling = false;
|
|
4473
4488
|
this._readonly = false;
|
|
4474
4489
|
this.dayMask = DAY_MASK$1;
|
|
4475
|
-
this.hourMask = HOUR_MASK;
|
|
4490
|
+
this.hourMask = HOUR_MASK$1;
|
|
4476
4491
|
this.floatLabel = 'auto';
|
|
4477
4492
|
this.compact = false;
|
|
4478
4493
|
this.placeholderChar = DEFAULT_PLACEHOLDER_CHAR;
|
|
@@ -4783,7 +4798,7 @@ MatDateTime.decorators = [
|
|
|
4783
4798
|
selector: 'mat-date-time-field',
|
|
4784
4799
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput hidden type=\"text\"\n readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{formControl.value|dateFormat: {pattern: displayPattern} }}</ion-text>\n</mat-form-field>\n\n<!-- writable + time -->\n<ng-template #writable >\n <ion-grid class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding no-wrap\" nowrap>\n\n <!-- day -->\n <ion-col class=\"day ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n\n <mat-label>{{placeholder}}</mat-label>\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"dateFormControl\"\n [textMask]=\"{mask: dayMask, keepCharPositions: true, placeholderChar: placeholderChar}\"\n [placeholder]=\"'COMMON.DATE_PLACEHOLDER'|translate\"\n (blur)=\"checkIfTouched()\"\n (keyup.arrowdown)=\"openDatePicker($event, datePicker)\"\n (keyup.escape)=\"preventEvent($event)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [appAutofocus]=\"autofocus\">\n <input matInput #matInput autocomplete=\"off\" type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"dateFormControl\"\n (click)=\"openDatePickerIfMobile($event, datePicker)\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n readonly>\n <input matInput type=\"text\" [formControl]=\"formControl\"\n hidden\n [matDatepicker]=\"datePicker\"\n (dateChange)=\"onDatePickerChange($event)\">\n\n <button type=\"button\" mat-icon-button tabindex=\"-1\" matSuffix #datePickerButton2 (click)=\"openDatePicker($event, datePicker)\" [disabled]=\"formControl.disabled\">\n <div *ngIf=\"mobile; then iconDate; else iconDesktop\"></div>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clear()\"\n [hidden]=\"formControl.disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-datepicker #datePicker\n [touchUi]=\"mobile\"\n [disabled]=\"formControl.disabled\"\n [startAt]=\"startDate\"></mat-datepicker>\n <div class=\"mat-form-field-subscript mat-form-field-subscript-wrapper\" >\n <!-- errors -->\n <ng-container [ngSwitch]=\"formControl.touched && formControl.errors|mapKeys|arrayFirst\">\n <mat-error *ngSwitchCase=\"'required'\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngSwitchCase=\"'validDate'\" translate>ERROR.FIELD_NOT_VALID_DATE_TIME</mat-error>\n <mat-error *ngSwitchCase=\"'dateIsAfter'\">{{'ERROR.FIELD_NOT_VALID_DATE_AFTER' | translate: formControl.errors.dateIsAfter }}</mat-error>\n <mat-error *ngSwitchCase=\"'dateRange'\" translate>ERROR.FIELD_NOT_VALID_DATE_RANGE</mat-error>\n <mat-error *ngSwitchCase=\"'dateMaxDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MAX_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'dateMinDuration'\" translate>ERROR.FIELD_NOT_VALID_DATE_MIN_DURATION</mat-error>\n <mat-error *ngSwitchCase=\"'msg'\">{{(formControl.errors.msg?.key || formControl.errors.msg) | translate: formControl.errors.msg?.params}}</mat-error>\n </ng-container>\n <ng-content select=\"mat-error\"></ng-content>\n\n <!-- mat hint -->\n <div class=\"mat-form-field-hint-wrapper\" [class.cdk-visually-hidden]=\"formControl.invalid\">\n <div class=\"mat-form-field-hint-spacer\"></div>\n <ng-content select=\"mat-hint\"></ng-content>\n </div>\n </div>\n\n </ion-col>\n\n <!-- hour -->\n <ion-col class=\"hour ion-no-padding\">\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-invalid]=\"formControl.touched && (timeFormControl.invalid || formControl.invalid)\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n <input matInput #matInput type=\"text\"\n *ngIf=\"!mobile\"\n [formControl]=\"timeFormControl\"\n autocomplete=\"off\"\n min=\"0\" max=\"23\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.TIME_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keyup.arrowdown)=\"openTimePicker($event)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n <input matInput #matInput type=\"text\"\n *ngIf=\"mobile\"\n [formControl]=\"timeFormControl\"\n (click)=\"openTimePickerIfMobile($event)\"\n readonly>\n\n <input matInput type=\"text\"\n [formControl]=\"timeFormControl\"\n hidden\n [ngxTimepicker]=\"timePicker\"\n [format]=\"24\">\n\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && !mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePicker($event)\" >\n <mat-icon>keyboard_arrow_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button\n tabindex=\"-1\"\n *ngIf=\"!compact && mobile\"\n [disabled]=\"formControl.disabled\"\n (click)=\"openTimePickerIfMobile($event)\">\n <mat-icon>access_time</mat-icon>\n </button>\n\n <ngx-material-timepicker #timePicker [@.disabled]=\"true\"\n (timeSet)=\"onTimePickerChange($event)\"\n [ESC]=\"!mobile\"\n [defaultTime]=\"'00:00'\"\n [cancelBtnTmpl]=\"timePickerCancelButton\"\n [confirmBtnTmpl]=\"timePickerOkButton\"\n [preventOverlayClick]=\"mobile\"\n [enableKeyboardInput]=\"false\"\n [disableAnimation]=\"true\">\n <!-- cancel button -->\n <ng-template #timePickerCancelButton>\n <ion-button fill=\"clear\" color=\"dark\">\n <ion-label translate>COMMON.BTN_CANCEL</ion-label>\n </ion-button>\n </ng-template>\n\n <!-- confirm button -->\n <ng-template #timePickerOkButton>\n <ion-button fill=\"solid\" color=\"tertiary\">\n <ion-label translate>COMMON.BTN_VALIDATE</ion-label>\n </ion-button>\n </ng-template>\n\n </ngx-material-timepicker>\n </mat-form-field>\n </ion-col>\n </ion-row>\n </ion-grid>\n\n\n</ng-template>\n\n<ng-template #iconDesktop>\n <mat-icon>keyboard_arrow_down</mat-icon>\n</ng-template>\n\n<ng-template #iconDate>\n <mat-icon>date_range</mat-icon>\n</ng-template>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n",
|
|
4785
4800
|
providers: [
|
|
4786
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
4801
|
+
DEFAULT_VALUE_ACCESSOR$4,
|
|
4787
4802
|
],
|
|
4788
4803
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4789
4804
|
styles: [":host{display:inline-block;width:100%;position:relative;--ion-grid-column-padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}mat-form-field .datetime-md{padding:0!important}ion-row.no-wrap{flex-wrap:nowrap}ion-col.day{min-width:100px}ion-col.day .mat-form-field-subscript-wrapper{overflow:visible;right:-64px;width:calc(100% + 64px)}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}ion-col.day .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}ion-col.hour{min-width:55px;max-width:65px}ion-col.hour mat-form-field{width:100%}ion-col.hour mat-form-field input[type=text],ion-col.hour mat-form-field mat-label{text-align:left;min-width:50px}mat-form-field.mat-form-field-disabled ion-col.day{min-width:100px}.hour .mat-form-field-label{max-width:40px}.hour mat-form-field.mat-form-field-should-float .mat-form-field-placeholder{max-width:inherit}mat-error{text-align:right;width:100%}"]
|
|
@@ -4822,10 +4837,10 @@ const DEFAULT_VALUE_ACCESSOR$3 = {
|
|
|
4822
4837
|
useExisting: forwardRef(() => MatDateShort),
|
|
4823
4838
|
multi: true
|
|
4824
4839
|
};
|
|
4825
|
-
const DAY_MASK
|
|
4826
|
-
const noop$
|
|
4840
|
+
const DAY_MASK = [/\d/, /\d/, /\d/, /\d/];
|
|
4841
|
+
const noop$3 = () => {
|
|
4827
4842
|
};
|
|
4828
|
-
const ɵ0$
|
|
4843
|
+
const ɵ0$6 = noop$3;
|
|
4829
4844
|
class MatDateShort {
|
|
4830
4845
|
constructor(platform, dateAdapter, translate, formBuilder, cd, keyboard, formGroupDir) {
|
|
4831
4846
|
this.dateAdapter = dateAdapter;
|
|
@@ -4834,11 +4849,11 @@ class MatDateShort {
|
|
|
4834
4849
|
this.cd = cd;
|
|
4835
4850
|
this.keyboard = keyboard;
|
|
4836
4851
|
this.formGroupDir = formGroupDir;
|
|
4837
|
-
this._onChangeCallback = noop$
|
|
4838
|
-
this._onTouchedCallback = noop$
|
|
4852
|
+
this._onChangeCallback = noop$3;
|
|
4853
|
+
this._onTouchedCallback = noop$3;
|
|
4839
4854
|
this.writing = true;
|
|
4840
4855
|
this.disabling = false;
|
|
4841
|
-
this.dayMask = DAY_MASK
|
|
4856
|
+
this.dayMask = DAY_MASK;
|
|
4842
4857
|
this.disabled = false;
|
|
4843
4858
|
this.floatLabel = 'auto';
|
|
4844
4859
|
this.readonly = false;
|
|
@@ -5151,16 +5166,16 @@ SharedMatDateTimeModule.decorators = [
|
|
|
5151
5166
|
},] }
|
|
5152
5167
|
];
|
|
5153
5168
|
|
|
5154
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5169
|
+
const DEFAULT_VALUE_ACCESSOR$2 = {
|
|
5155
5170
|
provide: NG_VALUE_ACCESSOR,
|
|
5156
5171
|
useExisting: forwardRef(() => MatDuration),
|
|
5157
5172
|
multi: true
|
|
5158
5173
|
};
|
|
5159
5174
|
const HOUR_TIME_PATTERN = /[0-9]\d\d:[0-5]\d/;
|
|
5160
|
-
const HOUR_MASK
|
|
5161
|
-
const noop$
|
|
5175
|
+
const HOUR_MASK = [/\d/, /\d/, /\d/, ':', /[0-5]/, /\d/];
|
|
5176
|
+
const noop$2 = () => {
|
|
5162
5177
|
};
|
|
5163
|
-
const ɵ0$5 = noop$
|
|
5178
|
+
const ɵ0$5 = noop$2;
|
|
5164
5179
|
class MatDuration {
|
|
5165
5180
|
constructor(platform, dateAdapter, translate, formBuilder, cd, formGroupDir) {
|
|
5166
5181
|
this.dateAdapter = dateAdapter;
|
|
@@ -5169,11 +5184,11 @@ class MatDuration {
|
|
|
5169
5184
|
this.cd = cd;
|
|
5170
5185
|
this.formGroupDir = formGroupDir;
|
|
5171
5186
|
this._subscription = new Subscription();
|
|
5172
|
-
this._onChangeCallback = noop$
|
|
5173
|
-
this._onTouchedCallback = noop$
|
|
5187
|
+
this._onChangeCallback = noop$2;
|
|
5188
|
+
this._onTouchedCallback = noop$2;
|
|
5174
5189
|
this.writing = true;
|
|
5175
5190
|
this.disabling = false;
|
|
5176
|
-
this.hourMask = HOUR_MASK
|
|
5191
|
+
this.hourMask = HOUR_MASK;
|
|
5177
5192
|
this.disabled = false;
|
|
5178
5193
|
this.floatLabel = 'auto';
|
|
5179
5194
|
this.readonly = false;
|
|
@@ -5353,7 +5368,7 @@ MatDuration.decorators = [
|
|
|
5353
5368
|
selector: 'mat-duration-field',
|
|
5354
5369
|
template: "<!-- readonly -->\n<mat-form-field *ngIf=\"readonly else writable\">\n <input matInput hidden type=\"text\" readonly=\"true\" [formControl]=\"formControl\">\n <ion-text>{{ formControl.value|duration }}</ion-text>\n</mat-form-field>\n\n<!-- writable -->\n<ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"formControl.disabled\"\n [class.mat-form-field-invalid]=\"formControl.touched && formControl.invalid\">\n <mat-label *ngIf=\"placeholder && floatLabel != 'never'\" translate>COMMON.TIME</mat-label>\n\n <div matPrefix><ng-content select=\"[matPrefix]\"></ng-content></div>\n\n <input matInput #matInput type=\"text\"\n autocomplete=\"off\"\n [formControl]=\"textControl\"\n [textMask]=\"{mask: hourMask, keepCharPositions: true, placeholderChar: placeholderChar, guide: true}\"\n [placeholder]=\"'COMMON.DURATION_PLACEHOLDER'|translate\"\n [required]=\"required\"\n (keydown.tab)=\"moveCaretToSeparator($event, true)\"\n (keydown.shift.tab)=\"moveCaretToSeparator($event, false)\"\n (keyup.escape)=\"preventEvent($event)\"\n (blur)=\"checkIfTouched()\"\n [tabindex]=\"tabindex !== undefined ? tabindex+1 : undefined\">\n\n\n <!-- errors -->\n <mat-error *ngIf=\"!formControl.hasError('required') && textControl.hasError('pattern')\" translate>ERROR.FIELD_NOT_VALID_PATTERN</mat-error>\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('min')\">\n {{(compact ? 'ERROR.FIELD_MIN_COMPACT' : 'ERROR.FIELD_MIN') | translate:formControl.errors.min }}</mat-error>\n <mat-error *ngIf=\"formControl.hasError('max')\">\n {{(compact ? 'ERROR.FIELD_MAX_COMPACT' : 'ERROR.FIELD_MAX') | translate:formControl.errors.max }}</mat-error>\n\n <ng-content select=\"mat-error\"></ng-content>\n </mat-form-field>\n</ng-template>\n\n",
|
|
5355
5370
|
providers: [
|
|
5356
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5371
|
+
DEFAULT_VALUE_ACCESSOR$2,
|
|
5357
5372
|
],
|
|
5358
5373
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5359
5374
|
styles: [":host{display:inline-block;min-width:140px;position:relative;--ion-grid-column-padding:0}:host,mat-form-field{width:100%}mat-form-field .mat-form-field-subscript-wrapper{overflow:visible;top:100%}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper{display:flex}mat-form-field .mat-form-field-subscript-wrapper .mat-form-field-hint-wrapper .mat-form-field-hint-spacer{flex:1 0 1em}mat-error{text-align:right;width:100%}"]
|
|
@@ -5410,22 +5425,22 @@ SharedMatDurationModule.decorators = [
|
|
|
5410
5425
|
},] }
|
|
5411
5426
|
];
|
|
5412
5427
|
|
|
5413
|
-
const DEFAULT_VALUE_ACCESSOR$
|
|
5428
|
+
const DEFAULT_VALUE_ACCESSOR$1 = {
|
|
5414
5429
|
provide: NG_VALUE_ACCESSOR,
|
|
5415
5430
|
useExisting: forwardRef(() => MatBooleanField),
|
|
5416
5431
|
multi: true
|
|
5417
5432
|
};
|
|
5418
|
-
const noop$
|
|
5433
|
+
const noop$1 = () => {
|
|
5419
5434
|
};
|
|
5420
|
-
const ɵ0$
|
|
5435
|
+
const ɵ0$4 = noop$1;
|
|
5421
5436
|
class MatBooleanField {
|
|
5422
5437
|
constructor(translate, formBuilder, cd, formGroupDir) {
|
|
5423
5438
|
this.translate = translate;
|
|
5424
5439
|
this.formBuilder = formBuilder;
|
|
5425
5440
|
this.cd = cd;
|
|
5426
5441
|
this.formGroupDir = formGroupDir;
|
|
5427
|
-
this._onChangeCallback = noop$
|
|
5428
|
-
this._onTouchedCallback = noop$
|
|
5442
|
+
this._onChangeCallback = noop$1;
|
|
5443
|
+
this._onTouchedCallback = noop$1;
|
|
5429
5444
|
this._writing = false;
|
|
5430
5445
|
this.showRadio = false;
|
|
5431
5446
|
this.disabled = false;
|
|
@@ -5598,7 +5613,7 @@ MatBooleanField.decorators = [
|
|
|
5598
5613
|
selector: 'mat-boolean-field',
|
|
5599
5614
|
template: "<mat-form-field *ngIf=\"readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-form-field-disabled {{classList}}\">\n <input matInput hidden type=\"text\" readonly\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\">\n <ion-text>{{(formControl.value == null && 'COMMON.EMPTY_OPTION' || (formControl.value === true && yesLabel) || noLabel) | translate }}</ion-text>\n</mat-form-field>\n\n<ng-template #writable>\n <ng-container [ngSwitch]=\"style\">\n\n <!-- Radio -->\n <mat-form-field *ngSwitchCase=\"'radio'\"\n [floatLabel]=\"showRadio && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-radio {{classList}}\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n <span [hidden]=\"showRadio\">({{yesLabel|translate}}/{{'COMMON.NO'|translate}})</span>\n </mat-label>\n\n <input matInput #fakeInput type=\"text\" readonly=\"true\"\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <!-- radio button -->\n <mat-radio-group [hidden]=\"!showRadio\"\n [formControl]=\"formControl\"\n (change)=\"onRadioValueChanged($event)\">\n <mat-radio-button #yesButton [value]=\"true\">\n <span>{{yesLabel|translate}}</span>\n </mat-radio-button> \n <mat-radio-button #noButton [value]=\"false\">\n <span>{{noLabel|translate}}</span>\n </mat-radio-button>\n </mat-radio-group>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Checkbox -->\n <mat-form-field *ngSwitchCase=\"'checkbox'\"\n [floatLabel]=\"floatLabel\"\n class=\"mat-boolean-field mat-boolean-field-checkbox {{classList}}\">\n <mat-label *ngIf=\"placeholder && !showRadio\">\n {{placeholder}}\n </mat-label>\n\n <input matInput #matInput\n [formControl]=\"formControl\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showRadio\"\n [tabindex]=\"tabindex\">\n\n <ion-label> </ion-label>\n\n <!-- checkbox, when compact -->\n <mat-checkbox #checkboxButton\n [formControl]=\"formControl\"\n (change)=\"onCheckboxValueChanged($event)\"\n [indeterminate]=\"value===undefined\"\n [hidden]=\"!showRadio\"\n [tabindex]=\"tabindex\">\n </mat-checkbox>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n\n <!-- Buttons -->\n <mat-form-field *ngSwitchCase=\"'button'\"\n [floatLabel]=\"floatLabel === 'never' ? 'never' : 'always'\"\n class=\"mat-boolean-field mat-boolean-field-button {{classList}}\">\n <input matInput type=\"text\" hidden\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"required\">\n <div class=\"mat-form-field-buttons\"\n [style.--buttons-col-count]=\"buttonsColCount\"\n *ngIf=\"!formControl.disabled; else disabledLabel\">\n <!-- yes -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex\"\n (click)=\"writeValue(true, $event)\"\n (keyup.enter)=\"writeValue(true, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === true) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && yesIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{yesLabel|translate}}\n </ion-button>\n\n <!-- No button -->\n <ion-button class=\"mat-form-field-button\"\n [tabindex]=\"_tabindex !== undefined ? (_tabindex + 1) : undefined\"\n (click)=\"writeValue(false, $event)\"\n (keyup.enter)=\"writeValue(false, $event)\"\n [color]=\"_value == null ? 'tertiary' : (_value === false) ? 'accent' : 'light'\">\n <ion-icon *ngIf=\"showButtonIcons && noIcon; let icon\" slot=\"start\" [name]=\"icon\"></ion-icon>\n {{noLabel|translate}}\n </ion-button>\n </div>\n <ng-template #disabledLabel>\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ng-template>\n\n <div matSuffix #injectMatSuffix></div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n </mat-form-field>\n </ng-container>\n\n <div class=\"cdk-visually-hidden\">\n <div #suffix><ng-content select=\"[matSuffix]\"></ng-content></div>\n </div>\n\n</ng-template>\n\n\n",
|
|
5600
5615
|
providers: [
|
|
5601
|
-
DEFAULT_VALUE_ACCESSOR$
|
|
5616
|
+
DEFAULT_VALUE_ACCESSOR$1
|
|
5602
5617
|
],
|
|
5603
5618
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5604
5619
|
styles: [":host{width:100%}.mat-form-field.mat-boolean-field-radio{margin-top:-2px}.mat-form-field.mat-boolean-field-button{margin-top:-4px}.mat-form-field .mat-form-field-buttons{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}.mat-form-field .mat-form-field-buttons .mat-form-field-button{--flex-basis:calc(100% / var(--buttons-col-count, 2));flex:0 1 var(--flex-basis);max-width:min(var(--flex-basis),150px);white-space:normal;padding:0 2px;height:40px}"]
|
|
@@ -5846,7 +5861,7 @@ class MatNumpadDomService {
|
|
|
5846
5861
|
this.appRef.detachView(this.componentRef.hostView);
|
|
5847
5862
|
}
|
|
5848
5863
|
}
|
|
5849
|
-
MatNumpadDomService.ɵprov =
|
|
5864
|
+
MatNumpadDomService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatNumpadDomService_Factory() { return new MatNumpadDomService(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1$3.DOCUMENT, 8)); }, token: MatNumpadDomService, providedIn: "root" });
|
|
5850
5865
|
MatNumpadDomService.decorators = [
|
|
5851
5866
|
{ type: Injectable, args: [{
|
|
5852
5867
|
providedIn: 'root'
|
|
@@ -6210,7 +6225,7 @@ SharedMatNumpadModule.decorators = [
|
|
|
6210
6225
|
},] }
|
|
6211
6226
|
];
|
|
6212
6227
|
|
|
6213
|
-
const DEFAULT_VALUE_ACCESSOR
|
|
6228
|
+
const DEFAULT_VALUE_ACCESSOR = {
|
|
6214
6229
|
provide: NG_VALUE_ACCESSOR,
|
|
6215
6230
|
useExisting: forwardRef(() => MatSwipeField),
|
|
6216
6231
|
multi: true
|
|
@@ -6473,7 +6488,7 @@ MatSwipeField.decorators = [
|
|
|
6473
6488
|
{ type: Component, args: [{
|
|
6474
6489
|
selector: 'mat-swipe-field',
|
|
6475
6490
|
template: "<mat-form-field [floatLabel]=\"showSlides && (!floatLabel || floatLabel === 'auto') ? 'always': floatLabel\"\n [class]=\"classList\"\n [class.mat-form-field-disabled]=\"disabled\">\n <mat-label *ngIf=\"placeholder && floatLabel!=='never'\">\n {{placeholder}}\n </mat-label>\n <input matInput #fakeInput type=\"text\"\n [formControl]=\"formControl\"\n [readonly]=\"true\"\n (focus)=\"_onFocusFakeInput($event)\"\n [required]=\"required\"\n [class.cdk-visually-hidden]=\"showSlides\"\n [tabindex]=\"tabindex\">\n\n <div class=\"slides-container\" [class.hidden]=\"!showSlides\">\n <ion-slides #slides\n [options]=\"slidesOptions\"\n (ionSlidesDidLoad)=\"slidesLoaded()\"\n (ionSlideReachStart)=\"reachStart(true)\"\n (ionSlideReachEnd)=\"reachEnd(true)\"\n (ionSlideNextEnd)=\"reachStart(false)\"\n (ionSlidePrevEnd)=\"reachEnd(false)\"\n (ionSlideDidChange)=\"slideChanged()\"\n >\n <ion-slide *ngFor=\"let item of $items | async\">\n <ion-label>{{ displayWith(item) }}</ion-label>\n </ion-slide>\n\n </ion-slides>\n </div>\n\n <button #prevButton\n mat-icon-button\n type=\"button\"\n class=\"button-prev\"\n [hidden]=\"!showSlides\"\n [disabled]=\"previousDisabled\"\n (click)=\"previous()\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n <button #nextButton\n mat-icon-button\n type=\"button\"\n class=\"button-next\"\n [hidden]=\"!showSlides\"\n [disabled]=\"nextDisabled\"\n (click)=\"next()\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n\n</mat-form-field>\n",
|
|
6476
|
-
providers: [DEFAULT_VALUE_ACCESSOR
|
|
6491
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
6477
6492
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6478
6493
|
styles: [":host{display:inline-block;width:100%;position:relative}input.hidden{display:none}.slides-container .swiper-slide{font-size:16px!important}.slides-container.hidden{visibility:hidden;height:0!important}.button-next,.button-prev{position:absolute;top:calc(50% - 20px);z-index:10}.button-prev{left:0;right:auto}.button-next{left:auto;right:0}"]
|
|
6479
6494
|
},] }
|
|
@@ -6932,7 +6947,7 @@ class MatBadgeIconDirective {
|
|
|
6932
6947
|
badge.innerHTML = `<i class="material-icons" style="font-size: ${fontSize};">${this.matIcon}</i>`;
|
|
6933
6948
|
}
|
|
6934
6949
|
else if (this.ionIcon) {
|
|
6935
|
-
badge.innerHTML = `<ion-icon style="font-size: ${fontSize};" name="${this.ionIcon}"></ion-icon>`;
|
|
6950
|
+
badge.innerHTML = `<ion-icon style="font-size: ${fontSize}; pointer-events: none;" name="${this.ionIcon}"></ion-icon>`;
|
|
6936
6951
|
}
|
|
6937
6952
|
}
|
|
6938
6953
|
}
|
|
@@ -7048,7 +7063,7 @@ class ProgressBarService {
|
|
|
7048
7063
|
}
|
|
7049
7064
|
}
|
|
7050
7065
|
}
|
|
7051
|
-
ProgressBarService.ɵprov =
|
|
7066
|
+
ProgressBarService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProgressBarService_Factory() { return new ProgressBarService(); }, token: ProgressBarService, providedIn: "root" });
|
|
7052
7067
|
ProgressBarService.decorators = [
|
|
7053
7068
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7054
7069
|
];
|
|
@@ -7092,7 +7107,7 @@ class AppGestureConfig extends HammerGestureConfig {
|
|
|
7092
7107
|
return mc;
|
|
7093
7108
|
}
|
|
7094
7109
|
}
|
|
7095
|
-
AppGestureConfig.ɵprov =
|
|
7110
|
+
AppGestureConfig.ɵprov = i0.ɵɵdefineInjectable({ factory: function AppGestureConfig_Factory() { return new AppGestureConfig(); }, token: AppGestureConfig, providedIn: "root" });
|
|
7096
7111
|
AppGestureConfig.decorators = [
|
|
7097
7112
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7098
7113
|
];
|
|
@@ -7315,7 +7330,7 @@ class MatPaginatorI18n extends MatPaginatorIntl {
|
|
|
7315
7330
|
this.previousPageLabel = this.translate.instant('COMMON.PAGINATOR.PREVIOUS_PAGE');
|
|
7316
7331
|
}
|
|
7317
7332
|
}
|
|
7318
|
-
MatPaginatorI18n.ɵprov =
|
|
7333
|
+
MatPaginatorI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatPaginatorI18n_Factory() { return new MatPaginatorI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatPaginatorI18n, providedIn: "root" });
|
|
7319
7334
|
MatPaginatorI18n.decorators = [
|
|
7320
7335
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7321
7336
|
];
|
|
@@ -7405,17 +7420,17 @@ function getColorContrast(color, bw) {
|
|
|
7405
7420
|
return rgbArrayToHex(rgb.map(v => 255 - v));
|
|
7406
7421
|
}
|
|
7407
7422
|
|
|
7408
|
-
const noop
|
|
7423
|
+
const noop = () => {
|
|
7409
7424
|
};
|
|
7410
|
-
const ɵ0$
|
|
7425
|
+
const ɵ0$3 = noop;
|
|
7411
7426
|
class AppFormField {
|
|
7412
7427
|
constructor(translate, cd, injector, formGroupDir) {
|
|
7413
7428
|
this.translate = translate;
|
|
7414
7429
|
this.cd = cd;
|
|
7415
7430
|
this.injector = injector;
|
|
7416
7431
|
this.formGroupDir = formGroupDir;
|
|
7417
|
-
this._onChangeCallback = noop
|
|
7418
|
-
this._onTouchedCallback = noop
|
|
7432
|
+
this._onChangeCallback = noop;
|
|
7433
|
+
this._onTouchedCallback = noop;
|
|
7419
7434
|
this.readonly = false;
|
|
7420
7435
|
this.compact = false;
|
|
7421
7436
|
this.floatLabel = 'auto';
|
|
@@ -7604,13 +7619,14 @@ AppFormField.propDecorators = {
|
|
|
7604
7619
|
};
|
|
7605
7620
|
|
|
7606
7621
|
class StartableService {
|
|
7607
|
-
constructor(
|
|
7622
|
+
constructor(prerequisiteService) {
|
|
7608
7623
|
this.onStart = new Subject();
|
|
7609
7624
|
this._debug = false;
|
|
7625
|
+
this._startByReadyFunction = true; // should start when calling ready() ?
|
|
7610
7626
|
this._data = null;
|
|
7611
7627
|
this._started = false;
|
|
7612
|
-
this._startPrerequisite =
|
|
7613
|
-
? () =>
|
|
7628
|
+
this._startPrerequisite = prerequisiteService
|
|
7629
|
+
? () => prerequisiteService.ready()
|
|
7614
7630
|
: () => Promise.resolve();
|
|
7615
7631
|
}
|
|
7616
7632
|
start() {
|
|
@@ -7665,7 +7681,12 @@ class StartableService {
|
|
|
7665
7681
|
ready() {
|
|
7666
7682
|
if (this._started)
|
|
7667
7683
|
return Promise.resolve(this._data);
|
|
7668
|
-
|
|
7684
|
+
if (this._startPromise)
|
|
7685
|
+
return this._startPromise;
|
|
7686
|
+
if (this._startByReadyFunction)
|
|
7687
|
+
return this.start();
|
|
7688
|
+
return waitFor(() => this._started)
|
|
7689
|
+
.then(() => this._data);
|
|
7669
7690
|
}
|
|
7670
7691
|
ngOnStop() {
|
|
7671
7692
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -7831,14 +7852,14 @@ class AudioProvider extends StartableService {
|
|
|
7831
7852
|
});
|
|
7832
7853
|
}
|
|
7833
7854
|
}
|
|
7834
|
-
AudioProvider.ɵprov =
|
|
7855
|
+
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" });
|
|
7835
7856
|
AudioProvider.decorators = [
|
|
7836
7857
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
7837
7858
|
];
|
|
7838
7859
|
AudioProvider.ctorParameters = () => [
|
|
7839
7860
|
{ type: Platform },
|
|
7840
|
-
{ type: NativeAudio
|
|
7841
|
-
{ type: Vibration
|
|
7861
|
+
{ type: NativeAudio, decorators: [{ type: Optional }] },
|
|
7862
|
+
{ type: Vibration, decorators: [{ type: Optional }] },
|
|
7842
7863
|
{ type: AudioManagement, decorators: [{ type: Optional }] }
|
|
7843
7864
|
];
|
|
7844
7865
|
|
|
@@ -7920,7 +7941,7 @@ class Hotkeys {
|
|
|
7920
7941
|
});
|
|
7921
7942
|
}
|
|
7922
7943
|
}
|
|
7923
|
-
Hotkeys.ɵprov =
|
|
7944
|
+
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" });
|
|
7924
7945
|
Hotkeys.decorators = [
|
|
7925
7946
|
{ type: Injectable, args: [{
|
|
7926
7947
|
providedIn: 'root'
|
|
@@ -8094,7 +8115,7 @@ class Base64ImageReader {
|
|
|
8094
8115
|
}
|
|
8095
8116
|
}
|
|
8096
8117
|
|
|
8097
|
-
const uuidv4 = uuidv4Imported;
|
|
8118
|
+
const uuidv4$1 = uuidv4Imported;
|
|
8098
8119
|
class FileService {
|
|
8099
8120
|
constructor(platform,
|
|
8100
8121
|
//private transfer: FileTransfer,
|
|
@@ -8131,7 +8152,7 @@ class FileService {
|
|
|
8131
8152
|
const lastSlashIndex = source.lastIndexOf('/');
|
|
8132
8153
|
if (lastSlashIndex === -1)
|
|
8133
8154
|
throw new Error('Invalid URL: ' + source);
|
|
8134
|
-
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4();
|
|
8155
|
+
const fileName = lastSlashIndex < (source.length - 1) && source.substring(lastSlashIndex + 1) || uuidv4$1();
|
|
8135
8156
|
// Download into the file system
|
|
8136
8157
|
if (responseType === 'file' && this.canUseFileSystem) {
|
|
8137
8158
|
console.warn(`WARN: [file] Fetching image {${source}} in local file...`);
|
|
@@ -8187,7 +8208,7 @@ class FileService {
|
|
|
8187
8208
|
this._started = true;
|
|
8188
8209
|
}
|
|
8189
8210
|
}
|
|
8190
|
-
FileService.ɵprov =
|
|
8211
|
+
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" });
|
|
8191
8212
|
FileService.decorators = [
|
|
8192
8213
|
{ type: Injectable, args: [{
|
|
8193
8214
|
providedIn: 'root',
|
|
@@ -8217,6 +8238,10 @@ class ModalToolbarComponent {
|
|
|
8217
8238
|
}
|
|
8218
8239
|
ngOnInit() {
|
|
8219
8240
|
this.canValidate = toBoolean(this.canValidate, this.validate.observers.length > 0);
|
|
8241
|
+
// Ctrl+S
|
|
8242
|
+
this._subscription.add(this.hotkeys.addShortcut({ keys: 'control.s', description: 'COMMON.BTN_VALIDATE', elementName: this.modalName })
|
|
8243
|
+
.pipe(filter(() => this.canValidate))
|
|
8244
|
+
.subscribe((event) => this.validate.emit(event)));
|
|
8220
8245
|
// Escape
|
|
8221
8246
|
this._subscription.add(this.hotkeys.addShortcut({ keys: 'escape', description: 'COMMON.BTN_CLOSE', elementName: this.modalName })
|
|
8222
8247
|
.subscribe((event) => this.cancel.emit(event)));
|
|
@@ -8349,7 +8374,7 @@ class Base58 {
|
|
|
8349
8374
|
Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
8350
8375
|
|
|
8351
8376
|
const scrypt = require('scrypt-async');
|
|
8352
|
-
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
8377
|
+
const sha256$1 = require('hash.js/lib/hash/sha/256');
|
|
8353
8378
|
const sha512 = require('hash.js/lib/hash/sha/512');
|
|
8354
8379
|
const nacl = {
|
|
8355
8380
|
sign,
|
|
@@ -8453,7 +8478,7 @@ class CryptoService {
|
|
|
8453
8478
|
* Hash (using SHA256) a message
|
|
8454
8479
|
*/
|
|
8455
8480
|
sha256(message) {
|
|
8456
|
-
return sha256().update(message).digest('hex');
|
|
8481
|
+
return sha256$1().update(message).digest('hex');
|
|
8457
8482
|
}
|
|
8458
8483
|
/**
|
|
8459
8484
|
* Hash (using SHA512) a message
|
|
@@ -8466,7 +8491,7 @@ class CryptoService {
|
|
|
8466
8491
|
return nacl.util.encodeBase64(m);
|
|
8467
8492
|
}
|
|
8468
8493
|
}
|
|
8469
|
-
CryptoService.ɵprov =
|
|
8494
|
+
CryptoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CryptoService_Factory() { return new CryptoService(); }, token: CryptoService, providedIn: "root" });
|
|
8470
8495
|
CryptoService.decorators = [
|
|
8471
8496
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
8472
8497
|
];
|
|
@@ -9687,7 +9712,7 @@ class LocalSettingsService extends StartableService {
|
|
|
9687
9712
|
return page;
|
|
9688
9713
|
}
|
|
9689
9714
|
}
|
|
9690
|
-
LocalSettingsService.ɵprov =
|
|
9715
|
+
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" });
|
|
9691
9716
|
LocalSettingsService.decorators = [
|
|
9692
9717
|
{ type: Injectable, args: [{
|
|
9693
9718
|
providedIn: 'root',
|
|
@@ -10347,7 +10372,7 @@ class NetworkService extends StartableService {
|
|
|
10347
10372
|
});
|
|
10348
10373
|
}
|
|
10349
10374
|
}
|
|
10350
|
-
NetworkService.ɵprov =
|
|
10375
|
+
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" });
|
|
10351
10376
|
NetworkService.decorators = [
|
|
10352
10377
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
10353
10378
|
];
|
|
@@ -10358,16 +10383,16 @@ NetworkService.ctorParameters = () => [
|
|
|
10358
10383
|
{ type: CryptoService },
|
|
10359
10384
|
{ type: Storage },
|
|
10360
10385
|
{ type: LocalSettingsService },
|
|
10361
|
-
{ type: CacheService
|
|
10386
|
+
{ type: CacheService },
|
|
10362
10387
|
{ type: HttpClient },
|
|
10363
10388
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
10364
|
-
{ type: Network
|
|
10365
|
-
{ type: SplashScreen
|
|
10389
|
+
{ type: Network, decorators: [{ type: Optional }] },
|
|
10390
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
10366
10391
|
{ type: TranslateService, decorators: [{ type: Optional }] },
|
|
10367
10392
|
{ type: ToastController, decorators: [{ type: Optional }] }
|
|
10368
10393
|
];
|
|
10369
10394
|
|
|
10370
|
-
const ErrorCodes = {
|
|
10395
|
+
const ErrorCodes$2 = {
|
|
10371
10396
|
UNKNOWN_ERROR: 0,
|
|
10372
10397
|
LOAD_ACCOUNT_ERROR: 1,
|
|
10373
10398
|
BAD_PASSWORD: 2,
|
|
@@ -10714,7 +10739,7 @@ class EntityStore {
|
|
|
10714
10739
|
}
|
|
10715
10740
|
catch (err) {
|
|
10716
10741
|
console.error(err);
|
|
10717
|
-
throw { code: ErrorCodes.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10742
|
+
throw { code: ErrorCodes$2.ENTITY_STORAGE_MIGRATION_FAILED, message: 'ERROR.ENTITY_STORAGE_MIGRATION_FAILED', details: err };
|
|
10718
10743
|
}
|
|
10719
10744
|
}
|
|
10720
10745
|
// Emit update event
|
|
@@ -11285,7 +11310,7 @@ class EntitiesStorage extends StartableService {
|
|
|
11285
11310
|
}
|
|
11286
11311
|
EntitiesStorage.TRASH_PREFIX = 'Trash#';
|
|
11287
11312
|
EntitiesStorage.REMOTE_PREFIX = 'Remote#';
|
|
11288
|
-
EntitiesStorage.ɵprov =
|
|
11313
|
+
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" });
|
|
11289
11314
|
EntitiesStorage.decorators = [
|
|
11290
11315
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
11291
11316
|
];
|
|
@@ -11385,10 +11410,10 @@ function referentialToString(obj, properties) {
|
|
|
11385
11410
|
function referentialsToString(values, properties, separator) {
|
|
11386
11411
|
return (values || []).map(v => referentialToString(v, properties)).join(separator || ', ');
|
|
11387
11412
|
}
|
|
11388
|
-
const ɵ0$
|
|
11413
|
+
const ɵ0$2 = StatusIds.ENABLE, ɵ1 = StatusIds.DISABLE, ɵ2 = StatusIds.TEMPORARY;
|
|
11389
11414
|
const StatusList = Object.freeze([
|
|
11390
11415
|
{
|
|
11391
|
-
id: ɵ0$
|
|
11416
|
+
id: ɵ0$2,
|
|
11392
11417
|
icon: 'checkmark',
|
|
11393
11418
|
label: 'REFERENTIAL.STATUS_ENUM.ENABLE'
|
|
11394
11419
|
},
|
|
@@ -11663,7 +11688,7 @@ function accountToString(data) {
|
|
|
11663
11688
|
(data.lastName || '')) || '';
|
|
11664
11689
|
}
|
|
11665
11690
|
|
|
11666
|
-
const uuidv4
|
|
11691
|
+
const uuidv4 = uuidv4Imported;
|
|
11667
11692
|
const _global = typeof global !== 'undefined' ? global : (typeof window !== 'undefined' ? window : {});
|
|
11668
11693
|
const NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
11669
11694
|
/**
|
|
@@ -11707,7 +11732,7 @@ function createTrackerLink(opts) {
|
|
|
11707
11732
|
// Skip if not tracked
|
|
11708
11733
|
if (!context || !context.tracked)
|
|
11709
11734
|
return forward(operation);
|
|
11710
|
-
const id = context.serializationKey || uuidv4
|
|
11735
|
+
const id = context.serializationKey || uuidv4();
|
|
11711
11736
|
console.debug(`[apollo-tracker-link] Watching tracked query {${operation.operationName}#${id}}`);
|
|
11712
11737
|
// Clean context, before calling JSON.stringify (remove unused attributes)
|
|
11713
11738
|
const cleanContext = Object.assign(Object.assign({}, context), { optimisticResponse: null, cache: null });
|
|
@@ -12241,7 +12266,6 @@ class GraphqlService extends StartableService {
|
|
|
12241
12266
|
.append('Authorization', authorization);
|
|
12242
12267
|
//.append('X-App-Name', environment.name)
|
|
12243
12268
|
//.append('X-App-Version', environment.version)
|
|
12244
|
-
;
|
|
12245
12269
|
// Use the setContext method to set the HTTP headers.
|
|
12246
12270
|
operation.setContext(Object.assign(Object.assign({}, operation.getContext()), { headers }));
|
|
12247
12271
|
// Call the next link in the middleware chain.
|
|
@@ -12376,7 +12400,7 @@ class GraphqlService extends StartableService {
|
|
|
12376
12400
|
(err.networkError && ((err.networkError.error && this.toAppError(err.networkError.error))
|
|
12377
12401
|
|| this.toAppError(err.networkError)
|
|
12378
12402
|
|| (err.networkError.error && this.createAppErrorByCode(err.networkError.error.status))
|
|
12379
|
-
|| this.createAppErrorByCode(ErrorCodes.UNKNOWN_NETWORK_ERROR)))
|
|
12403
|
+
|| this.createAppErrorByCode(ErrorCodes$2.UNKNOWN_NETWORK_ERROR)))
|
|
12380
12404
|
// If graphQL: try to convert the first error found
|
|
12381
12405
|
|| (err.graphQLErrors && err.graphQLErrors.length && this.toAppError(err.graphQLErrors[0]))
|
|
12382
12406
|
|| this.toAppError(err)
|
|
@@ -12384,7 +12408,7 @@ class GraphqlService extends StartableService {
|
|
|
12384
12408
|
|| (err.graphQLErrors && err.graphQLErrors[0])
|
|
12385
12409
|
|| err;
|
|
12386
12410
|
console.error('[graphql] ' + (error && error.message || error), error.stack || '');
|
|
12387
|
-
if (error && error.code === ErrorCodes.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12411
|
+
if (error && error.code === ErrorCodes$2.UNKNOWN_NETWORK_ERROR && err.networkError && err.networkError.message) {
|
|
12388
12412
|
console.error('[graphql] original error: ' + err.networkError.message);
|
|
12389
12413
|
this.onNetworkError.next(error);
|
|
12390
12414
|
}
|
|
@@ -12420,7 +12444,7 @@ class GraphqlService extends StartableService {
|
|
|
12420
12444
|
return 'ERROR.UNAUTHORIZED';
|
|
12421
12445
|
case ServerErrorCodes.FORBIDDEN:
|
|
12422
12446
|
return 'ERROR.FORBIDDEN';
|
|
12423
|
-
case ErrorCodes.UNKNOWN_NETWORK_ERROR:
|
|
12447
|
+
case ErrorCodes$2.UNKNOWN_NETWORK_ERROR:
|
|
12424
12448
|
return 'ERROR.UNKNOWN_NETWORK_ERROR';
|
|
12425
12449
|
case ServerErrorCodes.BAD_UPDATE_DATE:
|
|
12426
12450
|
return 'ERROR.BAD_UPDATE_DATE';
|
|
@@ -12448,7 +12472,7 @@ class GraphqlService extends StartableService {
|
|
|
12448
12472
|
return undefined;
|
|
12449
12473
|
}
|
|
12450
12474
|
}
|
|
12451
|
-
GraphqlService.ɵprov =
|
|
12475
|
+
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" });
|
|
12452
12476
|
GraphqlService.decorators = [
|
|
12453
12477
|
{ type: Injectable, args: [{
|
|
12454
12478
|
providedIn: 'root'
|
|
@@ -12465,7 +12489,7 @@ GraphqlService.ctorParameters = () => [
|
|
|
12465
12489
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_GRAPHQL_TYPE_POLICIES,] }] }
|
|
12466
12490
|
];
|
|
12467
12491
|
|
|
12468
|
-
const sha256
|
|
12492
|
+
const sha256 = require('hash.js/lib/hash/sha/256');
|
|
12469
12493
|
class BaseGraphqlServiceOptions {
|
|
12470
12494
|
}
|
|
12471
12495
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
@@ -12615,8 +12639,8 @@ class BaseGraphqlService {
|
|
|
12615
12639
|
}
|
|
12616
12640
|
/* -- protected methods -- */
|
|
12617
12641
|
computeMutableWatchQueryId(opts) {
|
|
12618
|
-
const queryName = opts.queryName || sha256
|
|
12619
|
-
const variablesKey = opts.variables && sha256
|
|
12642
|
+
const queryName = opts.queryName || sha256().update(JSON.stringify(opts.query)).digest('hex').substring(0, 8);
|
|
12643
|
+
const variablesKey = opts.variables && sha256().update(JSON.stringify(opts.variables)).digest('hex').substring(0, 8) || '';
|
|
12620
12644
|
return [queryName, opts.arrayFieldName, variablesKey].join('|');
|
|
12621
12645
|
}
|
|
12622
12646
|
findMutableWatchQueries(opts) {
|
|
@@ -12679,7 +12703,7 @@ const DEFAULT_AVATAR_IMAGE = 'assets/img/person.png';
|
|
|
12679
12703
|
/* ------------------------------------
|
|
12680
12704
|
* GraphQL queries
|
|
12681
12705
|
* ------------------------------------*/
|
|
12682
|
-
const Fragments = {
|
|
12706
|
+
const Fragments$1 = {
|
|
12683
12707
|
account: gql `
|
|
12684
12708
|
fragment AccountFragment on AccountVO {
|
|
12685
12709
|
id
|
|
@@ -12712,13 +12736,13 @@ const Fragments = {
|
|
|
12712
12736
|
`
|
|
12713
12737
|
};
|
|
12714
12738
|
// Load account query
|
|
12715
|
-
const LoadQuery = gql `
|
|
12739
|
+
const LoadQuery$1 = gql `
|
|
12716
12740
|
query Account {
|
|
12717
12741
|
data: account {
|
|
12718
12742
|
...AccountFragment
|
|
12719
12743
|
}
|
|
12720
12744
|
}
|
|
12721
|
-
${Fragments.account}
|
|
12745
|
+
${Fragments$1.account}
|
|
12722
12746
|
`;
|
|
12723
12747
|
// Check email query
|
|
12724
12748
|
const IsEmailExistsQuery = gql `
|
|
@@ -12727,13 +12751,13 @@ const IsEmailExistsQuery = gql `
|
|
|
12727
12751
|
}
|
|
12728
12752
|
`;
|
|
12729
12753
|
// Save (create or update) account mutation
|
|
12730
|
-
const SaveMutation = gql `
|
|
12754
|
+
const SaveMutation$1 = gql `
|
|
12731
12755
|
mutation SaveAccount($data:AccountVOInput){
|
|
12732
12756
|
data: saveAccount(account: $data){
|
|
12733
12757
|
...AccountFragment
|
|
12734
12758
|
}
|
|
12735
12759
|
}
|
|
12736
|
-
${Fragments.account}
|
|
12760
|
+
${Fragments$1.account}
|
|
12737
12761
|
`;
|
|
12738
12762
|
// Create account mutation
|
|
12739
12763
|
const CreateMutation = gql `
|
|
@@ -12742,7 +12766,7 @@ const CreateMutation = gql `
|
|
|
12742
12766
|
...AccountFragment
|
|
12743
12767
|
}
|
|
12744
12768
|
}
|
|
12745
|
-
${Fragments.account}
|
|
12769
|
+
${Fragments$1.account}
|
|
12746
12770
|
`;
|
|
12747
12771
|
// Sent confirmation email
|
|
12748
12772
|
const SendConfirmEmailMutation = gql `
|
|
@@ -13080,7 +13104,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13080
13104
|
catch (error) {
|
|
13081
13105
|
console.error(error);
|
|
13082
13106
|
this.resetData();
|
|
13083
|
-
throw { code: ErrorCodes.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13107
|
+
throw { code: ErrorCodes$2.UNKNOWN_ERROR, message: 'ERROR.SCRYPT_ERROR' };
|
|
13084
13108
|
}
|
|
13085
13109
|
// Store pubkey+keypair
|
|
13086
13110
|
this._data.pubkey = Base58.encode(keypair.publicKey);
|
|
@@ -13114,7 +13138,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13114
13138
|
}
|
|
13115
13139
|
catch (err) {
|
|
13116
13140
|
// If account not found, check if email is valid
|
|
13117
|
-
if (err && +(err.code) === ErrorCodes.LOAD_ACCOUNT_ERROR) {
|
|
13141
|
+
if (err && +(err.code) === ErrorCodes$2.LOAD_ACCOUNT_ERROR) {
|
|
13118
13142
|
// Check email exists
|
|
13119
13143
|
if (data.username.indexOf('@') !== -1) {
|
|
13120
13144
|
let isEmailExists;
|
|
@@ -13126,11 +13150,11 @@ class AccountService extends BaseGraphqlService {
|
|
|
13126
13150
|
}
|
|
13127
13151
|
// Email not exists (no account)
|
|
13128
13152
|
if (!isEmailExists) {
|
|
13129
|
-
throw { code: ErrorCodes.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13153
|
+
throw { code: ErrorCodes$2.UNKNOWN_ACCOUNT_EMAIL, message: 'ERROR.UNKNOWN_ACCOUNT_EMAIL' };
|
|
13130
13154
|
}
|
|
13131
13155
|
}
|
|
13132
13156
|
// Email exists, so error = 'bad password'
|
|
13133
|
-
throw { code: ErrorCodes.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13157
|
+
throw { code: ErrorCodes$2.BAD_PASSWORD, message: 'ERROR.BAD_PASSWORD' };
|
|
13134
13158
|
}
|
|
13135
13159
|
throw err; // resend the first error
|
|
13136
13160
|
}
|
|
@@ -13255,8 +13279,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
13255
13279
|
// Load remotely
|
|
13256
13280
|
else {
|
|
13257
13281
|
const { data } = yield this.graphql.query({
|
|
13258
|
-
query: LoadQuery,
|
|
13259
|
-
error: { code: ErrorCodes.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13282
|
+
query: LoadQuery$1,
|
|
13283
|
+
error: { code: ErrorCodes$2.LOAD_ACCOUNT_ERROR, message: 'ERROR.LOAD_ACCOUNT_ERROR' },
|
|
13260
13284
|
fetchPolicy: opts && opts.fetchPolicy || 'no-cache' || undefined
|
|
13261
13285
|
});
|
|
13262
13286
|
json = data;
|
|
@@ -13283,7 +13307,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13283
13307
|
return __awaiter(this, void 0, void 0, function* () {
|
|
13284
13308
|
const isEmailExists = yield this.isEmailExists(email);
|
|
13285
13309
|
if (isEmailExists) {
|
|
13286
|
-
throw { code: ErrorCodes.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13310
|
+
throw { code: ErrorCodes$2.EMAIL_ALREADY_REGISTERED, message: 'ERROR.EMAIL_ALREADY_REGISTERED' };
|
|
13287
13311
|
}
|
|
13288
13312
|
});
|
|
13289
13313
|
}
|
|
@@ -13319,7 +13343,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13319
13343
|
locale
|
|
13320
13344
|
},
|
|
13321
13345
|
error: {
|
|
13322
|
-
code: ErrorCodes.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13346
|
+
code: ErrorCodes$2.SENT_CONFIRMATION_EMAIL_FAILED,
|
|
13323
13347
|
message: 'ERROR.SENT_ACCOUNT_CONFIRMATION_EMAIL_FAILED'
|
|
13324
13348
|
}
|
|
13325
13349
|
});
|
|
@@ -13335,7 +13359,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13335
13359
|
code
|
|
13336
13360
|
},
|
|
13337
13361
|
error: {
|
|
13338
|
-
code: ErrorCodes.CONFIRM_EMAIL_FAILED,
|
|
13362
|
+
code: ErrorCodes$2.CONFIRM_EMAIL_FAILED,
|
|
13339
13363
|
message: 'ERROR.CONFIRM_ACCOUNT_EMAIL_FAILED'
|
|
13340
13364
|
}
|
|
13341
13365
|
});
|
|
@@ -13353,7 +13377,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13353
13377
|
interval: 10
|
|
13354
13378
|
},
|
|
13355
13379
|
error: {
|
|
13356
|
-
code: ErrorCodes.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13380
|
+
code: ErrorCodes$2.SUBSCRIBE_ACCOUNT_ERROR,
|
|
13357
13381
|
message: 'ERROR.ACCOUNT.SUBSCRIBE_ACCOUNT_ERROR'
|
|
13358
13382
|
}
|
|
13359
13383
|
}).subscribe({
|
|
@@ -13462,7 +13486,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13462
13486
|
throw error;
|
|
13463
13487
|
console.error(error);
|
|
13464
13488
|
throw {
|
|
13465
|
-
code: ErrorCodes.LOAD_ACCOUNT_ERROR,
|
|
13489
|
+
code: ErrorCodes$2.LOAD_ACCOUNT_ERROR,
|
|
13466
13490
|
message: 'ERROR.LOAD_ACCOUNT_ERROR'
|
|
13467
13491
|
};
|
|
13468
13492
|
}
|
|
@@ -13607,7 +13631,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13607
13631
|
if (!isNew) {
|
|
13608
13632
|
const existingAccount = yield this.load({ fetchPolicy: 'network-only' });
|
|
13609
13633
|
if (!existingAccount || !existingAccount.updateDate) {
|
|
13610
|
-
throw { code: ErrorCodes.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13634
|
+
throw { code: ErrorCodes$2.ACCOUNT_NOT_EXISTS, message: 'ERROR.ACCOUNT_NOT_EXISTS' };
|
|
13611
13635
|
}
|
|
13612
13636
|
this.copyIdAndUpdateDate(existingAccount, account);
|
|
13613
13637
|
}
|
|
@@ -13616,10 +13640,10 @@ class AccountService extends BaseGraphqlService {
|
|
|
13616
13640
|
delete json.profiles;
|
|
13617
13641
|
// Execute mutation
|
|
13618
13642
|
const { data } = yield this.graphql.mutate({
|
|
13619
|
-
mutation: isNew ? CreateMutation : SaveMutation,
|
|
13643
|
+
mutation: isNew ? CreateMutation : SaveMutation$1,
|
|
13620
13644
|
variables: { data: json },
|
|
13621
13645
|
error: {
|
|
13622
|
-
code: ErrorCodes.SAVE_ACCOUNT_ERROR,
|
|
13646
|
+
code: ErrorCodes$2.SAVE_ACCOUNT_ERROR,
|
|
13623
13647
|
message: 'ERROR.SAVE_ACCOUNT_ERROR'
|
|
13624
13648
|
}
|
|
13625
13649
|
});
|
|
@@ -13639,7 +13663,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13639
13663
|
if (counter > 4) {
|
|
13640
13664
|
if (this._debug)
|
|
13641
13665
|
console.debug(`[account] Failed to authentication on pod (after ${counter} attempts)`);
|
|
13642
|
-
throw { code: ErrorCodes.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13666
|
+
throw { code: ErrorCodes$2.AUTH_SERVER_ERROR, message: 'ERROR.AUTH_SERVER_ERROR' };
|
|
13643
13667
|
}
|
|
13644
13668
|
// Check if valid
|
|
13645
13669
|
if (token) {
|
|
@@ -13649,7 +13673,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13649
13673
|
token
|
|
13650
13674
|
},
|
|
13651
13675
|
error: {
|
|
13652
|
-
code: ErrorCodes.UNAUTHORIZED,
|
|
13676
|
+
code: ErrorCodes$2.UNAUTHORIZED,
|
|
13653
13677
|
message: 'ERROR.UNAUTHORIZED'
|
|
13654
13678
|
},
|
|
13655
13679
|
fetchPolicy: 'no-cache'
|
|
@@ -13665,7 +13689,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13665
13689
|
}
|
|
13666
13690
|
// Generate a new token
|
|
13667
13691
|
const challengeError = {
|
|
13668
|
-
code: ErrorCodes.AUTH_CHALLENGE_ERROR,
|
|
13692
|
+
code: ErrorCodes$2.AUTH_CHALLENGE_ERROR,
|
|
13669
13693
|
message: 'ERROR.AUTH_CHALLENGE_ERROR'
|
|
13670
13694
|
};
|
|
13671
13695
|
const data = yield this.graphql.query({
|
|
@@ -13699,7 +13723,7 @@ class AccountService extends BaseGraphqlService {
|
|
|
13699
13723
|
target.settings.updateDate = source.settings && source.settings.updateDate || target.settings.updateDate;
|
|
13700
13724
|
}
|
|
13701
13725
|
}
|
|
13702
|
-
AccountService.ɵprov =
|
|
13726
|
+
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" });
|
|
13703
13727
|
AccountService.decorators = [
|
|
13704
13728
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
13705
13729
|
];
|
|
@@ -13959,7 +13983,7 @@ const CONFIGURATION_STORAGE_KEY = 'configuration';
|
|
|
13959
13983
|
/* ------------------------------------
|
|
13960
13984
|
* GraphQL queries
|
|
13961
13985
|
* ------------------------------------*/
|
|
13962
|
-
const Fragments
|
|
13986
|
+
const Fragments = {
|
|
13963
13987
|
config: gql `
|
|
13964
13988
|
fragment ConfigFragment on ConfigurationVO {
|
|
13965
13989
|
id
|
|
@@ -13986,22 +14010,22 @@ const Fragments$1 = {
|
|
|
13986
14010
|
}
|
|
13987
14011
|
`
|
|
13988
14012
|
};
|
|
13989
|
-
const LoadQuery
|
|
14013
|
+
const LoadQuery = gql `
|
|
13990
14014
|
query Configuration{
|
|
13991
14015
|
data: configuration{
|
|
13992
14016
|
...ConfigFragment
|
|
13993
14017
|
}
|
|
13994
14018
|
}
|
|
13995
|
-
${Fragments
|
|
14019
|
+
${Fragments.config}
|
|
13996
14020
|
`;
|
|
13997
14021
|
// Save (create or update) account mutation
|
|
13998
|
-
const SaveMutation
|
|
14022
|
+
const SaveMutation = gql `
|
|
13999
14023
|
mutation SaveConfiguration($data: ConfigurationVOInput){
|
|
14000
14024
|
data: saveConfiguration(config: $data){
|
|
14001
14025
|
...ConfigFragment
|
|
14002
14026
|
}
|
|
14003
14027
|
}
|
|
14004
|
-
${Fragments
|
|
14028
|
+
${Fragments.config}
|
|
14005
14029
|
`;
|
|
14006
14030
|
const ClearCache = gql `
|
|
14007
14031
|
query ClearCache($name: String) {
|
|
@@ -14096,12 +14120,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14096
14120
|
return __awaiter(this, void 0, void 0, function* () {
|
|
14097
14121
|
const now = Date.now();
|
|
14098
14122
|
console.debug('[config] Loading Pod configuration...');
|
|
14099
|
-
const query = opts && opts.query || LoadQuery
|
|
14123
|
+
const query = opts && opts.query || LoadQuery;
|
|
14100
14124
|
const variables = opts && opts.variables || undefined;
|
|
14101
14125
|
const res = yield this.graphql.query({
|
|
14102
14126
|
query,
|
|
14103
14127
|
variables,
|
|
14104
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14128
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14105
14129
|
fetchPolicy: opts && opts.fetchPolicy || undefined /*default*/
|
|
14106
14130
|
});
|
|
14107
14131
|
const data = res && res.data ? Configuration.fromObject(res.data) : undefined;
|
|
@@ -14126,12 +14150,12 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14126
14150
|
const json = config.asObject();
|
|
14127
14151
|
// Execute mutation
|
|
14128
14152
|
const res = yield this.graphql.mutate({
|
|
14129
|
-
mutation: SaveMutation
|
|
14153
|
+
mutation: SaveMutation,
|
|
14130
14154
|
variables: {
|
|
14131
14155
|
data: json
|
|
14132
14156
|
},
|
|
14133
14157
|
error: {
|
|
14134
|
-
code: ErrorCodes.SAVE_CONFIG_ERROR,
|
|
14158
|
+
code: ErrorCodes$2.SAVE_CONFIG_ERROR,
|
|
14135
14159
|
message: 'ERROR.SAVE_CONFIG_ERROR'
|
|
14136
14160
|
}
|
|
14137
14161
|
});
|
|
@@ -14157,7 +14181,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14157
14181
|
const res = yield this.graphql.query({
|
|
14158
14182
|
query: CacheStatistics,
|
|
14159
14183
|
variables: null,
|
|
14160
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14184
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14161
14185
|
fetchPolicy: 'network-only'
|
|
14162
14186
|
});
|
|
14163
14187
|
const data = res && res.cacheStatistics || undefined;
|
|
@@ -14173,7 +14197,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14173
14197
|
const res = yield this.graphql.query({
|
|
14174
14198
|
query: ClearCache,
|
|
14175
14199
|
variables,
|
|
14176
|
-
error: { code: ErrorCodes.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14200
|
+
error: { code: ErrorCodes$2.LOAD_CONFIG_ERROR, message: 'ERROR.LOAD_CONFIG_ERROR' },
|
|
14177
14201
|
fetchPolicy: 'network-only'
|
|
14178
14202
|
});
|
|
14179
14203
|
const data = res && res.clearCache || undefined;
|
|
@@ -14332,7 +14356,7 @@ class ConfigService extends BaseGraphqlService {
|
|
|
14332
14356
|
});
|
|
14333
14357
|
}
|
|
14334
14358
|
}
|
|
14335
|
-
ConfigService.ɵprov =
|
|
14359
|
+
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" });
|
|
14336
14360
|
ConfigService.decorators = [
|
|
14337
14361
|
{ type: Injectable, args: [{
|
|
14338
14362
|
providedIn: 'root',
|
|
@@ -14351,9 +14375,10 @@ ConfigService.ctorParameters = () => [
|
|
|
14351
14375
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_CONFIG_OPTIONS,] }] }
|
|
14352
14376
|
];
|
|
14353
14377
|
|
|
14354
|
-
const moment$
|
|
14355
|
-
class PlatformService {
|
|
14378
|
+
const moment$2 = momentImported;
|
|
14379
|
+
class PlatformService extends StartableService {
|
|
14356
14380
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14381
|
+
super(platform);
|
|
14357
14382
|
this.platform = platform;
|
|
14358
14383
|
this.cdkPlatform = cdkPlatform;
|
|
14359
14384
|
this.toastController = toastController;
|
|
@@ -14373,15 +14398,10 @@ class PlatformService {
|
|
|
14373
14398
|
this.splashScreen = splashScreen;
|
|
14374
14399
|
this.browser = browser;
|
|
14375
14400
|
this.downloader = downloader;
|
|
14376
|
-
this._started = false;
|
|
14377
14401
|
this._downloadingJobs = new Map();
|
|
14378
14402
|
this._debug = !environment.production;
|
|
14379
14403
|
if (this._debug)
|
|
14380
14404
|
console.debug('[platform] Creating service');
|
|
14381
|
-
this.start();
|
|
14382
|
-
}
|
|
14383
|
-
get started() {
|
|
14384
|
-
return this._started;
|
|
14385
14405
|
}
|
|
14386
14406
|
get mobile() {
|
|
14387
14407
|
return isNotNil(this._mobile) ? this._mobile : this.platform.is('mobile');
|
|
@@ -14400,7 +14420,7 @@ class PlatformService {
|
|
|
14400
14420
|
return this._android && this._cordova;
|
|
14401
14421
|
}
|
|
14402
14422
|
get canDownload() {
|
|
14403
|
-
return this.
|
|
14423
|
+
return isNotNil(this.downloader);
|
|
14404
14424
|
}
|
|
14405
14425
|
width() {
|
|
14406
14426
|
return this.platform.width();
|
|
@@ -14408,78 +14428,62 @@ class PlatformService {
|
|
|
14408
14428
|
height() {
|
|
14409
14429
|
return this.platform.height();
|
|
14410
14430
|
}
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14414
|
-
|
|
14415
|
-
|
|
14416
|
-
|
|
14417
|
-
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14427
|
-
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
}
|
|
14468
|
-
/**
|
|
14469
|
-
* Wait platform is ready.<br/>
|
|
14470
|
-
* Important: this will NOT start the platform, has it should be started by the AppComponent
|
|
14471
|
-
*
|
|
14472
|
-
* @param opts
|
|
14473
|
-
*/
|
|
14474
|
-
ready(opts) {
|
|
14475
|
-
const period = opts && opts.checkPeriod || 300;
|
|
14476
|
-
if (this._started)
|
|
14477
|
-
return Promise.resolve();
|
|
14478
|
-
return timer(period, period)
|
|
14479
|
-
.pipe(
|
|
14480
|
-
// For DEBUG :
|
|
14481
|
-
//tap(() => this._debug && console.debug("Waiting platform ready...")),
|
|
14482
|
-
filter(() => this._started), first()).toPromise();
|
|
14431
|
+
ngOnStart() {
|
|
14432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14433
|
+
const now = Date.now();
|
|
14434
|
+
this.accountService.tokenType = undefined;
|
|
14435
|
+
console.info('[platform] Starting platform...');
|
|
14436
|
+
try {
|
|
14437
|
+
this._mobile = this.platform.is('mobile');
|
|
14438
|
+
this._cordova = this.platform.is('cordova');
|
|
14439
|
+
this._android = this.platform.is('android');
|
|
14440
|
+
this.configureCordovaPlugins(this._mobile);
|
|
14441
|
+
this.touchUi = this._mobile || this.platform.is('tablet') || this.platform.is('phablet');
|
|
14442
|
+
// Force mobile in settings
|
|
14443
|
+
if (this._mobile) {
|
|
14444
|
+
this.settings.mobile = this._mobile;
|
|
14445
|
+
this.settings.touchUi = this.touchUi;
|
|
14446
|
+
}
|
|
14447
|
+
// Configure translation
|
|
14448
|
+
yield this.configureTranslate();
|
|
14449
|
+
// Configure storage
|
|
14450
|
+
const forage = yield this.storageReady();
|
|
14451
|
+
yield this.migrateStorage(forage);
|
|
14452
|
+
// Start root services
|
|
14453
|
+
yield Promise.all([
|
|
14454
|
+
this.entitiesStorage.ready(),
|
|
14455
|
+
this.cache.ready().then(() => this.configureCache()),
|
|
14456
|
+
this.settings.ready(),
|
|
14457
|
+
this.networkService.ready(),
|
|
14458
|
+
this.audioProvider.ready()
|
|
14459
|
+
]);
|
|
14460
|
+
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}} in ${Date.now() - now}ms`);
|
|
14461
|
+
// Update cache configuration when network changed
|
|
14462
|
+
this.networkService.onNetworkStatusChanges
|
|
14463
|
+
.pipe(skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
14464
|
+
.subscribe(type => this.configureCache(type !== 'none'));
|
|
14465
|
+
// Update authentication type
|
|
14466
|
+
this.configService.config
|
|
14467
|
+
.pipe(map(config => config === null || config === void 0 ? void 0 : config.getProperty(CORE_CONFIG_OPTIONS.AUTH_TOKEN_TYPE)), filter(isNotNilOrBlank), distinctUntilChanged())
|
|
14468
|
+
.subscribe(tokenType => {
|
|
14469
|
+
console.info(`[platform] Using auth token type {${tokenType}}`);
|
|
14470
|
+
this.accountService.tokenType = tokenType;
|
|
14471
|
+
});
|
|
14472
|
+
// Hide the splashscreen (if mobile) - after 1s
|
|
14473
|
+
if (this.mobile) {
|
|
14474
|
+
setTimeout(() => {
|
|
14475
|
+
var _a;
|
|
14476
|
+
(_a = this.splashScreen) === null || _a === void 0 ? void 0 : _a.hide();
|
|
14477
|
+
// Play startup sound
|
|
14478
|
+
this.audioProvider.playStartupSound();
|
|
14479
|
+
}, 1000);
|
|
14480
|
+
}
|
|
14481
|
+
}
|
|
14482
|
+
catch (err) {
|
|
14483
|
+
// Manage startup error
|
|
14484
|
+
return this.onStartupError(err);
|
|
14485
|
+
}
|
|
14486
|
+
});
|
|
14483
14487
|
}
|
|
14484
14488
|
open(url, target, features, replace) {
|
|
14485
14489
|
console.info(`[platform] Opening link: ${url}`);
|
|
@@ -14560,16 +14564,16 @@ class PlatformService {
|
|
|
14560
14564
|
}
|
|
14561
14565
|
// config moment lib
|
|
14562
14566
|
try {
|
|
14563
|
-
moment$
|
|
14567
|
+
moment$2.locale(event.lang);
|
|
14564
14568
|
console.debug('[platform] Use locale {' + event.lang + '}');
|
|
14565
14569
|
}
|
|
14566
14570
|
// If error, fallback to en
|
|
14567
14571
|
catch (err) {
|
|
14568
|
-
moment$
|
|
14572
|
+
moment$2.locale('en');
|
|
14569
14573
|
console.warn('[platform] Unknown local for moment lib. Using default [en]');
|
|
14570
14574
|
}
|
|
14571
14575
|
// Config date adapter
|
|
14572
|
-
this.dateAdapter.setLocale(moment$
|
|
14576
|
+
this.dateAdapter.setLocale(moment$2.locale());
|
|
14573
14577
|
}
|
|
14574
14578
|
});
|
|
14575
14579
|
this.settings.onChange.subscribe(data => {
|
|
@@ -14590,9 +14594,9 @@ class PlatformService {
|
|
|
14590
14594
|
});
|
|
14591
14595
|
}
|
|
14592
14596
|
configureCache(online) {
|
|
14593
|
-
online =
|
|
14597
|
+
online = toBoolean(online, this.cache.isOnline());
|
|
14594
14598
|
const cacheTTL = online ? 3600 /* 1h */ : 3600 * 24 * 30; /* 1 month */
|
|
14595
|
-
console.info(`[platform] Configuring cache [OK] {online: ${online}
|
|
14599
|
+
console.info(`[platform] Configuring cache [OK] {online: ${online}, timeToLive: ${cacheTTL / 3600}h, offlineInvalidate: false}`);
|
|
14596
14600
|
this.cache.setDefaultTTL(cacheTTL);
|
|
14597
14601
|
this.cache.setOfflineInvalidate(false); // Do not invalidate cache when offline
|
|
14598
14602
|
}
|
|
@@ -14707,7 +14711,7 @@ class PlatformService {
|
|
|
14707
14711
|
});
|
|
14708
14712
|
}
|
|
14709
14713
|
}
|
|
14710
|
-
PlatformService.ɵprov =
|
|
14714
|
+
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" });
|
|
14711
14715
|
PlatformService.decorators = [
|
|
14712
14716
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14713
14717
|
];
|
|
@@ -14722,15 +14726,15 @@ PlatformService.ctorParameters = () => [
|
|
|
14722
14726
|
{ type: NetworkService },
|
|
14723
14727
|
{ type: AccountService },
|
|
14724
14728
|
{ type: ConfigService },
|
|
14725
|
-
{ type: CacheService
|
|
14729
|
+
{ type: CacheService },
|
|
14726
14730
|
{ type: Storage },
|
|
14727
14731
|
{ type: AudioProvider },
|
|
14728
14732
|
{ type: undefined, decorators: [{ type: Inject, args: [ENVIRONMENT,] }] },
|
|
14729
|
-
{ type: StatusBar
|
|
14733
|
+
{ type: StatusBar, decorators: [{ type: Optional }] },
|
|
14730
14734
|
{ type: Keyboard, decorators: [{ type: Optional }] },
|
|
14731
|
-
{ type: SplashScreen
|
|
14732
|
-
{ type: InAppBrowser
|
|
14733
|
-
{ type: Downloader
|
|
14735
|
+
{ type: SplashScreen, decorators: [{ type: Optional }] },
|
|
14736
|
+
{ type: InAppBrowser, decorators: [{ type: Optional }] },
|
|
14737
|
+
{ type: Downloader, decorators: [{ type: Optional }] }
|
|
14734
14738
|
];
|
|
14735
14739
|
|
|
14736
14740
|
class AppHelpModal {
|
|
@@ -14794,7 +14798,7 @@ class MatStepperI18n extends MatStepperIntl {
|
|
|
14794
14798
|
this.optionalLabel = this.translate.instant('COMMON.OPTIONAL');
|
|
14795
14799
|
}
|
|
14796
14800
|
}
|
|
14797
|
-
MatStepperI18n.ɵprov =
|
|
14801
|
+
MatStepperI18n.ɵprov = i0.ɵɵdefineInjectable({ factory: function MatStepperI18n_Factory() { return new MatStepperI18n(i0.ɵɵinject(i1$1.TranslateService)); }, token: MatStepperI18n, providedIn: "root" });
|
|
14798
14802
|
MatStepperI18n.decorators = [
|
|
14799
14803
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
14800
14804
|
];
|
|
@@ -15786,7 +15790,7 @@ function state2side(state) {
|
|
|
15786
15790
|
return 1;
|
|
15787
15791
|
}
|
|
15788
15792
|
}
|
|
15789
|
-
const ɵ0$
|
|
15793
|
+
const ɵ0$1 = (defaultStateSize) => [
|
|
15790
15794
|
Math.round((rgbArrayMap.red[0] - 50) / defaultStateSize),
|
|
15791
15795
|
Math.round((255 - rgbArrayMap.red[1]) / defaultStateSize),
|
|
15792
15796
|
Math.round((255 - rgbArrayMap.red[2]) / defaultStateSize)
|
|
@@ -15794,7 +15798,7 @@ const ɵ0$9 = (defaultStateSize) => [
|
|
|
15794
15798
|
const SCALE_OPTIONS_DEFAULT = {
|
|
15795
15799
|
startColor: rgbArrayMap.red,
|
|
15796
15800
|
startStates: [0, 2, 3],
|
|
15797
|
-
startStepsFn: ɵ0$
|
|
15801
|
+
startStepsFn: ɵ0$1
|
|
15798
15802
|
};
|
|
15799
15803
|
/**
|
|
15800
15804
|
* Internal function, that create a colors scale, using iteration
|
|
@@ -15886,21 +15890,21 @@ function linearColorGradient(count, options) {
|
|
|
15886
15890
|
return result;
|
|
15887
15891
|
}
|
|
15888
15892
|
|
|
15889
|
-
class EntityTestClass {
|
|
15893
|
+
class EntityTestClass$1 {
|
|
15890
15894
|
}
|
|
15891
|
-
const FAKE_ENTITIES = [
|
|
15895
|
+
const FAKE_ENTITIES$1 = [
|
|
15892
15896
|
{ id: 1, label: 'AAA', name: 'Item A', description: 'Very long description A', comments: 'Very very long comments... again for A' },
|
|
15893
15897
|
{ id: 2, label: 'BBB', name: 'Item B', description: 'Very long description B', comments: 'Very very long comments... again for B' },
|
|
15894
15898
|
{ id: 3, label: 'CCC', name: 'Item C', description: 'Very long description C', comments: 'Very very long comments... again for C' }
|
|
15895
15899
|
];
|
|
15896
|
-
function deepCopy(values, size) {
|
|
15900
|
+
function deepCopy$1(values, size) {
|
|
15897
15901
|
if (isNil(size)) {
|
|
15898
|
-
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
15902
|
+
return (values || FAKE_ENTITIES$1).map(entity => Object.assign({}, entity));
|
|
15899
15903
|
}
|
|
15900
15904
|
let result = [];
|
|
15901
15905
|
let i = 1;
|
|
15902
15906
|
while (result.length < size) {
|
|
15903
|
-
result = result.concat((values || FAKE_ENTITIES).map(entity => {
|
|
15907
|
+
result = result.concat((values || FAKE_ENTITIES$1).map(entity => {
|
|
15904
15908
|
const name = entity.name + ' #' + i;
|
|
15905
15909
|
return Object.assign(Object.assign({}, entity), { id: i++, name });
|
|
15906
15910
|
}));
|
|
@@ -15910,7 +15914,7 @@ function deepCopy(values, size) {
|
|
|
15910
15914
|
class AutocompleteTestPage {
|
|
15911
15915
|
constructor(formBuilder) {
|
|
15912
15916
|
this.formBuilder = formBuilder;
|
|
15913
|
-
this._items = deepCopy(FAKE_ENTITIES, 100);
|
|
15917
|
+
this._items = deepCopy$1(FAKE_ENTITIES$1, 100);
|
|
15914
15918
|
this.$items = new BehaviorSubject(undefined);
|
|
15915
15919
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
15916
15920
|
this.memoryHide = false;
|
|
@@ -15954,7 +15958,7 @@ class AutocompleteTestPage {
|
|
|
15954
15958
|
});
|
|
15955
15959
|
// From items
|
|
15956
15960
|
this.autocompleteFields.add('entity-items-large', {
|
|
15957
|
-
items: FAKE_ENTITIES.slice(),
|
|
15961
|
+
items: FAKE_ENTITIES$1.slice(),
|
|
15958
15962
|
attributes: ['label', 'name', 'description', 'comments'],
|
|
15959
15963
|
displayWith: this.entityToString
|
|
15960
15964
|
});
|
|
@@ -15964,12 +15968,12 @@ class AutocompleteTestPage {
|
|
|
15964
15968
|
loadData() {
|
|
15965
15969
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15966
15970
|
const data = {
|
|
15967
|
-
entity: deepCopy(FAKE_ENTITIES)[0],
|
|
15971
|
+
entity: deepCopy$1(FAKE_ENTITIES$1)[0],
|
|
15968
15972
|
// This item is NOT in the items list => i should be displayed anyway
|
|
15969
15973
|
missingEntity: {
|
|
15970
15974
|
id: -1, label: '??', name: 'Missing item'
|
|
15971
15975
|
},
|
|
15972
|
-
disableEntity: deepCopy(FAKE_ENTITIES)[2]
|
|
15976
|
+
disableEntity: deepCopy$1(FAKE_ENTITIES$1)[2]
|
|
15973
15977
|
};
|
|
15974
15978
|
this.form.setValue(data);
|
|
15975
15979
|
// Load observables
|
|
@@ -16142,13 +16146,13 @@ MaterialTestingPage.ctorParameters = () => [
|
|
|
16142
16146
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [APP_TESTING_PAGES,] }] }
|
|
16143
16147
|
];
|
|
16144
16148
|
|
|
16145
|
-
const moment$
|
|
16149
|
+
const moment$1 = momentImported;
|
|
16146
16150
|
class SwipeTestPage {
|
|
16147
16151
|
constructor(formBuilder, dateFormatPipe) {
|
|
16148
16152
|
this.formBuilder = formBuilder;
|
|
16149
16153
|
this.dateFormatPipe = dateFormatPipe;
|
|
16150
16154
|
this.$dates = new BehaviorSubject(undefined);
|
|
16151
|
-
this._today = moment$
|
|
16155
|
+
this._today = moment$1().startOf('day');
|
|
16152
16156
|
this.form = formBuilder.group({
|
|
16153
16157
|
empty: [null, Validators.required],
|
|
16154
16158
|
date: [null, Validators.compose([Validators.required, SharedValidators.validDate])],
|
|
@@ -16161,7 +16165,7 @@ class SwipeTestPage {
|
|
|
16161
16165
|
ngOnInit() {
|
|
16162
16166
|
const dates = [];
|
|
16163
16167
|
for (let d = 0; d < 7; d++) {
|
|
16164
|
-
dates[d] = moment$
|
|
16168
|
+
dates[d] = moment$1(this._today).add(d - 3, 'day');
|
|
16165
16169
|
}
|
|
16166
16170
|
this.$dates.next(dates);
|
|
16167
16171
|
this.loadData();
|
|
@@ -16202,7 +16206,7 @@ SwipeTestPage.ctorParameters = () => [
|
|
|
16202
16206
|
{ type: DateFormatPipe }
|
|
16203
16207
|
];
|
|
16204
16208
|
|
|
16205
|
-
const moment
|
|
16209
|
+
const moment = momentImported;
|
|
16206
16210
|
class DateTimeTestPage {
|
|
16207
16211
|
constructor(platform, formBuilder, cd) {
|
|
16208
16212
|
this.platform = platform;
|
|
@@ -16234,7 +16238,7 @@ class DateTimeTestPage {
|
|
|
16234
16238
|
// Load the form with data
|
|
16235
16239
|
loadData() {
|
|
16236
16240
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16237
|
-
const now = moment
|
|
16241
|
+
const now = moment();
|
|
16238
16242
|
const data = {
|
|
16239
16243
|
empty: toDateISOString(now.clone().add(2, 'hours')),
|
|
16240
16244
|
enable: toDateISOString(now),
|
|
@@ -16295,20 +16299,20 @@ DateTimeTestPage.ctorParameters = () => [
|
|
|
16295
16299
|
{ type: ChangeDetectorRef }
|
|
16296
16300
|
];
|
|
16297
16301
|
|
|
16298
|
-
class EntityTestClass
|
|
16302
|
+
class EntityTestClass {
|
|
16299
16303
|
}
|
|
16300
|
-
const FAKE_ENTITIES
|
|
16304
|
+
const FAKE_ENTITIES = [
|
|
16301
16305
|
{ id: 1, label: 'AAA', name: 'Item A' },
|
|
16302
16306
|
{ id: 2, label: 'BBB', name: 'Item B' },
|
|
16303
16307
|
{ id: 3, label: 'CCC', name: 'Item C' }
|
|
16304
16308
|
];
|
|
16305
|
-
function deepCopy
|
|
16306
|
-
return (values || FAKE_ENTITIES
|
|
16309
|
+
function deepCopy(values) {
|
|
16310
|
+
return (values || FAKE_ENTITIES).map(entity => Object.assign({}, entity));
|
|
16307
16311
|
}
|
|
16308
16312
|
class ChipsTestPage {
|
|
16309
16313
|
constructor(formBuilder) {
|
|
16310
16314
|
this.formBuilder = formBuilder;
|
|
16311
|
-
this._items = deepCopy
|
|
16315
|
+
this._items = deepCopy(FAKE_ENTITIES);
|
|
16312
16316
|
this._$items = new BehaviorSubject(undefined);
|
|
16313
16317
|
this.autocompleteFields = new MatAutocompleteConfigHolder();
|
|
16314
16318
|
this.form = formBuilder.group({
|
|
@@ -16327,7 +16331,7 @@ class ChipsTestPage {
|
|
|
16327
16331
|
});
|
|
16328
16332
|
// From items
|
|
16329
16333
|
this.autocompleteFields.add('entity-items', {
|
|
16330
|
-
items: FAKE_ENTITIES
|
|
16334
|
+
items: FAKE_ENTITIES.slice(),
|
|
16331
16335
|
attributes: ['label', 'name'],
|
|
16332
16336
|
displayWith: this.entityToString
|
|
16333
16337
|
});
|
|
@@ -16348,15 +16352,15 @@ class ChipsTestPage {
|
|
|
16348
16352
|
const data = {
|
|
16349
16353
|
entity: [],
|
|
16350
16354
|
// THis item is NOT in the items list => i should be displayed anyway
|
|
16351
|
-
entityInitial: FAKE_ENTITIES
|
|
16352
|
-
disableEntity: FAKE_ENTITIES
|
|
16355
|
+
entityInitial: FAKE_ENTITIES.slice(1, 2),
|
|
16356
|
+
disableEntity: FAKE_ENTITIES.slice(1, 2)
|
|
16353
16357
|
};
|
|
16354
16358
|
this.form.setValue(data);
|
|
16355
16359
|
});
|
|
16356
16360
|
}
|
|
16357
16361
|
loadItems() {
|
|
16358
16362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16359
|
-
this._$items.next(deepCopy
|
|
16363
|
+
this._$items.next(deepCopy(FAKE_ENTITIES));
|
|
16360
16364
|
});
|
|
16361
16365
|
}
|
|
16362
16366
|
entityToString(item) {
|
|
@@ -16397,7 +16401,7 @@ MatBadgeIconTestPage.decorators = [
|
|
|
16397
16401
|
},] }
|
|
16398
16402
|
];
|
|
16399
16403
|
|
|
16400
|
-
const routes = [
|
|
16404
|
+
const routes$1 = [
|
|
16401
16405
|
{
|
|
16402
16406
|
path: '',
|
|
16403
16407
|
pathMatch: 'full',
|
|
@@ -16449,7 +16453,7 @@ MaterialTestingModule.decorators = [
|
|
|
16449
16453
|
ReactiveFormsModule,
|
|
16450
16454
|
SharedMaterialModule,
|
|
16451
16455
|
TranslateModule.forChild(),
|
|
16452
|
-
RouterModule.forChild(routes)
|
|
16456
|
+
RouterModule.forChild(routes$1)
|
|
16453
16457
|
],
|
|
16454
16458
|
declarations: [
|
|
16455
16459
|
MaterialTestingPage,
|
|
@@ -17408,7 +17412,7 @@ class UserSettingsValidatorService extends AppValidatorService {
|
|
|
17408
17412
|
});
|
|
17409
17413
|
}
|
|
17410
17414
|
}
|
|
17411
|
-
UserSettingsValidatorService.ɵprov =
|
|
17415
|
+
UserSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserSettingsValidatorService_Factory() { return new UserSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder)); }, token: UserSettingsValidatorService, providedIn: "root" });
|
|
17412
17416
|
UserSettingsValidatorService.decorators = [
|
|
17413
17417
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17414
17418
|
];
|
|
@@ -17452,7 +17456,7 @@ class AccountValidatorService extends AppValidatorService {
|
|
|
17452
17456
|
return validatorFns.length ? Validators.compose(validatorFns) : validatorFns.length === 1 ? validatorFns[0] : undefined;
|
|
17453
17457
|
}
|
|
17454
17458
|
}
|
|
17455
|
-
AccountValidatorService.ɵprov =
|
|
17459
|
+
AccountValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountValidatorService_Factory() { return new AccountValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountService)); }, token: AccountValidatorService, providedIn: "root" });
|
|
17456
17460
|
AccountValidatorService.decorators = [
|
|
17457
17461
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17458
17462
|
];
|
|
@@ -17671,6 +17675,7 @@ class FormButtonsBarComponent {
|
|
|
17671
17675
|
this.onSave = new EventEmitter();
|
|
17672
17676
|
this.onNext = new EventEmitter();
|
|
17673
17677
|
this.onBack = new EventEmitter();
|
|
17678
|
+
// Ctrl+S
|
|
17674
17679
|
this._subscription.add(hotkeys.addShortcut({ keys: 'control.s', description: 'COMMON.BTN_SAVE' })
|
|
17675
17680
|
.pipe(filter(e => !this.disabled))
|
|
17676
17681
|
.subscribe((event) => this.onSave.emit(event)));
|
|
@@ -17985,7 +17990,7 @@ class LocalSettingsValidatorService extends AppValidatorService {
|
|
|
17985
17990
|
});
|
|
17986
17991
|
}
|
|
17987
17992
|
}
|
|
17988
|
-
LocalSettingsValidatorService.ɵprov =
|
|
17993
|
+
LocalSettingsValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function LocalSettingsValidatorService_Factory() { return new LocalSettingsValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(NetworkService)); }, token: LocalSettingsValidatorService, providedIn: "root" });
|
|
17989
17994
|
LocalSettingsValidatorService.decorators = [
|
|
17990
17995
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
17991
17996
|
];
|
|
@@ -18603,7 +18608,7 @@ class IsOnFieldModePipe {
|
|
|
18603
18608
|
return value === 'FIELD';
|
|
18604
18609
|
}
|
|
18605
18610
|
}
|
|
18606
|
-
IsOnFieldModePipe.ɵprov =
|
|
18611
|
+
IsOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsOnFieldModePipe_Factory() { return new IsOnFieldModePipe(); }, token: IsOnFieldModePipe, providedIn: "root" });
|
|
18607
18612
|
IsOnFieldModePipe.decorators = [
|
|
18608
18613
|
{ type: Pipe, args: [{
|
|
18609
18614
|
name: 'isOnField'
|
|
@@ -18615,7 +18620,7 @@ class IsNotOnFieldModePipe {
|
|
|
18615
18620
|
return value !== 'FIELD';
|
|
18616
18621
|
}
|
|
18617
18622
|
}
|
|
18618
|
-
IsNotOnFieldModePipe.ɵprov =
|
|
18623
|
+
IsNotOnFieldModePipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsNotOnFieldModePipe_Factory() { return new IsNotOnFieldModePipe(); }, token: IsNotOnFieldModePipe, providedIn: "root" });
|
|
18619
18624
|
IsNotOnFieldModePipe.decorators = [
|
|
18620
18625
|
{ type: Pipe, args: [{
|
|
18621
18626
|
name: 'isNotOnField'
|
|
@@ -18630,7 +18635,7 @@ class PersonToStringPipe {
|
|
|
18630
18635
|
return PersonUtils.personToString(value);
|
|
18631
18636
|
}
|
|
18632
18637
|
}
|
|
18633
|
-
PersonToStringPipe.ɵprov =
|
|
18638
|
+
PersonToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonToStringPipe_Factory() { return new PersonToStringPipe(); }, token: PersonToStringPipe, providedIn: "root" });
|
|
18634
18639
|
PersonToStringPipe.decorators = [
|
|
18635
18640
|
{ type: Pipe, args: [{
|
|
18636
18641
|
name: 'personToString'
|
|
@@ -18976,7 +18981,7 @@ class IsLoginAccountPipe {
|
|
|
18976
18981
|
return value && value.pubkey && true;
|
|
18977
18982
|
}
|
|
18978
18983
|
}
|
|
18979
|
-
IsLoginAccountPipe.ɵprov =
|
|
18984
|
+
IsLoginAccountPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function IsLoginAccountPipe_Factory() { return new IsLoginAccountPipe(); }, token: IsLoginAccountPipe, providedIn: "root" });
|
|
18980
18985
|
IsLoginAccountPipe.decorators = [
|
|
18981
18986
|
{ type: Pipe, args: [{
|
|
18982
18987
|
name: 'isLogin'
|
|
@@ -18988,7 +18993,7 @@ class AccountToStringPipe {
|
|
|
18988
18993
|
return accountToString(value);
|
|
18989
18994
|
}
|
|
18990
18995
|
}
|
|
18991
|
-
AccountToStringPipe.ɵprov =
|
|
18996
|
+
AccountToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function AccountToStringPipe_Factory() { return new AccountToStringPipe(); }, token: AccountToStringPipe, providedIn: "root" });
|
|
18992
18997
|
AccountToStringPipe.decorators = [
|
|
18993
18998
|
{ type: Pipe, args: [{
|
|
18994
18999
|
name: 'accountToString'
|
|
@@ -19003,7 +19008,7 @@ class DepartmentToStringPipe {
|
|
|
19003
19008
|
return departmentToString(value);
|
|
19004
19009
|
}
|
|
19005
19010
|
}
|
|
19006
|
-
DepartmentToStringPipe.ɵprov =
|
|
19011
|
+
DepartmentToStringPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function DepartmentToStringPipe_Factory() { return new DepartmentToStringPipe(); }, token: DepartmentToStringPipe, providedIn: "root" });
|
|
19007
19012
|
DepartmentToStringPipe.decorators = [
|
|
19008
19013
|
{ type: Pipe, args: [{
|
|
19009
19014
|
name: 'departmentToString'
|
|
@@ -19029,7 +19034,7 @@ class MenuService {
|
|
|
19029
19034
|
this._visibleSubject.next(value);
|
|
19030
19035
|
}
|
|
19031
19036
|
}
|
|
19032
|
-
MenuService.ɵprov =
|
|
19037
|
+
MenuService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MenuService_Factory() { return new MenuService(); }, token: MenuService, providedIn: "root" });
|
|
19033
19038
|
MenuService.decorators = [
|
|
19034
19039
|
{ type: Injectable, args: [{
|
|
19035
19040
|
providedIn: 'root'
|
|
@@ -19523,7 +19528,7 @@ class AuthGuardService {
|
|
|
19523
19528
|
}));
|
|
19524
19529
|
}
|
|
19525
19530
|
}
|
|
19526
|
-
AuthGuardService.ɵprov =
|
|
19531
|
+
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" });
|
|
19527
19532
|
AuthGuardService.decorators = [
|
|
19528
19533
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
19529
19534
|
];
|
|
@@ -19571,7 +19576,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19571
19576
|
query,
|
|
19572
19577
|
variables: { id },
|
|
19573
19578
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19574
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19579
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19575
19580
|
})
|
|
19576
19581
|
.pipe(map(({ data }) => (!opts || opts.toEntity !== false)
|
|
19577
19582
|
? (data && this.fromObject(data))
|
|
@@ -19586,7 +19591,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19586
19591
|
query,
|
|
19587
19592
|
variables: { id },
|
|
19588
19593
|
fetchPolicy: opts && opts.fetchPolicy || undefined,
|
|
19589
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19594
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' }
|
|
19590
19595
|
});
|
|
19591
19596
|
// Convert to entity
|
|
19592
19597
|
return (!opts || opts.toEntity !== false)
|
|
@@ -19617,7 +19622,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19617
19622
|
totalFieldName: withTotal ? 'total' : undefined,
|
|
19618
19623
|
insertFilterFn: filter && filter.asFilterFn(),
|
|
19619
19624
|
variables,
|
|
19620
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19625
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'REFERENTIAL.ERROR.LOAD_DATA_ERROR' },
|
|
19621
19626
|
fetchPolicy: opts && opts.fetchPolicy || undefined
|
|
19622
19627
|
})
|
|
19623
19628
|
.pipe(map(({ data, total }) => {
|
|
@@ -19653,7 +19658,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19653
19658
|
const { data, total } = yield this.graphql.query({
|
|
19654
19659
|
query,
|
|
19655
19660
|
variables,
|
|
19656
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19661
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.LOAD_DATA_ERROR' },
|
|
19657
19662
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19658
19663
|
});
|
|
19659
19664
|
const entities = (!opts || opts.toEntity !== false) ?
|
|
@@ -19692,7 +19697,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19692
19697
|
variables: {
|
|
19693
19698
|
filter: filter && filter.asPodObject()
|
|
19694
19699
|
},
|
|
19695
|
-
error: { code: ErrorCodes.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19700
|
+
error: { code: ErrorCodes$2.LOAD_DATA_ERROR, message: 'ERROR.COUNT_DATA_ERROR' },
|
|
19696
19701
|
fetchPolicy: opts && opts.fetchPolicy || 'network-only'
|
|
19697
19702
|
});
|
|
19698
19703
|
return res.total;
|
|
@@ -19725,7 +19730,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19725
19730
|
variables: {
|
|
19726
19731
|
data: json
|
|
19727
19732
|
},
|
|
19728
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19733
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19729
19734
|
update: (proxy, { data }) => {
|
|
19730
19735
|
const savedEntities = data && data.data;
|
|
19731
19736
|
if (savedEntities) {
|
|
@@ -19781,7 +19786,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19781
19786
|
variables: {
|
|
19782
19787
|
data: json
|
|
19783
19788
|
},
|
|
19784
|
-
error: { code: ErrorCodes.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19789
|
+
error: { code: ErrorCodes$2.SAVE_DATA_ERROR, message: 'ERROR.SAVE_DATA_ERROR' },
|
|
19785
19790
|
update: (cache, { data }) => {
|
|
19786
19791
|
// Update entity
|
|
19787
19792
|
const savedEntity = data && data.data;
|
|
@@ -19829,7 +19834,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19829
19834
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19830
19835
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19831
19836
|
variables: { ids },
|
|
19832
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19837
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19833
19838
|
update: (cache, res) => {
|
|
19834
19839
|
// Remove from cache
|
|
19835
19840
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19870,7 +19875,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19870
19875
|
refetchQueries: this.getRefetchQueriesForMutation(opts),
|
|
19871
19876
|
awaitRefetchQueries: opts && opts.awaitRefetchQueries,
|
|
19872
19877
|
variables: { id },
|
|
19873
|
-
error: { code: ErrorCodes.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19878
|
+
error: { code: ErrorCodes$2.DELETE_DATA_ERROR, message: 'ERROR.DELETE_DATA_ERROR' },
|
|
19874
19879
|
update: (proxy, res) => {
|
|
19875
19880
|
// Remove from cache
|
|
19876
19881
|
if (this.watchQueriesUpdatePolicy === 'update-cache') {
|
|
@@ -19903,7 +19908,7 @@ class BaseEntityService extends BaseGraphqlService {
|
|
|
19903
19908
|
query: opts && opts.query || this.subscriptions.listenChanges,
|
|
19904
19909
|
variables,
|
|
19905
19910
|
error: {
|
|
19906
|
-
code: ErrorCodes.SUBSCRIBE_DATA_ERROR,
|
|
19911
|
+
code: ErrorCodes$2.SUBSCRIBE_DATA_ERROR,
|
|
19907
19912
|
message: 'ERROR.SUBSCRIBE_DATA_ERROR'
|
|
19908
19913
|
}
|
|
19909
19914
|
})
|
|
@@ -20078,7 +20083,7 @@ class EntitiesTableDataSource extends TableDataSource {
|
|
|
20078
20083
|
if (this._debug)
|
|
20079
20084
|
invalidRows.forEach(row => AppTableUtils.logRowErrors(row, `[table-datasource] ${this._logTypeName} row #${row.id}`));
|
|
20080
20085
|
// Stop with an error
|
|
20081
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20086
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20082
20087
|
}
|
|
20083
20088
|
this._editingRowCount = 0;
|
|
20084
20089
|
let data;
|
|
@@ -20900,14 +20905,14 @@ class AppTable {
|
|
|
20900
20905
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20901
20906
|
opts = Object.assign({ keepEditing: this.keepEditedRowOnSave }, opts);
|
|
20902
20907
|
if (this.readOnly) {
|
|
20903
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20908
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
20904
20909
|
}
|
|
20905
20910
|
this.resetError();
|
|
20906
20911
|
// Keep edited row id (should be done BEFORE confirmEditCreate() )
|
|
20907
20912
|
this.previouslyEditedRowId = opts.keepEditing && ((_a = this.editedRow) === null || _a === void 0 ? void 0 : _a.editing) ? this.editedRow.id : undefined;
|
|
20908
20913
|
const previouslyEditedData = isNotNil(this.previouslyEditedRowId) && this.editedRow.currentData || ((_b = this.singleSelectedRow) === null || _b === void 0 ? void 0 : _b.currentData);
|
|
20909
20914
|
if (!this.confirmEditCreate()) {
|
|
20910
|
-
throw { code: ErrorCodes.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20915
|
+
throw { code: ErrorCodes$2.TABLE_INVALID_ROW_ERROR, message: 'ERROR.TABLE_INVALID_ROW_ERROR' };
|
|
20911
20916
|
}
|
|
20912
20917
|
// Mark as saving
|
|
20913
20918
|
this.markAsSaving();
|
|
@@ -21023,7 +21028,7 @@ class AppTable {
|
|
|
21023
21028
|
deleteRows(event, rows, opts) {
|
|
21024
21029
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21025
21030
|
if (this.readOnly) {
|
|
21026
|
-
throw { code: ErrorCodes.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21031
|
+
throw { code: ErrorCodes$2.TABLE_READ_ONLY, message: 'ERROR.TABLE_READ_ONLY' };
|
|
21027
21032
|
}
|
|
21028
21033
|
if (event === null || event === void 0 ? void 0 : event.defaultPrevented)
|
|
21029
21034
|
return 0; // SKip
|
|
@@ -22434,7 +22439,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22434
22439
|
try {
|
|
22435
22440
|
const data = yield this.dataService.load(id, opts);
|
|
22436
22441
|
if (!data)
|
|
22437
|
-
throw { code: ErrorCodes.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22442
|
+
throw { code: ErrorCodes$2.DATA_NOT_FOUND_ERROR, message: 'ERROR.DATA_NO_FOUND' };
|
|
22438
22443
|
this._usageMode = this.computeUsageMode(data);
|
|
22439
22444
|
yield this.onEntityLoaded(data, opts);
|
|
22440
22445
|
yield this.updateView(data, opts);
|
|
@@ -23338,7 +23343,7 @@ class UserEventService extends BaseGraphqlService {
|
|
|
23338
23343
|
EntityUtils.copyIdAndUpdateDate(source, target);
|
|
23339
23344
|
}
|
|
23340
23345
|
}
|
|
23341
|
-
UserEventService.ɵprov =
|
|
23346
|
+
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" });
|
|
23342
23347
|
UserEventService.decorators = [
|
|
23343
23348
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23344
23349
|
];
|
|
@@ -23723,7 +23728,7 @@ class PersonService extends BaseEntityService {
|
|
|
23723
23728
|
return target;
|
|
23724
23729
|
}
|
|
23725
23730
|
}
|
|
23726
|
-
PersonService.ɵprov =
|
|
23731
|
+
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" });
|
|
23727
23732
|
PersonService.decorators = [
|
|
23728
23733
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23729
23734
|
];
|
|
@@ -23754,7 +23759,7 @@ class PersonValidatorService {
|
|
|
23754
23759
|
return this.formBuilder.group(formConfig);
|
|
23755
23760
|
}
|
|
23756
23761
|
}
|
|
23757
|
-
PersonValidatorService.ɵprov =
|
|
23762
|
+
PersonValidatorService.ɵprov = i0.ɵɵdefineInjectable({ factory: function PersonValidatorService_Factory() { return new PersonValidatorService(i0.ɵɵinject(i1$6.FormBuilder), i0.ɵɵinject(AccountValidatorService)); }, token: PersonValidatorService, providedIn: "root" });
|
|
23758
23763
|
PersonValidatorService.decorators = [
|
|
23759
23764
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
23760
23765
|
];
|
|
@@ -23960,16 +23965,16 @@ AdminModule.decorators = [
|
|
|
23960
23965
|
];
|
|
23961
23966
|
AdminModule.ctorParameters = () => [];
|
|
23962
23967
|
|
|
23963
|
-
const ɵ0
|
|
23968
|
+
const ɵ0 = {
|
|
23964
23969
|
profile: 'ADMIN'
|
|
23965
23970
|
};
|
|
23966
|
-
const routes
|
|
23971
|
+
const routes = [
|
|
23967
23972
|
{
|
|
23968
23973
|
path: 'users',
|
|
23969
23974
|
pathMatch: 'full',
|
|
23970
23975
|
component: UsersPage,
|
|
23971
23976
|
canActivate: [AuthGuardService],
|
|
23972
|
-
data: ɵ0
|
|
23977
|
+
data: ɵ0
|
|
23973
23978
|
}
|
|
23974
23979
|
];
|
|
23975
23980
|
class AdminRoutingModule {
|
|
@@ -23979,13 +23984,13 @@ AdminRoutingModule.decorators = [
|
|
|
23979
23984
|
imports: [
|
|
23980
23985
|
SharedRoutingModule,
|
|
23981
23986
|
AdminModule,
|
|
23982
|
-
RouterModule.forChild(routes
|
|
23987
|
+
RouterModule.forChild(routes)
|
|
23983
23988
|
],
|
|
23984
23989
|
exports: [RouterModule]
|
|
23985
23990
|
},] }
|
|
23986
23991
|
];
|
|
23987
23992
|
|
|
23988
|
-
const ErrorCodes
|
|
23993
|
+
const ErrorCodes = {
|
|
23989
23994
|
LOAD_PERSONS_ERROR: 100,
|
|
23990
23995
|
SAVE_PERSONS_ERROR: 101,
|
|
23991
23996
|
DELETE_PERSONS_ERROR: 102,
|
|
@@ -23997,5 +24002,5 @@ const ErrorCodes$2 = {
|
|
|
23997
24002
|
* Generated bundle index. Do not edit.
|
|
23998
24003
|
*/
|
|
23999
24004
|
|
|
24000
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes
|
|
24005
|
+
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, FormErrorTranslatePipe, FormErrorTranslator, FormFieldValuesHolder, Fragments, GraphqlService, HAMMER_PRESS_TIME, HAMMER_TAP_TIME, HighlightPipe, HomePage, Hotkeys, HotkeysDialogComponent, InMemoryEntitiesService, IsLoginAccountPipe, IsNilOrBlankPipe, IsNotNilOrBlankPipe, IsNotOnFieldModePipe, IsOnFieldModePipe, JobUtils, KEYBOARD_HIDE_DELAY_MS, LAT_LONG_DEFAULT_MAX_DECIMALS, LAT_LONG_PATTERNS, LatLongFormatPipe, LatLongTestPage, LatitudeFormatPipe, LocalSettingsService, LongitudeFormatPipe, MINIFY_ENTITY_FOR_LOCAL_STORAGE, MINIFY_ENTITY_FOR_POD, MapGetPipe, MapKeysPipe, MapValuesPipe, MatAutocompleteConfigHolder, MatAutocompleteField, MatBooleanField, MatChipsField, MatDate, MatDateShort, MatDateTime, MatDuration, MatLatLongField, MatNumpadComponent, MatNumpadContainerComponent, MatNumpadContent, MatPaginatorI18n, MatStepperI18n, MatSwipeField, MaterialChipsModule, MaterialTestingModule, MaterialTestingPage, MathAbsPipe, MenuComponent, MenuItems, MenuService, ModalToolbarComponent, NetworkService, NgInitDirective, NotEmptyArrayPipe, NumberFormatPipe, NumpadDirective, OddPipe, PRIORITIZED_AUTHORITIES, PUBKEY_REGEXP, Peer, Person, PersonFilter, PersonFragments, PersonService, PersonToStringPipe, PersonUtils, PersonValidatorService, PlatformService, ProgressBarService, ProgressInterceptor, PropertyGetPipe, RESERVED_END_COLUMNS, RESERVED_START_COLUMNS, Referential, ReferentialRef, ReferentialUtils, RegisterConfirmPage, SETTINGS_DISPLAY_COLUMNS, SETTINGS_FILTER, SETTINGS_PAGE_SIZE, SETTINGS_SORTED_COLUMN, SETTINGS_STORAGE_KEY, SETTINGS_TRANSIENT_PROPERTIES, SPACE_PLACEHOLDER_CHAR, SelectPeerModal, SettingsPage, SharedDirectivesModule, SharedFormArrayValidators, SharedFormGroupValidators, SharedHotkeysModule, SharedMatAutocompleteModule, SharedMatBooleanModule, SharedMatDateTimeModule, SharedMatDurationModule, SharedMatLatLongModule, SharedMatNumpadModule, SharedMatSwipeModule, SharedMaterialModule, SharedModule, SharedPipesModule, SharedRoutingModule, SharedTestingModule, SharedValidators, SocialModule, Software, StartableService, StatusById, StatusIds, StatusList, StrLengthPipe, SwipeTestPage, TableSelectColumnsComponent, ToStringPipe, Toasts, ToolbarComponent, ToolbarToken, TranslatablePipe, TranslateContextPipe, TranslateContextService, UserEvent, UserEventFilter, UserEventService, UserEventTypes, UserEventsTable, UserSettings, UsersPage, accountToString, adaptValueToControl, addValueInArray, arrayDistinct, arrayGroupBy, arraySize, asInputElement, canHaveFocus, capitalizeFirstLetter, chainPromises, changeCaseToUnderscore, clearValueInArray, copyEntity2Form, createPromiseEvent, createPromiseEventEmitter, departmentToString, departmentsToString, disableControls, emitPromiseEvent, entityToString, equalsOrNil, fadeInAnimation, fadeInOutAnimation, filterFalse, filterNotNil, filterNumberInput, filterTrue, firstArrayValue, firstFalsePromise, firstNotNil, firstNotNilPromise, firstTruePromise, focusInput, focusNextInput, focusPreviousInput, formatLatitude, formatLongitude, fromDateISOString, fromScrollEndEvent, fromUnixMsTimestamp, fromUnixTimestamp, getCaretPosition, getColorContrast, getColorShade, getColorTint, getConnectionType, getControlFromPath, getFocusableInputElements, getFormErrors, getFormValueFromEntity, getProperty, getPropertyByPath, getPropertyByPathAsString, getRandomImage, hexToRgb, hexToRgbArray, isControlHasInput, isEmptyArray, isInputElement, isInstanceOf, isInt, isNil, isNilOrBlank, isNilOrNaN, isNotEmptyArray, isNotNil, isNotNilOrBlank, isNotNilOrNaN, isNotNilString, isNumber, isNumberRange, joinProperties, joinPropertiesPath, logFormErrors, markAllAsTouched, markAsUntouched, markControlAsTouched, markFormGroupAsTouched, matchUpperCase, mergeLoadResult, mixHex, moveInputCaretToSeparator, noTrailingSlash, notNilOrDefault, nullIfUndefined, parseLatitudeOrLongitude, propertiesPathComparator, propertyComparator, propertyPathComparator, referentialToString, referentialsToString, remove, removeAll, removeDiacritics, removeDuplicatesFromArray, removeEnd, removeValueInArray, replaceAll, resetCalculatedValue, resizeArray, rgbArrayToHex, rgbToHex, round, scrollFactory, selectInputContent, selectInputRange, setCalculatedValue, setTabIndex, sleep, slideInOutAnimation, slideUpDownAnimation, sort, splitById, splitByProperty, startsWithUpperCase, suggestFromArray, suggestFromStringArray, tabindexComparator, toBoolean, toDateISOString, toDuration, toFloat, toInt, toNotNil, toNumber, trimEmptyToNull, uncapitalizeFirstLetter, updateValueAndValidity, waitFor, waitIdle, waitWhilePending, ɵ0$5 as ɵ0, CustomReuseStrategy as ɵa, MatNumpadDomService as ɵb, SharedMatBadgeIconModule as ɵc, MatBadgeIconDirective as ɵd, isFocusableElement as ɵe, MatBadgeIconTestPage as ɵf, RegisterForm as ɵg, AccountValidatorService as ɵh, RegisterModal as ɵi, UserSettingsValidatorService as ɵj, LocalSettingsValidatorService as ɵk };
|
|
24001
24006
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|