zek 14.2.75 → 14.2.77

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.
Files changed (27) hide show
  1. package/esm2020/lib/components/base.component.mjs +6 -3
  2. package/esm2020/lib/components/edit-base.component.mjs +27 -36
  3. package/esm2020/lib/components/list-base.component.mjs +27 -22
  4. package/esm2020/lib/modules/alert/alert/alert.mjs +52 -0
  5. package/esm2020/lib/modules/alert/alert.module.mjs +15 -15
  6. package/esm2020/lib/modules/alert/index.mjs +4 -4
  7. package/esm2020/lib/modules/alert/toast/toast.mjs +109 -0
  8. package/esm2020/lib/modules/alert/validation/validation.mjs +85 -0
  9. package/esm2020/lib/modules/list-toolbar/list-toolbar.component.mjs +3 -2
  10. package/esm2020/lib/services/http-error-handler.service.mjs +4 -1
  11. package/fesm2015/zek.mjs +94 -84
  12. package/fesm2015/zek.mjs.map +1 -1
  13. package/fesm2020/zek.mjs +94 -84
  14. package/fesm2020/zek.mjs.map +1 -1
  15. package/lib/components/base.component.d.ts +1 -0
  16. package/lib/components/edit-base.component.d.ts +4 -4
  17. package/lib/components/list-base.component.d.ts +3 -3
  18. package/lib/modules/alert/alert/alert.d.ts +16 -0
  19. package/lib/modules/alert/alert.module.d.ts +4 -4
  20. package/lib/modules/alert/index.d.ts +3 -3
  21. package/lib/modules/alert/toast/{toast.component.d.ts → toast.d.ts} +3 -3
  22. package/lib/modules/alert/validation/{validation.component.d.ts → validation.d.ts} +3 -3
  23. package/package.json +1 -1
  24. package/esm2020/lib/modules/alert/alert/alert.component.mjs +0 -44
  25. package/esm2020/lib/modules/alert/toast/toast.component.mjs +0 -109
  26. package/esm2020/lib/modules/alert/validation/validation.component.mjs +0 -85
  27. package/lib/modules/alert/alert/alert.component.d.ts +0 -12
package/fesm2015/zek.mjs CHANGED
@@ -1631,6 +1631,9 @@ class HttpErrorHandler {
1631
1631
  else {
1632
1632
  error = response.error;
1633
1633
  }
1634
+ if (error instanceof ErrorEvent) {
1635
+ error = response.error.message;
1636
+ }
1634
1637
  return ObjectHelper.isDefined(error) ? of(error) : of(result);
1635
1638
  };
1636
1639
  }
