form-aurora-stefanini 0.1.8 → 0.1.11
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.
- package/README.md +133 -133
- package/bundles/form-aurora-stefanini.umd.js +1073 -973
- package/bundles/form-aurora-stefanini.umd.js.map +1 -1
- package/bundles/form-aurora-stefanini.umd.min.js +2 -2
- package/bundles/form-aurora-stefanini.umd.min.js.map +1 -1
- package/esm2015/form-aurora-stefanini.js +4 -4
- package/esm2015/lib/Components/from-aurora/form-aurora.component.js +685 -707
- package/esm2015/lib/Models/company-parameters.js +7 -7
- package/esm2015/lib/Models/company.js +1 -1
- package/esm2015/lib/Models/fill.js +3 -3
- package/esm2015/lib/Models/state.js +1 -1
- package/esm2015/lib/Models/step.js +1 -1
- package/esm2015/lib/Models/stepMethod.js +3 -3
- package/esm2015/lib/form-aurora.module.js +22 -22
- package/esm2015/lib/services/TemplateService.js +85 -85
- package/esm2015/lib/services/data.service.js +85 -82
- package/esm2015/lib/utils/Offusqued.js +120 -0
- package/esm2015/lib/utils/regex.js +52 -52
- package/esm2015/public-api.js +10 -10
- package/esm5/form-aurora-stefanini.js +4 -4
- package/esm5/lib/Components/from-aurora/form-aurora.component.js +732 -751
- package/esm5/lib/Models/company-parameters.js +19 -19
- package/esm5/lib/Models/company.js +1 -1
- package/esm5/lib/Models/fill.js +7 -7
- package/esm5/lib/Models/state.js +1 -1
- package/esm5/lib/Models/step.js +1 -1
- package/esm5/lib/Models/stepMethod.js +7 -7
- package/esm5/lib/form-aurora.module.js +25 -25
- package/esm5/lib/services/TemplateService.js +97 -97
- package/esm5/lib/services/data.service.js +88 -85
- package/esm5/lib/utils/Offusqued.js +121 -0
- package/esm5/lib/utils/regex.js +52 -52
- package/esm5/public-api.js +10 -10
- package/fesm2015/form-aurora-stefanini.js +1008 -912
- package/fesm2015/form-aurora-stefanini.js.map +1 -1
- package/fesm5/form-aurora-stefanini.js +1077 -977
- package/fesm5/form-aurora-stefanini.js.map +1 -1
- package/form-aurora-stefanini.d.ts +4 -4
- package/form-aurora-stefanini.metadata.json +1 -1
- package/lib/Components/from-aurora/form-aurora.component.d.ts +108 -118
- package/lib/Models/company-parameters.d.ts +14 -14
- package/lib/Models/company.d.ts +22 -22
- package/lib/Models/fill.d.ts +6 -6
- package/lib/Models/state.d.ts +5 -5
- package/lib/Models/step.d.ts +14 -14
- package/lib/Models/stepMethod.d.ts +8 -8
- package/lib/form-aurora.module.d.ts +2 -2
- package/lib/services/TemplateService.d.ts +8 -8
- package/lib/services/data.service.d.ts +35 -35
- package/lib/utils/Offusqued.d.ts +7 -0
- package/lib/utils/regex.d.ts +51 -51
- package/package.json +1 -1
- package/public-api.d.ts +6 -6
@@ -7,932 +7,1028 @@ import * as moment_ from 'moment';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
8
8
|
import { RecaptchaModule, RecaptchaFormsModule } from 'ng-recaptcha';
|
9
9
|
|
10
|
-
const regexType = {
|
11
|
-
default: {
|
12
|
-
exp: '^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_\\s]*$',
|
13
|
-
message: 'Formato inválido, no use caracteres especiales'
|
14
|
-
},
|
15
|
-
word: {
|
16
|
-
exp: '^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_]*$',
|
17
|
-
message: 'Formato inválido, no use caracteres especiales ni espacios'
|
18
|
-
},
|
19
|
-
name: {
|
20
|
-
exp: '^[a-zA-ZñÑáéíóúüÁÉÍÓÚÜ\\s]*$',
|
21
|
-
message: 'Formato inválido, no use caracteres especiales ni números'
|
22
|
-
},
|
23
|
-
alphanumberWord: {
|
24
|
-
exp: '^[a-zA-Z0-9]*$',
|
25
|
-
message: 'Formato alfanúmerico inválido'
|
26
|
-
},
|
27
|
-
charWord: {
|
28
|
-
exp: '^[a-zA-Z]*$',
|
29
|
-
message: 'Formato de caracteres inválido'
|
30
|
-
},
|
31
|
-
anyWord: {
|
32
|
-
exp: '^\\S*$',
|
33
|
-
message: 'Formato inválido'
|
34
|
-
},
|
35
|
-
percent: {
|
36
|
-
exp: '^100$|^[0-9]{1,2}$|^[0-9]{1,2}\\.[0-9]{1,2}$',
|
37
|
-
message: 'Formato de porcentaje inválido, use el punto decimal (.)'
|
38
|
-
},
|
39
|
-
email: {
|
40
|
-
exp: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
41
|
-
message: 'Formato de e-mail inválido'
|
42
|
-
},
|
43
|
-
number: {
|
44
|
-
exp: '^[0-9]*$',
|
45
|
-
message: 'Formato de número inválido'
|
46
|
-
},
|
47
|
-
time24: {
|
48
|
-
exp: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$',
|
49
|
-
message: 'Formato de hora militar inválido, use 23:45'
|
50
|
-
},
|
51
|
-
date: {
|
52
|
-
exp: '^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$',
|
53
|
-
message: 'Formato de fecha inválido',
|
54
|
-
internal: 'dd/mm/yyyy'
|
55
|
-
},
|
56
|
-
password: {
|
57
|
-
exp: '^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$',
|
58
|
-
message: 'La contraseña debe incluir una longitud mínima de 8 caracteres, una letra mayúscula, una letra minúscula, un número, un carácter especial (@#$%^&+=/.) y no debe tener espacios.'
|
59
|
-
}
|
10
|
+
const regexType = {
|
11
|
+
default: {
|
12
|
+
exp: '^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_\\s]*$',
|
13
|
+
message: 'Formato inválido, no use caracteres especiales'
|
14
|
+
},
|
15
|
+
word: {
|
16
|
+
exp: '^[a-zA-Z0-9ñÑáéíóúüÁÉÍÓÚÜ,.\\-_]*$',
|
17
|
+
message: 'Formato inválido, no use caracteres especiales ni espacios'
|
18
|
+
},
|
19
|
+
name: {
|
20
|
+
exp: '^[a-zA-ZñÑáéíóúüÁÉÍÓÚÜ\\s]*$',
|
21
|
+
message: 'Formato inválido, no use caracteres especiales ni números'
|
22
|
+
},
|
23
|
+
alphanumberWord: {
|
24
|
+
exp: '^[a-zA-Z0-9]*$',
|
25
|
+
message: 'Formato alfanúmerico inválido'
|
26
|
+
},
|
27
|
+
charWord: {
|
28
|
+
exp: '^[a-zA-Z]*$',
|
29
|
+
message: 'Formato de caracteres inválido'
|
30
|
+
},
|
31
|
+
anyWord: {
|
32
|
+
exp: '^\\S*$',
|
33
|
+
message: 'Formato inválido'
|
34
|
+
},
|
35
|
+
percent: {
|
36
|
+
exp: '^100$|^[0-9]{1,2}$|^[0-9]{1,2}\\.[0-9]{1,2}$',
|
37
|
+
message: 'Formato de porcentaje inválido, use el punto decimal (.)'
|
38
|
+
},
|
39
|
+
email: {
|
40
|
+
exp: /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
41
|
+
message: 'Formato de e-mail inválido'
|
42
|
+
},
|
43
|
+
number: {
|
44
|
+
exp: '^[0-9]*$',
|
45
|
+
message: 'Formato de número inválido'
|
46
|
+
},
|
47
|
+
time24: {
|
48
|
+
exp: '^([01]?[0-9]|2[0-3]):[0-5][0-9]$',
|
49
|
+
message: 'Formato de hora militar inválido, use 23:45'
|
50
|
+
},
|
51
|
+
date: {
|
52
|
+
exp: '^[0-9]{1,2}/[0-9]{1,2}/[0-9]{4}$',
|
53
|
+
message: 'Formato de fecha inválido',
|
54
|
+
internal: 'dd/mm/yyyy'
|
55
|
+
},
|
56
|
+
password: {
|
57
|
+
exp: '^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$',
|
58
|
+
message: 'La contraseña debe incluir una longitud mínima de 8 caracteres, una letra mayúscula, una letra minúscula, un número, un carácter especial (@#$%^&+=/.) y no debe tener espacios.'
|
59
|
+
}
|
60
60
|
};
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
this.
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
this.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
this.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
62
|
+
let Offusqued = class Offusqued {
|
63
|
+
constructor() {
|
64
|
+
this.dataMap = new Map();
|
65
|
+
this.dataMap.set('A', '2,');
|
66
|
+
this.dataMap.set('J', '29,');
|
67
|
+
this.dataMap.set('S', '67,');
|
68
|
+
this.dataMap.set('B', '3,');
|
69
|
+
this.dataMap.set('K', '31,');
|
70
|
+
this.dataMap.set('T', '71,');
|
71
|
+
this.dataMap.set('C', '5,');
|
72
|
+
this.dataMap.set('L', '37,');
|
73
|
+
this.dataMap.set('U', '73,');
|
74
|
+
this.dataMap.set('D', '7,');
|
75
|
+
this.dataMap.set('M', '41,');
|
76
|
+
this.dataMap.set('V', '79,');
|
77
|
+
this.dataMap.set('E', '11,');
|
78
|
+
this.dataMap.set('N', '43,');
|
79
|
+
this.dataMap.set('W', '83,');
|
80
|
+
this.dataMap.set('F', '13,');
|
81
|
+
this.dataMap.set('O', '47,');
|
82
|
+
this.dataMap.set('X', '89,');
|
83
|
+
this.dataMap.set('G', '17,');
|
84
|
+
this.dataMap.set('P', '53,');
|
85
|
+
this.dataMap.set('Y', '97,');
|
86
|
+
this.dataMap.set('H', '19,');
|
87
|
+
this.dataMap.set('Q', '59,');
|
88
|
+
this.dataMap.set('Z', '101,');
|
89
|
+
this.dataMap.set('I', '23,');
|
90
|
+
this.dataMap.set('R', '61,');
|
91
|
+
this.dataMap.set('a', '103,');
|
92
|
+
this.dataMap.set('j', '151,');
|
93
|
+
this.dataMap.set('s', '157,');
|
94
|
+
this.dataMap.set('b', '107,');
|
95
|
+
this.dataMap.set('k', '163,');
|
96
|
+
this.dataMap.set('t', '167,');
|
97
|
+
this.dataMap.set('c', '109,');
|
98
|
+
this.dataMap.set('l', '173,');
|
99
|
+
this.dataMap.set('u', '179,');
|
100
|
+
this.dataMap.set('d', '113,');
|
101
|
+
this.dataMap.set('m', '181,');
|
102
|
+
this.dataMap.set('v', '191,');
|
103
|
+
this.dataMap.set('e', '127,');
|
104
|
+
this.dataMap.set('n', '193,');
|
105
|
+
this.dataMap.set('w', '227,');
|
106
|
+
this.dataMap.set('f', '132,');
|
107
|
+
this.dataMap.set('o', '197,');
|
108
|
+
this.dataMap.set('x', '229,');
|
109
|
+
this.dataMap.set('g', '137,');
|
110
|
+
this.dataMap.set('p', '199,');
|
111
|
+
this.dataMap.set('y', '233,');
|
112
|
+
this.dataMap.set('h', '139,');
|
113
|
+
this.dataMap.set('q', '211,');
|
114
|
+
this.dataMap.set('z', '239,');
|
115
|
+
this.dataMap.set('i', '149,');
|
116
|
+
this.dataMap.set('r', '223,');
|
117
|
+
this.dataMap.set('0', 'Z,');
|
118
|
+
this.dataMap.set('1', 'Y,');
|
119
|
+
this.dataMap.set('2', 'X,');
|
120
|
+
this.dataMap.set('3', 'W,');
|
121
|
+
this.dataMap.set('4', 'V,');
|
122
|
+
this.dataMap.set('5', 'U,');
|
123
|
+
this.dataMap.set('6', 'T,');
|
124
|
+
this.dataMap.set('7', 'S,');
|
125
|
+
this.dataMap.set('8', 'R,');
|
126
|
+
this.dataMap.set('9', 'Q,');
|
127
|
+
this.dataMap.set(',', '&');
|
128
|
+
this.dataMap.set('{', '1000,');
|
129
|
+
this.dataMap.set('}', '0000,');
|
130
|
+
}
|
131
|
+
ofusquedData(data) {
|
132
|
+
let responce = '';
|
133
|
+
const ofusquedData = data.toString().split('');
|
134
|
+
// tslint:disable-next-line:prefer-for-of
|
135
|
+
for (let i = 0; i < ofusquedData.length; i++) {
|
136
|
+
const letter = ofusquedData[i].toString();
|
137
|
+
if (this.dataMap.has(letter)) {
|
138
|
+
responce += this.dataMap.get(letter).toString();
|
139
|
+
}
|
140
|
+
else {
|
141
|
+
responce += letter + ',';
|
142
|
+
}
|
143
|
+
}
|
144
|
+
return responce;
|
145
|
+
}
|
146
|
+
decodeOfusquedData(data) {
|
147
|
+
let respoce = '';
|
148
|
+
const arrayData = data.split(',');
|
149
|
+
// tslint:disable-next-line:prefer-for-of
|
150
|
+
for (let i = 0; i < arrayData.length; i++) {
|
151
|
+
respoce += this.readValueInMap(arrayData[i]);
|
152
|
+
}
|
153
|
+
// @ts-ignore
|
154
|
+
return respoce.replaceAll('&', ',');
|
155
|
+
}
|
156
|
+
readValueInMap(data) {
|
157
|
+
let respoce = '';
|
158
|
+
let status = true;
|
159
|
+
this.dataMap.forEach((value, key) => {
|
160
|
+
if (data + ',' === value) {
|
161
|
+
respoce = key;
|
162
|
+
status = false;
|
163
|
+
}
|
164
|
+
});
|
165
|
+
if (status) {
|
166
|
+
respoce = data;
|
167
|
+
}
|
168
|
+
return respoce;
|
169
|
+
}
|
170
|
+
};
|
171
|
+
Offusqued.ngInjectableDef = ɵɵdefineInjectable({ factory: function Offusqued_Factory() { return new Offusqued(); }, token: Offusqued, providedIn: "root" });
|
172
|
+
Offusqued = __decorate([
|
173
|
+
Injectable({
|
174
|
+
providedIn: 'root',
|
175
|
+
})
|
176
|
+
], Offusqued);
|
177
|
+
|
178
|
+
var CommonDataService_1;
|
179
|
+
let CommonDataService = CommonDataService_1 = class CommonDataService {
|
180
|
+
constructor() { }
|
181
|
+
getData() {
|
182
|
+
if (localStorage.getItem("data") != null) {
|
183
|
+
const desOffuscade = new Offusqued();
|
184
|
+
var data = new Map(JSON.parse(desOffuscade.decodeOfusquedData(localStorage.getItem('data'))));
|
185
|
+
return data;
|
186
|
+
}
|
187
|
+
else {
|
188
|
+
/** Error get cookie */
|
189
|
+
}
|
190
|
+
}
|
191
|
+
setData(data) {
|
192
|
+
const dataOffuscade = new Offusqued();
|
193
|
+
localStorage.setItem('data', dataOffuscade.ofusquedData(JSON.stringify(Array.from(data.entries()))));
|
194
|
+
}
|
195
|
+
initData() {
|
196
|
+
this.setData(new Map());
|
197
|
+
}
|
198
|
+
putValue(key, value) {
|
199
|
+
var data = this.getData();
|
200
|
+
data = data.set(key, value);
|
201
|
+
this.setData(data);
|
202
|
+
}
|
203
|
+
addValue(keyPrimary, keySecond, value) {
|
204
|
+
var data = this.getValue(keyPrimary);
|
205
|
+
var dataReturn = this.getData();
|
206
|
+
data[keySecond] = value;
|
207
|
+
dataReturn = dataReturn.set(keyPrimary, data);
|
208
|
+
this.setData(dataReturn);
|
209
|
+
}
|
210
|
+
getValue(key) {
|
211
|
+
return !this.getData() || !this.getData().has(key) ? undefined : this.getData().get(key);
|
212
|
+
}
|
213
|
+
hasValue(key) {
|
214
|
+
return this.getData() != undefined ? this.getData().has(key) : null;
|
215
|
+
}
|
216
|
+
clearMap() {
|
217
|
+
if (this.hasValue(CommonDataService_1.COMPANY_KEY)) {
|
218
|
+
let company = this.getValue(CommonDataService_1.COMPANY_KEY);
|
219
|
+
this.initData();
|
220
|
+
this.putValue(CommonDataService_1.COMPANY_KEY, company);
|
221
|
+
}
|
222
|
+
else {
|
223
|
+
this.initData();
|
224
|
+
}
|
225
|
+
}
|
226
|
+
};
|
227
|
+
CommonDataService.COMPANY_KEY = "company";
|
228
|
+
CommonDataService.DOC_NUMBER_KEY = "docNumber";
|
229
|
+
CommonDataService.DOC_TYPE_KEY = "docType";
|
230
|
+
CommonDataService.PHONE_KEY = "phone";
|
231
|
+
CommonDataService.TYPE_ATTENTION_KEY = "typeAttention";
|
232
|
+
CommonDataService.OFFICE_KEY = "office";
|
233
|
+
CommonDataService.TYPE_TURN_KEY = "typeTurn";
|
234
|
+
CommonDataService.SERVICE_KEY = "service";
|
235
|
+
CommonDataService.TURN_KEY = "turn";
|
236
|
+
CommonDataService.PROGRAMED_TURN_KEY = "programedTurn";
|
237
|
+
CommonDataService.REQUEST_CALL = "requestCall";
|
238
|
+
CommonDataService.FORM_DATA = "formdata";
|
239
|
+
CommonDataService.TEMPLATE = "template";
|
240
|
+
CommonDataService.TURN_RESCHEDULE = "turnReschedule";
|
241
|
+
CommonDataService.USER_GENDER = "genderUser";
|
242
|
+
CommonDataService.AUTO_REDIRECT = "autoRedirect";
|
243
|
+
CommonDataService.SCHEDULE_GENERAL = "scheduleGeneral";
|
244
|
+
CommonDataService.AGENDAMIENTO_TTP = "potencialCustomer";
|
245
|
+
CommonDataService.SINGLE_PAGE_ONE = "singlePageOne";
|
246
|
+
CommonDataService.AVAILABLE_SCHEDULE_GRAL = "availableScheduleGral";
|
247
|
+
CommonDataService.PROFILE = "profile";
|
248
|
+
CommonDataService.PAGE_NEXT = "pageNext";
|
249
|
+
CommonDataService.STEPS = "steps";
|
250
|
+
CommonDataService.TYPE_TURN_ID = "typeTurnId";
|
251
|
+
CommonDataService.ngInjectableDef = ɵɵdefineInjectable({ factory: function CommonDataService_Factory() { return new CommonDataService(); }, token: CommonDataService, providedIn: "root" });
|
252
|
+
CommonDataService = CommonDataService_1 = __decorate([
|
253
|
+
Injectable({
|
254
|
+
providedIn: "root",
|
255
|
+
})
|
138
256
|
], CommonDataService);
|
139
257
|
|
140
|
-
const moment = moment_;
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
}
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
this.
|
257
|
-
this.
|
258
|
-
this.
|
259
|
-
this.
|
260
|
-
this.
|
261
|
-
this.
|
262
|
-
this.
|
263
|
-
this.
|
264
|
-
this.
|
265
|
-
this.
|
266
|
-
this.
|
267
|
-
this.
|
268
|
-
this.
|
269
|
-
this.
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
this.
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
this.
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
}
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
let
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
}
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
//
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
if (
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
//
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
}
|
544
|
-
//
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
}
|
553
|
-
return
|
554
|
-
}
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
}
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
catch
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
eml.
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
}
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
this.
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
], FormAuroraComponent.prototype, "company", void 0);
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
],
|
807
|
-
|
808
|
-
|
809
|
-
], FormAuroraComponent.prototype, "response", void 0);
|
810
|
-
__decorate([
|
811
|
-
Output()
|
812
|
-
], FormAuroraComponent.prototype, "summit", void 0);
|
813
|
-
__decorate([
|
814
|
-
Output()
|
815
|
-
], FormAuroraComponent.prototype, "viewAuthData", void 0);
|
816
|
-
__decorate([
|
817
|
-
ViewChild("modalTurns", { static: false })
|
818
|
-
], FormAuroraComponent.prototype, "myModal", void 0);
|
819
|
-
FormAuroraComponent = __decorate([
|
820
|
-
Component({
|
821
|
-
selector: 'lib-FormAurora',
|
822
|
-
template: "<div class=\"card\">\r\n <span class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"!isSimpleFlow\">\r\n <img style=\"width: 115px; height:96px;\" [class]=\"dataClassCss.logo\" id=\"logo\">\r\n </span>\r\n <div class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"isSimpleFlow\" style=\"margin-top: 4%!important;\">\r\n </div>\r\n <div class=\"card-body pt-0\">\r\n <ng-container *ngIf=\"schedule\">\r\n <h4 class=\"card-title text-center mb-0\" [class]=\"dataClassCss.bienvenida2\" style=\"color: #EE7E0E;\">\r\n Horarios de atenci\u00F3n\r\n </h4>\r\n <small class=\"text-center d-block\">{{schedule}}</small>\r\n </ng-container>\r\n <form #formDynamic=\"ngForm\">\r\n <div *ngFor=\"let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex\">\r\n <div\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp\">\r\n <div class=\"row\"\r\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))\">\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index - 1].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index -\r\n 1].question.label}}</span>\r\n </label>\r\n <div class=\"selectContainer\">\r\n <select [name]=\"dataForm.formQuestions[index - 1].question.value\"\r\n [required]=\"dataForm.formQuestions[index - 1].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index - 1].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index - 1].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index-1].question.value\"\r\n hidden></span>\r\n </div>\r\n </div>\r\n <div class=\"col-lg-6 col-xs-12\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\"\r\n class=\"col-sm-12 p-sm-0 px-sm-1\" style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keyup)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\"\r\n onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n\r\n </div>\r\n\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span *ngIf=\"patternNotValidDcto === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-template #switchTemp>\r\n <div [ngSwitch]=\"dataForm.formQuestions[index].question.questionType.id\">\r\n <div *ngSwitchCase=\"1\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"2\">\r\n\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n onkeypress=\"onkeypress($event)\"\r\n onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\r\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\r\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\" />\r\n <span *ngIf=\"patternNotValidCel === true\" class=\"error\">Formato no valido</span>\r\n </div>\r\n \r\n </div>\r\n <div *ngSwitchCase=\"3\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left;\">\r\n <span\r\n class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <select [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [class]=\"dataClassCss.formcontrol\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n style=\"margin-top: -1rem !important;\"\r\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index].question.registred\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\">\r\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"4\">\r\n <select class=\"{{ dataClassCss.formcontrol }} select-checkbox\"\r\n style=\"overflow: hidden; border-style: hidden;\"\r\n [style.height.px]=\"dataForm.formQuestions[index].question.questionAnswers.length * 24\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\" ngModel multiple>\r\n <option \r\n (mousemove)=\"$event.preventDefault()\"\r\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\"\r\n [value]=\"item.answer.value\">\r\n {{ item.answer.field }}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngSwitchCase=\"5\">\r\n <a (click)=\"rediretoutside($event,dataForm.formQuestions[index].question)\" href=\"\">\r\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\r\n </a>\r\n </div>\r\n <div *ngSwitchCase=\"6\">\r\n <div [class]=\"dataClassCss.cl12\" [id]=\"'reCaptcha'\">\r\n <div class=\"cnt-captcha\">\r\n <re-captcha (resolved)=\"resolvedCaptcha($event)\"\r\n siteKey=\"6LfQisEZAAAAAARuuKFEAgS-x4qJse5uBA_QCA7v\"></re-captcha>\r\n <input hidden type=\"text\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n </div>\r\n <span class=\"error\" *ngIf=\"watchValid && !captchaValid\" style=\"margin-top: 0;\">\r\n Debe resolver la captcha para continuar\r\n </span>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"7\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; margin-bottom: 0 ;\">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input placeholder=\"dd/mm/aaaa\" style=\"margin-top: -0.4rem !important;\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [name]=\"dataForm.formQuestions[index].question.value\" type=\"date\" min=\"{{minDate}}\"\r\n max=\"{{maxDate}}\" [maxlength]=\"10\" (paste)=\"false\"\r\n id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.txtCalendar\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n (keydown)=\"cancellKeypress()\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\">\r\n\r\n <button class=\"btn\" id=\"{{dataForm.formQuestions[index].question.value}}\" type=\"button\"\r\n style=\"width: 46px;\r\n top: 12px;\r\n color: white;\r\n right: 15px;\r\n position: absolute;\r\n background: #D25D42;\r\n pointer-events: none;\">\r\n <i class=\"fa fa-calendar\"></i>\r\n </button>\r\n\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"8\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input style=\"width: 4% !important; height: auto !important; display: inline !important;\" type=\"checkbox\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n [class]=\"dataClassCss.formcontrol\">\r\n <!-- (change)=\"checkTermsAndConditions(dataForm.formQuestions[index].question.registred)\" -->\r\n \r\n <!-- <a href=\"{{urlPdf}}\" target=\"_blank\" style=\"text-decoration: underline;\"\r\n id=\"txtPoliticas\" (click)=\"tycSelection()\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a> -->\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"txtPoliticas\" (click)=\"tycSelection($event)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"9\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validOnlyText($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"10\">\r\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\r\n <input style=\"width: 4% !important; height: auto !important; display: inline !important;\"\r\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\r\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\r\n id=\"check{{dataForm.formQuestions[index].question.id}}\"\r\n (click)=\"openLabelUrl($event,dataForm.formQuestions[index].question)\">\r\n {{dataForm.formQuestions[index].question.label}}\r\n </a>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"11\">\r\n <div [class]=\"dataClassCss.cl12\">\r\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\r\n style=\"display: block; text-align: left; \">\r\n <span\r\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\r\n </label>\r\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\r\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\r\n [required]=\"dataForm.formQuestions[index].question.required\"\r\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\r\n [name]=\"dataForm.formQuestions[index].question.value\"\r\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\r\n (keypress)=\"validateNotSpace($event)\"\r\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\r\n style=\"margin-top: -1rem !important;\" />\r\n </div>\r\n </div>\r\n <div *ngSwitchDefault>Tipo de control no detectado</div>\r\n <div style=\"margin-left: 15px;\"\r\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\r\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\r\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\r\n Este campo es obligatorio</span>\r\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser m\u00EDnimo de\r\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\r\n Debe ser maximo de\r\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\r\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\r\n hidden></span>\r\n <span class=\"error\" [id]=\"dataForm.formQuestions[index].question.id\" hidden></span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <section *ngIf=\"isSimpleFlow\">\r\n <div *ngFor=\"let step of steps let index = index; trackBy: trackByIndex\">\r\n <div [class]=\"dataClassCss.cl12\" *ngIf=\"step.viewData\">\r\n <label for=\"{{step.id}}\" class=\"col-sm-12\" style=\"display: block; text-align: left;\">\r\n <span class=\"h6 small bg-white text-muted\">{{step.step}}</span>\r\n </label>\r\n <select [name]=\"step.step\" [required]=\"true\" [class]=\"dataClassCss.formcontrol\" id=\"{{step.step}}\"\r\n style=\"margin-top: -1rem !important;\" [(ngModel)]=\"step.value\"\r\n (ngModelChange)=\"onChangeStep(step,steps[index+1],$event)\">\r\n <option value=\"\" selected disabled hidden>Selecciona</option>\r\n <ng-container *ngFor=\"let subitem of step.viewData\">\r\n <option [value]=\"subitem.id\">\r\n {{ subitem.description }}\r\n </option>\r\n </ng-container>\r\n </select>\r\n </div>\r\n </div>\r\n </section>\r\n <div class=\"mt-3 text-center\">\r\n <button type=\"button\" [class]=\"dataClassCss.btn\" (click)=\"onSubmit()\" [disabled]=\"!formDynamic.valid\"\r\n id=\"btnIng\">Ingresar</button>\r\n </div>\r\n </form>\r\n </div>\r\n</div>\r\n",
|
823
|
-
providers: [
|
824
|
-
{ provide: NgbDateAdapter, useClass: CustomAdapter },
|
825
|
-
{ provide: NgbDateParserFormatter, useClass: CustomDateParserFormatter },
|
826
|
-
{ provide: NgbDatepickerI18n, useClass: CustomDatepickerI18n },
|
827
|
-
I18n
|
828
|
-
],
|
829
|
-
styles: ["form{font-size:12px;overflow-y:scroll;overflow-x:hidden}form input,form select{border:1px solid #e4e4e4;height:40px;margin-bottom:5px}.selectContainer select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectContainer::after{content:\"\\025be\";display:table-cell;text-align:center;padding-top:7px;width:30px;height:30px;position:absolute;top:14px;right:20px;pointer-events:none}form .error{color:red;font-size:12px;text-align:left;margin:-15px 0 15px;padding:0;width:90%}.error:after{content:\" \";display:block}.card{width:90%;margin:2% auto;border-radius:12px}@media (max-width:412px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:575.98px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:880.98px){.cnt-captcha{transform:scale(.82)}}input[type=date]::-webkit-calendar-picker-indicator{background:0 0;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f5f5f5}::-webkit-scrollbar-thumb{background:#e0e0e0}::-webkit-scrollbar-thumb:hover{background:#bdbdbd}"]
|
830
|
-
})
|
258
|
+
const moment = moment_;
|
259
|
+
/**
|
260
|
+
* This Service handles how the date is represented in scripts i.e. ngModel.
|
261
|
+
*/
|
262
|
+
let CustomAdapter = class CustomAdapter extends NgbDateAdapter {
|
263
|
+
/**
|
264
|
+
* This Service handles how the date is represented in scripts i.e. ngModel.
|
265
|
+
*/
|
266
|
+
constructor() {
|
267
|
+
super(...arguments);
|
268
|
+
this.DELIMITER = '/';
|
269
|
+
}
|
270
|
+
fromModel(value) {
|
271
|
+
if (value) {
|
272
|
+
const date = value.split(this.DELIMITER);
|
273
|
+
return {
|
274
|
+
day: parseInt(date[0], 10),
|
275
|
+
month: parseInt(date[1], 10),
|
276
|
+
year: parseInt(date[2], 10)
|
277
|
+
};
|
278
|
+
}
|
279
|
+
return null;
|
280
|
+
}
|
281
|
+
toModel(date) {
|
282
|
+
return date ? (date.day < 10 ? 0 + date.day : date.day) + this.DELIMITER + (date.month < 10 ? 0 + date.month : date.month) + this.DELIMITER + date.year : '';
|
283
|
+
}
|
284
|
+
};
|
285
|
+
CustomAdapter = __decorate([
|
286
|
+
Injectable()
|
287
|
+
], CustomAdapter);
|
288
|
+
/**
|
289
|
+
* This Service handles how the date is rendered and parsed from keyboard i.e. in the bound input field.
|
290
|
+
*/
|
291
|
+
let CustomDateParserFormatter = class CustomDateParserFormatter extends NgbDateParserFormatter {
|
292
|
+
/**
|
293
|
+
* This Service handles how the date is rendered and parsed from keyboard i.e. in the bound input field.
|
294
|
+
*/
|
295
|
+
constructor() {
|
296
|
+
super(...arguments);
|
297
|
+
this.DELIMITER = '/';
|
298
|
+
}
|
299
|
+
parse(value) {
|
300
|
+
if (value) {
|
301
|
+
const date = value.split(this.DELIMITER);
|
302
|
+
return {
|
303
|
+
day: parseInt(date[0], 10),
|
304
|
+
month: parseInt(date[1], 10),
|
305
|
+
year: parseInt(date[2], 10)
|
306
|
+
};
|
307
|
+
}
|
308
|
+
return null;
|
309
|
+
}
|
310
|
+
format(date) {
|
311
|
+
return date ? (date.day < 10 ? '0' + date.day : date.day) + this.DELIMITER + (date.month < 10 ? '0' + date.month : date.month) + this.DELIMITER + date.year : '';
|
312
|
+
}
|
313
|
+
};
|
314
|
+
CustomDateParserFormatter = __decorate([
|
315
|
+
Injectable()
|
316
|
+
], CustomDateParserFormatter);
|
317
|
+
const I18N_VALUES = {
|
318
|
+
'es': {
|
319
|
+
weekdays: ['Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa', 'Do'],
|
320
|
+
months: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
321
|
+
weekLabel: 'sem'
|
322
|
+
}
|
323
|
+
// other languages you would support
|
324
|
+
};
|
325
|
+
let I18n = class I18n {
|
326
|
+
constructor() {
|
327
|
+
this.language = 'es';
|
328
|
+
}
|
329
|
+
};
|
330
|
+
I18n = __decorate([
|
331
|
+
Injectable()
|
332
|
+
], I18n);
|
333
|
+
// Define custom service providing the months and weekdays translations
|
334
|
+
let CustomDatepickerI18n = class CustomDatepickerI18n extends NgbDatepickerI18n {
|
335
|
+
constructor(_i18n) {
|
336
|
+
super();
|
337
|
+
this._i18n = _i18n;
|
338
|
+
}
|
339
|
+
getWeekdayLabel(weekday) {
|
340
|
+
return I18N_VALUES[this._i18n.language].weekdays[weekday - 1];
|
341
|
+
}
|
342
|
+
getWeekLabel() {
|
343
|
+
return I18N_VALUES[this._i18n.language].weekLabel;
|
344
|
+
}
|
345
|
+
getMonthShortName(month) {
|
346
|
+
return I18N_VALUES[this._i18n.language].months[month - 1];
|
347
|
+
}
|
348
|
+
getMonthFullName(month) {
|
349
|
+
return this.getMonthShortName(month);
|
350
|
+
}
|
351
|
+
getDayAriaLabel(date) {
|
352
|
+
return `${date.day}-${date.month}-${date.year}`;
|
353
|
+
}
|
354
|
+
getWeekdayShortName(weekday) {
|
355
|
+
return I18N_VALUES[this._i18n.language].weekdays[weekday - 1];
|
356
|
+
}
|
357
|
+
;
|
358
|
+
};
|
359
|
+
CustomDatepickerI18n.ctorParameters = () => [
|
360
|
+
{ type: I18n }
|
361
|
+
];
|
362
|
+
CustomDatepickerI18n = __decorate([
|
363
|
+
Injectable()
|
364
|
+
], CustomDatepickerI18n);
|
365
|
+
let FormAuroraComponent = class FormAuroraComponent {
|
366
|
+
constructor(data, http) {
|
367
|
+
this.data = data;
|
368
|
+
this.http = http;
|
369
|
+
this.response = new EventEmitter();
|
370
|
+
this.summit = new EventEmitter();
|
371
|
+
this.viewAuthData = new EventEmitter();
|
372
|
+
this.tipodocNumDoc = false;
|
373
|
+
this.countSubmit = 0;
|
374
|
+
this.watchValid = false;
|
375
|
+
this.watchRequired = false;
|
376
|
+
this.captchaValid = false;
|
377
|
+
this.today = moment(new Date());
|
378
|
+
this.maxYear = this.today.year();
|
379
|
+
this.minYear = this.today.year() - 82;
|
380
|
+
this.minDate = this.minYear.toString() + '-' + this.today.month().toString().padStart(2, '0') + '-' + this.today.date().toString().padStart(2, '0'); // {year: this.minYear, month: this.today.month(), day: this.today.date()};
|
381
|
+
this.maxDate = this.maxYear.toString() + '-' + (this.today.month() + 1).toString().padStart(2, '0') + '-' + this.today.date().toString().padStart(2, '0'); // {year: this.maxYear, month: this.today.month() + 1, day: this.today.date()};
|
382
|
+
this.recharge = false;
|
383
|
+
this.indicativo = "57";
|
384
|
+
this.defaultDocType = "Cédula de ciudadanía";
|
385
|
+
this.patternNotValidDcto = false;
|
386
|
+
this.patternNotValidCel = false;
|
387
|
+
this.range = new FormGroup({
|
388
|
+
start: new FormControl(),
|
389
|
+
end: new FormControl(),
|
390
|
+
});
|
391
|
+
}
|
392
|
+
ngOnInit() {
|
393
|
+
this.minDate = new Date(this.minDate).toISOString().split('T')[0];
|
394
|
+
setTimeout(() => {
|
395
|
+
this.startComponent();
|
396
|
+
}, 2000);
|
397
|
+
}
|
398
|
+
startComponent() {
|
399
|
+
//ordena los campos
|
400
|
+
if (this.dataForm != null && this.dataForm.formQuestions != undefined) {
|
401
|
+
//Same row fields
|
402
|
+
this.tipodocNumDoc = (this.dataForm.formQuestions.some(question => question.question.value === "tipoDoc") && this.dataForm.formQuestions.some(question => question.question.value === "numeroDoc")) ? true : false;
|
403
|
+
this.dataForm.formQuestions = this.dataForm.formQuestions.sort(function (a, b) {
|
404
|
+
return a.order - b.order;
|
405
|
+
});
|
406
|
+
let existcaptcha = this.dataForm.formQuestions.filter((item) => item.question.questionType.id == 6);
|
407
|
+
if (existcaptcha.length == 0) {
|
408
|
+
this.captchaValid = true;
|
409
|
+
}
|
410
|
+
for (const item of this.dataForm.formQuestions) {
|
411
|
+
if (item.question.maxlength == null || item.question.maxlength == undefined || item.question.maxlength == 0) {
|
412
|
+
item.question.maxlength = 524288; //defaultvalue
|
413
|
+
}
|
414
|
+
if (item.question.minLength == null || item.question.minLength == undefined) {
|
415
|
+
item.question.minLength = 0;
|
416
|
+
}
|
417
|
+
this.dataReloadForm.forEach(element => {
|
418
|
+
this.filldata = element;
|
419
|
+
if ((item.question.questionType.id === 2 || item.question.questionType.id === 1 ||
|
420
|
+
item.question.questionType.id === 3) && (this.filldata.data !== null &&
|
421
|
+
this.filldata.data !== undefined) && item.question.id === this.filldata.id) {
|
422
|
+
item.question.registred = this.filldata.data;
|
423
|
+
}
|
424
|
+
});
|
425
|
+
if (item.question.registred == null || item.question.minLength == undefined) {
|
426
|
+
item.question.registred = '';
|
427
|
+
}
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
resolvedCaptcha(captchaResponse) {
|
432
|
+
this.captchaValid = true;
|
433
|
+
if (!this.formDynamic.form.value.captcha) {
|
434
|
+
this.formDynamic.controls.captcha.setValue(captchaResponse);
|
435
|
+
this.formDynamic.form.value.captcha = captchaResponse;
|
436
|
+
document.getElementById("btnIng").style.opacity = !this.formDynamic.valid ? "0.65" : "1";
|
437
|
+
}
|
438
|
+
}
|
439
|
+
//Forms
|
440
|
+
//Metodo para evitar el render de los items del for
|
441
|
+
trackByIndex(index, obj) {
|
442
|
+
return index;
|
443
|
+
}
|
444
|
+
onChangeValidPatter(event, question) {
|
445
|
+
if (question.pattern != undefined) {
|
446
|
+
let valid = true;
|
447
|
+
let keyvalid = [8, 32, 37, 38, 39, 40, 46, 9];
|
448
|
+
//diferente de Backpsace
|
449
|
+
//se deja catch por error no controlable en otro tiempo de ejecucion
|
450
|
+
try {
|
451
|
+
if (!keyvalid.includes(event.keyCode)) {
|
452
|
+
const regex = new RegExp(question.pattern);
|
453
|
+
valid = regex.test(event.key);
|
454
|
+
}
|
455
|
+
}
|
456
|
+
catch (error) { }
|
457
|
+
return valid;
|
458
|
+
}
|
459
|
+
if (question.questionType !== undefined) {
|
460
|
+
if (question.questionType.description === 'Number') {
|
461
|
+
if (question.value === 'numeroDoc') {
|
462
|
+
this.validateNumeroDocumento(this.formDynamic.controls["numeroDoc"].value.toString());
|
463
|
+
}
|
464
|
+
else if (question.value === 'celular') {
|
465
|
+
this.validateCelular(this.formDynamic.controls["celular"].value.toString());
|
466
|
+
}
|
467
|
+
}
|
468
|
+
}
|
469
|
+
document.getElementById("char" + question.value).setAttribute("hidden", "true");
|
470
|
+
//if temporal mientras se migran todos los tipos de campos al foreach
|
471
|
+
if (question.questionType.id != 11 && question.questionType.id != 7) {
|
472
|
+
if (this.validMinLength(this.formDynamic, question)) {
|
473
|
+
document.getElementById(question.value).style.borderColor = "#FF0000";
|
474
|
+
document.getElementById("ml" + question.value).removeAttribute("hidden");
|
475
|
+
}
|
476
|
+
else {
|
477
|
+
document.getElementById(question.value).style.borderColor = "#E4E4E4";
|
478
|
+
document.getElementById("ml" + question.value).setAttribute("hidden", "true");
|
479
|
+
}
|
480
|
+
if (this.validMaxLength(this.formDynamic, question)) {
|
481
|
+
document.getElementById(question.value).style.borderColor = "#FF0000";
|
482
|
+
document.getElementById("mxl" + question.value).removeAttribute("hidden");
|
483
|
+
}
|
484
|
+
else {
|
485
|
+
document.getElementById(question.value).style.borderColor = "#E4E4E4";
|
486
|
+
document.getElementById("mxl" + question.value).setAttribute("hidden", "true");
|
487
|
+
}
|
488
|
+
}
|
489
|
+
this.dataForm.formQuestions.forEach(formQuestion => {
|
490
|
+
switch (formQuestion.question.questionType.id) {
|
491
|
+
//se valida campo de tipo calendario
|
492
|
+
case 7:
|
493
|
+
if (question.questionType.id == 7)
|
494
|
+
this.calendarRulesValidate(formQuestion);
|
495
|
+
break;
|
496
|
+
//se valida campo de tipo email
|
497
|
+
case 11:
|
498
|
+
if (question.questionType.id == 11)
|
499
|
+
this.emailRulesValidate(formQuestion);
|
500
|
+
break;
|
501
|
+
}
|
502
|
+
});
|
503
|
+
document.getElementById("btnIng").style.opacity = !this.formDynamic.valid ? "0.65" : "1";
|
504
|
+
}
|
505
|
+
validOnlyText(event) {
|
506
|
+
let regex = /^[a-zA-Z\u00C0-\u017F]+$/g;
|
507
|
+
if (event.charCode == 32) {
|
508
|
+
return true;
|
509
|
+
}
|
510
|
+
let valid = regex.test(event.key);
|
511
|
+
return valid;
|
512
|
+
}
|
513
|
+
validDate(event) {
|
514
|
+
/*let pattern = /(?:0[1-9]|[12][0-9]|3[01])\/(?:0[1-9]|1[0-2])\/(?:19|20)[0-9]{2}/;
|
515
|
+
const regex = new RegExp(pattern);
|
516
|
+
valid = regex.test(event.key);
|
517
|
+
*/
|
518
|
+
const matches = String(event.key).match(regexType.date.exp);
|
519
|
+
let valid = true;
|
520
|
+
if (matches === null)
|
521
|
+
valid = false;
|
522
|
+
// alert(valid);
|
523
|
+
return valid;
|
524
|
+
}
|
525
|
+
onChangeValidDate(event) {
|
526
|
+
//let pattern = /(?:0[1-9]|1[0-2])\/(?:0[1-9]|[12][0-9]|3[01])\/(?:19|20)[0-9]{2}/;
|
527
|
+
let dateN = /[0-9]|\//;
|
528
|
+
let valid = true;
|
529
|
+
const regex = new RegExp(dateN);
|
530
|
+
valid = regex.test(event.key);
|
531
|
+
return valid;
|
532
|
+
}
|
533
|
+
rediretoutside(event, question) {
|
534
|
+
//se deja catch por error no controlable en otro tiempo de ejecucion
|
535
|
+
try {
|
536
|
+
event.preventDefault();
|
537
|
+
window.open(question.value, "_blank");
|
538
|
+
}
|
539
|
+
catch (error) { }
|
540
|
+
}
|
541
|
+
/**
|
542
|
+
* Dispatch submit event for validations exists
|
543
|
+
* @param change
|
544
|
+
*/
|
545
|
+
ngOnChanges(change) {
|
546
|
+
this.countSubmit++;
|
547
|
+
}
|
548
|
+
//onSubmit(form: NgForm) {
|
549
|
+
onSubmit() {
|
550
|
+
let form = this.formDynamic;
|
551
|
+
this.watchValid = true;
|
552
|
+
this.watchRequired = true;
|
553
|
+
if (form.valid) {
|
554
|
+
if (!this.validRulesFields(form.controls["numeroDoc"].value.toString(), form.controls["celular"].value.toString(), form.controls["email"].value))
|
555
|
+
return false;
|
556
|
+
}
|
557
|
+
if (this.validMinlenghtAllQuestions(form.value) && this.validMaxLengthAllQuestions(form.value) && form.valid) {
|
558
|
+
if (this.dataForm.urlSend != "" && this.captchaValid) {
|
559
|
+
this.http.post(this.dataForm.urlSend, form.value).subscribe((resp) => this.response.emit(resp));
|
560
|
+
}
|
561
|
+
else if (form.valid && this.captchaValid) {
|
562
|
+
this.summit.emit(form.value);
|
563
|
+
}
|
564
|
+
}
|
565
|
+
}
|
566
|
+
findParamBoolean(params, idParam) {
|
567
|
+
let showDescriptionParam = params.find((x) => x.id == idParam);
|
568
|
+
return showDescriptionParam != null && showDescriptionParam.value == "true";
|
569
|
+
}
|
570
|
+
validRulesFields(numeroDoc, numeroCel, email) {
|
571
|
+
// Validaciones para celular en caso de indicativo en Colombia
|
572
|
+
let cel = document.getElementById("charcelular");
|
573
|
+
let doc = document.getElementById("charnumeroDoc");
|
574
|
+
let valOk = true;
|
575
|
+
if (this.indicativo == "+57" || this.indicativo == "57") {
|
576
|
+
let stringOrdenado = this.orderString(numeroDoc);
|
577
|
+
if (this.nameCompany.toUpperCase() !== 'CLARO') { //claro acepta nro consecutivos
|
578
|
+
if (numeroDoc == stringOrdenado) {
|
579
|
+
doc.style.borderColor = "#FF0000";
|
580
|
+
doc.removeAttribute("hidden");
|
581
|
+
doc.textContent = "El numero documento No debe contener caracteres consecutivos";
|
582
|
+
valOk = false;
|
583
|
+
//this.msgErrorCampo = "El numero documento No debe contener caracteres consecutivos";
|
584
|
+
//return false;
|
585
|
+
}
|
586
|
+
}
|
587
|
+
if (numeroCel.substring(0, 1) != "3") {
|
588
|
+
cel.style.borderColor = "#FF0000";
|
589
|
+
cel.removeAttribute("hidden");
|
590
|
+
cel.textContent = "El primer carácter del celular debe ser 3";
|
591
|
+
valOk = false;
|
592
|
+
//this.msgErrorCampo = "El primer carácter del celular debe ser 3";
|
593
|
+
//return false;
|
594
|
+
}
|
595
|
+
/*
|
596
|
+
if (parseInt(numeroCel.substring(0, 3)) > 350) {
|
597
|
+
cel.style.borderColor = "#FF0000";
|
598
|
+
cel.removeAttribute("hidden");
|
599
|
+
cel.textContent = "El prefijo del celular no debe ser mayor a 350";
|
600
|
+
valOk = false;
|
601
|
+
//this.msgErrorCampo = "El prefijo del celular no debe ser mayor a 350";
|
602
|
+
//return false;
|
603
|
+
}
|
604
|
+
*/
|
605
|
+
//En caso de que el número se repita, ejemplo 33333333
|
606
|
+
let listnumber = numeroDoc.substring(0, 1);
|
607
|
+
for (let index = 1; index < numeroDoc.length; index++) {
|
608
|
+
listnumber = listnumber + numeroDoc.substring(0, 1);
|
609
|
+
}
|
610
|
+
if (numeroDoc == listnumber) {
|
611
|
+
doc.style.borderColor = "#FF0000";
|
612
|
+
doc.removeAttribute("hidden");
|
613
|
+
doc.textContent = "Caracteres numéricos no se pueden repetirse de manera continua ";
|
614
|
+
valOk = false;
|
615
|
+
//this.msgErrorCampo = "Caracteres numéricos no se pueden repetirse de manera continua ";
|
616
|
+
//return false;
|
617
|
+
}
|
618
|
+
if (!this.validateNumeroDocumento(numeroDoc)) {
|
619
|
+
return false;
|
620
|
+
}
|
621
|
+
if (!this.validateCelular(numeroCel)) {
|
622
|
+
return false;
|
623
|
+
}
|
624
|
+
// En caso de que el número se repita, ejemplo 33333333
|
625
|
+
let arrayPhoneRepeat = Array.from(String(numeroCel), Number);
|
626
|
+
let arrayPhoneOutRepeat = [...new Set(arrayPhoneRepeat)];
|
627
|
+
if (arrayPhoneOutRepeat.length == 1) {
|
628
|
+
cel.style.borderColor = "#FF0000";
|
629
|
+
cel.removeAttribute("hidden");
|
630
|
+
cel.textContent = "El número que ingresa no es valido";
|
631
|
+
valOk = false;
|
632
|
+
//this.msgErrorCampo = "El número que ingresa no es valido";
|
633
|
+
//return false;
|
634
|
+
}
|
635
|
+
}
|
636
|
+
else if (this.indicativo == "+593" || this.indicativo == "593") {
|
637
|
+
if (numeroCel.substring(0, 1) != "9") {
|
638
|
+
cel.style.borderColor = "#FF0000";
|
639
|
+
cel.removeAttribute("hidden");
|
640
|
+
cel.textContent = "El primer carácter del celular debe ser 9";
|
641
|
+
valOk = false;
|
642
|
+
//this.msgErrorCampo = "El primer carácter del celular debe ser 9";
|
643
|
+
//return false;
|
644
|
+
}
|
645
|
+
}
|
646
|
+
//se validan los campos por tipo de campo y no por value
|
647
|
+
this.dataForm.formQuestions.forEach(formQuestion => {
|
648
|
+
switch (formQuestion.question.questionType.id) {
|
649
|
+
//se valida campo de tipo email
|
650
|
+
case 11:
|
651
|
+
valOk = this.emailRulesValidate(formQuestion);
|
652
|
+
break;
|
653
|
+
}
|
654
|
+
});
|
655
|
+
return valOk;
|
656
|
+
}
|
657
|
+
orderString(value) {
|
658
|
+
let arrayNumber = [];
|
659
|
+
for (let index = 0; index < value.length; index++) {
|
660
|
+
arrayNumber.push(parseInt(value.substring(index, index + 1)));
|
661
|
+
}
|
662
|
+
//ordena el array
|
663
|
+
arrayNumber.sort(function (a, b) {
|
664
|
+
return a - b;
|
665
|
+
});
|
666
|
+
let numberOrder = "";
|
667
|
+
numberOrder = arrayNumber[0];
|
668
|
+
for (let index = 1; index < arrayNumber.length; index++) {
|
669
|
+
numberOrder = numberOrder + (arrayNumber[0] + index).toString();
|
670
|
+
}
|
671
|
+
return numberOrder;
|
672
|
+
}
|
673
|
+
validMinlenghtAllQuestions(form) {
|
674
|
+
for (const item of this.dataForm.formQuestions) {
|
675
|
+
if (item.question.questionType.id == 1 || item.question.questionType.id == 2) {
|
676
|
+
let minLength = parseInt(item.question.minLength);
|
677
|
+
let formValueLength = parseInt(form[item.question.value].toString().length);
|
678
|
+
if (minLength > 0 && formValueLength != minLength && formValueLength < minLength)
|
679
|
+
return false;
|
680
|
+
}
|
681
|
+
}
|
682
|
+
return true;
|
683
|
+
}
|
684
|
+
validMaxLengthAllQuestions(form) {
|
685
|
+
for (const item of this.dataForm.formQuestions) {
|
686
|
+
if (item.question.questionType.id == 1 || item.question.questionType.id == 2) {
|
687
|
+
let maxLength = parseInt(item.question.maxLength);
|
688
|
+
let formValueLength = parseInt(form[item.question.value].toString().length);
|
689
|
+
if (maxLength > 0 && formValueLength != maxLength && formValueLength > maxLength)
|
690
|
+
return false;
|
691
|
+
}
|
692
|
+
}
|
693
|
+
return true;
|
694
|
+
}
|
695
|
+
validRequired(form, question) {
|
696
|
+
//se deja catch por error no controlable en otro tiempo de ejecucion
|
697
|
+
try {
|
698
|
+
if (question != undefined && question.value != undefined) {
|
699
|
+
if (form.controls[question.value] != undefined &&
|
700
|
+
form.controls[question.value].errors != null &&
|
701
|
+
form.controls[question.value].errors.required) {
|
702
|
+
return true;
|
703
|
+
}
|
704
|
+
}
|
705
|
+
}
|
706
|
+
catch (error) { }
|
707
|
+
return false;
|
708
|
+
}
|
709
|
+
validMinLength(form, question) {
|
710
|
+
//se deja catch por error no controlable en otro tiempo de ejecucion
|
711
|
+
try {
|
712
|
+
if (question != undefined && question.value != undefined) {
|
713
|
+
if (question.minLength > form.controls[question.value].value.toLocaleString().length && question.minLength > 0) {
|
714
|
+
return true;
|
715
|
+
}
|
716
|
+
}
|
717
|
+
}
|
718
|
+
catch (error) { }
|
719
|
+
return false;
|
720
|
+
}
|
721
|
+
validMaxLength(form, question) {
|
722
|
+
//se deja catch por error no controlable en otro tiempo de ejecucion
|
723
|
+
try {
|
724
|
+
if (question != undefined && question.value != undefined) {
|
725
|
+
if (question.maxLength > 0) {
|
726
|
+
if (question.maxLength + 1 <= form.controls[question.value].value.toString().replace(/\./g, '').length) {
|
727
|
+
if (!this.formDynamic.controls[question.value].hasError('errorMaxLength')) {
|
728
|
+
this.formDynamic.controls[question.value].setErrors({ 'errorMaxLength': true });
|
729
|
+
}
|
730
|
+
return true;
|
731
|
+
}
|
732
|
+
}
|
733
|
+
}
|
734
|
+
}
|
735
|
+
catch (error) { }
|
736
|
+
return false;
|
737
|
+
}
|
738
|
+
tycSelection(event) {
|
739
|
+
this.viewAuthData.emit(event);
|
740
|
+
}
|
741
|
+
openLabelUrl(event, question) {
|
742
|
+
event.preventDefault();
|
743
|
+
let tyc = document.getElementById("check" + question.id);
|
744
|
+
tyc.style.color = "#A3AD32";
|
745
|
+
window.open(question.urllabel, "_blank");
|
746
|
+
}
|
747
|
+
cancellKeypress() {
|
748
|
+
return false;
|
749
|
+
}
|
750
|
+
emailRulesValidate(formQuestion) {
|
751
|
+
let valOk = true;
|
752
|
+
try {
|
753
|
+
let hasError = false;
|
754
|
+
document.getElementById(formQuestion.question.id).setAttribute("hidden", "true");
|
755
|
+
let eml = document.getElementById(formQuestion.question.id);
|
756
|
+
let email = formQuestion.question.registred;
|
757
|
+
if (!hasError) {
|
758
|
+
if (formQuestion.question.required && (email == "" || email == undefined || email == null)) {
|
759
|
+
eml.style.borderColor = "#FF0000";
|
760
|
+
eml.textContent = "El correco eléctronico es requerido";
|
761
|
+
eml.removeAttribute("hidden");
|
762
|
+
valOk = false;
|
763
|
+
hasError = true;
|
764
|
+
}
|
765
|
+
}
|
766
|
+
if (!hasError) {
|
767
|
+
if (this.validMinLength(undefined, formQuestion.question)) {
|
768
|
+
eml.style.borderColor = "#FF0000";
|
769
|
+
eml.textContent = "Debe ser mínimo de " + formQuestion.question.minLength + " caracteres";
|
770
|
+
document.getElementById(formQuestion.question.id).removeAttribute("hidden");
|
771
|
+
valOk = false;
|
772
|
+
hasError = true;
|
773
|
+
}
|
774
|
+
}
|
775
|
+
if (!hasError) {
|
776
|
+
if (this.validMaxLength(undefined, formQuestion.question)) {
|
777
|
+
eml.style.borderColor = "#FF0000";
|
778
|
+
eml.textContent = "Debe ser maximo de " + formQuestion.question.maxLength + " caracteres";
|
779
|
+
document.getElementById(formQuestion.question.id).removeAttribute("hidden");
|
780
|
+
valOk = false;
|
781
|
+
hasError = true;
|
782
|
+
}
|
783
|
+
}
|
784
|
+
if (!hasError) {
|
785
|
+
const matches = String(email).match(regexType.email.exp);
|
786
|
+
if (matches == null) {
|
787
|
+
eml.style.borderColor = "#FF0000";
|
788
|
+
eml.textContent = "Tu email es invalido";
|
789
|
+
eml.removeAttribute("hidden");
|
790
|
+
valOk = false;
|
791
|
+
hasError = true;
|
792
|
+
}
|
793
|
+
}
|
794
|
+
}
|
795
|
+
catch (error) {
|
796
|
+
}
|
797
|
+
return valOk;
|
798
|
+
}
|
799
|
+
calendarRulesValidate(formQuestion) {
|
800
|
+
let hasError = false;
|
801
|
+
try {
|
802
|
+
document.getElementById(formQuestion.question.id).setAttribute("hidden", "true");
|
803
|
+
let ecalendar = document.getElementById(formQuestion.question.id);
|
804
|
+
//se valida que no sea null si es requerido
|
805
|
+
let date = formQuestion.question.registred;
|
806
|
+
if (formQuestion.question.required && (date == "" || date == undefined || date == null)) {
|
807
|
+
ecalendar.style.borderColor = "#FF0000";
|
808
|
+
ecalendar.textContent = "La fecha es requerida";
|
809
|
+
ecalendar.removeAttribute("hidden");
|
810
|
+
}
|
811
|
+
}
|
812
|
+
catch (error) {
|
813
|
+
}
|
814
|
+
}
|
815
|
+
validateNotSpace(event) {
|
816
|
+
if (event.charCode == 32) {
|
817
|
+
return false;
|
818
|
+
}
|
819
|
+
else {
|
820
|
+
return true;
|
821
|
+
}
|
822
|
+
}
|
823
|
+
validateNumeroDocumento(numeroDoc) {
|
824
|
+
if (!numeroDoc.match("^[0-9]*$")) {
|
825
|
+
this.formDynamic.controls["numeroDoc"].setValidators([Validators.pattern('^[0-9]*$')]);
|
826
|
+
this.formDynamic.controls["numeroDoc"].markAsDirty();
|
827
|
+
this.formDynamic.controls["numeroDoc"].updateValueAndValidity();
|
828
|
+
this.formDynamic.controls["numeroDoc"].markAsTouched();
|
829
|
+
this.patternNotValidDcto = true;
|
830
|
+
return false;
|
831
|
+
}
|
832
|
+
this.patternNotValidDcto = false;
|
833
|
+
return true;
|
834
|
+
}
|
835
|
+
validateCelular(numeroCel) {
|
836
|
+
if (!numeroCel.match("^[0-9]*$")) {
|
837
|
+
this.formDynamic.controls["celular"].setValidators([Validators.pattern('^[0-9]*$')]);
|
838
|
+
this.formDynamic.controls["celular"].markAsDirty();
|
839
|
+
this.formDynamic.controls["celular"].updateValueAndValidity();
|
840
|
+
this.formDynamic.controls["celular"].markAsTouched();
|
841
|
+
this.patternNotValidCel = true;
|
842
|
+
return false;
|
843
|
+
}
|
844
|
+
this.patternNotValidCel = false;
|
845
|
+
return true;
|
846
|
+
}
|
847
|
+
onkeypress(event) {
|
848
|
+
return (event.charCode == 0) ? null : event.charCode >= 48 && event.charCode <= 57;
|
849
|
+
}
|
850
|
+
onChangeStep(step, nextStep, value) {
|
851
|
+
if (nextStep && nextStep.stepOrder != 1) {
|
852
|
+
this.resetField(step);
|
853
|
+
nextStep.viewData = [];
|
854
|
+
nextStep.viewData = nextStep.stepData.filter(x => x.relationalIds.includes(Number(value)));
|
855
|
+
}
|
856
|
+
}
|
857
|
+
resetField(stepIn) {
|
858
|
+
this.steps.forEach(step => {
|
859
|
+
if (step.stepOrder > stepIn.stepOrder) {
|
860
|
+
step.viewData = undefined;
|
861
|
+
step.value = undefined;
|
862
|
+
}
|
863
|
+
});
|
864
|
+
}
|
865
|
+
};
|
866
|
+
FormAuroraComponent.ctorParameters = () => [
|
867
|
+
{ type: CommonDataService },
|
868
|
+
{ type: HttpClient }
|
869
|
+
];
|
870
|
+
__decorate([
|
871
|
+
Input()
|
872
|
+
], FormAuroraComponent.prototype, "dataClassCss", void 0);
|
873
|
+
__decorate([
|
874
|
+
Input()
|
875
|
+
], FormAuroraComponent.prototype, "dataForm", void 0);
|
876
|
+
__decorate([
|
877
|
+
Input()
|
878
|
+
], FormAuroraComponent.prototype, "clickSubmit", void 0);
|
879
|
+
__decorate([
|
880
|
+
Input()
|
881
|
+
], FormAuroraComponent.prototype, "dataReloadForm", void 0);
|
882
|
+
__decorate([
|
883
|
+
Input()
|
884
|
+
], FormAuroraComponent.prototype, "welcomeTitle", void 0);
|
885
|
+
__decorate([
|
886
|
+
Input()
|
887
|
+
], FormAuroraComponent.prototype, "welcomeDescription", void 0);
|
888
|
+
__decorate([
|
889
|
+
Input()
|
890
|
+
], FormAuroraComponent.prototype, "urlPdf", void 0);
|
891
|
+
__decorate([
|
892
|
+
Input()
|
893
|
+
], FormAuroraComponent.prototype, "nameCompany", void 0);
|
894
|
+
__decorate([
|
895
|
+
Input()
|
896
|
+
], FormAuroraComponent.prototype, "schedule", void 0);
|
897
|
+
__decorate([
|
898
|
+
Input()
|
899
|
+
], FormAuroraComponent.prototype, "isSimpleFlow", void 0);
|
900
|
+
__decorate([
|
901
|
+
Input()
|
902
|
+
], FormAuroraComponent.prototype, "steps", void 0);
|
903
|
+
__decorate([
|
904
|
+
ViewChild('formDynamic', { static: true })
|
905
|
+
], FormAuroraComponent.prototype, "formDynamic", void 0);
|
906
|
+
__decorate([
|
907
|
+
Output()
|
908
|
+
], FormAuroraComponent.prototype, "response", void 0);
|
909
|
+
__decorate([
|
910
|
+
Output()
|
911
|
+
], FormAuroraComponent.prototype, "summit", void 0);
|
912
|
+
__decorate([
|
913
|
+
Output()
|
914
|
+
], FormAuroraComponent.prototype, "viewAuthData", void 0);
|
915
|
+
FormAuroraComponent = __decorate([
|
916
|
+
Component({
|
917
|
+
selector: 'lib-FormAurora',
|
918
|
+
template: "<div class=\"card\">\n <span class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"!isSimpleFlow\">\n <img style=\"width: 115px; height:96px;\" [class]=\"dataClassCss.logo\" id=\"logo\">\n </span>\n <div class=\"text-center mt-2 d-none d-sm-block\" *ngIf=\"isSimpleFlow\" style=\"margin-top: 4%!important;\">\n </div>\n <div class=\"card-body pt-0\">\n <ng-container *ngIf=\"schedule\">\n <h4 class=\"card-title text-center mb-0\" [class]=\"dataClassCss.bienvenida2\" style=\"color: #EE7E0E;\">\n Horarios de atenci\u00F3n\n </h4>\n <small class=\"text-center d-block\">{{schedule}}</small>\n </ng-container>\n <form #formDynamic=\"ngForm\">\n <div *ngFor=\"let control of dataForm?.formQuestions; let index = index; trackBy: trackByIndex\">\n <div\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2)) || (index < dataForm.formQuestions.length && dataForm.formQuestions[index].question.questionType.id == 3 && dataForm.formQuestions[index + 1].question.questionType.id == 2); else switchTemp\">\n <div class=\"row\"\n *ngIf=\"(index > 0 && (dataForm.formQuestions[index - 1].question.questionType.id == 3 && dataForm.formQuestions[index].question.questionType.id == 2))\">\n <div class=\"col-lg-6 col-xs-12\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index - 1].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left;\">\n <span class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index -\n 1].question.label}}</span>\n </label>\n <div class=\"selectContainer\">\n <select [name]=\"dataForm.formQuestions[index - 1].question.value\"\n [required]=\"dataForm.formQuestions[index - 1].question.required\"\n [class]=\"dataClassCss.formcontrol\"\n id=\"{{dataForm.formQuestions[index - 1].question.value}}\"\n style=\"margin-top: -1rem !important;\"\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index - 1].question.registred\">\n <option value=\"\" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor=\"let item of dataForm.formQuestions[index - 1].question.questionAnswers\">\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div style=\"margin-left: 15px;\"\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index-1].question.value\"\n hidden></span>\n </div>\n </div>\n <div class=\"col-lg-6 col-xs-12\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\"\n class=\"col-sm-12 p-sm-0 px-sm-1\" style=\"display: block; text-align: left;\">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\n id=\"{{dataForm.formQuestions[index].question.value}}\"\n style=\"margin-top: -1rem !important;\"\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (keyup)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n onkeypress=\"onkeypress($event)\" onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n [class]=\"dataClassCss.formcontrol\" />\n\n </div>\n\n <div style=\"margin-left: 15px;\"\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\n Este campo es obligatorio</span>\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\n Debe ser m\u00EDnimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\n hidden></span>\n <span *ngIf=\"patternNotValidDcto === true\" class=\"error\">Formato no valido</span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-template #switchTemp>\n <div [ngSwitch]=\"dataForm.formQuestions[index].question.questionType.id\">\n <div *ngSwitchCase=\"1\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left; \">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\n [name]=\"dataForm.formQuestions[index].question.value\"\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n style=\"margin-top: -1rem !important;\" />\n </div>\n </div>\n <div *ngSwitchCase=\"2\">\n\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left;\">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type=\"text\" pattern=\"\\d*\" inputmode=\"numeric\"\n id=\"{{dataForm.formQuestions[index].question.value}}\"\n style=\"margin-top: -1rem !important;\"\n [name]=\"dataForm.formQuestions[index].question.value\" placeholder=\"Escribe\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n onkeypress=\"onkeypress($event)\" onkeyup=\"(this.value=(value.replace(/[.]*/g,'')))\"\n maxlength=\"dataForm.formQuestions[index].question.maxLength\"\n [minLength]=\"dataForm.formQuestions[index].question.minLength\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n [class]=\"dataClassCss.formcontrol\" />\n <span *ngIf=\"patternNotValidCel === true\" class=\"error\">Formato no valido</span>\n </div>\n\n </div>\n <div *ngSwitchCase=\"3\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left;\">\n <span\n class=\"h6 small bg-white text-muted\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <select [name]=\"dataForm.formQuestions[index].question.value\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [class]=\"dataClassCss.formcontrol\"\n id=\"{{dataForm.formQuestions[index].question.value}}\"\n style=\"margin-top: -1rem !important;\"\n [(ngModel)]=\"defaultDocType !== '' ? defaultDocType : dataForm.formQuestions[index].question.registred\">\n <option value=\"\" selected disabled hidden>Selecciona</option>\n <ng-container\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\">\n <option *ngIf=\"item.answer.state.id == 1\" [value]=\"item.answer.value\">\n {{ item.answer.field }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n <div *ngSwitchCase=\"4\">\n <select class=\"{{ dataClassCss.formcontrol }} select-checkbox\"\n style=\"overflow: hidden; border-style: hidden;\"\n [style.height.px]=\"dataForm.formQuestions[index].question.questionAnswers.length * 24\"\n [name]=\"dataForm.formQuestions[index].question.value\"\n [required]=\"dataForm.formQuestions[index].question.required\" ngModel multiple>\n <option (mousemove)=\"$event.preventDefault()\"\n *ngFor=\"let item of dataForm.formQuestions[index].question.questionAnswers\"\n [value]=\"item.answer.value\">\n {{ item.answer.field }}\n </option>\n </select>\n </div>\n <div *ngSwitchCase=\"5\">\n <a (click)=\"rediretoutside($event,dataForm.formQuestions[index].question)\" href=\"\">\n <span>{{ dataForm.formQuestions[index].question.label }}</span>\n </a>\n </div>\n <div *ngSwitchCase=\"6\">\n <div [class]=\"dataClassCss.cl12\" [id]=\"'reCaptcha'\">\n <div class=\"cnt-captcha\">\n <re-captcha (resolved)=\"resolvedCaptcha($event)\"\n siteKey=\"6Lf9DcQfAAAAAI6HCNB5OyKUpOPpfl5ocoBJcigZ\"></re-captcha>\n <input hidden type=\"text\" [name]=\"dataForm.formQuestions[index].question.value\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\n </div>\n <span class=\"error\" *ngIf=\"watchValid && !captchaValid\" style=\"margin-top: 0;\">\n Debe resolver la captcha para continuar\n </span>\n </div>\n </div>\n <div *ngSwitchCase=\"7\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left; margin-bottom: 0 ;\">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input placeholder=\"dd/mm/aaaa\" style=\"margin-top: -0.4rem !important;\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [name]=\"dataForm.formQuestions[index].question.value\" type=\"date\" min=\"{{minDate}}\"\n max=\"{{maxDate}}\" [maxlength]=\"10\" (paste)=\"false\"\n id=\"{{dataForm.formQuestions[index].question.value}}\"\n [class]=\"dataClassCss.txtCalendar\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n (keydown)=\"cancellKeypress()\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\">\n\n <button class=\"btn\" id=\"{{dataForm.formQuestions[index].question.value}}\" type=\"button\"\n style=\"width: 46px;\n top: 12px;\n color: white;\n right: 15px;\n position: absolute;\n background: #D25D42;\n pointer-events: none;\">\n <i class=\"fa fa-calendar\"></i>\n </button>\n\n </div>\n </div>\n <div *ngSwitchCase=\"8\">\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\n <input\n style=\"width: 4% !important; height: auto !important; display: inline !important;\"\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n [class]=\"dataClassCss.formcontrol\">\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\n id=\"txtPoliticas\" (click)=\"tycSelection($event)\">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase=\"9\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left; \">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\n [name]=\"dataForm.formQuestions[index].question.value\"\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (keypress)=\"validOnlyText($event)\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n style=\"margin-top: -1rem !important;\" />\n </div>\n </div>\n <div *ngSwitchCase=\"10\">\n <div [class]=\"dataClassCss.cl12\" style=\"text-align: left; margin-bottom: 10px;\">\n <input\n style=\"width: 4% !important; height: auto !important; display: inline !important;\"\n type=\"checkbox\" [name]=\"dataForm.formQuestions[index].question.value\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\">\n <a target=\"_blank\" style=\"text-decoration: underline;color:blue;cursor: pointer;\"\n id=\"check{{dataForm.formQuestions[index].question.id}}\"\n (click)=\"openLabelUrl($event,dataForm.formQuestions[index].question)\">\n {{dataForm.formQuestions[index].question.label}}\n </a>\n </div>\n </div>\n <div *ngSwitchCase=\"11\">\n <div [class]=\"dataClassCss.cl12\">\n <label for=\"{{dataForm.formQuestions[index].question.value}}\" class=\"col-sm-12\"\n style=\"display: block; text-align: left; \">\n <span\n class=\"h6 small bg-white text-muted pt-1 pl-2 pr-2\">{{dataForm.formQuestions[index].question.label}}</span>\n </label>\n <input type=\"text\" id=\"{{dataForm.formQuestions[index].question.value}}\"\n [class]=\"dataClassCss.formcontrol\" placeholder=\"Escribe\"\n [required]=\"dataForm.formQuestions[index].question.required\"\n [maxlength]=\"dataForm.formQuestions[index].question.maxLength\"\n [name]=\"dataForm.formQuestions[index].question.value\"\n (keydown)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (change)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (blur)=\"onChangeValidPatter($event, dataForm.formQuestions[index].question)\"\n (keypress)=\"validateNotSpace($event)\"\n [(ngModel)]=\"dataForm.formQuestions[index].question.registred\"\n style=\"margin-top: -1rem !important;\" />\n </div>\n </div>\n <div *ngSwitchDefault>Tipo de control no detectado</div>\n <div style=\"margin-left: 15px;\"\n *ngIf=\"dataForm.formQuestions[index].question.questionType.id != 5 && dataForm.formQuestions[index].question.questionType.id != 6\">\n <span class=\"error\" [id]=\"'rq'+dataForm.formQuestions[index].question.value\"\n *ngIf=\"validRequired(formDynamic,dataForm.formQuestions[index].question) && watchValid\">\n Este campo es obligatorio</span>\n <span class=\"error\" [id]=\"'ml'+dataForm.formQuestions[index].question.value\" hidden>\n Debe ser m\u00EDnimo de\n {{ dataForm.formQuestions[index].question.minLength }} caracteres</span>\n <span class=\"error\" [id]=\"'mxl'+dataForm.formQuestions[index].question.value\" hidden>\n Debe ser maximo de\n {{ dataForm.formQuestions[index].question.maxLength }} caracteres</span>\n <span class=\"error\" [id]=\"'char'+dataForm.formQuestions[index].question.value\"\n hidden></span>\n <span class=\"error\" [id]=\"dataForm.formQuestions[index].question.id\" hidden></span>\n </div>\n </div>\n </ng-template>\n </div>\n <section *ngIf=\"isSimpleFlow\">\n <div *ngFor=\"let step of steps let index = index;\">\n <div [class]=\"dataClassCss.cl12\" *ngIf=\"step.viewData\">\n <label for=\"{{step.id}}\" class=\"col-sm-12\" style=\"display: block; text-align: left;\">\n <span class=\"h6 small bg-white text-muted\">{{step.step}}</span>\n </label>\n <select [name]=\"step.step\" [required]=\"true\" [class]=\"dataClassCss.formcontrol\"\n id=\"{{step.step}}\" style=\"margin-top: -1rem !important;\" [(ngModel)]=\"step.value\"\n (ngModelChange)=\"onChangeStep(step,steps[index+1],$event)\">\n <option value=\"\" selected disabled hidden>Selecciona</option>\n <ng-container *ngFor=\"let subitem of step.viewData\">\n <option [value]=\"subitem.id\">\n {{ subitem.description }}\n </option>\n </ng-container>\n </select>\n </div>\n </div>\n </section>\n <div class=\"mt-3 text-center\">\n <button type=\"button\" [class]=\"dataClassCss.btn\" (click)=\"onSubmit()\" [disabled]=\"!formDynamic.valid\"\n id=\"btnIng\">Ingresar</button>\n </div>\n </form>\n </div>\n</div>",
|
919
|
+
providers: [
|
920
|
+
{ provide: NgbDateAdapter, useClass: CustomAdapter },
|
921
|
+
{ provide: NgbDateParserFormatter, useClass: CustomDateParserFormatter },
|
922
|
+
{ provide: NgbDatepickerI18n, useClass: CustomDatepickerI18n },
|
923
|
+
I18n
|
924
|
+
],
|
925
|
+
styles: ["form{font-size:12px;overflow-y:scroll;overflow-x:hidden}form input,form select{border:1px solid #e4e4e4;height:40px;margin-bottom:5px}.selectContainer select{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectContainer::after{content:\"\\025be\";display:table-cell;text-align:center;padding-top:7px;width:30px;height:30px;position:absolute;top:14px;right:20px;pointer-events:none}form .error{color:red;font-size:12px;text-align:left;margin:-15px 0 15px;padding:0;width:90%}.error:after{content:\" \";display:block}.card{width:90%;margin:2% auto;border-radius:12px}@media (max-width:412px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:575.98px){.card{width:100%}.cnt-captcha{transform:scale(.77)}}@media (max-width:880.98px){.cnt-captcha{transform:scale(.82)}}input[type=date]::-webkit-calendar-picker-indicator{background:0 0;bottom:0;color:transparent;cursor:pointer;height:auto;left:0;position:absolute;right:0;top:0;width:auto}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#f5f5f5}::-webkit-scrollbar-thumb{background:#e0e0e0}::-webkit-scrollbar-thumb:hover{background:#bdbdbd}"]
|
926
|
+
})
|
831
927
|
], FormAuroraComponent);
|
832
928
|
|
833
|
-
let CommonTemplateService = class CommonTemplateService {
|
834
|
-
constructor(http) {
|
835
|
-
this.http = http;
|
836
|
-
}
|
837
|
-
getTemplate(idCompany, url) {
|
838
|
-
return this.http.get(`${url}/template/findByCompany/` + idCompany);
|
839
|
-
}
|
840
|
-
reloadStylePage(currentDocument, templateCompany) {
|
841
|
-
let objects = currentDocument.getElementsByClassName("template");
|
842
|
-
// debugger
|
843
|
-
for (let index = 0; index < objects.length; index++) {
|
844
|
-
const item = objects[index];
|
845
|
-
let itemClassName = typeof (item.className) == "object" ? item.className['baseVal'] : item.className;
|
846
|
-
let indexStart = itemClassName.indexOf("template");
|
847
|
-
// let keyString = itemClassName.substring(indexStart, itemClassName.length).split(' ')[1]
|
848
|
-
const keysString = itemClassName.substring(indexStart, itemClassName.length).split(' ').filter(a => a.indexOf('tmp_') !== -1);
|
849
|
-
for (let keyString of keysString) {
|
850
|
-
if (templateCompany[keyString] != undefined) {
|
851
|
-
if (keyString.includes("tmp_type_text_")) {
|
852
|
-
if (keyString.includes('tmp_type_text_6')) {
|
853
|
-
item['style'].setProperty('--' + keyString, templateCompany[keyString].color);
|
854
|
-
}
|
855
|
-
else {
|
856
|
-
item["style"].color = templateCompany[keyString].color;
|
857
|
-
if (itemClassName.includes("ratting-faces-v2")) {
|
858
|
-
item["style"].backgroundColor = templateCompany[keyString].color;
|
859
|
-
item["style"].borderColor = templateCompany[keyString].color;
|
860
|
-
item["style"].color = "white";
|
861
|
-
}
|
862
|
-
}
|
863
|
-
}
|
864
|
-
if (keyString.includes("title1")) {
|
865
|
-
/*item["style"].color = templateCompany[keyString].color*/
|
866
|
-
item["style"].color = "#EE7E0E";
|
867
|
-
}
|
868
|
-
if (keyString.includes("tmp_type_svg_")) {
|
869
|
-
item["style"].fill = templateCompany[keyString].fill;
|
870
|
-
}
|
871
|
-
if (keyString.includes("tmp_type_img_")) {
|
872
|
-
if (item.nodeName == "IMG") {
|
873
|
-
item["src"] = templateCompany[keyString].src;
|
874
|
-
}
|
875
|
-
else {
|
876
|
-
item["style"].background = templateCompany[keyString].background;
|
877
|
-
item["style"].backgroundSize = templateCompany[keyString].backgroundSize;
|
878
|
-
}
|
879
|
-
}
|
880
|
-
if (keyString.includes("tmp_type_head_")) {
|
881
|
-
item["style"].setProperty('--' + keyString, templateCompany[keyString].color);
|
882
|
-
}
|
883
|
-
if (keyString.includes("tmp_type_footer_")) {
|
884
|
-
// debugger
|
885
|
-
item["style"].setProperty('--' + keyString, templateCompany[keyString].color);
|
886
|
-
}
|
887
|
-
if (itemClassName.includes("tmp_type_cnt_")) {
|
888
|
-
indexStart = itemClassName.indexOf("tmp_type_cnt_");
|
889
|
-
keyString = itemClassName.substring(indexStart, itemClassName.length).split(' ')[0];
|
890
|
-
if (!!templateCompany[keyString]) {
|
891
|
-
item["style"].backgroundColor = templateCompany[keyString].backgroundColor;
|
892
|
-
}
|
893
|
-
}
|
894
|
-
if (keyString.includes('tmp_type_font_')) {
|
895
|
-
item['style'].setProperty('font-family', templateCompany[keyString]['font-family'], 'important');
|
896
|
-
}
|
897
|
-
}
|
898
|
-
}
|
899
|
-
}
|
900
|
-
}
|
901
|
-
};
|
902
|
-
CommonTemplateService.ctorParameters = () => [
|
903
|
-
{ type: HttpClient }
|
904
|
-
];
|
905
|
-
CommonTemplateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function CommonTemplateService_Factory() { return new CommonTemplateService(ɵɵinject(HttpClient)); }, token: CommonTemplateService, providedIn: "root" });
|
906
|
-
CommonTemplateService = __decorate([
|
907
|
-
Injectable({
|
908
|
-
providedIn: "root",
|
909
|
-
})
|
929
|
+
let CommonTemplateService = class CommonTemplateService {
|
930
|
+
constructor(http) {
|
931
|
+
this.http = http;
|
932
|
+
}
|
933
|
+
getTemplate(idCompany, url) {
|
934
|
+
return this.http.get(`${url}/template/findByCompany/` + idCompany);
|
935
|
+
}
|
936
|
+
reloadStylePage(currentDocument, templateCompany) {
|
937
|
+
let objects = currentDocument.getElementsByClassName("template");
|
938
|
+
// debugger
|
939
|
+
for (let index = 0; index < objects.length; index++) {
|
940
|
+
const item = objects[index];
|
941
|
+
let itemClassName = typeof (item.className) == "object" ? item.className['baseVal'] : item.className;
|
942
|
+
let indexStart = itemClassName.indexOf("template");
|
943
|
+
// let keyString = itemClassName.substring(indexStart, itemClassName.length).split(' ')[1]
|
944
|
+
const keysString = itemClassName.substring(indexStart, itemClassName.length).split(' ').filter(a => a.indexOf('tmp_') !== -1);
|
945
|
+
for (let keyString of keysString) {
|
946
|
+
if (templateCompany[keyString] != undefined) {
|
947
|
+
if (keyString.includes("tmp_type_text_")) {
|
948
|
+
if (keyString.includes('tmp_type_text_6')) {
|
949
|
+
item['style'].setProperty('--' + keyString, templateCompany[keyString].color);
|
950
|
+
}
|
951
|
+
else {
|
952
|
+
item["style"].color = templateCompany[keyString].color;
|
953
|
+
if (itemClassName.includes("ratting-faces-v2")) {
|
954
|
+
item["style"].backgroundColor = templateCompany[keyString].color;
|
955
|
+
item["style"].borderColor = templateCompany[keyString].color;
|
956
|
+
item["style"].color = "white";
|
957
|
+
}
|
958
|
+
}
|
959
|
+
}
|
960
|
+
if (keyString.includes("title1")) {
|
961
|
+
/*item["style"].color = templateCompany[keyString].color*/
|
962
|
+
item["style"].color = "#EE7E0E";
|
963
|
+
}
|
964
|
+
if (keyString.includes("tmp_type_svg_")) {
|
965
|
+
item["style"].fill = templateCompany[keyString].fill;
|
966
|
+
}
|
967
|
+
if (keyString.includes("tmp_type_img_")) {
|
968
|
+
if (item.nodeName == "IMG") {
|
969
|
+
item["src"] = templateCompany[keyString].src;
|
970
|
+
}
|
971
|
+
else {
|
972
|
+
item["style"].background = templateCompany[keyString].background;
|
973
|
+
item["style"].backgroundSize = templateCompany[keyString].backgroundSize;
|
974
|
+
}
|
975
|
+
}
|
976
|
+
if (keyString.includes("tmp_type_head_")) {
|
977
|
+
item["style"].setProperty('--' + keyString, templateCompany[keyString].color);
|
978
|
+
}
|
979
|
+
if (keyString.includes("tmp_type_footer_")) {
|
980
|
+
// debugger
|
981
|
+
item["style"].setProperty('--' + keyString, templateCompany[keyString].color);
|
982
|
+
}
|
983
|
+
if (itemClassName.includes("tmp_type_cnt_")) {
|
984
|
+
indexStart = itemClassName.indexOf("tmp_type_cnt_");
|
985
|
+
keyString = itemClassName.substring(indexStart, itemClassName.length).split(' ')[0];
|
986
|
+
if (!!templateCompany[keyString]) {
|
987
|
+
item["style"].backgroundColor = templateCompany[keyString].backgroundColor;
|
988
|
+
}
|
989
|
+
}
|
990
|
+
if (keyString.includes('tmp_type_font_')) {
|
991
|
+
item['style'].setProperty('font-family', templateCompany[keyString]['font-family'], 'important');
|
992
|
+
}
|
993
|
+
}
|
994
|
+
}
|
995
|
+
}
|
996
|
+
}
|
997
|
+
};
|
998
|
+
CommonTemplateService.ctorParameters = () => [
|
999
|
+
{ type: HttpClient }
|
1000
|
+
];
|
1001
|
+
CommonTemplateService.ngInjectableDef = ɵɵdefineInjectable({ factory: function CommonTemplateService_Factory() { return new CommonTemplateService(ɵɵinject(HttpClient)); }, token: CommonTemplateService, providedIn: "root" });
|
1002
|
+
CommonTemplateService = __decorate([
|
1003
|
+
Injectable({
|
1004
|
+
providedIn: "root",
|
1005
|
+
})
|
910
1006
|
], CommonTemplateService);
|
911
1007
|
|
912
|
-
class Fill {
|
1008
|
+
class Fill {
|
913
1009
|
}
|
914
1010
|
|
915
|
-
let FormAuroraModule = class FormAuroraModule {
|
916
|
-
};
|
917
|
-
FormAuroraModule = __decorate([
|
918
|
-
NgModule({
|
919
|
-
declarations: [FormAuroraComponent],
|
920
|
-
imports: [
|
921
|
-
CommonModule,
|
922
|
-
FormsModule,
|
923
|
-
RecaptchaModule,
|
924
|
-
RecaptchaFormsModule
|
925
|
-
],
|
926
|
-
exports: [FormAuroraComponent]
|
927
|
-
})
|
1011
|
+
let FormAuroraModule = class FormAuroraModule {
|
1012
|
+
};
|
1013
|
+
FormAuroraModule = __decorate([
|
1014
|
+
NgModule({
|
1015
|
+
declarations: [FormAuroraComponent],
|
1016
|
+
imports: [
|
1017
|
+
CommonModule,
|
1018
|
+
FormsModule,
|
1019
|
+
RecaptchaModule,
|
1020
|
+
RecaptchaFormsModule
|
1021
|
+
],
|
1022
|
+
exports: [FormAuroraComponent]
|
1023
|
+
})
|
928
1024
|
], FormAuroraModule);
|
929
1025
|
|
930
|
-
/*
|
931
|
-
* Public API Surface of form-aurora
|
1026
|
+
/*
|
1027
|
+
* Public API Surface of form-aurora
|
932
1028
|
*/
|
933
1029
|
|
934
|
-
/**
|
935
|
-
* Generated bundle index. Do not edit.
|
1030
|
+
/**
|
1031
|
+
* Generated bundle index. Do not edit.
|
936
1032
|
*/
|
937
1033
|
|
938
1034
|
export { CommonDataService, CommonTemplateService, CustomAdapter, CustomDateParserFormatter, CustomDatepickerI18n, Fill, FormAuroraComponent, FormAuroraModule, I18n, regexType };
|