ng-pli-commons 0.0.1663 → 0.0.1664

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 (49) hide show
  1. package/esm2020/lib/components/pdf-config/pdf-config.component.mjs +3 -3
  2. package/esm2020/lib/components/pdf-visualizer/pdf-visualizer.component.mjs +7 -9
  3. package/esm2020/lib/components/progress-bar/progress-bar.component.mjs +11 -4
  4. package/esm2020/lib/services/budget.service.mjs +3 -3
  5. package/esm2020/lib/services/document-history.service.mjs +1 -1
  6. package/esm2020/lib/services/gic-client-disbursement-metadata.service.mjs +31 -0
  7. package/esm2020/lib/services/gic-client.service.mjs +7 -1
  8. package/esm2020/lib/services/gic-cnf-bankvision-transaction.service.mjs +31 -0
  9. package/esm2020/lib/services/gic-cnf-closing-date.service.mjs +34 -0
  10. package/esm2020/lib/services/gic-cnf-maintenance.service.mjs +30 -0
  11. package/esm2020/lib/services/gic-collection.service.mjs +45 -0
  12. package/esm2020/lib/services/gic-disbursement.service.mjs +30 -0
  13. package/esm2020/lib/services/gic-payment-application.service.mjs +27 -0
  14. package/esm2020/lib/services/gic-payment-plan.service.mjs +29 -0
  15. package/esm2020/lib/services/import-excel-gic.service.mjs +40 -0
  16. package/esm2020/lib/services/initial-configuration-gic-parameters.service.mjs +51 -0
  17. package/esm2020/lib/services/interest-adjustment.service.mjs +31 -0
  18. package/esm2020/lib/services/maintenance.service.mjs +59 -0
  19. package/esm2020/lib/services/progress-bar.service.mjs +13 -6
  20. package/esm2020/lib/services/return-refund.service.mjs +47 -0
  21. package/esm2020/lib/services/tasa.cambio.service.mjs +9 -1
  22. package/esm2020/lib/services/token.service.mjs +2 -5
  23. package/esm2020/lib/utils/formio-util.mjs +20 -26
  24. package/esm2020/public-api.mjs +14 -1
  25. package/esm2020/version.mjs +8 -8
  26. package/fesm2015/ng-pli-commons.mjs +2030 -1555
  27. package/fesm2015/ng-pli-commons.mjs.map +1 -1
  28. package/fesm2020/ng-pli-commons.mjs +2003 -1554
  29. package/fesm2020/ng-pli-commons.mjs.map +1 -1
  30. package/lib/components/progress-bar/progress-bar.component.d.ts +2 -1
  31. package/lib/services/budget.service.d.ts +1 -1
  32. package/lib/services/gic-client-disbursement-metadata.service.d.ts +12 -0
  33. package/lib/services/gic-client.service.d.ts +2 -0
  34. package/lib/services/gic-cnf-bankvision-transaction.service.d.ts +13 -0
  35. package/lib/services/gic-cnf-closing-date.service.d.ts +15 -0
  36. package/lib/services/gic-cnf-maintenance.service.d.ts +13 -0
  37. package/lib/services/gic-collection.service.d.ts +18 -0
  38. package/lib/services/gic-disbursement.service.d.ts +14 -0
  39. package/lib/services/gic-payment-application.service.d.ts +13 -0
  40. package/lib/services/gic-payment-plan.service.d.ts +18 -0
  41. package/lib/services/import-excel-gic.service.d.ts +20 -0
  42. package/lib/services/initial-configuration-gic-parameters.service.d.ts +19 -0
  43. package/lib/services/interest-adjustment.service.d.ts +15 -0
  44. package/lib/services/maintenance.service.d.ts +22 -0
  45. package/lib/services/progress-bar.service.d.ts +3 -2
  46. package/lib/services/return-refund.service.d.ts +18 -0
  47. package/lib/services/tasa.cambio.service.d.ts +2 -0
  48. package/package.json +1 -1
  49. package/public-api.d.ts +13 -0
@@ -17,7 +17,7 @@ import { FormioModule, FormioComponent } from 'formioangular-colfuturo';
17
17
  import * as i4$2 from '@tinymce/tinymce-angular';
18
18
  import { EditorModule } from '@tinymce/tinymce-angular';
19
19
  import * as i7 from 'ng-pli-util';
20
- import { NumberUtil, AuthenticationUtil, JwtUtil, PliPatrocinador, PliPrograma, PliPromocion, HEADER_JSON, Moneda, Rubro, TasaCambio, Proceso, DateUtil, primeLocaleEs, UtilString, EPermission, EFormioKey, PliCnfPresupuestoGlobal, PliCnfPresupuestoGlobalRubro, PliCnfPresupuestoAsistente, PliCnfSnapshotToken, PliCnfGuaranteeToken, ETipoPresupuesto, Token, ETypeColumn, SegFilter, EPdfSize, EPdfOrientation, EProceso, RequestPdf, PdfDocument, PliUsuario, Email, InteractionApplicationUser, ETypeStaticInteraction, SendApplication, EDocumentState, Document, EBudgetError, EBudgetBuildType, ECnfPageSection, DatatableUtil, NgPliUtilModule, ApplicationBudgetTotal, Archive } from 'ng-pli-util';
20
+ import { NumberUtil, AuthenticationUtil, JwtUtil, PliPatrocinador, PliPrograma, PliPromocion, HEADER_JSON, Moneda, Rubro, TasaCambio, Proceso, DateUtil, primeLocaleEs, UtilString, EPermission, PliCnfPresupuestoGlobal, PliCnfPresupuestoGlobalRubro, PliCnfPresupuestoAsistente, PliCnfSnapshotToken, PliCnfGuaranteeToken, ETipoPresupuesto, Token, ETypeColumn, SegFilter, EPdfSize, EPdfOrientation, EProceso, RequestPdf, PdfDocument, PliUsuario, EFormioKey, Email, InteractionApplicationUser, ETypeStaticInteraction, SendApplication, EDocumentState, Document, EBudgetError, EBudgetBuildType, ECnfPageSection, EProjectFrom, DatatableUtil, NgPliUtilModule, ApplicationBudgetTotal, Archive } from 'ng-pli-util';
21
21
  import * as i5 from 'primeng/dialog';
22
22
  import { DialogModule } from 'primeng/dialog';
23
23
  import * as i2$1 from 'primeng/dropdown';
@@ -32,7 +32,6 @@ import * as i4$3 from 'primeng/picklist';
32
32
  import { PickListModule } from 'primeng/picklist';
33
33
  import { BehaviorSubject, Subject, throwError, Observable } from 'rxjs';
34
34
  import { __awaiter } from 'tslib';
35
- import * as utils_ from 'formiojs-colfuturo/utils/utils';
36
35
  import * as i2 from 'ngx-toastr';
37
36
  import * as i4$1 from '@angular/router';
38
37
  import { map, catchError } from 'rxjs/operators';
@@ -42,11 +41,11 @@ import html2canvas from 'html2canvas';
42
41
  import html2pdf from 'html2pdf.js';
43
42
  import * as i1$1 from '@angular/platform-browser';
44
43
  import * as PDFJS_ from 'pdfjs-dist/build/pdf';
45
- import * as Panzoom from 'panzoom/dist/panzoom';
46
- import Panzoom__default from 'panzoom/dist/panzoom';
44
+ import * as panzoom_ from 'panzoom/dist/panzoom';
47
45
  import * as i1$2 from '@angular/fire/compat/auth';
48
46
  import 'jquery';
49
47
  import * as FileSaver from 'file-saver';
48
+ import * as utils_ from 'formiojs-colfuturo/utils/utils';
50
49
  import Cropper from 'cropperjs';
51
50
 
52
51
  class NgPliCommonsService {
@@ -104,6 +103,14 @@ class TasaCambioService {
104
103
  getAllTasaCambioLightInDate(date) {
105
104
  return this.httpClient.get(this.environment.host.backend.plis + 'tasacambio/getAllTasaCambioLightInDate', { params: new HttpParams().set('date', date) });
106
105
  }
106
+ getAllTasaCambioLightInDateByMonOrigenDestino(date, monOrigen, monDestino) {
107
+ return this.httpClient.get(this.environment.host.backend.plis + 'tasacambio/getAllTasaCambioLightInDateByMonOrigenDestino', {
108
+ params: new HttpParams()
109
+ .set('date', date)
110
+ .set('monOrigen', monOrigen)
111
+ .set('monDestino', monDestino)
112
+ });
113
+ }
107
114
  }
108
115
  TasaCambioService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TasaCambioService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
109
116
  TasaCambioService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: TasaCambioService, providedIn: 'root' });
@@ -1226,1452 +1233,925 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
1226
1233
  args: [LOCALE_ID]
1227
1234
  }] } });
1228
1235
 
1229
- // import * as utils_ from 'formiojs-proyectoscolfuturo/utils/utils';
1230
- const utils = utils_;
1231
- class FormioUtil {
1232
- /**
1233
- * It returns the components formated by panel
1234
- * @param components
1235
- * @return the object is [{panel: , items: [{ value: , label: }]}]
1236
- */
1237
- static getFormattedComponentsByPanel(components) {
1238
- let result = [];
1239
- if (components) {
1240
- let group = null;
1241
- let object = null;
1242
- for (const component of components) {
1243
- if (component[EFormioKey.TITLE_PANEL] !== group) {
1244
- if (group !== null) {
1245
- result.push(object);
1246
- }
1247
- object = { label: component[EFormioKey.TITLE_PANEL], items: [], toggle: false };
1248
- group = component[EFormioKey.TITLE_PANEL];
1249
- }
1250
- object.items.push({
1251
- label: component[EFormioKey.LABEL],
1252
- value: component[EFormioKey.KEY]
1253
- });
1254
- }
1255
- if (group !== null)
1256
- result.push(object);
1257
- }
1258
- return result;
1236
+ class FormService {
1237
+ constructor(environment, httpClient) {
1238
+ this.environment = environment;
1239
+ this.httpClient = httpClient;
1240
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1259
1241
  }
1260
- /**
1261
- * It returns the components are required according with data
1262
- * @param components array of components
1263
- * @param data
1264
- */
1265
- static getRequiredComponentsByData(components, data) {
1266
- // get the required components
1267
- let array = FormioUtil.getRequiredComponents(components);
1268
- // if not data then return components
1269
- if (data && array) {
1270
- for (let i = 0; i < array.length; i++) {
1271
- const component = array[i];
1272
- // use formio to check condition according with data
1273
- if (utils.checkCondition(component, null, data, null, null)) {
1274
- const key = component[EFormioKey.KEY];
1275
- if (data[key] != undefined && data[key] != null && data[key] != '') {
1276
- // remove item from array
1277
- array.splice(i, 1);
1278
- i--;
1279
- }
1280
- else {
1281
- if (component.customConditional &&
1282
- component.customConditional.includes('show')) {
1283
- // remove item from array
1284
- array.splice(i, 1);
1285
- i--;
1286
- }
1287
- }
1288
- }
1289
- else {
1290
- // remove item from array
1291
- array.splice(i, 1);
1292
- i--;
1293
- }
1294
- }
1295
- }
1296
- return array;
1242
+ /** It returns the list of form by prom codigo */
1243
+ getByPromCodigo(promCodigo) {
1244
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCodigo.toString()) });
1297
1245
  }
1298
- /**
1299
- * It returns the components that are required
1300
- * @param components array of components
1301
- */
1302
- static getUniqueComponents(components) {
1303
- return FormioUtil.getComponentsByFeature(components, [EFormioKey.UNIQUE], true);
1246
+ /** It returns the list of form by prom codigo */
1247
+ getAll() {
1248
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getAll');
1304
1249
  }
1305
- /**
1306
- * It returns the components that are required
1307
- * @param components array of components
1308
- */
1309
- static getRequiredComponents(components) {
1310
- return FormioUtil.getComponentsByFeature(components, [EFormioKey.VALIDATE, EFormioKey.REQUIRED], true);
1250
+ /** It returns a form by id */
1251
+ getById(id) {
1252
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getById', {
1253
+ params: new HttpParams().set('id', id)
1254
+ });
1255
+ }
1256
+ /** It saves a form */
1257
+ save(form) {
1258
+ return this.httpClient.post(this.environment.host.backend.configuration + 'form/save', form, this.headerJson);
1259
+ }
1260
+ saveFormMultiPromCodigo(reMultPromCodDto) {
1261
+ return this.httpClient.post(this.environment.host.backend.configuration + 'form/saveMultiaplicacionPromCod', reMultPromCodDto, this.headerJson);
1262
+ }
1263
+ /** It deletes a form by id */
1264
+ delete(id) {
1265
+ return this.httpClient.delete(this.environment.host.backend.configuration + 'form/delete', {
1266
+ params: new HttpParams().set('id', id)
1267
+ });
1268
+ }
1269
+ /** It returns the form according to profile have been setting up in form */
1270
+ getByPromCodigoAccordingToProfile(promCodigo, patCodigo, formId) {
1271
+ let params = new HttpParams()
1272
+ .set('promCodigo', promCodigo.toString())
1273
+ .set('patCodigo', patCodigo.toString())
1274
+ .set('formId', formId !== undefined ? formId : '');
1275
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigoAndProfile', { params: params });
1276
+ }
1277
+ /** It returns the form according to list of prom codigo */
1278
+ getByListPromCodigo(listPromCod) {
1279
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByListPromCodigo', { params: new HttpParams().set('listPromCodigo', listPromCod.toString()) });
1280
+ }
1281
+ /** It remove the redis cache of the form by prom codigo */
1282
+ removeFromCacheByPromCodigo(promCodigo) {
1283
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/removeFromCacheByPromCodigo', {
1284
+ params: new HttpParams().set('promCodigo', promCodigo.toString())
1285
+ });
1286
+ }
1287
+ /** It remove the redis cache of the form by prom codigo */
1288
+ removeFromCacheByPromCodigoAndTitle(promCodigo, title) {
1289
+ return this.httpClient.get(this.environment.host.backend.configuration +
1290
+ 'form/removeFromCacheByPromCodigoAndTitle', {
1291
+ params: new HttpParams()
1292
+ .set('promCodigo', promCodigo.toString())
1293
+ .set('title', title)
1294
+ });
1295
+ }
1296
+ /** It remove the redis cache of the form by prom codigo */
1297
+ removeFromCacheByPromCodigoAndProfile(promCodigo, patCodigo, formId, username) {
1298
+ return this.httpClient.get(this.environment.host.backend.configuration +
1299
+ 'form/removeFromCacheByPromCodigoAndProfile', {
1300
+ params: new HttpParams()
1301
+ .set('promCodigo', promCodigo.toString())
1302
+ .set('patCodigo', patCodigo.toString())
1303
+ .set('formId', formId)
1304
+ .set('username', username)
1305
+ });
1311
1306
  }
1312
1307
  /**
1313
- * It returns the components that have a specific feature defined by properties and value
1314
- * @param components array of components
1315
- * @param properties path of properties example [validate, required] or [unique]
1316
- * @param value the value that should have the property
1308
+ * Get form by Id
1309
+ * @param statusId
1317
1310
  */
