iptdevs-design-system 2.1.1 → 2.1.4
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/esm2020/lib/components/atoms/button/button.component.mjs +1 -3
- package/esm2020/lib/components/atoms/datalist/datalist.component.mjs +2 -2
- package/esm2020/lib/core/core.module.mjs +6 -3
- package/esm2020/lib/core/models/test/test.model.mjs +2 -0
- package/esm2020/lib/core/services/parameters-service/parameters.service.mjs +5 -1
- package/esm2020/lib/core/services/test-service/test.service.mjs +130 -0
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/iptdevs-design-system.mjs +136 -6
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +136 -6
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/core/models/test/test.model.d.ts +204 -0
- package/lib/core/services/parameters-service/parameters.service.d.ts +1 -0
- package/lib/core/services/test-service/test.service.d.ts +34 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -91,7 +91,6 @@ ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
91
91
|
|
|
92
92
|
<button *ngIf="!isEnabled"
|
|
93
93
|
type="{{ buttonType }}"
|
|
94
|
-
(click)="onClick.emit($event)"
|
|
95
94
|
[ngClass]="classes"
|
|
96
95
|
>
|
|
97
96
|
{{ label }}
|
|
@@ -108,7 +107,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
108
107
|
|
|
109
108
|
<button *ngIf="!isEnabled"
|
|
110
109
|
type="{{ buttonType }}"
|
|
111
|
-
(click)="onClick.emit($event)"
|
|
112
110
|
[ngClass]="classes"
|
|
113
111
|
>
|
|
114
112
|
{{ label }}
|
|
@@ -219,7 +217,7 @@ DatalistComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
219
217
|
</option>
|
|
220
218
|
</datalist>
|
|
221
219
|
</div>
|
|
222
|
-
`, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:10px;border:none;outline:none;display:block;transition:.2s;font-weight:300;
|
|
220
|
+
`, isInline: true, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:10px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
|
|
223
221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DatalistComponent, decorators: [{
|
|
224
222
|
type: Component,
|
|
225
223
|
args: [{ selector: 'ipt-datalist', template: `
|
|
@@ -239,7 +237,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
239
237
|
</option>
|
|
240
238
|
</datalist>
|
|
241
239
|
</div>
|
|
242
|
-
`, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:10px;border:none;outline:none;display:block;transition:.2s;font-weight:300;
|
|
240
|
+
`, styles: ["*{font-family:Poppins,sans-serif}.input-container{position:relative;margin-top:30px}.input{box-shadow:#64646f33 0 7px 29px;border-radius:10px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff}.input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}.input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}.label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.labelUp{color:#1c77f7;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
|
|
243
241
|
}], ctorParameters: function () { return [{ type: i1$1.FormBuilder }]; }, propDecorators: { datalistId: [{
|
|
244
242
|
type: Input
|
|
245
243
|
}], datalistData: [{
|
|
@@ -1283,6 +1281,10 @@ class ParameterService {
|
|
|
1283
1281
|
let serviceUrl = this.SERVICE_URL + 'get/all/study/reasons';
|
|
1284
1282
|
return this.http.get(serviceUrl);
|
|
1285
1283
|
}
|
|
1284
|
+
getAcademicUnits() {
|
|
1285
|
+
let serviceUrl = this.SERVICE_URL + 'get/academic/units';
|
|
1286
|
+
return this.http.get(serviceUrl);
|
|
1287
|
+
}
|
|
1286
1288
|
}
|
|
1287
1289
|
ParameterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1288
1290
|
ParameterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ParameterService, providedIn: 'root' });
|
|
@@ -1322,6 +1324,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
1322
1324
|
}]
|
|
1323
1325
|
}], ctorParameters: function () { return []; } });
|
|
1324
1326
|
|
|
1327
|
+
class TestService {
|
|
1328
|
+
constructor(http) {
|
|
1329
|
+
this.http = http;
|
|
1330
|
+
this.SERVICE_URL = 'https://iptdev.com.co/lab/test/api/';
|
|
1331
|
+
}
|
|
1332
|
+
// ---------------------- EXÁMENES ---------------------- //
|
|
1333
|
+
createExam(exam) {
|
|
1334
|
+
let serviceUrl = this.SERVICE_URL + 'post/exam';
|
|
1335
|
+
this.generateRequestParams(exam);
|
|
1336
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1337
|
+
}
|
|
1338
|
+
getAllExams(params) {
|
|
1339
|
+
let serviceUrl = this.SERVICE_URL + 'post/all/exam';
|
|
1340
|
+
this.generateRequestParams(params);
|
|
1341
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1342
|
+
}
|
|
1343
|
+
updateExam(params) {
|
|
1344
|
+
let serviceUrl = this.SERVICE_URL + 'update/exam';
|
|
1345
|
+
this.generateRequestParams(params);
|
|
1346
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1347
|
+
}
|
|
1348
|
+
updateExamStatus(params) {
|
|
1349
|
+
let serviceUrl = this.SERVICE_URL + 'update/exam/status';
|
|
1350
|
+
this.generateRequestParams(params);
|
|
1351
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1352
|
+
}
|
|
1353
|
+
copyExam(params) {
|
|
1354
|
+
let serviceUrl = this.SERVICE_URL + 'copy/exam';
|
|
1355
|
+
this.generateRequestParams(params);
|
|
1356
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1357
|
+
}
|
|
1358
|
+
getExamByCode(code) {
|
|
1359
|
+
let serviceUrl = this.SERVICE_URL + 'get/exam/by/code/' + code;
|
|
1360
|
+
return this.http.get(serviceUrl);
|
|
1361
|
+
}
|
|
1362
|
+
getExamByAuthor(code) {
|
|
1363
|
+
let serviceUrl = this.SERVICE_URL + 'get/exams/by/author/' + code;
|
|
1364
|
+
return this.http.get(serviceUrl);
|
|
1365
|
+
}
|
|
1366
|
+
// ---------------------- SECCIONES ---------------------- //
|
|
1367
|
+
createSectionWithAll(params) {
|
|
1368
|
+
let serviceUrl = this.SERVICE_URL + 'post/section/with/all';
|
|
1369
|
+
this.generateRequestParams(params);
|
|
1370
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1371
|
+
}
|
|
1372
|
+
createSection(params) {
|
|
1373
|
+
let serviceUrl = this.SERVICE_URL + 'post/section';
|
|
1374
|
+
this.generateRequestParams(params);
|
|
1375
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1376
|
+
}
|
|
1377
|
+
getAllSections(params) {
|
|
1378
|
+
let serviceUrl = this.SERVICE_URL + 'post/all/sections';
|
|
1379
|
+
this.generateRequestParams(params);
|
|
1380
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1381
|
+
}
|
|
1382
|
+
updateSection(params) {
|
|
1383
|
+
let serviceUrl = this.SERVICE_URL + 'update/section';
|
|
1384
|
+
this.generateRequestParams(params);
|
|
1385
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1386
|
+
}
|
|
1387
|
+
updateSectionState(params) {
|
|
1388
|
+
let serviceUrl = this.SERVICE_URL + 'update/section/state';
|
|
1389
|
+
this.generateRequestParams(params);
|
|
1390
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1391
|
+
}
|
|
1392
|
+
getSectionsByExam(code) {
|
|
1393
|
+
let serviceUrl = this.SERVICE_URL + 'get/sections/by/exam/' + code;
|
|
1394
|
+
return this.http.get(serviceUrl);
|
|
1395
|
+
}
|
|
1396
|
+
// ---------------------- PREGUNTAS ---------------------- //
|
|
1397
|
+
createQuestion(params) {
|
|
1398
|
+
let serviceUrl = this.SERVICE_URL + 'post/question';
|
|
1399
|
+
this.generateRequestParams(params);
|
|
1400
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1401
|
+
}
|
|
1402
|
+
updateQuestion(params) {
|
|
1403
|
+
let serviceUrl = this.SERVICE_URL + 'update/question';
|
|
1404
|
+
this.generateRequestParams(params);
|
|
1405
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1406
|
+
}
|
|
1407
|
+
getQuestionsBySections(params) {
|
|
1408
|
+
let serviceUrl = this.SERVICE_URL + 'get/questions/by/sections';
|
|
1409
|
+
this.generateRequestParams(params);
|
|
1410
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1411
|
+
}
|
|
1412
|
+
getQuestionsBySection(code) {
|
|
1413
|
+
let serviceUrl = this.SERVICE_URL + 'get/questions/by/section/' + code;
|
|
1414
|
+
return this.http.get(serviceUrl, this.httpOptions);
|
|
1415
|
+
}
|
|
1416
|
+
// ---------------------- RESPUESTAS ---------------------- //
|
|
1417
|
+
createAnswer(params) {
|
|
1418
|
+
let serviceUrl = this.SERVICE_URL + 'post/answer';
|
|
1419
|
+
this.generateRequestParams(params);
|
|
1420
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
1421
|
+
}
|
|
1422
|
+
updateAnswer(params) {
|
|
1423
|
+
let serviceUrl = this.SERVICE_URL + 'update/answer';
|
|
1424
|
+
this.generateRequestParams(params);
|
|
1425
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1426
|
+
}
|
|
1427
|
+
getAnswersByQuestion(code) {
|
|
1428
|
+
let serviceUrl = this.SERVICE_URL + 'get/answers/by/question/' + code;
|
|
1429
|
+
return this.http.get(serviceUrl, this.httpOptions);
|
|
1430
|
+
}
|
|
1431
|
+
updateQuestionState(params) {
|
|
1432
|
+
let serviceUrl = this.SERVICE_URL + 'update/question/state';
|
|
1433
|
+
this.generateRequestParams(params);
|
|
1434
|
+
return this.http.put(serviceUrl, this.httpOptions);
|
|
1435
|
+
}
|
|
1436
|
+
// construye los headers y params
|
|
1437
|
+
generateRequestParams(param) {
|
|
1438
|
+
this.httpOptions = {
|
|
1439
|
+
header: new HttpHeaders(),
|
|
1440
|
+
params: param,
|
|
1441
|
+
};
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
TestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1445
|
+
TestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, providedIn: 'root' });
|
|
1446
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: TestService, decorators: [{
|
|
1447
|
+
type: Injectable,
|
|
1448
|
+
args: [{
|
|
1449
|
+
providedIn: 'root',
|
|
1450
|
+
}]
|
|
1451
|
+
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }]; } });
|
|
1452
|
+
|
|
1325
1453
|
class CoreModule {
|
|
1326
1454
|
}
|
|
1327
1455
|
CoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1333,7 +1461,8 @@ CoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13
|
|
|
1333
1461
|
UserService,
|
|
1334
1462
|
SwitchService,
|
|
1335
1463
|
RedirectGuard,
|
|
1336
|
-
BaseService
|
|
1464
|
+
BaseService,
|
|
1465
|
+
TestService
|
|
1337
1466
|
] });
|
|
1338
1467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CoreModule, decorators: [{
|
|
1339
1468
|
type: NgModule,
|
|
@@ -1345,7 +1474,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
1345
1474
|
UserService,
|
|
1346
1475
|
SwitchService,
|
|
1347
1476
|
RedirectGuard,
|
|
1348
|
-
BaseService
|
|
1477
|
+
BaseService,
|
|
1478
|
+
TestService
|
|
1349
1479
|
]
|
|
1350
1480
|
}]
|
|
1351
1481
|
}] });
|