@esfaenza/core 15.2.296 → 15.2.298

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.
@@ -1343,14 +1343,22 @@ class EmbeddingComponent extends BaseComponent {
1343
1343
  this.gatherRouteInformations(route);
1344
1344
  console.log(`Recognized a new navigation to the embedding component: ${this.Module} - ${this.CompletePath}`);
1345
1345
  let reloadAllowed = this.emb.IsReloadAllowed();
1346
- if (this.Page && reloadAllowed) {
1347
- this.Page = this.Pars = null;
1348
- requestAnimationFrame(() => { this.assignPageLoadParameters(); });
1349
- }
1346
+ if (this.Page && reloadAllowed)
1347
+ this.assignLoadParametersCycle();
1350
1348
  else
1351
1349
  this.assignPageLoadParameters(reloadAllowed);
1352
1350
  });
1353
1351
  }
1352
+ // Mi serve per assicurarmi della distruzione del componente al 100%
1353
+ assignLoadParametersCycle() {
1354
+ this.Page = this.Pars = null;
1355
+ requestAnimationFrame(() => {
1356
+ if (!!this.resourceComponent)
1357
+ this.assignLoadParametersCycle();
1358
+ else
1359
+ this.assignPageLoadParameters();
1360
+ });
1361
+ }
1354
1362
  assignPageLoadParameters(reloadAllowed = true) {
1355
1363
  // Esempio di Complete path: "/pages/embed/crm/leads/leads_search"
1356
1364
  // Esempio di slices: ["", "pages", "embed", "crm", "leads", "leads_search"]
@@ -1366,22 +1374,27 @@ class EmbeddingComponent extends BaseComponent {
1366
1374
  let navParKeys = (_a = Object.keys(this.NavigationParameters)) === null || _a === void 0 ? void 0 : _a.filter(p => p != "module");
1367
1375
  this.Pars = ((navParKeys === null || navParKeys === void 0 ? void 0 : navParKeys.length) || 0) == 0 ? "" : ";" + navParKeys.map(t => `${t}=${this.NavigationParameters[t]}`).join(";");
1368
1376
  console.log("Pars: " + this.Pars);
1377
+ // Il parametro wakeup è un parametro fittizio usato per forzare il ricaricamento della route in situatzione di embedding
1378
+ let ParsWithoutWakeup = navParKeys.map(t => t == "wakeup" ? null : `${t}=${this.NavigationParameters[t]}`).filter(t => !!t).join(";");
1369
1379
  let queryParKeys = Object.keys(this.QueryParameters);
1370
1380
  this.QueryPars = ((queryParKeys === null || queryParKeys === void 0 ? void 0 : queryParKeys.length) || 0) == 0 ? "" : "?" + queryParKeys.map(t => `${t}=${this.QueryParameters[t]}`).join(";");
1371
1381
  console.log("QueryPars: " + this.QueryPars);
1372
- let QueryPAramsWithoutIgnoreStorage = queryParKeys.map(t => t == "ignoreStorage" ? null : `${t}=${this.QueryParameters[t]}`).filter(t => !!t).join(";");
1382
+ let QueryParamsWithoutIgnoreStorage = queryParKeys.map(t => t == "ignoreStorage" ? null : `${t}=${this.QueryParameters[t]}`).filter(t => !!t).join(";");
1373
1383
  // Per rimuovere eventuali ignoreStorage se sto navigando a una ricerca
1374
- this.location.replaceState(this.CompletePath + this.Pars + (QueryPAramsWithoutIgnoreStorage ? '?' + QueryPAramsWithoutIgnoreStorage : ""));
1384
+ this.location.replaceState(this.CompletePath + ParsWithoutWakeup + (QueryParamsWithoutIgnoreStorage ? '?' + QueryParamsWithoutIgnoreStorage : ""));
1375
1385
  this.EmbeddingSuccesfull = !!this.Page && !!this.Module && !!this.Localhost;
1376
1386
  });
1377
1387
  }
1378
1388
  }
1379
1389
  EmbeddingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmbeddingComponent, deps: [{ token: i0.Injector }, { token: i2.AppEmbeddingExtensions }, { token: i2$1.Location }], target: i0.ɵɵFactoryTarget.Component });
1380
- EmbeddingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmbeddingComponent, isStandalone: true, selector: "embedding", usesInheritance: true, ngImport: i0, template: "<jace-resource *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: JaceResourceComponent, selector: "jace-resource", inputs: ["Module", "ModuleKeyType", "Page", "Localhost", "Params"] }] });
1390
+ EmbeddingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EmbeddingComponent, isStandalone: true, selector: "embedding", viewQueries: [{ propertyName: "resourceComponent", first: true, predicate: ["resourceComponent"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<jace-resource #resourceComponent *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: JaceResourceComponent, selector: "jace-resource", inputs: ["Module", "ModuleKeyType", "Page", "Localhost", "Params"] }] });
1381
1391
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EmbeddingComponent, decorators: [{
1382
1392
  type: Component,
1383
- args: [{ selector: 'embedding', standalone: true, imports: [NgIf, JaceResourceComponent], template: "<jace-resource *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>" }]
1384
- }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.AppEmbeddingExtensions }, { type: i2$1.Location }]; } });
1393
+ args: [{ selector: 'embedding', standalone: true, imports: [NgIf, JaceResourceComponent], template: "<jace-resource #resourceComponent *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>" }]
1394
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2.AppEmbeddingExtensions }, { type: i2$1.Location }]; }, propDecorators: { resourceComponent: [{
1395
+ type: ViewChild,
1396
+ args: ["resourceComponent", { static: false }]
1397
+ }] } });
1385
1398
 
1386
1399
  class UserInfoComponentLoc extends LocalizationService {
1387
1400
  constructor(injector) {