dts-backoffice-util 4.0.0 → 6.0.1

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 (59) hide show
  1. package/README.md +1 -1
  2. package/dts-backoffice-util.d.ts +1 -0
  3. package/{esm2015/dts-backoffice-util.js → esm2020/dts-backoffice-util.mjs} +0 -0
  4. package/esm2020/lib/components/totvs-schedule-execution/totvs-schedule-execution.component.mjs +269 -0
  5. package/{esm2015/lib/components/totvs-schedule-execution/totvs-schedule-execution.model.js → esm2020/lib/components/totvs-schedule-execution/totvs-schedule-execution.model.mjs} +0 -0
  6. package/esm2020/lib/components/totvs-schedule-execution/totvs-schedule-execution.service.mjs +183 -0
  7. package/esm2020/lib/dts-backoffice-util.module.mjs +56 -0
  8. package/{esm2015/lib/interfaces/filter-range.interface.js → esm2020/lib/interfaces/filter-range.interface.mjs} +0 -0
  9. package/{esm2015/lib/interfaces/totvs-response.interface.js → esm2020/lib/interfaces/totvs-response.interface.mjs} +0 -0
  10. package/{esm2015/lib/model/session-info.model.js → esm2020/lib/model/session-info.model.mjs} +0 -0
  11. package/esm2020/lib/pipes/dts-date-format.pipe.mjs +20 -0
  12. package/esm2020/lib/services/breadcrumb-control.service.mjs +82 -0
  13. package/esm2020/lib/services/cache-params.service.mjs +25 -0
  14. package/esm2020/lib/services/menu-datasul.service.mjs +41 -0
  15. package/esm2020/lib/services/profile.service.mjs +55 -0
  16. package/esm2020/lib/services/report.service.mjs +57 -0
  17. package/esm2020/lib/services/session-info.service.mjs +36 -0
  18. package/esm2020/lib/services/translate.service.mjs +23 -0
  19. package/{esm2015/lib/utils/date.util.js → esm2020/lib/utils/date.util.mjs} +0 -0
  20. package/{esm2015/lib/utils/disclaimer.util.js → esm2020/lib/utils/disclaimer.util.mjs} +0 -0
  21. package/{esm2015/lib/utils/field-validation.util.js → esm2020/lib/utils/field-validation.util.mjs} +0 -0
  22. package/esm2020/lib/utils/file.util.mjs +129 -0
  23. package/{esm2015/lib/utils/filter-range.util.js → esm2020/lib/utils/filter-range.util.mjs} +0 -0
  24. package/{esm2015/lib/utils/generic-functions.utils.js → esm2020/lib/utils/generic-functions.utils.mjs} +0 -0
  25. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  26. package/fesm2015/{dts-backoffice-util.js → dts-backoffice-util.mjs} +131 -111
  27. package/fesm2015/dts-backoffice-util.mjs.map +1 -0
  28. package/fesm2020/dts-backoffice-util.mjs +1851 -0
  29. package/fesm2020/dts-backoffice-util.mjs.map +1 -0
  30. package/lib/components/totvs-schedule-execution/totvs-schedule-execution.component.d.ts +3 -0
  31. package/lib/components/totvs-schedule-execution/totvs-schedule-execution.service.d.ts +3 -0
  32. package/lib/dts-backoffice-util.module.d.ts +10 -0
  33. package/lib/pipes/dts-date-format.pipe.d.ts +3 -0
  34. package/lib/services/breadcrumb-control.service.d.ts +3 -0
  35. package/lib/services/cache-params.service.d.ts +3 -0
  36. package/lib/services/menu-datasul.service.d.ts +3 -0
  37. package/lib/services/profile.service.d.ts +3 -0
  38. package/lib/services/report.service.d.ts +3 -0
  39. package/lib/services/session-info.service.d.ts +3 -0
  40. package/lib/services/translate.service.d.ts +3 -0
  41. package/package.json +22 -10
  42. package/bundles/dts-backoffice-util.umd.js +0 -1935
  43. package/bundles/dts-backoffice-util.umd.js.map +0 -1
  44. package/bundles/dts-backoffice-util.umd.min.js +0 -2
  45. package/bundles/dts-backoffice-util.umd.min.js.map +0 -1
  46. package/dts-backoffice-util.metadata.json +0 -1
  47. package/esm2015/lib/components/totvs-schedule-execution/totvs-schedule-execution.component.js +0 -266
  48. package/esm2015/lib/components/totvs-schedule-execution/totvs-schedule-execution.service.js +0 -183
  49. package/esm2015/lib/dts-backoffice-util.module.js +0 -39
  50. package/esm2015/lib/pipes/dts-date-format.pipe.js +0 -16
  51. package/esm2015/lib/services/breadcrumb-control.service.js +0 -81
  52. package/esm2015/lib/services/cache-params.service.js +0 -25
  53. package/esm2015/lib/services/menu-datasul.service.js +0 -40
  54. package/esm2015/lib/services/profile.service.js +0 -58
  55. package/esm2015/lib/services/report.service.js +0 -58
  56. package/esm2015/lib/services/session-info.service.js +0 -39
  57. package/esm2015/lib/services/translate.service.js +0 -20
  58. package/esm2015/lib/utils/file.util.js +0 -128
  59. package/fesm2015/dts-backoffice-util.js.map +0 -1
