@seniorsistemas/exclusion-process-component 0.0.1-40efacd8-8a6c-4d38-8102-8c977c14410a

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 (85) hide show
  1. package/bundles/seniorsistemas-exclusion-process-component.umd.js +1205 -0
  2. package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +1 -0
  3. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +16 -0
  4. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +1 -0
  5. package/enums/enum-exclusion-process-status.d.ts +6 -0
  6. package/esm2015/enums/enum-exclusion-process-status.js +8 -0
  7. package/esm2015/exclusion-details/exclusion-details.component.js +216 -0
  8. package/esm2015/exclusion-details/exclusion-details.module.js +28 -0
  9. package/esm2015/exclusion-details/index.js +3 -0
  10. package/esm2015/exclusion-details/protocols/exclusion-details.js +1 -0
  11. package/esm2015/exclusion-details/protocols/index.js +2 -0
  12. package/esm2015/exclusion-details/protocols/show-details-information.js +3 -0
  13. package/esm2015/exclusions-list/exclusions-list.component.js +299 -0
  14. package/esm2015/exclusions-list/exclusions-list.module.js +47 -0
  15. package/esm2015/exclusions-list/exclusions-list.routing.js +115 -0
  16. package/esm2015/exclusions-list/index.js +4 -0
  17. package/esm2015/logical-delete.module.js +27 -0
  18. package/esm2015/models/exclusion-process-step-group.js +1 -0
  19. package/esm2015/models/exclusion-process-step.js +1 -0
  20. package/esm2015/models/exclusion-process.js +1 -0
  21. package/esm2015/models/index.js +1 -0
  22. package/esm2015/models/list-params.js +1 -0
  23. package/esm2015/models/list-result.js +1 -0
  24. package/esm2015/models/project-config.js +3 -0
  25. package/esm2015/public-api.js +4 -0
  26. package/esm2015/seniorsistemas-exclusion-process-component.js +11 -0
  27. package/esm2015/services/filter.service.js +104 -0
  28. package/esm2015/services/index.js +2 -0
  29. package/esm2015/services/logical-delete-config.service.js +29 -0
  30. package/esm2015/services/logical-delete.service.js +109 -0
  31. package/esm5/enums/enum-exclusion-process-status.js +8 -0
  32. package/esm5/exclusion-details/exclusion-details.component.js +235 -0
  33. package/esm5/exclusion-details/exclusion-details.module.js +31 -0
  34. package/esm5/exclusion-details/index.js +3 -0
  35. package/esm5/exclusion-details/protocols/exclusion-details.js +1 -0
  36. package/esm5/exclusion-details/protocols/index.js +2 -0
  37. package/esm5/exclusion-details/protocols/show-details-information.js +7 -0
  38. package/esm5/exclusions-list/exclusions-list.component.js +313 -0
  39. package/esm5/exclusions-list/exclusions-list.module.js +50 -0
  40. package/esm5/exclusions-list/exclusions-list.routing.js +127 -0
  41. package/esm5/exclusions-list/index.js +4 -0
  42. package/esm5/logical-delete.module.js +31 -0
  43. package/esm5/models/exclusion-process-step-group.js +1 -0
  44. package/esm5/models/exclusion-process-step.js +1 -0
  45. package/esm5/models/exclusion-process.js +1 -0
  46. package/esm5/models/index.js +1 -0
  47. package/esm5/models/list-params.js +1 -0
  48. package/esm5/models/list-result.js +1 -0
  49. package/esm5/models/project-config.js +3 -0
  50. package/esm5/public-api.js +4 -0
  51. package/esm5/seniorsistemas-exclusion-process-component.js +11 -0
  52. package/esm5/services/filter.service.js +109 -0
  53. package/esm5/services/index.js +2 -0
  54. package/esm5/services/logical-delete-config.service.js +30 -0
  55. package/esm5/services/logical-delete.service.js +112 -0
  56. package/exclusion-details/exclusion-details.component.d.ts +49 -0
  57. package/exclusion-details/exclusion-details.module.d.ts +2 -0
  58. package/exclusion-details/index.d.ts +2 -0
  59. package/exclusion-details/protocols/exclusion-details.d.ts +6 -0
  60. package/exclusion-details/protocols/index.d.ts +2 -0
  61. package/exclusion-details/protocols/show-details-information.d.ts +5 -0
  62. package/exclusions-list/exclusions-list.component.d.ts +59 -0
  63. package/exclusions-list/exclusions-list.module.d.ts +2 -0
  64. package/exclusions-list/exclusions-list.routing.d.ts +29 -0
  65. package/exclusions-list/index.d.ts +3 -0
  66. package/fesm2015/seniorsistemas-exclusion-process-component.js +917 -0
  67. package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -0
  68. package/fesm5/seniorsistemas-exclusion-process-component.js +981 -0
  69. package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -0
  70. package/logical-delete.module.d.ts +5 -0
  71. package/models/exclusion-process-step-group.d.ts +13 -0
  72. package/models/exclusion-process-step.d.ts +9 -0
  73. package/models/exclusion-process.d.ts +13 -0
  74. package/models/index.d.ts +4 -0
  75. package/models/list-params.d.ts +9 -0
  76. package/models/list-result.d.ts +5 -0
  77. package/models/project-config.d.ts +7 -0
  78. package/package.json +63 -0
  79. package/public-api.d.ts +4 -0
  80. package/seniorsistemas-exclusion-process-component.d.ts +10 -0
  81. package/seniorsistemas-exclusion-process-component.metadata.json +1 -0
  82. package/services/filter.service.d.ts +19 -0
  83. package/services/index.d.ts +1 -0
  84. package/services/logical-delete-config.service.d.ts +8 -0
  85. package/services/logical-delete.service.d.ts +20 -0
