@sumaris-net/ngx-components 1.19.21 → 1.19.22

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.
@@ -28435,7 +28435,7 @@
28435
28435
  */
28436
28436
  AppEntityEditor.prototype.updateTabAndRoute = function (data, opts) {
28437
28437
  return __awaiter(this, void 0, void 0, function () {
28438
- var forcedQueryParams;
28438
+ var queryParams, queryParams;
28439
28439
  return __generator(this, function (_c) {
28440
28440
  switch (_c.label) {
28441
28441
  case 0:
@@ -28444,20 +28444,25 @@
28444
28444
  this.updateTabIndex(opts && opts.openTabIndex);
28445
28445
  // Save the opened tab into the queryParams
28446
28446
  this.queryParams.tab = this.selectedTabIndex;
28447
- forcedQueryParams = {};
28448
- forcedQueryParams[this._pathIdAttribute] = data && isNotNil(data.id) ? data.id : 'new';
28449
- if (!(data && isNotNil(data.id))) return [3 /*break*/, 2];
28447
+ if (!isNotNil(data === null || data === void 0 ? void 0 : data.id)) return [3 /*break*/, 2];
28448
+ queryParams = Object.assign({}, this.queryParams);
28449
+ queryParams[this._pathIdAttribute] = data.id;
28450
+ console.debug('[entity-editor] Updating route using params: ', queryParams);
28450
28451
  return [4 /*yield*/, this.router.navigate(['.'], {
28451
28452
  relativeTo: this.route,
28452
- queryParams: Object.assign(Object.assign({}, this.queryParams), forcedQueryParams)
28453
+ queryParams: queryParams
28453
28454
  })];
28454
28455
  case 1:
28455
28456
  _c.sent();
28456
28457
  return [3 /*break*/, 4];
28457
- case 2: return [4 /*yield*/, this.router.navigate(['..', 'new'], {
28458
- relativeTo: this.route,
28459
- queryParams: Object.assign(Object.assign({}, this.queryParams), forcedQueryParams)
28460
- })];
28458
+ case 2:
28459
+ queryParams = Object.assign({}, this.queryParams);
28460
+ queryParams[this._pathIdAttribute] = 'new';
28461
+ console.debug('[entity-editor] Updating route to \'../new\' using params: ', queryParams);
28462
+ return [4 /*yield*/, this.router.navigate(['..', 'new'], {
28463
+ relativeTo: this.route,
28464
+ queryParams: queryParams
28465
+ })];
28461
28466
  case 3:
28462
28467
  _c.sent();
28463
28468
  _c.label = 4;
@@ -28473,7 +28478,7 @@
28473
28478
  * Update the route location, and open the next tab
28474
28479
  */
28475
28480
  AppEntityEditor.prototype.updateTabIndex = function (tabIndex) {
28476
- if (isNotNil(tabIndex) && tabIndex > this.selectedTabIndex) {
28481
+ if (isNotNil(tabIndex) && tabIndex !== this.selectedTabIndex) {
28477
28482
  this.selectedTabIndex = tabIndex;
28478
28483
  this.markForCheck();
28479
28484
  }
@@ -28870,6 +28875,8 @@
28870
28875
  AppEntityEditor.prototype.computePageHistory = function (title) {
28871
28876
  return __awaiter(this, void 0, void 0, function () {
28872
28877
  return __generator(this, function (_c) {
28878
+ if (this.debug)
28879
+ console.debug('[entity-editor] Computing page history, using url: ' + this.router.url);
28873
28880
  return [2 /*return*/, {
28874
28881
  title: title,
28875
28882
  path: this.router.url