1318
- static getComponentsByFeature(components, properties, value) {
1319
- let result = [];
1320
- if (properties && properties.length > 0) {
1321
- // get components
1322
- const fields = FormioUtil.getComponents(components);
1323
- // get first and last property
1324
- const firstProperty = properties[0];
1325
- const lastProperty = properties[properties.length - 1];
1326
- if (fields) {
1327
- // iterate the fields
1328
- for (let i = 0; i < fields.length; i++) {
1329
- // it contains the entire object field
1330
- const field = fields[i];
1331
- // it contains the current component and it is gonna be the component of every property
1332
- let component = field;
1333
- if (field[firstProperty]) {
1334
- for (let j = 0; j < properties.length; j++) {
1335
- const property = properties[j];
1336
- // if component.property doesnt exist then break
1337
- if (!component[property])
1338
- break;
1339
- if (property === lastProperty) {
1340
- // it is the last property so if the value is equals to component.lastproperty then it is added to result
1341
- if (component[property] == value)
1342
- result.push(field);
1343
- }
1344
- else {
1345
- // otherwise component will be equal to the component.property
1346
- component = component[property];
1311
+ getByStateId(statusId) {
1312
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByStateId', {
1313
+ params: new HttpParams().set('statusId', statusId)
1314
+ });
1315
+ }
1316
+ getConfigCloningFormMap(oldFormPPP, newFormPPP) {
1317
+ return this.httpClient.get(this.environment.host.backend.configuration + 'form/getConfigCloningFormMap', {
1318
+ params: new HttpParams()
1319
+ .set('oldFormPPP', oldFormPPP.toString())
1320
+ .set('newFormPPP', newFormPPP.toString())
1321
+ });
1322
+ }
1323
+ getListFormProjectSummaryConfigByPromCodigo(promCodigo, patCodigo) {
1324
+ return this.httpClient.get(this.environment.host.backend.configuration +
1325
+ 'form/getListFormProjectSummaryConfigByPromCodigo', {
1326
+ params: new HttpParams()
1327
+ .set('promCodigo', promCodigo.toString())
1328
+ .set('patCodigo', patCodigo.toString())
1329
+ });
1330
+ }
1331
+ }
1332
+ FormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1333
+ FormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, providedIn: 'root' });
1334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, decorators: [{
1335
+ type: Injectable,
1336
+ args: [{
1337
+ providedIn: 'root'
1338
+ }]
1339
+ }], ctorParameters: function () {
1340
+ return [{ type: undefined, decorators: [{
1341
+ type: Inject,
1342
+ args: ['environment']
1343
+ }] }, { type: i1.HttpClient }];
1344
+ } });
1345
+
1346
+ class TokenService {
1347
+ constructor(environment, httpClient, formService, currencyPipe) {
1348
+ this.environment = environment;
1349
+ this.httpClient = httpClient;
1350
+ this.formService = formService;
1351
+ this.currencyPipe = currencyPipe;
1352
+ }
1353
+ /** This promise allows to execute a function when consulting the form fields. */
1354
+ getFormFieldsByPromCode(promCodigo) {
1355
+ return new Promise((resolve, reject) => {
1356
+ // Search the dynamic form
1357
+ let lFormFieldsToken = null;
1358
+ this.formService.getByPromCodigo(promCodigo).subscribe({
1359
+ next: (arrayForms) => {
1360
+ if (arrayForms.length > 0) {
1361
+ for (const forms of arrayForms) {
1362
+ if (forms.components && forms.components.length > 0) {
1363
+ for (const components of forms.components) {
1364
+ if (components.components && components.components.length > 0) {
1365
+ for (const component of components.components) {
1366
+ if (component.columns && component.columns.length > 0) {
1367
+ for (const cComponents of component.columns) {
1368
+ if (cComponents.components &&
1369
+ cComponents.components.length > 0) {
1370
+ for (const iterator of cComponents.components) {
1371
+ if (iterator.type === 'address') {
1372
+ delete iterator.components;
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ }
1378
+ }
1379
+ }
1380
+ }
1347
1381
  }
1348
1382
  }
1349
1383
  }
1384
+ let form = arrayForms;
1385
+ if (!form ||
1386
+ !form[0] ||
1387
+ !form[0].promCodigo ||
1388
+ form[0].promCodigo != promCodigo) {
1389
+ // this.router.navigate(['404']);
1390
+ resolve(lFormFieldsToken);
1391
+ }
1392
+ lFormFieldsToken = [];
1393
+ for (let formComp of form) {
1394
+ let newComponents;
1395
+ let components = [];
1396
+ if (formComp.components) {
1397
+ newComponents = formComp.components;
1398
+ }
1399
+ else if (formComp.columns) {
1400
+ newComponents = formComp.columns;
1401
+ }
1402
+ if (newComponents && UtilString.isValid(formComp.title)) {
1403
+ lFormFieldsToken.push({
1404
+ title: {
1405
+ key: TokenService.getKeyFormulario(formComp.title),
1406
+ value: formComp.title,
1407
+ object: formComp
1408
+ },
1409
+ value: []
1410
+ });
1411
+ lFormFieldsToken[lFormFieldsToken.length - 1].value =
1412
+ this.getComponenetForm(components, newComponents, null, false, null);
1413
+ }
1414
+ }
1415
+ resolve(lFormFieldsToken);
1416
+ },
1417
+ error: (error) => {
1418
+ reject(error);
1350
1419
  }
1351
- }
1352
- }
1353
- return result;
1420
+ });
1421
+ });
1354
1422
  }
1355
- /**
1356
- * It returns the components
1357
- * @param components
1358
- */
1359
- static getComponents(components) {
1360
- return FormioUtil.getComponentsByRecursion(components, '', null);
1423
+ getFormFieldsByFormId(formId) {
1424
+ return new Promise((resolve, reject) => {
1425
+ // Search the dynamic form
1426
+ let lFormFieldsToken = null;
1427
+ this.formService.getById(formId).subscribe((result) => {
1428
+ let form = result;
1429
+ if (!form || !form[0]) {
1430
+ resolve(lFormFieldsToken);
1431
+ }
1432
+ lFormFieldsToken = [];
1433
+ for (let formComp of form) {
1434
+ let newComponents;
1435
+ let components = [];
1436
+ if (formComp.components) {
1437
+ newComponents = formComp.components;
1438
+ }
1439
+ else if (formComp.columns) {
1440
+ newComponents = formComp.columns;
1441
+ }
1442
+ if (newComponents && UtilString.isValid(formComp.title)) {
1443
+ lFormFieldsToken.push({
1444
+ title: {
1445
+ key: TokenService.getKeyFormulario(formComp.title),
1446
+ value: formComp.title,
1447
+ object: formComp
1448
+ },
1449
+ value: []
1450
+ });
1451
+ lFormFieldsToken[lFormFieldsToken.length - 1].value =
1452
+ this.getComponenetForm(components, newComponents, null, false, null);
1453
+ }
1454
+ }
1455
+ resolve(lFormFieldsToken);
1456
+ }, (error) => {
1457
+ reject(error);
1458
+ });
1459
+ });
1361
1460
  }
1362
- /**
1363
- * It returns the components array of the form by recursion
1364
- * @param components array of components
1365
- * @param titlePanel name of parent panel, so children components will inherit the panelName
1366
- * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
1367
- */
1368
- static getComponentsByRecursion(components, titlePanel, conditionalParent) {
1369
- // it contains the result array
1370
- let result = [];
1371
- if (components) {
1372
- // iterate over components
1373
- for (const component of components) {
1374
- // avoid the editgrid component ot if it has a different behavior it should have an else statement
1375
- if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
1376
- // if component is panel then titlePanel variable is changed, and it is gonna be inherited
1377
- if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
1378
- titlePanel = component[EFormioKey.TITLE];
1461
+ /** This promise allows to execute a function when consulting the form fields. */
1462
+ getFormPanelsByPromCode(promCodigo) {
1463
+ return new Promise((resolve, reject) => {
1464
+ // Search the dynamic form
1465
+ let lFormPannelsToken = null;
1466
+ this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
1467
+ let form = result;
1468
+ if (!form ||
1469
+ !form[0] ||
1470
+ !form[0].promCodigo ||
1471
+ form[0].promCodigo != promCodigo) {
1472
+ // this.router.navigate(['404']);
1473
+ resolve(lFormPannelsToken);
1474
+ }
1475
+ lFormPannelsToken = [];
1476
+ for (let formComp of form) {
1477
+ let newComponents;
1478
+ let components = [];
1479
+ if (formComp.components) {
1480
+ newComponents = formComp.components;
1379
1481
  }
1380
- if ((typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
1381
- typeof component[EFormioKey.COLUMNS] !== 'undefined') &&
1382
- component["type"] !== "address") {
1383
- if (component["type"] !== "address") {
1384
- // resolve conditional parent conditional
1385
- const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1386
- // change condition
1387
- if (conditional)
1388
- conditionalParent = conditional;
1389
- // it contains the subcomponents depending on the value of component if it has components or columns
1390
- let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
1391
- ? component[EFormioKey.COMPONENTS]
1392
- : component[EFormioKey.COLUMNS];
1393
- // if component has subComponents, then execute the recursion function to get the recursionnResult
1394
- const recursionResult = FormioUtil.getComponentsByRecursion(subComponents, titlePanel, conditionalParent);
1395
- // if recursion result then result concats the recursionResult
1396
- if (recursionResult)
1397
- result = result.concat(recursionResult);
1398
- // reset conditional Parent
1399
- if (component[EFormioKey.ID] == conditionalParent.id)
1400
- conditionalParent = undefined;
1401
- }
1402
- else {
1403
- result.push(component);
1404
- }
1482
+ else if (formComp.columns) {
1483
+ newComponents = formComp.columns;
1405
1484
  }
1406
- else {
1407
- // avoid the component type button
1408
- if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
1409
- component[EFormioKey.KEY] &&
1410
- component[EFormioKey.LABEL]) {
1411
- // resolve conditional conditional object
1412
- let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1413
- if (!conditional)
1414
- conditional = conditionalParent;
1415
- component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
1416
- component[EFormioKey.CUSTOM_CONDITIONAL] =
1417
- conditional[EFormioKey.CUSTOM_CONDITIONAL];
1418
- // add namPanel as property
1419
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1420
- // add component to the result
1421
- result.push(component);
1422
- }
1485
+ if (newComponents && UtilString.isValid(formComp.title)) {
1486
+ lFormPannelsToken.push({
1487
+ title: {
1488
+ key: TokenService.getKeyFormulario(formComp.title),
1489
+ value: formComp.title,
1490
+ object: formComp
1491
+ },
1492
+ value: []
1493
+ });
1494
+ lFormPannelsToken[lFormPannelsToken.length - 1].value =
1495
+ this.getPanelComponenet(components, newComponents, null);
1423
1496
  }
1424
1497
  }
1425
- }
1426
- }
1427
- return result;
1498
+ resolve(lFormPannelsToken);
1499
+ }, (error) => {
1500
+ reject(error);
1501
+ });
1502
+ });
1428
1503
  }
1429
1504
  /**
1430
- * It returns the components
1505
+ * A recursive method to get all the information of the editGrid dynamic form
1431
1506
  * @param components
1432
- * @param keepEditGrids
1433
- */
1434
- static getComponentsWithEditGrids(components) {
1435
- return FormioUtil.getComponentsByRecursionWithEditGrids(components, '', null);
1436
- }
1437
- /**
1438
- * It returns the components array of the form by recursion
1439
- * @param components array of components
1440
- * @param titlePanel name of parent panel, so children components will inherit the panelName
1441
- * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
1507
+ * @param form
1442
1508
  */
1443
- static getComponentsByRecursionWithEditGrids(components, titlePanel, conditionalParent) {
1444
- // it contains the result array
1445
- let result = [];
1446
- if (components) {
1447
- // iterate over components
1448
- for (const component of components) {
1449
- // avoid the editgrid component ot if it has a different behavior it should have an else statement
1450
- // if component is panel then titlePanel variable is changed, and it is gonna be inherited
1451
- if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
1452
- titlePanel = component[EFormioKey.TITLE];
1453
- }
1454
- if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
1455
- typeof component[EFormioKey.COLUMNS] !== 'undefined') {
1456
- // resolve conditional parent conditional
1457
- const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1458
- // change condition
1459
- if (conditional)
1460
- conditionalParent = conditional;
1461
- // it contains the subcomponents depending on the value of component if it has components or columns
1462
- let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
1463
- ? component[EFormioKey.COMPONENTS]
1464
- : component[EFormioKey.COLUMNS];
1465
- if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID) {
1466
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1467
- result.push(component);
1468
- }
1469
- // if component has subComponents, then execute the recursion function to get the recursionnResult
1470
- const recursionResult = FormioUtil.getComponentsByRecursionWithEditGrids(subComponents, titlePanel, conditionalParent);
1471
- // if recursion result then result concats the recursionResult
1472
- if (recursionResult)
1473
- result = result.concat(recursionResult);
1474
- // reset conditional Parent
1475
- if (component[EFormioKey.ID] == conditionalParent.id)
1476
- conditionalParent = undefined;
1509
+ getPanelComponenet(components, form, panelName) {
1510
+ for (let formComp of form) {
1511
+ if (formComp.type === 'panel') {
1512
+ components.push(formComp);
1513
+ }
1514
+ else if (formComp.components || formComp.columns) {
1515
+ let newComponents;
1516
+ if (formComp.components) {
1517
+ newComponents = formComp.components;
1477
1518
  }
1478
- else {
1479
- // avoid the component type button
1480
- if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
1481
- component[EFormioKey.KEY] &&
1482
- component[EFormioKey.LABEL]) {
1483
- // resolve conditional conditional object
1484
- let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1485
- if (!conditional)
1486
- conditional = conditionalParent;
1487
- component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
1488
- component[EFormioKey.CUSTOM_CONDITIONAL] =
1489
- conditional[EFormioKey.CUSTOM_CONDITIONAL];
1490
- // add namPanel as property
1491
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1492
- // add component to the result
1493
- result.push(component);
1494
- }
1519
+ else if (formComp.columns) {
1520
+ newComponents = formComp.columns;
1495
1521
  }
1522
+ components = this.getPanelComponenet(components, newComponents, panelName);
1496
1523
  }
1497
1524
  }
1498
- return result;
1525
+ return components;
1499
1526
  }
1500
1527
  /**
1501
- * It resolve the inheritance conditional
1502
- * @param conditionalObject
1503
- * @param conditional
1504
- * @param customConditional
1505
- */
1506
- static resolveInheritanceConditional(conditionalObject, conditional, customConditional, parentId) {
1507
- // validate if there is a condition with the new fields
1508
- if (!conditionalObject ||
1509
- customConditional ||
1510
- (conditional && conditional[EFormioKey.WHEN] && conditional[EFormioKey.EQ]) ||
1511
- (conditional && conditional[EFormioKey.JSON])) {
1512
- return { conditional: conditional, customConditional: customConditional, id: parentId };
1513
- }
1514
- return null;
1515
- }
1516
- /**
1517
- * It returns the edit grid components
1528
+ * A recursive method to get all the information of the components a columns of the dynamic form
1518
1529
  * @param components
1530
+ * @param form
1519
1531
  */
1520
- static getEditGridKeyLabels(components) {
1521
- return FormioUtil.getEditGridKeyLabelsByRecursion(components, '', null);
1522
- }
1523
- /**
1524
- * It returns the components edit grid array of the form by recursion
1525
- * @param components array of components
1526
- * @param titlePanel name of parent panel, so children components will inherit the panelName
1527
- * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
1528
- */
1529
- static getEditGridKeyLabelsByRecursion(components, titlePanel, conditionalParent) {
1530
- // it contains the result array
1531
- let result = [];
1532
- if (components) {
1533
- // iterate over components
1534
- for (const component of components) {
1535
- // if component is panel then titlePanel variable is changed, and it is gonna be inherited
1536
- if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
1537
- titlePanel = component[EFormioKey.TITLE];
1538
- }
1539
- if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
1540
- typeof component[EFormioKey.COLUMNS] !== 'undefined') {
1541
- // resolve conditional parent conditional
1542
- const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1543
- // change condition
1544
- if (conditional)
1545
- conditionalParent = conditional;
1546
- // it contains the subcomponents depending on the value of component if it has components or columns
1547
- let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
1548
- ? component[EFormioKey.COMPONENTS]
1549
- : component[EFormioKey.COLUMNS];
1550
- if (component[EFormioKey.TYPE] == EFormioKey.EDITGRID) {
1551
- // add namPanel as property
1552
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1553
- // add component to the result
1554
- result.push(component);
1555
- }
1556
- else {
1557
- // if component has subComponents, then execute the recursion function to get the recursionnResult
1558
- const recursionResult = FormioUtil.getEditGridKeyLabelsByRecursion(subComponents, titlePanel, conditionalParent);
1559
- // if recursion result then result concats the recursionResult
1560
- if (recursionResult)
1561
- result = result.concat(recursionResult);
1562
- // reset conditional Parent
1563
- if (component[EFormioKey.ID] == conditionalParent.id)
1564
- conditionalParent = undefined;
1532
+ getComponenetForm(components, form, panelName, editgrid, editGridKey) {
1533
+ for (let formComp of form) {
1534
+ if (formComp.components || formComp.columns) {
1535
+ let newComponents;
1536
+ if (formComp.components) {
1537
+ newComponents = formComp.components;
1538
+ if (formComp.type === 'editgrid') {
1539
+ editgrid = true;
1540
+ editGridKey = formComp.key;
1565
1541
  }
1566
1542
  }
1567
- else {
1543
+ else if (formComp.columns) {
1544
+ newComponents = formComp.columns;
1545
+ }
1546
+ if (formComp.type && formComp.type === 'panel') {
1547
+ panelName = formComp.title;
1568
1548
  }
1549
+ components = this.getComponenetForm(components, newComponents, panelName, editgrid, editGridKey);
1550
+ }
1551
+ else {
1552
+ formComp.panelName = panelName;
1553
+ formComp.editgrid = editgrid;
1554
+ formComp.editGridKey = editGridKey;
1555
+ components.push(formComp);
1569
1556
  }
1570
1557
  }
1571
- return result;
1558
+ return components;
1572
1559
  }
1573
- /**
1574
- * It returns the components
1575
- * @param components
1576
- * @param keepEditGrids
1577
- */
1578
- static getComponentsIntoEditGrids(components, editGridName) {
1579
- return FormioUtil.getComponentsByRecursionIntoEditGrids(components, '', null, editGridName, false);
1560
+ /** This promise allows to execute a function when consulting the form fields. */
1561
+ getFormEditGridFieldsByPromCode(promCodigo) {
1562
+ return new Promise((resolve, reject) => {
1563
+ // Search the dynamic form
1564
+ let lFormFieldsToken = null;
1565
+ this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
1566
+ let form = result;
1567
+ if (!form ||
1568
+ !form[0] ||
1569
+ !form[0].promCodigo ||
1570
+ form[0].promCodigo != promCodigo) {
1571
+ // this.router.navigate(['404']);
1572
+ resolve(lFormFieldsToken);
1573
+ }
1574
+ lFormFieldsToken = [];
1575
+ for (let formComp of form) {
1576
+ let newComponents;
1577
+ let components = [];
1578
+ if (formComp.components) {
1579
+ newComponents = formComp.components;
1580
+ }
1581
+ else if (formComp.columns) {
1582
+ newComponents = formComp.columns;
1583
+ }
1584
+ if (newComponents && UtilString.isValid(formComp.title)) {
1585
+ lFormFieldsToken.push({
1586
+ title: {
1587
+ key: TokenService.getKeyFormulario(formComp.title),
1588
+ value: formComp.title,
1589
+ object: formComp
1590
+ },
1591
+ value: []
1592
+ });
1593
+ lFormFieldsToken[lFormFieldsToken.length - 1].value =
1594
+ this.getEditGridComponenet(components, newComponents, null);
1595
+ }
1596
+ }
1597
+ resolve(lFormFieldsToken);
1598
+ }, (error) => {
1599
+ reject(error);
1600
+ });
1601
+ });
1580
1602
  }
1581
1603
  /**
1582
- * It returns the components array of the form by recursion
1583
- * @param components array of components
1584
- * @param titlePanel name of parent panel, so children components will inherit the panelName
1585
- * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
1604
+ * A recursive method to get all the information of the editGrid dynamic form
1605
+ * @param components
1606
+ * @param form
1586
1607
  */
1587
- static getComponentsByRecursionIntoEditGrids(components, titlePanel, conditionalParent, editGridName, existEditGrid) {
1588
- // it contains the result array
1589
- let result = [];
1590
- if (components) {
1591
- // iterate over components
1592
- for (const component of components) {
1593
- // avoid the editgrid component ot if it has a different behavior it should have an else statement
1594
- // if component is panel then titlePanel variable is changed, and it is gonna be inherited
1595
- if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
1596
- titlePanel = component[EFormioKey.TITLE];
1608
+ getEditGridComponenet(components, form, panelName) {
1609
+ for (let formComp of form) {
1610
+ if (formComp.type === 'editgrid') {
1611
+ formComp.panelName = panelName;
1612
+ components.push(formComp);
1613
+ }
1614
+ else if (formComp.components || formComp.columns) {
1615
+ let newComponents;
1616
+ if (formComp.components) {
1617
+ newComponents = formComp.components;
1597
1618
  }
1598
- if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
1599
- typeof component[EFormioKey.COLUMNS] !== 'undefined') {
1600
- // resolve conditional parent conditional
1601
- const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1602
- // change condition
1603
- if (conditional)
1604
- conditionalParent = conditional;
1605
- // it contains the subcomponents depending on the value of component if it has components or columns
1606
- let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
1607
- ? component[EFormioKey.COMPONENTS]
1608
- : component[EFormioKey.COLUMNS];
1609
- if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID &&
1610
- component['key'] == editGridName) {
1611
- existEditGrid = true;
1612
- if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
1613
- typeof component[EFormioKey.COLUMNS] !== 'undefined') {
1614
- // resolve conditional parent conditional
1615
- const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1616
- // change condition
1617
- if (conditional)
1618
- conditionalParent = conditional;
1619
- // it contains the subcomponents depending on the value of component if it has components or columns
1620
- let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
1621
- ? component[EFormioKey.COMPONENTS]
1622
- : component[EFormioKey.COLUMNS];
1623
- // if component has subComponents, then execute the recursion function to get the recursionnResult
1624
- const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
1625
- // if recursion result then result concats the recursionResult
1626
- if (recursionResult)
1627
- result = result.concat(recursionResult);
1628
- // reset conditional Parent
1629
- if (component && conditionalParent) {
1630
- if (component[EFormioKey.ID] == conditionalParent.id)
1631
- conditionalParent = undefined;
1632
- }
1633
- }
1634
- else {
1635
- // avoid the component type button
1636
- if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
1637
- component[EFormioKey.KEY] &&
1638
- component[EFormioKey.LABEL] &&
1639
- existEditGrid) {
1640
- // resolve conditional conditional object
1641
- let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1642
- if (!conditional)
1643
- conditional = conditionalParent;
1644
- component[EFormioKey.CONDITIONAL] =
1645
- conditional[EFormioKey.CONDITIONAL];
1646
- component[EFormioKey.CUSTOM_CONDITIONAL] =
1647
- conditional[EFormioKey.CUSTOM_CONDITIONAL];
1648
- // add namPanel as property
1649
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1650
- // add component to the result
1651
- result.push(component);
1652
- }
1653
- }
1654
- }
1655
- // if component has subComponents, then execute the recursion function to get the recursionnResult
1656
- const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
1657
- // if recursion result then result concats the recursionResult
1658
- if (recursionResult)
1659
- result = result.concat(recursionResult);
1660
- // reset conditional Parent
1661
- if (component && conditionalParent) {
1662
- if (component[EFormioKey.ID] == conditionalParent.id)
1663
- conditionalParent = undefined;
1664
- }
1619
+ else if (formComp.columns) {
1620
+ newComponents = formComp.columns;
1665
1621
  }
1666
- else {
1667
- // avoid the component type button
1668
- if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
1669
- component[EFormioKey.KEY] &&
1670
- component[EFormioKey.LABEL] &&
1671
- existEditGrid) {
1672
- // resolve conditional conditional object
1673
- let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
1674
- if (!conditional)
1675
- conditional = conditionalParent;
1676
- component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
1677
- component[EFormioKey.CUSTOM_CONDITIONAL] =
1678
- conditional[EFormioKey.CUSTOM_CONDITIONAL];
1679
- // add namPanel as property
1680
- component[EFormioKey.TITLE_PANEL] = titlePanel;
1681
- // add component to the result
1682
- result.push(component);
1683
- }
1622
+ if (formComp.type && formComp.type === 'panel') {
1623
+ panelName = formComp.title;
1684
1624
  }
1625
+ components = this.getEditGridComponenet(components, newComponents, panelName);
1685
1626
  }
1686
1627
  }
1687
- return result;
1628
+ return components;
1688
1629
  }
1689
- /**
1690
- * Create 2 jason objects of data form by component key and other by component key and title form key
1691
- * @param dataForm dataForm model object
1692
- * @returns Object of 2 element
1693
- */
1694
- static createListDataByDataFormList(dataForm, listForm) {
1695
- let listData = {};
1696
- let listDataByForm = {};
1697
- if (dataForm && dataForm.length > 0) {
1698
- listData = {};
1699
- listDataByForm = {};
1700
- let dForm;
1701
- for (dForm of dataForm) {
1702
- if (!dForm.data) {
1703
- continue;
1704
- }
1705
- const form = listForm.find(function (formTmp) {
1706
- return formTmp.id == dForm.formId;
1707
- });
1708
- if (!form) {
1709
- //console.error('No se encontró el formulario con id ' + dForm.formId);
1710
- continue;
1711
- }
1712
- const keyFormTitle = TokenService.getKeyFormulario(form.title) + '_';
1713
- for (const key in dForm.data) {
1714
- listData[key] = dForm.data[key];
1715
- listDataByForm[keyFormTitle + key] = dForm.data[key];
1716
- }
1717
- }
1718
- }
1719
- return {
1720
- listData: listData,
1721
- listDataByForm: listDataByForm
1722
- };
1723
- }
1724
- /**
1725
- * It returns the components
1726
- * @param components
1727
- */
1728
- static getPanelComponents(components) {
1729
- return FormioUtil.getComponentsByPanel(components);
1630
+ /** It returns the tokens by promCodigo */
1631
+ getListByPromCodigo(promCode) {
1632
+ return this.httpClient.get(this.environment.host.backend.configuration + 'token/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCode.toString()) });
1730
1633
  }
1731
- /**
1732
- * It returns the components array of the form
1733
- * @param components array of components
1734
- */
1735
- static getComponentsByPanel(components) {
1736
- // it contains the result array
1737
- let result = [];
1738
- if (components) {
1739
- // iterate over components
1740
- for (const component of components) {
1741
- // avoid the editgrid component ot if it has a different behavior it should have an else statement
1742
- if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
1743
- // if component is panel then titlePanel variable is changed, and it is gonna be inherited
1744
- if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
1745
- result.push(component);
1746
- }
1747
- }
1748
- }
1749
- }
1750
- return result;
1634
+ /** It returns the token by id */
1635
+ getById(id) {
1636
+ return this.httpClient.get(this.environment.host.backend.configuration + 'token/getById', {
1637
+ params: new HttpParams().set('id', id.toString())
1638
+ });
1751
1639
  }
1752
- }
1753
-
1754
- class FormService {
1755
- constructor(environment, httpClient) {
1756
- this.environment = environment;
1757
- this.httpClient = httpClient;
1758
- this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
1640
+ /** It deletes a form by id */
1641
+ delete(id) {
1642
+ return this.httpClient.delete(this.environment.host.backend.configuration + 'token/delete', { params: new HttpParams().set('id', id) });
1759
1643
  }
1760
- /** It returns the list of form by prom codigo */
1761
- getByPromCodigo(promCodigo) {
1762
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCodigo.toString()) });
1644
+ /** It saves the token */
1645
+ save(token) {
1646
+ return this.httpClient.post(this.environment.host.backend.configuration + 'token/save', token, HEADER_JSON);
1763
1647
  }
1764
- /** It returns the list of form by prom codigo */
1765
- getAll() {
1766
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getAll');
1648
+ static getKeyFormulario(formTitle) {
1649
+ if (UtilString.isValid(formTitle)) {
1650
+ return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM) +
1651
+ UtilString.replaceAccentSpacesOthers(formTitle).replace(/_/g, '-'));
1652
+ }
1653
+ return '';
1767
1654
  }
1768
- /** It returns a form by id */
1769
- getById(id) {
1770
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getById', {
1771
- params: new HttpParams().set('id', id)
1772
- });
1655
+ /** It returns the unique verification code */
1656
+ getUniqueVerificationCode(login, token) {
1657
+ return this.httpClient.get(this.environment.host.backend.documentsRepository +
1658
+ 'documento/consultarCodigoUnico/' +
1659
+ login +
1660
+ '/' +
1661
+ token, { params: new HttpParams() });
1773
1662
  }
1774
- /** It saves a form */
1775
- save(form) {
1776
- return this.httpClient.post(this.environment.host.backend.configuration + 'form/save', form, this.headerJson);
1663
+ /** It send the information to copy the Document viewer */
1664
+ copyDocumentInformationViewer(login, token, uniqueCode, documentURL, documentName) {
1665
+ let infoDocumento = {
1666
+ codigoUnico: uniqueCode,
1667
+ rutaDocumento: documentURL,
1668
+ documentName: documentName
1669
+ };
1670
+ return this.httpClient.post(this.environment.host.backend.documentsRepository +
1671
+ 'documento/adicionarDocumento/' +
1672
+ login +
1673
+ '/' +
1674
+ token, infoDocumento, HEADER_JSON);
1777
1675
  }
1778
- saveFormMultiPromCodigo(reMultPromCodDto) {
1779
- return this.httpClient.post(this.environment.host.backend.configuration + 'form/saveMultiaplicacionPromCod', reMultPromCodDto, this.headerJson);
1676
+ static getKeyBudget() {
1677
+ return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET);
1780
1678
  }
1781
- /** It deletes a form by id */
1782
- delete(id) {
1783
- return this.httpClient.delete(this.environment.host.backend.configuration + 'form/delete', {
1784
- params: new HttpParams().set('id', id)
1785
- });
1679
+ static getKeyDocument() {
1680
+ return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_DOCUMENTO);
1786
1681
  }
1787
- /** It returns the form according to profile have been setting up in form */
1788
- getByPromCodigoAccordingToProfile(promCodigo, patCodigo, formId) {
1789
- let params = new HttpParams()
1790
- .set('promCodigo', promCodigo.toString())
1791
- .set('patCodigo', patCodigo.toString())
1792
- .set('formId', formId !== undefined ? formId : '');
1793
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByPromCodigoAndProfile', { params: params });
1682
+ static getKeyTask() {
1683
+ return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL);
1794
1684
  }
1795
- /** It returns the form according to list of prom codigo */
1796
- getByListPromCodigo(listPromCod) {
1797
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByListPromCodigo', { params: new HttpParams().set('listPromCodigo', listPromCod.toString()) });
1685
+ static getKeyStatic() {
1686
+ return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC);
1798
1687
  }
1799
- /** It remove the redis cache of the form by prom codigo */
1800
- removeFromCacheByPromCodigo(promCodigo) {
1801
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/removeFromCacheByPromCodigo', {
1802
- params: new HttpParams().set('promCodigo', promCodigo.toString())
1803
- });
1688
+ static getKeyCalculated(token) {
1689
+ return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED) +
1690
+ '_' +
1691
+ UtilString.replaceAccentSpacesOthers(token.name));
1804
1692
  }
1805
- /** It remove the redis cache of the form by prom codigo */
1806
- removeFromCacheByPromCodigoAndTitle(promCodigo, title) {
1807
- return this.httpClient.get(this.environment.host.backend.configuration +
1808
- 'form/removeFromCacheByPromCodigoAndTitle', {
1809
- params: new HttpParams()
1810
- .set('promCodigo', promCodigo.toString())
1811
- .set('title', title)
1812
- });
1693
+ static getKeySnapshot(token) {
1694
+ return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_SNAPSHOT) +
1695
+ '_' +
1696
+ UtilString.replaceAccentSpacesOthers(token.name));
1813
1697
  }
1814
- /** It remove the redis cache of the form by prom codigo */
1815
- removeFromCacheByPromCodigoAndProfile(promCodigo, patCodigo, formId, username) {
1816
- return this.httpClient.get(this.environment.host.backend.configuration +
1817
- 'form/removeFromCacheByPromCodigoAndProfile', {
1818
- params: new HttpParams()
1819
- .set('promCodigo', promCodigo.toString())
1820
- .set('patCodigo', patCodigo.toString())
1821
- .set('formId', formId)
1822
- .set('username', username)
1823
- });
1698
+ static getKeyGuarantee(token) {
1699
+ return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_GUARANTEE) +
1700
+ '_' +
1701
+ UtilString.replaceAccentSpacesOthers(token.name));
1824
1702
  }
1825
1703
  /**
1826
- * Get form by Id
1827
- * @param statusId
1704
+ * Return a value that represent the type of label: 1=Form, 2=Budget, 3=Static, 4=Calculated
1705
+ * @param key Value to evalueate
1828
1706
  */
1829
- getByStateId(statusId) {
1830
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getByStateId', {
1831
- params: new HttpParams().set('statusId', statusId)
1832
- });
1833
- }
1834
- getConfigCloningFormMap(oldFormPPP, newFormPPP) {
1835
- return this.httpClient.get(this.environment.host.backend.configuration + 'form/getConfigCloningFormMap', {
1836
- params: new HttpParams()
1837
- .set('oldFormPPP', oldFormPPP.toString())
1838
- .set('newFormPPP', newFormPPP.toString())
1839
- });
1707
+ static getKeyType(key) {
1708
+ key = key.replace('{', '').replace('}', '');
1709
+ key = key.substring(1, key.indexOf('_'));
1710
+ if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM))) {
1711
+ return 1;
1712
+ }
1713
+ else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET))) {
1714
+ return 2;
1715
+ }
1716
+ else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC))) {
1717
+ return 3;
1718
+ }
1719
+ else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED))) {
1720
+ return 4;
1721
+ }
1722
+ else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL))) {
1723
+ return 5;
1724
+ }
1725
+ return null;
1840
1726
  }