@@ -0,0 +1,981 @@
1
+ import { __decorate, __param, __spread, __assign } from 'tslib';
2
+ import { CommonModule } from '@angular/common';
3
+ import { InjectionToken, Inject, Injectable, Output, Component, ViewEncapsulation, NgModule, ChangeDetectorRef, ViewChild } from '@angular/core';
4
+ import { PanelModule } from 'primeng/panel';
5
+ import { TableModule } from 'primeng/table';
6
+ import { EnumColumnFieldType, EnumBadgeColors, SidebarModule, ButtonModule, TableModule as TableModule$1, LoadingStateModule, LocaleModule, FieldType, FormField, LocaleService, ControlErrorsModule, InfoSignModule, EmptyStateModule, DynamicFormModule, TokenListModule } from '@seniorsistemas/angular-components';
7
+ import * as moment from 'moment';
8
+ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
9
+ import { throwError, Subject } from 'rxjs';
10
+ import { catchError, map, takeUntil, finalize } from 'rxjs/operators';
11
+ import { HttpParams, HttpClient } from '@angular/common/http';
12
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
13
+ import { MessageService } from 'primeng/api';
14
+ import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
15
+ import { DialogModule } from 'primeng/dialog';
16
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
17
+ import { InputTextModule } from 'primeng/inputtext';
18
+ import { PermissionsService } from '@seniorsistemas/platform-components';
19
+
20
+ var EnumExclusionProcessStatus;
21
+ (function (EnumExclusionProcessStatus) {
22
+ EnumExclusionProcessStatus["PENDING"] = "PENDING";
23
+ EnumExclusionProcessStatus["PROCESSING"] = "PROCESSING";
24
+ EnumExclusionProcessStatus["ERROR"] = "ERROR";
25
+ EnumExclusionProcessStatus["SUCCESS"] = "SUCCESS";
26
+ })(EnumExclusionProcessStatus || (EnumExclusionProcessStatus = {}));
27
+
28
+ var ProjectConfigsInjectionToken = new InjectionToken("projectConfigs");
29
+
30
+ var LogicalDeleteConfigService = /** @class */ (function () {
31
+ function LogicalDeleteConfigService(projectConfigs) {
32
+ this.projectConfigs = projectConfigs;
33
+ }
34
+ LogicalDeleteConfigService.prototype.getDomain = function () {
35
+ return this.projectConfigs.domain;
36
+ };
37
+ LogicalDeleteConfigService.prototype.getService = function () {
38
+ return this.projectConfigs.service;
39
+ };
40
+ LogicalDeleteConfigService.prototype.getTranslationPrefix = function () {
41
+ if (this.projectConfigs.translationPrefix) {
42
+ return this.projectConfigs.translationPrefix;
43
+ }
44
+ return this.projectConfigs.domain + "." + this.projectConfigs.service;
45
+ };
46
+ LogicalDeleteConfigService.ctorParameters = function () { return [
47
+ { type: undefined, decorators: [{ type: Inject, args: [ProjectConfigsInjectionToken,] }] }
48
+ ]; };
49
+ LogicalDeleteConfigService = __decorate([
50
+ Injectable(),
51
+ __param(0, Inject(ProjectConfigsInjectionToken))
52
+ ], LogicalDeleteConfigService);
53
+ return LogicalDeleteConfigService;
54
+ }());
55
+
56
+ var LogicalDeleteService = /** @class */ (function () {
57
+ function LogicalDeleteService(http, messageService, translate, projectConfigs) {
58
+ this.http = http;
59
+ this.messageService = messageService;
60
+ this.translate = translate;
61
+ this.projectConfigs = projectConfigs;
62
+ var entityUrl = projectConfigs.getDomain() + "/" + projectConfigs.getService();
63
+ this.exclusionProcessUrl = entityUrl + "/entities/exclusionProcess";
64
+ this.listExclusionsUrl = entityUrl + "/entities/exclusionProcess";
65
+ this.defaultCatch = this.defaultCatch.bind(this);
66
+ }
67
+ LogicalDeleteService.prototype.defaultCatch = function () {
68
+ var _this = this;
69
+ return catchError(function (err) {
70
+ if (err) {
71
+ var summary = err.status ? String(err.status) : "Error";
72
+ var detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
73
+ if (err.status === 401) {
74
+ var prefix = _this.projectConfigs.getTranslationPrefix();
75
+ summary = _this.translate.instant(prefix + ".error_unauthorized_title");
76
+ detail = _this.translate.instant(prefix + ".error_unauthorized_description");
77
+ }
78
+ _this.messageService.add({
79
+ severity: "error",
80
+ summary: summary,
81
+ detail: detail
82
+ });
83
+ }
84
+ return throwError(err);
85
+ });
86
+ };
87
+ LogicalDeleteService.prototype.getListQueryParams = function (listParams) {
88
+ 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;
89
+ var params = new HttpParams();
90
+ params = params.append("size", String(size));
91
+ params = params.append("offset", String(page));
92
+ if (sort && sort.length) {
93
+ params = params.append("orderby", sort
94
+ .map(function (s) {
95
+ if (s.order === -1) {
96
+ return s.field + " desc";
97
+ }
98
+ return s.field + " asc";
99
+ })
100
+ .join(", "));
101
+ }
102
+ if (filterQuery) {
103
+ params = params.append("filter", filterQuery);
104
+ }
105
+ if (displayFields && displayFields.length) {
106
+ params = params.append("displayfields", displayFields.join());
107
+ }
108
+ return params;
109
+ };
110
+ LogicalDeleteService.prototype.getProcessDetails = function (recordId) {
111
+ var filterParams = {
112
+ filter: "recordId eq '" + recordId + "'"
113
+ };
114
+ return this.http.get(this.exclusionProcessUrl, { params: filterParams })
115
+ .pipe(this.defaultCatch())
116
+ .pipe(map(function (value) {
117
+ var _a;
118
+ if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
119
+ return null;
120
+ }
121
+ return value.contents[0];
122
+ }));
123
+ };
124
+ LogicalDeleteService.prototype.listExclusions = function (entityName, params) {
125
+ if (params === void 0) { params = {}; }
126
+ if (params.filterQuery) {
127
+ params.filterQuery += " and lower(entityName) eq lower('" + entityName + "')";
128
+ }
129
+ else {
130
+ params.filterQuery = "lower(entityName) eq lower('" + entityName + "')";
131
+ }
132
+ return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
133
+ .pipe(this.defaultCatch())
134
+ .pipe(map(function (value) {
135
+ value.contents.forEach(function (p) {
136
+ if (p.startDate) {
137
+ p.startDate = moment(p.startDate).toDate();
138
+ }
139
+ if (p.finishDate) {
140
+ p.finishDate = moment(p.finishDate).toDate();
141
+ }
142
+ });
143
+ return value;
144
+ }));
145
+ };
146
+ LogicalDeleteService.ctorParameters = function () { return [
147
+ { type: HttpClient },
148
+ { type: MessageService },
149
+ { type: TranslateService },
150
+ { type: LogicalDeleteConfigService }
151
+ ]; };
152
+ LogicalDeleteService = __decorate([
153
+ Injectable()
154
+ ], LogicalDeleteService);
155
+ return LogicalDeleteService;
156
+ }());
157
+
158
+ var ExclusionDetailsComponent = /** @class */ (function () {
159
+ function ExclusionDetailsComponent(router, route, translate, logicalDeleteService, projectConfigs) {
160
+ this.router = router;
161
+ this.route = route;
162
+ this.translate = translate;
163
+ this.logicalDeleteService = logicalDeleteService;
164
+ this.projectConfigs = projectConfigs;
165
+ this._entityName = "";
166
+ this._isVisible = false;
167
+ this._isLoading = false;
168
+ this._processSummaryData = [];
169
+ this._processSummaryColumns = [];
170
+ this.ngUnsubscribe = new Subject();
171
+ }
172
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "isVisible", {
173
+ get: function () {
174
+ return this._isVisible;
175
+ },
176
+ enumerable: true,
177
+ configurable: true
178
+ });
179
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "isLoading", {
180
+ get: function () {
181
+ return this._isLoading;
182
+ },
183
+ enumerable: true,
184
+ configurable: true
185
+ });
186
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryData", {
187
+ get: function () {
188
+ return this._processSummaryData;
189
+ },
190
+ enumerable: true,
191
+ configurable: true
192
+ });
193
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryColumns", {
194
+ get: function () {
195
+ return this._processSummaryColumns;
196
+ },
197
+ enumerable: true,
198
+ configurable: true
199
+ });
200
+ ExclusionDetailsComponent.prototype.ngOnInit = function () {
201
+ var _this = this;
202
+ this.route.data
203
+ .pipe(takeUntil(this.ngUnsubscribe))
204
+ .subscribe(function (data) {
205
+ _this.locale = data.localeConfig;
206
+ });
207
+ this._processSummaryColumns = this.getSummaryColumns();
208
+ };
209
+ ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
210
+ this.ngUnsubscribe.next();
211
+ this.ngUnsubscribe.complete();
212
+ };
213
+ ExclusionDetailsComponent.prototype.showDetails = function (details) {
214
+ this.processDetails = null;
215
+ this._entityName = details.entityName;
216
+ this._isVisible = true;
217
+ this.entityDescription = details.entityDescription;
218
+ this.loadProcessDetails(details.recordId);
219
+ };
220
+ ExclusionDetailsComponent.prototype.closeDetails = function () {
221
+ this._isVisible = false;
222
+ };
223
+ ExclusionDetailsComponent.prototype.openExclusions = function () {
224
+ this.closeDetails();
225
+ this.router.navigate(["exclusions-list", this._entityName], {
226
+ queryParams: {
227
+ entityDescription: this.entityDescription
228
+ }
229
+ });
230
+ };
231
+ ExclusionDetailsComponent.prototype.getRecordDescription = function () {
232
+ var _a;
233
+ if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
234
+ return "";
235
+ }
236
+ return this.processDetails.description;
237
+ };
238
+ ExclusionDetailsComponent.prototype.getInicialDate = function () {
239
+ var _a;
240
+ if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
241
+ return "";
242
+ }
243
+ return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
244
+ };
245
+ ExclusionDetailsComponent.prototype.getFinishDate = function () {
246
+ var _a;
247
+ if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
248
+ return "";
249
+ }
250
+ return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
251
+ };
252
+ ExclusionDetailsComponent.prototype.isFinished = function () {
253
+ var _a;
254
+ return !!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate);
255
+ };
256
+ ExclusionDetailsComponent.prototype.getShowExclusionsButtonLabel = function () {
257
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_show_deletions");
258
+ };
259
+ ExclusionDetailsComponent.prototype.getCloseButtonLabel = function () {
260
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_close");
261
+ };
262
+ ExclusionDetailsComponent.prototype.getSummaryLabel = function () {
263
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_summary");
264
+ };
265
+ ExclusionDetailsComponent.prototype.getStartDateLabel = function () {
266
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start");
267
+ };
268
+ ExclusionDetailsComponent.prototype.getFinishDateLabel = function () {
269
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish");
270
+ };
271
+ ExclusionDetailsComponent.prototype.getSidebarTitle = function () {
272
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_details_title");
273
+ };
274
+ ExclusionDetailsComponent.prototype.getSummaryColumns = function () {
275
+ return [
276
+ {
277
+ field: "description",
278
+ attributes: ["description"],
279
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description"),
280
+ type: EnumColumnFieldType.STRING,
281
+ style: {
282
+ width: "300px"
283
+ }
284
+ },
285
+ {
286
+ field: "status",
287
+ attributes: ["status"],
288
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
289
+ type: EnumColumnFieldType.ENUM,
290
+ enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
291
+ style: {
292
+ width: "100px"
293
+ },
294
+ tooltip: this.getColumnStatusTooltip,
295
+ badgeConfigs: [
296
+ {
297
+ enumValue: EnumExclusionProcessStatus.ERROR,
298
+ color: EnumBadgeColors.RED
299
+ },
300
+ {
301
+ enumValue: EnumExclusionProcessStatus.PENDING,
302
+ color: EnumBadgeColors.YELLOW
303
+ },
304
+ {
305
+ enumValue: EnumExclusionProcessStatus.PROCESSING,
306
+ color: EnumBadgeColors.BLUE
307
+ },
308
+ {
309
+ enumValue: EnumExclusionProcessStatus.SUCCESS,
310
+ color: EnumBadgeColors.GREEN
311
+ }
312
+ ]
313
+ }
314
+ ];
315
+ };
316
+ ExclusionDetailsComponent.prototype.getColumnStatusTooltip = function (rowValue) {
317
+ if (rowValue.errorMessage) {
318
+ return rowValue.errorMessage;
319
+ }
320
+ return null;
321
+ };
322
+ ExclusionDetailsComponent.prototype.loadProcessDetails = function (recordId) {
323
+ var _this = this;
324
+ this._isLoading = true;
325
+ this.logicalDeleteService.getProcessDetails(recordId)
326
+ .pipe(takeUntil(this.ngUnsubscribe))
327
+ .pipe(finalize(function () { return _this._isLoading = false; }))
328
+ .subscribe(function (process) {
329
+ _this.processDetails = process;
330
+ _this.loadProcessSummary(process);
331
+ });
332
+ };
333
+ ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
334
+ var stepLogs = [];
335
+ process.groups.forEach(function (group) {
336
+ var steps = group.steps.map(function (step) { return ({
337
+ description: step.description,
338
+ status: step.status,
339
+ errorMessage: step.errorMessage
340
+ }); });
341
+ stepLogs.push.apply(stepLogs, __spread(steps));
342
+ });
343
+ this._processSummaryData = stepLogs;
344
+ };
345
+ ExclusionDetailsComponent.ctorParameters = function () { return [
346
+ { type: Router },
347
+ { type: ActivatedRoute },
348
+ { type: TranslateService },
349
+ { type: LogicalDeleteService },
350
+ { type: LogicalDeleteConfigService }
351
+ ]; };
352
+ __decorate([
353
+ Output()
354
+ ], ExclusionDetailsComponent.prototype, "isVisible", null);
355
+ __decorate([
356
+ Output()
357
+ ], ExclusionDetailsComponent.prototype, "isLoading", null);
358
+ __decorate([
359
+ Output()
360
+ ], ExclusionDetailsComponent.prototype, "processSummaryData", null);
361
+ __decorate([
362
+ Output()
363
+ ], ExclusionDetailsComponent.prototype, "processSummaryColumns", null);
364
+ __decorate([
365
+ Output()
366
+ ], ExclusionDetailsComponent.prototype, "processDetails", void 0);
367
+ __decorate([
368
+ Output()
369
+ ], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
370
+ ExclusionDetailsComponent = __decorate([
371
+ Component({
372
+ selector: "s-exclusion-details",
373
+ 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",
374
+ encapsulation: ViewEncapsulation.None,
375
+ 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}"]
376
+ })
377
+ ], ExclusionDetailsComponent);
378
+ return ExclusionDetailsComponent;
379
+ }());
380
+
381
+ var ExclusionDetailsModule = /** @class */ (function () {
382
+ function ExclusionDetailsModule() {
383
+ }
384
+ ExclusionDetailsModule = __decorate([
385
+ NgModule({
386
+ imports: [
387
+ CommonModule,
388
+ SidebarModule,
389
+ ButtonModule,
390
+ PanelModule,
391
+ TableModule,
392
+ TableModule$1,
393
+ LoadingStateModule,
394
+ LocaleModule
395
+ ],
396
+ declarations: [ExclusionDetailsComponent],
397
+ exports: [ExclusionDetailsComponent],
398
+ entryComponents: [ExclusionDetailsComponent]
399
+ })
400
+ ], ExclusionDetailsModule);
401
+ return ExclusionDetailsModule;
402
+ }());
403
+
404
+ var FilterService = /** @class */ (function () {
405
+ function FilterService(logicalDeleteConfigService, translate) {
406
+ this.logicalDeleteConfigService = logicalDeleteConfigService;
407
+ this.translate = translate;
408
+ this.numberTypes = [FieldType.Integer, FieldType.Double];
409
+ }
410
+ FilterService.prototype.getEnumQuery = function (name, value, multiple) {
411
+ if (multiple === void 0) { multiple = false; }
412
+ if (multiple) {
413
+ var filter = value.map(function (selected) { return name + " eq '" + selected + "'"; }).join(" or ");
414
+ return "(" + filter + ")";
415
+ }
416
+ return name + " eq '" + value + "'";
417
+ };
418
+ FilterService.prototype.createFilterString = function (formField, value) {
419
+ var name = formField.name, type = formField.type, multiple = formField.multiple;
420
+ if (typeof value == "number") {
421
+ return name + " eq " + value;
422
+ }
423
+ switch (type) {
424
+ case FieldType.Date:
425
+ return name + " eq '" + moment(value).format("YYYY-MM-DD") + "'";
426
+ case FieldType.Time:
427
+ return name + " eq '" + moment(value).format("HH:mm:ss") + "'";
428
+ case FieldType.DateTime:
429
+ return name + " eq '" + moment(value).format() + "'";
430
+ case FieldType.LocalDateTime:
431
+ return name + " eq '" + moment(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS") + "'";
432
+ case FieldType.Enum:
433
+ return this.getEnumQuery(name, value, multiple);
434
+ case FieldType.String:
435
+ return "containing(upper(" + name + "), upper('" + value.replace(/'/g, "'") + "'))";
436
+ case FieldType.Lookup:
437
+ return name + " eq '" + value.id + "'";
438
+ default:
439
+ return name + " eq '" + value + "'";
440
+ }
441
+ };
442
+ FilterService.prototype.createFilterTokens = function (formField, value) {
443
+ var _this = this;
444
+ var _a = formField, name = _a.name, type = _a.type, label = _a.label, searchFields = _a.searchFields, options = _a.options;
445
+ var labelValue = value;
446
+ switch (type) {
447
+ case FieldType.Date:
448
+ labelValue = moment(value).format("L");
449
+ break;
450
+ case FieldType.Time:
451
+ labelValue = moment(value).format("LTS");
452
+ break;
453
+ case FieldType.LocalDateTime:
454
+ case FieldType.DateTime:
455
+ labelValue = moment(value).format("L LTS");
456
+ break;
457
+ case FieldType.Lookup:
458
+ labelValue = searchFields.map(function (field) { return _this.getProp(value, field.name); }).join(" - ");
459
+ break;
460
+ case FieldType.Enum:
461
+ if (Array.isArray(value)) {
462
+ labelValue = value.map(function (element) {
463
+ return options.filter(function (en) { return en.value === element; })[0].label;
464
+ });
465
+ }
466
+ else {
467
+ labelValue = options.filter(function (option) { return option.value === labelValue; })[0].label;
468
+ }
469
+ break;
470
+ case FieldType.Boolean:
471
+ labelValue = value
472
+ ? this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_true")
473
+ : this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_false");
474
+ break;
475
+ }
476
+ return { id: name, label: label + ": " + labelValue };
477
+ };
478
+ FilterService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
479
+ var _this = this;
480
+ return displayFields.map(function (field) { return _this.getProp(value, ownerEntity + "." + field); })
481
+ .reduce(function (acc, val) { return "" + acc + separator + val; }) + "";
482
+ };
483
+ FilterService.prototype.getProp = function (obj, path) {
484
+ return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
485
+ };
486
+ FilterService.prototype.getLabelValueRequest = function (contents, displayFields) {
487
+ var _this = this;
488
+ return contents.map(function (item) { return (__assign(__assign({}, item), { label: displayFields.map(function (field) { return _this.getProp(item, field); }).join(" - ") })); });
489
+ };
490
+ FilterService.prototype.isValidFilter = function (type, value) {
491
+ var isTypeNumber = this.numberTypes.includes(type);
492
+ var numberPattern = /^\d+\b$/;
493
+ var isNumber = value.match(numberPattern);
494
+ return !(isTypeNumber && !isNumber);
495
+ };
496
+ FilterService.ctorParameters = function () { return [
497
+ { type: LogicalDeleteConfigService },
498
+ { type: TranslateService }
499
+ ]; };
500
+ FilterService = __decorate([
501
+ Injectable()
502
+ ], FilterService);
503
+ return FilterService;
504
+ }());
505
+
506
+ var ExclusionsListComponent = /** @class */ (function () {
507
+ function ExclusionsListComponent(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
508
+ this.route = route;
509
+ this.translate = translate;
510
+ this.formBuilder = formBuilder;
511
+ this.changeDetectorRef = changeDetectorRef;
512
+ this.logicalDeleteService = logicalDeleteService;
513
+ this.filterService = filterService;
514
+ this.projectConfigs = projectConfigs;
515
+ this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
516
+ this.showLoader = false;
517
+ this.totalRecords = 0;
518
+ this.filtersPanelCollapsed = true;
519
+ this.searchTokens = [];
520
+ this.serverError = false;
521
+ this.ngUnsubscribe = new Subject();
522
+ }
523
+ ExclusionsListComponent.prototype.ngOnInit = function () {
524
+ var _this = this;
525
+ this.filterFormGroup = this.getFormBuilder();
526
+ this.filterFields = this.getFilterFields();
527
+ this.gridColumns = this.getGridColumns();
528
+ this.route.data
529
+ .pipe(takeUntil(this.ngUnsubscribe))
530
+ .subscribe(function (data) {
531
+ _this.locale = data.localeConfig;
532
+ });
533
+ this.route.params
534
+ .pipe(takeUntil(this.ngUnsubscribe))
535
+ .subscribe(function (params) {
536
+ _this.entityName = params.entityName;
537
+ });
538
+ this.route.queryParams
539
+ .pipe(takeUntil(this.ngUnsubscribe))
540
+ .subscribe(function (queryParams) {
541
+ _this.entityDescription = queryParams.entityDescription;
542
+ });
543
+ };
544
+ ExclusionsListComponent.prototype.ngOnDestroy = function () {
545
+ this.ngUnsubscribe.next();
546
+ this.ngUnsubscribe.complete();
547
+ };
548
+ ExclusionsListComponent.prototype.getFormBuilder = function () {
549
+ return this.formBuilder.group({
550
+ description: [undefined, Validators.compose([])],
551
+ state: [undefined, Validators.compose([])],
552
+ startDate: [{ value: undefined, disabled: false }, Validators.compose([])],
553
+ endDate: [{ value: undefined, disabled: false }, Validators.compose([])]
554
+ });
555
+ };
556
+ ExclusionsListComponent.prototype.getGridColumns = function () {
557
+ return [
558
+ {
559
+ field: "description",
560
+ attributes: ['description'],
561
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description"),
562
+ type: EnumColumnFieldType.STRING,
563
+ style: {
564
+ width: '300px'
565
+ }
566
+ },
567
+ {
568
+ field: "status",
569
+ attributes: ['status'],
570
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
571
+ type: EnumColumnFieldType.ENUM,
572
+ enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
573
+ style: {
574
+ width: '100px'
575
+ },
576
+ badgeConfigs: [
577
+ {
578
+ enumValue: EnumExclusionProcessStatus.ERROR,
579
+ color: EnumBadgeColors.RED
580
+ },
581
+ {
582
+ enumValue: EnumExclusionProcessStatus.PENDING,
583
+ color: EnumBadgeColors.YELLOW
584
+ },
585
+ {
586
+ enumValue: EnumExclusionProcessStatus.PROCESSING,
587
+ color: EnumBadgeColors.BLUE
588
+ },
589
+ {
590
+ enumValue: EnumExclusionProcessStatus.SUCCESS,
591
+ color: EnumBadgeColors.GREEN
592
+ }
593
+ ]
594
+ },
595
+ {
596
+ field: "startDate",
597
+ attributes: ['startDate'],
598
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start"),
599
+ type: EnumColumnFieldType.DATE,
600
+ dateFormat: "DD/MM/YYYY HH:mm",
601
+ style: {
602
+ width: '100px'
603
+ }
604
+ },
605
+ {
606
+ field: "finishDate",
607
+ attributes: ['finishDate'],
608
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish"),
609
+ type: EnumColumnFieldType.DATE,
610
+ dateFormat: "DD/MM/YYYY HH:mm",
611
+ style: {
612
+ width: '100px'
613
+ }
614
+ }
615
+ ];
616
+ };
617
+ ExclusionsListComponent.prototype.getFilterFields = function () {
618
+ return [
619
+ new FormField({
620
+ type: FieldType.String,
621
+ name: "description",
622
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description")
623
+ }),
624
+ new FormField({
625
+ type: FieldType.Enum,
626
+ name: "state",
627
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
628
+ placeholder: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
629
+ multiple: true,
630
+ options: [
631
+ {
632
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_error"),
633
+ value: EnumExclusionProcessStatus.ERROR
634
+ },
635
+ {
636
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_pending"),
637
+ value: EnumExclusionProcessStatus.PENDING
638
+ },
639
+ {
640
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_processing"),
641
+ value: EnumExclusionProcessStatus.PROCESSING
642
+ },
643
+ {
644
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_success"),
645
+ value: EnumExclusionProcessStatus.SUCCESS
646
+ }
647
+ ]
648
+ }),
649
+ new FormField({
650
+ type: FieldType.Date,
651
+ name: "startDate",
652
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start")
653
+ }),
654
+ new FormField({
655
+ type: FieldType.Date,
656
+ name: "endDate",
657
+ label: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish")
658
+ })
659
+ ];
660
+ };
661
+ ExclusionsListComponent.prototype.getEmptyStateTitle = function () {
662
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_title");
663
+ };
664
+ ExclusionsListComponent.prototype.getEmptyStateDescription = function () {
665
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
666
+ };
667
+ ExclusionsListComponent.prototype.getTitle = function () {
668
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
669
+ };
670
+ ExclusionsListComponent.prototype.getDetailsButtonTitle = function () {
671
+ return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_details");
672
+ };
673
+ ExclusionsListComponent.prototype.onSearch = function () {
674
+ var filterData = this.filterFormGroup.getRawValue();
675
+ this.filtersPanelCollapsed = true;
676
+ this.resetGrid({ filterData: filterData });
677
+ };
678
+ ExclusionsListComponent.prototype.onClear = function () {
679
+ this.filterFormGroup.reset();
680
+ var filterData = this.filterFormGroup.getRawValue();
681
+ this.resetGrid({ filterData: filterData });
682
+ };
683
+ ExclusionsListComponent.prototype.onRemoveToken = function (token) {
684
+ this.filterFormGroup.get(token.id).setValue(undefined);
685
+ var filterData = this.filterFormGroup.getRawValue();
686
+ this.resetGrid({ filterData: filterData });
687
+ };
688
+ ExclusionsListComponent.prototype.onGridChange = function (event) {
689
+ var size = event.rows;
690
+ var page = event.first / size;
691
+ var sort = event.multiSortMeta ? event.multiSortMeta : [];
692
+ return this.updateGrid({ page: page, size: size, sort: sort });
693
+ };
694
+ ExclusionsListComponent.prototype.getFilterTokens = function () {
695
+ var _this = this;
696
+ var filterData = this.filterFormGroup.value;
697
+ return this.filterFields
698
+ .filter(function (_a) {
699
+ var name = _a.name;
700
+ return filterData[name] != undefined && filterData[name] !== "";
701
+ })
702
+ .map(function (formField) { return _this.filterService.createFilterTokens(formField, filterData[formField.name]); });
703
+ };
704
+ ExclusionsListComponent.prototype.getFilterQuery = function () {
705
+ var _this = this;
706
+ var filterData = this.currentListParams.filterData;
707
+ var dateFields = ['startDate', 'endDate'];
708
+ var filterQuery = this.filterFields
709
+ .filter(function (_a) {
710
+ var name = _a.name;
711
+ return !dateFields.includes(name);
712
+ })
713
+ .filter(function (_a) {
714
+ var name = _a.name;
715
+ return filterData[name] != undefined;
716
+ })
717
+ .map(function (formField) { return _this.filterService.createFilterString(formField, filterData[formField.name]); })
718
+ .join(" and ");
719
+ if (filterData.startDate && filterData.endDate) {
720
+ var startDate = moment(filterData.startDate).format('YYYY-MM-DD');
721
+ var endDate = moment(filterData.endDate).format('YYYY-MM-DD');
722
+ var dateQuery = "startDate between '" + startDate + "' and '" + endDate + "'";
723
+ if (filterQuery) {
724
+ filterQuery += " and " + dateQuery;
725
+ }
726
+ else {
727
+ filterQuery = dateQuery;
728
+ }
729
+ }
730
+ return filterQuery;
731
+ };
732
+ ExclusionsListComponent.prototype.updateGrid = function (listParams) {
733
+ if (listParams === void 0) { listParams = {}; }
734
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
735
+ var _a = this.currentListParams, page = _a.page, size = _a.size, sort = _a.sort;
736
+ this.searchTokens = this.getFilterTokens();
737
+ var filterQuery = this.getFilterQuery();
738
+ var displayFields = __spread([
739
+ 'recordId'
740
+ ], this.gridColumns.map(function (column) { return column.field; }));
741
+ this.listExclusions({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields });
742
+ };
743
+ ExclusionsListComponent.prototype.listExclusions = function (params) {
744
+ var _this = this;
745
+ this.showLoader = true;
746
+ this.serverError = false;
747
+ this.changeDetectorRef.detectChanges();
748
+ this.logicalDeleteService
749
+ .listExclusions(this.entityName, params)
750
+ .pipe(takeUntil(this.ngUnsubscribe), catchError(function (err) {
751
+ if (err.status >= 500 && err.status < 600) {
752
+ _this.serverError = true;
753
+ }
754
+ throw err;
755
+ }), finalize(function () { return _this.showLoader = false; }))
756
+ .subscribe(function (list) {
757
+ _this.gridData = list.contents;
758
+ _this.totalRecords = list.totalElements;
759
+ });
760
+ };
761
+ ExclusionsListComponent.prototype.focusInput = function (elementId) {
762
+ var element = document.getElementById("" + elementId);
763
+ if (element) {
764
+ element.focus();
765
+ }
766
+ };
767
+ ExclusionsListComponent.prototype.resetGrid = function (listParams) {
768
+ if (listParams)
769
+ this.currentListParams = __assign(__assign({}, this.currentListParams), listParams);
770
+ this.currentListParams = __assign(__assign({}, this.currentListParams), { page: 0, sort: [] });
771
+ this.table.reset();
772
+ };
773
+ ExclusionsListComponent.prototype.onClickDetails = function (rowData) {
774
+ this.exclusionDetailsComponent.showDetails({
775
+ recordId: rowData.recordId,
776
+ entityDescription: this.entityDescription,
777
+ entityName: this.entityName
778
+ });
779
+ };
780
+ ExclusionsListComponent.ctorParameters = function () { return [
781
+ { type: ActivatedRoute },
782
+ { type: TranslateService },
783
+ { type: FormBuilder },
784
+ { type: ChangeDetectorRef },
785
+ { type: LogicalDeleteService },
786
+ { type: FilterService },
787
+ { type: LogicalDeleteConfigService }
788
+ ]; };
789
+ __decorate([
790
+ ViewChild("exclusionsTable")
791
+ ], ExclusionsListComponent.prototype, "table", void 0);
792
+ __decorate([
793
+ ViewChild(ExclusionDetailsComponent)
794
+ ], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
795
+ ExclusionsListComponent = __decorate([
796
+ Component({
797
+ 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 {{ 'filters' | translate }}\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: 'error_invalid' | translate }\"\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]=\"'filter' | translate\"\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]=\"'clear' | translate\"\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=\"{{ 'error_server_title' | translate }}\"\n primaryActionLabel=\"{{ 'error_server_try_again' | translate }}\"\n (primaryAction)=\"resetGrid()\"\n description=\"{{ 'error_server_description' | 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 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\">{{'A\u00E7\u00F5es'}}</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>",
798
+ providers: []
799
+ })
800
+ ], ExclusionsListComponent);
801
+ return ExclusionsListComponent;
802
+ }());
803
+
804
+ var ExclusionsListFeatureRoutingGuard = /** @class */ (function () {
805
+ function ExclusionsListFeatureRoutingGuard() {
806
+ }
807
+ ExclusionsListFeatureRoutingGuard.prototype.canActivate = function () {
808
+ return true;
809
+ };
810
+ ExclusionsListFeatureRoutingGuard = __decorate([
811
+ Injectable()
812
+ ], ExclusionsListFeatureRoutingGuard);
813
+ return ExclusionsListFeatureRoutingGuard;
814
+ }());
815
+ var ExclusionsListFeatureRoutingListTitleResolver = /** @class */ (function () {
816
+ function ExclusionsListFeatureRoutingListTitleResolver(translate, projectConfigs) {
817
+ this.translate = translate;
818
+ this.projectConfigs = projectConfigs;
819
+ }
820
+ ExclusionsListFeatureRoutingListTitleResolver.prototype.resolve = function () {
821
+ return this.translate.get(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
822
+ };
823
+ ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = function () { return [
824
+ { type: TranslateService },
825
+ { type: LogicalDeleteConfigService }
826
+ ]; };
827
+ ExclusionsListFeatureRoutingListTitleResolver = __decorate([
828
+ Injectable()
829
+ ], ExclusionsListFeatureRoutingListTitleResolver);
830
+ return ExclusionsListFeatureRoutingListTitleResolver;
831
+ }());
832
+ var ExclusionsListFeatureRoutingPermissionResolver = /** @class */ (function () {
833
+ function ExclusionsListFeatureRoutingPermissionResolver(permissionsService) {
834
+ this.permissionsService = permissionsService;
835
+ }
836
+ ExclusionsListFeatureRoutingPermissionResolver.prototype.resolve = function () {
837
+ return this.permissionsService.get();
838
+ };
839
+ ExclusionsListFeatureRoutingPermissionResolver.ctorParameters = function () { return [
840
+ { type: PermissionsService }
841
+ ]; };
842
+ ExclusionsListFeatureRoutingPermissionResolver = __decorate([
843
+ Injectable()
844
+ ], ExclusionsListFeatureRoutingPermissionResolver);
845
+ return ExclusionsListFeatureRoutingPermissionResolver;
846
+ }());
847
+ var ExclusionsListFeatureRoutingLocaleResolver = /** @class */ (function () {
848
+ function ExclusionsListFeatureRoutingLocaleResolver(localeService) {
849
+ this.localeService = localeService;
850
+ }
851
+ ExclusionsListFeatureRoutingLocaleResolver.prototype.resolve = function () {
852
+ return this.localeService.get();
853
+ };
854
+ ExclusionsListFeatureRoutingLocaleResolver.ctorParameters = function () { return [
855
+ { type: LocaleService }
856
+ ]; };
857
+ ExclusionsListFeatureRoutingLocaleResolver = __decorate([
858
+ Injectable()
859
+ ], ExclusionsListFeatureRoutingLocaleResolver);
860
+ return ExclusionsListFeatureRoutingLocaleResolver;
861
+ }());
862
+ var EmptyComponent = /** @class */ (function () {
863
+ function EmptyComponent() {
864
+ }
865
+ EmptyComponent = __decorate([
866
+ Component({
867
+ template: "<router-outlet></router-outlet>"
868
+ })
869
+ ], EmptyComponent);
870
+ return EmptyComponent;
871
+ }());
872
+ var routes = [
873
+ {
874
+ path: "exclusions-list",
875
+ component: EmptyComponent,
876
+ canActivate: [
877
+ ExclusionsListFeatureRoutingGuard
878
+ ],
879
+ resolve: {
880
+ allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
881
+ localeConfig: ExclusionsListFeatureRoutingLocaleResolver,
882
+ routeTitle: ExclusionsListFeatureRoutingListTitleResolver
883
+ },
884
+ children: [
885
+ {
886
+ path: ":entityName",
887
+ component: ExclusionsListComponent
888
+ }
889
+ ]
890
+ }
891
+ ];
892
+ var ExclusionsListFeatureRouting = /** @class */ (function () {
893
+ function ExclusionsListFeatureRouting() {
894
+ }
895
+ ExclusionsListFeatureRouting = __decorate([
896
+ NgModule({
897
+ imports: [
898
+ RouterModule.forChild(routes)
899
+ ],
900
+ exports: [
901
+ RouterModule
902
+ ],
903
+ providers: [
904
+ ExclusionsListFeatureRoutingGuard,
905
+ ExclusionsListFeatureRoutingPermissionResolver,
906
+ ExclusionsListFeatureRoutingLocaleResolver,
907
+ ExclusionsListFeatureRoutingListTitleResolver
908
+ ],
909
+ declarations: [
910
+ EmptyComponent
911
+ ]
912
+ })
913
+ ], ExclusionsListFeatureRouting);
914
+ return ExclusionsListFeatureRouting;
915
+ }());
916
+
917
+ var ExclusionsListModule = /** @class */ (function () {
918
+ function ExclusionsListModule() {
919
+ }
920
+ ExclusionsListModule = __decorate([
921
+ NgModule({
922
+ imports: [
923
+ FormsModule,
924
+ ReactiveFormsModule,
925
+ TranslateModule,
926
+ CommonModule,
927
+ ControlErrorsModule,
928
+ ButtonModule,
929
+ PanelModule,
930
+ InputTextModule,
931
+ InfoSignModule,
932
+ ConfirmDialogModule,
933
+ DialogModule,
934
+ TableModule,
935
+ TableModule$1,
936
+ LoadingStateModule,
937
+ EmptyStateModule,
938
+ DynamicFormModule,
939
+ TokenListModule,
940
+ LocaleModule.forChild(),
941
+ ExclusionDetailsModule,
942
+ ExclusionsListFeatureRouting
943
+ ],
944
+ declarations: [ExclusionsListComponent],
945
+ exports: [ExclusionsListComponent],
946
+ entryComponents: [ExclusionsListComponent]
947
+ })
948
+ ], ExclusionsListModule);
949
+ return ExclusionsListModule;
950
+ }());
951
+
952
+ var LogicalDeleteModule = /** @class */ (function () {
953
+ function LogicalDeleteModule() {
954
+ }
955
+ LogicalDeleteModule_1 = LogicalDeleteModule;
956
+ LogicalDeleteModule.forRoot = function (config) {
957
+ return {
958
+ ngModule: LogicalDeleteModule_1,
959
+ providers: [
960
+ {
961
+ provide: ProjectConfigsInjectionToken,
962
+ useValue: config
963
+ }
964
+ ]
965
+ };
966
+ };
967
+ var LogicalDeleteModule_1;
968
+ LogicalDeleteModule = LogicalDeleteModule_1 = __decorate([
969
+ NgModule({
970
+ providers: [LogicalDeleteService, LogicalDeleteConfigService, FilterService]
971
+ })
972
+ ], LogicalDeleteModule);
973
+ return LogicalDeleteModule;
974
+ }());
975
+
976
+ /**
977
+ * Generated bundle index. Do not edit.
978
+ */
979
+
980
+ export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard, ExclusionsListFeatureRoutingListTitleResolver, ExclusionsListFeatureRoutingLocaleResolver, ExclusionsListFeatureRoutingPermissionResolver, ExclusionsListModule, LogicalDeleteModule, routes, LogicalDeleteService as ɵa, LogicalDeleteConfigService as ɵb, ProjectConfigsInjectionToken as ɵc, ExclusionDetailsModule as ɵe, ExclusionDetailsComponent as ɵf, LogicalDeleteService as ɵg, FilterService as ɵh };
981
+ //# sourceMappingURL=seniorsistemas-exclusion-process-component.js.map