@seniorsistemas/exclusion-process-component 0.0.1-c049d10c-e93a-4d63-9c2a-b17bca40c324 → 0.6.0-44030ff3-2eeb-49f7-8927-0920cc01a805

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 (200) hide show
  1. package/.editorconfig +19 -0
  2. package/.gitlab-ci.yml +74 -0
  3. package/.prettierrc +8 -0
  4. package/.senior-ci-extensions.sh +21 -0
  5. package/.vscode/settings.json +6 -0
  6. package/CHANGELOG.md +22 -0
  7. package/README.md +16 -0
  8. package/angular.json +144 -0
  9. package/archive.tar.gz +0 -0
  10. package/e2e/app.e2e-spec.ts +14 -0
  11. package/e2e/app.po.ts +11 -0
  12. package/e2e/tsconfig.e2e.json +14 -0
  13. package/karma.conf.js +53 -0
  14. package/lib/.browserslistrc +5 -0
  15. package/lib/package.json +19 -0
  16. package/{enums/enum-exclusion-process-status.d.ts → lib/src/enums/enum-exclusion-process-status.ts} +1 -1
  17. package/lib/src/exclusion-details/exclusion-details.component.html +84 -0
  18. package/lib/src/exclusion-details/exclusion-details.component.scss +47 -0
  19. package/lib/src/exclusion-details/exclusion-details.component.spec.ts +171 -0
  20. package/lib/src/exclusion-details/exclusion-details.component.ts +235 -0
  21. package/lib/src/exclusion-details/exclusion-details.module.ts +23 -0
  22. package/{exclusion-details/protocols/exclusion-details.d.ts → lib/src/exclusion-details/protocols/exclusion-details.ts} +1 -0
  23. package/{exclusion-details/protocols/show-details-information.d.ts → lib/src/exclusion-details/protocols/show-details-information.ts} +1 -1
  24. package/lib/src/exclusions-list/exclusions-list.component.html +157 -0
  25. package/lib/src/exclusions-list/exclusions-list.component.spec.ts +526 -0
  26. package/lib/src/exclusions-list/exclusions-list.component.ts +335 -0
  27. package/lib/src/exclusions-list/exclusions-list.module.ts +52 -0
  28. package/lib/src/exclusions-list/exclusions-list.routing.ts +89 -0
  29. package/lib/src/exclusions-list/index.ts +2 -0
  30. package/lib/src/logical-delete.module.ts +22 -0
  31. package/{models/exclusion-process-step-group.d.ts → lib/src/models/exclusion-process-step-group.ts} +1 -0
  32. package/{models/exclusion-process-step.d.ts → lib/src/models/exclusion-process-step.ts} +1 -0
  33. package/{models/exclusion-process.d.ts → lib/src/models/exclusion-process.ts} +1 -0
  34. package/{models/list-params.d.ts → lib/src/models/list-params.ts} +1 -0
  35. package/{models/project-config.d.ts → lib/src/models/project-config.ts} +3 -1
  36. package/lib/src/services/filter.service.spec.ts +290 -0
  37. package/lib/src/services/filter.service.ts +109 -0
  38. package/lib/src/services/index.ts +1 -0
  39. package/lib/src/services/logical-delete-config.service.spec.ts +59 -0
  40. package/lib/src/services/logical-delete-config.service.ts +25 -0
  41. package/lib/src/services/logical-delete.service.spec.ts +322 -0
  42. package/lib/src/services/logical-delete.service.ts +122 -0
  43. package/lib/test.ts +14 -0
  44. package/lib/tsconfig.lib.json +19 -0
  45. package/lib/tsconfig.lib.prod.json +6 -0
  46. package/lib/tsconfig.spec.json +12 -0
  47. package/lib/tslint.json +19 -0
  48. package/package.json +59 -18
  49. package/protractor.conf.js +28 -0
  50. package/senior-ci/.devcontainer/Dockerfile +27 -0
  51. package/senior-ci/.devcontainer/devcontainer.json +71 -0
  52. package/senior-ci/.editorconfig +14 -0
  53. package/senior-ci/.gitattributes +5 -0
  54. package/senior-ci/.gitlab-ci.yml +53 -0
  55. package/senior-ci/.pylintrc +562 -0
  56. package/senior-ci/.vscode/launch.json +102 -0
  57. package/senior-ci/CHANGELOG.md +1564 -0
  58. package/senior-ci/CONTRIBUTING.md +31 -0
  59. package/senior-ci/README.md +26 -0
  60. package/senior-ci/ci/ci.sh +74 -0
  61. package/senior-ci/ci/sonar_scanner.py +48 -0
  62. package/senior-ci/common/__init__.py +250 -0
  63. package/senior-ci/common/default-files/pom.xml +10 -0
  64. package/senior-ci/common/docker-helpers.sh +57 -0
  65. package/senior-ci/common/extensions.py +88 -0
  66. package/senior-ci/common/flutter-helpers.sh +3 -0
  67. package/senior-ci/common/getopt_helper.py +168 -0
  68. package/senior-ci/common/graphql_client.py +40 -0
  69. package/senior-ci/common/helm_helpers.py +40 -0
  70. package/senior-ci/common/notification-helpers.sh +15 -0
  71. package/senior-ci/common/npm-helper.sh +4 -0
  72. package/senior-ci/common/parallel-helper.sh +8 -0
  73. package/senior-ci/common/release-helpers.sh +196 -0
  74. package/senior-ci/common/s3cache-helpers.sh +47 -0
  75. package/senior-ci/common/senior-ci-extensions-helpers.sh +15 -0
  76. package/senior-ci/common/sonar_helper.py +203 -0
  77. package/senior-ci/common/validations/buildable_project.py +61 -0
  78. package/senior-ci/common/validations/check_deprecated_primitives.py +49 -0
  79. package/senior-ci/common/validations/check_project_path.py +40 -0
  80. package/senior-ci/common/validations/check_sonar_config_files.py +41 -0
  81. package/senior-ci/common/validations/check_tags.py +41 -0
  82. package/senior-ci/common/validations/validate_changelog.py +151 -0
  83. package/senior-ci/common/validations/validate_issues.py +320 -0
  84. package/senior-ci/docker/build.sh +18 -0
  85. package/senior-ci/docker/config-host.sh +29 -0
  86. package/senior-ci/docker/deploy-service.sh +79 -0
  87. package/senior-ci/docker/push.sh +22 -0
  88. package/senior-ci/frontend/npm/bibliotecas/ci.sh +149 -0
  89. package/senior-ci/frontend/npm/ci.sh +370 -0
  90. package/senior-ci/frontend/npm/release-translations.sh +164 -0
  91. package/senior-ci/helm/deploy.py +56 -0
  92. package/senior-ci/helm/publish.py +41 -0
  93. package/senior-ci/hook/release_notification.sh +88 -0
  94. package/senior-ci/hook/text_notification.sh +10 -0
  95. package/senior-ci/java/bibliotecas/ci.sh +215 -0
  96. package/senior-ci/java/sdl/ci.sh +372 -0
  97. package/senior-ci/java/sdl/scripts/hotfix.sh +78 -0
  98. package/senior-ci/mobile/flutter/apps/__main__.py +5 -0
  99. package/senior-ci/mobile/flutter/apps/ci.py +193 -0
  100. package/senior-ci/mobile/flutter/libs/__main__.py +5 -0
  101. package/senior-ci/mobile/flutter/libs/ci.py +178 -0
  102. package/senior-ci/mobile/flutter/scripts/release.sh +54 -0
  103. package/senior-ci/release-candidate/backend/get_version.sh +64 -0
  104. package/senior-ci/release-candidate/close_branch.sh +113 -0
  105. package/senior-ci/release-candidate/common/create_hotfix.sh +28 -0
  106. package/senior-ci/release-candidate/common/create_release.sh +30 -0
  107. package/senior-ci/release-candidate/create_branch.sh +64 -0
  108. package/senior-ci/release-candidate/frontend/get_version.sh +43 -0
  109. package/senior-ci/requirements-dev.txt +5 -0
  110. package/senior-ci/requirements.txt +5 -0
  111. package/senior-ci/scripts/apply_yamls.py +229 -0
  112. package/senior-ci/scripts/create_sre_issue/__main__.py +7 -0
  113. package/senior-ci/scripts/create_sre_issue/create_sre_issue.py +267 -0
  114. package/senior-ci/scripts/create_sre_issue/helpers.py +166 -0
  115. package/senior-ci/scripts/create_sre_issue/jira_manager.py +37 -0
  116. package/senior-ci/scripts/validate_changelog.sh +3 -0
  117. package/senior-ci/sonar-project.properties +1 -0
  118. package/server.js +5 -0
  119. package/sonar-project.properties +10 -0
  120. package/src/app/app.component.html +43 -0
  121. package/src/app/app.component.scss +36 -0
  122. package/src/app/app.component.ts +56 -0
  123. package/src/app/app.module.ts +64 -0
  124. package/src/app/shared/shared.module.ts +28 -0
  125. package/src/environments/environment.default.ts +3 -0
  126. package/src/environments/environment.prod.ts +6 -0
  127. package/src/environments/environment.ts +7 -0
  128. package/src/favicon.ico +0 -0
  129. package/src/index.html +17 -0
  130. package/src/locale/en-US.json +3 -0
  131. package/src/locale/es-ES.json +3 -0
  132. package/src/locale/pt-BR.json +3 -0
  133. package/src/main.ts +13 -0
  134. package/src/polyfills.ts +58 -0
  135. package/src/styles.scss +11 -0
  136. package/src/tsconfig.app.json +21 -0
  137. package/src/typings.d.ts +15 -0
  138. package/tsconfig.json +39 -0
  139. package/tslint.json +80 -0
  140. package/bundles/seniorsistemas-exclusion-process-component.umd.js +0 -747
  141. package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +0 -1
  142. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +0 -16
  143. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +0 -1
  144. package/esm2015/enums/enum-exclusion-process-status.js +0 -8
  145. package/esm2015/exclusion-details/exclusion-details.component.js +0 -216
  146. package/esm2015/exclusion-details/exclusion-details.module.js +0 -28
  147. package/esm2015/exclusion-details/index.js +0 -3
  148. package/esm2015/exclusion-details/protocols/exclusion-details.js +0 -1
  149. package/esm2015/exclusion-details/protocols/index.js +0 -2
  150. package/esm2015/exclusion-details/protocols/show-details-information.js +0 -3
  151. package/esm2015/logical-delete.module.js +0 -27
  152. package/esm2015/models/exclusion-process-step-group.js +0 -1
  153. package/esm2015/models/exclusion-process-step.js +0 -1
  154. package/esm2015/models/exclusion-process.js +0 -1
  155. package/esm2015/models/index.js +0 -1
  156. package/esm2015/models/list-params.js +0 -1
  157. package/esm2015/models/list-result.js +0 -1
  158. package/esm2015/models/project-config.js +0 -3
  159. package/esm2015/public-api.js +0 -3
  160. package/esm2015/seniorsistemas-exclusion-process-component.js +0 -9
  161. package/esm2015/services/filter.service.js +0 -104
  162. package/esm2015/services/logical-delete-config.service.js +0 -29
  163. package/esm2015/services/logical-delete.service.js +0 -109
  164. package/esm5/enums/enum-exclusion-process-status.js +0 -8
  165. package/esm5/exclusion-details/exclusion-details.component.js +0 -235
  166. package/esm5/exclusion-details/exclusion-details.module.js +0 -31
  167. package/esm5/exclusion-details/index.js +0 -3
  168. package/esm5/exclusion-details/protocols/exclusion-details.js +0 -1
  169. package/esm5/exclusion-details/protocols/index.js +0 -2
  170. package/esm5/exclusion-details/protocols/show-details-information.js +0 -7
  171. package/esm5/logical-delete.module.js +0 -31
  172. package/esm5/models/exclusion-process-step-group.js +0 -1
  173. package/esm5/models/exclusion-process-step.js +0 -1
  174. package/esm5/models/exclusion-process.js +0 -1
  175. package/esm5/models/index.js +0 -1
  176. package/esm5/models/list-params.js +0 -1
  177. package/esm5/models/list-result.js +0 -1
  178. package/esm5/models/project-config.js +0 -3
  179. package/esm5/public-api.js +0 -3
  180. package/esm5/seniorsistemas-exclusion-process-component.js +0 -9
  181. package/esm5/services/filter.service.js +0 -109
  182. package/esm5/services/logical-delete-config.service.js +0 -30
  183. package/esm5/services/logical-delete.service.js +0 -112
  184. package/exclusion-details/exclusion-details.component.d.ts +0 -49
  185. package/exclusion-details/exclusion-details.module.d.ts +0 -2
  186. package/fesm2015/seniorsistemas-exclusion-process-component.js +0 -495
  187. package/fesm2015/seniorsistemas-exclusion-process-component.js.map +0 -1
  188. package/fesm5/seniorsistemas-exclusion-process-component.js +0 -530
  189. package/fesm5/seniorsistemas-exclusion-process-component.js.map +0 -1
  190. package/logical-delete.module.d.ts +0 -5
  191. package/seniorsistemas-exclusion-process-component.d.ts +0 -8
  192. package/seniorsistemas-exclusion-process-component.metadata.json +0 -1
  193. package/services/filter.service.d.ts +0 -19
  194. package/services/logical-delete-config.service.d.ts +0 -8
  195. package/services/logical-delete.service.d.ts +0 -20
  196. /package/{exclusion-details/index.d.ts → lib/src/exclusion-details/index.ts} +0 -0
  197. /package/{exclusion-details/protocols/index.d.ts → lib/src/exclusion-details/protocols/index.ts} +0 -0
  198. /package/{models/index.d.ts → lib/src/models/index.ts} +0 -0
  199. /package/{models/list-result.d.ts → lib/src/models/list-result.ts} +0 -0
  200. /package/{public-api.d.ts → lib/src/public-api.ts} +0 -0
