zek 14.2.57 → 14.2.59

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/fesm2020/zek.mjs CHANGED
@@ -1090,6 +1090,21 @@ class UrlHelper {
1090
1090
  let i = action.indexOf(';');
1091
1091
  return i === -1 ? action : action.substring(0, i);
1092
1092
  }
1093
+ static getNoParam(url) {
1094
+ let i1 = url.indexOf('?');
1095
+ let i2 = url.indexOf(';');
1096
+ if (i1 !== -1) {
1097
+ if (i2 !== -1) {
1098
+ let min = i1 < i2 ? i1 : i2;
1099
+ return url.substring(0, min);
1100
+ }
1101
+ return url.substring(0, i1);
1102
+ }
1103
+ if (i2 !== -1) {
1104
+ return url.substring(0, i2);
1105
+ }
1106
+ return url;
1107
+ }
1093
1108
  }
1094
1109
 
1095
1110
  class AuthService {
@@ -1825,7 +1840,7 @@ class BaseComponent extends CoreComponent {
1825
1840
  }
1826
1841
  get url() {
1827
1842
  if (!this._url)
1828
- this._url = this.router.url.split(';')[0];
1843
+ this._url = UrlHelper.getNoParam(this.router.url);
1829
1844
  return this._url;
1830
1845
  }
1831
1846
  getParam(name) {
@@ -2412,7 +2427,7 @@ class ListBaseComponent extends BaseComponent {
2412
2427
  this.bindModel();
2413
2428
  }
2414
2429
  create() {
2415
- const url = this.router.url.split(';')[0];
2430
+ const url = UrlHelper.getNoParam(this.router.url);
2416
2431
  this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
2417
2432
  }
2418
2433
  async delete(id) {
@@ -4470,7 +4485,7 @@ class ListToolbarComponent {
4470
4485
  this.onRefresh.emit();
4471
4486
  }
4472
4487
  create() {
4473
- const url = this.router.url.split(';')[0];
4488
+ const url = UrlHelper.getNoParam(this.router.url);
4474
4489
  this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
4475
4490
  }
4476
4491
  filter() {