@esfaenza/core 19.2.83 → 19.2.85

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.
@@ -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 Parameters: {
9
+ protected NavigationParameters: {
10
10
  [name: string]: string;
11
11
  };
12
12
  protected QueryParameters: {
@@ -1,6 +1,6 @@
1
1
  import { Injector } from "@angular/core";
2
2
  import { AppSearch } from "@esfaenza/es-table";
3
- import { UtilityService } from "@esfaenza/extensions";
3
+ 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";
@@ -13,6 +13,7 @@ export declare abstract class BaseSearchComponent<TSearch extends AppSearch<TIte
13
13
  protected ItemType: new () => TItem;
14
14
  protected http: HTTPService;
15
15
  protected utiExts: UtilityService;
16
+ protected msgExts: MessageService;
16
17
  private location;
17
18
  private localStorage;
18
19
  private route;
@@ -1044,7 +1044,7 @@ 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
- this.Parameters = null;
1047
+ this.NavigationParameters = null;
1048
1048
  this.QueryParameters = null;
1049
1049
  let _activatedRoute = injector.get(ActivatedRoute);
1050
1050
  let _state = injector.get(AppState);
@@ -1053,7 +1053,7 @@ class BaseComponent extends ReactiveComponent {
1053
1053
  this._router = injector.get(Router);
1054
1054
  _state.registerNavigationIfMeaningful(_activatedRoute.snapshot);
1055
1055
  // Parametri in maniera "dinamica"
1056
- _activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.Parameters = t; });
1056
+ _activatedRoute.params.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.NavigationParameters = t; });
1057
1057
  _activatedRoute.queryParams.pipe(takeUntil$1(this.destroyed$)).subscribe(t => { this.QueryParameters = t; });
1058
1058
  combineLatest([_activatedRoute.url, _activatedRoute.data]).subscribe((t) => {
1059
1059
  this.gatherRouteInformations(null, t[1]);
@@ -1459,8 +1459,8 @@ class EmbeddingComponent extends BaseComponent {
1459
1459
  requestAnimationFrame(() => {
1460
1460
  this.Page = this.CompletePath.split("/").slice(4).join("/");
1461
1461
  console.log("Page: " + this.Page);
1462
- let navParKeys = Object.keys(this.Parameters)?.filter(p => p != "module");
1463
- this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.Parameters[t]}`).join(";");
1462
+ let navParKeys = Object.keys(this.NavigationParameters)?.filter(p => p != "module");
1463
+ this.Pars = (navParKeys?.length || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.NavigationParameters[t]}`).join(";");
1464
1464
  console.log("Pars: " + this.Pars);
1465
1465
  let queryParKeys = Object.keys(this.QueryParameters);
1466
1466
  this.QueryPars = (queryParKeys?.length || 0) == 0 ? "" : "?" + queryParKeys.map(t => `${t}=${this.QueryParameters[t]}`).join(";");
@@ -2046,6 +2046,7 @@ class BaseSearchComponent extends BaseComponent {
2046
2046
  this.http = injector.get(HTTPService);
2047
2047
  this.route = injector.get(ActivatedRoute);
2048
2048
  this.utiExts = injector.get(UtilityService);
2049
+ this.msgExts = injector.get(MessageService);
2049
2050
  [this.HotView, this.SearchURL, this.SearchType, this.ItemType] = this.initialize();
2050
2051
  if (!this.HotView || !this.SearchURL || !this.SearchType || !this.ItemType)
2051
2052
  throw ("Fallita inizializzazione della pagina di ricerca.");
@@ -2134,11 +2135,12 @@ class BaseSearchComponent extends BaseComponent {
2134
2135
  this.searchView["__proto__"] = keepProto;
2135
2136
  }
2136
2137
  prepareExport(callback, limit = -1) {
2137
- if (limit > 0) {
2138
- // Check
2139
- }
2140
2138
  var view = AppSearch.toSelectAll(this.searchView);
2141
2139
  this.http.post(this.SearchURL, view).subscribe(t => {
2140
+ if (t.objectcount > limit && limit > 0) {
2141
+ this.msgExts.simpleError(`Massimo numero di elementi consentito: ${limit}.`);
2142
+ return;
2143
+ }
2142
2144
  callback(t.items, this.ItemType);
2143
2145
  });
2144
2146
  }