@seniorsistemas/exclusion-process-component 0.0.1-c049d10c-e93a-4d63-9c2a-b17bca40c324 → 0.2.0

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 (50) hide show
  1. package/bundles/seniorsistemas-exclusion-process-component.umd.js +662 -33
  2. package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +1 -1
  5. package/esm2015/exclusion-details/exclusion-details.component.js +99 -12
  6. package/esm2015/exclusion-details/exclusion-details.module.js +4 -3
  7. package/esm2015/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
  8. package/esm2015/exclusion-details/protocols/show-details-information.js +1 -1
  9. package/esm2015/exclusion-details/protocols/web-socket-event-data.js +1 -0
  10. package/esm2015/exclusions-list/exclusions-list.component.js +358 -0
  11. package/esm2015/exclusions-list/exclusions-list.module.js +47 -0
  12. package/esm2015/exclusions-list/exclusions-list.routing.js +115 -0
  13. package/esm2015/exclusions-list/index.js +4 -0
  14. package/esm2015/public-api.js +2 -1
  15. package/esm2015/seniorsistemas-exclusion-process-component.js +4 -2
  16. package/esm2015/services/filter.service.js +4 -1
  17. package/esm2015/services/index.js +2 -0
  18. package/esm2015/services/logical-delete.service.js +33 -19
  19. package/esm5/exclusion-details/exclusion-details.component.js +104 -12
  20. package/esm5/exclusion-details/exclusion-details.module.js +4 -3
  21. package/esm5/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
  22. package/esm5/exclusion-details/protocols/show-details-information.js +1 -1
  23. package/esm5/exclusion-details/protocols/web-socket-event-data.js +1 -0
  24. package/esm5/exclusions-list/exclusions-list.component.js +373 -0
  25. package/esm5/exclusions-list/exclusions-list.module.js +50 -0
  26. package/esm5/exclusions-list/exclusions-list.routing.js +127 -0
  27. package/esm5/exclusions-list/index.js +4 -0
  28. package/esm5/public-api.js +2 -1
  29. package/esm5/seniorsistemas-exclusion-process-component.js +4 -2
  30. package/esm5/services/filter.service.js +4 -1
  31. package/esm5/services/index.js +2 -0
  32. package/esm5/services/logical-delete.service.js +36 -20
  33. package/exclusion-details/exclusion-details.component.d.ts +13 -1
  34. package/exclusion-details/protocols/exclusion-process-status-changed.d.ts +8 -0
  35. package/exclusion-details/protocols/show-details-information.d.ts +2 -1
  36. package/exclusion-details/protocols/web-socket-event-data.d.ts +6 -0
  37. package/exclusions-list/exclusions-list.component.d.ts +70 -0
  38. package/exclusions-list/exclusions-list.module.d.ts +2 -0
  39. package/exclusions-list/exclusions-list.routing.d.ts +29 -0
  40. package/exclusions-list/index.d.ts +3 -0
  41. package/fesm2015/seniorsistemas-exclusion-process-component.js +619 -33
  42. package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -1
  43. package/fesm5/seniorsistemas-exclusion-process-component.js +657 -34
  44. package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -1
  45. package/package.json +14 -6
  46. package/public-api.d.ts +1 -0
  47. package/seniorsistemas-exclusion-process-component.d.ts +3 -1
  48. package/seniorsistemas-exclusion-process-component.metadata.json +1 -1
  49. package/services/index.d.ts +1 -0
  50. package/services/logical-delete.service.d.ts +5 -3
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('primeng/panel'), require('primeng/table'), require('@seniorsistemas/angular-components'), require('moment'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('@ngx-translate/core'), require('primeng/api')) :
3
- typeof define === 'function' && define.amd ? define('@seniorsistemas/exclusion-process-component', ['exports', '@angular/common', '@angular/core', 'primeng/panel', 'primeng/table', '@seniorsistemas/angular-components', 'moment', '@angular/router', 'rxjs', 'rxjs/operators', '@angular/common/http', '@ngx-translate/core', 'primeng/api'], factory) :
4
- (global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['exclusion-process-component'] = {}), global.ng.common, global.ng.core, global.panel, global.table, global.angularComponents, global.moment, global.ng.router, global.rxjs, global.rxjs.operators, global.ng.common.http, global.core$1, global.api));
5
- }(this, (function (exports, common, core, panel, table, angularComponents, moment, router, rxjs, operators, http, core$1, api) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('primeng/panel'), require('primeng/table'), require('@seniorsistemas/angular-components'), require('moment'), require('@angular/router'), require('@ngx-translate/core'), require('rxjs'), require('rxjs/operators'), require('@senior-gestao-empresarial/angular-components'), require('@angular/common/http'), require('primeng/api'), require('@angular/forms'), require('primeng/dialog'), require('primeng/confirmdialog'), require('primeng/inputtext'), require('@seniorsistemas/platform-components')) :
3
+ typeof define === 'function' && define.amd ? define('@seniorsistemas/exclusion-process-component', ['exports', '@angular/common', '@angular/core', 'primeng/panel', 'primeng/table', '@seniorsistemas/angular-components', 'moment', '@angular/router', '@ngx-translate/core', 'rxjs', 'rxjs/operators', '@senior-gestao-empresarial/angular-components', '@angular/common/http', 'primeng/api', '@angular/forms', 'primeng/dialog', 'primeng/confirmdialog', 'primeng/inputtext', '@seniorsistemas/platform-components'], factory) :
4
+ (global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['exclusion-process-component'] = {}), global.ng.common, global.ng.core, global.panel, global.table, global.angularComponents, global.moment, global.ng.router, global.core$1, global.rxjs, global.rxjs.operators, global.angularComponents$1, global.ng.common.http, global.api, global.ng.forms, global.dialog, global.confirmdialog, global.inputtext, global.platformComponents));
5
+ }(this, (function (exports, common, core, panel, table, angularComponents, moment, router, core$1, rxjs, operators, angularComponents$1, http, api, forms, dialog, confirmdialog, inputtext, platformComponents) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -259,6 +259,8 @@
259
259
  return LogicalDeleteConfigService;
260
260
  }());
261
261
 
