@sumaris-net/ngx-components 0.26.4 → 0.27.0
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 +170 -159
- 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 +4 -5
- package/esm2015/src/app/core/form/form-buttons-bar.component.js +2 -1
- package/esm2015/src/app/core/form/form.class.js +3 -3
- 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 +67 -83
- package/esm2015/src/app/core/table/table.class.js +3 -3
- 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 +9 -7
- package/esm2015/src/app/shared/pipes/form.pipes.js +3 -3
- package/esm2015/src/app/shared/services/startable-service.class.js +12 -5
- package/esm2015/src/app/shared/toolbar/modal-toolbar.js +6 -1
- package/esm2015/src/app/shared/validator/form-error-adapter.class.js +5 -5
- package/fesm2015/sumaris-net.ngx-components.js +97 -102
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +2 -2
- package/src/app/core/form/entity-editor.class.d.ts +2 -2
- package/src/app/core/form/form.class.d.ts +2 -2
- package/src/app/core/services/platform.service.d.ts +3 -15
- package/src/app/core/table/table.class.d.ts +2 -2
- package/src/app/shared/help/help.modal.d.ts +7 -1
- package/src/app/shared/pipes/form.pipes.d.ts +2 -2
- package/src/app/shared/services/startable-service.class.d.ts +2 -1
- package/src/app/shared/validator/form-error-adapter.class.d.ts +1 -1
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from
|
|
|
2
2
|
import { toBoolean } from '../functions';
|
|
3
3
|
import { Subscription } from 'rxjs';
|
|
4
4
|
import { Hotkeys } from '../hotkeys/hotkeys.service';
|
|
5
|
+
import { filter } from 'rxjs/operators';
|
|
5
6
|
export class ModalToolbarComponent {
|
|
6
7
|
constructor(hotkeys) {
|
|
7
8
|
this.hotkeys = hotkeys;
|
|
@@ -16,6 +17,10 @@ export class ModalToolbarComponent {
|
|
|
16
17
|
}
|
|
17
18
|
ngOnInit() {
|
|
18
19
|
this.canValidate = toBoolean(this.canValidate, this.validate.observers.length > 0);
|
|
20
|
+
// Ctrl+S
|
|
21
|
+
this._subscription.add(this.hotkeys.addShortcut({ keys: 'control.s', description: 'COMMON.BTN_VALIDATE', elementName: this.modalName })
|
|
22
|
+
.pipe(filter(() => this.canValidate))
|
|
23
|
+
.subscribe((event) => this.validate.emit(event)));
|
|
19
24
|
// Escape
|
|
20
25
|
this._subscription.add(this.hotkeys.addShortcut({ keys: 'escape', description: 'COMMON.BTN_CLOSE', elementName: this.modalName })
|
|
21
26
|
.subscribe((event) => this.cancel.emit(event)));
|
|
@@ -45,4 +50,4 @@ ModalToolbarComponent.propDecorators = {
|
|
|
45
50
|
cancel: [{ type: Output }],
|
|
46
51
|
validate: [{ type: Output }]
|
|
47
52
|
};
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtdG9vbGJhci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvc2hhcmVkL3Rvb2xiYXIvbW9kYWwtdG9vbGJhci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQXFCLE1BQU0s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jcmliZSgpO1xuICB9XG5cbn1cbiJdfQ==
|
|
@@ -6,7 +6,7 @@ import { SharedValidators } from './validators';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
import * as i1 from "@ngx-translate/core";
|
|
8
8
|
export const APP_FORM_ERROR_I18N_KEYS = new InjectionToken('appFormErrorKeys');
|
|
9
|
-
export class
|
|
9
|
+
export class FormErrorTranslator {
|
|
10
10
|
constructor(translate, errorI18nKeys) {
|
|
11
11
|
this.translate = translate;
|
|
12
12
|
this.errorI18nKeys = Object.assign(Object.assign({}, SharedValidators.I18N_ERROR_KEYS), errorI18nKeys);
|
|
@@ -64,12 +64,12 @@ export class FormErrorAdapter {
|
|
|
64
64
|
return errorKey;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
FormErrorTranslator.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormErrorTranslator_Factory() { return new FormErrorTranslator(i0.ɵɵinject(i1.TranslateService), i0.ɵɵinject(APP_FORM_ERROR_I18N_KEYS, 8)); }, token: FormErrorTranslator, providedIn: "root" });
|
|
68
|
+
FormErrorTranslator.decorators = [
|
|
69
69
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
70
70
|
];
|
|
71
|
-
|
|
71
|
+
FormErrorTranslator.ctorParameters = () => [
|
|
72
72
|
{ type: TranslateService },
|
|
73
73
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_FORM_ERROR_I18N_KEYS,] }] }
|
|
74
74
|
];
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1lcnJvci1hZGFwdGVyLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9zaGFyZWQvdmFsaWRhdG9yL2Zvcm0tZXJyb3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RVlTIGluamVjdGlvbiB0b2tlbmApO1xuXG4gICAgcmV0dXJuIGVycm9yS2V5O1xuICB9XG59XG4iXX0=
|
|
@@ -37,7 +37,7 @@ import { __awaiter, __decorate } from 'tslib';
|
|
|
37
37
|
import * as i1$6 from '@angular/forms';
|
|
38
38
|
import { NG_VALUE_ACCESSOR, FormGroupDirective, AbstractControl, FormGroup, FormArray, FormControl, ReactiveFormsModule, Validators, FormBuilder } from '@angular/forms';
|
|
39
39
|
import { timer, merge, fromEvent, Subscription, BehaviorSubject, Subject, isObservable, of, noop as noop$8, Observable, defer, from, combineLatest, EMPTY } from 'rxjs';
|
|
40
|
-
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
41
|
import * as i1$1 from '@ngx-translate/core';
|
|
42
42
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
43
43
|
import * as i1$4 from '@ionic/angular';
|
|
@@ -1490,7 +1490,7 @@ MatAutocompleteField.decorators = [
|
|
|
1490
1490
|
{ type: Component, args: [{
|
|
1491
1491
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1492
1492
|
selector: 'mat-autocomplete-field',
|
|
1493
|
-
template: "<ion-grid class=\"ion-no-padding\">\n <ion-row>\n <ion-col class=\"ion-no-padding\">\n <mat-form-field *ngIf=\"_readonly; else writable\"\n [floatLabel]=\"floatLabel\"\n [title]=\"displayValue\"\n class=\"mat-form-field-disabled\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- readonly -->\n <ng-container>\n <input matInput hidden type=\"text\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\" readonly>\n <ion-text>{{displayWith(value)}}</ion-text>\n </ng-container>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n </mat-form-field>\n\n <ng-template #writable>\n <mat-form-field [floatLabel]=\"floatLabel\"\n [class.mat-form-field-disabled]=\"disabled\"\n [title]=\"displayValue\">\n\n <div matPrefix>\n <ng-container *ngTemplateOutlet=\"matPrefixTemplate\"></ng-container>\n </div>\n\n <!-- Basic select -->\n <mat-select #matSelect\n *ngIf=\"!searchable; else searchableTemplate\"\n [placeholder]=\"placeholder\"\n [formControl]=\"formControl\"\n [tabindex]=\"_tabindex\"\n [panelClass]=\"classList\"\n [style.width]=\"panelWidth\"\n (focus)=\"filterMatSelectFocusEvent($event)\"\n (blur)=\"filterMatSelectBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n [compareWith]=\"compareWith\"\n [multiple]=\"multiple\"\n [required]=\"required\">\n <mat-select-trigger>{{ displayWith(value) }}</mat-select-trigger>\n\n <!-- header -->\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as isLast\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n </ion-col>\n </ion-row>\n\n <!-- None option -->\n <mat-option *ngIf=\"!required\" class=\"ion-no-padding\">\n <ion-row class=\"ion-no-padding\">\n <ion-col class=\"ion-no-padding\">\n <ion-label><i translate>COMMON.EMPTY_OPTION</i></ion-label>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <ng-container *ngIf=\"$filteredItems | async; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <!-- options -->\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text>{{item | propertyGet: path }}</ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initMatSelectInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n </mat-select>\n\n\n <!--\n NOTE :\n - \"selectInputContent($event) || onFocus.emit($event)\" : call onFocus only when to the input is empty (nothing to select)\n -->\n <ng-template #searchableTemplate>\n <input matInput #matInputText type=\"text\"\n [matAutocomplete]=\"autocomplete\"\n [matAutocompletePosition]=\"matAutocompletePosition\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [appAutofocus]=\"autofocus\"\n [tabindex]=\"_tabindex\"\n [required]=\"required\"\n (click)=\"onClick.emit($event)\"\n (focus)=\"filterInputTextFocusInEvent($event)\"\n (blur)=\"filterInputTextBlurEvent($event)\"\n (keydown.escape)=\"onKeydownEscape.emit($event)\"\n (keyup.enter)=\"onKeyupEnter.emit($event)\"\n (keyup.arrowdown)=\"!autocomplete.opened && onDropButtonClick.emit($event)\">\n\n <!-- autocomplete -->\n <mat-autocomplete #autocomplete=\"matAutocomplete\"\n autoActiveFirstOption\n [displayWith]=\"displayWith\"\n [class]=\"classList\"\n [class.cdk-visually-hidden]=\"!searchable\"\n [panelWidth]=\"panelWidth\">\n\n <ion-row class=\"mat-autocomplete-header ion-no-padding\">\n <ion-col *ngFor=\"let attr of displayAttributes; index as i; last as last\" [size]=\"displayColumnSizes[i]\">\n <ion-label [innerHTML]=\"displayColumnNames[i] | translate\"></ion-label>\n <ion-text color=\"light\" *ngIf=\"last && itemCount; let count \" class=\"ion-float-end ion-padding-end\"><i>{{'COMMON.RESULT_COUNT'|translate: {count: count} }}</i></ion-text>\n </ion-col>\n </ion-row>\n\n <ng-container *ngIf=\"$filteredItems | async; else loadingTemplate; let items\">\n <!-- No item option -->\n <mat-option *ngIf=\"items | isEmptyArray\" class=\"ion-padding text-italic\" disabled>\n <ion-label>{{noResultMessage | translate}}</ion-label>\n </mat-option>\n\n <mat-option *ngFor=\"let item of items\" [value]=\"item\" class=\"ion-no-padding\">\n <ion-row [classList]=\"item.classList\">\n <ion-col *ngFor=\"let path of displayAttributes; index as i;\"\n [size]=\"displayColumnSizes[i]\">\n <ion-text [innerHTML]=\"item | propertyGet: path | highlight: { search: formControl.value, withAccent: highlightAccent }\"></ion-text>\n </ion-col>\n </ion-row>\n </mat-option>\n\n <!-- More item -->\n <mat-option *ngIf=\"_moreItemsCount\" (ngInit)=\"_initAutocompleteInfiniteScroll()\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-container>\n\n <!-- Loading spinner -->\n <ng-template #loadingTemplate>\n <mat-option *ngIf=\"(matInputText.value | strLength) >= suggestLengthThreshold; else waitMoreCharacterTemplate\"\n class=\"ion-padding\" disabled>\n <ion-skeleton-text [animated]=\"true\" style=\"width: 100%\"></ion-skeleton-text>\n </mat-option>\n </ng-template>\n\n <!-- Need more characters -->\n <ng-template #waitMoreCharacterTemplate>\n <mat-option class=\"ion-padding text-italic\" disabled>\n <ion-label>\n {{'INFO.PLEASE_TYPE_MORE_CHARACTERS'|translate:{minLength: suggestLengthThreshold} }}\n </ion-label>\n </mat-option>\n </ng-template>\n </mat-autocomplete>\n\n </ng-template>\n\n <div matSuffix>\n <ng-container *ngTemplateOutlet=\"matSuffixTemplate\"></ng-container>\n </div>\n\n <mat-error *ngIf=\"formControl.hasError('required')\" translate>ERROR.FIELD_REQUIRED</mat-error>\n <mat-error *ngIf=\"formControl.hasError('entity')\" translate>ERROR.FIELD_INVALID</mat-error>\n <ng-content select=\"[matError]\"></ng-content>\n\n </mat-form-field>\n </ng-template>\n </ion-col>\n <ion-col size=\"auto\" class=\"ion-align-self-center\">\n <ng-content select=\"[matAfter]\"></ng-content>\n </ion-col>\n </ion-row>\n\n</ion-grid>\n\n<ng-template #matPrefixTemplate>\n <ng-content select=\"[matPrefix]\"></ng-content>\n</ng-template>\n\n\n<ng-template #matSuffixTemplate>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"searchable\"\n (click)=\"onDropButtonClick.emit($event)\"\n [hidden]=\"disabled\">\n <mat-icon class=\"large select-arrow\">arrow_drop_down</mat-icon>\n </button>\n <button matSuffix type=\"button\" mat-icon-button tabindex=\"-1\"\n *ngIf=\"enabled && mobile && !searchable && !multiple\"\n [title]=\"'COMMON.BTN_SEARCH'|translate\"\n (click)=\"toggleSearch($event)\">\n <mat-icon>search</mat-icon>\n </button>\n <button matSuffix mat-icon-button tabindex=\"-1\"\n type=\"button\"\n *ngIf=\"clearable\"\n (click)=\"clearValue($event)\"\n [hidden]=\"disabled || !formControl.value\">\n <mat-icon>close</mat-icon>\n </button>\n\n <ng-content select=\"[matSuffix]\"></ng-content>\n</ng-template>\n",
|
|
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
1494
|
providers: [DEFAULT_VALUE_ACCESSOR$6],
|
|
1495
1495
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1496
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}"]
|
|
@@ -3469,7 +3469,7 @@ class FormArrayHelper {
|
|
|
3469
3469
|
}
|
|
3470
3470
|
|
|
3471
3471
|
const APP_FORM_ERROR_I18N_KEYS = new InjectionToken('appFormErrorKeys');
|
|
3472
|
-
class
|
|
3472
|
+
class FormErrorTranslator {
|
|
3473
3473
|
constructor(translate, errorI18nKeys) {
|
|
3474
3474
|
this.translate = translate;
|
|
3475
3475
|
this.errorI18nKeys = Object.assign(Object.assign({}, SharedValidators.I18N_ERROR_KEYS), errorI18nKeys);
|
|
@@ -3527,11 +3527,11 @@ class FormErrorAdapter {
|
|
|
3527
3527
|
return errorKey;
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
|
-
|
|
3531
|
-
|
|
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" });
|
|
3531
|
+
FormErrorTranslator.decorators = [
|
|
3532
3532
|
{ type: Injectable, args: [{ providedIn: 'root' },] }
|
|
3533
3533
|
];
|
|
3534
|
-
|
|
3534
|
+
FormErrorTranslator.ctorParameters = () => [
|
|
3535
3535
|
{ type: TranslateService },
|
|
3536
3536
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_FORM_ERROR_I18N_KEYS,] }] }
|
|
3537
3537
|
];
|
|
@@ -3550,7 +3550,7 @@ FormErrorTranslatePipe.decorators = [
|
|
|
3550
3550
|
},] }
|
|
3551
3551
|
];
|
|
3552
3552
|
FormErrorTranslatePipe.ctorParameters = () => [
|
|
3553
|
-
{ type:
|
|
3553
|
+
{ type: FormErrorTranslator }
|
|
3554
3554
|
];
|
|
3555
3555
|
|
|
3556
3556
|
class SharedPipesModule {
|
|
@@ -6933,19 +6933,21 @@ class MatBadgeIconDirective {
|
|
|
6933
6933
|
badge.style.display = 'flex';
|
|
6934
6934
|
badge.style.alignItems = 'center';
|
|
6935
6935
|
badge.style.justifyContent = 'center';
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
badge.style.color = `var(--ion-color-${this.color}-contrast)`;
|
|
6939
|
-
}
|
|
6940
|
-
else {
|
|
6936
|
+
// fill: 'clear'
|
|
6937
|
+
if (this.fill === 'clear') {
|
|
6941
6938
|
badge.style.color = `var(--ion-color-${this.color})`;
|
|
6942
6939
|
badge.style.background = 'transparent';
|
|
6943
6940
|
}
|
|
6941
|
+
// fill: 'solid' (default value)
|
|
6942
|
+
else {
|
|
6943
|
+
badge.style.background = `var(--ion-color-${this.color})`;
|
|
6944
|
+
badge.style.color = `var(--ion-color-${this.color}-contrast)`;
|
|
6945
|
+
}
|
|
6944
6946
|
if (this.matIcon) {
|
|
6945
6947
|
badge.innerHTML = `<i class="material-icons" style="font-size: ${fontSize};">${this.matIcon}</i>`;
|
|
6946
6948
|
}
|
|
6947
6949
|
else if (this.ionIcon) {
|
|
6948
|
-
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>`;
|
|
6949
6951
|
}
|
|
6950
6952
|
}
|
|
6951
6953
|
}
|
|
@@ -7617,13 +7619,14 @@ AppFormField.propDecorators = {
|
|
|
7617
7619
|
};
|
|
7618
7620
|
|
|
7619
7621
|
class StartableService {
|
|
7620
|
-
constructor(
|
|
7622
|
+
constructor(prerequisiteService) {
|
|
7621
7623
|
this.onStart = new Subject();
|
|
7622
7624
|
this._debug = false;
|
|
7625
|
+
this._startByReadyFunction = true; // should start when calling ready() ?
|
|
7623
7626
|
this._data = null;
|
|
7624
7627
|
this._started = false;
|
|
7625
|
-
this._startPrerequisite =
|
|
7626
|
-
? () =>
|
|
7628
|
+
this._startPrerequisite = prerequisiteService
|
|
7629
|
+
? () => prerequisiteService.ready()
|
|
7627
7630
|
: () => Promise.resolve();
|
|
7628
7631
|
}
|
|
7629
7632
|
start() {
|
|
@@ -7678,7 +7681,12 @@ class StartableService {
|
|
|
7678
7681
|
ready() {
|
|
7679
7682
|
if (this._started)
|
|
7680
7683
|
return Promise.resolve(this._data);
|
|
7681
|
-
|
|
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);
|
|
7682
7690
|
}
|
|
7683
7691
|
ngOnStop() {
|
|
7684
7692
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -8230,6 +8238,10 @@ class ModalToolbarComponent {
|
|
|
8230
8238
|
}
|
|
8231
8239
|
ngOnInit() {
|
|
8232
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)));
|
|
8233
8245
|
// Escape
|
|
8234
8246
|
this._subscription.add(this.hotkeys.addShortcut({ keys: 'escape', description: 'COMMON.BTN_CLOSE', elementName: this.modalName })
|
|
8235
8247
|
.subscribe((event) => this.cancel.emit(event)));
|
|
@@ -12254,7 +12266,6 @@ class GraphqlService extends StartableService {
|
|
|
12254
12266
|
.append('Authorization', authorization);
|
|
12255
12267
|
//.append('X-App-Name', environment.name)
|
|
12256
12268
|
//.append('X-App-Version', environment.version)
|
|
12257
|
-
;
|
|
12258
12269
|
// Use the setContext method to set the HTTP headers.
|
|
12259
12270
|
operation.setContext(Object.assign(Object.assign({}, operation.getContext()), { headers }));
|
|
12260
12271
|
// Call the next link in the middleware chain.
|
|
@@ -14365,8 +14376,9 @@ ConfigService.ctorParameters = () => [
|
|
|
14365
14376
|
];
|
|
14366
14377
|
|
|
14367
14378
|
const moment$2 = momentImported;
|
|
14368
|
-
class PlatformService {
|
|
14379
|
+
class PlatformService extends StartableService {
|
|
14369
14380
|
constructor(platform, cdkPlatform, toastController, translate, dateAdapter, entitiesStorage, settings, networkService, accountService, configService, cache, storage, audioProvider, environment, statusBar, keyboard, splashScreen, browser, downloader) {
|
|
14381
|
+
super(platform);
|
|
14370
14382
|
this.platform = platform;
|
|
14371
14383
|
this.cdkPlatform = cdkPlatform;
|
|
14372
14384
|
this.toastController = toastController;
|
|
@@ -14386,15 +14398,13 @@ class PlatformService {
|
|
|
14386
14398
|
this.splashScreen = splashScreen;
|
|
14387
14399
|
this.browser = browser;
|
|
14388
14400
|
this.downloader = downloader;
|
|
14389
|
-
this._started = false;
|
|
14390
14401
|
this._downloadingJobs = new Map();
|
|
14391
14402
|
this._debug = !environment.production;
|
|
14392
14403
|
if (this._debug)
|
|
14393
14404
|
console.debug('[platform] Creating service');
|
|
14394
|
-
this.start()
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
return this._started;
|
|
14405
|
+
this.start()
|
|
14406
|
+
// Manage error
|
|
14407
|
+
.catch(err => this.onStartupError(err));
|
|
14398
14408
|
}
|
|
14399
14409
|
get mobile() {
|
|
14400
14410
|
return isNotNil(this._mobile) ? this._mobile : this.platform.is('mobile');
|
|
@@ -14421,78 +14431,62 @@ class PlatformService {
|
|
|
14421
14431
|
height() {
|
|
14422
14432
|
return this.platform.height();
|
|
14423
14433
|
}
|
|
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
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
}
|
|
14481
|
-
/**
|
|
14482
|
-
* Wait platform is ready.<br/>
|
|
14483
|
-
* Important: this will NOT start the platform, has it should be started by the AppComponent
|
|
14484
|
-
*
|
|
14485
|
-
* @param opts
|
|
14486
|
-
*/
|
|
14487
|
-
ready(opts) {
|
|
14488
|
-
const period = opts && opts.checkPeriod || 300;
|
|
14489
|
-
if (this._started)
|
|
14490
|
-
return Promise.resolve();
|
|
14491
|
-
return timer(period, period)
|
|
14492
|
-
.pipe(
|
|
14493
|
-
// For DEBUG :
|
|
14494
|
-
//tap(() => this._debug && console.debug("Waiting platform ready...")),
|
|
14495
|
-
filter(() => this._started), first()).toPromise();
|
|
14434
|
+
ngOnStart() {
|
|
14435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14436
|
+
const now = Date.now();
|
|
14437
|
+
this.accountService.tokenType = undefined;
|
|
14438
|
+
console.info('[platform] Starting platform...');
|
|
14439
|
+
try {
|
|
14440
|
+
this._mobile = this.platform.is('mobile');
|
|
14441
|
+
this._cordova = this.platform.is('cordova');
|
|
14442
|
+
this._android = this.platform.is('android');
|
|
14443
|
+
this.configureCordovaPlugins(this._mobile);
|
|
14444
|
+
this.touchUi = this._mobile || this.platform.is('tablet') || this.platform.is('phablet');
|
|
14445
|
+
// Force mobile in settings
|
|
14446
|
+
if (this._mobile) {
|
|
14447
|
+
this.settings.mobile = this._mobile;
|
|
14448
|
+
this.settings.touchUi = this.touchUi;
|
|
14449
|
+
}
|
|
14450
|
+
// Configure translation
|
|
14451
|
+
yield this.configureTranslate();
|
|
14452
|
+
// Configure storage
|
|
14453
|
+
const forage = yield this.storageReady();
|
|
14454
|
+
yield this.migrateStorage(forage);
|
|
14455
|
+
// Start root services
|
|
14456
|
+
yield Promise.all([
|
|
14457
|
+
this.entitiesStorage.ready(),
|
|
14458
|
+
this.cache.ready().then(() => this.configureCache()),
|
|
14459
|
+
this.settings.ready(),
|
|
14460
|
+
this.networkService.ready(),
|
|
14461
|
+
this.audioProvider.ready()
|
|
14462
|
+
]);
|
|
14463
|
+
console.info(`[platform] Starting platform [OK] {mobile: ${this._mobile}, touchUi: ${this.touchUi}, downloader: ${this.canDownload}} in ${Date.now() - now}ms`);
|
|
14464
|
+
// Update cache configuration when network changed
|
|
14465
|
+
this.networkService.onNetworkStatusChanges
|
|
14466
|
+
.pipe(skip(1)) // Skip the first event (behavior subject send event immediately)
|
|
14467
|
+
.subscribe(type => this.configureCache(type !== 'none'));
|
|
14468
|
+
// Update authentication type
|
|
14469
|
+
this.configService.config
|
|
14470
|
+
.pipe(map(config => config === null || config === void 0 ? void 0 : config.getProperty(CORE_CONFIG_OPTIONS.AUTH_TOKEN_TYPE)), filter(isNotNilOrBlank), distinctUntilChanged())
|
|
14471
|
+
.subscribe(tokenType => {
|
|
14472
|
+
console.info(`[platform] Using auth token type {${tokenType}}`);
|
|
14473
|
+
this.accountService.tokenType = tokenType;
|
|
14474
|
+
});
|
|
14475
|
+
// Hide the splashscreen (if mobile) - after 1s
|
|
14476
|
+
if (this.mobile) {
|
|
14477
|
+
setTimeout(() => {
|
|
14478
|
+
var _a;
|
|
14479
|
+
(_a = this.splashScreen) === null || _a === void 0 ? void 0 : _a.hide();
|
|
14480
|
+
// Play startup sound
|
|
14481
|
+
this.audioProvider.playStartupSound();
|
|
14482
|
+
}, 1000);
|
|
14483
|
+
}
|
|
14484
|
+
}
|
|
14485
|
+
catch (err) {
|
|
14486
|
+
// Manage startup error
|
|
14487
|
+
return this.onStartupError(err);
|
|
14488
|
+
}
|
|
14489
|
+
});
|
|
14496
14490
|
}
|
|
14497
14491
|
open(url, target, features, replace) {
|
|
14498
14492
|
console.info(`[platform] Opening link: ${url}`);
|
|
@@ -14603,9 +14597,9 @@ class PlatformService {
|
|
|
14603
14597
|
});
|
|
14604
14598
|
}
|
|
14605
14599
|
configureCache(online) {
|
|
14606
|
-
online =
|
|
14600
|
+
online = toBoolean(online, this.cache.isOnline());
|
|
14607
14601
|
const cacheTTL = online ? 3600 /* 1h */ : 3600 * 24 * 30; /* 1 month */
|
|
14608
|
-
console.info(`[platform] Configuring cache [OK] {online: ${online}
|
|
14602
|
+
console.info(`[platform] Configuring cache [OK] {online: ${online}, timeToLive: ${cacheTTL / 3600}h, offlineInvalidate: false}`);
|
|
14609
14603
|
this.cache.setDefaultTTL(cacheTTL);
|
|
14610
14604
|
this.cache.setOfflineInvalidate(false); // Do not invalidate cache when offline
|
|
14611
14605
|
}
|
|
@@ -16568,7 +16562,7 @@ class AppForm {
|
|
|
16568
16562
|
if (form)
|
|
16569
16563
|
this.setForm(form);
|
|
16570
16564
|
this.settings = injector.get(LocalSettingsService);
|
|
16571
|
-
this.errorTranslator = injector.get(
|
|
16565
|
+
this.errorTranslator = injector.get(FormErrorTranslator);
|
|
16572
16566
|
this.autocompleteHelper = new MatAutocompleteConfigHolder(this.settings && {
|
|
16573
16567
|
getUserAttributes: (a, b) => this.settings.getFieldDisplayAttributes(a, b)
|
|
16574
16568
|
});
|
|
@@ -17684,6 +17678,7 @@ class FormButtonsBarComponent {
|
|
|
17684
17678
|
this.onSave = new EventEmitter();
|
|
17685
17679
|
this.onNext = new EventEmitter();
|
|
17686
17680
|
this.onBack = new EventEmitter();
|
|
17681
|
+
// Ctrl+S
|
|
17687
17682
|
this._subscription.add(hotkeys.addShortcut({ keys: 'control.s', description: 'COMMON.BTN_SAVE' })
|
|
17688
17683
|
.pipe(filter(e => !this.disabled))
|
|
17689
17684
|
.subscribe((event) => this.onSave.emit(event)));
|
|
@@ -20374,7 +20369,7 @@ class AppTable {
|
|
|
20374
20369
|
this._paginator = null;
|
|
20375
20370
|
this.mobile = this.platform.is('mobile');
|
|
20376
20371
|
this.translate = injector === null || injector === void 0 ? void 0 : injector.get(TranslateService);
|
|
20377
|
-
this.formErrorAdapter = injector === null || injector === void 0 ? void 0 : injector.get(
|
|
20372
|
+
this.formErrorAdapter = injector === null || injector === void 0 ? void 0 : injector.get(FormErrorTranslator);
|
|
20378
20373
|
this.alertCtrl = injector === null || injector === void 0 ? void 0 : injector.get(AlertController);
|
|
20379
20374
|
this.toastController = injector === null || injector === void 0 ? void 0 : injector.get(ToastController);
|
|
20380
20375
|
this._autocompleteConfigHolder = new MatAutocompleteConfigHolder({
|
|
@@ -22323,7 +22318,7 @@ class AppEntityEditor extends AppTabEditor {
|
|
|
22323
22318
|
// Default options
|
|
22324
22319
|
enableListenChanges: (injector.get(ENVIRONMENT).listenRemoteChanges === true), pathIdAttribute: 'id', autoLoad: true, autoUpdateRoute: true, i18nPrefix: '' }, options);
|
|
22325
22320
|
this.settings = injector.get(LocalSettingsService);
|
|
22326
|
-
this.formErrorAdapter = injector.get(
|
|
22321
|
+
this.formErrorAdapter = injector.get(FormErrorTranslator);
|
|
22327
22322
|
this.cd = injector.get(ChangeDetectorRef);
|
|
22328
22323
|
this.dateFormat = injector.get(DateFormatPipe);
|
|
22329
22324
|
this.toastController = injector.get(ToastController);
|
|
@@ -24010,5 +24005,5 @@ const ErrorCodes = {
|
|
|
24010
24005
|
* Generated bundle index. Do not edit.
|
|
24011
24006
|
*/
|
|
24012
24007
|
|
|
24013
|
-
export { APP_ABOUT_DEVELOPERS, APP_ABOUT_PARTNERS, APP_CONFIG_OPTIONS, APP_FORM_ERROR_I18N_KEYS, APP_GRAPHQL_TYPE_POLICIES, APP_HOME_BUTTONS, APP_LOCALES, APP_LOCAL_SETTINGS, APP_LOCAL_SETTINGS_OPTIONS, APP_LOCAL_STORAGE_TYPE_POLICIES, APP_MENU_ITEMS, APP_TESTING_PAGES, AboutModal, Account, AccountPage, AccountService, AccountToStringPipe, ActionsColumnComponent, AdminModule, AdminRoutingModule, Alerts, AnimationState, AppEditorOptions, AppEntityEditor, AppForm, AppFormField, AppFormProvider, AppFormUtils, AppGestureConfig, AppGraphQLModule, AppHelpModal, AppInMemoryTable, AppInstallUpgradeCard, AppListForm, AppLoadingSpinner, AppMenuModule, AppNullForm, AppPropertiesForm, AppTabEditor, AppTabEditorOptions, AppTable, AppTableDataSourceOptions, AppTableUtils, AppValidatorService, AppendToInputDirective, ArrayFilterPipe, ArrayFirstPipe, ArrayIncludesPipe, ArrayLengthPipe, ArrayPluckPipe, AudioProvider, AuthForm, AuthGuardService, AuthModal, AutocompleteTestPage, AutofocusDirective, Base58, BaseEntityService, BaseGraphqlService, BaseGraphqlServiceOptions, BaseReferential, Beans, CORE_CONFIG_OPTIONS, CellValueChangeListener, ChipsTestPage, Color, ColorScale, ComponentDirtyGuard, ConfigService, Configuration, CoreModule, CryptoService, DATE_ISO_PATTERN, DATE_UNIX_MS_TIMESTAMP, DATE_UNIX_TIMESTAMP, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PLACEHOLDER_CHAR, DEFAULT_REQUIRED_COLUMNS, DateDiffDurationPipe, DateFormatPipe, DateFromNowPipe, DateTimeTestPage, DateUtils, Department, DepartmentToStringPipe, DurationPipe, ENTITIES_STORAGE_KEY_PREFIX, ENVIRONMENT, EmptyArrayPipe, EntitiesService, EntitiesStorage, EntitiesTableDataSource, Entity, EntityClass, EntityClasses, EntityFilter, EntityFilterUtils, EntityMetadataComponent, EntityStore, EntityUtils, Environment, ErrorCodes, EvenPipe, FileService, FileSizePipe, FormArrayHelper, FormButtonsBarComponent, FormButtonsBarToken,
|
|
24008
|
+
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 };
|
|
24014
24009
|
//# sourceMappingURL=sumaris-net.ngx-components.js.map
|