@esfaenza/core 19.2.85 → 19.2.87
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/components/base/base.component.d.ts +1 -1
- package/components/search/base-search.d.ts +2 -1
- package/fesm2022/esfaenza-core-components.mjs +8 -6
- package/fesm2022/esfaenza-core-components.mjs.map +1 -1
- package/fesm2022/esfaenza-core.mjs +2 -2
- package/fesm2022/esfaenza-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare abstract class BaseComponent extends ReactiveComponent {
|
|
|
6
6
|
protected CompletePath: string;
|
|
7
7
|
protected ComponentPath: string;
|
|
8
8
|
protected BasePath: string;
|
|
9
|
-
protected
|
|
9
|
+
protected Parameters: {
|
|
10
10
|
[name: string]: string;
|
|
11
11
|
};
|
|
12
12
|
protected QueryParameters: {
|
|
@@ -4,6 +4,7 @@ import { MessageService, UtilityService } from "@esfaenza/extensions";
|
|
|
4
4
|
import { HTTPService } from "@esfaenza/httpservice";
|
|
5
5
|
import { LocalizationService } from "@esfaenza/localizations";
|
|
6
6
|
import { BaseComponent } from "../base/base.component";
|
|
7
|
+
import { HttpParams } from "@angular/common/http";
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare abstract class BaseSearchComponent<TSearch extends AppSearch<TItem>, TItem> extends BaseComponent {
|
|
9
10
|
searchView: TSearch;
|
|
@@ -25,7 +26,7 @@ export declare abstract class BaseSearchComponent<TSearch extends AppSearch<TIte
|
|
|
25
26
|
sendSearch(): void;
|
|
26
27
|
onSearchRequest(resetPage?: boolean): void;
|
|
27
28
|
private RetrieveProto;
|
|
28
|
-
prepareExport(callback: any, limit?: number): void;
|
|
29
|
+
prepareExport(callback: any, limit?: number, pars?: HttpParams): void;
|
|
29
30
|
abstract initialize(): [string, string, new () => TSearch, new () => TItem] | any;
|
|
30
31
|
protected getDictionaries(): Promise<void>;
|
|
31
32
|
protected afterLoadView(_: TSearch): void;
|
|
@@ -1044,7 +1044,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1044
1044
|
class BaseComponent extends ReactiveComponent {
|
|
1045
1045
|
constructor(injector) {
|
|
1046
1046
|
super();
|
|
1047
|
-
|
|
1047
|
+
// Disallineato dalla versione NG15
|
|
1048
|
+
this.Parameters = null;
|
|
1048
1049
|
this.QueryParameters = null;
|
|
1049
1050
|
let _activatedRoute = injector.get(ActivatedRoute);
|
|
1050
1051
|
let _state = injector.get(AppState);
|
|
@@ -1053,7 +1054,7 @@ class BaseComponent extends ReactiveComponent {
|
|
|
1053
1054
|
this._router = injector.get(Router);
|
|
1054
1055
|
_state.registerNavigationIfMeaningful(_activatedRoute.snapshot);
|
|
1055
1056
|
// Parametri in maniera "dinamica"
|
|
1056
|
-
_activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.
|
|
1057
|
+
_activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.Parameters = t; });
|
|
1057
1058
|
_activatedRoute.queryParams.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.QueryParameters = t; });
|
|
1058
1059
|
combineLatest([_activatedRoute.url, _activatedRoute.data]).subscribe((t) => {
|
|
1059
1060
|
this.gatherRouteInformations(null, t[1]);
|
|
@@ -1459,8 +1460,8 @@ class EmbeddingComponent extends BaseComponent {
|
|
|
1459
1460
|
requestAnimationFrame(() => {
|
|
1460
1461
|
this.Page = this.CompletePath.split("/").slice(4).join("/");
|
|
1461
1462
|
console.log("Page: " + this.Page);
|
|
1462
|
-
let navParKeys = Object.keys(this.
|
|
1463
|
-
this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.
|
|
1463
|
+
let navParKeys = Object.keys(this.Parameters)?.filter(p => p != "module");
|
|
1464
|
+
this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.Parameters[t]}`).join(";");
|
|
1464
1465
|
console.log("Pars: " + this.Pars);
|
|
1465
1466
|
let queryParKeys = Object.keys(this.QueryParameters);
|
|
1466
1467
|
this.QueryPars = (queryParKeys?.length || 0) == 0 ? "" : "?" + queryParKeys.map(t => `${t}=${this.QueryParameters[t]}`).join(";");
|
|
@@ -1726,6 +1727,7 @@ class BaseSelectorComponent {
|
|
|
1726
1727
|
}
|
|
1727
1728
|
bridge(outer) {
|
|
1728
1729
|
this.DisplayMode = outer.DisplayMode;
|
|
1730
|
+
outer.searchView = this.searchView;
|
|
1729
1731
|
// Bridge degli input da fuori a dentro
|
|
1730
1732
|
this.DisplayMode = outer.DisplayMode;
|
|
1731
1733
|
this.Readonly = outer.Readonly;
|
|
@@ -2134,9 +2136,9 @@ class BaseSearchComponent extends BaseComponent {
|
|
|
2134
2136
|
this.searchView = res;
|
|
2135
2137
|
this.searchView["__proto__"] = keepProto;
|
|
2136
2138
|
}
|
|
2137
|
-
prepareExport(callback, limit = -1) {
|
|
2139
|
+
prepareExport(callback, limit = -1, pars) {
|
|
2138
2140
|
var view = AppSearch.toSelectAll(this.searchView);
|
|
2139
|
-
this.http.post(this.SearchURL, view).subscribe(t => {
|
|
2141
|
+
this.http.post(this.SearchURL, view, pars).subscribe(t => {
|
|
2140
2142
|
if (t.objectcount > limit && limit > 0) {
|
|
2141
2143
|
this.msgExts.simpleError(`Massimo numero di elementi consentito: ${limit}.`);
|
|
2142
2144
|
return;
|