1841
- getListFormProjectSummaryConfigByPromCodigo(promCodigo, patCodigo) {
1842
- return this.httpClient.get(this.environment.host.backend.configuration +
1843
- 'form/getListFormProjectSummaryConfigByPromCodigo', {
1844
- params: new HttpParams()
1845
- .set('promCodigo', promCodigo.toString())
1846
- .set('patCodigo', patCodigo.toString())
1847
- });
1727
+ /**
1728
+ * Depends of the type of formFieldToken return de value of the valueData
1729
+ * @param formFieldToken
1730
+ * @param valueData
1731
+ */
1732
+ getValueFromFormField(formFieldToken, valueData) {
1733
+ if (typeof valueData == 'object') {
1734
+ if (formFieldToken.type) {
1735
+ if (formFieldToken.type == 'address') {
1736
+ return valueData.formatted_address;
1737
+ }
1738
+ if (formFieldToken.type == 'select' &&
1739
+ formFieldToken.searchField &&
1740
+ valueData.hasOwnProperty(formFieldToken.searchField)) {
1741
+ return valueData[formFieldToken.searchField];
1742
+ }
1743
+ }
1744
+ }
1745
+ return valueData;
1848
1746
  }
1849
- }
1850
- FormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1851
- FormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, providedIn: 'root' });
1852
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: FormService, decorators: [{
1853
- type: Injectable,
1854
- args: [{
1855
- providedIn: 'root'
1856
- }]
1857
- }], ctorParameters: function () {
1858
- return [{ type: undefined, decorators: [{
1859
- type: Inject,
1860
- args: ['environment']
1861
- }] }, { type: i1.HttpClient }];
1862
- } });
1863
-
1864
- class TokenService {
1865
- constructor(environment, httpClient, formService, currencyPipe) {
1866
- this.environment = environment;
1867
- this.httpClient = httpClient;
1868
- this.formService = formService;
1869
- this.currencyPipe = currencyPipe;
1747
+ /**
1748
+ * Try to find the token in the stringText and replace with dataValue. If detect format of number or date try to format the dataValue
1749
+ * @param stringText
1750
+ * @param token
1751
+ * @param dataValue
1752
+ */
1753
+ replaceToken(stringText, token, dataValue) {
1754
+ let valueReplace = null;
1755
+ if (token && token[0] == '#') {
1756
+ let typeToken = token.substring(1, token.indexOf('('));
1757
+ if (typeToken == 'date') {
1758
+ let dateFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
1759
+ dateFormat = dateFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
1760
+ let dateValue = DateUtil.getDate(dataValue);
1761
+ if (dateValue) {
1762
+ valueReplace = DateUtil.getMoment(dateValue).format(dateFormat);
1763
+ }
1764
+ else {
1765
+ valueReplace = '';
1766
+ }
1767
+ }
1768
+ else if (typeToken == 'number') {
1769
+ let numberValue = Number(dataValue);
1770
+ if (numberValue != undefined && !isNaN(numberValue)) {
1771
+ let numberFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
1772
+ numberFormat = numberFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
1773
+ valueReplace = this.currencyPipe.transform(numberValue, this.locale, '', numberFormat);
1774
+ }
1775
+ else {
1776
+ console.log('El dato [' +
1777
+ dataValue +
1778
+ '] para el token [' +
1779
+ token +
1780
+ '] tipo númerico no es valido');
1781
+ valueReplace = '';
1782
+ }
1783
+ }
1784
+ else {
1785
+ console.log('tipo de token indefinido. [typeToken[' + typeToken + ']]');
1786
+ }
1787
+ }
1788
+ else if (token && token[0] == '$') {
1789
+ valueReplace = dataValue;
1790
+ }
1791
+ else {
1792
+ console.log('El token no es valido. [token[' + token + ']]');
1793
+ }
1794
+ if (stringText && valueReplace !== null) {
1795
+ // replace text in a more efficient way
1796
+ stringText = stringText.split(token).join(valueReplace);
1797
+ //stringText = stringText.replace(token, valueReplace);
1798
+ }
1799
+ return stringText;
1870
1800
  }
1871
- /** This promise allows to execute a function when consulting the form fields. */
1872
- getFormFieldsByPromCode(promCodigo) {
1873
- return new Promise((resolve, reject) => {
1874
- // Search the dynamic form
1875
- let lFormFieldsToken = null;
1876
- this.formService.getByPromCodigo(promCodigo).subscribe({
1877
- next: (arrayForms) => {
1878
- if (arrayForms.length > 0) {
1879
- for (const forms of arrayForms) {
1880
- let components = [];
1881
- components.push(...FormioUtil.getComponents(forms.components));
1882
- if (forms.components && forms.components.length > 0) {
1883
- for (const components of forms.components) {
1884
- if (components.components && components.components.length > 0) {
1885
- for (const component of components.components) {
1886
- if (component.columns && component.columns.length > 0) {
1887
- for (const cComponents of component.columns) {
1888
- if (cComponents.components &&
1889
- cComponents.components.length > 0) {
1890
- for (const iterator of cComponents.components) {
1891
- if (iterator.type === 'address') {
1892
- delete iterator.components;
1893
- }
1894
- }
1895
- }
1896
- }
1897
- }
1898
- }
1899
- }
1900
- }
1901
- }
1902
- }
1903
- }
1904
- let form = arrayForms;
1905
- if (!form ||
1906
- !form[0] ||
1907
- !form[0].promCodigo ||
1908
- form[0].promCodigo != promCodigo) {
1909
- // this.router.navigate(['404']);
1910
- resolve(lFormFieldsToken);
1911
- }
1912
- lFormFieldsToken = [];
1913
- for (let formComp of form) {
1914
- let newComponents;
1915
- let components = [];
1916
- if (formComp.components) {
1917
- newComponents = formComp.components;
1918
- }
1919
- else if (formComp.columns) {
1920
- newComponents = formComp.columns;
1921
- }
1922
- if (newComponents && UtilString.isValid(formComp.title)) {
1923
- lFormFieldsToken.push({
1924
- title: {
1925
- key: TokenService.getKeyFormulario(formComp.title),
1926
- value: formComp.title,
1927
- object: formComp
1928
- },
1929
- value: []
1930
- });
1931
- lFormFieldsToken[lFormFieldsToken.length - 1].value =
1932
- this.getComponenetForm(components, newComponents, null, false, null);
1801
+ getListTokensByStringSegmentation(stringText) {
1802
+ const arrayToken = stringText.match(/\${([^}]+)\}/g);
1803
+ const arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
1804
+ const arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
1805
+ let arrayTokenFormatted = [];
1806
+ if (arrayTokenFormattedDate &&
1807
+ arrayTokenFormattedDate.length > 0 &&
1808
+ arrayTokenFormattedNumber &&
1809
+ arrayTokenFormattedNumber.length > 0) {
1810
+ arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
1811
+ }
1812
+ else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
1813
+ arrayTokenFormatted = arrayTokenFormattedDate.slice();
1814
+ }
1815
+ else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
1816
+ arrayTokenFormatted = arrayTokenFormattedNumber.slice();
1817
+ }
1818
+ const result = [];
1819
+ if (arrayToken) {
1820
+ for (const token of arrayToken) {
1821
+ const infoToken = { key: token, value: token };
1822
+ if (arrayTokenFormatted) {
1823
+ for (const tokenFormatted of arrayTokenFormatted) {
1824
+ const index = tokenFormatted.indexOf(token);
1825
+ if (index >= 0) {
1826
+ infoToken.value = tokenFormatted;
1827
+ break;
1933
1828
  }
1934
1829
  }
1935
- resolve(lFormFieldsToken);
1936
- },
1937
- error: (error) => {
1938
- reject(error);
1939
1830
  }
1940
- });
1941
- });
1831
+ result.push(infoToken);
1832
+ }
1833
+ }
1834
+ return result;
1942
1835
  }
1943
- getFormFieldsByFormId(formId) {
1944
- return new Promise((resolve, reject) => {
1945
- // Search the dynamic form
1946
- let lFormFieldsToken = null;
1947
- this.formService.getById(formId).subscribe((result) => {
1948
- let form = result;
1949
- if (!form || !form[0]) {
1950
- resolve(lFormFieldsToken);
1951
- }
1952
- lFormFieldsToken = [];
1953
- for (let formComp of form) {
1954
- let newComponents;
1955
- let components = [];
1956
- if (formComp.components) {
1957
- newComponents = formComp.components;
1958
- }
1959
- else if (formComp.columns) {
1960
- newComponents = formComp.columns;
1961
- }
1962
- if (newComponents && UtilString.isValid(formComp.title)) {
1963
- lFormFieldsToken.push({
1964
- title: {
1965
- key: TokenService.getKeyFormulario(formComp.title),
1966
- value: formComp.title,
1967
- object: formComp
1968
- },
1969
- value: []
1970
- });
1971
- lFormFieldsToken[lFormFieldsToken.length - 1].value =
1972
- this.getComponenetForm(components, newComponents, null, false, null);
1973
- }
1836
+ changeIdPropertiesOfObject(normalizationColumns, listData) {
1837
+ const newData = [];
1838
+ listData.forEach((data) => {
1839
+ const objData = {};
1840
+ Object.keys(data).forEach((property) => {
1841
+ if (data.hasOwnProperty(property)) {
1842
+ normalizationColumns.forEach((column) => {
1843
+ if (column.idColumn.toString() === property) {
1844
+ objData[column.key] = data[property];
1845
+ }
1846
+ });
1974
1847
  }
1975
- resolve(lFormFieldsToken);
1976
- }, (error) => {
1977
- reject(error);
1978
1848
  });
1849
+ if (objData) {
1850
+ newData.push(objData);
1851
+ }
1979
1852
  });
1853
+ return newData;
1980
1854
  }
1981
- /** This promise allows to execute a function when consulting the form fields. */
1982
- getFormPanelsByPromCode(promCodigo) {
1983
- return new Promise((resolve, reject) => {
1984
- // Search the dynamic form
1985
- let lFormPannelsToken = null;
1986
- this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
1987
- let form = result;
1988
- if (!form ||
1989
- !form[0] ||
1990
- !form[0].promCodigo ||
1991
- form[0].promCodigo != promCodigo) {
1992
- // this.router.navigate(['404']);
1993
- resolve(lFormPannelsToken);
1994
- }
1995
- lFormPannelsToken = [];
1996
- for (let formComp of form) {
1997
- let newComponents;
1998
- let components = [];
1999
- if (formComp.components) {
2000
- newComponents = formComp.components;
2001
- }
2002
- else if (formComp.columns) {
2003
- newComponents = formComp.columns;
2004
- }
2005
- if (newComponents && UtilString.isValid(formComp.title)) {
2006
- lFormPannelsToken.push({
2007
- title: {
2008
- key: TokenService.getKeyFormulario(formComp.title),
2009
- value: formComp.title,
2010
- object: formComp
2011
- },
2012
- value: []
2013
- });
2014
- lFormPannelsToken[lFormPannelsToken.length - 1].value =
2015
- this.getPanelComponenet(components, newComponents, null);
1855
+ generateHtmlByTokensAndData(html, listData, listTokens) {
1856
+ const translatedCards = [];
1857
+ listData.forEach((data) => {
1858
+ const objToken = {};
1859
+ const htmlTranslated = { html: html };
1860
+ Object.keys(data).forEach((property) => {
1861
+ listTokens.forEach((token) => {
1862
+ if (property == token.key.replace('${', '').replace('}', '')) {
1863
+ objToken[token.key] = data[property];
1864
+ htmlTranslated.html = htmlTranslated.html.replace(token.key, data[property]);
2016
1865
  }
2017
- }
2018
- resolve(lFormPannelsToken);
2019
- }, (error) => {
2020
- reject(error);
1866
+ });
2021
1867
  });
1868
+ translatedCards.push(htmlTranslated);
2022
1869
  });
1870
+ return translatedCards;
2023
1871
  }
2024
- /**
2025
- * A recursive method to get all the information of the editGrid dynamic form
2026
- * @param components
2027
- * @param form
2028
- */
2029
- getPanelComponenet(components, form, panelName) {
2030
- for (let formComp of form) {
2031
- if (formComp.type === 'panel') {
2032
- components.push(formComp);
2033
- }
2034
- else if (formComp.components || formComp.columns) {
2035
- let newComponents;
2036
- if (formComp.components) {
2037
- newComponents = formComp.components;
1872
+ getListTokensByString(stringText) {
1873
+ var arrayToken = stringText.match(/\${([^}]+)\}/g);
1874
+ var arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
1875
+ var arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
1876
+ var arrayTokenFormatted = [];
1877
+ if (arrayTokenFormattedDate &&
1878
+ arrayTokenFormattedDate.length > 0 &&
1879
+ arrayTokenFormattedNumber &&
1880
+ arrayTokenFormattedNumber.length > 0) {
1881
+ arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
1882
+ }
1883
+ else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
1884
+ arrayTokenFormatted = arrayTokenFormattedDate.slice();
1885
+ }
1886
+ else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
1887
+ arrayTokenFormatted = arrayTokenFormattedNumber.slice();
1888
+ }
1889
+ var result = [];
1890
+ if (arrayToken) {
1891
+ for (const token of arrayToken) {
1892
+ let keyType = TokenService.getKeyType(token);
1893
+ if (keyType === null) {
1894
+ continue;
2038
1895
  }
2039
- else if (formComp.columns) {
2040
- newComponents = formComp.columns;
1896
+ var infoToken = { key: token, value: token };
1897
+ if (arrayTokenFormatted) {
1898
+ for (const tokenFormatted of arrayTokenFormatted) {
1899
+ var index = tokenFormatted.indexOf(token);
1900
+ if (index >= 0) {
1901
+ infoToken.value = tokenFormatted;
1902
+ break;
1903
+ }
1904
+ }
2041
1905
  }
2042
- components = this.getPanelComponenet(components, newComponents, panelName);
1906
+ result.push(infoToken);
2043
1907
  }
2044
1908
  }
2045
- return components;
1909
+ return result;
1910
+ // let tokens: any[] = [];
1911
+ // let i = this.nextValidPositionTokens(stringText, 0);
1912
+ // let count = 0;
1913
+ // while (i >= 0 && count <= 10) {
1914
+ // let infoToken: {} = null;
1915
+ // let nextI: number = i;
1916
+ // let character = stringText.substring(i, (i + 1));
1917
+ // if (character == "$") {
1918
+ // let nextCharacter = stringText.substring((i + 1), (i + 2));
1919
+ // // The next character need to be a { sign
1920
+ // if (nextCharacter != "{") {
1921
+ // i = this.nextValidPositionTokens(stringText, nextI + 1);
1922
+ // continue;
1923
+ // }
1924
+ // let keyToken: string = stringText.substring(i, stringText.indexOf("}", i) + 1);
1925
+ // // If the token have a valid key type
1926
+ // let keyType: number = TokenService.getKeyType(keyToken.replace("{", "").replace("}", ""));
1927
+ // if (keyType === null) {
1928
+ // i = this.nextValidPositionTokens(stringText, nextI + 1);
1929
+ // continue;
1930
+ // }
1931
+ // infoToken = {
1932
+ // key: keyToken,
1933
+ // value: keyToken
1934
+ // };
1935
+ // nextI = stringText.indexOf("}", i);
1936
+ // } else {
1937
+ // let nextSign: number = stringText.indexOf("$", i);
1938
+ // // We inly support #date($ and #number($ in this 2 scenarios the lenght can't be more than 10 characters
1939
+ // if (nextSign < 0 || (nextSign - i) > 10) {
1940
+ // i = this.nextValidPositionTokens(stringText, nextI + 1);
1941
+ // continue;
1942
+ // }
1943
+ // let keyToken: string = stringText.substring(stringText.indexOf("$", i), stringText.indexOf("}", i) + 1);
1944
+ // let valueToken: string = stringText.substring(i, stringText.indexOf(")", i) + 1);
1945
+ // infoToken = {
1946
+ // key: keyToken,
1947
+ // value: valueToken
1948
+ // };
1949
+ // nextI = stringText.indexOf(")", i);
1950
+ // }
1951
+ // tokens.push(infoToken);
1952
+ // i = this.nextValidPositionTokens(stringText, nextI);
1953
+ // count++;
1954
+ // }
1955
+ // return tokens;
1956
+ }
1957
+ nextValidPositionTokens(stringText, nextI) {
1958
+ let tokenDollarSign = stringText.indexOf('$', nextI);
1959
+ let tokenNumSign = stringText.indexOf('#', nextI);
1960
+ let i = tokenDollarSign < 0 && tokenNumSign >= 0
1961
+ ? tokenNumSign
1962
+ : tokenNumSign < 0 && tokenDollarSign >= 0
1963
+ ? tokenDollarSign
1964
+ : tokenDollarSign < tokenNumSign
1965
+ ? tokenDollarSign
1966
+ : tokenNumSign;
1967
+ return i;
2046
1968
  }
2047
1969
  /**
2048
- * A recursive method to get all the information of the components a columns of the dynamic form
2049
- * @param components
2050
- * @param form
1970
+ * It reuses replaceTokensFromListObjectPublic but set all keys lobjecttokens as lowercase
1971
+ * @param tokenName
1972
+ * @param formula
1973
+ * @param lObjectTokens
2051
1974
  */
2052
- getComponenetForm(components, form, panelName, editgrid, editGridKey) {
2053
- for (let formComp of form) {
2054
- if ((formComp.components || formComp.columns) && (formComp.type !== "address")) {
2055
- let newComponents;
2056
- if (formComp.components) {
2057
- newComponents = formComp.components;
2058
- if (formComp.type === 'editgrid') {
2059
- editgrid = true;
2060
- editGridKey = formComp.key;
2061
- }
2062
- }
2063
- else if (formComp.columns) {
2064
- newComponents = formComp.columns;
2065
- }
2066
- if (formComp.type && formComp.type === 'panel') {
2067
- panelName = formComp.title;
2068
- }
2069
- components = this.getComponenetForm(components, newComponents, panelName, editgrid, editGridKey);
2070
- }
2071
- else {
2072
- formComp.panelName = panelName;
2073
- formComp.editgrid = editgrid;
2074
- formComp.editGridKey = editGridKey;
2075
- components.push(formComp);
1975
+ replaceTokensFromListObjectPublic(tokenName, formula, lObjectTokens) {
1976
+ let lDataOrg = [];
1977
+ if (lObjectTokens) {
1978
+ for (let dataForm in lObjectTokens) {
1979
+ lDataOrg[dataForm.toLowerCase()] = lObjectTokens[dataForm];
2076
1980
  }
2077
1981
  }
2078
- return components;
2079
- }
2080
- /** This promise allows to execute a function when consulting the form fields. */
2081
- getFormEditGridFieldsByPromCode(promCodigo) {
2082
- return new Promise((resolve, reject) => {
2083
- // Search the dynamic form
2084
- let lFormFieldsToken = null;
2085
- this.formService.getByPromCodigo(promCodigo).subscribe((result) => {
2086
- let form = result;
2087
- if (!form ||
2088
- !form[0] ||
2089
- !form[0].promCodigo ||
2090
- form[0].promCodigo != promCodigo) {
2091
- // this.router.navigate(['404']);
2092
- resolve(lFormFieldsToken);
2093
- }
2094
- lFormFieldsToken = [];
2095
- for (let formComp of form) {
2096
- let newComponents;
2097
- let components = [];
2098
- if (formComp.components) {
2099
- newComponents = formComp.components;
2100
- }
2101
- else if (formComp.columns) {
2102
- newComponents = formComp.columns;
2103
- }
2104
- if (newComponents && UtilString.isValid(formComp.title)) {
2105
- lFormFieldsToken.push({
2106
- title: {
2107
- key: TokenService.getKeyFormulario(formComp.title),
2108
- value: formComp.title,
2109
- object: formComp
2110
- },
2111
- value: []
2112
- });
2113
- lFormFieldsToken[lFormFieldsToken.length - 1].value =
2114
- this.getEditGridComponenet(components, newComponents, null);
2115
- }
2116
- }
2117
- resolve(lFormFieldsToken);
2118
- }, (error) => {
2119
- reject(error);
2120
- });
2121
- });
1982
+ return this.replaceTokensFromListObject(tokenName, formula, lDataOrg);
2122
1983
  }
2123
1984
  /**
2124
- * A recursive method to get all the information of the editGrid dynamic form
2125
- * @param components
2126
- * @param form
1985
+ * @param tokenName token name
1986
+ * @param formula String with the formula to execute
1987
+ * @param lObjectTokens List of tokens with the values to replace
2127
1988
  */
2128
- getEditGridComponenet(components, form, panelName) {
2129
- for (let formComp of form) {
2130
- if (formComp.type === 'editgrid') {
2131
- formComp.panelName = panelName;
2132
- components.push(formComp);
2133
- }
2134
- else if (formComp.components || formComp.columns) {
2135
- let newComponents;
2136
- if (formComp.components) {
2137
- newComponents = formComp.components;
2138
- }
2139
- else if (formComp.columns) {
2140
- newComponents = formComp.columns;
2141
- }
2142
- if (formComp.type && formComp.type === 'panel') {
2143
- panelName = formComp.title;
2144
- }
2145
- components = this.getEditGridComponenet(components, newComponents, panelName);
2146
- }
1989
+ replaceTokensFromListObject(tokenName, formula, lObjectTokens) {
1990
+ if (!formula || formula.length == 0) {
1991
+ throw {
1992
+ message: 'La formula del token ' + tokenName + ' esta vacía',
1993
+ title: 'Alerta!',
1994
+ error: 'La formula del token ' + tokenName + ' esta vacía. [formula[' + formula + ']]'
1995
+ };
2147
1996
  }
2148
- return components;
2149
- }
2150
- /** It returns the tokens by promCodigo */
2151
- getListByPromCodigo(promCode) {
2152
- return this.httpClient.get(this.environment.host.backend.configuration + 'token/getByPromCodigo', { params: new HttpParams().set('promCodigo', promCode.toString()) });
2153
- }
2154
- /** It returns the token by id */
2155
- getById(id) {
2156
- return this.httpClient.get(this.environment.host.backend.configuration + 'token/getById', {
2157
- params: new HttpParams().set('id', id.toString())
2158
- });
2159
- }
2160
- /** It deletes a form by id */
2161
- delete(id) {
2162
- return this.httpClient.delete(this.environment.host.backend.configuration + 'token/delete', { params: new HttpParams().set('id', id) });
2163
- }
2164
- /** It saves the token */
2165
- save(token) {
2166
- return this.httpClient.post(this.environment.host.backend.configuration + 'token/save', token, HEADER_JSON);
2167
- }
2168
- static getKeyFormulario(formTitle) {
2169
- if (UtilString.isValid(formTitle)) {
2170
- return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM) +
2171
- UtilString.replaceAccentSpacesOthers(formTitle).replace(/_/g, '-'));
1997
+ let replacedTokens = formula.toString();
1998
+ if (replacedTokens.startsWith('file://')) {
1999
+ return replacedTokens;
2172
2000
  }
2173
- return '';
2174
- }
2175
- /** It returns the unique verification code */
2176
- getUniqueVerificationCode(login, token) {
2177
- return this.httpClient.get(this.environment.host.backend.documentsRepository +
2178
- 'documento/consultarCodigoUnico/' +
2179
- login +
2180
- '/' +
2181
- token, { params: new HttpParams() });
2182
- }
2183
- /** It send the information to copy the Document viewer */
2184
- copyDocumentInformationViewer(login, token, uniqueCode, documentURL, documentName) {
2185
- let infoDocumento = {
2186
- codigoUnico: uniqueCode,
2187
- rutaDocumento: documentURL,
2188
- documentName: documentName
2189
- };
2190
- return this.httpClient.post(this.environment.host.backend.documentsRepository +
2191
- 'documento/adicionarDocumento/' +
2192
- login +
2193
- '/' +
2194
- token, infoDocumento, HEADER_JSON);
2195
- }
2196
- static getKeyBudget() {
2197
- return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET);
2198
- }
2199
- static getKeyDocument() {
2200
- return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_DOCUMENTO);
2201
- }
2202
- static getKeyTask() {
2203
- return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL);
2204
- }
2205
- static getKeyStatic() {
2206
- return UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC);
2207
- }
2208
- static getKeyCalculated(token) {
2209
- return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED) +
2210
- '_' +
2211
- UtilString.replaceAccentSpacesOthers(token.name));
2212
- }
2213
- static getKeySnapshot(token) {
2214
- return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_SNAPSHOT) +
2215
- '_' +
2216
- UtilString.replaceAccentSpacesOthers(token.name));
2217
- }
2218
- static getKeyGuarantee(token) {
2219
- return (UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_GUARANTEE) +
2220
- '_' +
2221
- UtilString.replaceAccentSpacesOthers(token.name));
2001
+ // Find the tokens in the formula
2002
+ let tokensArray = this.getListTokensByString(replacedTokens);
2003
+ if (tokensArray.length == 0) {
2004
+ return replacedTokens;
2005
+ }
2006
+ // If there any token, try to replace
2007
+ for (let i = 0; i < tokensArray.length; i++) {
2008
+ let objectToken = lObjectTokens[tokensArray[i].key] !== undefined
2009
+ ? lObjectTokens[tokensArray[i].key]
2010
+ : null;
2011
+ let clearKey;
2012
+ if (objectToken == null) {
2013
+ clearKey = tokensArray[i].key.replace('${', '').replace('}', '').toLowerCase();
2014
+ objectToken =
2015
+ lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
2016
+ if (objectToken == null) {
2017
+ clearKey = tokensArray[i].key
2018
+ .replace('{', '')
2019
+ .replace('}', '')
2020
+ .split('_')[1]
2021
+ .toLowerCase();
2022
+ objectToken =
2023
+ lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
2024
+ }
2025
+ }
2026
+ if (objectToken == null) {
2027
+ // If not find the token, by default put an empty string
2028
+ /*if (TokenService.excludedToken.indexOf(clearKey) === -1) {
2029
+ console.error(
2030
+ 'El token ' + tokensArray[i].value + ' no fue encontrado.',
2031
+ lObjectTokens,
2032
+ tokensArray
2033
+ );
2034
+ }*/
2035
+ objectToken = '';
2036
+ }
2037
+ if (objectToken != null) {
2038
+ let value = Number(objectToken)
2039
+ ? objectToken
2040
+ : Array.isArray(objectToken)
2041
+ ? JSON.stringify(objectToken)
2042
+ : "'" + objectToken + "'";
2043
+ replacedTokens = this.replaceToken(replacedTokens, tokensArray[i].value, value);
2044
+ // } else {
2045
+ // console.error(lObjectTokens, tokensArray);
2046
+ // throw {
2047
+ // message: "No se encontró valor para un token",
2048
+ // title: "Alerta!",
2049
+ // error: "El token " + tokensArray[i].value + " no fue encontrado."
2050
+ // };
2051
+ //
2052
+ // Si es la ultima iteracion y la formula tiene [ es porque tiene un array en el valor que resolvio el token
2053
+ if (i == tokensArray.length - 1 && replacedTokens.includes('[')) {
2054
+ // Se ponen todos los operandos como elementos en un array ['expresion a', '&&', 'Expresion B']
2055
+ let formExpressions = replacedTokens.split(/ (\|\||&&) /);
2056
+ let lAuxformExpression = [];
2057
+ formExpressions.forEach((expression) => {
2058
+ if (expression.charAt(0) == '[') {
2059
+ let isTagFound = '';
2060
+ isTagFound = this.findTag(expression);
2061
+ lAuxformExpression.push(isTagFound);
2062
+ }
2063
+ else {
2064
+ lAuxformExpression.push(expression);
2065
+ }
2066
+ });
2067
+ replacedTokens = lAuxformExpression.join(' ');
2068
+ }
2069
+ }
2070
+ }
2071
+ return replacedTokens;
2222
2072
  }
2223
2073
  /**
2224
- * Return a value that represent the type of label: 1=Form, 2=Budget, 3=Static, 4=Calculated
2225
- * @param key Value to evalueate
2074
+ * MEtodo que teniendo una expresion de la forma ['tag1', 'tag2']==tag3
2075
+ * evalua si tag3 hace parte del array si tiene el operador ==.
2076
+ * Si tiene el operador != examina que tag3 no haga parte del array+
2077
+ *
2078
+ * @param expression Operando que evalua tag. Es de la forma ['tag1', 'tag2']==tag3
2079
+ * @returns Retorna 'true' o 'false' en string que despues sera pasado a un eval()
2080
+ * mas adelante en el flujo
2226
2081
  */
2227
- static getKeyType(key) {
2228
- key = key.replace('{', '').replace('}', '');
2229
- key = key.substring(1, key.indexOf('_'));
2230
- if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_FORM))) {
2231
- return 1;
2232
- }
2233
- else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_BUDGET))) {
2234
- return 2;
2235
- }
2236
- else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_STATIC))) {
2237
- return 3;
2082
+ findTag(expression) {
2083
+ let regexOperator = new RegExp('(===|==|!==|!=)');
2084
+ // Retorna el operador
2085
+ let operator = expression.match(regexOperator);
2086
+ // Si no encuentra un operador segun el patron retorna 'false'
2087
+ // para evitar resultados inesperados
2088
+ if (operator == null) {
2089
+ console.error('No se encontro un operador permitido para la expresion');
2090
+ return 'false';
2238
2091
  }
2239
- else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_CALCULATED))) {
2240
- return 4;
2092
+ // Separa la sentencia por el operador
2093
+ // La primera parte es el valor por el cual se remplaza el token que es un array en string "['a', 'b']"
2094
+ // El segundo es el valor con el cual se va a comparar
2095
+ let valueToken, valueToCompare;
2096
+ [valueToken, valueToCompare] = expression.split(operator[0]);
2097
+ // Se limpia el string correspondiente al array para que los elementos queden separados por ","
2098
+ valueToken = valueToken.replace(/[^a-zA-Z0-9 ,]/g, '');
2099
+ // Si no hay tags asociados al registro se devuelve 'false'
2100
+ if (!valueToken) {
2101
+ console.error('No hay tags asociados a esta aplicación');
2102
+ return 'false';
2241
2103
  }
2242
- else if (key.startsWith(UtilString.replaceAccentSpacesOthers(TokenService.TOKEN_LABEL_TASKL))) {
2243
- return 5;
2104
+ // Se limpia el string correspondiente al valor por comparar
2105
+ valueToCompare = valueToCompare.replace(/[^a-zA-Z0-9 ]/g, '');
2106
+ // El string correspondiente al array pasa a ser tipo array
2107
+ valueToken = valueToken.split(',');
2108
+ // Se trata de constatar si el valor a comparar se encuetra o no dentro
2109
+ // Si el operador que se encontro == returna true si lo encuentra
2110
+ let isTagFound = true;
2111
+ switch (operator[0]) {
2112
+ case '==':
2113
+ isTagFound = valueToken.some((tag) => tag == valueToCompare);
2114
+ break;
2115
+ case '===':
2116
+ isTagFound = valueToken.some((tag) => tag === valueToCompare);
2117
+ break;
2118
+ case '!==':
2119
+ isTagFound = valueToken.some((tag) => tag !== valueToCompare);
2120
+ break;
2121
+ case '!=':
2122
+ isTagFound = valueToken.some((tag) => tag != valueToCompare);
2123
+ break;
2124
+ default:
2125
+ break;
2244
2126
  }
2245
- return null;
2127
+ expression = isTagFound ? 'true' : 'false';
2128
+ return expression;
2246
2129
  }
2247
2130
  /**
2248
- * Depends of the type of formFieldToken return de value of the valueData
2249
- * @param formFieldToken
2250
- * @param valueData
2131
+ * Try to eval the formula depend of the type of fields.
2132
+ * @param lStaticToken
2133
+ * @param formulaName
2134
+ * @param formula
2251
2135
  */
2252
- getValueFromFormField(formFieldToken, valueData) {
2253
- if (typeof valueData == 'object') {
2254
- if (formFieldToken.type) {
2255
- if (formFieldToken.type == 'address') {
2256
- return valueData.formatted_address;
2257
- }
2258
- if (formFieldToken.type == 'select' &&
2259
- formFieldToken.searchField &&
2260
- valueData.hasOwnProperty(formFieldToken.searchField)) {
2261
- return valueData[formFieldToken.searchField];
2136
+ validateFormula(lStaticToken, formulaName, formula) {
2137
+ let evalFormula = false;
2138
+ // To validate the formula, first organize the info to key - value array
2139
+ let objectTokens = [];
2140
+ for (let panel of lStaticToken) {
2141
+ for (let groupToken of panel.value) {
2142
+ for (let staticToken of groupToken.value) {
2143
+ for (let arrayTokenInfo of staticToken) {
2144
+ objectTokens[arrayTokenInfo.key] = arrayTokenInfo.object
2145
+ ? arrayTokenInfo.object.type == 'number'
2146
+ ? '0'
2147
+ : ''
2148
+ : '';
2149
+ }
2262
2150
  }
2263
2151
  }
2264
2152
  }
2265
- return valueData;
2266
- }
2267
- /**
2268
- * Try to find the token in the stringText and replace with dataValue. If detect format of number or date try to format the dataValue
2269
- * @param stringText
2270
- * @param token
2271
- * @param dataValue
2272
- */
2273
- replaceToken(stringText, token, dataValue) {
2274
- let valueReplace = null;
2275
- if (token && token[0] == '#') {
2276
- let typeToken = token.substring(1, token.indexOf('('));
2277
- if (typeToken == 'date') {
2278
- let dateFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
2279
- dateFormat = dateFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
2280
- let dateValue = DateUtil.getDate(dataValue);
2281
- if (dateValue) {
2282
- valueReplace = DateUtil.getMoment(dateValue).format(dateFormat);
2283
- }
2284
- else {
2285
- valueReplace = '';
2286
- }
2287
- }
2288
- else if (typeToken == 'number') {
2289
- let numberValue = Number(dataValue);
2290
- if (numberValue != undefined && !isNaN(numberValue)) {
2291
- let numberFormat = token.substring(token.indexOf('}') + 1, token.indexOf(')'));
2292
- numberFormat = numberFormat.trim().replace(/\"/g, '').replace(/\'/g, '');
2293
- valueReplace = this.currencyPipe.transform(numberValue, this.locale, '', numberFormat);
2294
- }
2295
- else {
2296
- console.log('El dato [' +
2297
- dataValue +
2298
- '] para el token [' +
2299
- token +
2300
- '] tipo númerico no es valido');
2301
- valueReplace = '';
2302
- }
2303
- }
2304
- else {
2305
- console.log('tipo de token indefinido. [typeToken[' + typeToken + ']]');
2306
- }
2307
- }
2308
- else if (token && token[0] == '$') {
2309
- valueReplace = dataValue;
2310
- }
2311
- else {
2312
- console.log('El token no es valido. [token[' + token + ']]');
2313
- }
2314
- if (stringText && valueReplace !== null) {
2315
- // replace text in a more efficient way
2316
- stringText = stringText.split(token).join(valueReplace);
2317
- //stringText = stringText.replace(token, valueReplace);
2318
- }
2319
- return stringText;
2320
- }
2321
- getListTokensByStringSegmentation(stringText) {
2322
- const arrayToken = stringText.match(/\${([^}]+)\}/g);
2323
- const arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
2324
- const arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
2325
- let arrayTokenFormatted = [];
2326
- if (arrayTokenFormattedDate &&
2327
- arrayTokenFormattedDate.length > 0 &&
2328
- arrayTokenFormattedNumber &&
2329
- arrayTokenFormattedNumber.length > 0) {
2330
- arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
2331
- }
2332
- else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
2333
- arrayTokenFormatted = arrayTokenFormattedDate.slice();
2334
- }
2335
- else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
2336
- arrayTokenFormatted = arrayTokenFormattedNumber.slice();
2337
- }
2338
- const result = [];
2339
- if (arrayToken) {
2340
- for (const token of arrayToken) {
2341
- const infoToken = { key: token, value: token };
2342
- if (arrayTokenFormatted) {
2343
- for (const tokenFormatted of arrayTokenFormatted) {
2344
- const index = tokenFormatted.indexOf(token);
2345
- if (index >= 0) {
2346
- infoToken.value = tokenFormatted;
2347
- break;
2348
- }
2349
- }
2350
- }
2351
- result.push(infoToken);
2352
- }
2353
- }
2354
- return result;
2355
- }
2356
- changeIdPropertiesOfObject(normalizationColumns, listData) {
2357
- const newData = [];
2358
- listData.forEach((data) => {
2359
- const objData = {};
2360
- Object.keys(data).forEach((property) => {
2361
- if (data.hasOwnProperty(property)) {
2362
- normalizationColumns.forEach((column) => {
2363
- if (column.idColumn.toString() === property) {
2364
- objData[column.key] = data[property];
2365
- }
2366
- });
2367
- }
2368
- });
2369
- if (objData) {
2370
- newData.push(objData);
2371
- }
2372
- });
2373
- return newData;
2374
- }
2375
- generateHtmlByTokensAndData(html, listData, listTokens) {
2376
- const translatedCards = [];
2377
- listData.forEach((data) => {
2378
- const objToken = {};
2379
- const htmlTranslated = { html: html };
2380
- Object.keys(data).forEach((property) => {
2381
- listTokens.forEach((token) => {
2382
- if (property == token.key.replace('${', '').replace('}', '')) {
2383
- objToken[token.key] = data[property];
2384
- htmlTranslated.html = htmlTranslated.html.replace(token.key, data[property]);
2385
- }
2386
- });
2387
- });
2388
- translatedCards.push(htmlTranslated);
2389
- });
2390
- return translatedCards;
2391
- }
2392
- getListTokensByString(stringText) {
2393
- var arrayToken = stringText.match(/\${([^}]+)\}/g);
2394
- var arrayTokenFormattedDate = stringText.match(/\#date[^)]+\)/g);
2395
- var arrayTokenFormattedNumber = stringText.match(/\#number[^)]+\)/g);
2396
- var arrayTokenFormatted = [];
2397
- if (arrayTokenFormattedDate &&
2398
- arrayTokenFormattedDate.length > 0 &&
2399
- arrayTokenFormattedNumber &&
2400
- arrayTokenFormattedNumber.length > 0) {
2401
- arrayTokenFormatted = arrayTokenFormattedDate.concat(arrayTokenFormattedNumber);
2402
- }
2403
- else if (arrayTokenFormattedDate && arrayTokenFormattedDate.length > 0) {
2404
- arrayTokenFormatted = arrayTokenFormattedDate.slice();
2405
- }
2406
- else if (arrayTokenFormattedNumber && arrayTokenFormattedNumber.length > 0) {
2407
- arrayTokenFormatted = arrayTokenFormattedNumber.slice();
2408
- }
2409
- var result = [];
2410
- if (arrayToken) {
2411
- for (const token of arrayToken) {
2412
- let keyType = TokenService.getKeyType(token);
2413
- if (keyType === null) {
2414
- continue;
2415
- }
2416
- var infoToken = { key: token, value: token };
2417
- if (arrayTokenFormatted) {
2418
- for (const tokenFormatted of arrayTokenFormatted) {
2419
- var index = tokenFormatted.indexOf(token);
2420
- if (index >= 0) {
2421
- infoToken.value = tokenFormatted;
2422
- break;
2423
- }
2424
- }
2425
- }
2426
- result.push(infoToken);
2427
- }
2428
- }
2429
- return result;
2430
- // let tokens: any[] = [];
2431
- // let i = this.nextValidPositionTokens(stringText, 0);
2432
- // let count = 0;
2433
- // while (i >= 0 && count <= 10) {
2434
- // let infoToken: {} = null;
2435
- // let nextI: number = i;
2436
- // let character = stringText.substring(i, (i + 1));
2437
- // if (character == "$") {
2438
- // let nextCharacter = stringText.substring((i + 1), (i + 2));
2439
- // // The next character need to be a { sign
2440
- // if (nextCharacter != "{") {
2441
- // i = this.nextValidPositionTokens(stringText, nextI + 1);
2442
- // continue;
2443
- // }
2444
- // let keyToken: string = stringText.substring(i, stringText.indexOf("}", i) + 1);
2445
- // // If the token have a valid key type
2446
- // let keyType: number = TokenService.getKeyType(keyToken.replace("{", "").replace("}", ""));
2447
- // if (keyType === null) {
2448
- // i = this.nextValidPositionTokens(stringText, nextI + 1);
2449
- // continue;
2450
- // }
2451
- // infoToken = {
2452
- // key: keyToken,
2453
- // value: keyToken
2454
- // };
2455
- // nextI = stringText.indexOf("}", i);
2456
- // } else {
2457
- // let nextSign: number = stringText.indexOf("$", i);
2458
- // // We inly support #date($ and #number($ in this 2 scenarios the lenght can't be more than 10 characters
2459
- // if (nextSign < 0 || (nextSign - i) > 10) {
2460
- // i = this.nextValidPositionTokens(stringText, nextI + 1);
2461
- // continue;
2462
- // }
2463
- // let keyToken: string = stringText.substring(stringText.indexOf("$", i), stringText.indexOf("}", i) + 1);
2464
- // let valueToken: string = stringText.substring(i, stringText.indexOf(")", i) + 1);
2465
- // infoToken = {
2466
- // key: keyToken,
2467
- // value: valueToken
2468
- // };
2469
- // nextI = stringText.indexOf(")", i);
2470
- // }
2471
- // tokens.push(infoToken);
2472
- // i = this.nextValidPositionTokens(stringText, nextI);
2473
- // count++;
2474
- // }
2475
- // return tokens;
2476
- }
2477
- nextValidPositionTokens(stringText, nextI) {
2478
- let tokenDollarSign = stringText.indexOf('$', nextI);
2479
- let tokenNumSign = stringText.indexOf('#', nextI);
2480
- let i = tokenDollarSign < 0 && tokenNumSign >= 0
2481
- ? tokenNumSign
2482
- : tokenNumSign < 0 && tokenDollarSign >= 0
2483
- ? tokenDollarSign
2484
- : tokenDollarSign < tokenNumSign
2485
- ? tokenDollarSign
2486
- : tokenNumSign;
2487
- return i;
2488
- }
2489
- /**
2490
- * It reuses replaceTokensFromListObjectPublic but set all keys lobjecttokens as lowercase
2491
- * @param tokenName
2492
- * @param formula
2493
- * @param lObjectTokens
2494
- */
2495
- replaceTokensFromListObjectPublic(tokenName, formula, lObjectTokens) {
2496
- let lDataOrg = [];
2497
- if (lObjectTokens) {
2498
- for (let dataForm in lObjectTokens) {
2499
- lDataOrg[dataForm.toLowerCase()] = lObjectTokens[dataForm];
2500
- }
2501
- }
2502
- return this.replaceTokensFromListObject(tokenName, formula, lDataOrg);
2503
- }
2504
- /**
2505
- * @param tokenName token name
2506
- * @param formula String with the formula to execute
2507
- * @param lObjectTokens List of tokens with the values to replace
2508
- */
2509
- replaceTokensFromListObject(tokenName, formula, lObjectTokens) {
2510
- if (!formula || formula.length == 0) {
2511
- throw {
2512
- message: 'La formula del token ' + tokenName + ' esta vacía',
2513
- title: 'Alerta!',
2514
- error: 'La formula del token ' + tokenName + ' esta vacía. [formula[' + formula + ']]'
2515
- };
2516
- }
2517
- let replacedTokens = formula.toString();
2518
- if (replacedTokens.startsWith('file://')) {
2519
- return replacedTokens;
2520
- }
2521
- // Find the tokens in the formula
2522
- let tokensArray = this.getListTokensByString(replacedTokens);
2523
- if (tokensArray.length == 0) {
2524
- return replacedTokens;
2525
- }
2526
- // If there any token, try to replace
2527
- for (let i = 0; i < tokensArray.length; i++) {
2528
- let objectToken = lObjectTokens[tokensArray[i].key] !== undefined
2529
- ? lObjectTokens[tokensArray[i].key]
2530
- : null;
2531
- let clearKey;
2532
- if (objectToken == null) {
2533
- clearKey = tokensArray[i].key.replace('${', '').replace('}', '').toLowerCase();
2534
- objectToken =
2535
- lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
2536
- if (objectToken == null) {
2537
- clearKey = tokensArray[i].key
2538
- .replace('{', '')
2539
- .replace('}', '')
2540
- .split('_')[1]
2541
- .toLowerCase();
2542
- objectToken =
2543
- lObjectTokens[clearKey] !== undefined ? lObjectTokens[clearKey] : null;
2544
- }
2545
- }
2546
- if (objectToken == null) {
2547
- // If not find the token, by default put an empty string
2548
- /*if (TokenService.excludedToken.indexOf(clearKey) === -1) {
2549
- console.error(
2550
- 'El token ' + tokensArray[i].value + ' no fue encontrado.',
2551
- lObjectTokens,
2552
- tokensArray
2553
- );
2554
- }*/
2555
- objectToken = '';
2556
- }
2557
- if (objectToken != null) {
2558
- let value = Number(objectToken)
2559
- ? objectToken
2560
- : Array.isArray(objectToken)
2561
- ? JSON.stringify(objectToken)
2562
- : "'" + objectToken + "'";
2563
- replacedTokens = this.replaceToken(replacedTokens, tokensArray[i].value, value);
2564
- // } else {
2565
- // console.error(lObjectTokens, tokensArray);
2566
- // throw {
2567
- // message: "No se encontró valor para un token",
2568
- // title: "Alerta!",
2569
- // error: "El token " + tokensArray[i].value + " no fue encontrado."
2570
- // };
2571
- //
2572
- // Si es la ultima iteracion y la formula tiene [ es porque tiene un array en el valor que resolvio el token
2573
- if (i == tokensArray.length - 1 && replacedTokens.includes('[')) {
2574
- // Se ponen todos los operandos como elementos en un array ['expresion a', '&&', 'Expresion B']
2575
- let formExpressions = replacedTokens.split(/ (\|\||&&) /);
2576
- let lAuxformExpression = [];
2577
- formExpressions.forEach((expression) => {
2578
- if (expression.charAt(0) == '[') {
2579
- let isTagFound = '';
2580
- isTagFound = this.findTag(expression);
2581
- lAuxformExpression.push(isTagFound);
2582
- }
2583
- else {
2584
- lAuxformExpression.push(expression);
2585
- }
2586
- });
2587
- replacedTokens = lAuxformExpression.join(' ');
2588
- }
2589
- }
2590
- }
2591
- return replacedTokens;
2592
- }
2593
- /**
2594
- * MEtodo que teniendo una expresion de la forma ['tag1', 'tag2']==tag3
2595
- * evalua si tag3 hace parte del array si tiene el operador ==.
2596
- * Si tiene el operador != examina que tag3 no haga parte del array+
2597
- *
2598
- * @param expression Operando que evalua tag. Es de la forma ['tag1', 'tag2']==tag3
2599
- * @returns Retorna 'true' o 'false' en string que despues sera pasado a un eval()
2600
- * mas adelante en el flujo
2601
- */
2602
- findTag(expression) {
2603
- let regexOperator = new RegExp('(===|==|!==|!=)');
2604
- // Retorna el operador
2605
- let operator = expression.match(regexOperator);
2606
- // Si no encuentra un operador segun el patron retorna 'false'
2607
- // para evitar resultados inesperados
2608
- if (operator == null) {
2609
- console.error('No se encontro un operador permitido para la expresion');
2610
- return 'false';
2611
- }
2612
- // Separa la sentencia por el operador
2613
- // La primera parte es el valor por el cual se remplaza el token que es un array en string "['a', 'b']"
2614
- // El segundo es el valor con el cual se va a comparar
2615
- let valueToken, valueToCompare;
2616
- [valueToken, valueToCompare] = expression.split(operator[0]);
2617
- // Se limpia el string correspondiente al array para que los elementos queden separados por ","
2618
- valueToken = valueToken.replace(/[^a-zA-Z0-9 ,]/g, '');
2619
- // Si no hay tags asociados al registro se devuelve 'false'
2620
- if (!valueToken) {
2621
- console.error('No hay tags asociados a esta aplicación');
2622
- return 'false';
2623
- }
2624
- // Se limpia el string correspondiente al valor por comparar
2625
- valueToCompare = valueToCompare.replace(/[^a-zA-Z0-9 ]/g, '');
2626
- // El string correspondiente al array pasa a ser tipo array
2627
- valueToken = valueToken.split(',');
2628
- // Se trata de constatar si el valor a comparar se encuetra o no dentro
2629
- // Si el operador que se encontro == returna true si lo encuentra
2630
- let isTagFound = true;
2631
- switch (operator[0]) {
2632
- case '==':
2633
- isTagFound = valueToken.some((tag) => tag == valueToCompare);
2634
- break;
2635
- case '===':
2636
- isTagFound = valueToken.some((tag) => tag === valueToCompare);
2637
- break;
2638
- case '!==':
2639
- isTagFound = valueToken.some((tag) => tag !== valueToCompare);
2640
- break;
2641
- case '!=':
2642
- isTagFound = valueToken.some((tag) => tag != valueToCompare);
2643
- break;
2644
- default:
2645
- break;
2646
- }
2647
- expression = isTagFound ? 'true' : 'false';
2648
- return expression;
2649
- }
2650
- /**
2651
- * Try to eval the formula depend of the type of fields.
2652
- * @param lStaticToken
2653
- * @param formulaName
2654
- * @param formula
2655
- */
2656
- validateFormula(lStaticToken, formulaName, formula) {
2657
- let evalFormula = false;
2658
- // To validate the formula, first organize the info to key - value array
2659
- let objectTokens = [];
2660
- for (let panel of lStaticToken) {
2661
- for (let groupToken of panel.value) {
2662
- for (let staticToken of groupToken.value) {
2663
- for (let arrayTokenInfo of staticToken) {
2664
- objectTokens[arrayTokenInfo.key] = arrayTokenInfo.object
2665
- ? arrayTokenInfo.object.type == 'number'
2666
- ? '0'
2667
- : ''
2668
- : '';
2669
- }
2670
- }
2671
- }
2672
- }
2673
- try {
2674
- formula = this.replaceTokensFromListObject(formulaName, formula, objectTokens);
2153
+ try {
2154
+ formula = this.replaceTokensFromListObject(formulaName, formula, objectTokens);
2675
2155
  }
2676
2156
  catch (error) {
2677
2157
  //console.error(error);
@@ -3151,7 +2631,7 @@ class BudgetService {
3151
2631
  }), catchError((error) => {
3152
2632
  console.log('El sistema no responde', error);
3153
2633
  throw this.toastr.error('El sistema no responde', 'Error!');
3154
- }));
2634
+ })).subscribe();
3155
2635
  }
3156
2636
  /** It saves a globalBudgetCategory */
3157
2637
  savePresupuestoGlobalCategory(globalBudgetCategoryBefore, globalBudgetCategory, patCodigo) {
@@ -3194,7 +2674,7 @@ class BudgetService {
3194
2674
  }), catchError((error) => {
3195
2675
  console.log('El sistema no responde', error);
3196
2676
  throw this.toastr.error('El sistema no responde', 'Error!');
3197
- }));
2677
+ })).subscribe();
3198
2678
  }
