@esfaenza/core 19.2.81 → 19.2.83
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.
|
@@ -40,7 +40,6 @@ export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TIt
|
|
|
40
40
|
dialogVisible: EventEmitter<boolean>;
|
|
41
41
|
dialogHidden: EventEmitter<boolean>;
|
|
42
42
|
inputFinalized: EventEmitter<string>;
|
|
43
|
-
selected: EventEmitter<TItem>;
|
|
44
43
|
name: string;
|
|
45
44
|
searchView: TSearch;
|
|
46
45
|
protected nameof: <T>(name: Extract<keyof T, string>) => string;
|
|
@@ -53,7 +52,7 @@ export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TIt
|
|
|
53
52
|
protected applyFilters(firstApplication?: boolean, onlyEssentials?: boolean): void;
|
|
54
53
|
protected applyIdFilter(itemid?: string): void;
|
|
55
54
|
protected evaluateLabel(item: TItem[]): string;
|
|
56
|
-
protected loadSearchDictionaries(): void
|
|
55
|
+
protected loadSearchDictionaries(): Promise<void>;
|
|
57
56
|
protected Initialize(): BaseSelectorInitialization<TSearch>;
|
|
58
57
|
private firstApplication;
|
|
59
58
|
ngControl: NgModel;
|
|
@@ -79,7 +78,7 @@ export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TIt
|
|
|
79
78
|
ngOnInit(): Promise<void>;
|
|
80
79
|
ngOnDestroy(): void;
|
|
81
80
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
82
|
-
resetSearch(): boolean;
|
|
81
|
+
resetSearch(applyFilters?: boolean): boolean;
|
|
83
82
|
initStartValue(valueId: string): void;
|
|
84
83
|
ensureClosed(): void;
|
|
85
84
|
confirmSelection(): Promise<void>;
|
|
@@ -93,5 +92,5 @@ export declare class BaseSelectorComponent<TSearch extends AppSearch<TItem>, TIt
|
|
|
93
92
|
navigate(): void;
|
|
94
93
|
private SelectAll;
|
|
95
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseSelectorComponent<any, any>, never>;
|
|
96
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseSelectorComponent<any, any>, "base-selector", never, { "ModalOnly": { "alias": "ModalOnly"; "required": false; }; "EntityName": { "alias": "EntityName"; "required": false; }; "DisplayMode": { "alias": "DisplayMode"; "required": false; }; "Readonly": { "alias": "Readonly"; "required": false; }; "Form": { "alias": "Form"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; "ngModelOptions": { "alias": "ngModelOptions"; "required": false; }; "SingleSelection": { "alias": "SingleSelection"; "required": false; }; "Required": { "alias": "Required"; "required": false; }; "Validation": { "alias": "Validation"; "required": false; }; "PageSize": { "alias": "PageSize"; "required": false; }; "Navigation": { "alias": "Navigation"; "required": false; }; "EmitStartingValue": { "alias": "EmitStartingValue"; "required": false; }; "name": { "alias": "name"; "required": false; }; "ValidationSubject": { "alias": "ValidationSubject"; "required": false; }; }, { "inputChange": "inputChange"; "firstValueLoaded": "firstValueLoaded"; "dialogVisible": "dialogVisible"; "dialogHidden": "dialogHidden"; "inputFinalized": "inputFinalized";
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseSelectorComponent<any, any>, "base-selector", never, { "ModalOnly": { "alias": "ModalOnly"; "required": false; }; "EntityName": { "alias": "EntityName"; "required": false; }; "DisplayMode": { "alias": "DisplayMode"; "required": false; }; "Readonly": { "alias": "Readonly"; "required": false; }; "Form": { "alias": "Form"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; "ngModelOptions": { "alias": "ngModelOptions"; "required": false; }; "SingleSelection": { "alias": "SingleSelection"; "required": false; }; "Required": { "alias": "Required"; "required": false; }; "Validation": { "alias": "Validation"; "required": false; }; "PageSize": { "alias": "PageSize"; "required": false; }; "Navigation": { "alias": "Navigation"; "required": false; }; "EmitStartingValue": { "alias": "EmitStartingValue"; "required": false; }; "name": { "alias": "name"; "required": false; }; "ValidationSubject": { "alias": "ValidationSubject"; "required": false; }; }, { "inputChange": "inputChange"; "firstValueLoaded": "firstValueLoaded"; "dialogVisible": "dialogVisible"; "dialogHidden": "dialogHidden"; "inputFinalized": "inputFinalized"; }, ["EsTableTemplate", "FiltersTemplate"], never, true, never>;
|
|
97
96
|
}
|
|
@@ -1656,7 +1656,7 @@ class BaseSelectorComponent {
|
|
|
1656
1656
|
evaluateLabel(item) {
|
|
1657
1657
|
throw "[@esfaenza/core] Missing implementation for evaluateLabel, please register capabilities by doing selector.registerSelectorCapabilities(..., ..., ..., ...);";
|
|
1658
1658
|
}
|
|
1659
|
-
loadSearchDictionaries() { }
|
|
1659
|
+
async loadSearchDictionaries() { }
|
|
1660
1660
|
Initialize() {
|
|
1661
1661
|
throw "[@esfaenza/core] Missing implementation for Initialize, please register capabilities by doing selector.registerSelectorCapabilities(..., ..., ..., ...);";
|
|
1662
1662
|
}
|
|
@@ -1685,7 +1685,6 @@ class BaseSelectorComponent {
|
|
|
1685
1685
|
this.dialogVisible = new EventEmitter();
|
|
1686
1686
|
this.dialogHidden = new EventEmitter();
|
|
1687
1687
|
this.inputFinalized = new EventEmitter();
|
|
1688
|
-
this.selected = new EventEmitter();
|
|
1689
1688
|
this.name = "";
|
|
1690
1689
|
this.searchView = null;
|
|
1691
1690
|
// Goddamnit
|
|
@@ -1747,7 +1746,6 @@ class BaseSelectorComponent {
|
|
|
1747
1746
|
outer.dialogVisible = this.dialogVisible;
|
|
1748
1747
|
outer.dialogHidden = this.dialogHidden;
|
|
1749
1748
|
outer.inputFinalized = this.inputFinalized;
|
|
1750
|
-
outer.selected = this.selected;
|
|
1751
1749
|
outer.inputChange = this.inputChange;
|
|
1752
1750
|
outer.firstValueLoaded = this.firstValueLoaded;
|
|
1753
1751
|
// Bridge funzioni di inizializzazione
|
|
@@ -1784,7 +1782,7 @@ class BaseSelectorComponent {
|
|
|
1784
1782
|
}
|
|
1785
1783
|
});
|
|
1786
1784
|
}
|
|
1787
|
-
this.loadSearchDictionaries();
|
|
1785
|
+
await this.loadSearchDictionaries();
|
|
1788
1786
|
this.resetSearch();
|
|
1789
1787
|
}
|
|
1790
1788
|
ngOnDestroy() {
|
|
@@ -1802,11 +1800,11 @@ class BaseSelectorComponent {
|
|
|
1802
1800
|
if (!changes[change].firstChange) {
|
|
1803
1801
|
console.log(`[Selector] Change on ${change}, search will be reset and curret value will be lost`);
|
|
1804
1802
|
if (this.CurrentValue) {
|
|
1805
|
-
this.resetSearch();
|
|
1803
|
+
this.resetSearch(false);
|
|
1806
1804
|
this.initStartValue(this.CurrentValue);
|
|
1807
1805
|
}
|
|
1808
1806
|
else {
|
|
1809
|
-
this.resetSearch();
|
|
1807
|
+
this.resetSearch(false);
|
|
1810
1808
|
this.loadSearchDictionaries();
|
|
1811
1809
|
this.cleanSelection();
|
|
1812
1810
|
}
|
|
@@ -1814,11 +1812,13 @@ class BaseSelectorComponent {
|
|
|
1814
1812
|
}
|
|
1815
1813
|
}
|
|
1816
1814
|
}
|
|
1817
|
-
resetSearch() {
|
|
1815
|
+
resetSearch(applyFilters = true) {
|
|
1818
1816
|
this.firstApplication = true;
|
|
1819
1817
|
this.Pristine = true;
|
|
1820
1818
|
this.searchView = new this.searchType();
|
|
1821
1819
|
this.searchView.itemsperpageoverride = this.PageSize;
|
|
1820
|
+
if (applyFilters)
|
|
1821
|
+
this.applyFilters(true, true);
|
|
1822
1822
|
return true;
|
|
1823
1823
|
}
|
|
1824
1824
|
initStartValue(valueId) {
|
|
@@ -1910,6 +1910,7 @@ class BaseSelectorComponent {
|
|
|
1910
1910
|
if (emit) {
|
|
1911
1911
|
this.Pristine = false;
|
|
1912
1912
|
this.inputChange.emit(this.SelectedItems.length > 0 ? this.SelectedObjects[0] : null);
|
|
1913
|
+
this.inputFinalized.emit(this.name);
|
|
1913
1914
|
}
|
|
1914
1915
|
}
|
|
1915
1916
|
else {
|
|
@@ -1918,6 +1919,7 @@ class BaseSelectorComponent {
|
|
|
1918
1919
|
if (emit) {
|
|
1919
1920
|
this.Pristine = false;
|
|
1920
1921
|
this.inputChange.emit(this.SelectedObjects);
|
|
1922
|
+
this.inputFinalized.emit(this.name);
|
|
1921
1923
|
}
|
|
1922
1924
|
}
|
|
1923
1925
|
}
|
|
@@ -1971,7 +1973,7 @@ class BaseSelectorComponent {
|
|
|
1971
1973
|
}));
|
|
1972
1974
|
}
|
|
1973
1975
|
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 }); }
|
|
1974
|
-
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"
|
|
1976
|
+
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 \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 #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"] }] }); }
|
|
1975
1977
|
}
|
|
1976
1978
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSelectorComponent, decorators: [{
|
|
1977
1979
|
type: Component,
|
|
@@ -2015,8 +2017,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
2015
2017
|
type: Output
|
|
2016
2018
|
}], inputFinalized: [{
|
|
2017
2019
|
type: Output
|
|
2018
|
-
}], selected: [{
|
|
2019
|
-
type: Output
|
|
2020
2020
|
}], name: [{
|
|
2021
2021
|
type: Input
|
|
2022
2022
|
}], ValidationSubject: [{
|