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.
- package/esm2020/lib/components/base.component.mjs +6 -3
- package/esm2020/lib/components/edit-base.component.mjs +27 -36
- package/esm2020/lib/components/list-base.component.mjs +27 -22
- package/esm2020/lib/modules/alert/alert/alert.mjs +52 -0
- package/esm2020/lib/modules/alert/alert.module.mjs +15 -15
- package/esm2020/lib/modules/alert/index.mjs +4 -4
- package/esm2020/lib/modules/alert/toast/toast.mjs +109 -0
- package/esm2020/lib/modules/alert/validation/validation.mjs +85 -0
- package/esm2020/lib/modules/list-toolbar/list-toolbar.component.mjs +3 -2
- package/esm2020/lib/services/http-error-handler.service.mjs +4 -1
- package/fesm2015/zek.mjs +94 -84
- package/fesm2015/zek.mjs.map +1 -1
- package/fesm2020/zek.mjs +94 -84
- package/fesm2020/zek.mjs.map +1 -1
- package/lib/components/base.component.d.ts +1 -0
- package/lib/components/edit-base.component.d.ts +4 -4
- package/lib/components/list-base.component.d.ts +3 -3
- package/lib/modules/alert/alert/alert.d.ts +16 -0
- package/lib/modules/alert/alert.module.d.ts +4 -4
- package/lib/modules/alert/index.d.ts +3 -3
- package/lib/modules/alert/toast/{toast.component.d.ts → toast.d.ts} +3 -3
- package/lib/modules/alert/validation/{validation.component.d.ts → validation.d.ts} +3 -3
- package/package.json +1 -1
- package/esm2020/lib/modules/alert/alert/alert.component.mjs +0 -44
- package/esm2020/lib/modules/alert/toast/toast.component.mjs +0 -109
- package/esm2020/lib/modules/alert/validation/validation.component.mjs +0 -85
- package/lib/modules/alert/alert/alert.component.d.ts +0 -12
package/fesm2020/zek.mjs
CHANGED
|
@@ -1630,6 +1630,9 @@ class HttpErrorHandler {
|
|
|
1630
1630
|
else {
|
|
1631
1631
|
error = response.error;
|
|
1632
1632
|
}
|
|
1633
|
+
if (error instanceof ErrorEvent) {
|
|
1634
|
+
error = response.error.message;
|
|
1635
|
+
}
|
|
1633
1636
|
return ObjectHelper.isDefined(error) ? of(error) : of(result);
|
|
1634
1637
|
};
|
|
1635
1638
|
}
|
|
@@ -1926,15 +1929,18 @@ class BaseComponent extends CoreComponent {
|
|
|
1926
1929
|
getParam(name) {
|
|
1927
1930
|
return this.route.snapshot.paramMap.get(name);
|
|
1928
1931
|
}
|
|
1932
|
+
getQueryParam(name) {
|
|
1933
|
+
return this.route.snapshot.queryParamMap.get(name);
|
|
1934
|
+
}
|
|
1929
1935
|
navigateReturnUrl() {
|
|
1930
|
-
const returnUrl = this.
|
|
1936
|
+
const returnUrl = this.getQueryParam('returnUrl') || this.getParam('returnUrl');
|
|
1931
1937
|
if (returnUrl) {
|
|
1932
1938
|
let urlTree = this.router.parseUrl(returnUrl);
|
|
1933
1939
|
const urlWithoutParams = urlTree.root.children[PRIMARY_OUTLET].segments.map(it => it.path).join('/');
|
|
1934
1940
|
this.router.navigate([urlWithoutParams, urlTree.root.children[PRIMARY_OUTLET].segments[urlTree.root.children[PRIMARY_OUTLET].segments.length - 1].parameters]);
|
|
1935
1941
|
return;
|
|
1936
1942
|
}
|
|
1937
|
-
this.router.navigate([this.router.url.
|
|
1943
|
+
this.router.navigate([this.router.url.substring(0, this.router.url.lastIndexOf('/'))]);
|
|
1938
1944
|
}
|
|
1939
1945
|
cancel() {
|
|
1940
1946
|
this.navigateReturnUrl();
|
|
@@ -2193,10 +2199,10 @@ class EditFormComponent extends BaseComponent {
|
|
|
2193
2199
|
// @ViewChild('submitModal', { static: false }) protected readonly submitModal?: ModalComponent;
|
|
2194
2200
|
init() {
|
|
2195
2201
|
super.init();
|
|
2196
|
-
const idParam = this.getParam('id');
|
|
2202
|
+
const idParam = this.getParam('id') || this.getQueryParam('id');
|
|
2197
2203
|
if (idParam)
|
|
2198
2204
|
this.id = +idParam;
|
|
2199
|
-
const id2Param = this.getParam('id2');
|
|
2205
|
+
const id2Param = this.getParam('id2') || this.getQueryParam('id2');
|
|
2200
2206
|
if (id2Param)
|
|
2201
2207
|
this.id2 = +id2Param;
|
|
2202
2208
|
}
|
|
@@ -2223,18 +2229,9 @@ class EditFormComponent extends BaseComponent {
|
|
|
2223
2229
|
}
|
|
2224
2230
|
return false;
|
|
2225
2231
|
}
|
|
2226
|
-
// saveAndNavigateToReturnUrl(f: NgForm) {
|
|
2227
|
-
// if (!f || f.valid) {
|
|
2228
|
-
// this.internalSave(true);
|
|
2229
|
-
// }
|
|
2230
|
-
// }
|
|
2231
2232
|
internalSave(navigateToReturnUrl) {
|
|
2232
2233
|
throw 'Not implemented internalSave';
|
|
2233
2234
|
}
|
|
2234
|
-
// protected navigateEditUrl() {
|
|
2235
|
-
// if (this.getAction().toLowerCase() === 'create')
|
|
2236
|
-
// this.router.navigate([this.router.url.substr(0, this.router.url.lastIndexOf('/') + 1), this.id]);
|
|
2237
|
-
// }
|
|
2238
2235
|
showApproveModal() {
|
|
2239
2236
|
this.approveModel = {};
|
|
2240
2237
|
if (this.approveModal) {
|
|
@@ -2293,14 +2290,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2293
2290
|
args: ['disapproveModal', { static: false }]
|
|
2294
2291
|
}] } });
|
|
2295
2292
|
class EditBaseComponent extends EditFormComponent {
|
|
2296
|
-
constructor(service,
|
|
2293
|
+
constructor(service, translate, alert, route, router) {
|
|
2297
2294
|
super(route, router);
|
|
2298
2295
|
this.service = service;
|
|
2299
|
-
this.
|
|
2300
|
-
this.
|
|
2296
|
+
this.translate = translate;
|
|
2297
|
+
this.alert = alert;
|
|
2301
2298
|
}
|
|
2302
2299
|
async internalSave(navigateToReturnUrl) {
|
|
2303
|
-
this.
|
|
2300
|
+
this.alert.clear();
|
|
2304
2301
|
let data = await firstValueFrom(this.service.save(this.model));
|
|
2305
2302
|
let success = false;
|
|
2306
2303
|
if (typeof data === 'number' && data > 0) {
|
|
@@ -2311,8 +2308,8 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2311
2308
|
success = true;
|
|
2312
2309
|
}
|
|
2313
2310
|
if (success) {
|
|
2314
|
-
let message = await firstValueFrom(this.
|
|
2315
|
-
this.
|
|
2311
|
+
let message = await firstValueFrom(this.translate.get('Alert.SaveSuccess'));
|
|
2312
|
+
this.alert.success(message, null, 'fas fa-save');
|
|
2316
2313
|
if (navigateToReturnUrl === true) {
|
|
2317
2314
|
this.navigateReturnUrl();
|
|
2318
2315
|
}
|
|
@@ -2324,47 +2321,47 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2324
2321
|
// }
|
|
2325
2322
|
}
|
|
2326
2323
|
else {
|
|
2327
|
-
let message = await firstValueFrom(this.
|
|
2328
|
-
this.
|
|
2324
|
+
let message = await firstValueFrom(this.translate.get('Alert.SaveError'));
|
|
2325
|
+
this.alert.error(message, null, 'fas fa-save');
|
|
2329
2326
|
return false;
|
|
2330
2327
|
}
|
|
2331
2328
|
}
|
|
2332
2329
|
async internalApprove(model) {
|
|
2333
2330
|
let data = await firstValueFrom(this.service.approve(model));
|
|
2334
2331
|
if (data && data.length > 0) {
|
|
2335
|
-
let message = await firstValueFrom(this.
|
|
2336
|
-
this.
|
|
2332
|
+
let message = await firstValueFrom(this.translate.get('Alert.Approved'));
|
|
2333
|
+
this.alert.success(message, null, 'fas fa-save');
|
|
2337
2334
|
return true;
|
|
2338
2335
|
}
|
|
2339
2336
|
else {
|
|
2340
|
-
let message = await firstValueFrom(this.
|
|
2341
|
-
this.
|
|
2337
|
+
let message = await firstValueFrom(this.translate.get('Alert.ApproveError'));
|
|
2338
|
+
this.alert.error(message, null, 'fas fa-save');
|
|
2342
2339
|
return false;
|
|
2343
2340
|
}
|
|
2344
2341
|
}
|
|
2345
2342
|
async internalDisapprove(model) {
|
|
2346
2343
|
let data = await firstValueFrom(this.service.disapprove(model));
|
|
2347
2344
|
if (data && data.length > 0) {
|
|
2348
|
-
let message = await firstValueFrom(this.
|
|
2349
|
-
this.
|
|
2345
|
+
let message = await firstValueFrom(this.translate.get('Alert.Disapproved'));
|
|
2346
|
+
this.alert.success(message, null, 'fas fa-save');
|
|
2350
2347
|
return true;
|
|
2351
2348
|
}
|
|
2352
2349
|
else {
|
|
2353
|
-
let message = await firstValueFrom(this.
|
|
2354
|
-
this.
|
|
2350
|
+
let message = await firstValueFrom(this.translate.get('Alert.DisapproveError'));
|
|
2351
|
+
this.alert.error(message, null, 'fas fa-save');
|
|
2355
2352
|
return false;
|
|
2356
2353
|
}
|
|
2357
2354
|
}
|
|
2358
2355
|
async internalSubmit(model) {
|
|
2359
2356
|
let data = await firstValueFrom(this.service.approve(model));
|
|
2360
2357
|
if (data && data.length > 0) {
|
|
2361
|
-
let message = await firstValueFrom(this.
|
|
2362
|
-
this.
|
|
2358
|
+
let message = await firstValueFrom(this.translate.get('Alert.Submitted'));
|
|
2359
|
+
this.alert.success(message, null, 'fas fa-save');
|
|
2363
2360
|
return true;
|
|
2364
2361
|
}
|
|
2365
2362
|
else {
|
|
2366
|
-
let message = await firstValueFrom(this.
|
|
2367
|
-
this.
|
|
2363
|
+
let message = await firstValueFrom(this.translate.get('Alert.SubmitError'));
|
|
2364
|
+
this.alert.error(message, null, 'fas fa-save');
|
|
2368
2365
|
return false;
|
|
2369
2366
|
}
|
|
2370
2367
|
}
|
|
@@ -2383,8 +2380,8 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2383
2380
|
async restore() {
|
|
2384
2381
|
let data = await firstValueFrom(this.service.restore(this.id));
|
|
2385
2382
|
if (data?.success) {
|
|
2386
|
-
let message = await firstValueFrom(this.
|
|
2387
|
-
this.
|
|
2383
|
+
let message = await firstValueFrom(this.translate.get('Alert.Restored'));
|
|
2384
|
+
this.alert.success(message);
|
|
2388
2385
|
this.load();
|
|
2389
2386
|
}
|
|
2390
2387
|
}
|
|
@@ -2400,8 +2397,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2400
2397
|
type: Directive
|
|
2401
2398
|
}], ctorParameters: function () { return [{ type: undefined }, { type: i1$1.TranslateService }, { type: AlertService }, { type: i1.ActivatedRoute }, { type: i1.Router }]; } });
|
|
2402
2399
|
class EditComponent extends EditBaseComponent {
|
|
2403
|
-
constructor(ctorModel, service,
|
|
2404
|
-
super(service,
|
|
2400
|
+
constructor(ctorModel, service, translate, alert, route, router) {
|
|
2401
|
+
super(service, translate, alert, route, router);
|
|
2405
2402
|
this.ctorModel = ctorModel;
|
|
2406
2403
|
}
|
|
2407
2404
|
initCreate() {
|
|
@@ -2416,11 +2413,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2416
2413
|
|
|
2417
2414
|
// declare let bootstrap: any;
|
|
2418
2415
|
class ListBaseComponent extends BaseComponent {
|
|
2419
|
-
constructor(service,
|
|
2416
|
+
constructor(service, translate, alert, route, router) {
|
|
2420
2417
|
super(route, router);
|
|
2421
2418
|
this.service = service;
|
|
2422
|
-
this.
|
|
2423
|
-
this.
|
|
2419
|
+
this.translate = translate;
|
|
2420
|
+
this.alert = alert;
|
|
2424
2421
|
this.filter = new FilterBase();
|
|
2425
2422
|
this.saveFilter = true;
|
|
2426
2423
|
this.internalFilter = new FilterBase();
|
|
@@ -2450,7 +2447,7 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2450
2447
|
initDefaultFilter() {
|
|
2451
2448
|
}
|
|
2452
2449
|
initStoredFilter() {
|
|
2453
|
-
let filterParam = this.getParam('filter');
|
|
2450
|
+
let filterParam = this.getQueryParam('filter') || this.getParam('filter');
|
|
2454
2451
|
if (filterParam) {
|
|
2455
2452
|
const tmp = StorageHelper.get('filter');
|
|
2456
2453
|
if (tmp && tmp.url && tmp.url === this.url && tmp.filter) {
|
|
@@ -2508,31 +2505,36 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2508
2505
|
}
|
|
2509
2506
|
create() {
|
|
2510
2507
|
const url = UrlHelper.getNoParam(this.router.url);
|
|
2511
|
-
this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
|
|
2508
|
+
// this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
|
|
2509
|
+
this.router.navigate([url, 'create'], { queryParams: { returnUrl: url + '?filter=1' } });
|
|
2512
2510
|
}
|
|
2513
2511
|
async delete(id) {
|
|
2514
|
-
this.
|
|
2512
|
+
this.alert.clear();
|
|
2515
2513
|
let data = await firstValueFrom(this.service.delete(id));
|
|
2516
2514
|
if (data?.success) {
|
|
2517
|
-
let message = await firstValueFrom(this.
|
|
2518
|
-
this.
|
|
2515
|
+
let message = await firstValueFrom(this.translate.get('Alert.Deleted'));
|
|
2516
|
+
this.alert.error(message, null, 'fas fa-trash');
|
|
2519
2517
|
this.refresh();
|
|
2520
2518
|
}
|
|
2521
2519
|
}
|
|
2522
2520
|
async delete2(id, id2) {
|
|
2523
|
-
this.
|
|
2521
|
+
this.alert.clear();
|
|
2524
2522
|
let data = await firstValueFrom(this.service.delete2(id, id2));
|
|
2525
2523
|
if (data?.success) {
|
|
2526
|
-
let message = await firstValueFrom(this.
|
|
2527
|
-
this.
|
|
2524
|
+
let message = await firstValueFrom(this.translate.get('Alert.Deleted'));
|
|
2525
|
+
this.alert.error(message, null, 'fas fa-trash');
|
|
2528
2526
|
this.refresh();
|
|
2529
2527
|
}
|
|
2530
2528
|
}
|
|
2531
2529
|
edit(id) {
|
|
2532
|
-
this.router.navigate([this.url, id,
|
|
2530
|
+
// this.router.navigate([this.url, id],
|
|
2531
|
+
// { queryParams: { returnUrl: this.url + ';filter=1' } }
|
|
2532
|
+
// );
|
|
2533
|
+
this.router.navigate([this.url, id], { queryParams: { returnUrl: this.url + '?filter=1' } });
|
|
2533
2534
|
}
|
|
2534
2535
|
edit2(id, id2) {
|
|
2535
|
-
this.router.navigate([this.url, id, id2, { returnUrl: this.url + ';filter=1' }]);
|
|
2536
|
+
// this.router.navigate([this.url, id, id2, { returnUrl: this.url + ';filter=1' }]);
|
|
2537
|
+
this.router.navigate([this.url, id, id2], { queryParams: { returnUrl: this.url + '?filter=1' } });
|
|
2536
2538
|
}
|
|
2537
2539
|
select(item) {
|
|
2538
2540
|
item.selected = !item.selected;
|
|
@@ -2563,12 +2565,12 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2563
2565
|
async approve(m) {
|
|
2564
2566
|
if (!m)
|
|
2565
2567
|
return;
|
|
2566
|
-
this.
|
|
2568
|
+
this.alert.clear();
|
|
2567
2569
|
let data = await firstValueFrom(this.service.approve(m));
|
|
2568
2570
|
if (!data || data.length === 0)
|
|
2569
2571
|
return;
|
|
2570
|
-
let message = await firstValueFrom(this.
|
|
2571
|
-
this.
|
|
2572
|
+
let message = await firstValueFrom(this.translate.get('Alert.Approved'));
|
|
2573
|
+
this.alert.success(message, undefined, 'fas fa-thumbs-up');
|
|
2572
2574
|
this.refresh();
|
|
2573
2575
|
}
|
|
2574
2576
|
showDisapproveModal(id) {
|
|
@@ -2593,12 +2595,12 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2593
2595
|
if (!m.comment)
|
|
2594
2596
|
delete m.comment;
|
|
2595
2597
|
}
|
|
2596
|
-
this.
|
|
2598
|
+
this.alert.clear();
|
|
2597
2599
|
let data = await firstValueFrom(this.service.disapprove(m));
|
|
2598
2600
|
if (!data || data.length === 0)
|
|
2599
2601
|
return;
|
|
2600
|
-
let message = await firstValueFrom(this.
|
|
2601
|
-
this.
|
|
2602
|
+
let message = await firstValueFrom(this.translate.get('Alert.Disapproved'));
|
|
2603
|
+
this.alert.success(message, undefined, 'fas fa-thumbs-down');
|
|
2602
2604
|
this.refresh();
|
|
2603
2605
|
}
|
|
2604
2606
|
getSelectedIds() {
|
|
@@ -2620,8 +2622,8 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2620
2622
|
this.showSum();
|
|
2621
2623
|
}
|
|
2622
2624
|
else {
|
|
2623
|
-
let message = await firstValueFrom(this.
|
|
2624
|
-
this.
|
|
2625
|
+
let message = await firstValueFrom(this.translate.get('Alert.SumError'));
|
|
2626
|
+
this.alert.error(message);
|
|
2625
2627
|
}
|
|
2626
2628
|
}
|
|
2627
2629
|
export(fileTypeId) {
|
|
@@ -2689,9 +2691,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2689
2691
|
}]
|
|
2690
2692
|
}] });
|
|
2691
2693
|
|
|
2692
|
-
class
|
|
2694
|
+
class ZekAlert {
|
|
2693
2695
|
constructor() {
|
|
2694
2696
|
this._type = AlertType.Info;
|
|
2697
|
+
this._showClose = true;
|
|
2695
2698
|
this.cssAlert = '';
|
|
2696
2699
|
this.cssIcon = '';
|
|
2697
2700
|
}
|
|
@@ -2716,19 +2719,25 @@ class AlertComponent {
|
|
|
2716
2719
|
}
|
|
2717
2720
|
}
|
|
2718
2721
|
}
|
|
2722
|
+
get showClose() {
|
|
2723
|
+
return this._showClose;
|
|
2724
|
+
}
|
|
2725
|
+
set showClose(v) {
|
|
2726
|
+
this._showClose = Convert.toBoolean(v);
|
|
2727
|
+
}
|
|
2719
2728
|
}
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type:
|
|
2729
|
+
ZekAlert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekAlert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2730
|
+
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"] }] });
|
|
2731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekAlert, decorators: [{
|
|
2723
2732
|
type: Component,
|
|
2724
|
-
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"] }]
|
|
2733
|
+
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"] }]
|
|
2725
2734
|
}], propDecorators: { type: [{
|
|
2726
2735
|
type: Input
|
|
2727
2736
|
}], title: [{
|
|
2728
2737
|
type: Input
|
|
2729
2738
|
}] } });
|
|
2730
2739
|
|
|
2731
|
-
class
|
|
2740
|
+
class ZekToast {
|
|
2732
2741
|
constructor(alertService) {
|
|
2733
2742
|
this.alertService = alertService;
|
|
2734
2743
|
this.icon = true;
|
|
@@ -2820,9 +2829,9 @@ class ToastComponent {
|
|
|
2820
2829
|
}
|
|
2821
2830
|
}
|
|
2822
2831
|
}
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type:
|
|
2832
|
+
ZekToast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekToast, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2833
|
+
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"] }] });
|
|
2834
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekToast, decorators: [{
|
|
2826
2835
|
type: Component,
|
|
2827
2836
|
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"] }]
|
|
2828
2837
|
}], ctorParameters: function () { return [{ type: AlertService }]; }, propDecorators: { timeOut: [{
|
|
@@ -2831,7 +2840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2831
2840
|
type: Input
|
|
2832
2841
|
}] } });
|
|
2833
2842
|
|
|
2834
|
-
class
|
|
2843
|
+
class ZekValidation {
|
|
2835
2844
|
constructor(alertService) {
|
|
2836
2845
|
this.alertService = alertService;
|
|
2837
2846
|
this.alerts = [];
|
|
@@ -2904,9 +2913,9 @@ class ValidationComponent {
|
|
|
2904
2913
|
}
|
|
2905
2914
|
}
|
|
2906
2915
|
}
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type:
|
|
2916
|
+
ZekValidation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekValidation, deps: [{ token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2917
|
+
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"] }] });
|
|
2918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekValidation, decorators: [{
|
|
2910
2919
|
type: Component,
|
|
2911
2920
|
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"] }]
|
|
2912
2921
|
}], ctorParameters: function () { return [{ type: AlertService }]; } });
|
|
@@ -2914,11 +2923,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2914
2923
|
class AlertModule {
|
|
2915
2924
|
}
|
|
2916
2925
|
AlertModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2917
|
-
AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, declarations: [
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2926
|
+
AlertModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, declarations: [ZekAlert,
|
|
2927
|
+
ZekValidation,
|
|
2928
|
+
ZekToast], imports: [CommonModule], exports: [ZekAlert,
|
|
2929
|
+
ZekValidation,
|
|
2930
|
+
ZekToast] });
|
|
2922
2931
|
AlertModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, imports: [CommonModule] });
|
|
2923
2932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AlertModule, decorators: [{
|
|
2924
2933
|
type: NgModule,
|
|
@@ -2927,15 +2936,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2927
2936
|
CommonModule
|
|
2928
2937
|
],
|
|
2929
2938
|
declarations: [
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2939
|
+
ZekAlert,
|
|
2940
|
+
ZekValidation,
|
|
2941
|
+
ZekToast,
|
|
2933
2942
|
],
|
|
2934
2943
|
providers: [],
|
|
2935
2944
|
exports: [
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2945
|
+
ZekAlert,
|
|
2946
|
+
ZekValidation,
|
|
2947
|
+
ZekToast,
|
|
2939
2948
|
]
|
|
2940
2949
|
}]
|
|
2941
2950
|
}] });
|
|
@@ -4566,7 +4575,8 @@ class ListToolbarComponent {
|
|
|
4566
4575
|
}
|
|
4567
4576
|
create() {
|
|
4568
4577
|
const url = UrlHelper.getNoParam(this.router.url);
|
|
4569
|
-
this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
|
|
4578
|
+
// this.router.navigate([url, 'create', { returnUrl: url + ';filter=1' }]);
|
|
4579
|
+
this.router.navigate([url, 'create'], { queryParams: { returnUrl: url + '?filter=1' } });
|
|
4570
4580
|
}
|
|
4571
4581
|
filter() {
|
|
4572
4582
|
this.onFilter.emit();
|
|
@@ -6603,5 +6613,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
6603
6613
|
* Generated bundle index. Do not edit.
|
|
6604
6614
|
*/
|
|
6605
6615
|
|
|
6606
|
-
export { API_BASE_URL, AgeModule, AgePipe, Alert,
|
|
6616
|
+
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 };
|
|
6607
6617
|
//# sourceMappingURL=zek.mjs.map
|