3199
2679
  /** Returns a list of PliCnfPresupuestoAsistente */
3200
2680
  getAllPresupuestoAsistente(cpreCodigo) {
@@ -4849,10 +4329,10 @@ class PdfConfigComponent extends ConfigurationCommonsComponent {
4849
4329
  }
4850
4330
  }
4851
4331
  PdfConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: PdfConfigComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CommonService }, { token: ConfigurationDocumentService }], target: i0.ɵɵFactoryTarget.Component });
4852
- PdfConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: PdfConfigComponent, selector: "pli-pdf-config", inputs: { promCodigo: "promCodigo", showFormula: "showFormula", showSnapshot: "showSnapshot", showSnapshotForm: "showSnapshotForm", showName: "showName", showIdiCodigo: "showIdiCodigo", showCdocCodigo: "showCdocCodigo", showTemplate: "showTemplate", showVisibles: "showVisibles", showMargins: "showMargins", showHeader: "showHeader", showFooter: "showFooter", showFont: "showFont", showTokens: "showTokens", showFrm: "showFrm", showStatic: "showStatic", showBudget: "showBudget", showCalculated: "showCalculated", showCalculatedForm: "showCalculatedForm", showSize: "showSize", showOrientation: "showOrientation", showRepeatHeader: "showRepeatHeader", showRepeatFooter: "showRepeatFooter", showPager: "showPager", showHeaderFooterHeight: "showHeaderFooterHeight", tgdocCodigo: "tgdocCodigo", pdfConfig: "pdfConfig", toolbar: "toolbar" }, outputs: { pdfConfigChange: "pdfConfigChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/>&nbsp; <label for=\"visibleInternal\">Interno</label> &nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/>&nbsp;\r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.header\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.template\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footer\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"], components: [{ type: ConfigurationTokenComponent, selector: "pli-configuration-token", inputs: ["promCodigo", "showFrm", "showFrmMultiple", "showStatic", "showBudget", "showCalculated", "showCalculatedForm", "showSnapshot", "showSnapshotForm", "showDocument", "showTask", "showGuatantee", "showGuatanteeForm", "showAsTitle"], outputs: ["onStaticToken"] }, { type: i4$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i9.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }] });
4332
+ PdfConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: PdfConfigComponent, selector: "pli-pdf-config", inputs: { promCodigo: "promCodigo", showFormula: "showFormula", showSnapshot: "showSnapshot", showSnapshotForm: "showSnapshotForm", showName: "showName", showIdiCodigo: "showIdiCodigo", showCdocCodigo: "showCdocCodigo", showTemplate: "showTemplate", showVisibles: "showVisibles", showMargins: "showMargins", showHeader: "showHeader", showFooter: "showFooter", showFont: "showFont", showTokens: "showTokens", showFrm: "showFrm", showStatic: "showStatic", showBudget: "showBudget", showCalculated: "showCalculated", showCalculatedForm: "showCalculatedForm", showSize: "showSize", showOrientation: "showOrientation", showRepeatHeader: "showRepeatHeader", showRepeatFooter: "showRepeatFooter", showPager: "showPager", showHeaderFooterHeight: "showHeaderFooterHeight", tgdocCodigo: "tgdocCodigo", pdfConfig: "pdfConfig", toolbar: "toolbar" }, outputs: { pdfConfigChange: "pdfConfigChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/>&nbsp; <label for=\"visibleInternal\">Interno</label> &nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/>&nbsp;\r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.header\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.template\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.footer\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"], components: [{ type: ConfigurationTokenComponent, selector: "pli-configuration-token", inputs: ["promCodigo", "showFrm", "showFrmMultiple", "showStatic", "showBudget", "showCalculated", "showCalculatedForm", "showSnapshot", "showSnapshotForm", "showDocument", "showTask", "showGuatantee", "showGuatanteeForm", "showAsTitle"], outputs: ["onStaticToken"] }, { type: i4$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i9.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i9.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i9.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }] });
4853
4333
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: PdfConfigComponent, decorators: [{
4854
4334
  type: Component,
4855
- args: [{ selector: 'pli-pdf-config', template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/>&nbsp; <label for=\"visibleInternal\">Interno</label> &nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/>&nbsp;\r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.header\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.template\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footer\"\r\n\t\t\t\t\t\t[init]=\"{\r\n\t\t\t\t\t\t\tbranding: false,\r\n\t\t\t\t\t\t\tbase_url: '/tinymce',\r\n\t\t\t\t\t\t\tsuffix: '.min',\r\n\t\t\t\t\t\t\tplugins: [\r\n\t\t\t\t\t\t\t\t'code preview autoresize paste colorpicker textcolor link table lists advlist image'\r\n\t\t\t\t\t\t\t],\r\n\t\t\t\t\t\t\ttoolbar:\r\n\t\t\t\t\t\t\t\t'undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | forecolor backcolor fontsizeselect | code preview image link'\r\n\t\t\t\t\t\t}\"\r\n\t\t\t\t\t></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"] }]
4335
+ args: [{ selector: 'pli-pdf-config', template: "<div class=\"row\">\r\n\t<div class=\"col-md-3\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showName\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Nombre *</label>\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"name\"\r\n\t\t\t\t\t\tid=\"name\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.name\"\r\n\t\t\t\t\t\tplaceholder=\"Nombre\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFormula\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"formula\" class=\"form-control-label\"\r\n\t\t\t\t\t\t>F\u00F3rmula de la visibilidad del documento</label\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<textarea\r\n\t\t\t\t\t\tstyle=\"resize: vertical\"\r\n\t\t\t\t\t\trows=\"2\"\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tname=\"formula\"\r\n\t\t\t\t\t\tid=\"formula\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.formula\"\r\n\t\t\t\t\t\tplaceholder=\"Formula de la visibilidad del documento\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t</textarea>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showIdiCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"idiCodigo\" class=\"form-control-label\">Idioma *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"idiCodigo\"\r\n\t\t\t\t\t\tid=\"idiCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.idiCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let language of listLanguage\" [value]=\"language.idiCodigo\">\r\n\t\t\t\t\t\t\t{{ language.idiIdioma }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showCdocCodigo\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"cdocCodigo\" class=\"form-control-label\">Tipo documento *</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"cdocCodigo\"\r\n\t\t\t\t\t\tid=\"cdocCodigo\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.cdocCodigo\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option value=\"\">-- Seleccione opci\u00F3n</option>\r\n\t\t\t\t\t\t<option *ngFor=\"let document of listDocument\" [value]=\"document.id\">\r\n\t\t\t\t\t\t\t{{ document.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showVisibles\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"name\" class=\"form-control-label\">Visibilidad usuario</label>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleInternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleInternal\"\r\n\t\t\t\t\t\t\t/>&nbsp; <label for=\"visibleInternal\">Interno</label> &nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\tid=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tname=\"visibleExternal\"\r\n\t\t\t\t\t\t\t\tvalue=\"1\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.visibleExternal\"\r\n\t\t\t\t\t\t\t/>&nbsp;\r\n\t\t\t\t\t\t\t<label for=\"visibleExternal\">Externo</label>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showFont\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"font\" class=\"form-control-label\">Tipo de letra</label>\r\n\t\t\t\t\t<select name=\"font\" id=\"font\" class=\"form-control\" [(ngModel)]=\"pdfConfig.font\">\r\n\t\t\t\t\t\t<option *ngFor=\"let font of listFont\" [value]=\"font.value\">\r\n\t\t\t\t\t\t\t{{ font.label }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showSize\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"size\" class=\"form-control-label\">Tama\u00F1o de hoja</label>\r\n\t\t\t\t\t<select name=\"size\" id=\"size\" class=\"form-control\" [(ngModel)]=\"pdfConfig.size\">\r\n\t\t\t\t\t\t<option *ngFor=\"let size of listSizes\" [value]=\"size.id\">\r\n\t\t\t\t\t\t\t{{ size.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showOrientation\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"orientation\" class=\"form-control-label\">Orientaci\u00F3n</label>\r\n\t\t\t\t\t<select\r\n\t\t\t\t\t\tname=\"orientation\"\r\n\t\t\t\t\t\tid=\"orientation\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.orientation\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<option\r\n\t\t\t\t\t\t\t*ngFor=\"let orientation of listOrientation\"\r\n\t\t\t\t\t\t\t[value]=\"orientation.id\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t{{ orientation.name }}\r\n\t\t\t\t\t\t</option>\r\n\t\t\t\t\t</select>\r\n\t\t\t\t\t<div class=\"form-control-error\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showPager\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.showPager\"\r\n\t\t\t\t\t\tid=\"showPager\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"showPager\" class=\"form-control-label\"> Ver paginador</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatHeader\"\r\n\t\t\t\t\t\tid=\"repeatHeader\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatHeader\" class=\"form-control-label\"> Repetir encabezado</label>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12\" *ngIf=\"showRepeatFooter\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\tclass=\"check-space\"\r\n\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.repeatFooter\"\r\n\t\t\t\t\t\tid=\"repeatFooter\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t<label for=\"repeatFooter\" class=\"form-control-label\">\r\n\t\t\t\t\t\tRepetir pie de p\u00E1gina</label\r\n\t\t\t\t\t>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showMargins\" [ngClass]=\"{ 'top-space': showBr }\">\r\n\t\t\t\tM\u00E1rgenes (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Arriba</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Arriba\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginTop\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginRight\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Derecha</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Derecha\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginRight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginBottom\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Abajo</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Abajo\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginBottom\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showMargins\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginLeft\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Izquierda</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Izquierda\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.marginLeft\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div\r\n\t\t\t\tclass=\"col-md-12\"\r\n\t\t\t\t*ngIf=\"showHeaderFooterHeight\"\r\n\t\t\t\t[ngClass]=\"{ 'top-space': showBr }\"\r\n\t\t\t>\r\n\t\t\t\tAlturas (cm)\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Cabecera</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Cabecera\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.headerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-sm-6\" *ngIf=\"showHeaderFooterHeight\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-xs-12\">\r\n\t\t\t\t\t\t\t<label for=\"pdfConfig.marginTop\" class=\"form-control-label\"\r\n\t\t\t\t\t\t\t\t>Pie de p\u00E1gina</label\r\n\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"number\"\r\n\t\t\t\t\t\t\t\tname=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tid=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Pie de p\u00E1g\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"pdfConfig.footerHeight\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"col-sm-12 margin-top\" *ngIf=\"showTokens\">\r\n\t\t\t\t<pli-configuration-token\r\n\t\t\t\t\t[promCodigo]=\"promCodigo\"\r\n\t\t\t\t\t[showFrm]=\"showFrm\"\r\n\t\t\t\t\t[showStatic]=\"showStatic\"\r\n\t\t\t\t\t[showBudget]=\"showBudget\"\r\n\t\t\t\t\t[showCalculated]=\"showCalculated\"\r\n\t\t\t\t\t[showCalculatedForm]=\"showCalculatedForm\"\r\n\t\t\t\t\t[showSnapshotForm]=\"showSnapshotForm\"\r\n\t\t\t\t\t[showSnapshot]=\"showSnapshot\"\r\n\t\t\t\t></pli-configuration-token>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"col-md-9\">\r\n\t\t<div class=\"row\">\r\n\t\t\t<div class=\"col-md-12\" *ngIf=\"showHeader\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"header\" class=\"form-control-label\">Encabezado</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.header\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showTemplate\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"template\" class=\"form-control-label\">Cuerpo</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.template\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"row margin-top\" *ngIf=\"showFooter\">\r\n\t\t\t<div class=\"col-md-12\">\r\n\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t<label for=\"footer\" class=\"form-control-label\">Pie de p\u00E1gina</label>\r\n\t\t\t\t\t<editor [(ngModel)]=\"pdfConfig.footer\" [init]=\"options\"></editor>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".top-space{margin-top:12px}.check-space{margin-right:5px}\n"] }]
4856
4336
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: CommonService }, { type: ConfigurationDocumentService }]; }, propDecorators: { promCodigo: [{
4857
4337
  type: Input
4858
4338
  }], showFormula: [{
@@ -5756,7 +5236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
5756
5236
  } });