262
+ var HTTP_UNAUTHORIZED_CODE = 401;
263
+ var DEFAULT_PAGE_SIZE = 10;
262
264
  var LogicalDeleteService = /** @class */ (function () {
263
265
  function LogicalDeleteService(http, messageService, translate, projectConfigs) {
264
266
  this.http = http;
@@ -267,16 +269,16 @@
267
269
  this.projectConfigs = projectConfigs;
268
270
  var entityUrl = projectConfigs.getDomain() + "/" + projectConfigs.getService();
269
271
  this.exclusionProcessUrl = entityUrl + "/entities/exclusionProcess";
270
- this.listExclusionsUrl = entityUrl + "/entities/exclusionProcess";
271
272
  this.defaultCatch = this.defaultCatch.bind(this);
272
273
  }
273
274
  LogicalDeleteService.prototype.defaultCatch = function () {
274
275
  var _this = this;
275
276
  return operators.catchError(function (err) {
277
+ var _a;
276
278
  if (err) {
277
279
  var summary = err.status ? String(err.status) : "Error";
278
- var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
279
- if (err.status === 401) {
280
+ var detail = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message) || err.statusText || err.message;
281
+ if (err.status === HTTP_UNAUTHORIZED_CODE) {
280
282
  var prefix = _this.projectConfigs.getTranslationPrefix();
281
283
  summary = _this.translate.instant(prefix + ".error_unauthorized_title");
282
284
  detail = _this.translate.instant(prefix + ".error_unauthorized_description");
@@ -284,14 +286,14 @@
284
286
  _this.messageService.add({
285
287
  severity: "error",
286
288
  summary: summary,
287
- detail: detail
289
+ detail: detail || "Error"
288
290
  });
289
291
  }
290
292
  return rxjs.throwError(err);
291
293
  });
292
294
  };
293
295
  LogicalDeleteService.prototype.getListQueryParams = function (listParams) {
294
- var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? 10 : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
296
+ var _a = listParams.page, page = _a === void 0 ? 0 : _a, _b = listParams.size, size = _b === void 0 ? DEFAULT_PAGE_SIZE : _b, _c = listParams.sort, sort = _c === void 0 ? [] : _c, _d = listParams.filterQuery, filterQuery = _d === void 0 ? "" : _d, _e = listParams.displayFields, displayFields = _e === void 0 ? [] : _e;
295
297
  var params = new http.HttpParams();
296
298
  params = params.append("size", String(size));
297
299
  params = params.append("offset", String(page));
@@ -313,10 +315,23 @@
313
315
  }
314
316
  return params;
315
317
  };
316
- LogicalDeleteService.prototype.getProcessDetails = function (recordId) {
317
- var filterParams = {
318
- filter: "recordId eq '" + recordId + "'"
319
- };
318
+ LogicalDeleteService.prototype.getProcessDetails = function (id) {
319
+ return this.doGetProcessDetails({
320
+ filter: "id eq '" + id + "'",
321
+ size: "1",
322
+ offset: "0",
323
+ });
324
+ };
325
+ LogicalDeleteService.prototype.getLatestProcessDetails = function (recordId) {
326
+ return this.doGetProcessDetails({
327
+ filter: "recordId eq '" + recordId + "'",
328
+ size: "1",
329
+ offset: "0",
330
+ orderby: "startDate desc"
331
+ });
332
+ };
333
+ LogicalDeleteService.prototype.doGetProcessDetails = function (filterParams) {
334
+ var _this = this;
320
335
  return this.http.get(this.exclusionProcessUrl, { params: filterParams })
321
336
  .pipe(this.defaultCatch())
322
337
  .pipe(operators.map(function (value) {
@@ -324,10 +339,18 @@
324
339
  if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
325
340
  return null;
326
341
  }
327
- return value.contents[0];
342
+ return _this.mapExclusionsDates(value.contents[0]);
328
343
  }));
329
344
  };
345
+ LogicalDeleteService.prototype.mapExclusionsDates = function (exclusionProcess) {
346
+ var _a;
347
+ return __assign(__assign({}, exclusionProcess), { startDate: exclusionProcess.startDate ? moment(exclusionProcess.startDate).toDate() : null, finishDate: exclusionProcess.finishDate ? moment(exclusionProcess.finishDate).toDate() : null, groups: (_a = exclusionProcess.groups) === null || _a === void 0 ? void 0 : _a.map(function (group) {
348
+ var _a;
349
+ return (__assign(__assign({}, group), { startDate: group.startDate ? moment(group.startDate).toDate() : null, finishDate: group.finishDate ? moment(group.finishDate).toDate() : null, steps: (_a = group.steps) === null || _a === void 0 ? void 0 : _a.map(function (step) { return (__assign(__assign({}, step), { startDate: step.startDate ? moment(step.startDate).toDate() : null, finishDate: step.finishDate ? moment(step.finishDate).toDate() : null })); }) }));
350
+ }) });
351
+ };
330
352
  LogicalDeleteService.prototype.listExclusions = function (entityName, params) {
353
+ var _this = this;
331
354
  if (params === void 0) { params = {}; }
332
355
  if (params.filterQuery) {
333
356
  params.filterQuery += " and lower(entityName) eq lower('" + entityName + "')";
@@ -338,14 +361,7 @@
338
361
  return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
339
362
  .pipe(this.defaultCatch())
340
363
  .pipe(operators.map(function (value) {
341
- value.contents.forEach(function (p) {
342
- if (p.startDate) {
343
- p.startDate = moment(p.startDate).toDate();
344
- }
345
- if (p.finishDate) {
346
- p.finishDate = moment(p.finishDate).toDate();
347
- }
348
- });
364
+ value.contents = value.contents.map(_this.mapExclusionsDates);
349
365
  return value;
350
366
  }));
351
367
  };
@@ -415,16 +431,26 @@
415
431
  ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
416
432
  this.ngUnsubscribe.next();
417
433
  this.ngUnsubscribe.complete();
434
+ this.disconnectWebSocket();
418
435
  };
419
436
  ExclusionDetailsComponent.prototype.showDetails = function (details) {
420
- this.processDetails = null;
437
+ this._exclusionDetails = details;
421
438
  this._entityName = details.entityName;
422
439
  this._isVisible = true;
440
+ this._processSummaryData = [];
441
+ this.processDetails = null;
423
442
  this.entityDescription = details.entityDescription;
424
- this.loadProcessDetails(details.recordId);
443
+ this.loadProcessDetails(details);
444
+ this.connectWebSocket();
445
+ };
446
+ ExclusionDetailsComponent.prototype.onVisibilityChanged = function (event) {
447
+ this.closeDetails();
425
448
  };
426
449
  ExclusionDetailsComponent.prototype.closeDetails = function () {
427
450
  this._isVisible = false;
451
+ this._exclusionDetails = null;
452
+ this._processSummaryData = [];
453
+ this.disconnectWebSocket();
428
454
  };
429
455
  ExclusionDetailsComponent.prototype.openExclusions = function () {
430
456
  this.closeDetails();
@@ -446,14 +472,14 @@
446
472
  if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
447
473
  return "";
448
474
  }
449
- return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
475
+ return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm:ss");
450
476
  };
451
477
  ExclusionDetailsComponent.prototype.getFinishDate = function () {
452
478
  var _a;
453
479
  if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
454
480
  return "";
455
481
  }
456
- return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
482
+ return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm:ss");
457
483
  };