@@ -1933,15 +1936,18 @@ class BaseComponent extends CoreComponent {
1933
1936
  getParam(name) {
1934
1937
  return this.route.snapshot.paramMap.get(name);
1935
1938
  }
1939
+ getQueryParam(name) {
1940
+ return this.route.snapshot.queryParamMap.get(name);
1941
+ }
1936
1942
  navigateReturnUrl() {
1937
- const returnUrl = this.route.snapshot.paramMap.get('returnUrl');
1943
+ const returnUrl = this.getQueryParam('returnUrl') || this.getParam('returnUrl');
1938
1944
  if (returnUrl) {
1939
1945
  let urlTree = this.router.parseUrl(returnUrl);
1940
1946
  const urlWithoutParams = urlTree.root.children[PRIMARY_OUTLET].segments.map(it => it.path).join('/');
1941
1947
  this.router.navigate([urlWithoutParams, urlTree.root.children[PRIMARY_OUTLET].segments[urlTree.root.children[PRIMARY_OUTLET].segments.length - 1].parameters]);
1942
1948
  return;
1943
1949
  }
1944
- this.router.navigate([this.router.url.substr(0, this.router.url.lastIndexOf('/'))]);
1950
+ this.router.navigate([this.router.url.substring(0, this.router.url.lastIndexOf('/'))]);
1945
1951
  }
1946
1952
  cancel() {
1947
1953
  this.navigateReturnUrl();
@@ -2200,10 +2206,10 @@ class EditFormComponent extends BaseComponent {
2200
2206
  // @ViewChild('submitModal', { static: false }) protected readonly submitModal?: ModalComponent;
2201
2207
  init() {
2202
2208
  super.init();
2203
- const idParam = this.getParam('id');
2209
+ const idParam = this.getParam('id') || this.getQueryParam('id');
2204
2210
  if (idParam)
2205
2211
  this.id = +idParam;
2206
- const id2Param = this.getParam('id2');
2212
+ const id2Param = this.getParam('id2') || this.getQueryParam('id2');
2207
2213
  if (id2Param)
2208
2214
  this.id2 = +id2Param;
2209
2215
  }
@@ -2234,18 +2240,9 @@ class EditFormComponent extends BaseComponent {
2234
2240
  return false;
2235
2241
  });
2236
2242
  }
2237
- // saveAndNavigateToReturnUrl(f: NgForm) {
2238
- // if (!f || f.valid) {
2239
- // this.internalSave(true);
2240
- // }
2241
- // }
2242
2243
  internalSave(navigateToReturnUrl) {
2243
2244
  throw 'Not implemented internalSave';
2244
2245
  }
2245
- // protected navigateEditUrl() {
2246
- // if (this.getAction().toLowerCase() === 'create')
2247
- // this.router.navigate([this.router.url.substr(0, this.router.url.lastIndexOf('/') + 1), this.id]);
2248
- // }
2249
2246
  showApproveModal() {
2250
2247
  this.approveModel = {};
2251
2248
  if (this.approveModal) {
@@ -2308,15 +2305,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2308
2305
  args: ['disapproveModal', { static: false }]
2309
2306
  }] } });