5757
5237
 
5758
5238
  const PDFJS$1 = PDFJS_;
5759
- // const panzoom = panzoom_;
5239
+ const panzoom$1 = panzoom_;
5760
5240
  class PdfVisualizerComponent {
5761
5241
  constructor(commonService, sanitization, taostrService, fileService) {
5762
5242
  this.commonService = commonService;
@@ -5842,16 +5322,15 @@ class PdfVisualizerComponent {
5842
5322
  showBase64Pdf(result) {
5843
5323
  this.base64 = result.base64;
5844
5324
  var data = atob(this.base64);
5845
- PDFJS$1.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.worker.js';
5325
+ PDFJS$1.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js';
5846
5326
  if (PDFJS$1.GlobalWorkerOptions)
5847
5327
  PDFJS$1.GlobalWorkerOptions.workerSrc =
5848
- 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.worker.js';
5849
- // create instance of PdfDocument with the id of canvas
5328
+ 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js';
5850
5329
  // create instance of PdfDocument with the id of canvas
5851
5330
  this.pdfDocument = new PdfDocument(this.id_canvas);
5852
5331
  // assign variables out of scope
5853
5332
  let pdfdocument = this.pdfDocument;
5854
- Panzoom__default(this.pdfDocument.canvas, {
5333
+ panzoom$1(this.pdfDocument.canvas, {
5855
5334
  smoothScroll: false
5856
5335
  });
5857
5336
  let self = this;
@@ -5898,8 +5377,7 @@ class PdfVisualizerComponent {
5898
5377
  let self = this;
5899
5378
  // Using promise to fetch the page
5900
5379
  this.pdfDocument.pdfDoc.getPage(num).then(function (page) {
5901
- var scale = selfPdfDocument.scale ? selfPdfDocument.scale : 1.5;
5902
- var viewport = page.getViewport({ scale: scale });
5380
+ var viewport = page.getViewport(selfPdfDocument.scale);
5903
5381
  selfPdfDocument.canvas.height = viewport.height;
5904
5382
  selfPdfDocument.canvas.width = viewport.width;
5905
5383
  // Render PDF page into canvas context
@@ -6132,7 +5610,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
6132
5610
  }] } });
6133
5611
 
6134
5612
  const PDFJS = PDFJS_;
6135
- const panzoom = Panzoom;
5613
+ const panzoom = panzoom_;
6136
5614
  /** Pdf visualizer Refactor - TODO improve logic and check the edit functionality */
6137
5615
  class PdfMergeVisualizerComponent {
6138
5616
  constructor(commonService, taostrService, sanitization) {
@@ -10255,108 +9733,627 @@ class SegmentationUserService {
10255
9733
  return this.httpClient.post(this.environment.host.backend.segmentation +
10256
9734
  'PlicSegmentationUserController/updatePositionSegmentation', lSegmentationUser, this.headerJson);
10257
9735
  }
10258
- saveAllSegmentation(lSegmentationUser) {
10259
- return this.httpClient.post(this.environment.host.backend.segmentation +
10260
- 'PlicSegmentationUserController/saveAllSegmentation', lSegmentationUser, this.headerJson);
9736
+ saveAllSegmentation(lSegmentationUser) {
9737
+ return this.httpClient.post(this.environment.host.backend.segmentation +
9738
+ 'PlicSegmentationUserController/saveAllSegmentation', lSegmentationUser, this.headerJson);
9739
+ }
9740
+ /** It deletes a search object by id */
9741
+ deleteSegmentation(id) {
9742
+ return this.httpClient.delete(this.environment.host.backend.segmentation +
9743
+ 'PlicSegmentationUserController/deleteSegmentation', { params: new HttpParams().set('id', id) });
9744
+ }
9745
+ changeTopFiveSegmentation(username, type) {
9746
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9747
+ 'PlicSegmentationUserController/changeTopFiveSegmentation', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9748
+ }
9749
+ showEllipsisSegmentationByUser(username, type) {
9750
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9751
+ 'PlicSegmentationUserController/showEllipsisSegmentationByUser', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9752
+ }
9753
+ getSegmentationGreaterThanPosition(username, type, position) {
9754
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9755
+ 'PlicSegmentationUserController/getSegmentationGreaterThanPosition', {
9756
+ params: new HttpParams()
9757
+ .set('username', username)
9758
+ .set('type', type.toString())
9759
+ .set('position', position.toString())
9760
+ });
9761
+ }
9762
+ getSegmentationByIdOrderByName(username, type) {
9763
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9764
+ 'PlicSegmentationUserController/getSegmentationByIdOrderByName', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9765
+ }
9766
+ getSegmentationById(segmentationId) {
9767
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9768
+ 'PlicSegmentationUserController/getSegmentationById', { params: new HttpParams().set('segmentationId', segmentationId) });
9769
+ }
9770
+ getAllSegmentationByLoginAndType(username, type) {
9771
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9772
+ 'PlicSegmentationUserController/getAllSegmentationByLoginAndType', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9773
+ }
9774
+ getPublicSegmentation(lastNHours, type) {
9775
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9776
+ 'PlicSegmentationUserController/getPublicSegmentation', {
9777
+ params: new HttpParams()
9778
+ .set('lastNHours', lastNHours.toString())
9779
+ .set('type', type.toString())
9780
+ });
9781
+ }
9782
+ getSegColumn() {
9783
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9784
+ 'PlicSegmentationUserController/getSegColumn', { params: new HttpParams() });
9785
+ }
9786
+ getSegmentationByName(username, type, name) {
9787
+ return this.httpClient.get(this.environment.host.backend.segmentation +
9788
+ 'PlicSegmentationUserController/getSegmentationByName', {
9789
+ params: new HttpParams()
9790
+ .set('username', username)
9791
+ .set('type', type.toString())
9792
+ .set('name', name)
9793
+ });
9794
+ }
9795
+ }
9796
+ SegmentationUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
9797
+ SegmentationUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, providedIn: 'root' });
9798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, decorators: [{
9799
+ type: Injectable,
9800
+ args: [{
9801
+ providedIn: 'root'
9802
+ }]
9803
+ }], ctorParameters: function () {
9804
+ return [{ type: undefined, decorators: [{
9805
+ type: Inject,
9806
+ args: ['environment']
9807
+ }] }, { type: i1.HttpClient }];
9808
+ } });
9809
+
9810
+ class SegmentationService {
9811
+ constructor(environment, httpClient) {
9812
+ this.environment = environment;
9813
+ this.httpClient = httpClient;
9814
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
9815
+ }
9816
+ /** It send the email */
9817
+ send(segmentation) {
9818
+ return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/send', segmentation, this.headerJson);
9819
+ }
9820
+ /** It send the email */
9821
+ sendMultiple(listSegmentation) {
9822
+ return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/sendMassive', listSegmentation, this.headerJson);
9823
+ }
9824
+ }
9825
+ SegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
9826
+ SegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, providedIn: 'root' });
9827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, decorators: [{
9828
+ type: Injectable,
9829
+ args: [{
9830
+ providedIn: 'root'
9831
+ }]
9832
+ }], ctorParameters: function () {
9833
+ return [{ type: undefined, decorators: [{
9834
+ type: Inject,
9835
+ args: ['environment']
9836
+ }] }, { type: i1.HttpClient }];
9837
+ } });
9838
+
9839
+ // import * as utils_ from 'formiojs-proyectoscolfuturo/utils/utils';
9840
+ const utils = utils_;
9841
+ class FormioUtil {
9842
+ /**
9843
+ * It returns the components formated by panel
9844
+ * @param components
9845
+ * @return the object is [{panel: , items: [{ value: , label: }]}]
9846
+ */
9847
+ static getFormattedComponentsByPanel(components) {
9848
+ let result = [];
9849
+ if (components) {
9850
+ let group = null;
9851
+ let object = null;
9852
+ for (const component of components) {
9853
+ if (component[EFormioKey.TITLE_PANEL] !== group) {
9854
+ if (group !== null) {
9855
+ result.push(object);
9856
+ }
9857
+ object = { label: component[EFormioKey.TITLE_PANEL], items: [], toggle: false };
9858
+ group = component[EFormioKey.TITLE_PANEL];
9859
+ }
9860
+ object.items.push({
9861
+ label: component[EFormioKey.LABEL],
9862
+ value: component[EFormioKey.KEY]
9863
+ });
9864
+ }
9865
+ if (group !== null)
9866
+ result.push(object);
9867
+ }
9868
+ return result;
9869
+ }
9870
+ /**
9871
+ * It returns the components are required according with data
9872
+ * @param components array of components
9873
+ * @param data
9874
+ */
9875
+ static getRequiredComponentsByData(components, data) {
9876
+ // get the required components
9877
+ let array = FormioUtil.getRequiredComponents(components);
9878
+ // if not data then return components
9879
+ if (data && array) {
9880
+ for (let i = 0; i < array.length; i++) {
9881
+ const component = array[i];
9882
+ // use formio to check condition according with data
9883
+ if (utils.checkCondition(component, null, data, null, null)) {
9884
+ const key = component[EFormioKey.KEY];
9885
+ if (data[key] != undefined && data[key] != null && data[key] != '') {
9886
+ // remove item from array
9887
+ array.splice(i, 1);
9888
+ i--;
9889
+ }
9890
+ else {
9891
+ if (component.customConditional &&
9892
+ component.customConditional.includes('show')) {
9893
+ // remove item from array
9894
+ array.splice(i, 1);
9895
+ i--;
9896
+ }
9897
+ }
9898
+ }
9899
+ else {
9900
+ // remove item from array
9901
+ array.splice(i, 1);
9902
+ i--;
9903
+ }
9904
+ }
9905
+ }
9906
+ return array;
9907
+ }
9908
+ /**
9909
+ * It returns the components that are required
9910
+ * @param components array of components
9911
+ */
9912
+ static getUniqueComponents(components) {
9913
+ return FormioUtil.getComponentsByFeature(components, [EFormioKey.UNIQUE], true);
10261
9914
  }
10262
- /** It deletes a search object by id */
10263
- deleteSegmentation(id) {
10264
- return this.httpClient.delete(this.environment.host.backend.segmentation +
10265
- 'PlicSegmentationUserController/deleteSegmentation', { params: new HttpParams().set('id', id) });
9915
+ /**
9916
+ * It returns the components that are required
9917
+ * @param components array of components
9918
+ */
9919
+ static getRequiredComponents(components) {
9920
+ return FormioUtil.getComponentsByFeature(components, [EFormioKey.VALIDATE, EFormioKey.REQUIRED], true);
10266
9921
  }
10267
- changeTopFiveSegmentation(username, type) {
10268
- return this.httpClient.get(this.environment.host.backend.segmentation +
10269
- 'PlicSegmentationUserController/changeTopFiveSegmentation', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9922
+ /**
9923
+ * It returns the components that have a specific feature defined by properties and value
9924
+ * @param components array of components
9925
+ * @param properties path of properties example [validate, required] or [unique]
9926
+ * @param value the value that should have the property
9927
+ */
9928
+ static getComponentsByFeature(components, properties, value) {
9929
+ let result = [];
9930
+ if (properties && properties.length > 0) {
9931
+ // get components
9932
+ const fields = FormioUtil.getComponents(components);
9933
+ // get first and last property
9934
+ const firstProperty = properties[0];
9935
+ const lastProperty = properties[properties.length - 1];
9936
+ if (fields) {
9937
+ // iterate the fields
9938
+ for (let i = 0; i < fields.length; i++) {
9939
+ // it contains the entire object field
9940
+ const field = fields[i];
9941
+ // it contains the current component and it is gonna be the component of every property
9942
+ let component = field;
9943
+ if (field[firstProperty]) {
9944
+ for (let j = 0; j < properties.length; j++) {
9945
+ const property = properties[j];
9946
+ // if component.property doesnt exist then break
9947
+ if (!component[property])
9948
+ break;
9949
+ if (property === lastProperty) {
9950
+ // it is the last property so if the value is equals to component.lastproperty then it is added to result
9951
+ if (component[property] == value)
9952
+ result.push(field);
9953
+ }
9954
+ else {
9955
+ // otherwise component will be equal to the component.property
9956
+ component = component[property];
9957
+ }
9958
+ }
9959
+ }
9960
+ }
9961
+ }
9962
+ }
9963
+ return result;
10270
9964
  }
10271
- showEllipsisSegmentationByUser(username, type) {
10272
- return this.httpClient.get(this.environment.host.backend.segmentation +
10273
- 'PlicSegmentationUserController/showEllipsisSegmentationByUser', { params: new HttpParams().set('username', username).set('type', type.toString()) });
9965
+ /**
9966
+ * It returns the components
9967
+ * @param components
9968
+ */
9969
+ static getComponents(components) {
9970
+ return FormioUtil.getComponentsByRecursion(components, '', null);
10274
9971
  }
10275
- getSegmentationGreaterThanPosition(username, type, position) {
10276
- return this.httpClient.get(this.environment.host.backend.segmentation +
10277
- 'PlicSegmentationUserController/getSegmentationGreaterThanPosition', {
10278
- params: new HttpParams()
10279
- .set('username', username)
10280
- .set('type', type.toString())
10281
- .set('position', position.toString())
10282
- });
9972
+ /**
9973
+ * It returns the components array of the form by recursion
9974
+ * @param components array of components
9975
+ * @param titlePanel name of parent panel, so children components will inherit the panelName
9976
+ * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
9977
+ */
9978
+ static getComponentsByRecursion(components, titlePanel, conditionalParent) {
9979
+ // it contains the result array
9980
+ let result = [];
9981
+ if (components) {
9982
+ // iterate over components
9983
+ for (const component of components) {
9984
+ // avoid the editgrid component ot if it has a different behavior it should have an else statement
9985
+ if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
9986
+ // if component is panel then titlePanel variable is changed, and it is gonna be inherited
9987
+ if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
9988
+ titlePanel = component[EFormioKey.TITLE];
9989
+ }
9990
+ if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
9991
+ typeof component[EFormioKey.COLUMNS] !== 'undefined') {
9992
+ // resolve conditional parent conditional
9993
+ const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
9994
+ // change condition
9995
+ if (conditional)
9996
+ conditionalParent = conditional;
9997
+ // it contains the subcomponents depending on the value of component if it has components or columns
9998
+ let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
9999
+ ? component[EFormioKey.COMPONENTS]
10000
+ : component[EFormioKey.COLUMNS];
10001
+ // if component has subComponents, then execute the recursion function to get the recursionnResult
10002
+ const recursionResult = FormioUtil.getComponentsByRecursion(subComponents, titlePanel, conditionalParent);
10003
+ // if recursion result then result concats the recursionResult
10004
+ if (recursionResult)
10005
+ result = result.concat(recursionResult);
10006
+ // reset conditional Parent
10007
+ if (component[EFormioKey.ID] == conditionalParent.id)
10008
+ conditionalParent = undefined;
10009
+ }
10010
+ else {
10011
+ // avoid the component type button
10012
+ if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
10013
+ component[EFormioKey.KEY] &&
10014
+ component[EFormioKey.LABEL]) {
10015
+ // resolve conditional conditional object
10016
+ let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10017
+ if (!conditional)
10018
+ conditional = conditionalParent;
10019
+ component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
10020
+ component[EFormioKey.CUSTOM_CONDITIONAL] =
10021
+ conditional[EFormioKey.CUSTOM_CONDITIONAL];
10022
+ // add namPanel as property
10023
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10024
+ // add component to the result
10025
+ result.push(component);
10026
+ }
10027
+ }
10028
+ }
10029
+ }
10030
+ }
10031
+ return result;
10283
10032
  }
10284
- getSegmentationByIdOrderByName(username, type) {
10285
- return this.httpClient.get(this.environment.host.backend.segmentation +
10286
- 'PlicSegmentationUserController/getSegmentationByIdOrderByName', { params: new HttpParams().set('username', username).set('type', type.toString()) });
10033
+ /**
10034
+ * It returns the components
10035
+ * @param components
10036
+ * @param keepEditGrids
10037
+ */
10038
+ static getComponentsWithEditGrids(components) {
10039
+ return FormioUtil.getComponentsByRecursionWithEditGrids(components, '', null);
10287
10040
  }
10288
- getSegmentationById(segmentationId) {
10289
- return this.httpClient.get(this.environment.host.backend.segmentation +
10290
- 'PlicSegmentationUserController/getSegmentationById', { params: new HttpParams().set('segmentationId', segmentationId) });
10041
+ /**
10042
+ * It returns the components array of the form by recursion
10043
+ * @param components array of components
10044
+ * @param titlePanel name of parent panel, so children components will inherit the panelName
10045
+ * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
10046
+ */
10047
+ static getComponentsByRecursionWithEditGrids(components, titlePanel, conditionalParent) {
10048
+ // it contains the result array
10049
+ let result = [];
10050
+ if (components) {
10051
+ // iterate over components
10052
+ for (const component of components) {
10053
+ // avoid the editgrid component ot if it has a different behavior it should have an else statement
10054
+ // if component is panel then titlePanel variable is changed, and it is gonna be inherited
10055
+ if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
10056
+ titlePanel = component[EFormioKey.TITLE];
10057
+ }
10058
+ if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
10059
+ typeof component[EFormioKey.COLUMNS] !== 'undefined') {
10060
+ // resolve conditional parent conditional
10061
+ const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10062
+ // change condition
10063
+ if (conditional)
10064
+ conditionalParent = conditional;
10065
+ // it contains the subcomponents depending on the value of component if it has components or columns
10066
+ let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
10067
+ ? component[EFormioKey.COMPONENTS]
10068
+ : component[EFormioKey.COLUMNS];
10069
+ if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID) {
10070
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10071
+ result.push(component);
10072
+ }
10073
+ // if component has subComponents, then execute the recursion function to get the recursionnResult
10074
+ const recursionResult = FormioUtil.getComponentsByRecursionWithEditGrids(subComponents, titlePanel, conditionalParent);
10075
+ // if recursion result then result concats the recursionResult
10076
+ if (recursionResult)
10077
+ result = result.concat(recursionResult);
10078
+ // reset conditional Parent
10079
+ if (component[EFormioKey.ID] == conditionalParent.id)
10080
+ conditionalParent = undefined;
10081
+ }
10082
+ else {
10083
+ // avoid the component type button
10084
+ if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
10085
+ component[EFormioKey.KEY] &&
10086
+ component[EFormioKey.LABEL]) {
10087
+ // resolve conditional conditional object
10088
+ let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10089
+ if (!conditional)
10090
+ conditional = conditionalParent;
10091
+ component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
10092
+ component[EFormioKey.CUSTOM_CONDITIONAL] =
10093
+ conditional[EFormioKey.CUSTOM_CONDITIONAL];
10094
+ // add namPanel as property
10095
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10096
+ // add component to the result
10097
+ result.push(component);
10098
+ }
10099
+ }
10100
+ }
10101
+ }
10102
+ return result;
10291
10103
  }