@@ -1,1935 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@po-ui/ng-components'), require('@angular/forms'), require('@angular/common')) :
3
- typeof define === 'function' && define.amd ? define('dts-backoffice-util', ['exports', '@angular/core', '@angular/common/http', 'rxjs', 'rxjs/operators', '@po-ui/ng-components', '@angular/forms', '@angular/common'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['dts-backoffice-util'] = {}, global.ng.core, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ngComponents, global.ng.forms, global.ng.common));
5
- }(this, (function (exports, i0, i1, rxjs, operators, ngComponents, forms, common) { 'use strict';
6
-
7
- var UserLoginService = /** @class */ (function () {
8
- function UserLoginService(http) {
9
- this.http = http;
10
- this.apiUrl = '/totvs-menu/rest/getSessionInfo';
11
- this.userLogin = undefined;
12
- }
13
- UserLoginService.prototype.getUserLogin = function () {
14
- var _this = this;
15
- if (localStorage.getItem('username')) {
16
- return rxjs.of(localStorage.getItem('username'));
17
- }
18
- if (this.userLogin) {
19
- return rxjs.of(this.userLogin);
20
- }
21
- else {
22
- return this.http.get("" + this.apiUrl)
23
- .pipe(operators.map(function (response) {
24
- _this.userLogin = response.userName;
25
- return response.userName;
26
- }));
27
- }
28
- };
29
- return UserLoginService;
30
- }());
31
- /** @nocollapse */ UserLoginService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UserLoginService_Factory() { return new UserLoginService(i0.ɵɵinject(i1.HttpClient)); }, token: UserLoginService, providedIn: "root" });
32
- UserLoginService.decorators = [
33
- { type: i0.Injectable, args: [{
34
- providedIn: 'root'
35
- },] }
36
- ];
37
- /** @nocollapse */
38
- UserLoginService.ctorParameters = function () { return [
39
- { type: i1.HttpClient }
40
- ]; };
41
-
42
- var EDataType;
43
- (function (EDataType) {
44
- EDataType[EDataType["STRING"] = 1] = "STRING";
45
- EDataType[EDataType["JSON"] = 2] = "JSON";
46
- })(EDataType || (EDataType = {}));
47
- var ProfileService = /** @class */ (function () {
48
- function ProfileService(http) {
49
- this.http = http;
50
- this.apiURL = '/dts/datasul-rest/resources/api/btb/btapi930za';
51
- }
52
- ProfileService.prototype.setProfile = function (profile) {
53
- var headers = { 'X-PO-Screen-Lock': 'true' };
54
- var pageId = profile.pageId, userCode = profile.userCode;
55
- return this.http
56
- .post(this.apiURL + "/setProfile?userCode=" + userCode + "&pageId=" + pageId, profile, { headers: headers });
57
- };
58
- ProfileService.prototype.getProfileAsString = function (profile, showLoading) {
59
- return this.getProfile(profile, EDataType.STRING, showLoading ? 'true' : 'false');
60
- };
61
- ProfileService.prototype.getProfileAsJSON = function (profile, showLoading) {
62
- return this.getProfile(profile, EDataType.JSON, showLoading ? 'true' : 'false');
63
- };
64
- ProfileService.prototype.getProfile = function (profile, dataType, showLoading) {
65
- var headers = { 'X-PO-Screen-Lock': showLoading };
66
- var pageId = profile.pageId, dataCode = profile.dataCode, userCode = profile.userCode;
67
- return this.http
68
- .get(this.apiURL + "/getProfile?userCode=" + userCode + "&pageId=" + pageId + "&dataCode=" + dataCode, { headers: headers })
69
- .pipe(operators.map(function (preference) {
70
- if (preference.data[0]) {
71
- if (dataType === EDataType.STRING) {
72
- return preference.data[0].dataValue;
73
- }
74
- if (dataType === EDataType.JSON) {
75
- return JSON.parse(preference.data[0].dataValue);
76
- }
77
- }
78
- else {
79
- return undefined;
80
- }
81
- }));
82
- };
83
- return ProfileService;
84
- }());
85
- /** @nocollapse */ ProfileService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ProfileService_Factory() { return new ProfileService(i0.ɵɵinject(i1.HttpClient)); }, token: ProfileService, providedIn: "root" });
86
- ProfileService.decorators = [
87
- { type: i0.Injectable, args: [{
88
- providedIn: 'root'
89
- },] }
90
- ];
91
- /** @nocollapse */
92
- ProfileService.ctorParameters = function () { return [
93
- { type: i1.HttpClient }
94
- ]; };
95
-
96
- (function (ReportFormats) {
97
- ReportFormats["XLSX"] = "xlsx";
98
- ReportFormats["PDF"] = "pdf";
99
- ReportFormats["DOCX"] = "docx";
100
- ReportFormats["HTML"] = "html";
101
- })(exports.ReportFormats || (exports.ReportFormats = {}));
102
- var ReportService = /** @class */ (function () {
103
- function ReportService(httpClient) {
104
- this.httpClient = httpClient;
105
- this.URL = window.location.href.indexOf('totvs-menu') > 0 ? '/totvs-menu/rest/report/run/'
106
- : '/dts/datasul-report/resources/run/';
107
- }
108
- ReportService.prototype.generate = function (params, showLoading) {
109
- var _this = this;
110
- if (showLoading === void 0) { showLoading = true; }
111
- var headers = { 'X-PO-Screen-Lock': showLoading ? 'true' : 'false' };
112
- var reportURL = "" + this.URL + params.reportName;
113
- if (params.properties.length > 0) {
114
- reportURL += '?';
115
- params.properties.forEach(function (property, index) {
116
- if (index > 0) {
117
- reportURL += '&';
118
- }
119
- reportURL += "c_properties=" + property.name + "&c_values=" + property.value;
120
- });
121
- }
122
- reportURL += "&dialect=" + params.dialect + "&format=" + params.format;
123
- reportURL += "&program=" + params.programName + "&resultFileName=" + params.downloadName;
124
- return this.httpClient.post(reportURL, {}, { headers: headers, responseType: 'blob' })
125
- .pipe(operators.map(function (report) {
126
- if (params.download) {
127
- _this.download(report, params.downloadName + "." + params.format);
128
- }
129
- return report;
130
- }));
131
- };
132
- ReportService.prototype.download = function (file, fileName) {
133
- var binaryData = [file];
134
- var downloadLink = document.createElement('a');
135
- var urlDownload = window.URL.createObjectURL(new Blob(binaryData, { type: file.type }));
136
- downloadLink.href = urlDownload;
137
- downloadLink.setAttribute('download', fileName);
138
- document.body.appendChild(downloadLink);
139
- downloadLink.click();
140
- window.URL.revokeObjectURL(urlDownload);
141
- downloadLink.remove();
142
- };
143
- return ReportService;
144
- }());
145
- ReportService.decorators = [
146
- { type: i0.Injectable }
147
- ];
148
- /** @nocollapse */
149
- ReportService.ctorParameters = function () { return [
150
- { type: i1.HttpClient }
151
- ]; };
152
-
153
- /*
154
- Versão: 1.003
155
- Data Criação: 06/08/2018
156
- */
157
- var BreadcrumbControlService = /** @class */ (function () {
158
- function BreadcrumbControlService() {
159
- }
160
- BreadcrumbControlService.prototype.newBreadcrumb = function () {
161
- this.breadcrumb = { items: [] };
162
- };
163
- BreadcrumbControlService.prototype.addBreadcrumb = function (literal, activatedRoute) {
164
- this.addBreadcrumbURL(literal, decodeURIComponent(activatedRoute.snapshot['_routerState'].url));
165
- };
166
- BreadcrumbControlService.prototype.addBreadcrumbURL = function (literal, url) {
167
- if (!literal || literal === '') {
168
- return;
169
- }
170
- if (!this.breadcrumb) {
171
- this.newBreadcrumb();
172
- }
173
- var breadcrumbAux = { items: [] };
174
- var idx = 0;
175
- for (idx = 0; idx < this.breadcrumb.items.length; idx++) {
176
- if (this.breadcrumb.items[idx].label !== literal) {
177
- breadcrumbAux.items.push(this.breadcrumb.items[idx]);
178
- }
179
- else {
180
- break;
181
- }
182
- }
183
- breadcrumbAux.items.push({ label: literal, link: url });
184
- this.breadcrumb = breadcrumbAux;
185
- };
186
- BreadcrumbControlService.prototype.updBreadcrumbURL = function (literal, valueOld, valueNew) {
187
- var currentRouterURL = this.getCurrentRouter();
188
- if (!currentRouterURL) {
189
- return;
190
- }
191
- if (!valueOld) {
192
- return;
193
- }
194
- if (!valueNew) {
195
- return;
196
- }
197
- currentRouterURL = currentRouterURL.replace(valueOld, valueNew);
198
- this.addBreadcrumbURL(literal, currentRouterURL);
199
- };
200
- BreadcrumbControlService.prototype.getBreadcrumb = function () {
201
- if (!this.breadcrumb) {
202
- this.newBreadcrumb();
203
- }
204
- return this.breadcrumb;
205
- };
206
- BreadcrumbControlService.prototype.getCurrentRouter = function () {
207
- if (!this.breadcrumb) {
208
- this.newBreadcrumb();
209
- }
210
- if (this.breadcrumb.items.length <= 0) {
211
- return '';
212
- }
213
- return this.breadcrumb.items[this.breadcrumb.items.length - 1].link;
214
- };
215
- BreadcrumbControlService.prototype.getPrevRouter = function () {
216
- if (!this.breadcrumb) {
217
- this.newBreadcrumb();
218
- }
219
- if (this.breadcrumb.items.length <= 1) {
220
- return '';
221
- }
222
- return this.breadcrumb.items[this.breadcrumb.items.length - 2].link;
223
- };
224
- BreadcrumbControlService.prototype.hasPreviousRouter = function () {
225
- return this.breadcrumb.items.length > 1;
226
- };
227
- return BreadcrumbControlService;
228
- }());
229
- BreadcrumbControlService.decorators = [
230
- { type: i0.Injectable }
231
- ];
232
- /** @nocollapse */
233
- BreadcrumbControlService.ctorParameters = function () { return []; };
234
-
235
- var MenuDatasulService = /** @class */ (function () {
236
- function MenuDatasulService() {
237
- }
238
- /**
239
- * var program = {};
240
- * program['prg'] = "cd0210";
241
- * program['params'] = '01|123456'
242
- */
243
- MenuDatasulService.prototype.callProgress = function (program) {
244
- parent.postMessage({ program: program }, '*');
245
- };
246
- /**
247
- * var notification = {};
248
- * notification['type'] = 'success';
249
- * notification['title'] = 'Notification Title'
250
- * notification['detail'] = 'Notification Detail'
251
- */
252
- MenuDatasulService.prototype.sendNotification = function (notification) {
253
- parent.postMessage({ notification: notification }, '*');
254
- };
255
- MenuDatasulService.prototype.openPath = function (programName, params, parent) {
256
- if (parent === void 0) { parent = true; }
257
- var datasulPath = document.referrer.indexOf('totvs-menu') > 0 ? 'totvs-menu' : 'menu-html';
258
- var baseUrl = "/" + datasulPath + "/#/" + datasulPath + "/program-html/" + programName + "/#";
259
- if (params) {
260
- baseUrl = baseUrl + "/" + params;
261
- }
262
- if (parent) {
263
- window.open(baseUrl, '_parent');
264
- }
265
- else {
266
- window.open(baseUrl);
267
- }
268
- };
269
- return MenuDatasulService;
270
- }());
271
- MenuDatasulService.decorators = [
272
- { type: i0.Injectable }
273
- ];
274
- /** @nocollapse */
275
- MenuDatasulService.ctorParameters = function () { return []; };
276
-
277
- var CacheParamsService = /** @class */ (function () {
278
- function CacheParamsService() {
279
- this.values = {};
280
- }
281
- CacheParamsService.prototype.setValue = function (key, value) {
282
- this.values[key] = value;
283
- };
284
- CacheParamsService.prototype.getValue = function (key) {
285
- return this.values[key];
286
- };
287
- CacheParamsService.prototype.removeValue = function (key) {
288
- delete this.values[key];
289
- };
290
- return CacheParamsService;
291
- }());
292
- /** @nocollapse */ CacheParamsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function CacheParamsService_Factory() { return new CacheParamsService(); }, token: CacheParamsService, providedIn: "root" });
293
- CacheParamsService.decorators = [
294
- { type: i0.Injectable, args: [{
295
- providedIn: 'root'
296
- },] }
297
- ];
298
- /** @nocollapse */
299
- CacheParamsService.ctorParameters = function () { return []; };
300
-
301
- var TranslateService = /** @class */ (function () {
302
- function TranslateService() {
303
- }
304
- TranslateService.getSuportLanguage = function () {
305
- return ['pt-BR', 'pt', 'en-US', 'en', 'es'];
306
- };
307
- TranslateService.getDefaultCurrencyCode = function () {
308
- return '$';
309
- };
310
- TranslateService.getCurrentLanguage = function () {
311
- var locale = localStorage.getItem('user.language') || navigator.language;
312
- if (locale && this.getSuportLanguage().includes(locale)) {
313
- return locale;
314
- }
315
- return 'en-US';
316
- };
317
- return TranslateService;
318
- }());
319
- TranslateService.decorators = [
320
- { type: i0.Injectable }
321
- ];
322
-
323
- /*
324
- Versão: 1.000
325
- Data Criação: 18/04/2019
326
- */
327
- var DateUtil = /** @class */ (function () {
328
- function DateUtil() {
329
- }
330
- /* Transforma data para o padrão YYYY-MM-DD */
331
- DateUtil.dateToQueryParam = function (date) {
332
- var iDay = date.getDate();
333
- var iMonth = date.getMonth() + 1;
334
- var iYear = date.getFullYear();
335
- return iYear + "-" + this.pad(iMonth) + "-" + this.pad(iDay);
336
- };
337
- /* Transforma data no padrão YYYY-MM-DD para DATE */
338
- DateUtil.queryParamToDate = function (param) {
339
- var iDay = +param.split('-')[2];
340
- var iMonth = +param.split('-')[1];
341
- var iYear = +param.split('-')[0];
342
- return new Date(iYear, iMonth - 1, iDay);
343
- };
344
- /* Valida se foi informado uma data válida */
345
- DateUtil.isValidDate = function (date) {
346
- return date instanceof Date && !isNaN(date.getTime());
347
- };
348
- /* Ajusta a data retornando o padrão DATE */
349
- DateUtil.ajustDate = function (param) {
350
- if (param instanceof Date) {
351
- return param;
352
- }
353
- if (!param) {
354
- return param;
355
- }
356
- return this.queryParamToDate(param.split('T')[0]);
357
- };
358
- /* Ajusta a data para o padrão DATE - utilizada nos construtores dos modelos */
359
- DateUtil.ajustDateToModel = function (values, fieldName) {
360
- if (values === void 0) { values = {}; }
361
- if (values.hasOwnProperty(fieldName) && (values[fieldName])) {
362
- if (values[fieldName].indexOf('T') >= 0) {
363
- return new Date(values[fieldName]);
364
- }
365
- var iDay = +values[fieldName].split('-')[2];
366
- var iMonth = +values[fieldName].split('-')[1];
367
- var iYear = +values[fieldName].split('-')[0];
368
- return new Date(iYear, iMonth - 1, iDay);
369
- }
370
- return null;
371
- };
372
- /* Adicona zero a esquerda do número */
373
- DateUtil.pad = function (number) {
374
- if (number < 10) {
375
- return '0' + number;
376
- }
377
- return number;
378
- };
379
- return DateUtil;
380
- }());
381
-
382
- /*
383
- Versão: 1.009
384
- Data Criação: 06/08/2018
385
- */
386
- var DisclaimerUtil = /** @class */ (function () {
387
- function DisclaimerUtil(poNotification, poI18nPipe, literals) {
388
- this.literals = {};
389
- this.poNotification = poNotification;
390
- this.poI18nPipe = poI18nPipe;
391
- this.literals = literals;
392
- }
393
- DisclaimerUtil.prototype.makeDisclaimer = function (property, value, hideClose, tradValue, vldBlank) {
394
- if (hideClose === void 0) { hideClose = false; }
395
- if (tradValue === void 0) { tradValue = false; }
396
- if (vldBlank === void 0) { vldBlank = false; }
397
- if (value === null || value === undefined) {
398
- return { label: '', property: '', value: '' };
399
- }
400
- if (vldBlank && value === '') {
401
- return { label: '', property: '', value: '' };
402
- }
403
- return {
404
- hideClose: hideClose,
405
- label: this.literals[property] + ": " + (tradValue ? this.literals[value] : value),
406
- property: "" + property,
407
- value: "" + value
408
- };
409
- };
410
- DisclaimerUtil.prototype.makeDisclaimerFromNumber = function (property, value, hideClose, vldBlank) {
411
- if (hideClose === void 0) { hideClose = false; }
412
- if (vldBlank === void 0) { vldBlank = false; }
413
- if (value === null || value === undefined) {
414
- return { label: '', property: '', value: '' };
415
- }
416
- if (vldBlank && value === 0) {
417
- return { label: '', property: '', value: '' };
418
- }
419
- return {
420
- hideClose: hideClose,
421
- label: this.literals[property] + ": " + value,
422
- property: "" + property,
423
- value: "" + value
424
- };
425
- };
426
- DisclaimerUtil.prototype.makeDisclaimerFromBoolean = function (property, value, hideClose) {
427
- if (hideClose === void 0) { hideClose = false; }
428
- if (value === null || value === undefined) {
429
- return { label: '', property: '', value: '' };
430
- }
431
- return {
432
- hideClose: hideClose,
433
- label: this.literals[property] + ": " + (value ? this.literals['yes'] : this.literals['no']),
434
- property: "" + property,
435
- value: "" + value
436
- };
437
- };
438
- DisclaimerUtil.prototype.makeDisclaimerFromDate = function (property, value, hideClose) {
439
- if (hideClose === void 0) { hideClose = false; }
440
- var dDate = this.ajustDate(value);
441
- if (!this.isValidDate(dDate)) {
442
- return { label: '', property: '', value: '' };
443
- }
444
- return {
445
- hideClose: hideClose,
446
- label: this.literals[property] + ": " + dDate.toLocaleDateString(),
447
- property: "" + property,
448
- value: "" + this.dateToQueryParam(dDate)
449
- };
450
- };
451
- DisclaimerUtil.prototype.makeDisclaimerFromMultiSelect = function (property, value, length, hideClose, tradValue) {
452
- var _this = this;
453
- if (length === void 0) { length = 0; }
454
- if (hideClose === void 0) { hideClose = false; }
455
- if (tradValue === void 0) { tradValue = false; }
456
- var lstLabels = '';
457
- var lstValues = '';
458
- if (!value) {
459
- return { label: '', property: '', value: '' };
460
- }
461
- if (value.length === 0 || (length > 0 && value.length === length)) {
462
- lstLabels = this.literals['all'];
463
- lstValues = 'all';
464
- }
465
- else {
466
- value.map(function (item) {
467
- if (lstLabels !== '') {
468
- lstLabels = lstLabels + ", ";
469
- }
470
- if (lstValues !== '') {
471
- lstValues = lstValues + ",";
472
- }
473
- lstLabels = "" + lstLabels + (tradValue ? _this.literals[item] : item);
474
- lstValues = "" + lstValues + item;
475
- });
476
- }
477
- return {
478
- hideClose: hideClose,
479
- label: this.literals[property] + ": " + lstLabels,
480
- property: "" + property,
481
- value: "" + lstValues
482
- };
483
- };
484
- DisclaimerUtil.prototype.makeDisclaimerFromMultiSelectNumber = function (property, value, options, length, hideClose) {
485
- if (length === void 0) { length = 0; }
486
- if (hideClose === void 0) { hideClose = false; }
487
- var lstLabels = '';
488
- var lstValues = '';
489
- var opt = null;
490
- if (!value || !options) {
491
- return { label: '', property: '', value: '' };
492
- }
493
- if (value.length === 0 || (length > 0 && value.length === length)) {
494
- lstLabels = this.literals['all'];
495
- lstValues = 'all';
496
- }
497
- else {
498
- value.map(function (item) {
499
- if (lstLabels !== '') {
500
- lstLabels = lstLabels + ", ";
501
- }
502
- if (lstValues !== '') {
503
- lstValues = lstValues + ",";
504
- }
505
- opt = options.find(function (itOpt) { return itOpt.value === item; });
506
- lstLabels = "" + lstLabels + (opt ? opt.label : item);
507
- lstValues = "" + lstValues + item;
508
- });
509
- }
510
- return {
511
- hideClose: hideClose,
512
- label: this.literals[property] + ": " + lstLabels,
513
- property: "" + property,
514
- value: "" + lstValues
515
- };
516
- };
517
- DisclaimerUtil.prototype.makeDisclaimerFromCheckboxGroup = function (property, value, length, hideClose) {
518
- var _this = this;
519
- if (length === void 0) { length = 0; }
520
- if (hideClose === void 0) { hideClose = false; }
521
- var lstLabels = '';
522
- var lstValues = '';
523
- if (!value) {
524
- return { label: '', property: '', value: '' };
525
- }
526
- if (value.length === 0) {
527
- lstLabels = this.literals['none'];
528
- lstValues = 'none';
529
- }
530
- else if (length > 0 && value.length === length) {
531
- lstLabels = this.literals['all'];
532
- lstValues = 'all';
533
- }
534
- else {
535
- value.map(function (checkParam) {
536
- if (lstLabels !== '') {
537
- lstLabels = lstLabels + ", ";
538
- }
539
- if (lstValues !== '') {
540
- lstValues = lstValues + ",";
541
- }
542
- lstLabels = "" + lstLabels + _this.literals[checkParam];
543
- lstValues = "" + lstValues + checkParam;
544
- });
545
- }
546
- return {
547
- hideClose: hideClose,
548
- label: this.literals[property] + ": " + lstLabels,
549
- property: "" + property,
550
- value: "" + lstValues
551
- };
552
- };
553
- DisclaimerUtil.prototype.makeDisclaimerFromRangeCharacter = function (property, value, hideClose, validateEqual) {
554
- if (hideClose === void 0) { hideClose = false; }
555
- if (validateEqual === void 0) { validateEqual = true; }
556
- if (value.valInitial === null || value.valInitial === undefined) {
557
- value.valInitial = value.iniInitial;
558
- }
559
- if (value.valFinal === null || value.valFinal === undefined) {
560
- value.valFinal = value.iniFinal;
561
- }
562
- if (validateEqual &&
563
- value.iniInitial === value.valInitial &&
564
- value.iniFinal === value.valFinal) {
565
- return { label: '', property: '', value: '' };
566
- }
567
- return {
568
- hideClose: hideClose,
569
- label: this.poI18nPipe.transform(this.literals['filterRange'], [this.literals[property], "'" + value.valInitial + "'", "'" + value.valFinal + "'"]),
570
- property: "" + property,
571
- value: value.valInitial + ";" + value.valFinal
572
- };
573
- };
574
- DisclaimerUtil.prototype.makeDisclaimerFromRangeNumber = function (property, value, hideClose, validateEqual) {
575
- if (hideClose === void 0) { hideClose = false; }
576
- if (validateEqual === void 0) { validateEqual = true; }
577
- if (value.valInitial === null || value.valInitial === undefined) {
578
- value.valInitial = value.iniInitial;
579
- }
580
- if (value.valFinal === null || value.valFinal === undefined) {
581
- value.valFinal = value.iniFinal;
582
- }
583
- if (validateEqual &&
584
- value.iniInitial === value.valInitial &&
585
- value.iniFinal === value.valFinal) {
586
- return { label: '', property: '', value: '' };
587
- }
588
- return {
589
- hideClose: hideClose,
590
- label: this.poI18nPipe.transform(this.literals['filterRange'], [this.literals[property], value.valInitial, value.valFinal]),
591
- property: "" + property,
592
- value: value.valInitial + ";" + value.valFinal
593
- };
594
- };
595
- DisclaimerUtil.prototype.makeDisclaimerFromRangeDate = function (property, value, hideClose, validateEqual) {
596
- if (hideClose === void 0) { hideClose = false; }
597
- if (validateEqual === void 0) { validateEqual = true; }
598
- var valInitDate = this.ajustDate(value.valInitial);
599
- var valFinalDate = this.ajustDate(value.valFinal);
600
- if (!this.isValidDate(valInitDate)) {
601
- valInitDate = value.iniInitial;
602
- value.valInitial = value.iniInitial;
603
- }
604
- if (!this.isValidDate(valFinalDate)) {
605
- valFinalDate = value.iniFinal;
606
- value.valFinal = value.iniFinal;
607
- }
608
- if (validateEqual &&
609
- this.dateToQueryParam(value.iniInitial) === this.dateToQueryParam(valInitDate) &&
610
- this.dateToQueryParam(value.iniFinal) === this.dateToQueryParam(valFinalDate)) {
611
- return { label: '', property: '', value: '' };
612
- }
613
- return {
614
- hideClose: hideClose,
615
- label: this.poI18nPipe.transform(this.literals['filterRange'], [this.literals[property], valInitDate.toLocaleDateString(), valFinalDate.toLocaleDateString()]),
616
- property: "" + property,
617
- value: this.dateToQueryParam(valInitDate) + ";" + this.dateToQueryParam(valFinalDate)
618
- };
619
- };
620
- DisclaimerUtil.prototype.atzCharFromDisclamer = function (disclaimers, property, defaultValue) {
621
- var returnValue = defaultValue;
622
- if (disclaimers && disclaimers.length > 0) {
623
- disclaimers.find(function (item) {
624
- if (item.property === property) {
625
- if (item.value === null) {
626
- return false;
627
- }
628
- returnValue = item.value;
629
- return true;
630
- }
631
- return false;
632
- });
633
- }
634
- return returnValue;
635
- };
636
- DisclaimerUtil.prototype.atzNumberFromDisclamer = function (disclaimers, property, defaultValue) {
637
- var returnValue = defaultValue;
638
- if (disclaimers && disclaimers.length > 0) {
639
- disclaimers.find(function (item) {
640
- if (item.property === property) {
641
- if (item.value === null) {
642
- return false;
643
- }
644
- returnValue = item.value;
645
- return true;
646
- }
647
- return false;
648
- });
649
- }
650
- return returnValue;
651
- };
652
- DisclaimerUtil.prototype.atzBooleanFromDisclamer = function (disclaimers, property, defaultValue) {
653
- var returnValue = defaultValue;
654
- if (disclaimers && disclaimers.length > 0) {
655
- var disclaimerFind = disclaimers.find(function (item) { return item.property === property; });
656
- if (disclaimerFind && disclaimerFind.value !== null && disclaimerFind.value !== undefined) {
657
- if (disclaimerFind.value === 'true') {
658
- return true;
659
- }
660
- else {
661
- return false;
662
- }
663
- }
664
- }
665
- return returnValue;
666
- };
667
- DisclaimerUtil.prototype.atzDateFromDisclamer = function (disclaimers, property, defaultValue) {
668
- var _this = this;
669
- var returnValue = this.ajustDate(defaultValue);
670
- if (disclaimers && disclaimers.length > 0) {
671
- disclaimers.find(function (item) {
672
- if (item.property === property) {
673
- if (item.value === null) {
674
- return false;
675
- }
676
- returnValue = _this.ajustDate(item.value);
677
- return true;
678
- }
679
- return false;
680
- });
681
- }
682
- return returnValue;
683
- };
684
- DisclaimerUtil.prototype.atzMultiSelectCharFromDisclamer = function (disclaimers, property, defaultValue) {
685
- return this.atzMultiSelectFromDisclamer('char', disclaimers, property, defaultValue);
686
- };
687
- DisclaimerUtil.prototype.atzMultiSelectNumberFromDisclamer = function (disclaimers, property, defaultValue) {
688
- return this.atzMultiSelectFromDisclamer('number', disclaimers, property, defaultValue);
689
- };
690
- DisclaimerUtil.prototype.atzMultiSelectFromDisclamer = function (type, disclaimers, property, defaultValue) {
691
- var returnValue = [];
692
- defaultValue.map(function (item) {
693
- returnValue.push(item.value);
694
- });
695
- if (disclaimers && disclaimers.length > 0) {
696
- disclaimers.find(function (item) {
697
- if (item.property === property) {
698
- if (item.value === null || item.value === 'all' || item.value === 'none') {
699
- return false;
700
- }
701
- returnValue = [];
702
- item.value.split(',').forEach(function (itemOpt) {
703
- if (type === 'char') {
704
- returnValue.push(itemOpt);
705
- }
706
- if (type === 'number') {
707
- returnValue.push(+itemOpt);
708
- }
709
- });
710
- return true;
711
- }
712
- return false;
713
- });
714
- }
715
- return returnValue;
716
- };
717
- DisclaimerUtil.prototype.atzCheckboxFromDisclamer = function (disclaimers, property, options) {
718
- var returnValue = [];
719
- options.map(function (item) {
720
- returnValue.push(item.value);
721
- });
722
- if (disclaimers && disclaimers.length > 0) {
723
- disclaimers.find(function (item) {
724
- if (item.property === property) {
725
- if (item.value === null || item.value === 'all' || item.value === 'none') {
726
- return false;
727
- }
728
- returnValue = [];
729
- item.value.split(',').forEach(function (itemOpt) {
730
- returnValue.push(itemOpt);
731
- });
732
- return true;
733
- }
734
- return false;
735
- });
736
- }
737
- return returnValue;
738
- };
739
- DisclaimerUtil.prototype.atzRangeCharFromDisclamer = function (disclaimers, property, rangeChar) {
740
- var value = '';
741
- if (disclaimers && disclaimers.length > 0) {
742
- disclaimers.find(function (item) {
743
- if (item.property === property) {
744
- if (item.value === null) {
745
- return false;
746
- }
747
- value = item.value;
748
- return true;
749
- }
750
- return false;
751
- });
752
- }
753
- return this.atzRangeCharFromQueryParam(value, rangeChar);
754
- };
755
- DisclaimerUtil.prototype.atzRangeNumFromDisclamer = function (disclaimers, property, rangeNum) {
756
- var value = '';
757
- if (disclaimers && disclaimers.length > 0) {
758
- disclaimers.find(function (item) {
759
- if (item.property === property) {
760
- if (item.value === null) {
761
- return false;
762
- }
763
- value = item.value;
764
- return true;
765
- }
766
- return false;
767
- });
768
- }
769
- return this.atzRangeNumFromQueryParam(value, rangeNum);
770
- };
771
- DisclaimerUtil.prototype.atzRangeDateFromDisclamer = function (disclaimers, property, rangeDate) {
772
- var value = '';
773
- if (disclaimers && disclaimers.length > 0) {
774
- disclaimers.find(function (item) {
775
- if (item.property === property) {
776
- if (item.value === null) {
777
- return false;
778
- }
779
- value = item.value;
780
- return true;
781
- }
782
- return false;
783
- });
784
- }
785
- return this.atzRangeDateFromQueryParam(value, rangeDate);
786
- };
787
- DisclaimerUtil.prototype.atzRangeCharFromQueryParam = function (value, rangeChar) {
788
- rangeChar.valInitial = rangeChar.iniInitial;
789
- rangeChar.valFinal = rangeChar.iniFinal;
790
- if (!value || value === '') {
791
- return rangeChar;
792
- }
793
- rangeChar.valInitial = value.split(';')[0];
794
- rangeChar.valFinal = value.split(';')[1];
795
- if (rangeChar.valFinal === null || rangeChar.valFinal === undefined) {
796
- rangeChar.valFinal = rangeChar.iniFinal;
797
- }
798
- return rangeChar;
799
- };
800
- DisclaimerUtil.prototype.atzRangeNumFromQueryParam = function (value, rangeNum) {
801
- rangeNum.valInitial = rangeNum.iniInitial;
802
- rangeNum.valFinal = rangeNum.iniFinal;
803
- if (!value || value === '') {
804
- return rangeNum;
805
- }
806
- rangeNum.valInitial = +value.split(';')[0];
807
- rangeNum.valFinal = +value.split(';')[1];
808
- if (rangeNum.valFinal === null || rangeNum.valFinal === undefined) {
809
- rangeNum.valFinal = rangeNum.iniFinal;
810
- }
811
- return rangeNum;
812
- };
813
- DisclaimerUtil.prototype.atzRangeDateFromQueryParam = function (value, rangeDate) {
814
- rangeDate.valInitial = rangeDate.iniInitial;
815
- rangeDate.valFinal = rangeDate.iniFinal;
816
- if (!value || value === '') {
817
- return rangeDate;
818
- }
819
- rangeDate.valInitial = this.queryParamToDate(value.split(';')[0]);
820
- rangeDate.valFinal = this.queryParamToDate(value.split(';')[1]);
821
- if (rangeDate.valFinal === null || rangeDate.valFinal === undefined) {
822
- rangeDate.valFinal = rangeDate.iniFinal;
823
- }
824
- return rangeDate;
825
- };
826
- DisclaimerUtil.prototype.dateToQueryParam = function (date) {
827
- var iDay = date.getDate();
828
- var iMonth = date.getMonth() + 1;
829
- var iYear = date.getFullYear();
830
- return iYear + "-" + this.pad(iMonth) + "-" + this.pad(iDay);
831
- };
832
- DisclaimerUtil.prototype.queryParamToDate = function (param) {
833
- var iDay = +param.split('-')[2];
834
- var iMonth = +param.split('-')[1];
835
- var iYear = +param.split('-')[0];
836
- return new Date(iYear, iMonth - 1, iDay);
837
- };
838
- DisclaimerUtil.prototype.isValidDate = function (date) {
839
- return date instanceof Date && !isNaN(date.getTime());
840
- };
841
- DisclaimerUtil.prototype.ajustDate = function (param) {
842
- if (param instanceof Date) {
843
- return param;
844
- }
845
- if (!param) {
846
- return param;
847
- }
848
- return this.queryParamToDate(param.split('T')[0]);
849
- };
850
- DisclaimerUtil.prototype.pad = function (number) {
851
- if (number < 10) {
852
- return '0' + number;
853
- }
854
- return number;
855
- };
856
- return DisclaimerUtil;
857
- }());
858
-
859
- /*
860
- Versão: 1.002
861
- Data Criação: 19/02/2019
862
- */
863
- var FieldValidationUtil = /** @class */ (function () {
864
- function FieldValidationUtil(poNotification, poI18nPipe, literals) {
865
- this.literals = {};
866
- this.poNotification = poNotification;
867
- this.poI18nPipe = poI18nPipe;
868
- this.literals = literals;
869
- this.disclaimerUtil = new DisclaimerUtil(this.poNotification, this.poI18nPipe, this.literals);
870
- }
871
- FieldValidationUtil.prototype.vldFieldCharacter = function (field, value) {
872
- if (!value || value.trim() === '') {
873
- this.poNotification.error({
874
- message: this.poI18nPipe.transform(this.literals['fieldVldRequered'], [this.literals[field]])
875
- });
876
- return false;
877
- }
878
- return true;
879
- };
880
- // Valida uma faixa de caracteres se o inicial é menor que final
881
- FieldValidationUtil.prototype.vldRangeCharacter = function (initialField, finalField, initialValue, finalValue) {
882
- if (!initialValue || !finalValue) {
883
- return true;
884
- }
885
- if (initialValue.trim().toUpperCase() > finalValue.trim().toUpperCase()) {
886
- this.poNotification.error({
887
- message: this.poI18nPipe.transform(this.literals['fieldVldRange'], [this.literals[initialField], this.literals[finalField]])
888
- });
889
- return false;
890
- }
891
- return true;
892
- };
893
- FieldValidationUtil.prototype.vldFieldNumber = function (field, value, vldValue, zeroAccept) {
894
- if (vldValue === void 0) { vldValue = false; }
895
- if (zeroAccept === void 0) { zeroAccept = false; }
896
- if (vldValue && !this.vldValueOfNumber(field, value)) {
897
- return false;
898
- }
899
- if ((!value) || value <= 0) {
900
- if (value === 0 && zeroAccept === true) {
901
- return true;
902
- }
903
- this.poNotification.error({
904
- message: this.poI18nPipe.transform(this.literals['fieldVldRequered'], [this.literals[field]])
905
- });
906
- return false;
907
- }
908
- return true;
909
- };
910
- FieldValidationUtil.prototype.vldValueOfNumber = function (field, value) {
911
- if (value && value < 0) {
912
- this.poNotification.error({ message: this.poI18nPipe.transform(this.literals['fieldVldNumber'], [value.toString(), this.literals[field]]) });
913
- return false;
914
- }
915
- return true;
916
- };
917
- FieldValidationUtil.prototype.vldFieldPercent = function (field, value, vldValue) {
918
- if (vldValue === void 0) { vldValue = false; }
919
- if (vldValue && !this.vldValueOfPercent(field, value)) {
920
- return false;
921
- }
922
- if (!this.vldFieldNumber(field, value)) {
923
- return false;
924
- }
925
- return true;
926
- };
927
- FieldValidationUtil.prototype.vldValueOfPercent = function (field, value) {
928
- if (value && value < 0) {
929
- this.poNotification.error({ message: this.poI18nPipe.transform(this.literals['fieldVldNumber'], [value.toString(), this.literals[field]]) });
930
- return false;
931
- }
932
- if (value && value > 100) {
933
- this.poNotification.error({ message: this.poI18nPipe.transform(this.literals['fieldVldNumber'], [value.toString(), this.literals[field]]) });
934
- return false;
935
- }
936
- return true;
937
- };
938
- // Valida uma faixa de números se o inicial é menor que final
939
- FieldValidationUtil.prototype.vldRangeNumber = function (initialField, finalField, initialValue, finalValue) {
940
- if (!initialValue) {
941
- initialValue = 0;
942
- }
943
- if (!finalValue) {
944
- finalValue = 0;
945
- }
946
- if (initialValue > finalValue) {
947
- this.poNotification.error({
948
- message: this.poI18nPipe.transform(this.literals['fieldVldRange'], [this.literals[initialField], this.literals[finalField]])
949
- });
950
- return false;
951
- }
952
- return true;
953
- };
954
- FieldValidationUtil.prototype.vldFieldDate = function (field, value) {
955
- var valDate = this.disclaimerUtil.ajustDate(value);
956
- if (!this.disclaimerUtil.isValidDate(valDate)) {
957
- this.poNotification.error({
958
- message: this.poI18nPipe.transform(this.literals['fieldVldDate'], [this.literals[field]])
959
- });
960
- return false;
961
- }
962
- return true;
963
- };
964
- // Valida uma faixa de datas se o inicial é menor que final
965
- FieldValidationUtil.prototype.vldRangeDate = function (initialField, finalField, initialValue, finalValue) {
966
- if (!initialValue || !finalValue) {
967
- return true;
968
- }
969
- var valInitialDate = this.disclaimerUtil.ajustDate(initialValue).getTime();
970
- var valFinalDate = this.disclaimerUtil.ajustDate(finalValue).getTime();
971
- if (valInitialDate > valFinalDate) {
972
- this.poNotification.error({
973
- message: this.poI18nPipe.transform(this.literals['fieldVldRange'], [this.literals[initialField], this.literals[finalField]])
974
- });
975
- return false;
976
- }
977
- return true;
978
- };
979
- FieldValidationUtil.prototype.vldFieldMultiSelect = function (field, value) {
980
- if (!value || value.length === 0) {
981
- this.poNotification.error({
982
- message: this.poI18nPipe.transform(this.literals['fieldVldSelected'], [this.literals[field]])
983
- });
984
- return false;
985
- }
986
- return true;
987
- };
988
- FieldValidationUtil.prototype.vldFieldCheckbox = function (field, value) {
989
- if (!value || value.length === 0) {
990
- this.poNotification.error({
991
- message: this.poI18nPipe.transform(this.literals['fieldVldSelected'], [this.literals[field]])
992
- });
993
- return false;
994
- }
995
- return true;
996
- };
997
- // Valida formato conforme regra: "9" apenas números, "X" qualquer caracter, "!" apenas letras maiúsculas
998
- FieldValidationUtil.prototype.vldFieldFormat = function (field, value, format, replacePoint) {
999
- if (replacePoint === void 0) { replacePoint = false; }
1000
- var lOK = true;
1001
- var oldFormat;
1002
- if (!value) {
1003
- return lOK;
1004
- }
1005
- /*Retira os pontos do formato*/
1006
- if (replacePoint) {
1007
- oldFormat = format;
1008
- format = format.replace(/\./g, '');
1009
- }
1010
- if (value.length !== format.length) {
1011
- lOK = false;
1012
- }
1013
- else {
1014
- for (var idx = 0; idx < format.length; idx++) {
1015
- if (format[idx] === '9') {
1016
- if (value[idx].replace(/[0-9]/, '9') !== '9') {
1017
- lOK = false;
1018
- break;
1019
- }
1020
- }
1021
- if (format[idx] === '!') {
1022
- if (value[idx].replace(/[A-Z]/, 'A') !== 'A') {
1023
- lOK = false;
1024
- break;
1025
- }
1026
- }
1027
- }
1028
- }
1029
- if (replacePoint) {
1030
- format = oldFormat;
1031
- }
1032
- if (!lOK) {
1033
- this.poNotification.error({
1034
- message: this.poI18nPipe.transform(this.literals['fieldVldFormat'], [this.literals[field], format])
1035
- });
1036
- }
1037
- return lOK;
1038
- };
1039
- return FieldValidationUtil;
1040
- }());
1041
-
1042
- /*
1043
- Versão: 1.000
1044
- Data Criação: 06/08/2018
1045
- */
1046
- var FilterRangeUtil = /** @class */ (function () {
1047
- function FilterRangeUtil() {
1048
- }
1049
- FilterRangeUtil.makeFilterRangeCharacter = function (iniInitial, iniFinal) {
1050
- return {
1051
- iniInitial: iniInitial,
1052
- iniFinal: iniFinal,
1053
- valInitial: iniInitial,
1054
- valFinal: iniFinal
1055
- };
1056
- };
1057
- FilterRangeUtil.makeFilterRangeNumber = function (iniInitial, iniFinal) {
1058
- return {
1059
- iniInitial: iniInitial,
1060
- iniFinal: iniFinal,
1061
- valInitial: iniInitial,
1062
- valFinal: iniFinal
1063
- };
1064
- };
1065
- FilterRangeUtil.makeFilterRangeDate = function (iniInitial, iniFinal) {
1066
- return {
1067
- iniInitial: iniInitial,
1068
- iniFinal: iniFinal,
1069
- valInitial: iniInitial,
1070
- valFinal: iniFinal
1071
- };
1072
- };
1073
- return FilterRangeUtil;
1074
- }());
1075
-
1076
- /*
1077
- Versão: 1.003
1078
- Data Criação: 18/04/2019
1079
- */
1080
- var GenericFunctionsUtils = /** @class */ (function () {
1081
- function GenericFunctionsUtils(literals) {
1082
- this.literals = {};
1083
- this.literals = literals;
1084
- }
1085
- /* Transforma uma Lista separada por "," em um Array */
1086
- GenericFunctionsUtils.listToArrayCharacter = function (list) {
1087
- var returnArray = new Array();
1088
- if (list && list !== '') {
1089
- returnArray = list.split(',');
1090
- }
1091
- return returnArray;
1092
- };
1093
- /* Transforma um Array em uma Lista separada por "," */
1094
- GenericFunctionsUtils.ArrayToListCharacter = function (array) {
1095
- var list = '';
1096
- if (array && array.length > 0) {
1097
- list = array.join(',');
1098
- }
1099
- return list;
1100
- };
1101
- GenericFunctionsUtils.isEmpty = function (object) {
1102
- var isEmpty = true;
1103
- for (var content in object) {
1104
- if (object.hasOwnProperty(content)) {
1105
- isEmpty = false;
1106
- }
1107
- }
1108
- return isEmpty;
1109
- };
1110
- GenericFunctionsUtils.getChartValues = function (chartData) {
1111
- var chartValues;
1112
- var maxValue, minValue;
1113
- maxValue = undefined;
1114
- minValue = undefined;
1115
- chartData.map(function (item) {
1116
- if (maxValue === undefined && minValue === undefined) {
1117
- maxValue = item.data[0];
1118
- minValue = item.data[0];
1119
- }
1120
- else {
1121
- if (item.data < minValue) {
1122
- minValue = item.data[0];
1123
- }
1124
- if (item.data > maxValue) {
1125
- maxValue = item.data[0];
1126
- }
1127
- }
1128
- });
1129
- if (maxValue > 0 && minValue > 0) {
1130
- chartValues = { maxValue: maxValue, minValue: 0 };
1131
- }
1132
- if (maxValue > 0 && minValue < 0) {
1133
- chartValues = { maxValue: maxValue, minValue: minValue };
1134
- }
1135
- if (maxValue < 0 && minValue < 0) {
1136
- var max = (minValue / 3) * (-1);
1137
- chartValues = { maxValue: max, minValue: minValue };
1138
- }
1139
- if (maxValue > 0 && minValue === 0) {
1140
- chartValues = { maxValue: maxValue, minValue: 0 };
1141
- }
1142
- if (maxValue === 0 && minValue < 0) {
1143
- var max = (minValue / 3) * (-1);
1144
- chartValues = { maxValue: max, minValue: minValue };
1145
- }
1146
- if (maxValue === 0 && minValue === 0) {
1147
- chartValues = { maxValue: undefined, minValue: undefined };
1148
- }
1149
- chartValues.maxValue = Math.round(chartValues.maxValue);
1150
- chartValues.minValue = Math.round(chartValues.minValue);
1151
- return chartValues;
1152
- };
1153
- /*Deixa no list apenas o itens que existem no options*/
1154
- GenericFunctionsUtils.atzMultiSelectListByOptions = function (options, list) {
1155
- var idx;
1156
- var newList;
1157
- if (!list) {
1158
- return list;
1159
- }
1160
- newList = new Array();
1161
- list.map(function (item) {
1162
- if (item) {
1163
- idx = options.findIndex(function (itemOptions) { return itemOptions.value === item; });
1164
- if (idx >= 0) {
1165
- newList.push(item);
1166
- }
1167
- }
1168
- });
1169
- return newList;
1170
- };
1171
- /*Carrega o Options com os valores defaults passados como parâmetro (list)*/
1172
- GenericFunctionsUtils.prototype.loadOptionsMultiSelect = function (options, list) {
1173
- var _this = this;
1174
- var idx;
1175
- if (!list) {
1176
- return;
1177
- }
1178
- list.map(function (item) {
1179
- if (item) {
1180
- idx = options.findIndex(function (itemOptions) { return itemOptions.value === item; });
1181
- if (idx === -1) {
1182
- options.push({ label: item === 'all' ? _this.literals['all'] : item, value: item });
1183
- }
1184
- }
1185
- });
1186
- };
1187
- /*Carrega o Options com os valores defaults passados como parâmetro (list)*/
1188
- GenericFunctionsUtils.prototype.loadOptionsSelect = function (options, selectValue, tradValue) {
1189
- if (tradValue === void 0) { tradValue = false; }
1190
- var idx;
1191
- if (!selectValue) {
1192
- return;
1193
- }
1194
- if (selectValue) {
1195
- idx = options.findIndex(function (itemOptions) { return itemOptions.value === selectValue; });
1196
- if (idx === -1) {
1197
- options.push({ label: tradValue ? this.literals[selectValue] : selectValue, value: selectValue });
1198
- }
1199
- }
1200
- };
1201
- /*Método que compara 2 objetos e retorna se são iguais ou diferentes*/
1202
- GenericFunctionsUtils.prototype.compareObjects = function (firstObject, secondObject) {
1203
- if (!firstObject || !secondObject) {
1204
- return false;
1205
- }
1206
- /*Pega a lista de nomes dos campos do objetos e compara*/
1207
- if (Object.getOwnPropertyNames(firstObject).length !== Object.getOwnPropertyNames(secondObject).length) {
1208
- return false;
1209
- }
1210
- for (var content in firstObject) {
1211
- if (content.substr(0, 1) === '$' || content.substr(0, 1) === '_') {
1212
- continue;
1213
- }
1214
- if (firstObject[content] !== secondObject[content]) {
1215
- return false;
1216
- }
1217
- }
1218
- return true;
1219
- };
1220
- GenericFunctionsUtils.prototype.referenceGeneration = function (charInd, dateRef) {
1221
- var reference;
1222
- var random;
1223
- var iDay = dateRef.getDate();
1224
- var iMonth = dateRef.getMonth() + 1;
1225
- var iYear = dateRef.getFullYear();
1226
- reference = "" + this.pad(iYear) + this.pad(iMonth) + this.pad(iDay) + charInd;
1227
- random = btoa("" + (new Date()).getTime());
1228
- random = random.replace(/[=]/g, '');
1229
- random = random.slice(random.length - 3, random.length);
1230
- return "" + reference + random;
1231
- };
1232
- GenericFunctionsUtils.prototype.pad = function (number) {
1233
- if (number < 10) {
1234
- return '0' + number;
1235
- }
1236
- if (number > 99) {
1237
- return (number + '').slice(2, 4);
1238
- }
1239
- return number;
1240
- };
1241
- GenericFunctionsUtils.prototype.focusInternalInput = function (idField) {
1242
- var fieldComponent = document.getElementById(idField);
1243
- var fieldInput = fieldComponent.getElementsByClassName('po-input')[0];
1244
- fieldInput.focus();
1245
- };
1246
- return GenericFunctionsUtils;
1247
- }());
1248
-
1249
- var FileUtil = /** @class */ (function () {
1250
- function FileUtil() {
1251
- }
1252
- FileUtil.downloadFile = function (data, fileName, contentType, base64) {
1253
- base64 = (base64 === false) ? false : true;
1254
- var dataBlob = base64 ? this.b64toBlob(data, contentType) : data;
1255
- this.download(dataBlob, fileName);
1256
- };
1257
- FileUtil.downloadData = function (data, dwldDataParam) {
1258
- if (dwldDataParam === void 0) { dwldDataParam = null; }
1259
- if (!data) {
1260
- return;
1261
- }
1262
- if (!dwldDataParam) {
1263
- dwldDataParam = new DownloadDataParams();
1264
- }
1265
- if (!dwldDataParam.fileName) {
1266
- dwldDataParam.fileName = 'data.csv';
1267
- }
1268
- if (!dwldDataParam.literals) {
1269
- dwldDataParam.literals = {};
1270
- }
1271
- if (!dwldDataParam.columnDelimiter) {
1272
- dwldDataParam.columnDelimiter = ';';
1273
- }
1274
- if (!dwldDataParam.columnList) {
1275
- dwldDataParam.columnList = [];
1276
- }
1277
- if (!dwldDataParam.columnExclude) {
1278
- dwldDataParam.columnExclude = [];
1279
- }
1280
- var datab64 = btoa(this.jsonToString(data, dwldDataParam));
1281
- this.downloadFile(datab64, dwldDataParam.fileName, 'text/csv');
1282
- };
1283
- FileUtil.download = function (file, fileName) {
1284
- var binaryData = [file];
1285
- var downloadLink = document.createElement('a');
1286
- var urlDownload = window.URL.createObjectURL(new Blob(binaryData, { type: file.type }));
1287
- /**Verifica se é ie ou edge, pois o mesmo tem tratamento próprio para arquivos blob */
1288
- if (navigator.userAgent.toUpperCase().indexOf('.NET') > 0 || navigator.userAgent.toUpperCase().indexOf('EDGE') > 0) {
1289
- window.navigator.msSaveOrOpenBlob(file, fileName);
1290
- }
1291
- else {
1292
- downloadLink.href = urlDownload;
1293
- downloadLink.setAttribute('download', fileName);
1294
- document.body.appendChild(downloadLink);
1295
- downloadLink.click();
1296
- window.URL.revokeObjectURL(urlDownload);
1297
- downloadLink.remove();
1298
- }
1299
- };
1300
- FileUtil.b64toBlob = function (b64Data, contentType, sliceSize) {
1301
- contentType = contentType || '';
1302
- sliceSize = sliceSize || 512;
1303
- var byteCharacters = atob(b64Data);
1304
- var byteArrays = [];
1305
- for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
1306
- var slice = byteCharacters.slice(offset, offset + sliceSize);
1307
- var byteNumbers = new Array(slice.length);
1308
- for (var i = 0; i < slice.length; i++) {
1309
- byteNumbers[i] = slice.charCodeAt(i);
1310
- }
1311
- var byteArray = new Uint8Array(byteNumbers);
1312
- byteArrays.push(byteArray);
1313
- }
1314
- var blob = new Blob(byteArrays, { type: contentType });
1315
- return blob;
1316
- };
1317
- FileUtil.jsonToString = function (jsonData, dwldDataParam) {
1318
- if (!jsonData || jsonData.length === 0) {
1319
- return '';
1320
- }
1321
- var lineDelimiter = '\n';
1322
- var columnOrig = null;
1323
- var columnHeader = null;
1324
- var keys = [];
1325
- var includeKey;
1326
- if (dwldDataParam.columnList &&
1327
- dwldDataParam.columnList.length > 0) {
1328
- columnOrig = dwldDataParam.columnList;
1329
- }
1330
- else {
1331
- columnOrig = Object.keys(jsonData[0]);
1332
- }
1333
- columnOrig.forEach(function (key) {
1334
- includeKey = true;
1335
- if (dwldDataParam.columnExclude &&
1336
- dwldDataParam.columnExclude.length > 0 &&
1337
- dwldDataParam.columnExclude.indexOf(key) !== -1) {
1338
- includeKey = false;
1339
- }
1340
- if (includeKey) {
1341
- keys.push(key);
1342
- columnHeader = (!columnHeader) ? '' : columnHeader + dwldDataParam.columnDelimiter;
1343
- columnHeader += (dwldDataParam.literals[key]) ? dwldDataParam.literals[key] : key;
1344
- }
1345
- });
1346
- var lineStr = jsonData.reduce(function (accLineStr, currentItem) {
1347
- var first = true;
1348
- var columnValue = null;
1349
- keys.forEach(function (key) {
1350
- if (!first) {
1351
- accLineStr += dwldDataParam.columnDelimiter;
1352
- }
1353
- columnValue = currentItem[key];
1354
- if (columnValue === null || columnValue === undefined) {
1355
- columnValue = '';
1356
- }
1357
- switch (typeof (columnValue)) {
1358
- case 'number':
1359
- columnValue = columnValue.toLocaleString();
1360
- break;
1361
- case 'boolean':
1362
- columnValue = (dwldDataParam.literals["" + columnValue]) ?
1363
- dwldDataParam.literals["" + columnValue] : columnValue;
1364
- break;
1365
- case 'object':
1366
- columnValue = JSON.stringify(columnValue);
1367
- }
1368
- accLineStr += columnValue;
1369
- first = false;
1370
- });
1371
- return accLineStr + lineDelimiter;
1372
- }, columnHeader + lineDelimiter);
1373
- return lineStr;
1374
- };
1375
- return FileUtil;
1376
- }());
1377
- var DownloadDataParams = /** @class */ (function () {
1378
- function DownloadDataParams() {
1379
- }
1380
- return DownloadDataParams;
1381
- }());
1382
-
1383
- var ScheduleParameters = /** @class */ (function () {
1384
- function ScheduleParameters() {
1385
- }
1386
- return ScheduleParameters;
1387
- }());
1388
- var ExecutionStatus = /** @class */ (function () {
1389
- function ExecutionStatus() {
1390
- }
1391
- return ExecutionStatus;
1392
- }());
1393
- var ExecutionParameters = /** @class */ (function () {
1394
- function ExecutionParameters() {
1395
- }
1396
- return ExecutionParameters;
1397
- }());
1398
-
1399
- var TotvsScheduleExecutionService = /** @class */ (function () {
1400
- function TotvsScheduleExecutionService(http) {
1401
- this.http = http;
1402
- this.headers = { headers: { 'X-PO-Screen-Lock': 'true' } };
1403
- this.urlCadServidor = '/dts/datasul-rest/resources/prg/btb/v1/servidoresExecucao';
1404
- this.urlJobScheduler = '/dts/datasul-rest/resources/prg/framework/v1/jobScheduler';
1405
- this.urlJobExecution = '/dts/datasul-rest/resources/prg/framework/v1/jobExecution';
1406
- }
1407
- TotvsScheduleExecutionService.prototype.getFilteredItems = function (params) {
1408
- var urlParams = new Array();
1409
- urlParams.push("pageSize=" + params.pageSize.toString());
1410
- urlParams.push("page=" + params.page.toString());
1411
- if (params.filter && params.filter.length > 0) {
1412
- urlParams.push("quickSearch=" + params.filter);
1413
- }
1414
- return this.http.get(this.urlCadServidor + "?" + urlParams.join('&'));
1415
- };
1416
- TotvsScheduleExecutionService.prototype.getObjectByValue = function (id) {
1417
- return this.http.get(this.urlCadServidor + "/" + id, this.headers);
1418
- };
1419
- TotvsScheduleExecutionService.prototype.createExecution = function (parameters, loading) {
1420
- var params = JSON.parse(JSON.stringify(parameters).replace(/\\\\/g, '*|'));
1421
- if (loading) {
1422
- return this.http.post("" + this.urlJobScheduler, params, this.headers);
1423
- }
1424
- else {
1425
- return this.http.post("" + this.urlJobScheduler, params);
1426
- }
1427
- };
1428
- TotvsScheduleExecutionService.prototype.createExecutionForNow = function (executionParams, loading) {
1429
- var jobScheduleParams;
1430
- var date = new Date();
1431
- var params = JSON.parse(JSON.stringify(executionParams).replace(/\\\\/g, '*|'));
1432
- if (!params.businessParams || params.businessParams.length === 0) {
1433
- params.businessParams = [{ chave: '', valor: '' }];
1434
- }
1435
- jobScheduleParams = {};
1436
- jobScheduleParams.status = 'active';
1437
- jobScheduleParams.processID = params.programName;
1438
- jobScheduleParams.firstExecution = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + "T" + this.addZero(date.getHours()) + ":" + this.addZero(date.getMinutes()) + ":00.000Z";
1439
- jobScheduleParams.recurrent = false;
1440
- jobScheduleParams.executionParameter = {
1441
- parametros: [
1442
- { chave: 'rpwServer', valor: params.executionServer },
1443
- { chave: 'RPW_PROGRAM', valor: params.externalName },
1444
- { chave: 'RPW_PRG_EMS5', valor: params.programEMS5 ? 'yes' : 'no' },
1445
- { chave: 'RPW_PRG_VERS', valor: params.programVersion },
1446
- { parametros_negocio: params.businessParams }
1447
- ]
1448
- };
1449
- if (loading) {
1450
- return this.http.post("" + this.urlJobScheduler, jobScheduleParams, this.headers);
1451
- }
1452
- else {
1453
- return this.http.post("" + this.urlJobScheduler, jobScheduleParams);
1454
- }
1455
- };
1456
- TotvsScheduleExecutionService.prototype.getExecutionByJobScheduleID = function (jobScheduleID, loading) {
1457
- var _this = this;
1458
- if (loading === void 0) { loading = false; }
1459
- var url = this.urlJobExecution + "?jobScheduleID=" + jobScheduleID;
1460
- return this.getExecution(url, loading).pipe(operators.map(function (response) { return _this.transformExecution('jobScheduleID', response); }));
1461
- };
1462
- TotvsScheduleExecutionService.prototype.getExecutionByExecutionID = function (executionID, loading) {
1463
- var _this = this;
1464
- if (loading === void 0) { loading = false; }
1465
- var url = this.urlJobExecution + "/" + executionID;
1466
- return this.getExecution(url, loading).pipe(operators.map(function (response) { return _this.transformExecution('executionID', response); }));
1467
- };
1468
- TotvsScheduleExecutionService.prototype.getExecution = function (url, loading) {
1469
- if (loading) {
1470
- return this.http.get(url, this.headers);
1471
- }
1472
- else {
1473
- return this.http.get(url);
1474
- }
1475
- };
1476
- TotvsScheduleExecutionService.prototype.transformExecution = function (type, response) {
1477
- if (!response || !response.items || response.items.length === 0) {
1478
- return;
1479
- }
1480
- response = response.items[0];
1481
- var execStatus = new ExecutionStatus();
1482
- execStatus.jobScheduleID = response.jobScheduleID;
1483
- execStatus.executionID = response.executionID;
1484
- execStatus.startedDate = response.startedDate;
1485
- execStatus.error = response.error;
1486
- execStatus.status = response.status;
1487
- return execStatus;
1488
- };
1489
- TotvsScheduleExecutionService.prototype.followUpExcByJobScheduleID = function (jobScheduleID, intervalNum, fncCallBack, loading) {
1490
- if (loading === void 0) { loading = false; }
1491
- this.followUpExecution('jobScheduleID', jobScheduleID, intervalNum, fncCallBack, loading);
1492
- };
1493
- TotvsScheduleExecutionService.prototype.followUpExcByExecutionID = function (executionID, intervalNum, fncCallBack, loading) {
1494
- if (loading === void 0) { loading = false; }
1495
- this.followUpExecution('executionID', executionID, intervalNum, fncCallBack, loading);
1496
- };
1497
- TotvsScheduleExecutionService.prototype.followUpExecution = function (type, execID, intervalNum, fncCallBack, loading) {
1498
- var _this = this;
1499
- this.jobExecutionSubscription$ = null;
1500
- var intervalID = setInterval(function () {
1501
- var execStatus = new ExecutionStatus();
1502
- execStatus.jobScheduleID = (type === 'jobScheduleID') ? execID : '';
1503
- execStatus.executionID = (type === 'executionID') ? execID : '';
1504
- execStatus.startedDate = null;
1505
- execStatus.error = '';
1506
- execStatus.status = 'PENDING'; // PENDING, RUNNING, SUCCESS, FAILURE
1507
- if (_this.jobExecutionSubscription$) {
1508
- return;
1509
- }
1510
- if (type === 'jobScheduleID') {
1511
- _this.jobExecutionSubscription$ = _this.getExecutionByJobScheduleID(execID, loading)
1512
- .subscribe(function (response) {
1513
- _this.followUpExecReturnOk(execID, execStatus, response, intervalID, fncCallBack);
1514
- }, function (error) {
1515
- _this.followUpExecReturnError(error, execStatus, intervalID, fncCallBack);
1516
- });
1517
- }
1518
- if (type === 'executionID') {
1519
- _this.jobExecutionSubscription$ = _this.getExecutionByExecutionID(execID, loading)
1520
- .subscribe(function (response) {
1521
- _this.followUpExecReturnOk(execID, execStatus, response, intervalID, fncCallBack);
1522
- }, function (error) {
1523
- _this.followUpExecReturnError(error, execStatus, intervalID, fncCallBack);
1524
- });
1525
- }
1526
- }, intervalNum);
1527
- };
1528
- TotvsScheduleExecutionService.prototype.followUpExecReturnOk = function (execID, execStatus, response, intervalID, fncCallBack) {
1529
- if (response) {
1530
- execStatus = response;
1531
- }
1532
- else {
1533
- execStatus.error = "Agendamento n\u00E3o encontrado com ID: " + execID;
1534
- execStatus.status = 'FAILURE';
1535
- }
1536
- if (!fncCallBack(execStatus) ||
1537
- execStatus.status === 'SUCCESS' ||
1538
- execStatus.status === 'FAILURE') {
1539
- clearInterval(intervalID);
1540
- }
1541
- this.jobExecutionSubscription$ = null;
1542
- };
1543
- TotvsScheduleExecutionService.prototype.followUpExecReturnError = function (error, execStatus, intervalID, fncCallBack) {
1544
- var erroDesc = '';
1545
- if (error instanceof i1.HttpErrorResponse) {
1546
- erroDesc = error.message;
1547
- if (error.error) {
1548
- erroDesc = '';
1549
- if (error.error.code) {
1550
- erroDesc = error.error.code;
1551
- }
1552
- if (error.error.message) {
1553
- erroDesc = erroDesc + " - " + error.error.message;
1554
- }
1555
- if (error.error.detailedMessage) {
1556
- erroDesc = erroDesc + " - " + error.error.detailedMessage;
1557
- }
1558
- }
1559
- }
1560
- else {
1561
- erroDesc = error;
1562
- }
1563
- execStatus.error = erroDesc;
1564
- execStatus.status = 'FAILURE';
1565
- fncCallBack(execStatus);
1566
- clearInterval(intervalID);
1567
- this.jobExecutionSubscription$ = null;
1568
- };
1569
- TotvsScheduleExecutionService.prototype.addZero = function (num) {
1570
- var str = "" + num;
1571
- if (num < 10) {
1572
- str = "0" + num;
1573
- }
1574
- return str;
1575
- };
1576
- return TotvsScheduleExecutionService;
1577
- }());
1578
- TotvsScheduleExecutionService.decorators = [
1579
- { type: i0.Injectable }
1580
- ];
1581
- /** @nocollapse */
1582
- TotvsScheduleExecutionService.ctorParameters = function () { return [
1583
- { type: i1.HttpClient }
1584
- ]; };
1585
-
1586
- var TotvsScheduleExecutionComponent = /** @class */ (function () {
1587
- function TotvsScheduleExecutionComponent(poI18nService, rpwService, poNotification) {
1588
- this.poI18nService = poI18nService;
1589
- this.rpwService = rpwService;
1590
- this.poNotification = poNotification;
1591
- this.programEMS5 = false;
1592
- this.programVersion = '';
1593
- this.disabledParams = false;
1594
- this.loading = false;
1595
- this.endExecution = new i0.EventEmitter();
1596
- this.jsonObject = {};
1597
- this.literals = {};
1598
- }
1599
- TotvsScheduleExecutionComponent.prototype.ngOnInit = function () {
1600
- /* VERIFICAR COMO FICARÁ A TRADUÇÃO
1601
- forkJoin(
1602
- this.poI18nService.getLiterals(),
1603
- this.poI18nService.getLiterals({ context: 'generalRpw' })
1604
- ).subscribe(literals => {
1605
- literals.map(item => Object.assign(this.literals, item) );
1606
- this.setupComponents();
1607
- });*/
1608
- this.setupComponents();
1609
- };
1610
- TotvsScheduleExecutionComponent.prototype.setupComponents = function () {
1611
- this.executionTypeOptions = [
1612
- { label: 'Executar Hoje', value: 1 },
1613
- { label: 'Agendar Execução', value: 2 }
1614
- ];
1615
- this.frequencyOptions = [
1616
- { label: 'Uma vez no dia', value: 'no' },
1617
- { label: 'Várias vezes no dia', value: 'yes' }
1618
- ];
1619
- this.frequencyTypeOptions = [
1620
- { label: 'Hora(s)', value: 'hour' },
1621
- { label: 'Minuto(s)', value: 'minute' }
1622
- ];
1623
- this.weeklyOptions = [
1624
- { label: 'Domingo', value: 'Sunday' },
1625
- { label: 'Segunda', value: 'Monday' },
1626
- { label: 'Terça', value: 'Tuesday' },
1627
- { label: 'Quarta', value: 'Wednesday' },
1628
- { label: 'Quinta', value: 'Thursday' },
1629
- { label: 'Sexta', value: 'Friday' },
1630
- { label: 'Sábado', value: 'Saturday' }
1631
- ];
1632
- this.zoomRpwServiceColumns = [
1633
- { property: 'code', label: 'Servidor', type: 'string', width: '20%' },
1634
- { property: 'name', label: 'Descrição', type: 'string', width: '80%' }
1635
- ];
1636
- this.model = new ScheduleParameters();
1637
- this.model.executionType = 1;
1638
- this.model.repeatType = 1;
1639
- this.model.repeatExecution = false;
1640
- };
1641
- TotvsScheduleExecutionComponent.prototype.setScheduleParameters = function (schParam) {
1642
- if (!schParam) {
1643
- return;
1644
- }
1645
- this.model = schParam;
1646
- };
1647
- TotvsScheduleExecutionComponent.prototype.fieldRpwServiceFormat = function (value) {
1648
- return value.code + " - " + value.name;
1649
- };
1650
- TotvsScheduleExecutionComponent.prototype.isExecutionSchedule = function () {
1651
- return (this.model.executionType === 2);
1652
- };
1653
- TotvsScheduleExecutionComponent.prototype.isRepeatExecution = function () {
1654
- return this.model.repeatExecution;
1655
- };
1656
- TotvsScheduleExecutionComponent.prototype.isFrenquency = function () {
1657
- return (this.model.frequency === 'yes');
1658
- };
1659
- TotvsScheduleExecutionComponent.prototype.changeRepeatExecution = function () {
1660
- var date = new Date();
1661
- if (!this.model.execAppointHourInit) {
1662
- this.model.execAppointHourInit = this.addZero(date.getHours()) + ":" + this.addZero(date.getMinutes());
1663
- }
1664
- if (!this.model.execAppointHourFinal) {
1665
- this.model.execAppointHourFinal = this.addZero(date.getHours()) + ":" + this.addZero(date.getMinutes());
1666
- }
1667
- this.model.selectWeeklys = [];
1668
- this.model.dayOfMonth = 0;
1669
- this.model.frequency = 'no';
1670
- this.model.frequencyType = 'hour';
1671
- this.model.frequencyValue = 0;
1672
- };
1673
- TotvsScheduleExecutionComponent.prototype.changeExecutionType = function () {
1674
- var date = new Date();
1675
- this.model.execAppointDate = date;
1676
- this.model.execAppointHour = this.addZero(date.getHours()) + ":" + this.addZero(date.getMinutes());
1677
- };
1678
- TotvsScheduleExecutionComponent.prototype.changeTypeFrequency = function () {
1679
- };
1680
- TotvsScheduleExecutionComponent.prototype.getActiveTab = function (codTab) {
1681
- return (this.model.repeatType === codTab);
1682
- };
1683
- TotvsScheduleExecutionComponent.prototype.setActiveTab = function (codTab) {
1684
- this.model.repeatType = codTab;
1685
- };
1686
- TotvsScheduleExecutionComponent.prototype.addZero = function (num) {
1687
- var str = "" + num;
1688
- if (num < 10) {
1689
- str = "0" + num;
1690
- }
1691
- return str;
1692
- };
1693
- TotvsScheduleExecutionComponent.prototype.executeSchedule = function () {
1694
- var _this = this;
1695
- if (this.disabledParams) {
1696
- return;
1697
- }
1698
- if (!this.validate()) {
1699
- return;
1700
- }
1701
- this.jsonObject = {};
1702
- this.jsonObject.status = 'active';
1703
- this.jsonObject.processID = this.programName;
1704
- this.jsonObject.recurrent = this.model.repeatExecution;
1705
- this.jsonObject.executionParameter = {};
1706
- if (this.model.executionType === 1) {
1707
- var date = new Date();
1708
- this.jsonObject.firstExecution = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + "T" + this.addZero(date.getHours()) + ":" + this.addZero(date.getMinutes()) + ":00.000Z";
1709
- }
1710
- if (this.model.executionType === 2) {
1711
- this.jsonObject.firstExecution = this.model.execAppointDate + "T" + this.model.execAppointHour + ":00.000Z";
1712
- }
1713
- this.jsonObject.executionParameter.parametros = [];
1714
- this.jsonObject.executionParameter.parametros[0] = { chave: 'rpwServer', valor: this.model.executionServer };
1715
- this.jsonObject.executionParameter.parametros[1] = { chave: 'RPW_PROGRAM', valor: this.externalName };
1716
- this.jsonObject.executionParameter.parametros[2] = { chave: 'RPW_PRG_EMS5', valor: this.programEMS5 ? 'yes' : 'no' };
1717
- this.jsonObject.executionParameter.parametros[3] = { chave: 'RPW_PRG_VERS', valor: this.programVersion };
1718
- this.jsonObject.executionParameter.parametros[4] = {};
1719
- this.jsonObject.executionParameter.parametros[4].parametros_negocio = this.parameters;
1720
- // Executa hoje ou agendada
1721
- this.rpwService.createExecution(this.jsonObject, this.loading).subscribe(function () {
1722
- _this.poNotification.success('Agendamento realizado com sucesso !');
1723
- });
1724
- if (this.model.repeatExecution) {
1725
- if (this.model.repeatType === 1) {
1726
- this.jsonObject.daily = {
1727
- hour: this.getHourOrMinute(this.model.execAppointHourInit, 'h'),
1728
- minute: this.getHourOrMinute(this.model.execAppointHourInit, 'm')
1729
- };
1730
- }
1731
- if (this.model.repeatType === 2) {
1732
- this.jsonObject.weekly = {
1733
- hour: this.getHourOrMinute(this.model.execAppointHourInit, 'h'),
1734
- minute: this.getHourOrMinute(this.model.execAppointHourInit, 'm'),
1735
- daysOfWeek: this.model.selectWeeklys
1736
- };
1737
- }
1738
- if (this.model.repeatType === 3) {
1739
- this.jsonObject.monthly = {
1740
- hour: this.getHourOrMinute(this.model.execAppointHourInit, 'h'),
1741
- minute: this.getHourOrMinute(this.model.execAppointHourInit, 'm'),
1742
- day: this.model.dayOfMonth
1743
- };
1744
- }
1745
- if (this.isFrenquency()) {
1746
- this.jsonObject.rangeExecutions = {
1747
- frequency: {
1748
- type: this.model.frequencyType,
1749
- value: this.model.frequencyValue
1750
- },
1751
- rangeLimit: {
1752
- hour: this.getHourOrMinute(this.model.execAppointHourFinal, 'h'),
1753
- minute: this.getHourOrMinute(this.model.execAppointHourFinal, 'm')
1754
- }
1755
- };
1756
- }
1757
- // Executa a diária, semanal ou mensal
1758
- this.rpwService.createExecution(this.jsonObject, this.loading).subscribe(function () {
1759
- });
1760
- }
1761
- this.endExecution.emit(this.model);
1762
- };
1763
- TotvsScheduleExecutionComponent.prototype.getHourOrMinute = function (value, type) {
1764
- if (type === 'h') {
1765
- return +value.substring(0, 2);
1766
- }
1767
- if (type === 'm') {
1768
- return +value.substring(3, 6);
1769
- }
1770
- };
1771
- TotvsScheduleExecutionComponent.prototype.compareHour = function (hourInit, hourFinal) {
1772
- if (hourInit === hourFinal) {
1773
- return false;
1774
- }
1775
- if (this.getHourOrMinute(hourInit, 'h') < this.getHourOrMinute(hourFinal, 'h')) {
1776
- return true;
1777
- }
1778
- if (this.getHourOrMinute(hourInit, 'm') > this.getHourOrMinute(hourFinal, 'm')) {
1779
- return false;
1780
- }
1781
- return true;
1782
- };
1783
- TotvsScheduleExecutionComponent.prototype.validate = function () {
1784
- if (!this.scheduleExecutionForm.valid) {
1785
- this.poNotification.error('Verifique as inconsistências em tela.');
1786
- return false;
1787
- }
1788
- if (!this.model.executionServer) {
1789
- this.poNotification.error('Servidor de Execução não foi informado.');
1790
- return false;
1791
- }
1792
- if (this.isExecutionSchedule() && (!this.model.execAppointDate || !this.model.execAppointHour)) {
1793
- this.poNotification.error('Informar a data e a hora para agendamento da execução.');
1794
- return false;
1795
- }
1796
- if (this.model.repeatExecution) {
1797
- if (!this.model.execAppointHourInit) {
1798
- this.poNotification.error('Informar a hora de início para a execução.');
1799
- return false;
1800
- }
1801
- if (this.model.repeatType === 2 && (this.model.selectWeeklys.length === 0)) {
1802
- this.poNotification.error('Informar os dias da semana para a execução.');
1803
- return false;
1804
- }
1805
- if (this.model.repeatType === 3 && (!this.model.dayOfMonth)) {
1806
- this.poNotification.error('Informar o dia para a execução.');
1807
- return false;
1808
- }
1809
- if (this.isFrenquency()) {
1810
- if (!this.compareHour(this.model.execAppointHourInit, this.model.execAppointHourFinal)) {
1811
- this.poNotification.error('Hora Fim deve ser maior que Hora Início.');
1812
- return false;
1813
- }
1814
- if (this.model.frequencyValue === 0) {
1815
- this.poNotification.error('Informar a frequência de execução (A cada hora/minuto).');
1816
- return false;
1817
- }
1818
- }
1819
- }
1820
- return true;
1821
- };
1822
- return TotvsScheduleExecutionComponent;
1823
- }());
1824
- TotvsScheduleExecutionComponent.decorators = [
1825
- { type: i0.Component, args: [{
1826
- selector: 'app-totvs-schedule-execution',
1827
- template: "<form #scheduleExecutionForm=\"ngForm\">\r\n <div class=\"po-row po-sm-12 po-md-12 po-lg-12 po-xl-12\">\r\n <po-radio-group \r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"executionType\"\r\n p-label=\"Data de Execu\u00E7\u00E3o\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.executionType\"\r\n [p-options]=\"executionTypeOptions\"\r\n (p-change)=\"changeExecutionType()\">\r\n </po-radio-group>\r\n\r\n <po-datepicker *ngIf=isExecutionSchedule()\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"model.execAppointDate\"\r\n p-label=\"Agendar para\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointDate\">\r\n </po-datepicker>\r\n\r\n <po-input *ngIf=isExecutionSchedule()\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHour\"\r\n p-label=\"Hora\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHour\">\r\n </po-input>\r\n </div>\r\n\r\n <div class=\"po-row po-sm-12 po-md-12 po-lg-12 po-xl-12\">\r\n <po-lookup\r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"executionServer\"\r\n p-label=\"Servidor de Execu\u00E7\u00E3o\"\r\n p-placeholder=\"Servidor de Execu\u00E7\u00E3o\"\r\n [p-columns]=\"zoomRpwServiceColumns\"\r\n [p-field-format]=\"fieldRpwServiceFormat\"\r\n [p-filter-service]=\"rpwService\"\r\n p-field-label=\"name\"\r\n p-field-value=\"code\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.executionServer\">\r\n </po-lookup>\r\n </div>\r\n\r\n <div class=\"po-row po-sm-12 po-md-12 po-lg-12 po-xl-12\">\r\n <po-switch\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"repeatExecution\"\r\n p-label=\"Repetir ocorr\u00EAncia ?\"\r\n p-label-off=\"N\u00E3o\"\r\n p-label-on=\"Sim\"\r\n [(ngModel)]=\"model.repeatExecution\"\r\n [p-disabled]=\"disabledParams\"\r\n (click)=\"changeRepeatExecution()\">\r\n </po-switch>\r\n </div>\r\n\r\n <div class=\"po-row\" *ngIf=\"isRepeatExecution()\">\r\n \r\n <po-tabs>\r\n\r\n <po-tab \r\n p-label=\"Di\u00E1ria\" \r\n [p-active]=\"getActiveTab(1)\" \r\n (p-click)=\"setActiveTab(1)\">\r\n\r\n <div class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\">\r\n <po-radio-group \r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"frequencyDaily\"\r\n p-label=\"Frequ\u00EAncia\"\r\n p-columns=1\r\n [(ngModel)]=\"model.frequency\"\r\n [p-disabled]=\"disabledParams\"\r\n [p-options]=\"frequencyOptions\"\r\n (p-change)=\"changeTypeFrequency()\">\r\n </po-radio-group>\r\n </div>\r\n \r\n <div class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"> \r\n <po-input\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourInitDaily\"\r\n p-label=\"Hora In\u00EDcio\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourInit\">\r\n </po-input>\r\n \r\n <po-input *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourFinalDaily\"\r\n p-label=\"Hora Fim\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourFinal\">\r\n </po-input>\r\n \r\n <po-number *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-5 po-md-5 po-lg-5 po-xl-5\"\r\n name=\"frequencyValueDaily\"\r\n p-label=\"A cada\"\r\n p-minlength=\"1\"\r\n p-maxlength=\"3\"\r\n p-min=\"0\"\r\n p-max=\"999\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyValue\">\r\n </po-number>\r\n \r\n <po-select *ngIf=\"isFrenquency()\"\r\n class=\"po-mt-3 po-sm-7 po-md-7 po-lg-7 po-xl-7\"\r\n name=\"frequencyTypeDaily\"\r\n p-label=\"\"\r\n [p-options]=\"frequencyTypeOptions\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyType\">\r\n </po-select>\r\n </div>\r\n </po-tab>\r\n\r\n <po-tab \r\n p-label=\"Semanal\"\r\n [p-active]=\"getActiveTab(2)\"\r\n (p-click)=\"setActiveTab(2)\">\r\n\r\n <div class=\"po-row po-sm-12 po-md-12 po-lg-12 po-xl-12\">\r\n <po-multiselect\r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"selectWeeklys\"\r\n p-label=\"Dias da Semana\"\r\n p-placeholder=\"Escolha os dias da semana\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.selectWeeklys\"\r\n [p-options]=\"weeklyOptions\">\r\n </po-multiselect>\r\n </div>\r\n\r\n <div class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\">\r\n <po-radio-group \r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"frequencyWeekly\"\r\n p-label=\"Frequ\u00EAncia\"\r\n p-columns=1\r\n [(ngModel)]=\"model.frequency\"\r\n [p-disabled]=\"disabledParams\"\r\n [p-options]=\"frequencyOptions\"\r\n (p-change)=\"changeTypeFrequency()\">\r\n </po-radio-group>\r\n </div>\r\n\r\n <div class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\">\r\n <po-input\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourInitWeekly\"\r\n p-label=\"Hora In\u00EDcio\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourInit\">\r\n </po-input>\r\n\r\n <po-input *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourFinalWeekly\"\r\n p-label=\"Hora Fim\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourFinal\">\r\n </po-input>\r\n\r\n <po-number *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-5 po-md-5 po-lg-5 po-xl-5\"\r\n name=\"frequencyValueWeekly\"\r\n p-label=\"A cada\"\r\n p-minlength=\"1\"\r\n p-maxlength=\"3\"\r\n p-min=\"0\"\r\n p-max=\"999\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyValue\">\r\n </po-number>\r\n\r\n <po-select *ngIf=\"isFrenquency()\"\r\n class=\"po-mt-3 po-sm-7 po-md-7 po-lg-7 po-xl-7\"\r\n name=\"frequencyTypeWeekly\"\r\n p-label=\"\"\r\n [p-options]=\"frequencyTypeOptions\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyType\">\r\n </po-select>\r\n </div>\r\n </po-tab>\r\n\r\n <po-tab \r\n p-label=\"Mensal\" \r\n [p-active]=\"getActiveTab(3)\" \r\n (p-click)=\"setActiveTab(3)\">\r\n\r\n <div class=\"po-row po-sm-12 po-md-12 po-lg-12 po-xl-12\">\r\n <po-number\r\n class=\"po-sm-3 po-md-3 po-lg-3 po-xl-3\"\r\n name=\"dayOfMonth\"\r\n p-label=\"Dia do m\u00EAs\"\r\n p-minlength=\"1\"\r\n p-maxlength=\"2\"\r\n p-min=\"0\"\r\n p-max=\"31\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.dayOfMonth\">\r\n </po-number>\r\n </div>\r\n\r\n <div class=\"po-row po-sm-6 po-md-6 po-lg-6 po-xl-6\">\r\n <po-radio-group \r\n class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\"\r\n name=\"frequencyMonthly\"\r\n p-label=\"Frequ\u00EAncia\"\r\n p-columns=1\r\n [(ngModel)]=\"model.frequency\"\r\n [p-disabled]=\"disabledParams\"\r\n [p-options]=\"frequencyOptions\"\r\n (p-change)=\"changeTypeFrequency()\">\r\n </po-radio-group>\r\n </div>\r\n\r\n <div class=\"po-row po-sm-6 po-md-6 po-lg-6 po-xl-6\">\r\n <po-input\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourInitMonthly\"\r\n p-label=\"Hora In\u00EDcio\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourInit\">\r\n </po-input>\r\n\r\n <po-input *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-6 po-md-6 po-lg-6 po-xl-6\"\r\n name=\"execAppointHourFinalWeekly\"\r\n p-label=\"Hora Fim\"\r\n p-mask=\"99:99\"\r\n p-mask-format-model=\"true\"\r\n p-pattern=\"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$\"\r\n p-error-pattern=\"Hora inv\u00E1lida\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.execAppointHourFinal\">\r\n </po-input>\r\n\r\n <po-number *ngIf=\"isFrenquency()\"\r\n class=\"po-sm-5 po-md-5 po-lg-5 po-xl-5\"\r\n name=\"frequencyValueWeekly\"\r\n p-label=\"A cada\"\r\n p-minlength=\"1\"\r\n p-maxlength=\"3\"\r\n p-min=\"0\"\r\n p-max=\"999\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyValue\">\r\n </po-number>\r\n\r\n <po-select *ngIf=\"isFrenquency()\"\r\n class=\"po-mt-3 po-sm-7 po-md-7 po-lg-7 po-xl-7\"\r\n name=\"frequencyTypeWeekly\"\r\n p-label=\"\"\r\n [p-options]=\"frequencyTypeOptions\"\r\n [p-disabled]=\"disabledParams\"\r\n [(ngModel)]=\"model.frequencyType\">\r\n </po-select>\r\n </div>\r\n </po-tab>\r\n </po-tabs>\r\n </div>\r\n\r\n <div class=\"po-sm-12 po-md-12 po-lg-12 po-xl-12\" style=\"padding-top: 15px;\">\r\n <po-button\r\n style=\"float: right;\"\r\n p-label=\"Gerar Agendamento RPW\"\r\n [p-disabled]=\"disabledParams\"\r\n (click)=\"executeSchedule()\">\r\n </po-button>\r\n </div>\r\n</form>\r\n",
1828
- styles: [""]
1829
- },] }
1830
- ];
1831
- /** @nocollapse */
1832
- TotvsScheduleExecutionComponent.ctorParameters = function () { return [
1833
- { type: ngComponents.PoI18nService },
1834
- { type: TotvsScheduleExecutionService },
1835
- { type: ngComponents.PoNotificationService }
1836
- ]; };
1837
- TotvsScheduleExecutionComponent.propDecorators = {
1838
- scheduleExecutionForm: [{ type: i0.ViewChild, args: ['scheduleExecutionForm', { static: true },] }],
1839
- programName: [{ type: i0.Input }],
1840
- externalName: [{ type: i0.Input }],
1841
- programEMS5: [{ type: i0.Input }],
1842
- programVersion: [{ type: i0.Input }],
1843
- parameters: [{ type: i0.Input }],
1844
- disabledParams: [{ type: i0.Input }],
1845
- loading: [{ type: i0.Input }],
1846
- endExecution: [{ type: i0.Output }]
1847
- };
1848
-
1849
- var DtsDateFormatPipe = /** @class */ (function () {
1850
- function DtsDateFormatPipe() {
1851
- }
1852
- DtsDateFormatPipe.prototype.transform = function (value, format) {
1853
- if (format === void 0) { format = 'dd/MM/yyyy'; }
1854
- var _a = value.split('-'), year = _a[0], month = _a[1], day = _a[2];
1855
- var formattedDate = format.replace('dd', day)
1856
- .replace('MM', month)
1857
- .replace('yyyy', year);
1858
- return formattedDate;
1859
- };
1860
- return DtsDateFormatPipe;
1861
- }());
1862
- DtsDateFormatPipe.decorators = [
1863
- { type: i0.Pipe, args: [{
1864
- name: 'dtsDateFormat'
1865
- },] }
1866
- ];
1867
-
1868
- var DtsBackofficeUtilsModule = /** @class */ (function () {
1869
- function DtsBackofficeUtilsModule() {
1870
- }
1871
- DtsBackofficeUtilsModule.forRoot = function () {
1872
- return {
1873
- ngModule: DtsBackofficeUtilsModule,
1874
- providers: [TotvsScheduleExecutionService]
1875
- };
1876
- };
1877
- return DtsBackofficeUtilsModule;
1878
- }());
1879
- DtsBackofficeUtilsModule.decorators = [
1880
- { type: i0.NgModule, args: [{
1881
- declarations: [
1882
- TotvsScheduleExecutionComponent,
1883
- DtsDateFormatPipe
1884
- ],
1885
- imports: [
1886
- common.CommonModule,
1887
- ngComponents.PoModule,
1888
- forms.FormsModule,
1889
- i1.HttpClientModule
1890
- ],
1891
- exports: [
1892
- TotvsScheduleExecutionComponent,
1893
- DtsDateFormatPipe
1894
- ],
1895
- providers: [
1896
- TotvsScheduleExecutionService
1897
- ]
1898
- },] }
1899
- ];
1900
-
1901
- /*
1902
- * Public API Surface of dts-backoffice-util
1903
- */
1904
- // Pipes
1905
-
1906
- /**
1907
- * Generated bundle index. Do not edit.
1908
- */
1909
-
1910
- exports.BreadcrumbControlService = BreadcrumbControlService;
1911
- exports.CacheParamsService = CacheParamsService;
1912
- exports.DateUtil = DateUtil;
1913
- exports.DisclaimerUtil = DisclaimerUtil;
1914
- exports.DownloadDataParams = DownloadDataParams;
1915
- exports.DtsBackofficeUtilsModule = DtsBackofficeUtilsModule;
1916
- exports.DtsDateFormatPipe = DtsDateFormatPipe;
1917
- exports.ExecutionParameters = ExecutionParameters;
1918
- exports.ExecutionStatus = ExecutionStatus;
1919
- exports.FieldValidationUtil = FieldValidationUtil;
1920
- exports.FileUtil = FileUtil;
1921
- exports.FilterRangeUtil = FilterRangeUtil;
1922
- exports.GenericFunctionsUtils = GenericFunctionsUtils;
1923
- exports.MenuDatasulService = MenuDatasulService;
1924
- exports.ProfileService = ProfileService;
1925
- exports.ReportService = ReportService;
1926
- exports.ScheduleParameters = ScheduleParameters;
1927
- exports.TotvsScheduleExecutionComponent = TotvsScheduleExecutionComponent;
1928
- exports.TotvsScheduleExecutionService = TotvsScheduleExecutionService;
1929
- exports.TranslateService = TranslateService;
1930
- exports.UserLoginService = UserLoginService;
1931
-
1932
- Object.defineProperty(exports, '__esModule', { value: true });
1933
-
1934
- })));
1935
- //# sourceMappingURL=dts-backoffice-util.umd.js.map