@@ -1,747 +0,0 @@
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';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var __assign = function() {
37
- __assign = Object.assign || function __assign(t) {
38
- for (var s, i = 1, n = arguments.length; i < n; i++) {
39
- s = arguments[i];
40
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
- }
42
- return t;
43
- };
44
- return __assign.apply(this, arguments);
45
- };
46
-
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- }
58
-
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
- return c > 3 && r && Object.defineProperty(target, key, r), r;
64
- }
65
-
66
- function __param(paramIndex, decorator) {
67
- return function (target, key) { decorator(target, key, paramIndex); }
68
- }
69
-
70
- function __metadata(metadataKey, metadataValue) {
71
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
- }
73
-
74
- function __awaiter(thisArg, _arguments, P, generator) {
75
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
- return new (P || (P = Promise))(function (resolve, reject) {
77
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
- step((generator = generator.apply(thisArg, _arguments || [])).next());
81
- });
82
- }
83
-
84
- function __generator(thisArg, body) {
85
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
- function verb(n) { return function (v) { return step([n, v]); }; }
88
- function step(op) {
89
- if (f) throw new TypeError("Generator is already executing.");
90
- while (_) try {
91
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
92
- if (y = 0, t) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0: case 1: t = op; break;
95
- case 4: _.label++; return { value: op[1], done: false };
96
- case 5: _.label++; y = op[1]; op = [0]; continue;
97
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
- default:
99
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
- if (t[2]) _.ops.pop();
104
- _.trys.pop(); continue;
105
- }
106
- op = body.call(thisArg, _);
107
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
- }
110
- }
111
-
112
- function __createBinding(o, m, k, k2) {
113
- if (k2 === undefined) k2 = k;
114
- o[k2] = m[k];
115
- }
116
-
117
- function __exportStar(m, exports) {
118
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
119
- }
120
-
121
- function __values(o) {
122
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
123
- if (m) return m.call(o);
124
- if (o && typeof o.length === "number") return {
125
- next: function () {
126
- if (o && i >= o.length) o = void 0;
127
- return { value: o && o[i++], done: !o };
128
- }
129
- };
130
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
131
- }
132
-
133
- function __read(o, n) {
134
- var m = typeof Symbol === "function" && o[Symbol.iterator];
135
- if (!m) return o;
136
- var i = m.call(o), r, ar = [], e;
137
- try {
138
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
139
- }
140
- catch (error) { e = { error: error }; }
141
- finally {
142
- try {
143
- if (r && !r.done && (m = i["return"])) m.call(i);
144
- }
145
- finally { if (e) throw e.error; }
146
- }
147
- return ar;
148
- }
149
-
150
- function __spread() {
151
- for (var ar = [], i = 0; i < arguments.length; i++)
152
- ar = ar.concat(__read(arguments[i]));
153
- return ar;
154
- }
155
-
156
- function __spreadArrays() {
157
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
158
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
159
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
160
- r[k] = a[j];
161
- return r;
162
- };
163
-
164
- function __await(v) {
165
- return this instanceof __await ? (this.v = v, this) : new __await(v);
166
- }
167
-
168
- function __asyncGenerator(thisArg, _arguments, generator) {
169
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
170
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
171
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
172
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
173
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
174
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
175
- function fulfill(value) { resume("next", value); }
176
- function reject(value) { resume("throw", value); }
177
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
178
- }
179
-
180
- function __asyncDelegator(o) {
181
- var i, p;
182
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
183
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
184
- }
185
-
186
- function __asyncValues(o) {
187
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
188
- var m = o[Symbol.asyncIterator], i;
189
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
190
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
191
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
192
- }
193
-
194
- function __makeTemplateObject(cooked, raw) {
195
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
196
- return cooked;
197
- };
198
-
199
- function __importStar(mod) {
200
- if (mod && mod.__esModule) return mod;
201
- var result = {};
202
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
203
- result.default = mod;
204
- return result;
205
- }
206
-
207
- function __importDefault(mod) {
208
- return (mod && mod.__esModule) ? mod : { default: mod };
209
- }
210
-
211
- function __classPrivateFieldGet(receiver, privateMap) {
212
- if (!privateMap.has(receiver)) {
213
- throw new TypeError("attempted to get private field on non-instance");
214
- }
215
- return privateMap.get(receiver);
216
- }
217
-
218
- function __classPrivateFieldSet(receiver, privateMap, value) {
219
- if (!privateMap.has(receiver)) {
220
- throw new TypeError("attempted to set private field on non-instance");
221
- }
222
- privateMap.set(receiver, value);
223
- return value;
224
- }
225
-
226
- var EnumExclusionProcessStatus;
227
- (function (EnumExclusionProcessStatus) {
228
- EnumExclusionProcessStatus["PENDING"] = "PENDING";
229
- EnumExclusionProcessStatus["PROCESSING"] = "PROCESSING";
230
- EnumExclusionProcessStatus["ERROR"] = "ERROR";
231
- EnumExclusionProcessStatus["SUCCESS"] = "SUCCESS";
232
- })(EnumExclusionProcessStatus || (EnumExclusionProcessStatus = {}));
233
-
234
- var ProjectConfigsInjectionToken = new core.InjectionToken("projectConfigs");
235
-
236
- var LogicalDeleteConfigService = /** @class */ (function () {
237
- function LogicalDeleteConfigService(projectConfigs) {
238
- this.projectConfigs = projectConfigs;
239
- }
240
- LogicalDeleteConfigService.prototype.getDomain = function () {
241
- return this.projectConfigs.domain;
242
- };
243
- LogicalDeleteConfigService.prototype.getService = function () {
244
- return this.projectConfigs.service;
245
- };
246
- LogicalDeleteConfigService.prototype.getTranslationPrefix = function () {
247
- if (this.projectConfigs.translationPrefix) {
248
- return this.projectConfigs.translationPrefix;
249
- }
250
- return this.projectConfigs.domain + "." + this.projectConfigs.service;
251
- };
252
- LogicalDeleteConfigService.ctorParameters = function () { return [
253
- { type: undefined, decorators: [{ type: core.Inject, args: [ProjectConfigsInjectionToken,] }] }
254
- ]; };
255
- LogicalDeleteConfigService = __decorate([
256
- core.Injectable(),
257
- __param(0, core.Inject(ProjectConfigsInjectionToken))
258
- ], LogicalDeleteConfigService);
259
- return LogicalDeleteConfigService;
260
- }());
261
-
262
- var LogicalDeleteService = /** @class */ (function () {
263
- function LogicalDeleteService(http, messageService, translate, projectConfigs) {
264
- this.http = http;
265
- this.messageService = messageService;
266
- this.translate = translate;
267
- this.projectConfigs = projectConfigs;
268
- var entityUrl = projectConfigs.getDomain() + "/" + projectConfigs.getService();
269
- this.exclusionProcessUrl = entityUrl + "/entities/exclusionProcess";
270
- this.listExclusionsUrl = entityUrl + "/entities/exclusionProcess";
271
- this.defaultCatch = this.defaultCatch.bind(this);
272
- }
273
- LogicalDeleteService.prototype.defaultCatch = function () {
274
- var _this = this;
275
- return operators.catchError(function (err) {
276
- if (err) {
277
- 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 prefix = _this.projectConfigs.getTranslationPrefix();
281
- summary = _this.translate.instant(prefix + ".error_unauthorized_title");
282
- detail = _this.translate.instant(prefix + ".error_unauthorized_description");
283
- }
284
- _this.messageService.add({
285
- severity: "error",
286
- summary: summary,
287
- detail: detail
288
- });
289
- }
290
- return rxjs.throwError(err);
291
- });
292
- };
293
- 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;
295
- var params = new http.HttpParams();
296
- params = params.append("size", String(size));
297
- params = params.append("offset", String(page));
298
- if (sort && sort.length) {
299
- params = params.append("orderby", sort
300
- .map(function (s) {
301
- if (s.order === -1) {
302
- return s.field + " desc";
303
- }
304
- return s.field + " asc";
305
- })
306
- .join(", "));
307
- }
308
- if (filterQuery) {
309
- params = params.append("filter", filterQuery);
310
- }
311
- if (displayFields && displayFields.length) {
312
- params = params.append("displayfields", displayFields.join());
313
- }
314
- return params;
315
- };
316
- LogicalDeleteService.prototype.getProcessDetails = function (recordId) {
317
- var filterParams = {
318
- filter: "recordId eq '" + recordId + "'"
319
- };
320
- return this.http.get(this.exclusionProcessUrl, { params: filterParams })
321
- .pipe(this.defaultCatch())
322
- .pipe(operators.map(function (value) {
323
- var _a;
324
- if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
325
- return null;
326
- }
327
- return value.contents[0];
328
- }));
329
- };
330
- LogicalDeleteService.prototype.listExclusions = function (entityName, params) {
331
- if (params === void 0) { params = {}; }
332
- if (params.filterQuery) {
333
- params.filterQuery += " and lower(entityName) eq lower('" + entityName + "')";
334
- }
335
- else {
336
- params.filterQuery = "lower(entityName) eq lower('" + entityName + "')";
337
- }
338
- return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
339
- .pipe(this.defaultCatch())
340
- .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
- });
349
- return value;
350
- }));
351
- };
352
- LogicalDeleteService.ctorParameters = function () { return [
353
- { type: http.HttpClient },
354
- { type: api.MessageService },
355
- { type: core$1.TranslateService },
356
- { type: LogicalDeleteConfigService }
357
- ]; };
358
- LogicalDeleteService = __decorate([
359
- core.Injectable()
360
- ], LogicalDeleteService);
361
- return LogicalDeleteService;
362
- }());
363
-
364
- var ExclusionDetailsComponent = /** @class */ (function () {
365
- function ExclusionDetailsComponent(router, route, translate, logicalDeleteService, projectConfigs) {
366
- this.router = router;
367
- this.route = route;
368
- this.translate = translate;
369
- this.logicalDeleteService = logicalDeleteService;
370
- this.projectConfigs = projectConfigs;
371
- this._entityName = "";
372
- this._isVisible = false;
373
- this._isLoading = false;
374
- this._processSummaryData = [];
375
- this._processSummaryColumns = [];
376
- this.ngUnsubscribe = new rxjs.Subject();
377
- }
378
- Object.defineProperty(ExclusionDetailsComponent.prototype, "isVisible", {
379
- get: function () {
380
- return this._isVisible;
381
- },
382
- enumerable: true,
383
- configurable: true
384
- });
385
- Object.defineProperty(ExclusionDetailsComponent.prototype, "isLoading", {
386
- get: function () {
387
- return this._isLoading;
388
- },
389
- enumerable: true,
390
- configurable: true
391
- });
392
- Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryData", {
393
- get: function () {
394
- return this._processSummaryData;
395
- },
396
- enumerable: true,
397
- configurable: true
398
- });
399
- Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryColumns", {
400
- get: function () {
401
- return this._processSummaryColumns;
402
- },
403
- enumerable: true,
404
- configurable: true
405
- });
406
- ExclusionDetailsComponent.prototype.ngOnInit = function () {
407
- var _this = this;
408
- this.route.data
409
- .pipe(operators.takeUntil(this.ngUnsubscribe))
410
- .subscribe(function (data) {
411
- _this.locale = data.localeConfig;
412
- });
413
- this._processSummaryColumns = this.getSummaryColumns();
414
- };
415
- ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
416
- this.ngUnsubscribe.next();
417
- this.ngUnsubscribe.complete();
418
- };
419
- ExclusionDetailsComponent.prototype.showDetails = function (details) {
420
- this.processDetails = null;
421
- this._entityName = details.entityName;
422
- this._isVisible = true;
423
- this.entityDescription = details.entityDescription;
424
- this.loadProcessDetails(details.recordId);
425
- };
426
- ExclusionDetailsComponent.prototype.closeDetails = function () {
427
- this._isVisible = false;
428
- };
429
- ExclusionDetailsComponent.prototype.openExclusions = function () {
430
- this.closeDetails();
431
- this.router.navigate(["exclusions-list", this._entityName], {
432
- queryParams: {
433
- entityDescription: this.entityDescription
434
- }
435
- });
436
- };
437
- ExclusionDetailsComponent.prototype.getRecordDescription = function () {
438
- var _a;
439
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
440
- return "";
441
- }
442
- return this.processDetails.description;
443
- };
444
- ExclusionDetailsComponent.prototype.getInicialDate = function () {
445
- var _a;
446
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
447
- return "";
448
- }
449
- return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
450
- };
451
- ExclusionDetailsComponent.prototype.getFinishDate = function () {
452
- var _a;
453
- if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
454
- return "";
455
- }
456
- return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
457
- };
458
- ExclusionDetailsComponent.prototype.isFinished = function () {
459
- var _a;
460
- return !!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate);
461
- };
462
- ExclusionDetailsComponent.prototype.getShowExclusionsButtonLabel = function () {
463
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_show_deletions");
464
- };
465
- ExclusionDetailsComponent.prototype.getCloseButtonLabel = function () {
466
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_close");
467
- };
468
- ExclusionDetailsComponent.prototype.getSummaryLabel = function () {
469
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_summary");
470
- };
471
- ExclusionDetailsComponent.prototype.getStartDateLabel = function () {
472
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start");
473
- };
474
- ExclusionDetailsComponent.prototype.getFinishDateLabel = function () {
475
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish");
476
- };
477
- ExclusionDetailsComponent.prototype.getSidebarTitle = function () {
478
- return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_details_title");
479
- };
480
- ExclusionDetailsComponent.prototype.getSummaryColumns = function () {
481
- return [
482
- {
483
- field: "description",
484
- attributes: ["description"],
485
- header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description"),
486
- type: angularComponents.EnumColumnFieldType.STRING,
487
- style: {
488
- width: "300px"
489
- }
490
- },
491
- {
492
- field: "status",
493
- attributes: ["status"],
494
- header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
495
- type: angularComponents.EnumColumnFieldType.ENUM,
496
- enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
497
- style: {
498
- width: "100px"
499
- },
500
- tooltip: this.getColumnStatusTooltip,
501
- badgeConfigs: [
502
- {
503
- enumValue: EnumExclusionProcessStatus.ERROR,
504
- color: angularComponents.EnumBadgeColors.RED
505
- },
506
- {
507
- enumValue: EnumExclusionProcessStatus.PENDING,
508
- color: angularComponents.EnumBadgeColors.YELLOW
509
- },
510
- {
511
- enumValue: EnumExclusionProcessStatus.PROCESSING,
512
- color: angularComponents.EnumBadgeColors.BLUE
513
- },
514
- {
515
- enumValue: EnumExclusionProcessStatus.SUCCESS,
516
- color: angularComponents.EnumBadgeColors.GREEN
517
- }
518
- ]
519
- }
520
- ];
521
- };
522
- ExclusionDetailsComponent.prototype.getColumnStatusTooltip = function (rowValue) {
523
- if (rowValue.errorMessage) {
524
- return rowValue.errorMessage;
525
- }
526
- return null;
527
- };
528
- ExclusionDetailsComponent.prototype.loadProcessDetails = function (recordId) {
529
- var _this = this;
530
- this._isLoading = true;
531
- this.logicalDeleteService.getProcessDetails(recordId)
532
- .pipe(operators.takeUntil(this.ngUnsubscribe))
533
- .pipe(operators.finalize(function () { return _this._isLoading = false; }))
534
- .subscribe(function (process) {
535
- _this.processDetails = process;
536
- _this.loadProcessSummary(process);
537
- });
538
- };
539
- ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
540
- var stepLogs = [];
541
- process.groups.forEach(function (group) {
542
- var steps = group.steps.map(function (step) { return ({
543
- description: step.description,
544
- status: step.status,
545
- errorMessage: step.errorMessage
546
- }); });
547
- stepLogs.push.apply(stepLogs, __spread(steps));
548
- });
549
- this._processSummaryData = stepLogs;
550
- };
551
- ExclusionDetailsComponent.ctorParameters = function () { return [
552
- { type: router.Router },
553
- { type: router.ActivatedRoute },
554
- { type: core$1.TranslateService },
555
- { type: LogicalDeleteService },
556
- { type: LogicalDeleteConfigService }
557
- ]; };
558
- __decorate([
559
- core.Output()
560
- ], ExclusionDetailsComponent.prototype, "isVisible", null);
561
- __decorate([
562
- core.Output()
563
- ], ExclusionDetailsComponent.prototype, "isLoading", null);
564
- __decorate([
565
- core.Output()
566
- ], ExclusionDetailsComponent.prototype, "processSummaryData", null);
567
- __decorate([
568
- core.Output()
569
- ], ExclusionDetailsComponent.prototype, "processSummaryColumns", null);
570
- __decorate([
571
- core.Output()
572
- ], ExclusionDetailsComponent.prototype, "processDetails", void 0);
573
- __decorate([
574
- core.Output()
575
- ], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
576
- ExclusionDetailsComponent = __decorate([
577
- core.Component({
578
- 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",
580
- encapsulation: core.ViewEncapsulation.None,
581
- 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
- })
583
- ], ExclusionDetailsComponent);
584
- return ExclusionDetailsComponent;
585
- }());
586
-
587
- var ExclusionDetailsModule = /** @class */ (function () {
588
- function ExclusionDetailsModule() {
589
- }
590
- ExclusionDetailsModule = __decorate([
591
- core.NgModule({
592
- imports: [
593
- common.CommonModule,
594
- angularComponents.SidebarModule,
595
- angularComponents.ButtonModule,
596
- panel.PanelModule,
597
- table.TableModule,
598
- angularComponents.TableModule,
599
- angularComponents.LoadingStateModule,
600
- angularComponents.LocaleModule
601
- ],
602
- declarations: [ExclusionDetailsComponent],
603
- exports: [ExclusionDetailsComponent],
604
- entryComponents: [ExclusionDetailsComponent]
605
- })
606
- ], ExclusionDetailsModule);
607
- return ExclusionDetailsModule;
608
- }());
609
-
610
- var FilterService = /** @class */ (function () {
611
- function FilterService(logicalDeleteConfigService, translate) {
612
- this.logicalDeleteConfigService = logicalDeleteConfigService;
613
- this.translate = translate;
614
- this.numberTypes = [angularComponents.FieldType.Integer, angularComponents.FieldType.Double];
615
- }
616
- FilterService.prototype.getEnumQuery = function (name, value, multiple) {
617
- if (multiple === void 0) { multiple = false; }
618
- if (multiple) {
619
- var filter = value.map(function (selected) { return name + " eq '" + selected + "'"; }).join(" or ");
620
- return "(" + filter + ")";
621
- }
622
- return name + " eq '" + value + "'";
623
- };
624
- FilterService.prototype.createFilterString = function (formField, value) {
625
- var name = formField.name, type = formField.type, multiple = formField.multiple;
626
- if (typeof value == "number") {
627
- return name + " eq " + value;
628
- }
629
- switch (type) {
630
- case angularComponents.FieldType.Date:
631
- return name + " eq '" + moment(value).format("YYYY-MM-DD") + "'";
632
- case angularComponents.FieldType.Time:
633
- return name + " eq '" + moment(value).format("HH:mm:ss") + "'";
634
- case angularComponents.FieldType.DateTime:
635
- return name + " eq '" + moment(value).format() + "'";
636
- case angularComponents.FieldType.LocalDateTime:
637
- return name + " eq '" + moment(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS") + "'";
638
- case angularComponents.FieldType.Enum:
639
- return this.getEnumQuery(name, value, multiple);
640
- case angularComponents.FieldType.String:
641
- return "containing(upper(" + name + "), upper('" + value.replace(/'/g, "'") + "'))";
642
- case angularComponents.FieldType.Lookup:
643
- return name + " eq '" + value.id + "'";
644
- default:
645
- return name + " eq '" + value + "'";
646
- }
647
- };
648
- FilterService.prototype.createFilterTokens = function (formField, value) {
649
- var _this = this;
650
- var _a = formField, name = _a.name, type = _a.type, label = _a.label, searchFields = _a.searchFields, options = _a.options;
651
- var labelValue = value;
652
- switch (type) {
653
- case angularComponents.FieldType.Date:
654
- labelValue = moment(value).format("L");
655
- break;
656
- case angularComponents.FieldType.Time:
657
- labelValue = moment(value).format("LTS");
658
- break;
659
- case angularComponents.FieldType.LocalDateTime:
660
- case angularComponents.FieldType.DateTime:
661
- labelValue = moment(value).format("L LTS");
662
- break;
663
- case angularComponents.FieldType.Lookup:
664
- labelValue = searchFields.map(function (field) { return _this.getProp(value, field.name); }).join(" - ");
665
- break;
666
- case angularComponents.FieldType.Enum:
667
- if (Array.isArray(value)) {
668
- labelValue = value.map(function (element) {
669
- return options.filter(function (en) { return en.value === element; })[0].label;
670
- });
671
- }
672
- else {
673
- labelValue = options.filter(function (option) { return option.value === labelValue; })[0].label;
674
- }
675
- break;
676
- case angularComponents.FieldType.Boolean:
677
- labelValue = value
678
- ? this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_true")
679
- : this.translate.instant(this.logicalDeleteConfigService.getTranslationPrefix() + ".list_grid_boolean_false");
680
- break;
681
- }
682
- return { id: name, label: label + ": " + labelValue };
683
- };
684
- FilterService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
685
- var _this = this;
686
- return displayFields.map(function (field) { return _this.getProp(value, ownerEntity + "." + field); })
687
- .reduce(function (acc, val) { return "" + acc + separator + val; }) + "";
688
- };
689
- FilterService.prototype.getProp = function (obj, path) {
690
- return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
691
- };
692
- FilterService.prototype.getLabelValueRequest = function (contents, displayFields) {
693
- var _this = this;
694
- return contents.map(function (item) { return (__assign(__assign({}, item), { label: displayFields.map(function (field) { return _this.getProp(item, field); }).join(" - ") })); });
695
- };
696
- FilterService.prototype.isValidFilter = function (type, value) {
697
- var isTypeNumber = this.numberTypes.includes(type);
698
- var numberPattern = /^\d+\b$/;
699
- var isNumber = value.match(numberPattern);
700
- return !(isTypeNumber && !isNumber);
701
- };
702
- FilterService.ctorParameters = function () { return [
703
- { type: LogicalDeleteConfigService },
704
- { type: core$1.TranslateService }
705
- ]; };
706
- FilterService = __decorate([
707
- core.Injectable()
708
- ], FilterService);
709
- return FilterService;
710
- }());
711
-
712
- var LogicalDeleteModule = /** @class */ (function () {
713
- function LogicalDeleteModule() {
714
- }
715
- LogicalDeleteModule_1 = LogicalDeleteModule;
716
- LogicalDeleteModule.forRoot = function (config) {
717
- return {
718
- ngModule: LogicalDeleteModule_1,
719
- providers: [
720
- {
721
- provide: ProjectConfigsInjectionToken,
722
- useValue: config
723
- }
724
- ]
725
- };
726
- };
727
- var LogicalDeleteModule_1;
728
- LogicalDeleteModule = LogicalDeleteModule_1 = __decorate([
729
- core.NgModule({
730
- providers: [LogicalDeleteService, LogicalDeleteConfigService, FilterService]
731
- })
732
- ], LogicalDeleteModule);
733
- return LogicalDeleteModule;
734
- }());
735
-
736
- exports.ExclusionDetailsComponent = ExclusionDetailsComponent;
737
- exports.ExclusionDetailsModule = ExclusionDetailsModule;
738
- exports.LogicalDeleteModule = LogicalDeleteModule;
739
- exports.ɵa = LogicalDeleteService;
740
- exports.ɵb = LogicalDeleteConfigService;
741
- exports.ɵc = ProjectConfigsInjectionToken;
742
- exports.ɵe = FilterService;
743
-
744
- Object.defineProperty(exports, '__esModule', { value: true });
745
-
746
- })));
747
- //# sourceMappingURL=seniorsistemas-exclusion-process-component.umd.js.map