10292
- getAllSegmentationByLoginAndType(username, type) {
10293
- return this.httpClient.get(this.environment.host.backend.segmentation +
10294
- 'PlicSegmentationUserController/getAllSegmentationByLoginAndType', { params: new HttpParams().set('username', username).set('type', type.toString()) });
10104
+ /**
10105
+ * It resolve the inheritance conditional
10106
+ * @param conditionalObject
10107
+ * @param conditional
10108
+ * @param customConditional
10109
+ */
10110
+ static resolveInheritanceConditional(conditionalObject, conditional, customConditional, parentId) {
10111
+ // validate if there is a condition with the new fields
10112
+ if (!conditionalObject ||
10113
+ customConditional ||
10114
+ (conditional && conditional[EFormioKey.WHEN] && conditional[EFormioKey.EQ]) ||
10115
+ (conditional && conditional[EFormioKey.JSON])) {
10116
+ return { conditional: conditional, customConditional: customConditional, id: parentId };
10117
+ }
10118
+ return null;
10295
10119
  }
10296
- getPublicSegmentation(lastNHours, type) {
10297
- return this.httpClient.get(this.environment.host.backend.segmentation +
10298
- 'PlicSegmentationUserController/getPublicSegmentation', {
10299
- params: new HttpParams()
10300
- .set('lastNHours', lastNHours.toString())
10301
- .set('type', type.toString())
10302
- });
10120
+ /**
10121
+ * It returns the edit grid components
10122
+ * @param components
10123
+ */
10124
+ static getEditGridKeyLabels(components) {
10125
+ return FormioUtil.getEditGridKeyLabelsByRecursion(components, '', null);
10303
10126
  }
10304
- getSegColumn() {
10305
- return this.httpClient.get(this.environment.host.backend.segmentation +
10306
- 'PlicSegmentationUserController/getSegColumn', { params: new HttpParams() });
10127
+ /**
10128
+ * It returns the components edit grid array of the form by recursion
10129
+ * @param components array of components
10130
+ * @param titlePanel name of parent panel, so children components will inherit the panelName
10131
+ * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
10132
+ */
10133
+ static getEditGridKeyLabelsByRecursion(components, titlePanel, conditionalParent) {
10134
+ // it contains the result array
10135
+ let result = [];
10136
+ if (components) {
10137
+ // iterate over components
10138
+ for (const component of components) {
10139
+ // if component is panel then titlePanel variable is changed, and it is gonna be inherited
10140
+ if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
10141
+ titlePanel = component[EFormioKey.TITLE];
10142
+ }
10143
+ if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
10144
+ typeof component[EFormioKey.COLUMNS] !== 'undefined') {
10145
+ // resolve conditional parent conditional
10146
+ const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10147
+ // change condition
10148
+ if (conditional)
10149
+ conditionalParent = conditional;
10150
+ // it contains the subcomponents depending on the value of component if it has components or columns
10151
+ let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
10152
+ ? component[EFormioKey.COMPONENTS]
10153
+ : component[EFormioKey.COLUMNS];
10154
+ if (component[EFormioKey.TYPE] == EFormioKey.EDITGRID) {
10155
+ // add namPanel as property
10156
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10157
+ // add component to the result
10158
+ result.push(component);
10159
+ }
10160
+ else {
10161
+ // if component has subComponents, then execute the recursion function to get the recursionnResult
10162
+ const recursionResult = FormioUtil.getEditGridKeyLabelsByRecursion(subComponents, titlePanel, conditionalParent);
10163
+ // if recursion result then result concats the recursionResult
10164
+ if (recursionResult)
10165
+ result = result.concat(recursionResult);
10166
+ // reset conditional Parent
10167
+ if (component[EFormioKey.ID] == conditionalParent.id)
10168
+ conditionalParent = undefined;
10169
+ }
10170
+ }
10171
+ else {
10172
+ }
10173
+ }
10174
+ }
10175
+ return result;
10307
10176
  }
10308
- getSegmentationByName(username, type, name) {
10309
- return this.httpClient.get(this.environment.host.backend.segmentation +
10310
- 'PlicSegmentationUserController/getSegmentationByName', {
10311
- params: new HttpParams()
10312
- .set('username', username)
10313
- .set('type', type.toString())
10314
- .set('name', name)
10315
- });
10177
+ /**
10178
+ * It returns the components
10179
+ * @param components
10180
+ * @param keepEditGrids
10181
+ */
10182
+ static getComponentsIntoEditGrids(components, editGridName) {
10183
+ return FormioUtil.getComponentsByRecursionIntoEditGrids(components, '', null, editGridName, false);
10316
10184
  }
10317
- }
10318
- SegmentationUserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
10319
- SegmentationUserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, providedIn: 'root' });
10320
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationUserService, decorators: [{
10321
- type: Injectable,
10322
- args: [{
10323
- providedIn: 'root'
10324
- }]
10325
- }], ctorParameters: function () {
10326
- return [{ type: undefined, decorators: [{
10327
- type: Inject,
10328
- args: ['environment']
10329
- }] }, { type: i1.HttpClient }];
10330
- } });
10331
-
10332
- class SegmentationService {
10333
- constructor(environment, httpClient) {
10334
- this.environment = environment;
10335
- this.httpClient = httpClient;
10336
- this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
10185
+ /**
10186
+ * It returns the components array of the form by recursion
10187
+ * @param components array of components
10188
+ * @param titlePanel name of parent panel, so children components will inherit the panelName
10189
+ * @param conditionalObject conditional object it will be inherited from panel {conditional: { eq: , value: , when: , json: }, customConditional: }
10190
+ */
10191
+ static getComponentsByRecursionIntoEditGrids(components, titlePanel, conditionalParent, editGridName, existEditGrid) {
10192
+ // it contains the result array
10193
+ let result = [];
10194
+ if (components) {
10195
+ // iterate over components
10196
+ for (const component of components) {
10197
+ // avoid the editgrid component ot if it has a different behavior it should have an else statement
10198
+ // if component is panel then titlePanel variable is changed, and it is gonna be inherited
10199
+ if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
10200
+ titlePanel = component[EFormioKey.TITLE];
10201
+ }
10202
+ if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
10203
+ typeof component[EFormioKey.COLUMNS] !== 'undefined') {
10204
+ // resolve conditional parent conditional
10205
+ const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10206
+ // change condition
10207
+ if (conditional)
10208
+ conditionalParent = conditional;
10209
+ // it contains the subcomponents depending on the value of component if it has components or columns
10210
+ let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
10211
+ ? component[EFormioKey.COMPONENTS]
10212
+ : component[EFormioKey.COLUMNS];
10213
+ if (component[EFormioKey.TYPE] === EFormioKey.EDITGRID &&
10214
+ component['key'] == editGridName) {
10215
+ existEditGrid = true;
10216
+ if (typeof component[EFormioKey.COMPONENTS] !== 'undefined' ||
10217
+ typeof component[EFormioKey.COLUMNS] !== 'undefined') {
10218
+ // resolve conditional parent conditional
10219
+ const conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10220
+ // change condition
10221
+ if (conditional)
10222
+ conditionalParent = conditional;
10223
+ // it contains the subcomponents depending on the value of component if it has components or columns
10224
+ let subComponents = typeof component[EFormioKey.COMPONENTS] !== 'undefined'
10225
+ ? component[EFormioKey.COMPONENTS]
10226
+ : component[EFormioKey.COLUMNS];
10227
+ // if component has subComponents, then execute the recursion function to get the recursionnResult
10228
+ const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
10229
+ // if recursion result then result concats the recursionResult
10230
+ if (recursionResult)
10231
+ result = result.concat(recursionResult);
10232
+ // reset conditional Parent
10233
+ if (component && conditionalParent) {
10234
+ if (component[EFormioKey.ID] == conditionalParent.id)
10235
+ conditionalParent = undefined;
10236
+ }
10237
+ }
10238
+ else {
10239
+ // avoid the component type button
10240
+ if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
10241
+ component[EFormioKey.KEY] &&
10242
+ component[EFormioKey.LABEL] &&
10243
+ existEditGrid) {
10244
+ // resolve conditional conditional object
10245
+ let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10246
+ if (!conditional)
10247
+ conditional = conditionalParent;
10248
+ component[EFormioKey.CONDITIONAL] =
10249
+ conditional[EFormioKey.CONDITIONAL];
10250
+ component[EFormioKey.CUSTOM_CONDITIONAL] =
10251
+ conditional[EFormioKey.CUSTOM_CONDITIONAL];
10252
+ // add namPanel as property
10253
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10254
+ // add component to the result
10255
+ result.push(component);
10256
+ }
10257
+ }
10258
+ }
10259
+ // if component has subComponents, then execute the recursion function to get the recursionnResult
10260
+ const recursionResult = FormioUtil.getComponentsByRecursionIntoEditGrids(subComponents, titlePanel, conditionalParent, editGridName, existEditGrid);
10261
+ // if recursion result then result concats the recursionResult
10262
+ if (recursionResult)
10263
+ result = result.concat(recursionResult);
10264
+ // reset conditional Parent
10265
+ if (component && conditionalParent) {
10266
+ if (component[EFormioKey.ID] == conditionalParent.id)
10267
+ conditionalParent = undefined;
10268
+ }
10269
+ }
10270
+ else {
10271
+ // avoid the component type button
10272
+ if (component[EFormioKey.TYPE] !== EFormioKey.BUTTON &&
10273
+ component[EFormioKey.KEY] &&
10274
+ component[EFormioKey.LABEL] &&
10275
+ existEditGrid) {
10276
+ // resolve conditional conditional object
10277
+ let conditional = this.resolveInheritanceConditional(conditionalParent, component[EFormioKey.CONDITIONAL], component[EFormioKey.CUSTOM_CONDITIONAL], component[EFormioKey.ID]);
10278
+ if (!conditional)
10279
+ conditional = conditionalParent;
10280
+ component[EFormioKey.CONDITIONAL] = conditional[EFormioKey.CONDITIONAL];
10281
+ component[EFormioKey.CUSTOM_CONDITIONAL] =
10282
+ conditional[EFormioKey.CUSTOM_CONDITIONAL];
10283
+ // add namPanel as property
10284
+ component[EFormioKey.TITLE_PANEL] = titlePanel;
10285
+ // add component to the result
10286
+ result.push(component);
10287
+ }
10288
+ }
10289
+ }
10290
+ }
10291
+ return result;
10337
10292
  }
10338
- /** It send the email */
10339
- send(segmentation) {
10340
- return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/send', segmentation, this.headerJson);
10293
+ /**
10294
+ * Create 2 jason objects of data form by component key and other by component key and title form key
10295
+ * @param dataForm dataForm model object
10296
+ * @returns Object of 2 element
10297
+ */
10298
+ static createListDataByDataFormList(dataForm, listForm) {
10299
+ let listData = {};
10300
+ let listDataByForm = {};
10301
+ if (dataForm && dataForm.length > 0) {
10302
+ listData = {};
10303
+ listDataByForm = {};
10304
+ let dForm;
10305
+ for (dForm of dataForm) {
10306
+ if (!dForm.data) {
10307
+ continue;
10308
+ }
10309
+ const form = listForm.find(function (formTmp) {
10310
+ return formTmp.id == dForm.formId;
10311
+ });
10312
+ if (!form) {
10313
+ //console.error('No se encontró el formulario con id ' + dForm.formId);
10314
+ continue;
10315
+ }
10316
+ const keyFormTitle = TokenService.getKeyFormulario(form.title) + '_';
10317
+ for (const key in dForm.data) {
10318
+ listData[key] = dForm.data[key];
10319
+ listDataByForm[keyFormTitle + key] = dForm.data[key];
10320
+ }
10321
+ }
10322
+ }
10323
+ return {
10324
+ listData: listData,
10325
+ listDataByForm: listDataByForm
10326
+ };
10341
10327
  }
10342
- /** It send the email */
10343
- sendMultiple(listSegmentation) {
10344
- return this.httpClient.post(this.environment.host.backend.queue + 'segmentation/sendMassive', listSegmentation, this.headerJson);
10328
+ /**
10329
+ * It returns the components
10330
+ * @param components
10331
+ */
10332
+ static getPanelComponents(components) {
10333
+ return FormioUtil.getComponentsByPanel(components);
10345
10334
  }
10346
- }
10347
- SegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
10348
- SegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, providedIn: 'root' });
10349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: SegmentationService, decorators: [{
10350
- type: Injectable,
10351
- args: [{
10352
- providedIn: 'root'
10353
- }]
10354
- }], ctorParameters: function () {
10355
- return [{ type: undefined, decorators: [{
10356
- type: Inject,
10357
- args: ['environment']
10358
- }] }, { type: i1.HttpClient }];
10359
- } });
10335
+ /**
10336
+ * It returns the components array of the form
10337
+ * @param components array of components
10338
+ */
10339
+ static getComponentsByPanel(components) {
10340
+ // it contains the result array
10341
+ let result = [];
10342
+ if (components) {
10343
+ // iterate over components
10344
+ for (const component of components) {
10345
+ // avoid the editgrid component ot if it has a different behavior it should have an else statement
10346
+ if (component[EFormioKey.TYPE] !== EFormioKey.EDITGRID) {
10347
+ // if component is panel then titlePanel variable is changed, and it is gonna be inherited
10348
+ if (component[EFormioKey.TYPE] === EFormioKey.PANEL) {
10349
+ result.push(component);
10350
+ }
10351
+ }
10352
+ }
10353
+ }
10354
+ return result;
10355
+ }
10356
+ }
10360
10357
 