2310
2307
  class EditBaseComponent extends EditFormComponent {
2311
- constructor(service, translateService, alertService, route, router) {
2308
+ constructor(service, translate, alert, route, router) {
2312
2309
  super(route, router);
2313
2310
  this.service = service;
2314
- this.translateService = translateService;
2315
- this.alertService = alertService;
2311
+ this.translate = translate;
2312
+ this.alert = alert;
2316
2313
  }
2317
2314
  internalSave(navigateToReturnUrl) {
2318
2315
  return __awaiter(this, void 0, void 0, function* () {
2319
- this.alertService.clear();
2316
+ this.alert.clear();
2320
2317
  let data = yield firstValueFrom(this.service.save(this.model));
2321
2318
  let success = false;
2322
2319
  if (typeof data === 'number' && data > 0) {
@@ -2327,8 +2324,8 @@ class EditBaseComponent extends EditFormComponent {
2327
2324
  success = true;
2328
2325
  }
2329
2326
  if (success) {
2330
- let message = yield firstValueFrom(this.translateService.get('Alert.SaveSuccess'));
2331
- this.alertService.success(message, null, 'fas fa-save');
2327
+ let message = yield firstValueFrom(this.translate.get('Alert.SaveSuccess'));
2328
+ this.alert.success(message, null, 'fas fa-save');
2332
2329
  if (navigateToReturnUrl === true) {
2333
2330
  this.navigateReturnUrl();
2334
2331
  }
@@ -2340,8 +2337,8 @@ class EditBaseComponent extends EditFormComponent {
2340
2337
  // }
2341
2338
  }
2342
2339
  else {
2343
- let message = yield firstValueFrom(this.translateService.get('Alert.SaveError'));
2344
- this.alertService.error(message, null, 'fas fa-save');
2340
+ let message = yield firstValueFrom(this.translate.get('Alert.SaveError'));
2341
+ this.alert.error(message, null, 'fas fa-save');
2345
2342
  return false;
2346
2343
  }
2347
2344
  });
@@ -2350,13 +2347,13 @@ class EditBaseComponent extends EditFormComponent {
2350
2347
  return __awaiter(this, void 0, void 0, function* () {
2351
2348
  let data = yield firstValueFrom(this.service.approve(model));
2352
2349
  if (data && data.length > 0) {
2353
- let message = yield firstValueFrom(this.translateService.get('Alert.Approved'));
2354
- this.alertService.success(message, null, 'fas fa-save');
2350
+ let message = yield firstValueFrom(this.translate.get('Alert.Approved'));
2351
+ this.alert.success(message, null, 'fas fa-save');
2355
2352
  return true;
2356
2353
  }
2357
2354
  else {
2358
- let message = yield firstValueFrom(this.translateService.get('Alert.ApproveError'));
2359
- this.alertService.error(message, null, 'fas fa-save');
2355
+ let message = yield firstValueFrom(this.translate.get('Alert.ApproveError'));
2356
+ this.alert.error(message, null, 'fas fa-save');
2360
2357
  return false;
2361
2358
  }
2362
2359
  });
@@ -2365,13 +2362,13 @@ class EditBaseComponent extends EditFormComponent {
2365
2362
  return __awaiter(this, void 0, void 0, function* () {
2366
2363
  let data = yield firstValueFrom(this.service.disapprove(model));
2367
2364
  if (data && data.length > 0) {
2368
- let message = yield firstValueFrom(this.translateService.get('Alert.Disapproved'));
2369
- this.alertService.success(message, null, 'fas fa-save');
2365
+ let message = yield firstValueFrom(this.translate.get('Alert.Disapproved'));
2366
+ this.alert.success(message, null, 'fas fa-save');
2370
2367
  return true;
2371
2368
  }
2372
2369
  else {
2373
- let message = yield firstValueFrom(this.translateService.get('Alert.DisapproveError'));
2374
- this.alertService.error(message, null, 'fas fa-save');
2370
+ let message = yield firstValueFrom(this.translate.get('Alert.DisapproveError'));
2371
+ this.alert.error(message, null, 'fas fa-save');
2375
2372
  return false;
2376
2373
  }
2377
2374
  });
@@ -2380,13 +2377,13 @@ class EditBaseComponent extends EditFormComponent {
2380
2377
  return __awaiter(this, void 0, void 0, function* () {
2381
2378
  let data = yield firstValueFrom(this.service.approve(model));
2382
2379
  if (data && data.length > 0) {
2383
- let message = yield firstValueFrom(this.translateService.get('Alert.Submitted'));
2384
- this.alertService.success(message, null, 'fas fa-save');
2380
+ let message = yield firstValueFrom(this.translate.get('Alert.Submitted'));
2381
+ this.alert.success(message, null, 'fas fa-save');
2385
2382
  return true;
2386
2383
  }
2387
2384
  else {
2388
- let message = yield firstValueFrom(this.translateService.get('Alert.SubmitError'));
2389
- this.alertService.error(message, null, 'fas fa-save');
2385
+ let message = yield firstValueFrom(this.translate.get('Alert.SubmitError'));
2386
+ this.alert.error(message, null, 'fas fa-save');
2390
2387
  return false;
2391
2388
  }
2392
2389
  });
@@ -2409,8 +2406,8 @@ class EditBaseComponent extends EditFormComponent {
2409
2406
  return __awaiter(this, void 0, void 0, function* () {
2410
2407
  let data = yield firstValueFrom(this.service.restore(this.id));
2411
2408
  if (data === null || data === void 0 ? void 0 : data.success) {
2412
- let message = yield firstValueFrom(this.translateService.get('Alert.Restored'));
2413
- this.alertService.success(message);
2409
+ let message = yield firstValueFrom(this.translate.get('Alert.Restored'));
2410
+ this.alert.success(message);
2414
2411
  this.load();
2415
2412
  }
2416
2413
  });
@@ -2427,8 +2424,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2427
2424
  type: Directive
2428
2425
  }], ctorParameters: function () { return [{ type: undefined }, { type: i1$1.TranslateService }, { type: AlertService }, { type: i1.ActivatedRoute }, { type: i1.Router }]; } });
2429
2426
  class EditComponent extends EditBaseComponent {
2430
- constructor(ctorModel, service, translateService, alertService, route, router) {
2431
- super(service, translateService, alertService, route, router);
2427
+ constructor(ctorModel, service, translate, alert, route, router) {
2428
+ super(service, translate, alert, route, router);
2432
2429
  this.ctorModel = ctorModel;
2433
2430
  }
2434
2431
  initCreate() {
@@ -2443,11 +2440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2443
2440
 
2444
2441
  // declare let bootstrap: any;
2445
2442
  class ListBaseComponent extends BaseComponent {
2446
- constructor(service, translateService, alertService, route, router) {
2443
+ constructor(service, translate, alert, route, router) {
2447
2444
  super(route, router);
2448
2445
  this.service = service;
2449
- this.translateService = translateService;
2450
- this.alertService = alertService;
2446
+ this.translate = translate;
2447
+ this.alert = alert;
2451
2448
  this.filter = new FilterBase();
2452
2449
  this.saveFilter = true;
2453
2450
  this.internalFilter = new FilterBase();
@@ -2479,7 +2476,7 @@ class ListBaseComponent extends BaseComponent {
2479
2476
  initDefaultFilter() {
2480
2477
  }
2481
2478
  initStoredFilter() {
2482
- let filterParam = this.getParam('filter');
2479
+ let filterParam = this.getQueryParam('filter') || this.getParam('filter');
2483
2480
  if (filterParam) {
2484
2481
  const tmp = StorageHelper.get('filter');
2485
2482
  if (tmp && tmp.url && tmp.url === this.url && tmp.filter) {
@@ -2538,35 +2535,40 @@ class ListBaseComponent extends BaseComponent {
2538
2535
  }
2539
2536
  create() {
2540
2537
  const url = UrlHelper.getNoParam(this.router.url);
2541
- this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
2538
+ // this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
2539
+ this.router.navigate([url, 'create'], { queryParams: { returnUrl: url + '?filter=1' } });
2542
2540
  }
2543
2541
  delete(id) {
2544
2542
  return __awaiter(this, void 0, void 0, function* () {
2545
- this.alertService.clear();
2543
+ this.alert.clear();
2546
2544
  let data = yield firstValueFrom(this.service.delete(id));
2547
2545
  if (data === null || data === void 0 ? void 0 : data.success) {
2548
- let message = yield firstValueFrom(this.translateService.get('Alert.Deleted'));
2549
- this.alertService.error(message, null, 'fas fa-trash');
2546
+ let message = yield firstValueFrom(this.translate.get('Alert.Deleted'));
2547
+ this.alert.error(message, null, 'fas fa-trash');
2550
2548
  this.refresh();
2551
2549
  }
2552
2550
  });
2553
2551
  }
2554
2552
  delete2(id, id2) {
2555
2553
  return __awaiter(this, void 0, void 0, function* () {
2556
- this.alertService.clear();
2554
+ this.alert.clear();
2557
2555
  let data = yield firstValueFrom(this.service.delete2(id, id2));
2558
2556
  if (data === null || data === void 0 ? void 0 : data.success) {
2559
- let message = yield firstValueFrom(this.translateService.get('Alert.Deleted'));
2560
- this.alertService.error(message, null, 'fas fa-trash');
2557
+ let message = yield firstValueFrom(this.translate.get('Alert.Deleted'));
2558
+ this.alert.error(message, null, 'fas fa-trash');
2561
2559
  this.refresh();
2562
2560
  }
2563
2561
  });
2564
2562
  }
2565
2563
  edit(id) {
2566
- this.router.navigate([this.url, id, { returnUrl: this.url + ';filter=1' }]);
2564
+ // this.router.navigate([this.url, id],
2565
+ // { queryParams: { returnUrl: this.url + ';filter=1' } }
2566
+ // );
2567
+ this.router.navigate([this.url, id], { queryParams: { returnUrl: this.url + '?filter=1' } });
2567
2568
  }
2568
2569
  edit2(id, id2) {
2569
- this.router.navigate([this.url, id, id2, { returnUrl: this.url + ';filter=1' }]);
2570
+ // this.router.navigate([this.url, id, id2, { returnUrl: this.url + ';filter=1' }]);
2571
+ this.router.navigate([this.url, id, id2], { queryParams: { returnUrl: this.url + '?filter=1' } });
2570
2572
  }
2571
2573
  select(item) {
2572
2574
  item.selected = !item.selected;
@@ -2598,12 +2600,12 @@ class ListBaseComponent extends BaseComponent {
2598
2600
  return __awaiter(this, void 0, void 0, function* () {
2599
2601
  if (!m)
2600
2602
  return;
2601
- this.alertService.clear();
2603
+ this.alert.clear();
2602
2604
  let data = yield firstValueFrom(this.service.approve(m));
2603
2605
  if (!data || data.length === 0)
2604
2606
  return;
2605
- let message = yield firstValueFrom(this.translateService.get('Alert.Approved'));
2606
- this.alertService.success(message, undefined, 'fas fa-thumbs-up');
2607
+ let message = yield firstValueFrom(this.translate.get('Alert.Approved'));
2608
+ this.alert.success(message, undefined, 'fas fa-thumbs-up');
2607
2609
  this.refresh();
2608
2610
  });
2609
2611
  }
@@ -2630,12 +2632,12 @@ class ListBaseComponent extends BaseComponent {
2630
2632
  if (!m.comment)
2631
2633
  delete m.comment;
2632
2634
  }
2633
- this.alertService.clear();
2635
+ this.alert.clear();
2634
2636
  let data = yield firstValueFrom(this.service.disapprove(m));
2635
2637
  if (!data || data.length === 0)
2636
2638
  return;
2637
- let message = yield firstValueFrom(this.translateService.get('Alert.Disapproved'));
2638
- this.alertService.success(message, undefined, 'fas fa-thumbs-down');
2639
+ let message = yield firstValueFrom(this.translate.get('Alert.Disapproved'));
2640
+ this.alert.success(message, undefined, 'fas fa-thumbs-down');
2639
2641
  this.refresh();
2640
2642
  });
2641
2643
  }
@@ -2659,8 +2661,8 @@ class ListBaseComponent extends BaseComponent {
2659
2661
  this.showSum();
2660
2662
  }
2661
2663
  else {
2662
- let message = yield firstValueFrom(this.translateService.get('Alert.SumError'));
2663
- this.alertService.error(message);
2664
+ let message = yield firstValueFrom(this.translate.get('Alert.SumError'));
2665
+ this.alert.error(message);
2664
2666
  }
2665
2667
  });
2666
2668
  }
@@ -2729,9 +2731,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2729
2731
  }]
2730
2732
  }] });
2731
2733
 
2732
- class AlertComponent {
2734
+ class ZekAlert {
2733
2735
  constructor() {
2734
2736
  this._type = AlertType.Info;
2737
+ this._showClose = true;
2735
2738
  this.cssAlert = '';
2736
2739
  this.cssIcon = '';
2737
2740
  }
@@ -2756,19 +2759,25 @@ class AlertComponent {
2756
2759
  }
2757
2760
  }
2758
2761
  }
2762
+ get showClose() {
2763
+ return this._showClose;
2764
+ }
2765
+ set showClose(v) {
2766
+ this._showClose = Convert.toBoolean(v);
2767
+ }
2759
2768
  }
2760
- AlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2761
- AlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: AlertComponent, selector: "zek-alert", inputs: { type: "type", title: "title" }, ngImport: i0, template: "<div class=\"alert {{cssAlert}} alert-dismissible fade show\" role=\"alert\">\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1\" *ngIf=\"cssIcon\">\r\n <span class=\"flex-shrink-0\"><i class=\"{{cssIcon}}\"></i></span>\r\n </div>\r\n <div class=\"col-auto\">\r\n <div *ngIf=\"title\">\r\n <h5 class=\"alert-heading\">{{title}}</h5>\r\n </div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2762
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertComponent, decorators: [{
2769
+ ZekAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
2770
+ ZekAlert.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekAlert, selector: "zek-alert", inputs: { type: "type", title: "title" }, ngImport: i0, template: "<div class=\"alert {{cssAlert}} alert-dismissible fade show\" role=\"alert\">\r\n <button *ngIf=\"_showClose\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1\" *ngIf=\"cssIcon\">\r\n <span class=\"flex-shrink-0\"><i class=\"{{cssIcon}}\"></i></span>\r\n </div>\r\n <div class=\"col-auto\">\r\n <div *ngIf=\"title\">\r\n <h5 class=\"alert-heading\">{{title}}</h5>\r\n </div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekAlert, decorators: [{
2763
2772
  type: Component,
2764
- args: [{ selector: 'zek-alert', template: "<div class=\"alert {{cssAlert}} alert-dismissible fade show\" role=\"alert\">\r\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1\" *ngIf=\"cssIcon\">\r\n <span class=\"flex-shrink-0\"><i class=\"{{cssIcon}}\"></i></span>\r\n </div>\r\n <div class=\"col-auto\">\r\n <div *ngIf=\"title\">\r\n <h5 class=\"alert-heading\">{{title}}</h5>\r\n </div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
2773
+ args: [{ selector: 'zek-alert', template: "<div class=\"alert {{cssAlert}} alert-dismissible fade show\" role=\"alert\">\r\n <button *ngIf=\"_showClose\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1\" *ngIf=\"cssIcon\">\r\n <span class=\"flex-shrink-0\"><i class=\"{{cssIcon}}\"></i></span>\r\n </div>\r\n <div class=\"col-auto\">\r\n <div *ngIf=\"title\">\r\n <h5 class=\"alert-heading\">{{title}}</h5>\r\n </div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
2765
2774
  }], propDecorators: { type: [{
2766
2775
  type: Input
2767
2776
  }], title: [{
2768
2777
  type: Input
2769
2778
  }] } });
2770
2779
 
2771
- class ToastComponent {
2780
+ class ZekToast {
2772
2781
  constructor(alertService) {
2773
2782
  this.alertService = alertService;
2774
2783
  this.icon = true;
@@ -2860,9 +2869,9 @@ class ToastComponent {
2860
2869
  }
2861
2870
  }
2862
2871
  }
2863
- ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToastComponent, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
2864
- ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ToastComponent, selector: "zek-toast", inputs: { timeOut: "timeOut", icon: "icon" }, ngImport: i0, template: "<div class=\"toast-container position-fixed top-0 end-0 p-3\">\r\n <div *ngFor=\"let toast of toasts\" class=\"toast fade show border-0 {{ toast.css }}\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-header\">\r\n <span class=\"me-1\" *ngIf=\"icon && toast.icon\"><i class=\"{{ toast.icon }}\"></i></span>\r\n <strong class=\"me-auto\" *ngIf=\"toast.title\">{{ toast.title }}</strong>\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n <div class=\"toast-body\">\r\n {{ toast.message }}\r\n </div>\r\n </div>\r\n <!-- <div *ngFor=\"let toast of toasts\" class=\"toast fade show\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-body\">\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1 border-start border-8 {{toast.borderColor}}\">\r\n <span *ngIf=\"toast.icon\" class=\"icon flex-shrink-0 {{toast.iconColor}}\"><i class=\"{{toast.icon}}\"></i></span>\r\n </div>\r\n <div class=\"col\">\r\n <div *ngIf=\"toast.title\"><h5>{{toast.title}}</h5></div>\r\n {{ toast.message }}\r\n </div>\r\n <div class=\"col-auto p-0\">\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n</div>", styles: [":host>.toast-container{z-index:999999;opacity:.9}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ToastComponent, decorators: [{
2872
+ ZekToast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekToast, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
2873
+ ZekToast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekToast, selector: "zek-toast", inputs: { timeOut: "timeOut", icon: "icon" }, ngImport: i0, template: "<div class=\"toast-container position-fixed top-0 end-0 p-3\">\r\n <div *ngFor=\"let toast of toasts\" class=\"toast fade show border-0 {{ toast.css }}\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-header\">\r\n <span class=\"me-1\" *ngIf=\"icon && toast.icon\"><i class=\"{{ toast.icon }}\"></i></span>\r\n <strong class=\"me-auto\" *ngIf=\"toast.title\">{{ toast.title }}</strong>\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n <div class=\"toast-body\">\r\n {{ toast.message }}\r\n </div>\r\n </div>\r\n <!-- <div *ngFor=\"let toast of toasts\" class=\"toast fade show\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-body\">\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1 border-start border-8 {{toast.borderColor}}\">\r\n <span *ngIf=\"toast.icon\" class=\"icon flex-shrink-0 {{toast.iconColor}}\"><i class=\"{{toast.icon}}\"></i></span>\r\n </div>\r\n <div class=\"col\">\r\n <div *ngIf=\"toast.title\"><h5>{{toast.title}}</h5></div>\r\n {{ toast.message }}\r\n </div>\r\n <div class=\"col-auto p-0\">\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n</div>", styles: [":host>.toast-container{z-index:999999;opacity:.9}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2874
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekToast, decorators: [{
2866
2875
  type: Component,
2867
2876
  args: [{ selector: 'zek-toast', template: "<div class=\"toast-container position-fixed top-0 end-0 p-3\">\r\n <div *ngFor=\"let toast of toasts\" class=\"toast fade show border-0 {{ toast.css }}\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-header\">\r\n <span class=\"me-1\" *ngIf=\"icon && toast.icon\"><i class=\"{{ toast.icon }}\"></i></span>\r\n <strong class=\"me-auto\" *ngIf=\"toast.title\">{{ toast.title }}</strong>\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n <div class=\"toast-body\">\r\n {{ toast.message }}\r\n </div>\r\n </div>\r\n <!-- <div *ngFor=\"let toast of toasts\" class=\"toast fade show\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" data-bs-delay=\"3000\">\r\n <div class=\"toast-body\">\r\n <div class=\"row\">\r\n <div class=\"col-auto pe-1 border-start border-8 {{toast.borderColor}}\">\r\n <span *ngIf=\"toast.icon\" class=\"icon flex-shrink-0 {{toast.iconColor}}\"><i class=\"{{toast.icon}}\"></i></span>\r\n </div>\r\n <div class=\"col\">\r\n <div *ngIf=\"toast.title\"><h5>{{toast.title}}</h5></div>\r\n {{ toast.message }}\r\n </div>\r\n <div class=\"col-auto p-0\">\r\n <button type=\"button\" class=\"btn-close ms-auto me-2\" data-bs-dismiss=\"toast\" aria-label=\"Close\" (click)=\"remove(toast)\"></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div> -->\r\n</div>", styles: [":host>.toast-container{z-index:999999;opacity:.9}\n"] }]
2868
2877
  }], ctorParameters: function () { return [{ type: AlertService }]; }, propDecorators: { timeOut: [{
@@ -2871,7 +2880,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2871
2880
  type: Input
2872
2881
  }] } });
2873
2882
 
2874
- class ValidationComponent {
2883
+ class ZekValidation {
2875
2884
  constructor(alertService) {
2876
2885
  this.alertService = alertService;
2877
2886
  this.alerts = [];
@@ -2945,9 +2954,9 @@ class ValidationComponent {
2945
2954
  }
2946
2955
  }
2947
2956
  }
2948
- ValidationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidationComponent, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
2949
- ValidationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ValidationComponent, selector: "zek-validation", ngImport: i0, template: "<div *ngFor=\"let alert of alerts\" class=\"alert {{ cssAlert(alert) }} alert-dismissible fade show mt-3\" role=\"alert\">\r\n <button (click)=\"remove(alert)\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>\r\n <div *ngFor=\"let message of alert.messages\">\r\n <i *ngIf=\"cssIcon(alert)\" class=\"{{ cssIcon(alert) }}\"></i>\r\n {{message}}\r\n </div>\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2950
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ValidationComponent, decorators: [{
2957
+ ZekValidation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekValidation, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
2958
+ ZekValidation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekValidation, selector: "zek-validation", ngImport: i0, template: "<div *ngFor=\"let alert of alerts\" class=\"alert {{ cssAlert(alert) }} alert-dismissible fade show mt-3\" role=\"alert\">\r\n <button (click)=\"remove(alert)\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>\r\n <div *ngFor=\"let message of alert.messages\">\r\n <i *ngIf=\"cssIcon(alert)\" class=\"{{ cssIcon(alert) }}\"></i>\r\n {{message}}\r\n </div>\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2959
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekValidation, decorators: [{
2951
2960
  type: Component,
2952
2961
  args: [{ selector: 'zek-validation', template: "<div *ngFor=\"let alert of alerts\" class=\"alert {{ cssAlert(alert) }} alert-dismissible fade show mt-3\" role=\"alert\">\r\n <button (click)=\"remove(alert)\" type=\"button\" class=\"btn-close\" aria-label=\"Close\"></button>\r\n <div *ngFor=\"let message of alert.messages\">\r\n <i *ngIf=\"cssIcon(alert)\" class=\"{{ cssIcon(alert) }}\"></i>\r\n {{message}}\r\n </div>\r\n <ng-content></ng-content>\r\n</div>", styles: [":host{display:block}\n"] }]
2953
2962
  }], ctorParameters: function () { return [{ type: AlertService }]; } });
@@ -2955,11 +2964,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2955
2964
  class AlertModule {
2956
2965
  }
2957
2966
  AlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2958
- AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, declarations: [AlertComponent,
2959
- ValidationComponent,
2960
- ToastComponent], imports: [CommonModule], exports: [AlertComponent,
2961
- ValidationComponent,
2962
- ToastComponent] });
2967
+ AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, declarations: [ZekAlert,
2968
+ ZekValidation,
2969
+ ZekToast], imports: [CommonModule], exports: [ZekAlert,
2970
+ ZekValidation,
2971
+ ZekToast] });
2963
2972
  AlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, imports: [CommonModule] });
2964
2973
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, decorators: [{
2965
2974
  type: NgModule,
@@ -2968,15 +2977,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
2968
2977
  CommonModule
2969
2978
  ],
2970
2979
  declarations: [
2971
- AlertComponent,
2972
- ValidationComponent,
2973
- ToastComponent,
2980
+ ZekAlert,
2981
+ ZekValidation,
2982
+ ZekToast,
2974
2983
  ],
2975
2984
  providers: [],
2976
2985
  exports: [
2977
- AlertComponent,
2978
- ValidationComponent,
2979
- ToastComponent,
2986
+ ZekAlert,
2987
+ ZekValidation,
2988
+ ZekToast,
2980
2989
  ]
2981
2990
  }]
2982
2991
  }] });
@@ -4619,7 +4628,8 @@ class ListToolbarComponent {
4619
4628
  }
4620
4629
  create() {
4621
4630
  const url = UrlHelper.getNoParam(this.router.url);
4622
- this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
4631
+ // this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
4632
+ this.router.navigate([url, 'create'], { queryParams: { returnUrl: url + '?filter=1' } });
4623
4633
  }
4624
4634
  filter() {
4625
4635
  this.onFilter.emit();
@@ -6660,5 +6670,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
6660
6670
  * Generated bundle index. Do not edit.
6661
6671
  */
6662
6672
 
6663
- export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, UrlHelper, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekProgress, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
6673
+ export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, Tree, UrlHelper, ValidEventArgs, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekAlert, ZekProgress, ZekSelectModule, ZekSelectMultiple, ZekToast, ZekValidation, firstBy, handler, nullValidator, rangeValidator };
6664
6674
  //# sourceMappingURL=zek.mjs.map