@esfaenza/core 19.2.91 → 19.2.93
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.
|
@@ -11,7 +11,7 @@ import { BaseSelectorInitialization } from "./models/BaseSelectorInitialization"
|
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
12
12
|
export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TItem> {
|
|
13
13
|
private injector;
|
|
14
|
-
Initialized: ReplaySubject<
|
|
14
|
+
Initialized: ReplaySubject<boolean>;
|
|
15
15
|
itemSearch: import("@angular/core").Signal<ModalDirective>;
|
|
16
16
|
EsTableTemplate: import("@angular/core").Signal<ThTdProvider>;
|
|
17
17
|
FiltersTemplate: import("@angular/core").Signal<TemplateRef<any>>;
|
|
@@ -77,7 +77,7 @@ export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TIt
|
|
|
77
77
|
_outer: BaseSelectorComponent<any, any>;
|
|
78
78
|
bridge(outer: BaseSelectorComponent<any, any>): void;
|
|
79
79
|
ngOnInit(): Promise<void>;
|
|
80
|
-
ngOnDestroy(): void
|
|
80
|
+
ngOnDestroy(): Promise<void>;
|
|
81
81
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
82
82
|
resetSearch(applyFilters?: boolean): boolean;
|
|
83
83
|
initStartValue(valueId: string): void;
|
|
@@ -3,7 +3,7 @@ import { HostListener, ViewChild, Input, ViewEncapsulation, Component, EventEmit
|
|
|
3
3
|
import * as i2 from '@angular/router';
|
|
4
4
|
import { NavigationEnd, RouterLink, RouterLinkActive, RouterOutlet, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
5
5
|
import * as i2$3 from '@angular/common';
|
|
6
|
-
import { NgIf, NgFor, NgTemplateOutlet, NgClass, Location, CommonModule } from '@angular/common';
|
|
6
|
+
import { NgIf, NgFor, NgTemplateOutlet, NgClass, Location, CommonModule, AsyncPipe } from '@angular/common';
|
|
7
7
|
import { filter, map, mergeMap, takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
8
8
|
import { combineLatest, of, firstValueFrom, ReplaySubject, interval, startWith, takeUntil, takeWhile, Subject, debounceTime, take, map as map$1 } from 'rxjs';
|
|
9
9
|
import * as i1 from '@esfaenza/core/services';
|
|
@@ -1726,48 +1726,50 @@ class BaseSelectorComponent {
|
|
|
1726
1726
|
});
|
|
1727
1727
|
}
|
|
1728
1728
|
bridge(outer) {
|
|
1729
|
-
this._outer = outer;
|
|
1730
|
-
this.DisplayMode = outer.DisplayMode;
|
|
1731
|
-
// Bridge degli input da fuori a dentro
|
|
1732
|
-
this.DisplayMode = outer.DisplayMode;
|
|
1733
|
-
this.Readonly = outer.Readonly;
|
|
1734
|
-
this.Form = outer.Form;
|
|
1735
|
-
this.Placeholder = outer.Placeholder;
|
|
1736
|
-
this.ngModelOptions = outer.ngModelOptions;
|
|
1737
|
-
this.SingleSelection = outer.SingleSelection;
|
|
1738
|
-
this.Required = outer.Required;
|
|
1739
|
-
this.Validation = outer.Validation;
|
|
1740
|
-
this.PageSize = outer.PageSize;
|
|
1741
|
-
this.Navigation = outer.Navigation;
|
|
1742
|
-
this.EmitStartingValue = outer.EmitStartingValue;
|
|
1743
|
-
this.name = outer.name;
|
|
1744
|
-
this.ModalOnly = outer.ModalOnly;
|
|
1745
|
-
this.EntityName = outer.EntityName;
|
|
1746
|
-
this.ValidationSubject = outer.ValidationSubject;
|
|
1747
|
-
// Bridge degli output da dentro a fuori
|
|
1748
|
-
outer.dialogVisible = this.dialogVisible;
|
|
1749
|
-
outer.dialogHidden = this.dialogHidden;
|
|
1750
|
-
outer.inputFinalized = this.inputFinalized;
|
|
1751
|
-
outer.inputChange = this.inputChange;
|
|
1752
|
-
outer.firstValueLoaded = this.firstValueLoaded;
|
|
1753
|
-
// Bridge funzioni di inizializzazione
|
|
1754
|
-
this.applyFilters = outer.applyFilters.bind(outer);
|
|
1755
|
-
this.applyIdFilter = outer.applyIdFilter.bind(outer);
|
|
1756
|
-
this.evaluateLabel = outer.evaluateLabel.bind(outer);
|
|
1757
|
-
this.loadSearchDictionaries = outer.loadSearchDictionaries.bind(outer);
|
|
1758
|
-
this.Initialize = outer.Initialize.bind(outer);
|
|
1759
|
-
// Bridge di funzioni che quando chiamate all'esterno deve rispondere il componente interno
|
|
1760
|
-
outer.modalVisible = this.modalVisible.bind(this);
|
|
1761
|
-
outer.resetSearch = this.resetSearch.bind(this);
|
|
1762
|
-
outer.initStartValue = this.initStartValue.bind(this);
|
|
1763
|
-
outer.ensureClosed = this.ensureClosed.bind(this);
|
|
1764
|
-
outer.sendSearch = this.sendSearch.bind(this);
|
|
1765
|
-
outer.cleanSelection = this.cleanSelection.bind(this);
|
|
1766
|
-
outer.writeValue = this.writeValue.bind(this);
|
|
1767
1729
|
requestAnimationFrame(() => {
|
|
1768
|
-
this.
|
|
1730
|
+
this._outer = outer;
|
|
1731
|
+
this.DisplayMode = outer.DisplayMode;
|
|
1732
|
+
// Bridge degli input da fuori a dentro
|
|
1733
|
+
this.DisplayMode = outer.DisplayMode;
|
|
1734
|
+
this.Readonly = outer.Readonly;
|
|
1735
|
+
this.Form = outer.Form;
|
|
1736
|
+
this.Placeholder = outer.Placeholder;
|
|
1737
|
+
this.ngModelOptions = outer.ngModelOptions;
|
|
1738
|
+
this.SingleSelection = outer.SingleSelection;
|
|
1739
|
+
this.Required = outer.Required;
|
|
1740
|
+
this.Validation = outer.Validation;
|
|
1741
|
+
this.PageSize = outer.PageSize;
|
|
1742
|
+
this.Navigation = outer.Navigation;
|
|
1743
|
+
this.EmitStartingValue = outer.EmitStartingValue;
|
|
1744
|
+
this.name = outer.name;
|
|
1745
|
+
this.ModalOnly = outer.ModalOnly;
|
|
1746
|
+
this.EntityName = outer.EntityName;
|
|
1747
|
+
this.ValidationSubject = outer.ValidationSubject;
|
|
1748
|
+
// Bridge degli output da dentro a fuori
|
|
1749
|
+
outer.dialogVisible = this.dialogVisible;
|
|
1750
|
+
outer.dialogHidden = this.dialogHidden;
|
|
1751
|
+
outer.inputFinalized = this.inputFinalized;
|
|
1752
|
+
outer.inputChange = this.inputChange;
|
|
1753
|
+
outer.firstValueLoaded = this.firstValueLoaded;
|
|
1754
|
+
// Bridge funzioni di inizializzazione
|
|
1755
|
+
this.applyFilters = outer.applyFilters.bind(outer);
|
|
1756
|
+
this.applyIdFilter = outer.applyIdFilter.bind(outer);
|
|
1757
|
+
this.evaluateLabel = outer.evaluateLabel.bind(outer);
|
|
1758
|
+
this.loadSearchDictionaries = outer.loadSearchDictionaries.bind(outer);
|
|
1759
|
+
this.Initialize = outer.Initialize.bind(outer);
|
|
1760
|
+
// Bridge di funzioni che quando chiamate all'esterno deve rispondere il componente interno
|
|
1761
|
+
outer.modalVisible = this.modalVisible.bind(this);
|
|
1762
|
+
outer.resetSearch = this.resetSearch.bind(this);
|
|
1763
|
+
outer.initStartValue = this.initStartValue.bind(this);
|
|
1764
|
+
outer.ensureClosed = this.ensureClosed.bind(this);
|
|
1765
|
+
outer.sendSearch = this.sendSearch.bind(this);
|
|
1766
|
+
outer.cleanSelection = this.cleanSelection.bind(this);
|
|
1767
|
+
outer.writeValue = this.writeValue.bind(this);
|
|
1768
|
+
requestAnimationFrame(() => {
|
|
1769
|
+
this.propagateChange = outer.propagateChange.bind(this);
|
|
1770
|
+
});
|
|
1771
|
+
this.Initialized.next(true);
|
|
1769
1772
|
});
|
|
1770
|
-
this.Initialized.next();
|
|
1771
1773
|
}
|
|
1772
1774
|
async ngOnInit() {
|
|
1773
1775
|
await firstValueFrom(this.Initialized);
|
|
@@ -1787,9 +1789,10 @@ class BaseSelectorComponent {
|
|
|
1787
1789
|
await this.loadSearchDictionaries();
|
|
1788
1790
|
this.resetSearch();
|
|
1789
1791
|
}
|
|
1790
|
-
ngOnDestroy() {
|
|
1792
|
+
async ngOnDestroy() {
|
|
1791
1793
|
this.destroyed$.next();
|
|
1792
1794
|
this.destroyed$.complete();
|
|
1795
|
+
await firstValueFrom(this.Initialized);
|
|
1793
1796
|
// Su distruzione se il form è detatched, ripulisco
|
|
1794
1797
|
if (this.Form)
|
|
1795
1798
|
this.Form.removeControl(this.ngControl);
|
|
@@ -1979,11 +1982,11 @@ class BaseSelectorComponent {
|
|
|
1979
1982
|
}));
|
|
1980
1983
|
}
|
|
1981
1984
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSelectorComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1982
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: BaseSelectorComponent, isStandalone: true, selector: "base-selector", inputs: { ModalOnly: "ModalOnly", EntityName: "EntityName", DisplayMode: "DisplayMode", Readonly: "Readonly", Form: "Form", Placeholder: "Placeholder", ngModelOptions: "ngModelOptions", SingleSelection: "SingleSelection", Required: "Required", Validation: "Validation", PageSize: "PageSize", Navigation: "Navigation", EmitStartingValue: "EmitStartingValue", name: "name", ValidationSubject: "ValidationSubject" }, outputs: { inputChange: "inputChange", firstValueLoaded: "firstValueLoaded", dialogVisible: "dialogVisible", dialogHidden: "dialogHidden", inputFinalized: "inputFinalized" }, queries: [{ propertyName: "EsTableTemplate", first: true, predicate: ThTdProvider, descendants: true, isSignal: true }, { propertyName: "FiltersTemplate", first: true, predicate: ["filtersTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "itemSearch", first: true, predicate: ["itemSearch"], descendants: true, isSignal: true }, { propertyName: "searchModal", first: true, predicate: ["searchView"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form-selector *ngIf=\"
|
|
1985
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: BaseSelectorComponent, isStandalone: true, selector: "base-selector", inputs: { ModalOnly: "ModalOnly", EntityName: "EntityName", DisplayMode: "DisplayMode", Readonly: "Readonly", Form: "Form", Placeholder: "Placeholder", ngModelOptions: "ngModelOptions", SingleSelection: "SingleSelection", Required: "Required", Validation: "Validation", PageSize: "PageSize", Navigation: "Navigation", EmitStartingValue: "EmitStartingValue", name: "name", ValidationSubject: "ValidationSubject" }, outputs: { inputChange: "inputChange", firstValueLoaded: "firstValueLoaded", dialogVisible: "dialogVisible", dialogHidden: "dialogHidden", inputFinalized: "inputFinalized" }, queries: [{ propertyName: "EsTableTemplate", first: true, predicate: ThTdProvider, descendants: true, isSignal: true }, { propertyName: "FiltersTemplate", first: true, predicate: ["filtersTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "itemSearch", first: true, predicate: ["itemSearch"], descendants: true, isSignal: true }, { propertyName: "searchModal", first: true, predicate: ["searchView"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form-selector *ngIf=\"Initialized | async\"\r\n [SetValidationSubject]=\"ValidationSubject\"\r\n [ModalOnly]=\"ModalOnly\"\r\n [Valid]=\"!((!Pristine || Form?.submitted) && !ngControl?.valid)\"\r\n [SelectedLabel]=\"SelectedLabel\"\r\n [Validation]=\"Validation\"\r\n [Readonly]=\"Readonly\"\r\n [Form]=\"Form\"\r\n [Name]=\"name\"\r\n [ngModelOptions]=\"ngModelOptions\"\r\n [Required]=\"Required\"\r\n [Placeholder]=\"Placeholder\"\r\n [HasExternalLink]=\"Navigation && (SelectedObjects?.length == 1 && !!navigationEntity)\"\r\n (onChange)=\"changed()\"\r\n (onSearch)=\"!Readonly && resetSearch() && sendSearch() && itemSearch().show();\"\r\n (onNavigation)=\"navigate()\"\r\n (onClipboardCopy)=\"copyToClipboard()\">\r\n</form-selector>\r\n\r\n<form-selector-dialog *ngIf=\"Initialized | async\"\r\n #itemSearch\r\n [Subject]=\"subject\"\r\n [EsTableTemplate]=\"EsTableTemplate()\"\r\n [searchView]=\"searchView\"\r\n (onSearchRequest)=\"sendSearch($event)\"\r\n (onDialogVisibilityChange)=\"modalVisible($event);\"\r\n (onClearValue)=\"cleanSelection(); itemSearch.hide(); resetSearch();\"\r\n (onCloseDialog)=\"itemSearch.hide(); resetSearch();\"\r\n (onConfirmSelection)=\"confirmSelection(); itemSearch.hide(); resetSearch();\">\r\n <ng-container filters *ngIf=\"FiltersTemplate()\">\r\n <ng-container *ngTemplateOutlet=\"FiltersTemplate()\"></ng-container>\r\n </ng-container>\r\n\r\n</form-selector-dialog>", styles: [".app-selector-input .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#0000001f!important;cursor:pointer!important}.app-selector-input-invalid .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#f44336!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-start,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-end,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-gap{border-width:2px!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix button{color:#bf1725!important}.app-selector-input-area{position:absolute;width:calc(100% - 30px);height:100%;margin:0 15px;right:0;top:0;z-index:999}\n"], dependencies: [{ kind: "component", type: FormSelectorComponent, selector: "form-selector", inputs: ["SetValidationSubject", "ModalOnly", "Valid", "SelectedLabel", "Validation", "Readonly", "Form", "Name", "ngModelOptions", "Required", "Placeholder", "HasExternalLink"], outputs: ["SelectedLabelChange", "onChange", "onSearch", "onNavigation", "onClipboardCopy"] }, { kind: "component", type: FormSelectorDialogComponent, selector: "form-selector-dialog", inputs: ["Subject", "EsTableTemplate", "TableClasses", "SingleSelection", "searchView"], outputs: ["onClearValue", "onCloseDialog", "onConfirmSelection", "onSearchRequest", "onDialogVisibilityChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
1983
1986
|
}
|
|
1984
1987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSelectorComponent, decorators: [{
|
|
1985
1988
|
type: Component,
|
|
1986
|
-
args: [{ selector: "base-selector", imports: [FormSelectorComponent, FormSelectorDialogComponent, NgTemplateOutlet, NgIf], template: "<form-selector *ngIf=\"
|
|
1989
|
+
args: [{ selector: "base-selector", imports: [FormSelectorComponent, FormSelectorDialogComponent, NgTemplateOutlet, NgIf, AsyncPipe], template: "<form-selector *ngIf=\"Initialized | async\"\r\n [SetValidationSubject]=\"ValidationSubject\"\r\n [ModalOnly]=\"ModalOnly\"\r\n [Valid]=\"!((!Pristine || Form?.submitted) && !ngControl?.valid)\"\r\n [SelectedLabel]=\"SelectedLabel\"\r\n [Validation]=\"Validation\"\r\n [Readonly]=\"Readonly\"\r\n [Form]=\"Form\"\r\n [Name]=\"name\"\r\n [ngModelOptions]=\"ngModelOptions\"\r\n [Required]=\"Required\"\r\n [Placeholder]=\"Placeholder\"\r\n [HasExternalLink]=\"Navigation && (SelectedObjects?.length == 1 && !!navigationEntity)\"\r\n (onChange)=\"changed()\"\r\n (onSearch)=\"!Readonly && resetSearch() && sendSearch() && itemSearch().show();\"\r\n (onNavigation)=\"navigate()\"\r\n (onClipboardCopy)=\"copyToClipboard()\">\r\n</form-selector>\r\n\r\n<form-selector-dialog *ngIf=\"Initialized | async\"\r\n #itemSearch\r\n [Subject]=\"subject\"\r\n [EsTableTemplate]=\"EsTableTemplate()\"\r\n [searchView]=\"searchView\"\r\n (onSearchRequest)=\"sendSearch($event)\"\r\n (onDialogVisibilityChange)=\"modalVisible($event);\"\r\n (onClearValue)=\"cleanSelection(); itemSearch.hide(); resetSearch();\"\r\n (onCloseDialog)=\"itemSearch.hide(); resetSearch();\"\r\n (onConfirmSelection)=\"confirmSelection(); itemSearch.hide(); resetSearch();\">\r\n <ng-container filters *ngIf=\"FiltersTemplate()\">\r\n <ng-container *ngTemplateOutlet=\"FiltersTemplate()\"></ng-container>\r\n </ng-container>\r\n\r\n</form-selector-dialog>", styles: [".app-selector-input .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#0000001f!important;cursor:pointer!important}.app-selector-input-invalid .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#f44336!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-start,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-end,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-gap{border-width:2px!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix button{color:#bf1725!important}.app-selector-input-area{position:absolute;width:calc(100% - 30px);height:100%;margin:0 15px;right:0;top:0;z-index:999}\n"] }]
|
|
1987
1990
|
}], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { ModalOnly: [{
|
|
1988
1991
|
type: Input
|
|
1989
1992
|
}], EntityName: [{
|