10361
10358
  class SendApplicationService {
10362
10359
  constructor(environment, tokenService, emailService, interactionApplicationUserService) {
@@ -11928,12 +11925,19 @@ class ProgressBarService {
11928
11925
  constructor(environment, httpClient) {
11929
11926
  this.environment = environment;
11930
11927
  this.httpClient = httpClient;
11928
+ this.urlBase = this.environment.host.backend.configuration;
11931
11929
  }
11932
- saveProgress(data) {
11933
- return this.httpClient.post(this.environment.host.backend.configuration + 'progressBar/saveProgress', data, HEADER_JSON);
11930
+ saveProgress(data, projectFrom = EProjectFrom.PLI) {
11931
+ if (projectFrom == EProjectFrom.GIC) {
11932
+ this.urlBase = this.environment.host.backend.gicConfiguration;
11933
+ }
11934
+ return this.httpClient.post(this.urlBase + 'progressBar/saveProgress', data, HEADER_JSON);
11934
11935
  }
11935
- getProgress(processId, processType) {
11936
- return this.httpClient.get(this.environment.host.backend.configuration + 'progressBar/getProgressByProcessIdAndProcessType', {
11936
+ getProgress(processId, processType, projectFrom = EProjectFrom.PLI) {
11937
+ if (projectFrom == EProjectFrom.GIC) {
11938
+ this.urlBase = this.environment.host.backend.gicConfiguration;
11939
+ }
11940
+ return this.httpClient.get(this.urlBase + 'progressBar/getProgressByProcessIdAndProcessType', {
11937
11941
  params: new HttpParams()
11938
11942
  .set('processId', processId.toString())
11939
11943
  .set('processType', processType.toString())
@@ -11958,6 +11962,8 @@ class ProgressBarComponent {
11958
11962
  constructor(toastrService, progressBarService) {
11959
11963
  this.toastrService = toastrService;
11960
11964
  this.progressBarService = progressBarService;
11965
+ // Desde que proyecto se consulta a la barra. 1 Para PLI, 2 GIC
11966
+ this.projectFrom = EProjectFrom.PLI; // Enumerado
11961
11967
  this.finishProcess = new EventEmitter();
11962
11968
  this.setTimeOutValue = 0;
11963
11969
  }
@@ -11988,7 +11994,7 @@ class ProgressBarComponent {
11988
11994
  handleProgress() {
11989
11995
  return __awaiter(this, void 0, void 0, function* () {
11990
11996
  let processActual = yield this.progressBarService
11991
- .getProgress(this.processId, this.processType)
11997
+ .getProgress(this.processId, this.processType, this.projectFrom)
11992
11998
  .toPromise();
11993
11999
  let process;
11994
12000
  if (processActual == null) {
@@ -11998,7 +12004,9 @@ class ProgressBarComponent {
11998
12004
  process.state = '';
11999
12005
  process.current = this.current;
12000
12006
  process.end = this.end;
12001
- processActual = yield this.progressBarService.saveProgress(process).toPromise();
12007
+ processActual = yield this.progressBarService
12008
+ .saveProgress(process, this.projectFrom)
12009
+ .toPromise();
12002
12010
  }
12003
12011
  this.processId = processActual.processId;
12004
12012
  this.percentage = processActual.percentage;
@@ -12020,7 +12028,7 @@ class ProgressBarComponent {
12020
12028
  }
12021
12029
  }
12022
12030
  ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i2.ToastrService }, { token: ProgressBarService }], target: i0.ɵɵFactoryTarget.Component });
12023
- ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ProgressBarComponent, selector: "pli-progress-bar", inputs: { processId: "processId", processType: "processType", percentage: "percentage", current: "current", end: "end" }, outputs: { finishProcess: "finishProcess" }, ngImport: i0, template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"], directives: [{ type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
12031
+ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ProgressBarComponent, selector: "pli-progress-bar", inputs: { processId: "processId", processType: "processType", percentage: "percentage", current: "current", end: "end", projectFrom: "projectFrom" }, outputs: { finishProcess: "finishProcess" }, ngImport: i0, template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"], directives: [{ type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
12024
12032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ProgressBarComponent, decorators: [{
12025
12033
  type: Component,
12026
12034
  args: [{ selector: 'pli-progress-bar', template: "<div class=\"progress\">\r\n <div class=\"progress-bar progress-bar-striped active\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" [ngStyle]=\"{ width: percentage + '%' }\">\r\n {{ percentage }}%\r\n </div>\r\n</div>", styles: [".progress .progress-bar{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}\n"] }]
@@ -12034,6 +12042,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
12034
12042
  type: Input
12035
12043
  }], end: [{
12036
12044
  type: Input
12045
+ }], projectFrom: [{
12046
+ type: Input
12037
12047
  }], finishProcess: [{
12038
12048
  type: Output
12039
12049
  }] } });
@@ -13329,16 +13339,254 @@ class CommitteeSnapshotService {
13329
13339
  deleteByName(name) {
13330
13340
  return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByName?name=${name}`);
13331
13341
  }
13332
- deleteByPromCode(promCodigo) {
13333
- return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByPromCode?promCodigo=${promCodigo}`);
13342
+ deleteByPromCode(promCodigo) {
13343
+ return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByPromCode?promCodigo=${promCodigo}`);
13344
+ }
13345
+ deleteByCommitteeId(committeeId) {
13346
+ return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByCommitteeId?committeeId=${committeeId}`);
13347
+ }
13348
+ }
13349
+ CommitteeSnapshotService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13350
+ CommitteeSnapshotService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, providedIn: 'root' });
13351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, decorators: [{
13352
+ type: Injectable,
13353
+ args: [{
13354
+ providedIn: 'root'
13355
+ }]
13356
+ }], ctorParameters: function () {
13357
+ return [{ type: undefined, decorators: [{
13358
+ type: Inject,
13359
+ args: ['environment']
13360
+ }] }, { type: i1.HttpClient }];
13361
+ } });
13362
+
13363
+ class CreditScoreService {
13364
+ constructor(environment, httpClient) {
13365
+ this.environment = environment;
13366
+ this.httpClient = httpClient;
13367
+ }
13368
+ calculateCodebtorsScore(promCodigo, applicationId) {
13369
+ return this.httpClient.get(this.environment.host.backend.backoffice + 'credit-score/calculateCodebtorsScore', {
13370
+ params: new HttpParams()
13371
+ .set('applicationId', applicationId)
13372
+ .set('promCodigo', String(promCodigo))
13373
+ });
13374
+ }
13375
+ calculateScore(promCodigo, lApplicationId) {
13376
+ return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/calculateScore', lApplicationId, {
13377
+ params: new HttpParams().set('promCodigo', String(promCodigo))
13378
+ });
13379
+ }
13380
+ getCreditScoreDate(identification, promCodigo) {
13381
+ return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/getCreditScoreDate', identification, {
13382
+ params: new HttpParams().set('promCodigo', String(promCodigo))
13383
+ });
13384
+ }
13385
+ }
13386
+ CreditScoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13387
+ CreditScoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, providedIn: 'root' });
13388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, decorators: [{
13389
+ type: Injectable,
13390
+ args: [{
13391
+ providedIn: 'root'
13392
+ }]
13393
+ }], ctorParameters: function () {
13394
+ return [{ type: undefined, decorators: [{
13395
+ type: Inject,
13396
+ args: ['environment']
13397
+ }] }, { type: i1.HttpClient }];
13398
+ } });
13399
+
13400
+ class DataLetterSegmentationService {
13401
+ constructor(environment, httpClient) {
13402
+ this.environment = environment;
13403
+ this.httpClient = httpClient;
13404
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13405
+ }
13406
+ generateDataLetterFromSnapshot(idCampaign) {
13407
+ return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateDataLetterFromSnapshot', idCampaign, this.headerJson);
13408
+ }
13409
+ segment(idCampaign) {
13410
+ return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/segment', idCampaign, this.headerJson);
13411
+ }
13412
+ findSegmentationByCommitteeIdAndCampaignIdAndActive(idCommittee, idCampaign, active) {
13413
+ return this.httpClient.get(this.environment.host.backend.backoffice +
13414
+ 'data-letter/findSegmentationByCommitteeIdAndCampaignIdAndActive', {
13415
+ params: new HttpParams()
13416
+ .set('idCommittee', idCommittee.toString())
13417
+ .set('idCampaign', idCampaign.toString())
13418
+ .set('active', active.toString())
13419
+ });
13420
+ }
13421
+ findDataLetterByCampaignId(idCampaign) {
13422
+ return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findByCampaignId', { params: new HttpParams().set('idCampaign', idCampaign.toString()) });
13423
+ }
13424
+ generateLetter(promCodigo, campaignId, filter) {
13425
+ var params = { promCodigo, campaignId, filter };
13426
+ return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateLetter', params, this.headerJson);
13427
+ }
13428
+ sendLetters(test, campaignId, email, filter) {
13429
+ var params = { test, campaignId, email, filter };
13430
+ return this.httpClient.post(this.environment.host.backend.queue + 'letterCampaing', params, this.headerJson);
13431
+ }
13432
+ findLogs(campaignId) {
13433
+ return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findLogs?idCampaign=' + campaignId);
13434
+ }
13435
+ getUniversities(campaignId) {
13436
+ return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/universities?idCampaign=' + campaignId);
13437
+ }
13438
+ getParagraphs(promCodigo) {
13439
+ return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/paragraphs?promCodigo=' + promCodigo);
13440
+ }
13441
+ }
13442
+ DataLetterSegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13443
+ DataLetterSegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, providedIn: 'root' });
13444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, decorators: [{
13445
+ type: Injectable,
13446
+ args: [{
13447
+ providedIn: 'root'
13448
+ }]
13449
+ }], ctorParameters: function () {
13450
+ return [{ type: undefined, decorators: [{
13451
+ type: Inject,
13452
+ args: ['environment']
13453
+ }] }, { type: i1.HttpClient }];
13454
+ } });
13455
+
13456
+ class DocumentAnalysisAutoService {
13457
+ constructor(environment, httpClient) {
13458
+ this.environment = environment;
13459
+ this.httpClient = httpClient;
13460
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13461
+ }
13462
+ /** It send All applications for automatic document analysis */
13463
+ send(sendDocAnalysisAutoDto) {
13464
+ return this.httpClient.post(this.environment.host.backend.queue + 'docAnalysisAuto/send', sendDocAnalysisAutoDto);
13465
+ }
13466
+ }
13467
+ DocumentAnalysisAutoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13468
+ DocumentAnalysisAutoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, providedIn: 'root' });
13469
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, decorators: [{
13470
+ type: Injectable,
13471
+ args: [{
13472
+ providedIn: 'root'
13473
+ }]
13474
+ }], ctorParameters: function () {
13475
+ return [{ type: undefined, decorators: [{
13476
+ type: Inject,
13477
+ args: ['environment']
13478
+ }] }, { type: i1.HttpClient }];
13479
+ } });
13480
+
13481
+ class DocumentValidationAttemptService {
13482
+ constructor(environment, httpClient) {
13483
+ this.environment = environment;
13484
+ this.httpClient = httpClient;
13485
+ }
13486
+ getByApplicationIdAndDocumentId(applicationId, configurationDocumentId) {
13487
+ return this.httpClient.get(this.environment.host.backend.frontoffice + 'getByApplicationIdAndDocumentId', {
13488
+ params: new HttpParams()
13489
+ .set('applicationId', applicationId)
13490
+ .set('configurationDocumentId', configurationDocumentId.toString())
13491
+ });
13492
+ }
13493
+ save(documentValidationAttempt) {
13494
+ return this.httpClient.post(this.environment.host.backend.frontoffice + 'save', documentValidationAttempt);
13495
+ }
13496
+ }
13497
+ DocumentValidationAttemptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13498
+ DocumentValidationAttemptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, providedIn: 'root' });
13499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, decorators: [{
13500
+ type: Injectable,
13501
+ args: [{
13502
+ providedIn: 'root'
13503
+ }]
13504
+ }], ctorParameters: function () {
13505
+ return [{ type: undefined, decorators: [{
13506
+ type: Inject,
13507
+ args: ['environment']
13508
+ }] }, { type: i1.HttpClient }];
13509
+ } });
13510
+
13511
+ class GicClientDisbursementMetadataService {
13512
+ constructor(environment, httpClient) {
13513
+ this.environment = environment;
13514
+ this.httpClient = httpClient;
13515
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13516
+ }
13517
+ getClientDisbursementMetadata(promCodigo, identification) {
13518
+ return this.httpClient.get(this.environment.host.backend.gicBackoffice +
13519
+ 'gic-client-metadata/getClientDisbursementMetadata', {
13520
+ params: new HttpParams()
13521
+ .set('promCodigo', String(promCodigo))
13522
+ .set('identification', String(identification))
13523
+ });
13524
+ }
13525
+ }
13526
+ GicClientDisbursementMetadataService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13527
+ GicClientDisbursementMetadataService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, providedIn: 'root' });
13528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientDisbursementMetadataService, decorators: [{
13529
+ type: Injectable,
13530
+ args: [{
13531
+ providedIn: 'root'
13532
+ }]
13533
+ }], ctorParameters: function () {
13534
+ return [{ type: undefined, decorators: [{
13535
+ type: Inject,
13536
+ args: ['environment']
13537
+ }] }, { type: i1.HttpClient }];
13538
+ } });
13539
+
13540
+ class GicCnfBankvisionTransactionService {
13541
+ constructor(environment, httpClient) {
13542
+ this.environment = environment;
13543
+ this.httpClient = httpClient;
13544
+ }
13545
+ getByPromCodigo(promCode) {
13546
+ let httpParams = new HttpParams();
13547
+ httpParams = httpParams.set('promCodigo', String(promCode));
13548
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration +
13549
+ 'gic_cnf_bankvision_transaction/getByPromCodigo', { params: (httpParams = httpParams) });
13550
+ }
13551
+ save(gicCnfBankvisionTransaction) {
13552
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic_cnf_bankvision_transaction/save', gicCnfBankvisionTransaction);
13553
+ }
13554
+ }
13555
+ GicCnfBankvisionTransactionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13556
+ GicCnfBankvisionTransactionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, providedIn: 'root' });
13557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfBankvisionTransactionService, decorators: [{
13558
+ type: Injectable,
13559
+ args: [{
13560
+ providedIn: 'root'
13561
+ }]
13562
+ }], ctorParameters: function () {
13563
+ return [{ type: undefined, decorators: [{
13564
+ type: Inject,
13565
+ args: ['environment']
13566
+ }] }, { type: i1.HttpClient }];
13567
+ } });
13568
+
13569
+ class GicCnfClosingDateService {
13570
+ constructor(environment, httpClient) {
13571
+ this.environment = environment;
13572
+ this.httpClient = httpClient;
13573
+ }
13574
+ getAll() {
13575
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/getAll');
13576
+ }
13577
+ save(gicCnfClosingDate) {
13578
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/save', gicCnfClosingDate);
13334
13579
  }
13335
- deleteByCommitteeId(committeeId) {
13336
- return this.httpClient.delete(`${this.environment.host.backend.backoffice}committee-snapshot/deleteByCommitteeId?committeeId=${committeeId}`);
13580
+ delete(id) {
13581
+ return this.httpClient.delete(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date', { params: new HttpParams().set('id', String(id)) });
13582
+ }
13583
+ getClosingDate() {
13584
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic_cnf_closing_date/getClosingDate');
13337
13585
  }
13338
13586
  }
13339
- CommitteeSnapshotService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13340
- CommitteeSnapshotService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, providedIn: 'root' });
13341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CommitteeSnapshotService, decorators: [{
13587
+ GicCnfClosingDateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13588
+ GicCnfClosingDateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, providedIn: 'root' });
13589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfClosingDateService, decorators: [{
13342
13590
  type: Injectable,
13343
13591
  args: [{
13344
13592
  providedIn: 'root'
@@ -13350,32 +13598,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
13350
13598
  }] }, { type: i1.HttpClient }];
13351
13599
  } });
13352
13600
 
13353
- class CreditScoreService {
13601
+ class GicClientService {
13354
13602
  constructor(environment, httpClient) {
13355
13603
  this.environment = environment;
13356
13604
  this.httpClient = httpClient;
13605
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13357
13606
  }
13358
- calculateCodebtorsScore(promCodigo, applicationId) {
13359
- return this.httpClient.get(this.environment.host.backend.backoffice + 'credit-score/calculateCodebtorsScore', {
13360
- params: new HttpParams()
13361
- .set('applicationId', applicationId)
13362
- .set('promCodigo', String(promCodigo))
13363
- });
13607
+ getByDataTablesParameters(dataTableParameters) {
13608
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/getByDataTablesParameters', dataTableParameters, this.headerJson);
13364
13609
  }
13365
- calculateScore(promCodigo, lApplicationId) {
13366
- return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/calculateScore', lApplicationId, {
13367
- params: new HttpParams().set('promCodigo', String(promCodigo))
13368
- });
13610
+ sendToGic(gicClientRequestTO) {
13611
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/send', gicClientRequestTO, this.headerJson);
13369
13612
  }
13370
- getCreditScoreDate(identification, promCodigo) {
13371
- return this.httpClient.post(this.environment.host.backend.backoffice + 'credit-score/getCreditScoreDate', identification, {
13372
- params: new HttpParams().set('promCodigo', String(promCodigo))
13373
- });
13613
+ savePaymentDay(identification, promCodigo, paymentDay) {
13614
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/savePaymentDay?identification=' + identification + '&promCodigo=' + promCodigo + '&paymentDay=' + paymentDay, null);
13615
+ }
13616
+ saveSurplus(identification, promCodigo, surplus) {
13617
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/saveSurplusType?identification=' + identification + '&promCodigo=' + promCodigo + '&surplusType=' + surplus, null);
13374
13618
  }
13375
13619
  }
13376
- CreditScoreService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13377
- CreditScoreService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, providedIn: 'root' });
13378
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: CreditScoreService, decorators: [{
13620
+ GicClientService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13621
+ GicClientService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, providedIn: 'root' });
13622
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, decorators: [{
13379
13623
  type: Injectable,
13380
13624
  args: [{
13381
13625
  providedIn: 'root'
@@ -13387,51 +13631,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
13387
13631
  }] }, { type: i1.HttpClient }];
13388
13632
  } });
13389
13633
 
13390
- class DataLetterSegmentationService {
13634
+ class GicDisbursementService {
13391
13635
  constructor(environment, httpClient) {
13392
13636
  this.environment = environment;
13393
13637
  this.httpClient = httpClient;
13394
13638
  this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13395
13639
  }
13396
- generateDataLetterFromSnapshot(idCampaign) {
13397
- return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateDataLetterFromSnapshot', idCampaign, this.headerJson);
13398
- }
13399
- segment(idCampaign) {
13400
- return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/segment', idCampaign, this.headerJson);
13401
- }
13402
- findSegmentationByCommitteeIdAndCampaignIdAndActive(idCommittee, idCampaign, active) {
13403
- return this.httpClient.get(this.environment.host.backend.backoffice +
13404
- 'data-letter/findSegmentationByCommitteeIdAndCampaignIdAndActive', {
13405
- params: new HttpParams()
13406
- .set('idCommittee', idCommittee.toString())
13407
- .set('idCampaign', idCampaign.toString())
13408
- .set('active', active.toString())
13409
- });
13410
- }
13411
- findDataLetterByCampaignId(idCampaign) {
13412
- return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findByCampaignId', { params: new HttpParams().set('idCampaign', idCampaign.toString()) });
13413
- }
13414
- generateLetter(promCodigo, campaignId, filter) {
13415
- var params = { promCodigo, campaignId, filter };
13416
- return this.httpClient.post(this.environment.host.backend.backoffice + 'data-letter/generateLetter', params, this.headerJson);
13417
- }
13418
- sendLetters(test, campaignId, email, filter) {
13419
- var params = { test, campaignId, email, filter };
13420
- return this.httpClient.post(this.environment.host.backend.queue + 'letterCampaing', params, this.headerJson);
13421
- }
13422
- findLogs(campaignId) {
13423
- return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/findLogs?idCampaign=' + campaignId);
13424
- }
13425
- getUniversities(campaignId) {
13426
- return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/universities?idCampaign=' + campaignId);
13640
+ getByDataTablesParameters(dataTableParameters) {
13641
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice +
13642
+ 'gic-disbursement/getByDataTablesParameters', dataTableParameters, this.headerJson);
13427
13643
  }
13428
- getParagraphs(promCodigo) {
13429
- return this.httpClient.get(this.environment.host.backend.backoffice + 'data-letter/paragraphs?promCodigo=' + promCodigo);
13644
+ updateBankvisionState(updateBankvisionRequestTO) {
13645
+ return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-disbursement/updateBankvisionState', updateBankvisionRequestTO);
13430
13646
  }
13431
13647
  }
13432
- DataLetterSegmentationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13433
- DataLetterSegmentationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, providedIn: 'root' });
13434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DataLetterSegmentationService, decorators: [{
13648
+ GicDisbursementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13649
+ GicDisbursementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, providedIn: 'root' });
13650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicDisbursementService, decorators: [{
13435
13651
  type: Injectable,
13436
13652
  args: [{
13437
13653
  providedIn: 'root'
@@ -13443,20 +13659,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
13443
13659
  }] }, { type: i1.HttpClient }];
13444
13660
  } });
13445
13661
 
13446
- class DocumentAnalysisAutoService {
13662
+ class GicCollectionService {
13447
13663
  constructor(environment, httpClient) {
13448
13664
  this.environment = environment;
13449
13665
  this.httpClient = httpClient;
13450
13666
  this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13451
13667
  }
13452
- /** It send All applications for automatic document analysis */
13453
- send(sendDocAnalysisAutoDto) {
13454
- return this.httpClient.post(this.environment.host.backend.queue + 'docAnalysisAuto/send', sendDocAnalysisAutoDto);
13668
+ getByDataTablesParameters(dataTableParameters) {
13669
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice +
13670
+ 'gic-collection/getByDataTablesParameters', dataTableParameters, this.headerJson);
13671
+ }
13672
+ updateBankvisionState(updateBankvisionRequestTO) {
13673
+ return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-collection/updateBankvisionState', updateBankvisionRequestTO);
13674
+ }
13675
+ updateGicPaymentApplication(gicPaymentApplication) {
13676
+ return this.httpClient.put(this.environment.host.backend.gicBackoffice + 'gic-payment-application/updateGicPaymentApplication', gicPaymentApplication);
13677
+ }
13678
+ delete(gicPaymentApplicationId) {
13679
+ return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'gic-payment-application/delete', {
13680
+ params: new HttpParams().set('gicPaymentApplicationId', gicPaymentApplicationId)
13681
+ });
13682
+ }
13683
+ deletedeletePaymentApplications(gicPaymentApplicationIds) {
13684
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-payment-application/deletePaymentApplications', gicPaymentApplicationIds, this.headerJson);
13685
+ }
13686
+ sendToBankVision(listIds) {
13687
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice +
13688
+ 'gic-payment-application/sendToBankVision', listIds, this.headerJson);
13455
13689
  }
13456
13690
  }
13457
- DocumentAnalysisAutoService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13458
- DocumentAnalysisAutoService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, providedIn: 'root' });
13459
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentAnalysisAutoService, decorators: [{
13691
+ GicCollectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13692
+ GicCollectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, providedIn: 'root' });
13693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCollectionService, decorators: [{
13460
13694
  type: Injectable,
13461
13695
  args: [{
13462
13696
  providedIn: 'root'
@@ -13468,25 +13702,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
13468
13702
  }] }, { type: i1.HttpClient }];
13469
13703
  } });
13470
13704
 
13471
- class DocumentValidationAttemptService {
13705
+ class GicPaymentApplicationService {
13472
13706
  constructor(environment, httpClient) {
13473
13707
  this.environment = environment;
13474
13708
  this.httpClient = httpClient;
13709
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13475
13710
  }
13476
- getByApplicationIdAndDocumentId(applicationId, configurationDocumentId) {
13477
- return this.httpClient.get(this.environment.host.backend.frontoffice + 'getByApplicationIdAndDocumentId', {
13478
- params: new HttpParams()
13479
- .set('applicationId', applicationId)
13480
- .set('configurationDocumentId', configurationDocumentId.toString())
13481
- });
13482
- }
13483
- save(documentValidationAttempt) {
13484
- return this.httpClient.post(this.environment.host.backend.frontoffice + 'save', documentValidationAttempt);
13711
+ getByDataTablesParameters(dataTableParameters) {
13712
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice +
13713
+ 'gic-payment-application/getByDataTablesParameters', dataTableParameters, this.headerJson);
13485
13714
  }
13486
13715
  }
13487
- DocumentValidationAttemptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13488
- DocumentValidationAttemptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, providedIn: 'root' });
13489
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DocumentValidationAttemptService, decorators: [{
13716
+ GicPaymentApplicationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13717
+ GicPaymentApplicationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, providedIn: 'root' });
13718
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentApplicationService, decorators: [{
13490
13719
  type: Injectable,
13491
13720
  args: [{
13492
13721
  providedIn: 'root'
@@ -13498,22 +13727,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
13498
13727
  }] }, { type: i1.HttpClient }];
