@openmrs/ngx-formentry 3.0.1-pre.62 → 3.0.1-pre.66
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/bundles/openmrs-ngx-formentry.umd.js +281 -46
- package/bundles/openmrs-ngx-formentry.umd.js.map +1 -1
- package/components/radio-button/radio.component.d.ts +7 -8
- package/esm2015/components/radio-button/radio.component.js +13 -39
- package/esm2015/form-entry/form-factory/question.factory.js +6 -3
- package/esm2015/form-entry/form-renderer/form-renderer.component.js +2 -2
- package/esm2015/form-entry/helpers/js-expression-helper.js +16 -1
- package/esm2015/form-entry/helpers/risk-dataset-table.js +247 -0
- package/esm2015/form-entry/question-models/interfaces/base-options.js +1 -1
- package/esm2015/form-entry/question-models/interfaces/radio-button-options.js +1 -1
- package/esm2015/form-entry/question-models/question-base.js +2 -2
- package/esm2015/form-entry/question-models/radio-button.model.js +2 -2
- package/fesm2015/openmrs-ngx-formentry.js +281 -43
- package/fesm2015/openmrs-ngx-formentry.js.map +1 -1
- package/form-entry/helpers/js-expression-helper.d.ts +2 -0
- package/form-entry/helpers/risk-dataset-table.d.ts +1 -0
- package/form-entry/question-models/interfaces/base-options.d.ts +1 -1
- package/form-entry/question-models/interfaces/radio-button-options.d.ts +1 -0
- package/form-entry/question-models/question-base.d.ts +1 -1
- package/form-entry/question-models/radio-button.model.d.ts +2 -4
- package/package.json +1 -1
|
@@ -1103,7 +1103,7 @@ class QuestionBase {
|
|
|
1103
1103
|
this.alert = options.alert;
|
|
1104
1104
|
this.historicalDataValue = options.historicalDataValue;
|
|
1105
1105
|
this.calculateExpression = options.calculateExpression;
|
|
1106
|
-
this.
|
|
1106
|
+
this.allowUnselect = options.allowUnselect;
|
|
1107
1107
|
}
|
|
1108
1108
|
setHistoricalValue(v) {
|
|
1109
1109
|
this.enableHistoricalValue = v;
|
|
@@ -1326,6 +1326,253 @@ class FutureDateRestrictionValidator {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
1329
|
+
// South East Asia Non Laboratory CVD Risk Array of Arrays
|
|
1330
|
+
// Vertically we have the BMI value eg for the first array [26(bmi < 20), 28(bmi 20 - 24), 30(bmi 25 - 29), 32(bmi 30 - 35), 34(bmi >= 35)]
|
|
1331
|
+
const southEastAsiaCvdRiskTables = [
|
|
1332
|
+
// Men
|
|
1333
|
+
[
|
|
1334
|
+
// Non smoker
|
|
1335
|
+
[
|
|
1336
|
+
// Age 70 - 74
|
|
1337
|
+
[
|
|
1338
|
+
[26, 28, 30, 32, 34],
|
|
1339
|
+
[21, 23, 25, 26, 28],
|
|
1340
|
+
[17, 19, 20, 21, 23],
|
|
1341
|
+
[14, 15, 16, 17, 18],
|
|
1342
|
+
[11, 12, 13, 14, 15], // sbp < 120
|
|
1343
|
+
],
|
|
1344
|
+
// Age 65 - 69
|
|
1345
|
+
[
|
|
1346
|
+
[20, 22, 24, 26, 28],
|
|
1347
|
+
[16, 17, 19, 21, 22],
|
|
1348
|
+
[12, 14, 15, 16, 18],
|
|
1349
|
+
[10, 11, 12, 13, 14],
|
|
1350
|
+
[8, 8, 9, 10, 11], // < 120
|
|
1351
|
+
],
|
|
1352
|
+
// Age 60 - 64
|
|
1353
|
+
[
|
|
1354
|
+
[15, 17, 19, 21, 23],
|
|
1355
|
+
[12, 13, 14, 16, 18],
|
|
1356
|
+
[9, 10, 11, 12, 14],
|
|
1357
|
+
[7, 8, 8, 9, 10],
|
|
1358
|
+
[5, 6, 6, 7, 8], // sbp < 120
|
|
1359
|
+
],
|
|
1360
|
+
// Age 55 - 59
|
|
1361
|
+
[
|
|
1362
|
+
[12, 13, 15, 16, 18],
|
|
1363
|
+
[9, 10, 11, 12, 14],
|
|
1364
|
+
[7, 7, 8, 9, 10],
|
|
1365
|
+
[5, 5, 6, 7, 8],
|
|
1366
|
+
[4, 4, 4, 5, 6], // sbp < 120
|
|
1367
|
+
],
|
|
1368
|
+
// Age 50 - 54
|
|
1369
|
+
[
|
|
1370
|
+
[9, 10, 11, 13, 15],
|
|
1371
|
+
[7, 7, 8, 9, 11],
|
|
1372
|
+
[5, 5, 6, 7, 8],
|
|
1373
|
+
[3, 4, 4, 5, 6],
|
|
1374
|
+
[2, 3, 3, 4, 4], // sbp < 120
|
|
1375
|
+
],
|
|
1376
|
+
// Age 45 - 49
|
|
1377
|
+
[
|
|
1378
|
+
[7, 8, 9, 10, 12],
|
|
1379
|
+
[5, 6, 6, 7, 8],
|
|
1380
|
+
[3, 4, 4, 5, 6],
|
|
1381
|
+
[2, 3, 3, 4, 4],
|
|
1382
|
+
[2, 2, 2, 2, 3], // < 120
|
|
1383
|
+
],
|
|
1384
|
+
// Age 40 - 44
|
|
1385
|
+
[
|
|
1386
|
+
[5, 6, 7, 8, 10],
|
|
1387
|
+
[4, 4, 5, 6, 7],
|
|
1388
|
+
[2, 3, 3, 4, 4],
|
|
1389
|
+
[2, 2, 2, 3, 3],
|
|
1390
|
+
[1, 1, 2, 2, 2],
|
|
1391
|
+
],
|
|
1392
|
+
],
|
|
1393
|
+
// Smoker
|
|
1394
|
+
[
|
|
1395
|
+
// Age 70 - 74
|
|
1396
|
+
[
|
|
1397
|
+
[34, 36, 39, 41, 44],
|
|
1398
|
+
[28, 30, 32, 34, 36],
|
|
1399
|
+
[23, 24, 26, 28, 30],
|
|
1400
|
+
[18, 20, 21, 23, 24],
|
|
1401
|
+
[15, 16, 17, 18, 20], // < 120
|
|
1402
|
+
],
|
|
1403
|
+
// Age 65 - 69
|
|
1404
|
+
[
|
|
1405
|
+
[28, 30, 33, 36, 39],
|
|
1406
|
+
[22, 24, 26, 29, 31],
|
|
1407
|
+
[18, 19, 21, 23, 25],
|
|
1408
|
+
[14, 15, 16, 18, 20],
|
|
1409
|
+
[11, 12, 13, 14, 16], // < 120
|
|
1410
|
+
],
|
|
1411
|
+
// Age 60 - 64
|
|
1412
|
+
[
|
|
1413
|
+
[23, 25, 28, 31, 34],
|
|
1414
|
+
[18, 18, 20, 22, 24],
|
|
1415
|
+
[14, 15, 17, 19, 21],
|
|
1416
|
+
[10, 12, 13, 14, 16],
|
|
1417
|
+
[8, 9, 10, 11, 12], // < 120
|
|
1418
|
+
],
|
|
1419
|
+
// Age 55 - 59
|
|
1420
|
+
[
|
|
1421
|
+
[19, 21, 24, 27, 30],
|
|
1422
|
+
[14, 16, 18, 20, 23],
|
|
1423
|
+
[11, 12, 13, 15, 17],
|
|
1424
|
+
[8, 9, 10, 11, 13],
|
|
1425
|
+
[6, 7, 7, 8, 10],
|
|
1426
|
+
],
|
|
1427
|
+
// Age 50 - 54
|
|
1428
|
+
[
|
|
1429
|
+
[15, 18, 20, 23, 27],
|
|
1430
|
+
[11, 13, 15, 17, 20],
|
|
1431
|
+
[8, 9, 11, 12, 14],
|
|
1432
|
+
[6, 7, 8, 9, 11],
|
|
1433
|
+
[4, 5, 6, 7, 8],
|
|
1434
|
+
],
|
|
1435
|
+
// Age 45 - 49
|
|
1436
|
+
[
|
|
1437
|
+
[13, 15, 17, 20, 23],
|
|
1438
|
+
[9, 10, 12, 14, 17],
|
|
1439
|
+
[6, 7, 9, 10, 12],
|
|
1440
|
+
[4, 5, 6, 7, 8],
|
|
1441
|
+
[3, 4, 4, 5, 6],
|
|
1442
|
+
],
|
|
1443
|
+
// Age 40 - 44
|
|
1444
|
+
[
|
|
1445
|
+
[10, 12, 14, 17, 20],
|
|
1446
|
+
[7, 8, 10, 12, 14],
|
|
1447
|
+
[5, 6, 7, 8, 10],
|
|
1448
|
+
[3, 4, 5, 6, 7],
|
|
1449
|
+
[2, 3, 3, 4, 5],
|
|
1450
|
+
],
|
|
1451
|
+
],
|
|
1452
|
+
],
|
|
1453
|
+
// Women
|
|
1454
|
+
[
|
|
1455
|
+
// Non smoker
|
|
1456
|
+
[
|
|
1457
|
+
// Age 70 -74
|
|
1458
|
+
[
|
|
1459
|
+
[21, 22, 22, 23, 24],
|
|
1460
|
+
[17, 18, 19, 19, 20],
|
|
1461
|
+
[15, 15, 16, 16, 17],
|
|
1462
|
+
[12, 12, 13, 13, 14],
|
|
1463
|
+
[10, 10, 11, 11, 11], // < 120
|
|
1464
|
+
],
|
|
1465
|
+
// Age 65 - 69
|
|
1466
|
+
[
|
|
1467
|
+
[16, 17, 18, 18, 19],
|
|
1468
|
+
[13, 14, 14, 15, 15],
|
|
1469
|
+
[11, 11, 11, 12, 12],
|
|
1470
|
+
[9, 9, 9, 10, 10],
|
|
1471
|
+
[7, 7, 7, 8, 8],
|
|
1472
|
+
],
|
|
1473
|
+
// Age 60 - 64
|
|
1474
|
+
[
|
|
1475
|
+
[13, 13, 14, 14, 15],
|
|
1476
|
+
[10, 10, 11, 11, 12],
|
|
1477
|
+
[8, 8, 8, 9, 9],
|
|
1478
|
+
[6, 6, 7, 7, 7],
|
|
1479
|
+
[5, 5, 5, 5, 6],
|
|
1480
|
+
],
|
|
1481
|
+
// Age 55 - 59
|
|
1482
|
+
[
|
|
1483
|
+
[10, 10, 11, 11, 12],
|
|
1484
|
+
[8, 8, 8, 9, 9],
|
|
1485
|
+
[6, 6, 6, 7, 7],
|
|
1486
|
+
[4, 5, 5, 5, 5],
|
|
1487
|
+
[3, 3, 4, 4, 4],
|
|
1488
|
+
],
|
|
1489
|
+
// Age 50 - 54
|
|
1490
|
+
[
|
|
1491
|
+
[8, 8, 8, 9, 9],
|
|
1492
|
+
[6, 6, 6, 7, 7],
|
|
1493
|
+
[4, 4, 5, 5, 5],
|
|
1494
|
+
[3, 3, 3, 4, 4],
|
|
1495
|
+
[2, 2, 3, 3, 3],
|
|
1496
|
+
],
|
|
1497
|
+
// Age 45 - 49
|
|
1498
|
+
[
|
|
1499
|
+
[6, 6, 7, 7, 7],
|
|
1500
|
+
[4, 5, 5, 5, 5],
|
|
1501
|
+
[3, 3, 3, 4, 4],
|
|
1502
|
+
[2, 2, 2, 3, 3],
|
|
1503
|
+
[2, 2, 2, 2, 2],
|
|
1504
|
+
],
|
|
1505
|
+
// Age 40 - 44
|
|
1506
|
+
[
|
|
1507
|
+
[5, 5, 5, 5, 6],
|
|
1508
|
+
[3, 3, 4, 4, 4],
|
|
1509
|
+
[2, 2, 3, 3, 3],
|
|
1510
|
+
[2, 2, 2, 2, 2],
|
|
1511
|
+
[1, 1, 1, 1, 1],
|
|
1512
|
+
],
|
|
1513
|
+
],
|
|
1514
|
+
// Smoker
|
|
1515
|
+
[
|
|
1516
|
+
// Age 70 - 74
|
|
1517
|
+
[
|
|
1518
|
+
[30, 31, 32, 33, 34],
|
|
1519
|
+
[25, 26, 27, 28, 29],
|
|
1520
|
+
[21, 22, 22, 23, 24],
|
|
1521
|
+
[17, 18, 19, 19, 20],
|
|
1522
|
+
[14, 15, 15, 16, 17],
|
|
1523
|
+
],
|
|
1524
|
+
// Age 65 - 69
|
|
1525
|
+
[
|
|
1526
|
+
[25, 26, 27, 29, 30],
|
|
1527
|
+
[21, 22, 22, 23, 24],
|
|
1528
|
+
[17, 18, 18, 19, 20],
|
|
1529
|
+
[14, 14, 15, 15, 16],
|
|
1530
|
+
[11, 11, 12, 12, 13],
|
|
1531
|
+
],
|
|
1532
|
+
// Age 60 - 64
|
|
1533
|
+
[
|
|
1534
|
+
[21, 22, 23, 25, 26],
|
|
1535
|
+
[17, 18, 19, 20, 21],
|
|
1536
|
+
[13, 14, 15, 16, 16],
|
|
1537
|
+
[11, 11, 12, 12, 13],
|
|
1538
|
+
[8, 9, 9, 10, 10],
|
|
1539
|
+
],
|
|
1540
|
+
// Age 55 - 59
|
|
1541
|
+
[
|
|
1542
|
+
[18, 19, 20, 21, 22],
|
|
1543
|
+
[14, 15, 15, 16, 17],
|
|
1544
|
+
[11, 11, 12, 13, 13],
|
|
1545
|
+
[8, 9, 9, 10, 10],
|
|
1546
|
+
[6, 7, 7, 7, 8],
|
|
1547
|
+
],
|
|
1548
|
+
// Age 50 - 54
|
|
1549
|
+
[
|
|
1550
|
+
[15, 16, 17, 18, 19],
|
|
1551
|
+
[11, 12, 13, 14, 14],
|
|
1552
|
+
[9, 9, 10, 10, 11],
|
|
1553
|
+
[6, 7, 7, 8, 8],
|
|
1554
|
+
[5, 5, 5, 6, 6],
|
|
1555
|
+
],
|
|
1556
|
+
// Age 45 - 49
|
|
1557
|
+
[
|
|
1558
|
+
[13, 14, 14, 15, 16],
|
|
1559
|
+
[9, 10, 11, 11, 12],
|
|
1560
|
+
[7, 7, 8, 8, 9],
|
|
1561
|
+
[5, 5, 6, 6, 6],
|
|
1562
|
+
[4, 4, 4, 4, 5],
|
|
1563
|
+
],
|
|
1564
|
+
// Age 40 - 44
|
|
1565
|
+
[
|
|
1566
|
+
[11, 11, 12, 13, 14],
|
|
1567
|
+
[8, 8, 9, 9, 10],
|
|
1568
|
+
[5, 6, 6, 7, 7],
|
|
1569
|
+
[4, 4, 4, 5, 5],
|
|
1570
|
+
[3, 3, 3, 3, 4],
|
|
1571
|
+
],
|
|
1572
|
+
],
|
|
1573
|
+
],
|
|
1574
|
+
];
|
|
1575
|
+
|
|
1329
1576
|
class JsExpressionHelper {
|
|
1330
1577
|
calcBMI(height, weight) {
|
|
1331
1578
|
let r;
|
|
@@ -1477,6 +1724,19 @@ class JsExpressionHelper {
|
|
|
1477
1724
|
}
|
|
1478
1725
|
return height && weight && refSectionObject ? formattedSDValue : null;
|
|
1479
1726
|
}
|
|
1727
|
+
calcSouthEastAsiaNonLabCVDRisk(sex, smoker, age, sbp, bmi) {
|
|
1728
|
+
// Bin functions
|
|
1729
|
+
const getAgeBin = (age) => Math.floor((Math.min(Math.max(40, age), 74) - 40) / 5);
|
|
1730
|
+
const getSbpBin = (sbp) => Math.max(0, Math.floor((Math.min(sbp, 180) - 120) / 20) + 1);
|
|
1731
|
+
const getBmiBin = (bmi) => Math.max(0, Math.floor((Math.min(bmi, 35) - 20) / 5) + 1);
|
|
1732
|
+
// Variables
|
|
1733
|
+
const sexIdx = sex === 'M' ? 0 : 1;
|
|
1734
|
+
const smokerIdx = smoker ? 1 : 0;
|
|
1735
|
+
const ageIdx = 6 - getAgeBin(age);
|
|
1736
|
+
const bmiIdx = getBmiBin(bmi);
|
|
1737
|
+
const sbpIdx = 4 - getSbpBin(sbp);
|
|
1738
|
+
return southEastAsiaCvdRiskTables[sexIdx][smokerIdx][ageIdx][sbpIdx][bmiIdx];
|
|
1739
|
+
}
|
|
1480
1740
|
isEmpty(val) {
|
|
1481
1741
|
if (val === undefined ||
|
|
1482
1742
|
val === null ||
|
|
@@ -1552,6 +1812,7 @@ class JsExpressionHelper {
|
|
|
1552
1812
|
calcBMIForAgeZscore: helper.calcBMIForAgeZscore,
|
|
1553
1813
|
calcWeightForHeightZscore: helper.calcWeightForHeightZscore,
|
|
1554
1814
|
calcHeightForAgeZscore: helper.calcHeightForAgeZscore,
|
|
1815
|
+
calcSouthEastAsiaNonLabCVDRisk: helper.calcSouthEastAsiaNonLabCVDRisk,
|
|
1555
1816
|
isEmpty: helper.isEmpty,
|
|
1556
1817
|
arrayContains: helper.arrayContains,
|
|
1557
1818
|
extractRepeatingGroupValues: helper.extractRepeatingGroupValues
|
|
@@ -7636,17 +7897,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
7636
7897
|
|
|
7637
7898
|
class RadioButtonControlComponent {
|
|
7638
7899
|
constructor() {
|
|
7639
|
-
this.onChange = (
|
|
7900
|
+
this.onChange = (_) => { };
|
|
7640
7901
|
this.onTouched = () => { };
|
|
7641
7902
|
}
|
|
7642
7903
|
ngOnInit() {
|
|
7643
|
-
this.options = this.options.map((
|
|
7644
|
-
if (this.selected == option.value) {
|
|
7645
|
-
this.selected = option.value;
|
|
7646
|
-
Object.assign(option, { checked: true });
|
|
7647
|
-
}
|
|
7648
|
-
return option;
|
|
7649
|
-
});
|
|
7904
|
+
this.options = this.options.map((opt) => (Object.assign(Object.assign({}, opt), { checked: false })));
|
|
7650
7905
|
}
|
|
7651
7906
|
writeValue(value) { }
|
|
7652
7907
|
registerOnChange(fn) {
|
|
@@ -7655,41 +7910,23 @@ class RadioButtonControlComponent {
|
|
|
7655
7910
|
registerOnTouched(fn) {
|
|
7656
7911
|
this.onTouched = fn;
|
|
7657
7912
|
}
|
|
7658
|
-
|
|
7659
|
-
this.
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
this.selected = null;
|
|
7666
|
-
Object.assign(o, { checked: false });
|
|
7667
|
-
}
|
|
7668
|
-
});
|
|
7669
|
-
}
|
|
7670
|
-
selectUnselectOpt(option, event) {
|
|
7671
|
-
this.options.forEach((o) => {
|
|
7672
|
-
if (event.target.checked &&
|
|
7673
|
-
this.selected == o.value &&
|
|
7674
|
-
this.selected == option.value) {
|
|
7675
|
-
this.selected = null;
|
|
7676
|
-
Object.assign(o, { checked: false });
|
|
7677
|
-
}
|
|
7678
|
-
else if (event.target.checked && o.value == option.value) {
|
|
7679
|
-
this.selected = o.value;
|
|
7680
|
-
Object.assign(o, { checked: true });
|
|
7681
|
-
}
|
|
7682
|
-
});
|
|
7913
|
+
handleClick(option) {
|
|
7914
|
+
if (this.allowUnselect && option.checked) {
|
|
7915
|
+
option.checked = false;
|
|
7916
|
+
}
|
|
7917
|
+
else if (!option.checked) {
|
|
7918
|
+
option.checked = true;
|
|
7919
|
+
}
|
|
7683
7920
|
}
|
|
7684
7921
|
}
|
|
7685
7922
|
RadioButtonControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RadioButtonControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7686
|
-
RadioButtonControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RadioButtonControlComponent, selector: "ofe-radio-button", inputs: { id: "id",
|
|
7923
|
+
RadioButtonControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: RadioButtonControlComponent, selector: "ofe-radio-button", inputs: { id: "id", options: "options", allowUnselect: "allowUnselect" }, providers: [
|
|
7687
7924
|
{
|
|
7688
7925
|
provide: NG_VALUE_ACCESSOR,
|
|
7689
7926
|
useExisting: forwardRef(() => RadioButtonControlComponent),
|
|
7690
7927
|
multi: true
|
|
7691
7928
|
}
|
|
7692
|
-
], ngImport: i0, template: "<fieldset class=\"
|
|
7929
|
+
], ngImport: i0, template: "<fieldset class=\"cds--fieldset\">\n <div\n *ngFor=\"let option of options; let i = index\"\n class=\"cds--form-item cds--radio-wrapper\"\n >\n <label class=\"form-control no-border\">\n <input\n type=\"radio\"\n [id]=\"id + '_' + i\"\n [name]=\"id\"\n [checked]=\"option.checked\"\n [value]=\"option.value\"\n (click)=\"handleClick(option)\"\n />\n {{ option.label }}\n </label>\n </div>\n</fieldset>\n", directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
7693
7930
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RadioButtonControlComponent, decorators: [{
|
|
7694
7931
|
type: Component,
|
|
7695
7932
|
args: [{
|
|
@@ -7705,11 +7942,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
7705
7942
|
}]
|
|
7706
7943
|
}], propDecorators: { id: [{
|
|
7707
7944
|
type: Input
|
|
7708
|
-
}], selected: [{
|
|
7709
|
-
type: Input
|
|
7710
7945
|
}], options: [{
|
|
7711
7946
|
type: Input
|
|
7712
|
-
}],
|
|
7947
|
+
}], allowUnselect: [{
|
|
7713
7948
|
type: Input
|
|
7714
7949
|
}] } });
|
|
7715
7950
|
|
|
@@ -8521,7 +8756,7 @@ class FormRendererComponent {
|
|
|
8521
8756
|
}
|
|
8522
8757
|
}
|
|
8523
8758
|
FormRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormRendererComponent, deps: [{ token: ValidationFactory }, { token: DataSources }, { token: FormErrorsService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
8524
|
-
FormRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FormRendererComponent, selector: "ofe-form-renderer", inputs: { parentComponent: "parentComponent", node: "node", parentGroup: "parentGroup", theme: "theme", labelMap: "labelMap", controlId: "controlId" }, usesOnChanges: true, ngImport: i0, template: "<!--CONTAINERS-->\n<div *ngIf=\"node.question.renderingType === 'form'\">\n <ofe-tab-set (tabSelect)=\"tabSelected($event)\" [selectedIndex]=\"activeTab\">\n <ofe-tab\n [tabTitle]=\"question.label\"\n *ngFor=\"let question of node.question.questions; let i = index\"\n >\n <ofe-form-renderer\n [node]=\"node.children[question.key]\"\n [parentComponent]=\"this\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n >\n </ofe-form-renderer>\n </ofe-tab>\n <div *ngIf=\"showErrors()\" class=\"container\">\n <div\n data-notification\n *ngFor=\"let errorNode of errorNodes\"\n class=\"cds--inline-notification cds--inline-notification--error cds--inline-notification--low-contrast pointer\"\n role=\"alert\"\n (click)=\"announceErrorField(errorNode)\"\n >\n <div class=\"cds--inline-notification__details\">\n <div class=\"cds--inline-notification__text-wrapper\">\n <p class=\"cds--inline-notification__title\">\n {{ errorNode.question.label }}\n </p>\n <p class=\"cds--inline-notification__subtitle\">\n {{ getControlError(errorNode) }}\n </p>\n </div>\n </div>\n <button\n tabindex=\"0\"\n class=\"cds--inline-notification__action-button cds--btn cds--btn--sm cds--btn--ghost\"\n type=\"button\"\n >\n Fix\n </button>\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n style=\"will-change: transform\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"cds--inline-notification__icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n ></path>\n <path\n d=\"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n ></path>\n </svg>\n </div>\n </div>\n </ofe-tab-set>\n</div>\n<div *ngIf=\"node.question.renderingType === 'page'\">\n <!--Page Components-->\n <ofe-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n</div>\n<div *ngIf=\"node.question.renderingType === 'section' && checkSection(node)\">\n <div\n class=\"cds--accordion__item\"\n [ngClass]=\"{ 'cds--accordion__item--active': !isCollapsed }\"\n >\n <button\n class=\"cds--accordion__heading\"\n type=\"button\"\n [attr.aria-expanded]=\"isCollapsed ? 'false' : 'true'\"\n aria-controls=\"accordion-item-0\"\n (click)=\"isCollapsed = !isCollapsed\"\n >\n <svg\n class=\"cds--accordion__arrow\"\n ibmIcon=\"chevron--right\"\n size=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n aria-hidden=\"true\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n >\n <path d=\"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z\"></path>\n </svg>\n <p class=\"cds--accordion__title\">\n {{ node.question.label }}\n </p>\n </button>\n <div ofeCollapse=\"isCollapsed\">\n <!--Section Components-->\n <ofe-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <div\n class=\"cds--accordion__content accordion-content-override\"\n [ngClass]=\"{\n 'accordion-content-dark': theme === 'light'\n }\"\n >\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n </div>\n </div>\n</div>\n\n<!-- MESSAGES -->\n<div\n *ngIf=\"node.control && node.control.alert && node.control.alert !== ''\"\n class=\"alert alert-warning\"\n>\n <a class=\"close\" data-dismiss=\"alert\">×</a> {{ node.control.alert }}\n</div>\n\n<!--CONTROLS-->\n\n<div\n *ngIf=\"node.question.controlType === 0\"\n [formGroup]=\"parentGroup\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <ofe-custom-component-wrapper\n [dark]=\"!(theme === 'light')\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <div class=\"cds--form-item\">\n <!--LEAF CONTROL-->\n <div class=\"question-area\">\n <a\n class=\"form-tooltip pull-right\"\n (click)=\"toggleInformation(node.question.extras.id)\"\n data-placement=\"right\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n <i class=\"glyphicon glyphicon-question-sign\" aria-hidden=\"true\"></i>\n </a>\n\n <label\n *ngIf=\"node.question.label\"\n [style.color]=\"hasErrors() ? 'red' : ''\"\n class=\"cds--label\"\n [attr.for]=\"node.question.key\"\n >\n {{ node.question.required ? '*' : '' }}\n {{ node.question.prefix ? node.question.prefix + ' ' : ''\n }}{{ node.question.label }}\n </label>\n\n <div\n *ngIf=\"\n node.question.extras.questionOptions.customControl;\n else nativeControls\n \"\n >\n <ofe-custom-control-wrapper\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [question]=\"node.question\"\n >\n </ofe-custom-control-wrapper>\n </div>\n\n <ng-template #nativeControls>\n <div class=\"afe-control\" [ngSwitch]=\"node.question.renderingType\">\n <ofe-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'select'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n >\n <option *ngFor=\"let o of node.question.options\" [value]=\"o.value\">\n {{ o.label }}\n </option>\n </ofe-select>\n\n <div *ngSwitchCase=\"'file'\">\n <ofe-file-upload\n [dataSource]=\"dataSource\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n (fileChanged)=\"upload($event)\"\n >\n </ofe-file-upload>\n </div>\n\n <textarea\n [theme]=\"theme\"\n ofeTextAreaInput\n [ngClass]=\"{\n 'cds--text-area--light': theme === 'light',\n 'cds--text-area--invalid': !node.control.valid\n }\"\n [placeholder]=\"node.question.placeholder\"\n [rows]=\"node.question.rows\"\n class=\"cds--text-area\"\n *ngSwitchCase=\"'textarea'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n >\n </textarea>\n\n <ofe-remote-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'remote-select'\"\n [placeholder]=\"node.question.placeholder\"\n tabindex=\"0\"\n [dataSource]=\"dataSource\"\n [componentID]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n ></ofe-remote-select>\n\n <ofe-ngx-date-time-picker\n [weeks]=\"node.question.extras.questionOptions.weeksList\"\n [showWeeks]=\"node.question.showWeeksAdder\"\n [theme]=\"theme\"\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n *ngSwitchCase=\"'date'\"\n [datePickerFormat]=\"node.question.datePickerFormat\"\n >\n </ofe-ngx-date-time-picker>\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'multi-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [multiple]=\"true\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'single-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <ofe-number-input\n [theme]=\"theme\"\n *ngSwitchCase=\"'number'\"\n [id]=\"node.question.key + 'id'\"\n [min]=\"node.question.extras.questionOptions.min\"\n [max]=\"node.question.extras.questionOptions.max\"\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n >\n </ofe-number-input>\n\n <input\n [theme]=\"theme\"\n class=\"cds--text-input\"\n ofeTextInput\n *ngSwitchDefault\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n [type]=\"node.question.renderingType\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n />\n\n <div *ngSwitchCase=\"'radio'\">\n <ofe-radio-button\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\"\n [selected]=\"node.control.value\"\n [allowRadioUnselect]=\"node.question.allowRadioUnselect\"\n ></ofe-radio-button>\n </div>\n\n <div *ngSwitchCase=\"'checkbox'\">\n <ofe-checkbox\n [id]=\"node.question.key + 'id' + controlId\"\n [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\"\n [selected]=\"node.control.value\"\n ></ofe-checkbox>\n </div>\n\n <div\n *ngIf=\"\n node.question.enableHistoricalValue &&\n node.question.historicalDisplay\n \"\n style=\"margin-top: 2px\"\n >\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-xs-9\">\n <span class=\"text-warning\">Previous Value: </span>\n <strong>{{ node.question.historicalDisplay?.text }}</strong>\n <span *ngIf=\"node.question.showHistoricalValueDate\">\n <span> | </span>\n <strong class=\"text-primary\"\n >{{ node.question.historicalDisplay?._date | date }}\n </strong>\n <span\n class=\"text-primary\"\n *ngIf=\"\n node.question.historicalDisplay &&\n node.question.historicalDisplay._date\n \"\n >\n ({{\n node.question.historicalDisplay._date | timeAgo\n }})</span\n >\n </span>\n </div>\n <button\n type=\"button\"\n ofeNode=\"node\"\n [name]=\"'historyValue'\"\n class=\"cds--btn cds--btn--primary cds--btn--sm col-xs-3\"\n >\n Use Value\n </button>\n </div>\n </div>\n </div>\n <ofe-appointments-overview [node]=\"node\"></ofe-appointments-overview>\n <div *ngIf=\"hasErrors()\">\n <div *ngFor=\"let e of errors()\">\n <span class=\"text-danger\">{{ e }}</span>\n </div>\n </div>\n </div>\n </ng-template>\n\n <div\n class=\"question-info col-md-12 col-lg-12 col-sm-12\"\n id=\"{{ node.question.extras.id }}\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n {{ node.question.extras.questionInfo }}\n </div>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 1\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--ARRAY CONTROL-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div class=\"well\" style=\"padding: 2px\" *ngSwitchCase=\"'repeating'\">\n <h4 style=\"margin: 2px; font-weight: bold\">{{ node.question.label }}</h4>\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 2px;\n \"\n />\n <div [ngSwitch]=\"node.question.extras.type\">\n <div *ngSwitchCase=\"'testOrder'\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <ofe-form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n <div>{{ child.orderNumber }}</div>\n <button\n type=\"button \"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'obsGroup'\" style=\"margin-bottom: 20px\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <ofe-form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n [controlId]=\"i\"\n ></ofe-form-renderer>\n <button\n type=\"button\"\n style=\"width: 100px\"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--primary cds--btn--sm\"\n (click)=\"node.createChildNode()\"\n >\n Add\n </button>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 2\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--GROUP-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div *ngSwitchCase=\"'group'\">\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n <div\n *ngSwitchCase=\"'field-set'\"\n style=\"border: 1px solid #eeeeee; padding: 2px; margin: 2px\"\n >\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n </div>\n</div>\n", styles: [".slider{width:auto;margin:30px}.slick-prev:before,.slick-next:before{color:#337ab7}.slick-dots{bottom:-40px}.slick-slide{outline:none}\n", "a{color:#fff;text-decoration:none;font-size:12px;text-transform:uppercase}ul{list-style-type:none;margin:2px auto;position:relative}li{display:block;padding:10px 20px;white-space:nowrap;transition:all .3s ease-in;border-bottom:4px solid transparent}li:hover{border-bottom:4px solid white;opacity:.7;cursor:pointer}.owl-theme .owl-controls .owl-nav{position:absolute;width:100%;top:0}.owl-theme .owl-controls .owl-nav [class*=owl-]{position:absolute;background:none;color:#000}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:none;color:#000}.owl-theme .owl-controls .owl-nav .owl-next{right:0;transform:translate(120%)}.owl-theme .owl-controls .owl-nav .owl-prev{left:0;transform:translate(-120%)}.slick-initialized .swipe-tab-content{position:relative;min-height:365px}@media screen and (min-width: 767px){.slick-initialized .swipe-tab-content{min-height:500px}}.slick-initialized .swipe-tab{display:flex;align-items:center;justify-content:center;height:50px;background:none;border:0;color:#757575;cursor:pointer;text-align:center;border-bottom:2px solid rgba(51,122,183,0);transition:all .5s}.slick-initialized .swipe-tab:hover{color:#337ab7}.slick-initialized .swipe-tab.active-tab{border-bottom-color:#337ab7;color:#337ab7;font-weight:bold}.disabled{opacity:.5;pointer-events:none}.select2-container{margin-top:-5px}.btn{padding:0 12px!important}.form-tooltip{color:#337ab7;display:inline-block}.question-info{opacity:0;height:0px;display:none;transition-duration:opacity 1s ease-out;transtion-delay:.5s;padding-top:2px;padding-bottom:2px;color:#696969;border-style:ridge;border-width:1px;border-color:#337ab7;margin-top:2px}.hide-info{display:none;height:0px}.form-tooltip:hover~.question-info{display:block;opacity:1;height:auto}.form-tooltip .tooltipcontent:after{content:\" \";position:absolute;bottom:100%;right:0%;margin-left:-5px;border-width:5px;border-style:solid;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#337ab7;border-left-color:transparent}ng-select.form-control{padding-top:0;height:auto;padding-bottom:0}.forms-dropdown-menu{max-height:450px;overflow-y:scroll}.no-border{border:0;box-shadow:none}.text-danger{color:var(--cds-support-01, #da1e28)}.error{margin-bottom:3rem}.afe-control{margin-bottom:1.5rem}[hidden]{display:none!important}.accordion-content-dark{background-color:#f4f4f4;padding-right:1rem}.accordion-content-override{box-sizing:content-box}.question-area{width:100%;max-width:18rem}.in-line{display:inline-block;padding-right:.5rem}\n"], components: [{ type: TabSetComponent, selector: "ofe-tab-set", inputs: ["disableStyle", "customNavClass", "customTabsClass", "selectedIndex"], outputs: ["tabSelect"] }, { type: TabComponent, selector: "ofe-tab", inputs: ["tabTitle", "tabSubTitle", "active", "disabled", "bypassDOM", "customPaneClass"] }, { type: FormRendererComponent, selector: "ofe-form-renderer", inputs: ["parentComponent", "node", "parentGroup", "theme", "labelMap", "controlId"] }, { type: CustomComponentWrapperComponent, selector: "ofe-custom-component-wrapper", inputs: ["componentConfigs", "dark"] }, { type: CustomControlWrapperComponent, selector: "ofe-custom-control-wrapper", inputs: ["question"] }, { type: SelectComponent, selector: "ofe-select", inputs: ["display", "label", "helperText", "invalidText", "warn", "warnText", "id", "size", "disabled", "skeleton", "invalid", "theme", "ariaLabel", "value"], outputs: ["valueChange"] }, { type: FileUploadComponent, selector: "ofe-file-upload", inputs: ["dataSource"] }, { type: RemoteSelectComponent, selector: "ofe-remote-select", inputs: ["placeholder", "componentID", "disabled", "theme", "dataSource"], outputs: ["done"] }, { type: NgxDatetimeComponent, selector: "ofe-ngx-date-time-picker", inputs: ["id", "theme", "datePickerFormat", "showWeeks", "weeks"] }, { type: i1$3.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: NumberInputComponent, selector: "ofe-number-input", inputs: ["theme", "disabled", "skeleton", "invalid", "id", "size", "required", "value", "min", "max", "label", "helperText", "invalidText", "step", "precision", "warn", "warnText", "decrementLabel", "incrementLabel"], outputs: ["numberChange"] }, { type: RadioButtonControlComponent, selector: "ofe-radio-button", inputs: ["id", "selected", "options", "allowRadioUnselect"] }, { type: CheckboxControlComponent, selector: "ofe-checkbox", inputs: ["id", "options", "selected"] }, { type: AppointmentsOverviewComponent, selector: "ofe-appointments-overview", inputs: ["node"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: CollapseDirective, selector: "[ofeCollapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { type: i19.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i19.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i19.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i19.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i19.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i19.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i19.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: TextAreaDirective, selector: "[ofeTextAreaInput]", inputs: ["theme", "invalid", "skeleton"] }, { type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: TextInputDirective, selector: "[ofeTextInput]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { type: HistoricalValueDirective, selector: "[ofeNode]", inputs: ["_node", "node"], outputs: ["_nodeChange"] }], pipes: { "date": i1.DatePipe, "timeAgo": TimeAgoPipe } });
|
|
8759
|
+
FormRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FormRendererComponent, selector: "ofe-form-renderer", inputs: { parentComponent: "parentComponent", node: "node", parentGroup: "parentGroup", theme: "theme", labelMap: "labelMap", controlId: "controlId" }, usesOnChanges: true, ngImport: i0, template: "<!--CONTAINERS-->\n<div *ngIf=\"node.question.renderingType === 'form'\">\n <ofe-tab-set (tabSelect)=\"tabSelected($event)\" [selectedIndex]=\"activeTab\">\n <ofe-tab\n [tabTitle]=\"question.label\"\n *ngFor=\"let question of node.question.questions; let i = index\"\n >\n <ofe-form-renderer\n [node]=\"node.children[question.key]\"\n [parentComponent]=\"this\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n >\n </ofe-form-renderer>\n </ofe-tab>\n <div *ngIf=\"showErrors()\" class=\"container\">\n <div\n data-notification\n *ngFor=\"let errorNode of errorNodes\"\n class=\"cds--inline-notification cds--inline-notification--error cds--inline-notification--low-contrast pointer\"\n role=\"alert\"\n (click)=\"announceErrorField(errorNode)\"\n >\n <div class=\"cds--inline-notification__details\">\n <div class=\"cds--inline-notification__text-wrapper\">\n <p class=\"cds--inline-notification__title\">\n {{ errorNode.question.label }}\n </p>\n <p class=\"cds--inline-notification__subtitle\">\n {{ getControlError(errorNode) }}\n </p>\n </div>\n </div>\n <button\n tabindex=\"0\"\n class=\"cds--inline-notification__action-button cds--btn cds--btn--sm cds--btn--ghost\"\n type=\"button\"\n >\n Fix\n </button>\n <svg\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n style=\"will-change: transform\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"cds--inline-notification__icon\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n ></path>\n <path\n d=\"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z\"\n data-icon-path=\"inner-path\"\n opacity=\"0\"\n ></path>\n </svg>\n </div>\n </div>\n </ofe-tab-set>\n</div>\n<div *ngIf=\"node.question.renderingType === 'page'\">\n <!--Page Components-->\n <ofe-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n</div>\n<div *ngIf=\"node.question.renderingType === 'section' && checkSection(node)\">\n <div\n class=\"cds--accordion__item\"\n [ngClass]=\"{ 'cds--accordion__item--active': !isCollapsed }\"\n >\n <button\n class=\"cds--accordion__heading\"\n type=\"button\"\n [attr.aria-expanded]=\"isCollapsed ? 'false' : 'true'\"\n aria-controls=\"accordion-item-0\"\n (click)=\"isCollapsed = !isCollapsed\"\n >\n <svg\n class=\"cds--accordion__arrow\"\n ibmIcon=\"chevron--right\"\n size=\"16\"\n xmlns=\"http://www.w3.org/2000/svg\"\n focusable=\"false\"\n preserveAspectRatio=\"xMidYMid meet\"\n aria-hidden=\"true\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n >\n <path d=\"M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z\"></path>\n </svg>\n <p class=\"cds--accordion__title\">\n {{ node.question.label }}\n </p>\n </button>\n <div ofeCollapse=\"isCollapsed\">\n <!--Section Components-->\n <ofe-custom-component-wrapper\n [dark]=\"theme === 'light'\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <div\n class=\"cds--accordion__content accordion-content-override\"\n [ngClass]=\"{\n 'accordion-content-dark': theme === 'light'\n }\"\n >\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"parentGroup\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n </div>\n </div>\n</div>\n\n<!-- MESSAGES -->\n<div\n *ngIf=\"node.control && node.control.alert && node.control.alert !== ''\"\n class=\"alert alert-warning\"\n>\n <a class=\"close\" data-dismiss=\"alert\">×</a> {{ node.control.alert }}\n</div>\n\n<!--CONTROLS-->\n\n<div\n *ngIf=\"node.question.controlType === 0\"\n [formGroup]=\"parentGroup\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <ofe-custom-component-wrapper\n [dark]=\"!(theme === 'light')\"\n [componentConfigs]=\"node.question.componentConfigs\"\n >\n </ofe-custom-component-wrapper>\n <div class=\"cds--form-item\">\n <!--LEAF CONTROL-->\n <div class=\"question-area\">\n <a\n class=\"form-tooltip pull-right\"\n (click)=\"toggleInformation(node.question.extras.id)\"\n data-placement=\"right\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n <i class=\"glyphicon glyphicon-question-sign\" aria-hidden=\"true\"></i>\n </a>\n\n <label\n *ngIf=\"node.question.label\"\n [style.color]=\"hasErrors() ? 'red' : ''\"\n class=\"cds--label\"\n [attr.for]=\"node.question.key\"\n >\n {{ node.question.required ? '*' : '' }}\n {{ node.question.prefix ? node.question.prefix + ' ' : ''\n }}{{ node.question.label }}\n </label>\n\n <div\n *ngIf=\"\n node.question.extras.questionOptions.customControl;\n else nativeControls\n \"\n >\n <ofe-custom-control-wrapper\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [question]=\"node.question\"\n >\n </ofe-custom-control-wrapper>\n </div>\n\n <ng-template #nativeControls>\n <div class=\"afe-control\" [ngSwitch]=\"node.question.renderingType\">\n <ofe-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'select'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n >\n <option *ngFor=\"let o of node.question.options\" [value]=\"o.value\">\n {{ o.label }}\n </option>\n </ofe-select>\n\n <div *ngSwitchCase=\"'file'\">\n <ofe-file-upload\n [dataSource]=\"dataSource\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n (fileChanged)=\"upload($event)\"\n >\n </ofe-file-upload>\n </div>\n\n <textarea\n [theme]=\"theme\"\n ofeTextAreaInput\n [ngClass]=\"{\n 'cds--text-area--light': theme === 'light',\n 'cds--text-area--invalid': !node.control.valid\n }\"\n [placeholder]=\"node.question.placeholder\"\n [rows]=\"node.question.rows\"\n class=\"cds--text-area\"\n *ngSwitchCase=\"'textarea'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n >\n </textarea>\n\n <ofe-remote-select\n [theme]=\"theme\"\n *ngSwitchCase=\"'remote-select'\"\n [placeholder]=\"node.question.placeholder\"\n tabindex=\"0\"\n [dataSource]=\"dataSource\"\n [componentID]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [id]=\"node.question.key + 'id'\"\n ></ofe-remote-select>\n\n <ofe-ngx-date-time-picker\n [weeks]=\"node.question.extras.questionOptions.weeksList\"\n [showWeeks]=\"node.question.showWeeksAdder\"\n [theme]=\"theme\"\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n *ngSwitchCase=\"'date'\"\n [datePickerFormat]=\"node.question.datePickerFormat\"\n >\n </ofe-ngx-date-time-picker>\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'multi-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n [multiple]=\"true\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <ng-select\n [ngClass]=\"{ 'afe-custom': theme === 'light' }\"\n [id]=\"node.question.key + 'id'\"\n *ngSwitchCase=\"'single-select'\"\n [items]=\"node.question.options\"\n bindLabel=\"label\"\n bindValue=\"value\"\n placeholder=\"\"\n clearAllText=\"Clear\"\n [formControlName]=\"node.question.key\"\n >\n </ng-select>\n\n <ofe-number-input\n [theme]=\"theme\"\n *ngSwitchCase=\"'number'\"\n [id]=\"node.question.key + 'id'\"\n [min]=\"node.question.extras.questionOptions.min\"\n [max]=\"node.question.extras.questionOptions.max\"\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n >\n </ofe-number-input>\n\n <input\n [theme]=\"theme\"\n class=\"cds--text-input\"\n ofeTextInput\n *ngSwitchDefault\n [formControlName]=\"node.question.key\"\n [attr.placeholder]=\"node.question.placeholder\"\n [type]=\"node.question.renderingType\"\n [id]=\"node.question.key + 'id'\"\n [readOnly]=\"node.question.extras.readOnly\"\n />\n\n <div *ngSwitchCase=\"'radio'\">\n <ofe-radio-button\n [id]=\"node.question.key + 'id'\"\n [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\"\n [allowUnselect]=\"node.question.allowUnselect\"\n [selected]=\"node.control.value\"\n ></ofe-radio-button>\n </div>\n\n <div *ngSwitchCase=\"'checkbox'\">\n <ofe-checkbox\n [id]=\"node.question.key + 'id' + controlId\"\n [formControlName]=\"node.question.key\"\n [options]=\"node.question.options\"\n [selected]=\"node.control.value\"\n ></ofe-checkbox>\n </div>\n\n <div\n *ngIf=\"\n node.question.enableHistoricalValue &&\n node.question.historicalDisplay\n \"\n style=\"margin-top: 2px\"\n >\n <div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-xs-9\">\n <span class=\"text-warning\">Previous Value: </span>\n <strong>{{ node.question.historicalDisplay?.text }}</strong>\n <span *ngIf=\"node.question.showHistoricalValueDate\">\n <span> | </span>\n <strong class=\"text-primary\"\n >{{ node.question.historicalDisplay?._date | date }}\n </strong>\n <span\n class=\"text-primary\"\n *ngIf=\"\n node.question.historicalDisplay &&\n node.question.historicalDisplay._date\n \"\n >\n ({{\n node.question.historicalDisplay._date | timeAgo\n }})</span\n >\n </span>\n </div>\n <button\n type=\"button\"\n ofeNode=\"node\"\n [name]=\"'historyValue'\"\n class=\"cds--btn cds--btn--primary cds--btn--sm col-xs-3\"\n >\n Use Value\n </button>\n </div>\n </div>\n </div>\n <ofe-appointments-overview [node]=\"node\"></ofe-appointments-overview>\n <div *ngIf=\"hasErrors()\">\n <div *ngFor=\"let e of errors()\">\n <span class=\"text-danger\">{{ e }}</span>\n </div>\n </div>\n </div>\n </ng-template>\n\n <div\n class=\"question-info col-md-12 col-lg-12 col-sm-12\"\n id=\"{{ node.question.extras.id }}\"\n *ngIf=\"\n node.question &&\n node.question.extras.questionInfo &&\n node.question.extras.questionInfo !== '' &&\n node.question.extras.questionInfo !== ' '\n \"\n >\n {{ node.question.extras.questionInfo }}\n </div>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 1\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--ARRAY CONTROL-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div class=\"well\" style=\"padding: 2px\" *ngSwitchCase=\"'repeating'\">\n <h4 style=\"margin: 2px; font-weight: bold\">{{ node.question.label }}</h4>\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 2px;\n \"\n />\n <div [ngSwitch]=\"node.question.extras.type\">\n <div *ngSwitchCase=\"'testOrder'\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <ofe-form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n <div>{{ child.orderNumber }}</div>\n <button\n type=\"button \"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n\n <div *ngSwitchCase=\"'obsGroup'\" style=\"margin-bottom: 20px\">\n <div *ngFor=\"let child of node.children; let i = index\">\n <ofe-form-renderer\n *ngFor=\"let question of child.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"child.children[question.key]\"\n [parentGroup]=\"child.control\"\n [labelMap]=\"labelMap\"\n [controlId]=\"i\"\n ></ofe-form-renderer>\n <button\n type=\"button\"\n style=\"width: 100px\"\n class=\"cds--btn cds--btn--danger cds--btn--sm\"\n (click)=\"node.removeAt(i)\"\n >\n Remove\n </button>\n <br />\n <hr\n style=\"\n margin-left: -2px;\n margin-right: -2px;\n margin-bottom: 4px;\n margin-top: 8px;\n border-width: 1px;\n \"\n />\n </div>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"cds--btn cds--btn--primary cds--btn--sm\"\n (click)=\"node.createChildNode()\"\n >\n Add\n </button>\n </div>\n </div>\n</div>\n<div\n *ngIf=\"node.question.controlType === 2\"\n [hidden]=\"node.control.hidden\"\n [ngClass]=\"{ disabled: node.control.disabled }\"\n>\n <!--GROUP-->\n <div [ngSwitch]=\"node.question.renderingType\">\n <div *ngSwitchCase=\"'group'\">\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n <div\n *ngSwitchCase=\"'field-set'\"\n style=\"border: 1px solid #eeeeee; padding: 2px; margin: 2px\"\n >\n <ofe-form-renderer\n *ngFor=\"let question of node.question.questions\"\n [parentComponent]=\"this\"\n [node]=\"node.children[question.key]\"\n [parentGroup]=\"node.control\"\n [labelMap]=\"labelMap\"\n ></ofe-form-renderer>\n </div>\n </div>\n</div>\n", styles: [".slider{width:auto;margin:30px}.slick-prev:before,.slick-next:before{color:#337ab7}.slick-dots{bottom:-40px}.slick-slide{outline:none}\n", "a{color:#fff;text-decoration:none;font-size:12px;text-transform:uppercase}ul{list-style-type:none;margin:2px auto;position:relative}li{display:block;padding:10px 20px;white-space:nowrap;transition:all .3s ease-in;border-bottom:4px solid transparent}li:hover{border-bottom:4px solid white;opacity:.7;cursor:pointer}.owl-theme .owl-controls .owl-nav{position:absolute;width:100%;top:0}.owl-theme .owl-controls .owl-nav [class*=owl-]{position:absolute;background:none;color:#000}.owl-theme .owl-controls .owl-nav [class*=owl-]:hover{background:none;color:#000}.owl-theme .owl-controls .owl-nav .owl-next{right:0;transform:translate(120%)}.owl-theme .owl-controls .owl-nav .owl-prev{left:0;transform:translate(-120%)}.slick-initialized .swipe-tab-content{position:relative;min-height:365px}@media screen and (min-width: 767px){.slick-initialized .swipe-tab-content{min-height:500px}}.slick-initialized .swipe-tab{display:flex;align-items:center;justify-content:center;height:50px;background:none;border:0;color:#757575;cursor:pointer;text-align:center;border-bottom:2px solid rgba(51,122,183,0);transition:all .5s}.slick-initialized .swipe-tab:hover{color:#337ab7}.slick-initialized .swipe-tab.active-tab{border-bottom-color:#337ab7;color:#337ab7;font-weight:bold}.disabled{opacity:.5;pointer-events:none}.select2-container{margin-top:-5px}.btn{padding:0 12px!important}.form-tooltip{color:#337ab7;display:inline-block}.question-info{opacity:0;height:0px;display:none;transition-duration:opacity 1s ease-out;transtion-delay:.5s;padding-top:2px;padding-bottom:2px;color:#696969;border-style:ridge;border-width:1px;border-color:#337ab7;margin-top:2px}.hide-info{display:none;height:0px}.form-tooltip:hover~.question-info{display:block;opacity:1;height:auto}.form-tooltip .tooltipcontent:after{content:\" \";position:absolute;bottom:100%;right:0%;margin-left:-5px;border-width:5px;border-style:solid;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#337ab7;border-left-color:transparent}ng-select.form-control{padding-top:0;height:auto;padding-bottom:0}.forms-dropdown-menu{max-height:450px;overflow-y:scroll}.no-border{border:0;box-shadow:none}.text-danger{color:var(--cds-support-01, #da1e28)}.error{margin-bottom:3rem}.afe-control{margin-bottom:1.5rem}[hidden]{display:none!important}.accordion-content-dark{background-color:#f4f4f4;padding-right:1rem}.accordion-content-override{box-sizing:content-box}.question-area{width:100%;max-width:18rem}.in-line{display:inline-block;padding-right:.5rem}\n"], components: [{ type: TabSetComponent, selector: "ofe-tab-set", inputs: ["disableStyle", "customNavClass", "customTabsClass", "selectedIndex"], outputs: ["tabSelect"] }, { type: TabComponent, selector: "ofe-tab", inputs: ["tabTitle", "tabSubTitle", "active", "disabled", "bypassDOM", "customPaneClass"] }, { type: FormRendererComponent, selector: "ofe-form-renderer", inputs: ["parentComponent", "node", "parentGroup", "theme", "labelMap", "controlId"] }, { type: CustomComponentWrapperComponent, selector: "ofe-custom-component-wrapper", inputs: ["componentConfigs", "dark"] }, { type: CustomControlWrapperComponent, selector: "ofe-custom-control-wrapper", inputs: ["question"] }, { type: SelectComponent, selector: "ofe-select", inputs: ["display", "label", "helperText", "invalidText", "warn", "warnText", "id", "size", "disabled", "skeleton", "invalid", "theme", "ariaLabel", "value"], outputs: ["valueChange"] }, { type: FileUploadComponent, selector: "ofe-file-upload", inputs: ["dataSource"] }, { type: RemoteSelectComponent, selector: "ofe-remote-select", inputs: ["placeholder", "componentID", "disabled", "theme", "dataSource"], outputs: ["done"] }, { type: NgxDatetimeComponent, selector: "ofe-ngx-date-time-picker", inputs: ["id", "theme", "datePickerFormat", "showWeeks", "weeks"] }, { type: i1$3.NgSelectComponent, selector: "ng-select", inputs: ["markFirst", "dropdownPosition", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "bufferAmount", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "bindLabel", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "virtualScroll", "openOnEnter", "appendTo", "bindValue", "appearance", "maxSelectedItems", "groupBy", "groupValue", "tabIndex", "typeahead"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { type: NumberInputComponent, selector: "ofe-number-input", inputs: ["theme", "disabled", "skeleton", "invalid", "id", "size", "required", "value", "min", "max", "label", "helperText", "invalidText", "step", "precision", "warn", "warnText", "decrementLabel", "incrementLabel"], outputs: ["numberChange"] }, { type: RadioButtonControlComponent, selector: "ofe-radio-button", inputs: ["id", "options", "allowUnselect"] }, { type: CheckboxControlComponent, selector: "ofe-checkbox", inputs: ["id", "options", "selected"] }, { type: AppointmentsOverviewComponent, selector: "ofe-appointments-overview", inputs: ["node"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: CollapseDirective, selector: "[ofeCollapse]", inputs: ["display", "isAnimated", "collapse"], outputs: ["collapsed", "collapses", "expanded", "expands"], exportAs: ["bs-collapse"] }, { type: i19.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i19.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i19.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i19.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i19.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i19.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i19.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: TextAreaDirective, selector: "[ofeTextAreaInput]", inputs: ["theme", "invalid", "skeleton"] }, { type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: TextInputDirective, selector: "[ofeTextInput]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { type: HistoricalValueDirective, selector: "[ofeNode]", inputs: ["_node", "node"], outputs: ["_nodeChange"] }], pipes: { "date": i1.DatePipe, "timeAgo": TimeAgoPipe } });
|
|
8525
8760
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FormRendererComponent, decorators: [{
|
|
8526
8761
|
type: Component,
|
|
8527
8762
|
args: [{
|
|
@@ -10538,7 +10773,7 @@ class RadioButtonQuestion extends QuestionBase {
|
|
|
10538
10773
|
constructor(options) {
|
|
10539
10774
|
super(options);
|
|
10540
10775
|
this.renderingType = 'radio';
|
|
10541
|
-
this.
|
|
10776
|
+
this.allowUnselect = options.allowUnselect === true;
|
|
10542
10777
|
this.options = options.options || [];
|
|
10543
10778
|
this.controlType = AfeControlType.AfeFormControl;
|
|
10544
10779
|
}
|
|
@@ -11087,11 +11322,14 @@ class QuestionFactory {
|
|
|
11087
11322
|
type: '',
|
|
11088
11323
|
key: ''
|
|
11089
11324
|
});
|
|
11325
|
+
question.questionIndex = this.quetionIndex;
|
|
11090
11326
|
question.label = schemaQuestion.label;
|
|
11091
11327
|
question.key = schemaQuestion.id;
|
|
11328
|
+
question.prefix = schemaQuestion.prefix;
|
|
11092
11329
|
question.extras = schemaQuestion;
|
|
11093
|
-
question.
|
|
11094
|
-
schemaQuestion.questionOptions.
|
|
11330
|
+
question.allowUnselect =
|
|
11331
|
+
schemaQuestion.questionOptions.allowUnselect;
|
|
11332
|
+
question.orientation = schemaQuestion.questionOptions.orientation;
|
|
11095
11333
|
question.options = schemaQuestion.questionOptions.answers.map((obj) => {
|
|
11096
11334
|
return {
|
|
11097
11335
|
label: obj.label,
|