458
484
  ExclusionDetailsComponent.prototype.isFinished = function () {
459
485
  var _a;
@@ -477,6 +503,12 @@
477
503
  ExclusionDetailsComponent.prototype.getSidebarTitle = function () {
478
504
  return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_details_title");
479
505
  };
506
+ ExclusionDetailsComponent.prototype.getEmptyStateTitle = function () {
507
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_title");
508
+ };
509
+ ExclusionDetailsComponent.prototype.getEmptyStateDescription = function () {
510
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
511
+ };
480
512
  ExclusionDetailsComponent.prototype.getSummaryColumns = function () {
481
513
  return [
482
514
  {
@@ -525,21 +557,47 @@
525
557
  }
526
558
  return null;
527
559
  };
528
- ExclusionDetailsComponent.prototype.loadProcessDetails = function (recordId) {
560
+ ExclusionDetailsComponent.prototype.loadProcessDetails = function (details) {
529
561
  var _this = this;
530
562
  this._isLoading = true;
531
- this.logicalDeleteService.getProcessDetails(recordId)
563
+ var processObservable = details.processId
564
+ ? this.logicalDeleteService.getProcessDetails(details.processId)
565
+ : this.logicalDeleteService.getLatestProcessDetails(details.recordId);
566
+ processObservable
532
567
  .pipe(operators.takeUntil(this.ngUnsubscribe))
533
568
  .pipe(operators.finalize(function () { return _this._isLoading = false; }))
534
569
  .subscribe(function (process) {
570
+ if (!process) {
571
+ return;
572
+ }
535
573
  _this.processDetails = process;
536
574
  _this.loadProcessSummary(process);
537
575
  });
538
576
  };
577
+ ExclusionDetailsComponent.prototype.sortByDate = function (startDate, finishDate) {
578
+ if (startDate.getTime() > finishDate.getTime()) {
579
+ return 1;
580
+ }
581
+ if (startDate.getTime() < finishDate.getTime()) {
582
+ return -1;
583
+ }
584
+ return 0;
585
+ };
586
+ ExclusionDetailsComponent.prototype.sortGroupsByStartDate = function (groups) {
587
+ var _this = this;
588
+ return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
589
+ };
590
+ ExclusionDetailsComponent.prototype.sortStepsByStartDate = function (steps) {
591
+ var _this = this;
592
+ return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
593
+ };
539
594
  ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
595
+ var _this = this;
540
596
  var stepLogs = [];
541
- process.groups.forEach(function (group) {
542
- var steps = group.steps.map(function (step) { return ({
597
+ this.sortGroupsByStartDate(process.groups)
598
+ .forEach(function (group) {
599
+ var steps = _this.sortStepsByStartDate(group.steps)
600
+ .map(function (step) { return ({
543
601
  description: step.description,
544
602
  status: step.status,
545
603
  errorMessage: step.errorMessage
@@ -548,6 +606,55 @@
548
606
  });
549
607
  this._processSummaryData = stepLogs;
550
608
  };
609
+ ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
610
+ if (this._exclusionProcessStatusChangedSubscribe) {
611
+ this._exclusionProcessStatusChangedSubscribe.unsubscribe();
612
+ this._exclusionProcessStatusChangedSubscribe = null;
613
+ }
614
+ if (this._websocketService) {
615
+ this._websocketService.disconnect();
616
+ this._websocketService = null;
617
+ }
618
+ };
619
+ ExclusionDetailsComponent.prototype.connectWebSocket = function () {
620
+ var _this = this;
621
+ if (this._websocketService) {
622
+ this.disconnectWebSocket();
623
+ }
624
+ this._websocketService = new angularComponents$1.WebsocketService();
625
+ this._websocketService
626
+ .onConnect()
627
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
628
+ .subscribe(function () {
629
+ _this.startListeningWebhookEvents();
630
+ });
631
+ };
632
+ ExclusionDetailsComponent.prototype.startListeningWebhookEvents = function () {
633
+ var _this = this;
634
+ this._websocketService
635
+ .onError()
636
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
637
+ .subscribe(function (data) {
638
+ console.error('onError', data);
639
+ });
640
+ this._exclusionProcessStatusChangedSubscribe = this._websocketService
641
+ .onEvent({
642
+ domain: "erpx_fnd",
643
+ service: "produto",
644
+ primitive: "exclusionProcessStatusChanged"
645
+ })
646
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
647
+ .subscribe(function (event) {
648
+ var data = event.data;
649
+ if (_this._exclusionDetails.processId && data.pid === _this._exclusionDetails.processId) {
650
+ _this.loadProcessDetails(_this._exclusionDetails);
651
+ return;
652
+ }
653
+ if (_this._exclusionDetails.recordId && data.recordId === _this._exclusionDetails.recordId) {
654
+ _this.loadProcessDetails(_this._exclusionDetails);
655
+ }
656
+ });
657
+ };
551
658
  ExclusionDetailsComponent.ctorParameters = function () { return [
552
659
  { type: router.Router },
553
660
  { type: router.ActivatedRoute },
@@ -576,7 +683,7 @@
576
683
  ExclusionDetailsComponent = __decorate([
577
684
  core.Component({
578
685
  selector: "s-exclusion-details",
579
- template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"closeDetails()\" [header]=\"getSidebarTitle()\">\n <s-loading-state [loading]=\"isLoading\">\n <p-panel [showHeader]=\"false\" styleClass=\"s-exclusion-details-record-details-panel\">\n <div class=\"s-exclusion-details-record-details-container\">\n <div class=\"s-exclusion-details-record-icon-background\">\n <i class=\"far fa-file-alt s-exclusion-details-record-icon\"></i>\n </div>\n\n <div class=\"s-exclusion-details-record-details-recordinfo\">\n <span class=\"s-exclusion-details-record-details-type\">\n {{entityDescription}}\n </span>\n <span>\n {{getRecordDescription()}}\n </span>\n </div>\n\n <div class=\"s-exclusion-details-record-details-dateinfo\">\n <span>\n {{getStartDateLabel()}}: {{getInicialDate()}}\n </span>\n <span *ngIf=\"isFinished()\">\n {{getFinishDateLabel()}}: {{getFinishDate()}}\n </span>\n </div>\n </div>\n </p-panel>\n\n <p-panel>\n <p-header>\n {{getSummaryLabel()}}\n </p-header>\n <p-table\n [value]=\"processSummaryData\"\n [columns]=\"processSummaryColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\">\n\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\" \n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n </p-table>\n </p-panel>\n </s-loading-state>\n\n <s-footer>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <s-button [label]=\"getShowExclusionsButtonLabel()\" (onClick)=\"openExclusions()\"></s-button>\n <s-button [label]=\"getCloseButtonLabel()\" priority=\"link\" (onClick)=\"closeDetails()\"></s-button>\n </div>\n </div>\n </s-footer>\n</s-sidebar>\n",
686
+ template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"onVisibilityChanged($event)\" [header]=\"getSidebarTitle()\">\n <s-loading-state [loading]=\"isLoading\">\n <p-panel [showHeader]=\"false\" styleClass=\"s-exclusion-details-record-details-panel\">\n <div class=\"s-exclusion-details-record-details-container\">\n <div class=\"s-exclusion-details-record-icon-background\">\n <em class=\"far fa-file-alt s-exclusion-details-record-icon\"></em>\n </div>\n\n <div class=\"s-exclusion-details-record-details-recordinfo\">\n <span class=\"s-exclusion-details-record-details-type\">\n {{entityDescription}}\n </span>\n <span>\n {{getRecordDescription()}}\n </span>\n </div>\n\n <div class=\"s-exclusion-details-record-details-dateinfo\">\n <span>\n {{getStartDateLabel()}}: {{getInicialDate()}}\n </span>\n <span *ngIf=\"isFinished()\">\n {{getFinishDateLabel()}}: {{getFinishDate()}}\n </span>\n </div>\n </div>\n </p-panel>\n\n <p-panel>\n <p-header>\n {{getSummaryLabel()}}\n </p-header>\n\n <s-empty-state\n *ngIf=\"processSummaryData && !processSummaryData.length\"\n [title]=\"getEmptyStateTitle()\"\n [description]=\"getEmptyStateDescription()\">\n [showPrimaryAction]=\"false\"\n </s-empty-state>\n\n <p-table\n [value]=\"processSummaryData\"\n [columns]=\"processSummaryColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\"\n *ngIf=\"processSummaryData && processSummaryData.length\">\n\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\"\n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n </p-table>\n </p-panel>\n </s-loading-state>\n\n <s-footer>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <s-button [label]=\"getShowExclusionsButtonLabel()\" (onClick)=\"openExclusions()\"></s-button>\n <s-button [label]=\"getCloseButtonLabel()\" priority=\"link\" (onClick)=\"closeDetails()\"></s-button>\n </div>\n </div>\n </s-footer>\n</s-sidebar>\n",
580
687
  encapsulation: core.ViewEncapsulation.None,
581
688
  styles: [".s-exclusion-details-record-details-panel{margin-bottom:10px}.s-exclusion-details-record-details-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.s-exclusion-details-record-details-recordinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex:1;flex:1}.s-exclusion-details-record-details-dateinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex-align:end;align-items:flex-end;font-size:12px}.s-exclusion-details-record-details-type{color:#999}.s-exclusion-details-record-icon{font-size:22pt;color:#7e8d95}.s-exclusion-details-record-icon-background{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:16px;background-color:#c1cad1;border-radius:50%;height:60px;width:60px}"]
582
689
  })
@@ -597,7 +704,8 @@
597
704
  table.TableModule,
598
705
  angularComponents.TableModule,
599
706
  angularComponents.LoadingStateModule,
600
- angularComponents.LocaleModule
707
+ angularComponents.LocaleModule,
708
+ angularComponents.EmptyStateModule
601
709
  ],
602
710
  declarations: [ExclusionDetailsComponent],
603
711
  exports: [ExclusionDetailsComponent],
@@ -678,6 +786,9 @@
678
786
  ? this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_true")
679
787
  : this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_false");
680
788
  break;
789
+ default:
790
+ labelValue = value;
791
+ break;
681
792
  }
682
793
  return { id: name, label: label + ": " + labelValue };
683
794
  };
@@ -709,6 +820,512 @@
709
820
  return FilterService;
710
821
  }());
711
822
 
823
+ var HTTP_CODE_SERVER_ERROR_START = 500;
824
+ var HTTP_CODE_SERVER_ERROR_END = 600;
825
+ var ExclusionsListComponent = /** @class */ (function () {
826
+ function ExclusionsListComponent(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
827
+ this.route = route;
828
+ this.translate = translate;
829
+ this.formBuilder = formBuilder;
830
+ this.changeDetectorRef = changeDetectorRef;
831
+ this.logicalDeleteService = logicalDeleteService;
832
+ this.filterService = filterService;
833
+ this.projectConfigs = projectConfigs;
834
+ this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
835
+ this.showLoader = false;
836
+ this.totalRecords = 0;
837
+ this.filtersPanelCollapsed = true;
838
+ this.searchTokens = [];
839
+ this.serverError = false;
840
+ this.ngUnsubscribe = new rxjs.Subject();
841
+ }
842
+ ExclusionsListComponent_1 = ExclusionsListComponent;
843
+ ExclusionsListComponent.prototype.ngOnInit = function () {
844
+ var _this = this;
845
+ this.filterFormGroup = this.getFormBuilder();
846
+ this.filterFields = this.getFilterFields();
847
+ this.gridColumns = this.getGridColumns();
848
+ this.route.data
849
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
850
+ .subscribe(function (data) {
851
+ _this.locale = data.localeConfig;
852
+ });
853
+ this.route.params
854
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
855
+ .subscribe(function (params) {
856
+ _this.entityName = params.entityName;
857
+ _this.showBasedOnRoute();
858
+ });
859
+ this.route.queryParams
860
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
861
+ .subscribe(function (queryParams) {
862
+ _this.entityDescription = queryParams.entityDescription;
863
+ _this.processId = queryParams.processId;
864
+ _this.showBasedOnRoute();
865
+ });
866
+ };
867
+ ExclusionsListComponent.prototype.showBasedOnRoute = function () {
868
+ if (this.entityName && this.entityDescription && this.processId) {
869
+ this.exclusionDetailsComponent.showDetails({
870
+ processId: this.processId,
871
+ entityDescription: this.entityDescription,
872
+ entityName: this.entityName
873
+ });
874
+ }
875
+ };
876
+ ExclusionsListComponent.prototype.ngOnDestroy = function () {
877
+ this.ngUnsubscribe.next();
878
+ this.ngUnsubscribe.complete();
879
+ };
880
+ ExclusionsListComponent.prototype.getFormBuilder = function () {
881
+ return this.formBuilder.group({
882
+ description: [undefined, forms.Validators.compose([])],
883
+ status: [undefined, forms.Validators.compose([])],
884
+ startDate: [{ value: undefined, disabled: false }, forms.Validators.compose([])],
885
+ endDate: [{ value: undefined, disabled: false }, forms.Validators.compose([])]
886
+ });
887
+ };
888
+ ExclusionsListComponent.prototype.getGridColumns = function () {
889
+ return [
890
+ {
891
+ field: "description",
892
+ attributes: ["description"],
893
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description"),
894
+ type: angularComponents.EnumColumnFieldType.STRING,
895
+ style: {
896
+ width: "300px"
897
+ }
898
+ },
899
+ {
900
+ field: "status",
901
+ attributes: ["status"],
902
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
903
+ type: angularComponents.EnumColumnFieldType.ENUM,
904
+ enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
905
+ style: {
906
+ width: "100px"
907
+ },
908
+ tooltip: this.getColumnStatusTooltip,
909
+ badgeConfigs: [
910
+ {
911
+ enumValue: EnumExclusionProcessStatus.ERROR,
912
+ color: angularComponents.EnumBadgeColors.RED
913
+ },
914
+ {
915
+ enumValue: EnumExclusionProcessStatus.PENDING,
916
+ color: angularComponents.EnumBadgeColors.YELLOW
917
+ },
918
+ {
919
+ enumValue: EnumExclusionProcessStatus.PROCESSING,
920
+ color: angularComponents.EnumBadgeColors.BLUE
921
+ },
922
+ {
923
+ enumValue: EnumExclusionProcessStatus.SUCCESS,
924
+ color: angularComponents.EnumBadgeColors.GREEN
925
+ }
926
+ ]
927
+ },
928
+ {
929
+ field: "startDate",
930
+ attributes: ["startDate"],
931
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start"),
932
+ type: angularComponents.EnumColumnFieldType.DATE,
933
+ dateFormat: "DD/MM/YYYY HH:mm:ss",
934
+ style: {
935
+ width: "100px"
936
+ }
937
+ },
938
+ {
939
+ field: "finishDate",
940
+ attributes: ["finishDate"],
941
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish"),
942
+ type: angularComponents.EnumColumnFieldType.DATE,
943
+ dateFormat: "DD/MM/YYYY HH:mm:ss",
944
+ style: {
945
+ width: "100px"
946
+ }
947
+ }
948
+ ];
949
+ };
950
+ ExclusionsListComponent.prototype.getColumnStatusTooltip = function (rowValue) {
951
+ if (rowValue.errorMessage) {
952
+ return rowValue.errorMessage;
953
+ }
954
+ return null;
955
+ };
956
+ ExclusionsListComponent.prototype.getFilterFields = function () {
957
+ var translationPrefix = this.projectConfigs.getTranslationPrefix();
958
+ return [
959
+ new angularComponents.FormField({
960
+ type: angularComponents.FieldType.String,
961
+ name: "description",
962
+ label: this.translate.instant(translationPrefix + ".logical_delete_description")
963
+ }),
964
+ new angularComponents.FormField({
965
+ type: angularComponents.FieldType.Enum,
966
+ name: "status",
967
+ label: this.translate.instant(translationPrefix + ".logical_delete_status"),
968
+ placeholder: this.translate.instant(translationPrefix + ".logical_delete_status"),
969
+ multiple: true,
970
+ options: [
971
+ {
972
+ label: this.translate.instant(translationPrefix + ".logical_delete_enum_exclusion_process_status_error"),
973
+ value: EnumExclusionProcessStatus.ERROR
974
+ },
975
+ {
976
+ label: this.translate.instant(translationPrefix + ".logical_delete_enum_exclusion_process_status_pending"),
977
+ value: EnumExclusionProcessStatus.PENDING
978
+ },
979
+ {
980
+ label: this.translate.instant(translationPrefix + ".logical_delete_enum_exclusion_process_status_processing"),
981
+ value: EnumExclusionProcessStatus.PROCESSING
982
+ },
983
+ {
984
+ label: this.translate.instant(translationPrefix + ".logical_delete_enum_exclusion_process_status_success"),
985
+ value: EnumExclusionProcessStatus.SUCCESS
986
+ }
987
+ ]
988
+ }),
989
+ new angularComponents.FormField({
990
+ type: angularComponents.FieldType.Date,
991
+ name: "startDate",
992
+ label: this.translate.instant(translationPrefix + ".logical_delete_start")
993
+ }),
994
+ new angularComponents.FormField({
995
+ type: angularComponents.FieldType.Date,
996
+ name: "endDate",
997
+ label: this.translate.instant(translationPrefix + ".logical_delete_finish")
998
+ })
999
+ ];
1000
+ };
1001
+ ExclusionsListComponent.prototype.getEmptyStateTitle = function () {
1002
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_title");
1003
+ };
1004
+ ExclusionsListComponent.prototype.getEmptyStateDescription = function () {
1005
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
1006
+ };
1007
+ ExclusionsListComponent.prototype.getTitle = function () {
1008
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
1009
+ };
1010
+ ExclusionsListComponent.prototype.getDetailsButtonTitle = function () {
1011
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_details");
1012
+ };
1013
+ ExclusionsListComponent.prototype.getFiltersTitle = function () {
1014
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".filters");
1015
+ };
1016
+ ExclusionsListComponent.prototype.getFilterButtonTitle = function () {
1017
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".filter");
1018
+ };
1019
+ ExclusionsListComponent.prototype.getClearButtonTitle = function () {
1020
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".clear");
1021
+ };
1022
+ ExclusionsListComponent.prototype.getErrorInvalid = function () {
1023
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".error_invalid");
1024
+ };
1025
+ ExclusionsListComponent.prototype.getErrorServerTitle = function () {
1026
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".error_server_title");
1027
+ };
1028
+ ExclusionsListComponent.prototype.getErrorServerDescription = function () {
1029
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".error_server_description");
1030
+ };
1031
+ ExclusionsListComponent.prototype.getActionsColumnLabel = function () {
1032
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".actions");
1033
+ };
1034
+ ExclusionsListComponent.prototype.onSearch = function () {
1035
+ var filterData = this.filterFormGroup.getRawValue();
1036
+ this.filtersPanelCollapsed = true;
1037
+ this.resetGrid({ filterData: filterData });
1038
+ };
1039
+ ExclusionsListComponent.prototype.onClear = function () {
1040
+ this.filterFormGroup.reset();
1041
+ var filterData = this.filterFormGroup.getRawValue();
1042
+ this.resetGrid({ filterData: filterData });
1043
+ };
1044
+ ExclusionsListComponent.prototype.onRemoveToken = function (token) {
1045
+ this.filterFormGroup.get(token.id).setValue(undefined);
1046
+ var filterData = this.filterFormGroup.getRawValue();
1047
+ this.resetGrid({ filterData: filterData });
1048
+ };
1049
+ ExclusionsListComponent.prototype.onGridChange = function (event) {
1050
+ var size = event.rows;
1051
+ var page = event.first / size;
1052
+ var sort = event.multiSortMeta ? event.multiSortMeta : [];
1053
+ return this.updateGrid({ page: page, size: size, sort: sort });
1054
+ };
1055
+ ExclusionsListComponent.prototype.getFilterTokens = function () {
1056
+ var _this = this;
1057
+ var filterData = this.filterFormGroup.value;
1058
+ return this.filterFields
1059
+ .filter(function (_a) {
1060
+ var name = _a.name;
1061
+ return filterData[name] !== undefined && filterData[name] !== "" && filterData[name] !== null;
1062
+ })
1063
+ .map(function (formField) { return _this.filterService.createFilterTokens(formField, filterData[formField.name]); });
1064
+ };
1065
+ ExclusionsListComponent.prototype.getFilterQuery = function () {
1066
+ var _this = this;
1067
+ var filterData = this.currentListParams.filterData;
1068
+ var dateFields = ["startDate", "endDate"];
1069
+ var filterQuery = this.filterFields
1070
+ .filter(function (_a) {
1071
+ var name = _a.name;
1072
+ return !dateFields.includes(name);
1073
+ })
1074
+ .filter(function (_a) {
1075
+ var name = _a.name;
1076
+ return filterData[name] !== undefined && filterData[name] !== "" && filterData[name] !== null;
1077
+ })
1078
+ .map(function (formField) { return _this.filterService.createFilterString(formField, filterData[formField.name]); })
1079
+ .join(" and ");
1080
+ var dateQuery;
1081
+ if (filterData.startDate && filterData.endDate) {
1082
+ var startDate = moment(filterData.startDate).format(ExclusionsListComponent_1.DATE_FORMAT);
1083
+ var endDate = moment(filterData.endDate).format(ExclusionsListComponent_1.DATE_FORMAT);
1084
+ dateQuery = "startDate between '" + startDate + "T00:00:00Z' and '" + endDate + "T23:59:59Z'";
1085
+ }
1086
+ else if (filterData.startDate) {
1087
+ var startDate = moment(filterData.startDate).format(ExclusionsListComponent_1.DATE_FORMAT);
1088
+ dateQuery = "startDate >= '" + startDate + "T00:00:00Z'";
1089
+ }
1090
+ else if (filterData.endDate) {
1091
+ var endDate = moment(filterData.endDate).format(ExclusionsListComponent_1.DATE_FORMAT);
1092
+ dateQuery = "finishDate <= '" + endDate + "T23:59:59Z'";
1093
+ }
1094
+ else {
1095
+ // Não é necessário nenhuma condição a mais no filtro.
1096
+ }
1097
+ if (dateQuery) {
1098
+ filterQuery += filterQuery ? " and " + dateQuery : dateQuery;
1099
+ }
1100
+ return filterQuery;
1101
+ };
1102
+ ExclusionsListComponent.prototype.updateGrid = function (listParams) {
1103
+ if (listParams === void 0) { listParams = {}; }
1104
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
1105
+ var _a = this.currentListParams, page = _a.page, size = _a.size, sort = _a.sort;
1106
+ this.searchTokens = this.getFilterTokens();
1107
+ var filterQuery = this.getFilterQuery();
1108
+ var displayFields = __spread([
1109
+ "recordId",
1110
+ "errorMessage"
1111
+ ], this.gridColumns.map(function (column) { return column.field; }));
1112
+ if (!sort.length) {
1113
+ sort.push({ field: 'startDate', order: -1 });
1114
+ }
1115
+ this.listExclusions({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields });
1116
+ };
1117
+ ExclusionsListComponent.prototype.listExclusions = function (params) {
1118
+ var _this = this;
1119
+ this.showLoader = true;
1120
+ this.serverError = false;
1121
+ this.changeDetectorRef.detectChanges();
1122
+ this.logicalDeleteService
1123
+ .listExclusions(this.entityName, params)
1124
+ .pipe(operators.takeUntil(this.ngUnsubscribe), operators.catchError(function (err) {
1125
+ if (err.status >= HTTP_CODE_SERVER_ERROR_START && err.status < HTTP_CODE_SERVER_ERROR_END) {
1126
+ _this.serverError = true;
1127
+ }
1128
+ throw err;
1129
+ }), operators.finalize(function () { return _this.showLoader = false; }))
1130
+ .subscribe(function (list) {
1131
+ _this.gridData = list.contents;
1132
+ _this.totalRecords = list.totalElements;
1133
+ });
1134
+ };
1135
+ ExclusionsListComponent.prototype.focusInput = function (elementId) {
1136
+ var element = document.getElementById("" + elementId);
1137
+ if (element) {
1138
+ element.focus();
1139
+ }
1140
+ };
1141
+ ExclusionsListComponent.prototype.resetGrid = function (listParams) {
1142
+ if (listParams) {
1143
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
1144
+ }
1145
+ this.currentListParams = __assign(__assign({}, this.currentListParams), { page: 0, sort: [] });
1146
+ this.table.reset();
1147
+ };
1148
+ ExclusionsListComponent.prototype.onClickDetails = function (rowData) {
1149
+ this.exclusionDetailsComponent.showDetails({
1150
+ processId: rowData.id,
1151
+ entityDescription: this.entityDescription,
1152
+ entityName: this.entityName
1153
+ });
1154
+ };
1155
+ var ExclusionsListComponent_1;
1156
+ ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
1157
+ ExclusionsListComponent.ctorParameters = function () { return [
1158
+ { type: router.ActivatedRoute },
1159
+ { type: core$1.TranslateService },
1160
+ { type: forms.FormBuilder },
1161
+ { type: core.ChangeDetectorRef },
1162
+ { type: LogicalDeleteService },
1163
+ { type: FilterService },
1164
+ { type: LogicalDeleteConfigService }
1165
+ ]; };
1166
+ __decorate([
1167
+ core.ViewChild("exclusionsTable")
1168
+ ], ExclusionsListComponent.prototype, "table", void 0);
1169
+ __decorate([
1170
+ core.ViewChild(ExclusionDetailsComponent)
1171
+ ], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
1172
+ ExclusionsListComponent = ExclusionsListComponent_1 = __decorate([
1173
+ core.Component({
1174
+ template: "<div>\n <form [formGroup]=\"filterFormGroup\" autocomplete=\"off\">\n <p-panel\n *sLoadingState=\"showLoader\"\n styleClass=\"form-group\"\n [toggleable]=\"true\"\n [(collapsed)]=\"filtersPanelCollapsed\"\n (onAfterToggle)=\"focusInput('description')\"\n >\n <p-header>\n {{ getFiltersTitle() }}\n <s-token-list\n [tokens]=\"searchTokens\"\n (tokenRemoved)=\"onRemoveToken($event)\"\n [removableTokens]=\"true\"\n ></s-token-list>\n </p-header>\n <div>\n <s-dynamic-form\n [fields]=\"filterFields\"\n [form]=\"filterFormGroup\"\n [errorMessages]=\"{ pattern: getErrorInvalid() }\"\n ></s-dynamic-form>\n </div>\n <p-footer>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <button\n id=\"filter-button\"\n class=\"ui-button\"\n type=\"submit\"\n pButton\n [label]=\"getFilterButtonTitle()\"\n (click)=\"onSearch()\"\n ></button>\n <button\n id=\"clear-button\"\n class=\"ui-button ui-button-link\"\n type=\"button\"\n pButton\n [label]=\"getClearButtonTitle()\"\n (click)=\"onClear()\"\n ></button>\n </div>\n </div>\n </p-footer>\n </p-panel>\n </form>\n <p-panel *sLoadingState=\"showLoader\">\n <p-header>\n {{ getTitle() }}\n </p-header>\n <ng-container>\n <s-empty-state\n *ngIf=\"serverError && !showLoader\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ getErrorServerTitle() | translate }}\"\n primaryActionLabel=\"{{ 'error_server_try_again' | translate }}\"\n (primaryAction)=\"resetGrid()\"\n description=\"{{ getErrorServerDescription() | translate }}\"\n ></s-empty-state>\n\n <s-empty-state\n *ngIf=\"!showLoader && !serverError && totalRecords === 0\"\n [title]=\"getEmptyStateTitle()\"\n [showPrimaryAction]=\"false\"\n [description]=\"getEmptyStateDescription()\"\n ></s-empty-state>\n\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n #exclusionsTable\n id=\"exclusionsTable\"\n [hidden]=\"totalRecords === 0 || serverError\"\n [value]=\"gridData\"\n [columns]=\"gridColumns\"\n dataKey=\"id\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [resizableColumns]=\"true\"\n sortMode=\"multiple\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [rows]=\"10\"\n sortField=\"startDate\"\n sortOrder=\"-1\"\n rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template\n pTemplate=\"header\"\n let-columns\n >\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [pSortableColumn]=\"col.field\"\n [ngStyle]=\"col.style\"\n pResizableColumn\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">\n {{ col.header }}\n </span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th id=\"action-column\" style=\"width: 100px\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ getActionsColumnLabel() }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr [pSelectableRow]=\"rowData\">\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n <td style=\"width: 100px\">\n <s-button\n id=\"details-button\"\n priority=\"default\"\n [label]=\"getDetailsButtonTitle()\"\n [auxiliary]=\"true\"\n (onClick)=\"onClickDetails(rowData)\">\n </s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <s-table-paging\n [table]=\"exclusionsTable\"\n [totalRecords]=\"totalRecords\"\n ></s-table-paging>\n </ng-template>\n </p-table>\n </div>\n </div>\n </ng-container>\n </p-panel>\n</div>\n\n<s-exclusion-details></s-exclusion-details>\n",
1175
+ providers: []
1176
+ })
1177
+ ], ExclusionsListComponent);
1178
+ return ExclusionsListComponent;
1179
+ }());
1180
+
1181
+ var ExclusionsListFeatureRoutingGuard = /** @class */ (function () {
1182
+ function ExclusionsListFeatureRoutingGuard() {
1183
+ }
1184
+ ExclusionsListFeatureRoutingGuard.prototype.canActivate = function () {
1185
+ return true;
1186
+ };
1187
+ ExclusionsListFeatureRoutingGuard = __decorate([
1188
+ core.Injectable()
1189
+ ], ExclusionsListFeatureRoutingGuard);
1190
+ return ExclusionsListFeatureRoutingGuard;
1191
+ }());
1192
+ var ExclusionsListFeatureRoutingListTitleResolver = /** @class */ (function () {
1193
+ function ExclusionsListFeatureRoutingListTitleResolver(translate, projectConfigs) {
1194
+ this.translate = translate;
1195
+ this.projectConfigs = projectConfigs;
1196
+ }
1197
+ ExclusionsListFeatureRoutingListTitleResolver.prototype.resolve = function () {
1198
+ return this.translate.get(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
1199
+ };
1200
+ ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = function () { return [
1201
+ { type: core$1.TranslateService },
1202
+ { type: LogicalDeleteConfigService }
1203
+ ]; };
1204
+ ExclusionsListFeatureRoutingListTitleResolver = __decorate([
1205
+ core.Injectable()
1206
+ ], ExclusionsListFeatureRoutingListTitleResolver);
1207
+ return ExclusionsListFeatureRoutingListTitleResolver;
1208
+ }());
1209
+ var ExclusionsListFeatureRoutingPermissionResolver = /** @class */ (function () {
1210
+ function ExclusionsListFeatureRoutingPermissionResolver(permissionsService) {
1211
+ this.permissionsService = permissionsService;
1212
+ }
1213
+ ExclusionsListFeatureRoutingPermissionResolver.prototype.resolve = function () {
1214
+ return this.permissionsService.get();
1215
+ };
1216
+ ExclusionsListFeatureRoutingPermissionResolver.ctorParameters = function () { return [
1217
+ { type: platformComponents.PermissionsService }
1218
+ ]; };
1219
+ ExclusionsListFeatureRoutingPermissionResolver = __decorate([
1220
+ core.Injectable()
1221
+ ], ExclusionsListFeatureRoutingPermissionResolver);
1222
+ return ExclusionsListFeatureRoutingPermissionResolver;
1223
+ }());
1224
+ var ExclusionsListFeatureRoutingLocaleResolver = /** @class */ (function () {
1225
+ function ExclusionsListFeatureRoutingLocaleResolver(localeService) {
1226
+ this.localeService = localeService;
1227
+ }
1228
+ ExclusionsListFeatureRoutingLocaleResolver.prototype.resolve = function () {
1229
+ return this.localeService.get();
1230
+ };
1231
+ ExclusionsListFeatureRoutingLocaleResolver.ctorParameters = function () { return [
1232
+ { type: angularComponents.LocaleService }
1233
+ ]; };
1234
+ ExclusionsListFeatureRoutingLocaleResolver = __decorate([
1235
+ core.Injectable()
1236
+ ], ExclusionsListFeatureRoutingLocaleResolver);
1237
+ return ExclusionsListFeatureRoutingLocaleResolver;
1238
+ }());
1239
+ var EmptyComponent = /** @class */ (function () {
1240
+ function EmptyComponent() {
1241
+ }
1242
+ EmptyComponent = __decorate([
1243
+ core.Component({
1244
+ template: "<router-outlet></router-outlet>"
1245
+ })
1246
+ ], EmptyComponent);
1247
+ return EmptyComponent;
1248
+ }());
1249
+ var routes = [
1250
+ {
1251
+ path: "exclusions-list",
1252
+ component: EmptyComponent,
1253
+ canActivate: [
1254
+ ExclusionsListFeatureRoutingGuard
1255
+ ],
1256
+ resolve: {
1257
+ allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
1258
+ localeConfig: ExclusionsListFeatureRoutingLocaleResolver,
1259
+ routeTitle: ExclusionsListFeatureRoutingListTitleResolver
1260
+ },
1261
+ children: [
1262
+ {
1263
+ path: ":entityName",
1264
+ component: ExclusionsListComponent
1265
+ }
1266
+ ]
1267
+ }
1268
+ ];
1269
+ var ExclusionsListFeatureRouting = /** @class */ (function () {
1270
+ function ExclusionsListFeatureRouting() {
1271
+ }
1272
+ ExclusionsListFeatureRouting = __decorate([
1273
+ core.NgModule({
1274
+ imports: [
1275
+ router.RouterModule.forChild(routes)
1276
+ ],
1277
+ exports: [
1278
+ router.RouterModule
1279
+ ],
1280
+ providers: [
1281
+ ExclusionsListFeatureRoutingGuard,
1282
+ ExclusionsListFeatureRoutingPermissionResolver,
1283
+ ExclusionsListFeatureRoutingLocaleResolver,
1284
+ ExclusionsListFeatureRoutingListTitleResolver
1285
+ ],
1286
+ declarations: [
1287
+ EmptyComponent
1288
+ ]
1289
+ })
1290
+ ], ExclusionsListFeatureRouting);
1291
+ return ExclusionsListFeatureRouting;
1292
+ }());
1293
+
1294
+ var ExclusionsListModule = /** @class */ (function () {
1295
+ function ExclusionsListModule() {
1296
+ }
1297
+ ExclusionsListModule = __decorate([
1298
+ core.NgModule({
1299
+ imports: [
1300
+ forms.FormsModule,
1301
+ forms.ReactiveFormsModule,
1302
+ core$1.TranslateModule,
1303
+ common.CommonModule,
1304
+ angularComponents.ControlErrorsModule,
1305
+ angularComponents.ButtonModule,
1306
+ panel.PanelModule,
1307
+ inputtext.InputTextModule,
1308
+ angularComponents.InfoSignModule,
1309
+ confirmdialog.ConfirmDialogModule,
1310
+ dialog.DialogModule,
1311
+ table.TableModule,
1312
+ angularComponents.TableModule,
1313
+ angularComponents.LoadingStateModule,
1314
+ angularComponents.EmptyStateModule,
1315
+ angularComponents.DynamicFormModule,
1316
+ angularComponents.TokenListModule,
1317
+ angularComponents.LocaleModule.forChild(),
1318
+ ExclusionDetailsModule,
1319
+ ExclusionsListFeatureRouting
1320
+ ],
1321
+ declarations: [ExclusionsListComponent],
1322
+ exports: [ExclusionsListComponent],
1323
+ entryComponents: [ExclusionsListComponent]
1324
+ })
1325
+ ], ExclusionsListModule);
1326
+ return ExclusionsListModule;
1327
+ }());
1328
+
712
1329
  var LogicalDeleteModule = /** @class */ (function () {
713
1330
  function LogicalDeleteModule() {
714
1331
  }
@@ -733,13 +1350,25 @@
733
1350
  return LogicalDeleteModule;
734
1351
  }());
735
1352
 
1353
+ exports.EmptyComponent = EmptyComponent;
736
1354
  exports.ExclusionDetailsComponent = ExclusionDetailsComponent;
737
1355
  exports.ExclusionDetailsModule = ExclusionDetailsModule;
1356
+ exports.ExclusionsListComponent = ExclusionsListComponent;
1357
+ exports.ExclusionsListFeatureRouting = ExclusionsListFeatureRouting;
1358
+ exports.ExclusionsListFeatureRoutingGuard = ExclusionsListFeatureRoutingGuard;
1359
+ exports.ExclusionsListFeatureRoutingListTitleResolver = ExclusionsListFeatureRoutingListTitleResolver;
1360
+ exports.ExclusionsListFeatureRoutingLocaleResolver = ExclusionsListFeatureRoutingLocaleResolver;
1361
+ exports.ExclusionsListFeatureRoutingPermissionResolver = ExclusionsListFeatureRoutingPermissionResolver;
1362
+ exports.ExclusionsListModule = ExclusionsListModule;
738
1363
  exports.LogicalDeleteModule = LogicalDeleteModule;
1364
+ exports.routes = routes;
739
1365
  exports.ɵa = LogicalDeleteService;
740
1366
  exports.ɵb = LogicalDeleteConfigService;
741
1367
  exports.ɵc = ProjectConfigsInjectionToken;
742
- exports.ɵe = FilterService;
1368
+ exports.ɵe = ExclusionDetailsModule;
1369
+ exports.ɵf = ExclusionDetailsComponent;
1370
+ exports.ɵg = LogicalDeleteService;
1371
+ exports.ɵh = FilterService;
743
1372
 
744
1373
  Object.defineProperty(exports, '__esModule', { value: true });
745
1374