13499
13728
  } });
13500
13729
 
13501
- class GicClientService {
13730
+ class InitialConfigurationGicParametersService {
13502
13731
  constructor(environment, httpClient) {
13503
13732
  this.environment = environment;
13504
13733
  this.httpClient = httpClient;
13505
13734
  this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
13506
13735
  }
13507
- getByDataTablesParameters(dataTableParameters) {
13508
- return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/getByDataTablesParameters', dataTableParameters, this.headerJson);
13736
+ saveConfiguration(gicParametersConfiguration) {
13737
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration +
13738
+ 'gic-initial-configuration/saveConfiguration', gicParametersConfiguration, this.headerJson);
13509
13739
  }
13510
- sendToGic(gicClientRequestTO) {
13511
- return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-client/send', gicClientRequestTO, this.headerJson);
13740
+ getAllConfigurationByPromCodigo(promCodigo) {
13741
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration +
13742
+ 'gic-initial-configuration/getAllConfigurationByPromCodigo', { params: new HttpParams().set('promCodigo', promCodigo.toString()) });
13743
+ }
13744
+ getConfigurationById(id) {
13745
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration +
13746
+ 'gic-initial-configuration/getConfigurationById', { params: new HttpParams().set('id', id.toString()) });
13747
+ }
13748
+ updateGicParametersConfiguration(gicParametersConfiguration) {
13749
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration +
13750
+ 'gic-initial-configuration/updateGicParametersConfiguration', gicParametersConfiguration);
13751
+ }
13752
+ deleteConfigurationById(id, promCodigo) {
13753
+ return this.httpClient.delete(this.environment.host.backend.gicConfiguration +
13754
+ 'gic-initial-configuration/deleteConfigurationById', { params: new HttpParams().set('id', id.toString()).set('promCodigo', promCodigo) });
13755
+ }
13756
+ getLPromCodigos() {
13757
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration +
13758
+ 'gic-initial-configuration/getLPromCodigos');
13759
+ }
13760
+ cloningConfigByPromCodigo(promCodigoOfCloning, promCodigoOfCloningDestination) {
13761
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration +
13762
+ `gic-initial-configuration/cloningConfigByPromCodigo?promCodigoOfCloning=${promCodigoOfCloning}&promCodigoOfCloningDestination=${promCodigoOfCloningDestination}`, this.headerJson);
13512
13763
  }
13513
13764
  }
13514
- GicClientService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13515
- GicClientService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, providedIn: 'root' });
13516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicClientService, decorators: [{
13765
+ InitialConfigurationGicParametersService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
13766
+ InitialConfigurationGicParametersService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, providedIn: 'root' });
13767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InitialConfigurationGicParametersService, decorators: [{
13517
13768
  type: Injectable,
13518
13769
  args: [{
13519
13770
  providedIn: 'root'
@@ -15311,9 +15562,9 @@ class CustomValidator {
15311
15562
  /* tslint:disable */
15312
15563
  const VERSION = {
15313
15564
  "dirty": true,
15314
- "raw": "v0.0.18-1932-g573770da-dirty",
15315
- "hash": "g573770da",
15316
- "distance": 1932,
15565
+ "raw": "v0.0.18-2146-gef3b51fd-dirty",
15566
+ "hash": "gef3b51fd",
15567
+ "distance": 2146,
15317
15568
  "tag": "v0.0.18",
15318
15569
  "semver": {
15319
15570
  "options": {
@@ -15329,10 +15580,10 @@ const VERSION = {
15329
15580
  "build": [],
15330
15581
  "version": "0.0.18"
15331
15582
  },
15332
- "suffix": "1932-g573770da-dirty",
15333
- "semverString": "0.0.18+1932.g573770da",
15334
- "version": "0.0.1663",
15335
- "buildTimestamp": "2022-12-02T17:57:24.341Z"
15583
+ "suffix": "2146-gef3b51fd-dirty",
15584
+ "semverString": "0.0.18+2146.gef3b51fd",
15585
+ "version": "0.0.1664",
15586
+ "buildTimestamp": "2022-12-13T16:39:35.618Z"
15336
15587
  };
15337
15588
  /* tslint:enable */
15338
15589
 
@@ -15460,6 +15711,230 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
15460
15711
  }] }, { type: i1.HttpClient }];
15461
15712
  } });
15462
15713
 
15714
+ class ReturnRefundService {
15715
+ constructor(environment, httpClient) {
15716
+ this.environment = environment;
15717
+ this.httpClient = httpClient;
15718
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
15719
+ }
15720
+ /** It save a return or refund */
15721
+ save(returnRefund) {
15722
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'gic-return-refund/save', returnRefund, this.headerJson);
15723
+ }
15724
+ validateIdentification(promCodigo, identification) {
15725
+ return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/validate-identification', {
15726
+ params: new HttpParams().set('promCodigo', promCodigo).set('identification', identification)
15727
+ });
15728
+ }
15729
+ getCreditCreilingAvailable(promCodigo, fund, identification) {
15730
+ return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/getCreditCeilingAvailable', {
15731
+ params: new HttpParams().set('promCodigo', promCodigo).set('identification', identification).set('fund', fund)
15732
+ });
15733
+ }
15734
+ delete(disbursementDatatableId) {
15735
+ return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'gic-return-refund/delete', {
15736
+ params: new HttpParams().set('disbursementDatatableId', disbursementDatatableId)
15737
+ });
15738
+ }
15739
+ getBankvisionCode(disbursementDatatableId) {
15740
+ return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'gic-return-refund/getRubCode', {
15741
+ params: new HttpParams().set('disbursementDatatableId', disbursementDatatableId)
15742
+ });
15743
+ }
15744
+ }
15745
+ ReturnRefundService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15746
+ ReturnRefundService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, providedIn: 'root' });
15747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReturnRefundService, decorators: [{
15748
+ type: Injectable,
15749
+ args: [{
15750
+ providedIn: 'root'
15751
+ }]
15752
+ }], ctorParameters: function () {
15753
+ return [{ type: undefined, decorators: [{
15754
+ type: Inject,
15755
+ args: ['environment']
15756
+ }] }, { type: i1.HttpClient }];
15757
+ } });
15758
+
15759
+ class InterestAdjustmentService {
15760
+ constructor(environment, httpClient) {
15761
+ this.environment = environment;
15762
+ this.httpClient = httpClient;
15763
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
15764
+ }
15765
+ /** It save a return or refund */
15766
+ save(interestAdjustment) {
15767
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'interest_adjustment/save', interestAdjustment, this.headerJson);
15768
+ }
15769
+ getByDataTablesParameters(dataTableParameters) {
15770
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice +
15771
+ 'interest_adjustment/getByDataTablesParameters', dataTableParameters, this.headerJson);
15772
+ }
15773
+ }
15774
+ InterestAdjustmentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15775
+ InterestAdjustmentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, providedIn: 'root' });
15776
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: InterestAdjustmentService, decorators: [{
15777
+ type: Injectable,
15778
+ args: [{
15779
+ providedIn: 'root'
15780
+ }]
15781
+ }], ctorParameters: function () {
15782
+ return [{ type: undefined, decorators: [{
15783
+ type: Inject,
15784
+ args: ['environment']
15785
+ }] }, { type: i1.HttpClient }];
15786
+ } });
15787
+
15788
+ class ImportExcelGICService {
15789
+ constructor(environment, httpClient) {
15790
+ this.environment = environment;
15791
+ this.httpClient = httpClient;
15792
+ this.urlBase = this.environment.host.backend.gicQueuePublisher + 'import-excel';
15793
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
15794
+ }
15795
+ sendInitials(clients) {
15796
+ return this.httpClient.post(this.urlBase + '/initials', clients);
15797
+ }
15798
+ sendDisbursments(disbursments) {
15799
+ let aux = { disbursementList: disbursments };
15800
+ return this.httpClient.post(this.urlBase + '/disbursments', aux, this.headerJson);
15801
+ }
15802
+ /**
15803
+ * Send collections
15804
+ * @param collections
15805
+ * @return observable<any>
15806
+ */
15807
+ sendCollections(collections) {
15808
+ let aux = { gicCollectionList: collections };
15809
+ return this.httpClient.post(this.urlBase + '/collections', aux, this.headerJson);
15810
+ }
15811
+ }
15812
+ ImportExcelGICService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15813
+ ImportExcelGICService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, providedIn: 'root' });
15814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ImportExcelGICService, decorators: [{
15815
+ type: Injectable,
15816
+ args: [{
15817
+ providedIn: 'root'
15818
+ }]
15819
+ }], ctorParameters: function () {
15820
+ return [{ type: undefined, decorators: [{
15821
+ type: Inject,
15822
+ args: ['environment']
15823
+ }] }, { type: i1.HttpClient }];
15824
+ } });
15825
+
15826
+ class GicCnfMaintenaceService {
15827
+ constructor(environment, httpClient) {
15828
+ this.environment = environment;
15829
+ this.httpClient = httpClient;
15830
+ }
15831
+ getByPromCodigo(promCodigo) {
15832
+ return this.httpClient.get(this.environment.host.backend.gicConfiguration + 'gic-cnf-maintenance/getByPromCodigo', {
15833
+ params: new HttpParams().set('promCodigo', promCodigo)
15834
+ });
15835
+ }
15836
+ save(gicCnfMaintenance) {
15837
+ return this.httpClient.post(this.environment.host.backend.gicConfiguration + 'gic-cnf-maintenance/save', gicCnfMaintenance);
15838
+ }
15839
+ }
15840
+ GicCnfMaintenaceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15841
+ GicCnfMaintenaceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, providedIn: 'root' });
15842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicCnfMaintenaceService, decorators: [{
15843
+ type: Injectable,
15844
+ args: [{
15845
+ providedIn: 'root'
15846
+ }]
15847
+ }], ctorParameters: function () {
15848
+ return [{ type: undefined, decorators: [{
15849
+ type: Inject,
15850
+ args: ['environment']
15851
+ }] }, { type: i1.HttpClient }];
15852
+ } });
15853
+
15854
+ class MaintenanceService {
15855
+ constructor(environment, httpClient) {
15856
+ this.environment = environment;
15857
+ this.httpClient = httpClient;
15858
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
15859
+ }
15860
+ getByDataTablesParameters(dataTableParameters) {
15861
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/getByDataTablesParameters', dataTableParameters, this.headerJson);
15862
+ }
15863
+ getByDataTablesParametersForCondonation(dataTableParameters) {
15864
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/getByDataTablesParametersForCondonation', dataTableParameters, this.headerJson);
15865
+ }
15866
+ update(maintenanceForm) {
15867
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/update', maintenanceForm, this.headerJson);
15868
+ }
15869
+ downloadFlatFile(maintenanceIds) {
15870
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/downloadFlatFile', { data: maintenanceIds }, this.headerJson);
15871
+ }
15872
+ delete(maintenanceId) {
15873
+ return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/delete', {
15874
+ params: new HttpParams().set('maintenanceId', maintenanceId)
15875
+ });
15876
+ }
15877
+ deleteCondonationMaintenance(maintenanceId) {
15878
+ return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/deleteCondonationMaintenace', {
15879
+ params: new HttpParams().set('maintenanceId', maintenanceId)
15880
+ });
15881
+ }
15882
+ deleteByIdIn(maintenanceIdList) {
15883
+ return this.httpClient.delete(this.environment.host.backend.gicBackoffice + 'maintenance/deleteByIdIn', {
15884
+ params: new HttpParams().set('maintenanceIdList', maintenanceIdList.toString())
15885
+ });
15886
+ }
15887
+ downloadCondonationFile() {
15888
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/downloadCondonationFile', this.headerJson);
15889
+ }
15890
+ updateCondonationMaintenace(maintenanceForm) {
15891
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'maintenance/updateCondonationMaintenance', maintenanceForm, this.headerJson);
15892
+ }
15893
+ generateCondonationMaintenance() {
15894
+ return this.httpClient.get(this.environment.host.backend.gicBackoffice + 'maintenance/generateCondonationMaintenace');
15895
+ }
15896
+ }
15897
+ MaintenanceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15898
+ MaintenanceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, providedIn: 'root' });
15899
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: MaintenanceService, decorators: [{
15900
+ type: Injectable,
15901
+ args: [{
15902
+ providedIn: 'root'
15903
+ }]
15904
+ }], ctorParameters: function () {
15905
+ return [{ type: undefined, decorators: [{
15906
+ type: Inject,
15907
+ args: ['environment']
15908
+ }] }, { type: i1.HttpClient }];
15909
+ } });
15910
+
15911
+ class GicPaymentPlanService {
15912
+ constructor(environment, httpClient) {
15913
+ this.environment = environment;
15914
+ this.httpClient = httpClient;
15915
+ this.headerJson = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) };
15916
+ }
15917
+ generatePaymentPlants(data) {
15918
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'payment-plan/generatePaymentPlants', data, this.headerJson);
15919
+ }
15920
+ generatePaymentPlantsByIdentifications(identifications) {
15921
+ return this.httpClient.post(this.environment.host.backend.gicBackoffice + 'payment-plan/generatePaymentPlantsByIdentifications', identifications, this.headerJson);
15922
+ }
15923
+ }
15924
+ GicPaymentPlanService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, deps: [{ token: 'environment' }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15925
+ GicPaymentPlanService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, providedIn: 'root' });
15926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: GicPaymentPlanService, decorators: [{
15927
+ type: Injectable,
15928
+ args: [{
15929
+ providedIn: 'root'
15930
+ }]
15931
+ }], ctorParameters: function () {
15932
+ return [{ type: undefined, decorators: [{
15933
+ type: Inject,
15934
+ args: ['environment']
15935
+ }] }, { type: i1.HttpClient }];
15936
+ } });
15937
+
15463
15938
  /*
15464
15939
  * Public API Surface of ng-pli-commons
15465
15940
  */
@@ -15468,5 +15943,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImpor
15468
15943
  * Generated bundle index. Do not edit.
15469
15944
  */
15470
15945
 
15471
- export { ApplicationFillPercentageService, ApplicationService, ApplicationTagService, AuthenticationService, BackofficeCommonsComponent, BudgetApplicationService, BudgetService, BudgetSimulationService, CommitteMoneyServiceService, CommitteePdfService, CommitteeSnapshotService, CommonInfoService, CommonListsComponent, CommonService, ConfigurationCommonsComponent, ConfigurationDocumentService, ConfigurationMinisiteService, ConfigurationService, ConfigurationTokenComponent, ConfigurationTokenSubjectService, CreditScoreService, CreditStudyService, CubeService, CurrencyColfuturoFormatterDirective, CurrencyColfuturoPipe, CurrencyDecimalColfuturoFormatterDirective, CurrencyDecimalColfuturoPipe, CurrencyPrintColfuturoPipe, CustomValidator, DashboardCommonsComponent, DataFormService, DataLetterSegmentationService, DocumentAnalysisAutoService, DocumentHistoryService, DocumentManagementService, DocumentService, DocumentValidationAttemptService, DocumentaryTypeService, DynamicFilterComponent, EmailService, EvaluationService, ExcelToJsonComponent, ExportExcelService, FileService, FormService, FormUtil, FormioUtil, FrontofficeCommonsComponent, GicClientService, GlobalShowTaskService, GuaranteeDocumentService, GuaranteeEnrollmentService, GuaranteeService, GuaranteeTokenComponent, HashService, ImportDataService, InitialRecordService, IntegrationADOService, InteractionApplicationUserService, KeysAssignationService, LegalizationService, LetterCampaingService, LetterTaskMappingService, LogService, MigrationPlisService, MigrationSurveyQueueService, NgPliCommonsModule, NgPliCommonsService, PageService, PartnerService, PartnerSystemService, PdfAnalyzerComponent, PdfAnalyzerService, PdfConfigComponent, PdfGeneratorComponent, PdfMergeVisualizerComponent, PdfVisualizerComponent, PermissionService, PliCnfAcuityFieldsService, PliCnfAppCardFilterService, PliCnfAppointmentTypeService, PliCnfBudgetProgramTypeService, PliCnfBudgetService, PliCnfCloningService, PliCnfCommitteePdfConfigTableConfigService, PliCnfCommitteePdfGenStatusService, PliCnfCommitteeService, PliCnfCommitteeVisualizationModeService, PliCnfConfigMinisiteService, PliCnfConfigurationCreditStudyService, PliCnfDocumentManagementService, PliCnfDynamicKeysAssignService, PliCnfEvaluationTaskMailingService, PliCnfEvaluationTaskService, PliCnfEvaluationTemplateService, PliCnfFormEditService, PliCnfFormMultiaplicacionService, PliCnfGuaranteeDocumentsTemplateService, PliCnfGuaranteeTokenService, PliCnfHeaderService, PliCnfIndicatorService, PliCnfInformationSystemService, PliCnfInteractionService, PliCnfLetterTemplateService, PliCnfLetterTemplateTypeService, PliCnfLookAndFeelService, PliCnfMenuFormService, PliCnfMigrationPlisFieldBudgetService, PliCnfMigrationPlisFieldService, PliCnfMigrationStatusPlisService, PliCnfPageSectionFormService, PliCnfPageSubProcessService, PliCnfPdfsService, PliCnfProfileFormService, PliCnfProfileUserService, PliCnfProjectSummaryService, PliCnfScenarioService, PliCnfSegmentationService, PliCnfSnapshotTokenServices, PliCnfStatusFlowInteractionService, PliCnfStatusFlowService, PliCnfSupportDocumentCategoryService, PliCnfSupportDocumentService, PliCnfSurveyDocumentService, PliCnfSurveyPdfService, PliCnfSurveyService, PliCnfTaskGroupService, PliCnfTextCategoryService, PliCnfTextOptionService, PliCnfTextService, PliCnfTypeTextService, PliCnfUniversityArticleService, PliCnfUserCalendarService, PliCnfUserWorkspaceService, PliCnfValproKeysService, PliCnfWorkspaceSegmentationService, PliMultipleValueFilterService, PliPromocionUsernameService, PliSegActionUserService, PliSegmentationService, PliTagAssignmentService, PliTagService, PliUserService, PppService, ProfileService, ProgressBarComponent, ProgressBarService, PromotionScoreService, SegmentationService, SegmentationTokensComponent, SegmentationTokensService, SegmentationUserService, SelectPppComponent, SendApplicationService, SesionFormService, SesionService, ShowHideColumnsTableComponent, SpinnerService, SponsorshipLetterService, StatusService, SummaryBudgetService, SurveyMetadataService, SurveyQueueService, SurveyService, TasaCambioService, ThousandsPipe, TokenComponent, TokenService, TokenTransformationService, TokensCalculatorComponent, UniversityService, UploadDocumentsService, UserService, VersionCommons, VisualizationCommitteeService };
15946
+ export { ApplicationFillPercentageService, ApplicationService, ApplicationTagService, AuthenticationService, BackofficeCommonsComponent, BudgetApplicationService, BudgetService, BudgetSimulationService, CommitteMoneyServiceService, CommitteePdfService, CommitteeSnapshotService, CommonInfoService, CommonListsComponent, CommonService, ConfigurationCommonsComponent, ConfigurationDocumentService, ConfigurationMinisiteService, ConfigurationService, ConfigurationTokenComponent, ConfigurationTokenSubjectService, CreditScoreService, CreditStudyService, CubeService, CurrencyColfuturoFormatterDirective, CurrencyColfuturoPipe, CurrencyDecimalColfuturoFormatterDirective, CurrencyDecimalColfuturoPipe, CurrencyPrintColfuturoPipe, CustomValidator, DashboardCommonsComponent, DataFormService, DataLetterSegmentationService, DocumentAnalysisAutoService, DocumentHistoryService, DocumentManagementService, DocumentService, DocumentValidationAttemptService, DocumentaryTypeService, DynamicFilterComponent, EmailService, EvaluationService, ExcelToJsonComponent, ExportExcelService, FileService, FormService, FormUtil, FormioUtil, FrontofficeCommonsComponent, GicClientDisbursementMetadataService, GicClientService, GicCnfBankvisionTransactionService, GicCnfClosingDateService, GicCnfMaintenaceService, GicCollectionService, GicDisbursementService, GicPaymentApplicationService, GicPaymentPlanService, GlobalShowTaskService, GuaranteeDocumentService, GuaranteeEnrollmentService, GuaranteeService, GuaranteeTokenComponent, HashService, ImportDataService, ImportExcelGICService, InitialConfigurationGicParametersService, InitialRecordService, IntegrationADOService, InteractionApplicationUserService, InterestAdjustmentService, KeysAssignationService, LegalizationService, LetterCampaingService, LetterTaskMappingService, LogService, MaintenanceService, MigrationPlisService, MigrationSurveyQueueService, NgPliCommonsModule, NgPliCommonsService, PageService, PartnerService, PartnerSystemService, PdfAnalyzerComponent, PdfAnalyzerService, PdfConfigComponent, PdfGeneratorComponent, PdfMergeVisualizerComponent, PdfVisualizerComponent, PermissionService, PliCnfAcuityFieldsService, PliCnfAppCardFilterService, PliCnfAppointmentTypeService, PliCnfBudgetProgramTypeService, PliCnfBudgetService, PliCnfCloningService, PliCnfCommitteePdfConfigTableConfigService, PliCnfCommitteePdfGenStatusService, PliCnfCommitteeService, PliCnfCommitteeVisualizationModeService, PliCnfConfigMinisiteService, PliCnfConfigurationCreditStudyService, PliCnfDocumentManagementService, PliCnfDynamicKeysAssignService, PliCnfEvaluationTaskMailingService, PliCnfEvaluationTaskService, PliCnfEvaluationTemplateService, PliCnfFormEditService, PliCnfFormMultiaplicacionService, PliCnfGuaranteeDocumentsTemplateService, PliCnfGuaranteeTokenService, PliCnfHeaderService, PliCnfIndicatorService, PliCnfInformationSystemService, PliCnfInteractionService, PliCnfLetterTemplateService, PliCnfLetterTemplateTypeService, PliCnfLookAndFeelService, PliCnfMenuFormService, PliCnfMigrationPlisFieldBudgetService, PliCnfMigrationPlisFieldService, PliCnfMigrationStatusPlisService, PliCnfPageSectionFormService, PliCnfPageSubProcessService, PliCnfPdfsService, PliCnfProfileFormService, PliCnfProfileUserService, PliCnfProjectSummaryService, PliCnfScenarioService, PliCnfSegmentationService, PliCnfSnapshotTokenServices, PliCnfStatusFlowInteractionService, PliCnfStatusFlowService, PliCnfSupportDocumentCategoryService, PliCnfSupportDocumentService, PliCnfSurveyDocumentService, PliCnfSurveyPdfService, PliCnfSurveyService, PliCnfTaskGroupService, PliCnfTextCategoryService, PliCnfTextOptionService, PliCnfTextService, PliCnfTypeTextService, PliCnfUniversityArticleService, PliCnfUserCalendarService, PliCnfUserWorkspaceService, PliCnfValproKeysService, PliCnfWorkspaceSegmentationService, PliMultipleValueFilterService, PliPromocionUsernameService, PliSegActionUserService, PliSegmentationService, PliTagAssignmentService, PliTagService, PliUserService, PppService, ProfileService, ProgressBarComponent, ProgressBarService, PromotionScoreService, ReturnRefundService, SegmentationService, SegmentationTokensComponent, SegmentationTokensService, SegmentationUserService, SelectPppComponent, SendApplicationService, SesionFormService, SesionService, ShowHideColumnsTableComponent, SpinnerService, SponsorshipLetterService, StatusService, SummaryBudgetService, SurveyMetadataService, SurveyQueueService, SurveyService, TasaCambioService, ThousandsPipe, TokenComponent, TokenService, TokenTransformationService, TokensCalculatorComponent, UniversityService, UploadDocumentsService, UserService, VersionCommons, VisualizationCommitteeService };
15472
15947
  //# sourceMappingURL=ng-pli-commons.mjs.map