@esfaenza/forms-and-validations 11.2.65 → 11.2.68
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/esfaenza-forms-and-validations.umd.js +306 -520
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.d.ts +9 -9
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/esfaenza-forms-and-validations.js +10 -10
- package/esm2015/lib/forms/base-form-control.js +61 -118
- package/esm2015/lib/forms/form-adaptive/form-adaptive.component.js +49 -65
- package/esm2015/lib/forms/form-autocomplete/form-autocomplete.component.js +20 -46
- package/esm2015/lib/forms/form-checkbox/form-checkbox.component.js +15 -14
- package/esm2015/lib/forms/form-date/form-date.component.js +19 -20
- package/esm2015/lib/forms/form-datetime/form-datetime.component.js +18 -17
- package/esm2015/lib/forms/form-empty/form-empty.component.js +4 -10
- package/esm2015/lib/forms/form-error/form-error.component.js +6 -16
- package/esm2015/lib/forms/form-file/form-file.component.js +15 -29
- package/esm2015/lib/forms/form-info/form-info.component.js +6 -16
- package/esm2015/lib/forms/form-input/form-input.component.js +21 -35
- package/esm2015/lib/forms/form-multiselect/form-multiselect.component.js +17 -35
- package/esm2015/lib/forms/form-select/form-select.component.js +25 -30
- package/esm2015/lib/forms/form-template/form-template.component.js +10 -28
- package/esm2015/lib/forms/form-textarea/form-textarea.component.js +15 -17
- package/esm2015/lib/forms/form-time/form-time.component.js +17 -34
- package/esm2015/lib/forms-and-validations.module.js +3 -2
- package/esm2015/lib/models/FormsAndValidationsModuleConfig.js +1 -1
- package/esm2015/lib/tokens.js +5 -7
- package/fesm2015/esfaenza-forms-and-validations.js +296 -512
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/forms/base-form-control.d.ts +56 -130
- package/lib/forms/form-adaptive/form-adaptive.component.d.ts +25 -72
- package/lib/forms/form-autocomplete/form-autocomplete.component.d.ts +13 -41
- package/lib/forms/form-checkbox/form-checkbox.component.d.ts +8 -12
- package/lib/forms/form-date/form-date.component.d.ts +9 -15
- package/lib/forms/form-datetime/form-datetime.component.d.ts +8 -12
- package/lib/forms/form-empty/form-empty.component.d.ts +3 -9
- package/lib/forms/form-error/form-error.component.d.ts +5 -15
- package/lib/forms/form-file/form-file.component.d.ts +9 -27
- package/lib/forms/form-info/form-info.component.d.ts +5 -15
- package/lib/forms/form-input/form-input.component.d.ts +14 -36
- package/lib/forms/form-multiselect/form-multiselect.component.d.ts +10 -30
- package/lib/forms/form-select/form-select.component.d.ts +11 -24
- package/lib/forms/form-template/form-template.component.d.ts +9 -27
- package/lib/forms/form-textarea/form-textarea.component.d.ts +7 -15
- package/lib/forms/form-time/form-time.component.d.ts +10 -30
- package/lib/models/FormsAndValidationsModuleConfig.d.ts +6 -8
- package/lib/tokens.d.ts +4 -6
- package/package.json +1 -1
|
@@ -115,14 +115,12 @@ NgxExpandedDayJsDateAdapter.ctorParameters = () => [
|
|
|
115
115
|
{ type: String, decorators: [{ type: Inject, args: [MAT_DATE_LOCALE,] }] }
|
|
116
116
|
];
|
|
117
117
|
|
|
118
|
-
/**
|
|
119
|
-
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
120
|
-
*/
|
|
118
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
121
119
|
const FAV_LOCALE = new InjectionToken('FAV_LOCALE');
|
|
122
|
-
/**
|
|
123
|
-
|
|
124
|
-
*/
|
|
125
|
-
const
|
|
120
|
+
/** Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale */
|
|
121
|
+
const ACO_CUSTOMKEY = new InjectionToken('ACO_CUSTOMKEY');
|
|
122
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
123
|
+
const FAV_DEBUG_MODE = new InjectionToken('FAV_DEBUG_MODE');
|
|
126
124
|
|
|
127
125
|
// Angular
|
|
128
126
|
/**
|
|
@@ -1388,22 +1386,17 @@ ValidationAutocompleteComponent.propDecorators = {
|
|
|
1388
1386
|
};
|
|
1389
1387
|
|
|
1390
1388
|
// Angular
|
|
1391
|
-
/**
|
|
1392
|
-
* Componente base da cui tutti i componenti Form implementano
|
|
1393
|
-
*/
|
|
1389
|
+
/** Componente base da cui tutti i componenti Form implementano */
|
|
1394
1390
|
class BaseFormControl {
|
|
1395
|
-
/**
|
|
1396
|
-
|
|
1397
|
-
*
|
|
1398
|
-
* @ignore
|
|
1399
|
-
*/
|
|
1400
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, nativeInput = false) {
|
|
1391
|
+
/** @ignore Costruttore */
|
|
1392
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE, nativeInput = false) {
|
|
1401
1393
|
this.cdr = cdr;
|
|
1402
1394
|
this.ngControl = ngControl;
|
|
1403
1395
|
this._validators = _validators;
|
|
1404
1396
|
this.ac = ac;
|
|
1405
1397
|
this.AppContext = AppContext;
|
|
1406
1398
|
this.ACO_CUSTOMKEY = ACO_CUSTOMKEY;
|
|
1399
|
+
this.FAV_DEBUG_MODE = FAV_DEBUG_MODE;
|
|
1407
1400
|
this.nativeInput = nativeInput;
|
|
1408
1401
|
/**
|
|
1409
1402
|
* https://github.com/angular/angular/issues/14988
|
|
@@ -1412,13 +1405,9 @@ class BaseFormControl {
|
|
|
1412
1405
|
* poi mettendo firstBind a false di lì in poi funziono come devo. Vista la casistica evito essenzialmente metà detectChanges
|
|
1413
1406
|
*/
|
|
1414
1407
|
this.firstBind = true;
|
|
1415
|
-
/**
|
|
1416
|
-
* Indica se il campo è obbligatorio i opzionale
|
|
1417
|
-
*/
|
|
1408
|
+
/** Indica se il campo è obbligatorio i opzionale */
|
|
1418
1409
|
this.Required = false;
|
|
1419
|
-
/**
|
|
1420
|
-
* Indica se il Form che contiene questo campo è già stato registrato
|
|
1421
|
-
*/
|
|
1410
|
+
/** Indica se il Form che contiene questo campo è già stato registrato */
|
|
1422
1411
|
this.formHasBennBound = false;
|
|
1423
1412
|
/**
|
|
1424
1413
|
* Indica se questo campo è staccato dal Form, ad esempio nel caso sia in un ng-template proiettato nel form.
|
|
@@ -1426,17 +1415,11 @@ class BaseFormControl {
|
|
|
1426
1415
|
* In quel caso la variabile **Form** del componente dev'essere valorizzata
|
|
1427
1416
|
*/
|
|
1428
1417
|
this.detatchedFromform = false;
|
|
1429
|
-
/**
|
|
1430
|
-
* @ignore
|
|
1431
|
-
*/
|
|
1418
|
+
/** @ignore */
|
|
1432
1419
|
this.propagateChange = (_) => { };
|
|
1433
|
-
/**
|
|
1434
|
-
* @ignore
|
|
1435
|
-
*/
|
|
1420
|
+
/** @ignore */
|
|
1436
1421
|
this.onTouched = () => { };
|
|
1437
|
-
/**
|
|
1438
|
-
* @ignore Vedi getter e setter
|
|
1439
|
-
*/
|
|
1422
|
+
/** @ignore Vedi getter e setter */
|
|
1440
1423
|
this._readonly = false;
|
|
1441
1424
|
/**
|
|
1442
1425
|
* Qualora ci fosse un contesto collegato questa variabile identifica se Sono l'Owner o meno.
|
|
@@ -1444,61 +1427,35 @@ class BaseFormControl {
|
|
|
1444
1427
|
* Se non lo sono, il campo risulterà in sola lettura
|
|
1445
1428
|
*/
|
|
1446
1429
|
this.AppContextOwnership = true;
|
|
1447
|
-
/**
|
|
1448
|
-
* Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material
|
|
1449
|
-
*/
|
|
1430
|
+
/** Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material */
|
|
1450
1431
|
this.FieldAppearence = "outline";
|
|
1451
|
-
/**
|
|
1452
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
1453
|
-
*/
|
|
1432
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
1454
1433
|
this.FormLayout = true;
|
|
1455
|
-
/**
|
|
1456
|
-
|
|
1457
|
-
|
|
1434
|
+
/** Indica che la parte input del controllo dev'essere una label readonly e la parte label di titolo dev'essere in bold. Per utilizzare un solo componente sia per la modifica che per il dettaglio */
|
|
1435
|
+
this.DisplayMode = false;
|
|
1436
|
+
/** Definisce se richiamare l'EventEmitter **inputChange** in maniera classica (true) o solo per la change considerate definitive come tasto invio / blur / ecc... (false) */
|
|
1458
1437
|
this.EmitPendingChanges = true;
|
|
1459
|
-
/**
|
|
1460
|
-
* Attiva o disattiva la validazione per questo componente
|
|
1461
|
-
*/
|
|
1438
|
+
/** Attiva o disattiva la validazione per questo componente */
|
|
1462
1439
|
this.Validation = true;
|
|
1463
|
-
/**
|
|
1464
|
-
* Placeholder per quando l'input è vuoto
|
|
1465
|
-
*/
|
|
1440
|
+
/** Placeholder per quando l'input è vuoto */
|
|
1466
1441
|
this.Placeholder = "";
|
|
1467
|
-
/**
|
|
1468
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
1469
|
-
*/
|
|
1442
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
1470
1443
|
this.FormGroupClass = "";
|
|
1471
|
-
/**
|
|
1472
|
-
* Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria
|
|
1473
|
-
*/
|
|
1444
|
+
/** Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria */
|
|
1474
1445
|
this.FailedValidationMessage = "";
|
|
1475
|
-
/**
|
|
1476
|
-
* Input che forza l'invalidità del componente
|
|
1477
|
-
*/
|
|
1446
|
+
/** Input che forza l'invalidità del componente */
|
|
1478
1447
|
this.ForcedError = false;
|
|
1479
|
-
/**
|
|
1480
|
-
* Mostra un testo a sinistra dell'input (FormLayout permettendo)
|
|
1481
|
-
*/
|
|
1448
|
+
/** Mostra un testo a sinistra dell'input (FormLayout permettendo) */
|
|
1482
1449
|
this.Label = "";
|
|
1483
|
-
/**
|
|
1484
|
-
* col-md-X per la label
|
|
1485
|
-
*/
|
|
1450
|
+
/** col-md-X per la label */
|
|
1486
1451
|
this.LabelColWidth = 4;
|
|
1487
|
-
/**
|
|
1488
|
-
* col-md-X per l'input
|
|
1489
|
-
*/
|
|
1452
|
+
/** col-md-X per l'input */
|
|
1490
1453
|
this.InputColWidth = 8;
|
|
1491
|
-
/**
|
|
1492
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
1493
|
-
*/
|
|
1454
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
1494
1455
|
this.Last = false;
|
|
1495
|
-
/**
|
|
1496
|
-
* Associa il componente Form a questo input
|
|
1497
|
-
*/
|
|
1456
|
+
/** Associa il componente Form a questo input */
|
|
1498
1457
|
this.Form = null;
|
|
1499
|
-
/**
|
|
1500
|
-
* Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source**
|
|
1501
|
-
*/
|
|
1458
|
+
/** Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source** */
|
|
1502
1459
|
this.IdField = 'id';
|
|
1503
1460
|
/**
|
|
1504
1461
|
* Espressione simil-Angular per cambiare il testo dei componenti che scelgono il proprio modello da una **Source**
|
|
@@ -1507,33 +1464,19 @@ class BaseFormControl {
|
|
|
1507
1464
|
* È inoltre possibile aggiungere pezzi di descrizione in maniera condizionale con la sintassi **:prop?(Prop vale {prop})**
|
|
1508
1465
|
*/
|
|
1509
1466
|
this.Display = '{description}';
|
|
1510
|
-
/**
|
|
1511
|
-
* Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display**
|
|
1512
|
-
*/
|
|
1467
|
+
/** Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display** */
|
|
1513
1468
|
this.BoundSource = [];
|
|
1514
|
-
/**
|
|
1515
|
-
* Indica se è il primo Bind della Source
|
|
1516
|
-
*/
|
|
1469
|
+
/** Indica se è il primo Bind della Source */
|
|
1517
1470
|
this.SourceFirstBind = true;
|
|
1518
|
-
/**
|
|
1519
|
-
* Evento chiamato alla modifica del valore collegato a questo campo
|
|
1520
|
-
*/
|
|
1471
|
+
/** Evento chiamato alla modifica del valore collegato a questo campo */
|
|
1521
1472
|
this.inputChange = new EventEmitter();
|
|
1522
|
-
/**
|
|
1523
|
-
* Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript
|
|
1524
|
-
*/
|
|
1473
|
+
/** Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript */
|
|
1525
1474
|
this.inputFocus = new EventEmitter();
|
|
1526
|
-
/**
|
|
1527
|
-
* Evento chiamato al finalize del campo di testo/combo/quelcheè
|
|
1528
|
-
*/
|
|
1475
|
+
/** Evento chiamato al finalize del campo di testo/combo/quelcheè */
|
|
1529
1476
|
this.inputFinalized = new EventEmitter();
|
|
1530
|
-
/**
|
|
1531
|
-
* Cache delle condizioni scritte tipo :prop?(Roba con {prop})
|
|
1532
|
-
*/
|
|
1477
|
+
/** Cache delle condizioni scritte tipo :prop?(Roba con {prop}) */
|
|
1533
1478
|
this.BindCheckingGroups = [];
|
|
1534
|
-
/**
|
|
1535
|
-
* Cache delle proprietà scritte tipo --> {prop}
|
|
1536
|
-
*/
|
|
1479
|
+
/** Cache delle proprietà scritte tipo --> {prop} */
|
|
1537
1480
|
this.BindProperties = [];
|
|
1538
1481
|
if (ngControl == null) {
|
|
1539
1482
|
if (!this.handleNullNgControl())
|
|
@@ -1614,6 +1557,7 @@ class BaseFormControl {
|
|
|
1614
1557
|
* Eventualmente rieffettua un bind al modello in base al valore della variabile **RebindModelAfterSource**
|
|
1615
1558
|
*/
|
|
1616
1559
|
tryBindSourceDisplay() {
|
|
1560
|
+
var _a;
|
|
1617
1561
|
if (!this.Source)
|
|
1618
1562
|
return;
|
|
1619
1563
|
if (this.Source.length == 0 && !this.SourceFirstBind)
|
|
@@ -1631,11 +1575,12 @@ class BaseFormControl {
|
|
|
1631
1575
|
// Aggiungo alla BoundSource in formato standard KeyValue
|
|
1632
1576
|
this.BoundSource.push(this.transformSourceItem(s));
|
|
1633
1577
|
});
|
|
1578
|
+
// Post trybind se c'è un modello associato ricalcolo l'**EvaluatedModel**
|
|
1579
|
+
if (this.Model)
|
|
1580
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(t => t.id == this.Model)) === null || _a === void 0 ? void 0 : _a.description;
|
|
1634
1581
|
}
|
|
1635
1582
|
}
|
|
1636
|
-
/**
|
|
1637
|
-
* Valuta il contenuto della variabile BindCheckingGroups
|
|
1638
|
-
*/
|
|
1583
|
+
/** Valuta il contenuto della variabile BindCheckingGroups */
|
|
1639
1584
|
evaluateBindCheckingGroups() {
|
|
1640
1585
|
// Blocco per tirare fuori le condizioni scritte tipo --> :prop?(Roba con {prop})
|
|
1641
1586
|
var iffedMatches = this.Display.match(/:([a-z]+)\?\(([^\(\)]+)\)/g);
|
|
@@ -1648,9 +1593,7 @@ class BaseFormControl {
|
|
|
1648
1593
|
});
|
|
1649
1594
|
}
|
|
1650
1595
|
}
|
|
1651
|
-
/**
|
|
1652
|
-
* Valuta il contenuto della variabile BindProperties
|
|
1653
|
-
*/
|
|
1596
|
+
/** Valuta il contenuto della variabile BindProperties */
|
|
1654
1597
|
evaluateBindProperties() {
|
|
1655
1598
|
// Blocco per tirare fuori le proprietà scritte tipo --> {prop}
|
|
1656
1599
|
var matches = this.Display.match(/{[a-z]+}/gi);
|
|
@@ -1688,9 +1631,7 @@ class BaseFormControl {
|
|
|
1688
1631
|
handleNullNgControl() {
|
|
1689
1632
|
return false;
|
|
1690
1633
|
}
|
|
1691
|
-
/**
|
|
1692
|
-
* @ignore
|
|
1693
|
-
*/
|
|
1634
|
+
/** @ignore */
|
|
1694
1635
|
ngOnInit() {
|
|
1695
1636
|
// A volte nell'ngOnInit non ci passa quindi lo metto sia qui sia nell'afterviewinit, penso che valga per i componenti di terze parti
|
|
1696
1637
|
// che si collegano per i cazzi loro al form ecc, quindi la parte sopra non serve... BOH
|
|
@@ -1725,26 +1666,20 @@ class BaseFormControl {
|
|
|
1725
1666
|
if (this.detatchedFromform && this.Form)
|
|
1726
1667
|
this.Form.removeControl(this.validationControl);
|
|
1727
1668
|
}
|
|
1728
|
-
/**
|
|
1729
|
-
* Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno
|
|
1730
|
-
*/
|
|
1669
|
+
/** Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno */
|
|
1731
1670
|
checkRequiredValidator() {
|
|
1732
1671
|
// controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
|
|
1733
1672
|
// Lo faccio qui e non in un eventuale ngOnInit o costruttore perché ngOnInit non sempre viene chiamato e da costruttore il validatore non ha ancora il valore giusto
|
|
1734
1673
|
if (this._validators && this._validators.some(elem => elem instanceof RequiredValidator && elem.required))
|
|
1735
1674
|
this.Required = true;
|
|
1736
1675
|
}
|
|
1737
|
-
/**
|
|
1738
|
-
* @ignore
|
|
1739
|
-
*/
|
|
1676
|
+
/** @ignore */
|
|
1740
1677
|
ngAfterViewInit() {
|
|
1741
1678
|
if (!this.ngControl)
|
|
1742
1679
|
return;
|
|
1743
1680
|
this.checkRequiredValidator();
|
|
1744
1681
|
}
|
|
1745
|
-
/**
|
|
1746
|
-
* Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante
|
|
1747
|
-
*/
|
|
1682
|
+
/** Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante */
|
|
1748
1683
|
bindResetFunction() {
|
|
1749
1684
|
//faccio in modo che se chiamo il reset del controllo (o della form) dall'esterno si resetti anche il controllo nativo
|
|
1750
1685
|
const origFunc = this.ngControl.control.__original_reset__ || this.ngControl.control.reset;
|
|
@@ -1757,9 +1692,7 @@ class BaseFormControl {
|
|
|
1757
1692
|
//Per consentire richiami multipli di questa funzione prendendo sempre la fiunzione di reset base
|
|
1758
1693
|
this.ngControl.control.__original_reset__ = origFunc;
|
|
1759
1694
|
}
|
|
1760
|
-
/**
|
|
1761
|
-
* @ignore
|
|
1762
|
-
*/
|
|
1695
|
+
/** @ignore */
|
|
1763
1696
|
writeValue(obj) {
|
|
1764
1697
|
if (obj == null && this.firstBind) {
|
|
1765
1698
|
this.firstBind = false;
|
|
@@ -1775,15 +1708,11 @@ class BaseFormControl {
|
|
|
1775
1708
|
// setTime*ut che wrappa tutto non va bene sennò spamma delle change detection a suon di interval che rallentano tantissimo l'app
|
|
1776
1709
|
this.cdr.detectChanges();
|
|
1777
1710
|
}
|
|
1778
|
-
/**
|
|
1779
|
-
* @ignore
|
|
1780
|
-
*/
|
|
1711
|
+
/** @ignore */
|
|
1781
1712
|
registerOnChange(fn) {
|
|
1782
1713
|
this.propagateChange = fn;
|
|
1783
1714
|
}
|
|
1784
|
-
/**
|
|
1785
|
-
* @ignore
|
|
1786
|
-
*/
|
|
1715
|
+
/** @ignore */
|
|
1787
1716
|
registerOnTouched(fn) {
|
|
1788
1717
|
this.onTouched = fn;
|
|
1789
1718
|
}
|
|
@@ -1840,7 +1769,7 @@ class BaseFormControl {
|
|
|
1840
1769
|
*/
|
|
1841
1770
|
focused(event) {
|
|
1842
1771
|
this.inputFocus.emit(event);
|
|
1843
|
-
|
|
1772
|
+
this.log("Control Focused - " + this.GeneratedName);
|
|
1844
1773
|
}
|
|
1845
1774
|
/**
|
|
1846
1775
|
* @ignore
|
|
@@ -1850,7 +1779,16 @@ class BaseFormControl {
|
|
|
1850
1779
|
*/
|
|
1851
1780
|
finalized() {
|
|
1852
1781
|
this.inputFinalized.emit();
|
|
1853
|
-
|
|
1782
|
+
this.log("Control Value Finalized - " + this.GeneratedName);
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* Stampa un log a console
|
|
1786
|
+
*
|
|
1787
|
+
* @param {string} message Messaggio da stampare
|
|
1788
|
+
*/
|
|
1789
|
+
log(message) {
|
|
1790
|
+
if (this.FAV_DEBUG_MODE)
|
|
1791
|
+
console.log("@forms-and-validations: " + message);
|
|
1854
1792
|
}
|
|
1855
1793
|
}
|
|
1856
1794
|
BaseFormControl.decorators = [
|
|
@@ -1863,12 +1801,14 @@ BaseFormControl.ctorParameters = () => [
|
|
|
1863
1801
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
1864
1802
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
1865
1803
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
1804
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] },
|
|
1866
1805
|
{ type: Boolean }
|
|
1867
1806
|
];
|
|
1868
1807
|
BaseFormControl.propDecorators = {
|
|
1869
1808
|
FocusSubject: [{ type: Input }],
|
|
1870
1809
|
FieldAppearence: [{ type: Input }],
|
|
1871
1810
|
FormLayout: [{ type: Input }],
|
|
1811
|
+
DisplayMode: [{ type: Input }],
|
|
1872
1812
|
EmitPendingChanges: [{ type: Input }],
|
|
1873
1813
|
Validation: [{ type: Input }],
|
|
1874
1814
|
Placeholder: [{ type: Input }],
|
|
@@ -1882,6 +1822,7 @@ BaseFormControl.propDecorators = {
|
|
|
1882
1822
|
Form: [{ type: Input }],
|
|
1883
1823
|
Source: [{ type: Input }],
|
|
1884
1824
|
IdField: [{ type: Input }],
|
|
1825
|
+
DisplayModeTemplate: [{ type: Input }],
|
|
1885
1826
|
Display: [{ type: Input }],
|
|
1886
1827
|
Readonly: [{ type: Input }],
|
|
1887
1828
|
LabelInputRatio: [{ type: Input }],
|
|
@@ -1913,35 +1854,24 @@ FormFileComponentLoc.ctorParameters = () => [
|
|
|
1913
1854
|
];
|
|
1914
1855
|
|
|
1915
1856
|
// Angular
|
|
1916
|
-
/**
|
|
1917
|
-
* Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input
|
|
1918
|
-
*/
|
|
1857
|
+
/** Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input */
|
|
1919
1858
|
class FormFileComponent extends BaseFormControl {
|
|
1920
|
-
/**
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
* @ignore
|
|
1924
|
-
*/
|
|
1925
|
-
constructor(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc) {
|
|
1926
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
1859
|
+
/** @ignore Costruttore */
|
|
1860
|
+
constructor(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc, FAV_DEBUG_MODE) {
|
|
1861
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
1927
1862
|
this.utiExts = utiExts;
|
|
1928
1863
|
this.lc = lc;
|
|
1929
|
-
/**
|
|
1930
|
-
* Permette di caricare file multipli
|
|
1931
|
-
*/
|
|
1864
|
+
/** Permette di caricare file multipli */
|
|
1932
1865
|
this.Multiple = false;
|
|
1933
|
-
/**
|
|
1934
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
1935
|
-
*/
|
|
1866
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
1936
1867
|
this.AllowDownload = true;
|
|
1937
1868
|
//Per questo componente non posso permettermi che il modello sia nullo
|
|
1938
1869
|
this.Model = new AppFile();
|
|
1939
1870
|
}
|
|
1940
|
-
/**
|
|
1941
|
-
* @ignore
|
|
1942
|
-
*/
|
|
1871
|
+
/** @ignore */
|
|
1943
1872
|
writeValue(obj) {
|
|
1944
1873
|
var model = obj == null ? new AppFile() : obj;
|
|
1874
|
+
this.EvaluatedModel = model.filename;
|
|
1945
1875
|
super.writeValue(model);
|
|
1946
1876
|
if (obj == null)
|
|
1947
1877
|
this.changed();
|
|
@@ -1971,23 +1901,19 @@ class FormFileComponent extends BaseFormControl {
|
|
|
1971
1901
|
}
|
|
1972
1902
|
this.changed(null, true);
|
|
1973
1903
|
}
|
|
1974
|
-
/**
|
|
1975
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
1976
|
-
*/
|
|
1904
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
1977
1905
|
downloadAttachment() {
|
|
1978
1906
|
let model = this.Model;
|
|
1979
1907
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
1980
1908
|
}
|
|
1981
|
-
/**
|
|
1982
|
-
* @ignore
|
|
1983
|
-
*/
|
|
1909
|
+
/** @ignore */
|
|
1984
1910
|
onNotNullValueSet() { }
|
|
1985
1911
|
}
|
|
1986
1912
|
FormFileComponent.decorators = [
|
|
1987
1913
|
{ type: Component, args: [{
|
|
1988
1914
|
selector: "form-file",
|
|
1989
1915
|
providers: [{ provide: LocalizationService, useClass: FormFileComponentLoc }],
|
|
1990
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" id=\"{{GeneratedName}}\" #fileInput class=\"file-upload-btn app-pointer\" [multiple]=\"Multiple ? true : null\" />\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && Model.filename && Model.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"Model.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required ? true : null\" />\r\n\r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && Model.filename && Model.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"Model.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n</ng-template>",
|
|
1916
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" id=\"{{GeneratedName}}\" #fileInput class=\"file-upload-btn app-pointer\" [multiple]=\"Multiple ? true : null\" />\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && Model.filename && Model.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"Model.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required ? true : null\" />\r\n\r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && Model.filename && Model.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"Model.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n</ng-template>",
|
|
1991
1917
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1992
1918
|
styles: [".frm-padding-left-22{padding-left:22px}"]
|
|
1993
1919
|
},] }
|
|
@@ -2000,7 +1926,8 @@ FormFileComponent.ctorParameters = () => [
|
|
|
2000
1926
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
2001
1927
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2002
1928
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2003
|
-
{ type: LocalizationService }
|
|
1929
|
+
{ type: LocalizationService },
|
|
1930
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2004
1931
|
];
|
|
2005
1932
|
FormFileComponent.propDecorators = {
|
|
2006
1933
|
Multiple: [{ type: Input }],
|
|
@@ -2013,37 +1940,37 @@ FormFileComponent.propDecorators = {
|
|
|
2013
1940
|
* Componente che dà all'utente la possibilità di selezionare una data insieme ad un orario
|
|
2014
1941
|
*/
|
|
2015
1942
|
class FormDateTimeComponent extends BaseFormControl {
|
|
2016
|
-
/**
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2022
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2023
|
-
/**
|
|
2024
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
2025
|
-
*/
|
|
1943
|
+
/** @ignore Costruttore */
|
|
1944
|
+
constructor(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
1945
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
1946
|
+
this.datesExts = datesExts;
|
|
1947
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
2026
1948
|
this.JsDates = false;
|
|
2027
1949
|
}
|
|
2028
|
-
/**
|
|
2029
|
-
|
|
2030
|
-
|
|
1950
|
+
/** @ignore */
|
|
1951
|
+
writeValue(obj) {
|
|
1952
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
1953
|
+
super.writeValue(obj);
|
|
1954
|
+
}
|
|
1955
|
+
/** @ignore */
|
|
2031
1956
|
onNotNullValueSet() { }
|
|
2032
1957
|
}
|
|
2033
1958
|
FormDateTimeComponent.decorators = [
|
|
2034
1959
|
{ type: Component, args: [{
|
|
2035
1960
|
selector: "form-datetime",
|
|
2036
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-datetime [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [id]=\"GeneratedName\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-datetime>\r\n</ng-template>",
|
|
1961
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-datetime [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [id]=\"GeneratedName\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-datetime>\r\n</ng-template>",
|
|
2037
1962
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2038
1963
|
},] }
|
|
2039
1964
|
];
|
|
2040
1965
|
FormDateTimeComponent.ctorParameters = () => [
|
|
1966
|
+
{ type: DateService },
|
|
2041
1967
|
{ type: ChangeDetectorRef },
|
|
2042
1968
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
|
2043
1969
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
2044
1970
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
2045
1971
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2046
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
1972
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
1973
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2047
1974
|
];
|
|
2048
1975
|
FormDateTimeComponent.propDecorators = {
|
|
2049
1976
|
JsDates: [{ type: Input }]
|
|
@@ -2069,57 +1996,35 @@ FormAdaptiveComponentLoc.ctorParameters = () => [
|
|
|
2069
1996
|
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [FAV_LOCALE,] }] }
|
|
2070
1997
|
];
|
|
2071
1998
|
|
|
2072
|
-
/**
|
|
2073
|
-
* Componente in grado di assumere la forma di un qualsiasi altro componente form in base al tipo specificato. Utile per la creazione di form dinamici
|
|
2074
|
-
*/
|
|
1999
|
+
/** Componente in grado di assumere la forma di un qualsiasi altro componente form in base al tipo specificato. Utile per la creazione di form dinamici */
|
|
2075
2000
|
class FormAdaptiveComponent extends BaseFormControl {
|
|
2076
|
-
/**
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
* @ignore
|
|
2080
|
-
*/
|
|
2081
|
-
constructor(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2082
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2001
|
+
/** @ignore Costruttore */
|
|
2002
|
+
constructor(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2003
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2083
2004
|
this.utiExts = utiExts;
|
|
2084
2005
|
this.datesExts = datesExts;
|
|
2085
2006
|
this.dateAdapter = dateAdapter;
|
|
2086
2007
|
this.lc = lc;
|
|
2087
|
-
/**
|
|
2088
|
-
* Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file**
|
|
2089
|
-
*/
|
|
2008
|
+
/** Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file** */
|
|
2090
2009
|
this.AllowDownload = true;
|
|
2091
|
-
/**
|
|
2092
|
-
* Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency)
|
|
2093
|
-
*/
|
|
2010
|
+
/** Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency) */
|
|
2094
2011
|
this.Precision = 2;
|
|
2095
|
-
/**
|
|
2096
|
-
* Allineamento della currency mask
|
|
2097
|
-
*/
|
|
2012
|
+
/** Allineamento della currency mask */
|
|
2098
2013
|
this.Alignment = 'right';
|
|
2099
|
-
/**
|
|
2100
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
2101
|
-
*/
|
|
2014
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
2102
2015
|
this.SearchFunction = null;
|
|
2103
|
-
/**
|
|
2104
|
-
* Numero minimo di caratteri con cui cercare
|
|
2105
|
-
*/
|
|
2016
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
2106
2017
|
this.MinChars = 3;
|
|
2107
|
-
/**
|
|
2108
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
2109
|
-
*/
|
|
2018
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
2110
2019
|
this.CaseSensitive = false;
|
|
2111
|
-
/**
|
|
2112
|
-
* Variabile interna che gestisce se effettuare il riallineamento dei dati o meno
|
|
2113
|
-
*/
|
|
2020
|
+
/** Variabile interna che gestisce se effettuare il riallineamento dei dati o meno */
|
|
2114
2021
|
this.alignValues = false;
|
|
2115
2022
|
/**
|
|
2116
2023
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
2117
2024
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
2118
2025
|
*/
|
|
2119
2026
|
this.ignoreNextWriteValue = false;
|
|
2120
|
-
/**
|
|
2121
|
-
* Cache della sorgente originale POST binding, in modo da poter fare filtri in locale qualora la **SearchFunction** non fosse definita e la **Source** fosse assegnata
|
|
2122
|
-
*/
|
|
2027
|
+
/** Cache della sorgente originale POST binding, in modo da poter fare filtri in locale qualora la **SearchFunction** non fosse definita e la **Source** fosse assegnata */
|
|
2123
2028
|
this.FilteredBoundSource = [];
|
|
2124
2029
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
2125
2030
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
@@ -2127,9 +2032,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2127
2032
|
this.executionTimers = {};
|
|
2128
2033
|
this.ModelFile = new AppFile();
|
|
2129
2034
|
}
|
|
2130
|
-
/**
|
|
2131
|
-
* @ignore
|
|
2132
|
-
*/
|
|
2035
|
+
/** @ignore */
|
|
2133
2036
|
ngOnChanges(changes) {
|
|
2134
2037
|
var _a;
|
|
2135
2038
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2148,28 +2051,41 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2148
2051
|
this.writeValue(this.Model);
|
|
2149
2052
|
});
|
|
2150
2053
|
}
|
|
2151
|
-
/**
|
|
2152
|
-
* @ignore
|
|
2153
|
-
*/
|
|
2054
|
+
/** @ignore */
|
|
2154
2055
|
writeValue(obj) {
|
|
2056
|
+
var _a;
|
|
2155
2057
|
this.alignValues = false;
|
|
2156
|
-
|
|
2058
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
2059
|
+
if (!this.Type) {
|
|
2157
2060
|
this.Type = "string";
|
|
2158
|
-
|
|
2061
|
+
this.EvaluatedModel = obj;
|
|
2062
|
+
}
|
|
2063
|
+
if (this.Type == "date" || this.Type == "datetime") {
|
|
2159
2064
|
this.useJsDates = Object.prototype.toString.call(obj) === "[object Date]";
|
|
2160
|
-
|
|
2065
|
+
if (this.Type == "date")
|
|
2066
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2067
|
+
if (this.Type == "datetime")
|
|
2068
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
2069
|
+
}
|
|
2070
|
+
else if ((this.Type == "float" || this.Type == "number") && obj) {
|
|
2161
2071
|
obj = obj.toString().replace(".", ",");
|
|
2072
|
+
this.EvaluatedModel = obj;
|
|
2073
|
+
}
|
|
2162
2074
|
// Per sicurezza riallineo i valori
|
|
2163
2075
|
else if (this.Type == "boolean") {
|
|
2164
2076
|
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2165
2077
|
this.alignValues = true;
|
|
2078
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2166
2079
|
}
|
|
2167
2080
|
else if (this.Type == "time") {
|
|
2168
|
-
const [hours, minutes, seconds] = (obj || "
|
|
2169
|
-
obj = dayjs().hour(hours !== null && hours !== void 0 ? hours : 0).minute(minutes !== null && minutes !== void 0 ? minutes : 0).second(seconds !== null && seconds !== void 0 ? seconds : 0);
|
|
2081
|
+
const [hours, minutes, seconds] = (obj || "00:00:00").split(":");
|
|
2082
|
+
obj = dayjs().hour(parseInt(hours !== null && hours !== void 0 ? hours : 0)).minute(parseInt(minutes !== null && minutes !== void 0 ? minutes : 0)).second(parseInt(seconds !== null && seconds !== void 0 ? seconds : 0));
|
|
2083
|
+
this.EvaluatedModel = `${hours || '00'}:${minutes || '00'}:${seconds || '00'}`;
|
|
2170
2084
|
}
|
|
2171
|
-
else if (this.Type == "file")
|
|
2085
|
+
else if (this.Type == "file") {
|
|
2172
2086
|
obj = this.ModelFile;
|
|
2087
|
+
this.EvaluatedModel = this.ModelFile.filename;
|
|
2088
|
+
}
|
|
2173
2089
|
else if (this.Type == "autocomplete") {
|
|
2174
2090
|
if (this.SearchFunction) {
|
|
2175
2091
|
this.SearchFunction(obj, true).subscribe(t => {
|
|
@@ -2182,6 +2098,8 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2182
2098
|
else
|
|
2183
2099
|
this.finalizeValue(obj);
|
|
2184
2100
|
}
|
|
2101
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
2102
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(t => t.id == obj)) === null || _a === void 0 ? void 0 : _a.description;
|
|
2185
2103
|
super.writeValue(obj);
|
|
2186
2104
|
if (this.alignValues) {
|
|
2187
2105
|
this.changed();
|
|
@@ -2197,6 +2115,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2197
2115
|
var val = this.Source.find(t => t.id == value);
|
|
2198
2116
|
this.propagateChange(val ? val.id : value);
|
|
2199
2117
|
this.Model = val ? val.description : value;
|
|
2118
|
+
this.EvaluatedModel = this.Model;
|
|
2200
2119
|
}
|
|
2201
2120
|
/**
|
|
2202
2121
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -2239,9 +2158,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2239
2158
|
}, 100);
|
|
2240
2159
|
}
|
|
2241
2160
|
}
|
|
2242
|
-
/**
|
|
2243
|
-
* Metodo richiamato quando viene modificato il modello del campo di input
|
|
2244
|
-
*/
|
|
2161
|
+
/** Metodo richiamato quando viene modificato il modello del campo di input */
|
|
2245
2162
|
changed() {
|
|
2246
2163
|
var toEmit = this.getModelToEmit();
|
|
2247
2164
|
if (this.Type == "autocomplete")
|
|
@@ -2249,18 +2166,15 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2249
2166
|
if (this.EmitPendingChanges)
|
|
2250
2167
|
super.changed(toEmit);
|
|
2251
2168
|
}
|
|
2169
|
+
/** @ignore */
|
|
2252
2170
|
finalized() {
|
|
2253
2171
|
super.finalized();
|
|
2254
2172
|
}
|
|
2255
|
-
/**
|
|
2256
|
-
* Metodo richiamato quando viene selezionato il campo col mouse
|
|
2257
|
-
*/
|
|
2173
|
+
/** Metodo richiamato quando viene selezionato il campo col mouse */
|
|
2258
2174
|
focused(event) {
|
|
2259
2175
|
super.focused(event);
|
|
2260
2176
|
}
|
|
2261
|
-
/**
|
|
2262
|
-
* Effettua gli aggiustamenti dati del caso ed emette il modello corretto
|
|
2263
|
-
*/
|
|
2177
|
+
/** Effettua gli aggiustamenti dati del caso ed emette il modello corretto */
|
|
2264
2178
|
getModelToEmit() {
|
|
2265
2179
|
var toEmit = this.Model ?
|
|
2266
2180
|
(this.Type == "time" || this.useJsDates ?
|
|
@@ -2302,16 +2216,12 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2302
2216
|
}
|
|
2303
2217
|
this.changed();
|
|
2304
2218
|
}
|
|
2305
|
-
/**
|
|
2306
|
-
* Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente
|
|
2307
|
-
*/
|
|
2219
|
+
/** Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente */
|
|
2308
2220
|
downloadAttachment() {
|
|
2309
2221
|
let model = this.Model;
|
|
2310
2222
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
2311
2223
|
}
|
|
2312
|
-
/**
|
|
2313
|
-
* @ignore
|
|
2314
|
-
*/
|
|
2224
|
+
/** @ignore */
|
|
2315
2225
|
onNotNullValueSet() { }
|
|
2316
2226
|
/** @ignore */
|
|
2317
2227
|
throttla(id, func, throttleTime) {
|
|
@@ -2326,7 +2236,7 @@ FormAdaptiveComponent.decorators = [
|
|
|
2326
2236
|
{ type: Component, args: [{
|
|
2327
2237
|
selector: "form-adaptive",
|
|
2328
2238
|
providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }],
|
|
2329
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2239
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2330
2240
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2331
2241
|
styles: [".frm-padding-left-22{padding-left:22px}"]
|
|
2332
2242
|
},] }
|
|
@@ -2341,7 +2251,8 @@ FormAdaptiveComponent.ctorParameters = () => [
|
|
|
2341
2251
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
2342
2252
|
{ type: AccessControlService },
|
|
2343
2253
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2344
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2254
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2255
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2345
2256
|
];
|
|
2346
2257
|
FormAdaptiveComponent.propDecorators = {
|
|
2347
2258
|
Type: [{ type: Input }],
|
|
@@ -2363,17 +2274,11 @@ FormAdaptiveComponent.propDecorators = {
|
|
|
2363
2274
|
*/
|
|
2364
2275
|
class FormEmptyComponent {
|
|
2365
2276
|
constructor() {
|
|
2366
|
-
/**
|
|
2367
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2368
|
-
*/
|
|
2277
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2369
2278
|
this.Last = false;
|
|
2370
|
-
/**
|
|
2371
|
-
* Classe extra per il form-group in cui viene wrappato l'input finto
|
|
2372
|
-
*/
|
|
2279
|
+
/** Classe extra per il form-group in cui viene wrappato l'input finto */
|
|
2373
2280
|
this.FormGroupClass = "";
|
|
2374
|
-
/**
|
|
2375
|
-
* Valore placeholder da mostrare
|
|
2376
|
-
*/
|
|
2281
|
+
/** Valore placeholder da mostrare */
|
|
2377
2282
|
this.PlaceholderModel = "Placeholder";
|
|
2378
2283
|
}
|
|
2379
2284
|
}
|
|
@@ -2396,42 +2301,24 @@ FormEmptyComponent.propDecorators = {
|
|
|
2396
2301
|
*/
|
|
2397
2302
|
class FormTemplateComponent {
|
|
2398
2303
|
constructor() {
|
|
2399
|
-
/**
|
|
2400
|
-
* Indica se l'input è obbligatorio o no
|
|
2401
|
-
*/
|
|
2304
|
+
/** Indica se l'input è obbligatorio o no */
|
|
2402
2305
|
this.Required = false;
|
|
2403
|
-
/**
|
|
2404
|
-
* Mostra un testo a sinistra dell'input, **FormLayout** permettendo
|
|
2405
|
-
*/
|
|
2306
|
+
/** Mostra un testo a sinistra dell'input, **FormLayout** permettendo */
|
|
2406
2307
|
this.Label = "";
|
|
2407
|
-
/**
|
|
2408
|
-
* Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top
|
|
2409
|
-
*/
|
|
2308
|
+
/** Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top */
|
|
2410
2309
|
this.LabelClass = "m-t-5";
|
|
2411
|
-
/**
|
|
2412
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
2413
|
-
*/
|
|
2310
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
2414
2311
|
this.FormLayout = true;
|
|
2415
|
-
/**
|
|
2416
|
-
* col-md-X per la label
|
|
2417
|
-
*/
|
|
2312
|
+
/** col-md-X per la label */
|
|
2418
2313
|
this.LabelColWidth = 4;
|
|
2419
|
-
/**
|
|
2420
|
-
* col-md-X per l'input
|
|
2421
|
-
*/
|
|
2314
|
+
/** col-md-X per l'input */
|
|
2422
2315
|
this.InputColWidth = 8;
|
|
2423
|
-
/**
|
|
2424
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2425
|
-
*/
|
|
2316
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2426
2317
|
this.Last = false;
|
|
2427
|
-
/**
|
|
2428
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2429
|
-
*/
|
|
2318
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2430
2319
|
this.FormGroupClass = "";
|
|
2431
2320
|
}
|
|
2432
|
-
/**
|
|
2433
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2434
|
-
*/
|
|
2321
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2435
2322
|
set LabelInputRatio(input) {
|
|
2436
2323
|
var ratio = input.split(/\s/);
|
|
2437
2324
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2464,26 +2351,16 @@ FormTemplateComponent.propDecorators = {
|
|
|
2464
2351
|
*/
|
|
2465
2352
|
class FormErrorComponent {
|
|
2466
2353
|
constructor() {
|
|
2467
|
-
/**
|
|
2468
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2469
|
-
*/
|
|
2354
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2470
2355
|
this.LabelColWidth = 4;
|
|
2471
|
-
/**
|
|
2472
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2473
|
-
*/
|
|
2356
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2474
2357
|
this.InputColWidth = 8;
|
|
2475
|
-
/**
|
|
2476
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2477
|
-
*/
|
|
2358
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2478
2359
|
this.Last = false;
|
|
2479
|
-
/**
|
|
2480
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2481
|
-
*/
|
|
2360
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2482
2361
|
this.FormGroupClass = "";
|
|
2483
2362
|
}
|
|
2484
|
-
/**
|
|
2485
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2486
|
-
*/
|
|
2363
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2487
2364
|
set LabelInputRatio(input) {
|
|
2488
2365
|
var ratio = input.split(/\s/);
|
|
2489
2366
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2512,26 +2389,16 @@ FormErrorComponent.propDecorators = {
|
|
|
2512
2389
|
*/
|
|
2513
2390
|
class FormInfoComponent {
|
|
2514
2391
|
constructor() {
|
|
2515
|
-
/**
|
|
2516
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2517
|
-
*/
|
|
2392
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2518
2393
|
this.LabelColWidth = 4;
|
|
2519
|
-
/**
|
|
2520
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2521
|
-
*/
|
|
2394
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2522
2395
|
this.InputColWidth = 8;
|
|
2523
|
-
/**
|
|
2524
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2525
|
-
*/
|
|
2396
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2526
2397
|
this.Last = false;
|
|
2527
|
-
/**
|
|
2528
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2529
|
-
*/
|
|
2398
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2530
2399
|
this.FormGroupClass = "";
|
|
2531
2400
|
}
|
|
2532
|
-
/**
|
|
2533
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2534
|
-
*/
|
|
2401
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2535
2402
|
set LabelInputRatio(input) {
|
|
2536
2403
|
var ratio = input.split(/\s/);
|
|
2537
2404
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2554,31 +2421,31 @@ FormInfoComponent.propDecorators = {
|
|
|
2554
2421
|
};
|
|
2555
2422
|
|
|
2556
2423
|
// Angular
|
|
2557
|
-
/**
|
|
2558
|
-
* Componente rappresentante una checkbox
|
|
2559
|
-
*/
|
|
2424
|
+
/** Componente rappresentante una checkbox */
|
|
2560
2425
|
class FormCheckboxComponent extends BaseFormControl {
|
|
2561
|
-
/**
|
|
2562
|
-
|
|
2563
|
-
*
|
|
2564
|
-
* @ignore
|
|
2565
|
-
*/
|
|
2566
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2426
|
+
/** @ignore Costruttore */
|
|
2427
|
+
constructor(lc, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2567
2428
|
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true);
|
|
2429
|
+
this.lc = lc;
|
|
2568
2430
|
}
|
|
2569
|
-
/**
|
|
2570
|
-
|
|
2571
|
-
|
|
2431
|
+
/** @ignore */
|
|
2432
|
+
writeValue(obj) {
|
|
2433
|
+
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2434
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2435
|
+
super.writeValue(obj);
|
|
2436
|
+
}
|
|
2437
|
+
/** @ignore */
|
|
2572
2438
|
onNotNullValueSet() { }
|
|
2573
2439
|
}
|
|
2574
2440
|
FormCheckboxComponent.decorators = [
|
|
2575
2441
|
{ type: Component, args: [{
|
|
2576
2442
|
selector: "form-checkbox",
|
|
2577
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <input class=\"app-pointer\" [disabled]=\"Readonly ? true : null\" type=\"checkbox\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" #validationControl=\"ngModel\" (ngModelChange)=\"changed(); finalized()\" (click)=\"focused($event)\" />\r\n</ng-template>",
|
|
2443
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\" [class.m-t-5]=\"!DisplayMode\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <input class=\"app-pointer\" [disabled]=\"Readonly ? true : null\" type=\"checkbox\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" #validationControl=\"ngModel\" (ngModelChange)=\"changed(); finalized()\" (click)=\"focused($event)\" />\r\n</ng-template>",
|
|
2578
2444
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2579
2445
|
},] }
|
|
2580
2446
|
];
|
|
2581
2447
|
FormCheckboxComponent.ctorParameters = () => [
|
|
2448
|
+
{ type: LocalizationService },
|
|
2582
2449
|
{ type: ChangeDetectorRef },
|
|
2583
2450
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
|
2584
2451
|
{ type: Array, decorators: [{ type: Optional }, { type: Host }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
@@ -2588,95 +2455,78 @@ FormCheckboxComponent.ctorParameters = () => [
|
|
|
2588
2455
|
];
|
|
2589
2456
|
|
|
2590
2457
|
// Angular
|
|
2591
|
-
/**
|
|
2592
|
-
* Componente che dà all'utente la possibilità di selezionare una data
|
|
2593
|
-
*/
|
|
2458
|
+
/** Componente che dà all'utente la possibilità di selezionare una data */
|
|
2594
2459
|
class FormDateComponent extends BaseFormControl {
|
|
2595
|
-
/**
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2601
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2602
|
-
/**
|
|
2603
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
2604
|
-
*/
|
|
2460
|
+
/** @ignore Costruttore */
|
|
2461
|
+
constructor(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2462
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2463
|
+
this.datesExts = datesExts;
|
|
2464
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
2605
2465
|
this.JsDates = false;
|
|
2606
2466
|
}
|
|
2607
|
-
/**
|
|
2608
|
-
|
|
2609
|
-
|
|
2467
|
+
/** @ignore */
|
|
2468
|
+
writeValue(obj) {
|
|
2469
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2470
|
+
super.writeValue(obj);
|
|
2471
|
+
}
|
|
2472
|
+
/** @ignore */
|
|
2610
2473
|
onNotNullValueSet() { }
|
|
2611
2474
|
}
|
|
2612
2475
|
FormDateComponent.decorators = [
|
|
2613
2476
|
{ type: Component, args: [{
|
|
2614
2477
|
selector: "form-date",
|
|
2615
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-date [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-date>\r\n</ng-template>",
|
|
2478
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-date [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-date>\r\n</ng-template>",
|
|
2616
2479
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2617
2480
|
},] }
|
|
2618
2481
|
];
|
|
2619
2482
|
FormDateComponent.ctorParameters = () => [
|
|
2483
|
+
{ type: DateService },
|
|
2620
2484
|
{ type: ChangeDetectorRef },
|
|
2621
2485
|
{ type: NgControl, decorators: [{ type: Optional }, { type: Self }] },
|
|
2622
2486
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
2623
2487
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
2624
2488
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2625
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2489
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2490
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2626
2491
|
];
|
|
2627
2492
|
FormDateComponent.propDecorators = {
|
|
2628
2493
|
JsDates: [{ type: Input }]
|
|
2629
2494
|
};
|
|
2630
2495
|
|
|
2631
2496
|
// Angular
|
|
2632
|
-
/**
|
|
2633
|
-
* Semplice componente di Input testuale, con eventuale prefisso/suffisso
|
|
2634
|
-
*/
|
|
2497
|
+
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
2635
2498
|
class FormInputComponent extends BaseFormControl {
|
|
2636
|
-
/**
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
*/
|
|
2641
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2642
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2643
|
-
/**
|
|
2644
|
-
* Indica se l'input relativo è di tipo Password
|
|
2645
|
-
*/
|
|
2499
|
+
/** @ignore Costruttore */
|
|
2500
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2501
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2502
|
+
/** Indica se l'input relativo è di tipo Password */
|
|
2646
2503
|
this.Password = false;
|
|
2647
|
-
/**
|
|
2648
|
-
* Delegato per l'esecuzione di un'operazione al click del suffisso
|
|
2649
|
-
*/
|
|
2504
|
+
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
2650
2505
|
this.onSuffixAction = new EventEmitter();
|
|
2651
|
-
/**
|
|
2652
|
-
* Delegato per l'esecuzione di un'operazione al click del prefisso
|
|
2653
|
-
*/
|
|
2506
|
+
/** Delegato per l'esecuzione di un'operazione al click del prefisso */
|
|
2654
2507
|
this.onPrefixAction = new EventEmitter();
|
|
2655
|
-
/**
|
|
2656
|
-
* Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix**
|
|
2657
|
-
*/
|
|
2508
|
+
/** Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix** */
|
|
2658
2509
|
this.HasSuffix = false;
|
|
2659
|
-
/**
|
|
2660
|
-
* Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix**
|
|
2661
|
-
*/
|
|
2510
|
+
/** Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix** */
|
|
2662
2511
|
this.HasPrefix = false;
|
|
2663
2512
|
}
|
|
2664
|
-
/**
|
|
2665
|
-
|
|
2666
|
-
|
|
2513
|
+
/** @ignore */
|
|
2514
|
+
writeValue(obj) {
|
|
2515
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
2516
|
+
super.writeValue(obj);
|
|
2517
|
+
}
|
|
2518
|
+
/** @ignore */
|
|
2667
2519
|
ngAfterContentInit() {
|
|
2668
2520
|
this.HasSuffix = !!this.suffix;
|
|
2669
2521
|
this.HasPrefix = !!this.prefix;
|
|
2670
2522
|
}
|
|
2671
|
-
/**
|
|
2672
|
-
* @ignore
|
|
2673
|
-
*/
|
|
2523
|
+
/** @ignore */
|
|
2674
2524
|
onNotNullValueSet() { }
|
|
2675
2525
|
}
|
|
2676
2526
|
FormInputComponent.decorators = [
|
|
2677
2527
|
{ type: Component, args: [{
|
|
2678
2528
|
selector: "form-input",
|
|
2679
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-input [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Password]=\"Password\">\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <ng-template #suffix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-suffix\"\r\n matSuffix (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-template #prefix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-prefix\"\r\n matPrefix (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </val-input>\r\n</ng-template>",
|
|
2529
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-input [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Password]=\"Password\">\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <ng-template #suffix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-suffix\"\r\n matSuffix (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-template #prefix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-prefix\"\r\n matPrefix (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </val-input>\r\n</ng-template>",
|
|
2680
2530
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2681
2531
|
},] }
|
|
2682
2532
|
];
|
|
@@ -2686,7 +2536,8 @@ FormInputComponent.ctorParameters = () => [
|
|
|
2686
2536
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
2687
2537
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
2688
2538
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2689
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2539
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2540
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2690
2541
|
];
|
|
2691
2542
|
FormInputComponent.propDecorators = {
|
|
2692
2543
|
Password: [{ type: Input }],
|
|
@@ -2715,21 +2566,13 @@ FormSelectComponentLoc.ctorParameters = () => [
|
|
|
2715
2566
|
];
|
|
2716
2567
|
|
|
2717
2568
|
// Angular
|
|
2718
|
-
/**
|
|
2719
|
-
* Componente che permette di selezionare un valore da una lista di valori disponibili
|
|
2720
|
-
*/
|
|
2569
|
+
/** Componente che permette di selezionare un valore da una lista di valori disponibili */
|
|
2721
2570
|
class FormSelectComponent extends BaseFormControl {
|
|
2722
|
-
/**
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
* @ignore
|
|
2726
|
-
*/
|
|
2727
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2728
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2571
|
+
/** @ignore Costruttore */
|
|
2572
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2573
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2729
2574
|
this.lc = lc;
|
|
2730
|
-
/**
|
|
2731
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
2732
|
-
*/
|
|
2575
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
2733
2576
|
this.SelectLabel = "";
|
|
2734
2577
|
/**
|
|
2735
2578
|
* Permette al componente di considerare questo valore come "valore placeholder"
|
|
@@ -2737,9 +2580,7 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2737
2580
|
* Si consiglia di mantenere il default
|
|
2738
2581
|
*/
|
|
2739
2582
|
this.PlaceholderValue = '';
|
|
2740
|
-
/**
|
|
2741
|
-
* Override del placeholder per select requried
|
|
2742
|
-
*/
|
|
2583
|
+
/** Override del placeholder per select requried */
|
|
2743
2584
|
this.RequiredPlaceholder = null;
|
|
2744
2585
|
/**
|
|
2745
2586
|
* Permette al componente di considerare questo valore come "valore vuoto"
|
|
@@ -2747,14 +2588,10 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2747
2588
|
* Si consiglia di mantenere il default
|
|
2748
2589
|
*/
|
|
2749
2590
|
this.EmptyFieldValue = '-2';
|
|
2750
|
-
/**
|
|
2751
|
-
* Se **true** rimuove il simbolino di validazione (croce rossa o tick verde)
|
|
2752
|
-
*/
|
|
2591
|
+
/** Se **true** rimuove il simbolino di validazione (croce rossa o tick verde) */
|
|
2753
2592
|
this.ShowValidationSymbol = true;
|
|
2754
2593
|
}
|
|
2755
|
-
/**
|
|
2756
|
-
* @ignore
|
|
2757
|
-
*/
|
|
2594
|
+
/** @ignore */
|
|
2758
2595
|
ngOnChanges(changes) {
|
|
2759
2596
|
let newSource = changes["Source"];
|
|
2760
2597
|
if (!newSource)
|
|
@@ -2799,6 +2636,7 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2799
2636
|
this.cdr.markForCheck();
|
|
2800
2637
|
}
|
|
2801
2638
|
}
|
|
2639
|
+
/** @ignore */
|
|
2802
2640
|
detatchPreviousAndRetatchNext(doStuff) {
|
|
2803
2641
|
if (this.validationControl && this.Form)
|
|
2804
2642
|
this.Form.removeControl(this.validationControl);
|
|
@@ -2809,21 +2647,28 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2809
2647
|
else if (this.validationControl && this.Form) {
|
|
2810
2648
|
this.Form.addControl(this.validationControl);
|
|
2811
2649
|
}
|
|
2812
|
-
else
|
|
2650
|
+
else if (!this.validationControl && this.Form) {
|
|
2651
|
+
// Questo messaggio ha senso solo se almeno il form esiste... se non esiste sticazzi insomma...
|
|
2813
2652
|
console.error(`Impossibile aggiungere il componente di validaazione per ${this.GeneratedName}, le validazioni potrebbero funzionare in maniera erratica`);
|
|
2653
|
+
}
|
|
2814
2654
|
});
|
|
2815
2655
|
});
|
|
2816
2656
|
}
|
|
2817
|
-
/**
|
|
2818
|
-
|
|
2819
|
-
|
|
2657
|
+
/** @ignore */
|
|
2658
|
+
writeValue(obj) {
|
|
2659
|
+
var _a;
|
|
2660
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
2661
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(t => t.id == obj)) === null || _a === void 0 ? void 0 : _a.description;
|
|
2662
|
+
super.writeValue(obj);
|
|
2663
|
+
}
|
|
2664
|
+
/** @ignore */
|
|
2820
2665
|
onNotNullValueSet() { }
|
|
2821
2666
|
}
|
|
2822
2667
|
FormSelectComponent.decorators = [
|
|
2823
2668
|
{ type: Component, args: [{
|
|
2824
2669
|
selector: "form-select",
|
|
2825
2670
|
providers: [{ provide: LocalizationService, useClass: FormSelectComponentLoc }],
|
|
2826
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <!-- Select vuota per quando non ho Sorgenti dati da cui selezionare. Uguale identica alla piena ma senza option\r\n Purtroppo devono essere due componenti distinti perch\u00E9 una select una volta creata non riesce pi\u00F9 ad adattarsi ai cambi di options -->\r\n <val-select *ngIf=\"!BoundSource || BoundSource.length == 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_zero\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n #validationControl=\"ngModel\">\r\n </val-select>\r\n\r\n <!-- Select vera e propria per quando arrivano i dati -->\r\n <val-select *ngIf=\"BoundSource && BoundSource.length > 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_filled\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n #validationControl=\"ngModel\">\r\n <option *ngFor=\"let obj of BoundSource\" [value]=\"obj.id\">{{obj.description}}</option>\r\n </val-select>\r\n</ng-template>",
|
|
2671
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <!-- Select vuota per quando non ho Sorgenti dati da cui selezionare. Uguale identica alla piena ma senza option\r\n Purtroppo devono essere due componenti distinti perch\u00E9 una select una volta creata non riesce pi\u00F9 ad adattarsi ai cambi di options -->\r\n <val-select *ngIf=\"!BoundSource || BoundSource.length == 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_zero\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n #validationControl=\"ngModel\">\r\n </val-select>\r\n\r\n <!-- Select vera e propria per quando arrivano i dati -->\r\n <val-select *ngIf=\"BoundSource && BoundSource.length > 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_filled\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n #validationControl=\"ngModel\">\r\n <option *ngFor=\"let obj of BoundSource\" [value]=\"obj.id\">{{obj.description}}</option>\r\n </val-select>\r\n</ng-template>",
|
|
2827
2672
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
2828
2673
|
},] }
|
|
2829
2674
|
];
|
|
@@ -2834,7 +2679,8 @@ FormSelectComponent.ctorParameters = () => [
|
|
|
2834
2679
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
2835
2680
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
2836
2681
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
2837
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2682
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2683
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2838
2684
|
];
|
|
2839
2685
|
FormSelectComponent.propDecorators = {
|
|
2840
2686
|
SelectLabel: [{ type: Input }],
|
|
@@ -2872,13 +2718,9 @@ FormMultiSelectComponentLoc.ctorParameters = () => [
|
|
|
2872
2718
|
* utilizzato internamente (angular2-multiselect) non è stato assolutamente pensato per essere usato con **ChangeDetectionStrategy.OnPush**
|
|
2873
2719
|
*/
|
|
2874
2720
|
class FormMultiSelectComponent extends BaseFormControl {
|
|
2875
|
-
/**
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
* @ignore
|
|
2879
|
-
*/
|
|
2880
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2881
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2721
|
+
/** @ignore Costruttore */
|
|
2722
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2723
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2882
2724
|
this.lc = lc;
|
|
2883
2725
|
/**
|
|
2884
2726
|
* Modello temporaneo **NON** compatibile in maniera diretta con il componente **angular2-multiselect** usato internamente
|
|
@@ -2886,28 +2728,18 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
2886
2728
|
* Serve da appoggio per effettuare un re-bind qualora la sorgente cambiasse e qualora **RebindModelAfterSource** fosse true
|
|
2887
2729
|
*/
|
|
2888
2730
|
this.TmpModel = [];
|
|
2889
|
-
/**
|
|
2890
|
-
* Indica se la prossima modifica alla Source deve anche effettuare un re-bind del modello. Serve se la **BoundSource** passa da non avere oggetti ad averne
|
|
2891
|
-
*/
|
|
2731
|
+
/** Indica se la prossima modifica alla Source deve anche effettuare un re-bind del modello. Serve se la **BoundSource** passa da non avere oggetti ad averne */
|
|
2892
2732
|
this.RebindModelAfterSource = false;
|
|
2893
|
-
/**
|
|
2894
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
2895
|
-
*/
|
|
2733
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
2896
2734
|
this.SelectLabel = "";
|
|
2897
|
-
/**
|
|
2898
|
-
* Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue
|
|
2899
|
-
*/
|
|
2735
|
+
/** Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue */
|
|
2900
2736
|
this.UseKeyValues = false;
|
|
2901
|
-
/**
|
|
2902
|
-
* Impostazioni del componente interno **angular2-multiselect**
|
|
2903
|
-
*/
|
|
2737
|
+
/** Impostazioni del componente interno **angular2-multiselect** */
|
|
2904
2738
|
this.Settings = null;
|
|
2905
2739
|
// Default dei settings per evitare che siano mai nulli, altrimenti il cazzo di CuppaLab salta in araia che è veramente una bellezza
|
|
2906
2740
|
this.evaluateSettings(false);
|
|
2907
2741
|
}
|
|
2908
|
-
/**
|
|
2909
|
-
* @ignore
|
|
2910
|
-
*/
|
|
2742
|
+
/** @ignore */
|
|
2911
2743
|
ngOnChanges(changes) {
|
|
2912
2744
|
var _a, _b;
|
|
2913
2745
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2939,9 +2771,7 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
2939
2771
|
tagToBody: false
|
|
2940
2772
|
};
|
|
2941
2773
|
}
|
|
2942
|
-
/**
|
|
2943
|
-
* @ignore
|
|
2944
|
-
*/
|
|
2774
|
+
/** @ignore */
|
|
2945
2775
|
onNotNullValueSet() { }
|
|
2946
2776
|
/**
|
|
2947
2777
|
* Indica se il comopnente in questione è in grado di gestire ngControl nulli.
|
|
@@ -2952,9 +2782,7 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
2952
2782
|
handleNullNgControl() {
|
|
2953
2783
|
return true;
|
|
2954
2784
|
}
|
|
2955
|
-
/**
|
|
2956
|
-
* @ignore Override per gestire input in ingresso
|
|
2957
|
-
*/
|
|
2785
|
+
/** @ignore Override per gestire input in ingresso */
|
|
2958
2786
|
writeValue(obj) {
|
|
2959
2787
|
this.TmpModel = obj;
|
|
2960
2788
|
let toPass = [];
|
|
@@ -2969,11 +2797,10 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
2969
2797
|
this.RebindModelAfterSource = true;
|
|
2970
2798
|
});
|
|
2971
2799
|
}
|
|
2800
|
+
this.EvaluatedModel = toPass.map(t => t.description).join(', ');
|
|
2972
2801
|
super.writeValue(toPass);
|
|
2973
2802
|
}
|
|
2974
|
-
/**
|
|
2975
|
-
* @ignore Override per gestire input in uscita
|
|
2976
|
-
*/
|
|
2803
|
+
/** @ignore Override per gestire input in uscita */
|
|
2977
2804
|
changed() {
|
|
2978
2805
|
let toEmit = null;
|
|
2979
2806
|
if (!this.UseKeyValues)
|
|
@@ -2988,7 +2815,7 @@ FormMultiSelectComponent.decorators = [
|
|
|
2988
2815
|
{ type: Component, args: [{
|
|
2989
2816
|
selector: "form-multiselect",
|
|
2990
2817
|
viewProviders: [{ provide: LocalizationService, useClass: FormMultiSelectComponentLoc }],
|
|
2991
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div [class.ms-placeholder]=\"!Model || Model.length == 0\" (click)=\"focused($event)\">\r\n <angular2-multiselect #validationControl=\"ngModel\" type=\"text\"\r\n [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\"\r\n [settings]=\"Settings\" [data]=\"BoundSource\"\r\n (onSelect)=\"changed();\" \r\n (onDeSelect)=\"changed();\" \r\n (onSelectAll)=\"changed();\"\r\n (onDeSelectAll)=\"changed();\" \r\n (onDeSelectAll)=\"Model = []; changed();\">\r\n </angular2-multiselect>\r\n </div>\r\n</ng-template>",
|
|
2818
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div [class.ms-placeholder]=\"!Model || Model.length == 0\" (click)=\"focused($event)\">\r\n <angular2-multiselect #validationControl=\"ngModel\" type=\"text\"\r\n [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\"\r\n [settings]=\"Settings\" [data]=\"BoundSource\"\r\n (onSelect)=\"changed();\" \r\n (onDeSelect)=\"changed();\" \r\n (onSelectAll)=\"changed();\"\r\n (onDeSelectAll)=\"changed();\" \r\n (onDeSelectAll)=\"Model = []; changed();\">\r\n </angular2-multiselect>\r\n </div>\r\n</ng-template>",
|
|
2992
2819
|
encapsulation: ViewEncapsulation.None,
|
|
2993
2820
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
2994
2821
|
styles: [".c-btn{background:#fff;border:1px solid #ccc;color:#333}.selected-list .c-list .c-token{background:#415269}.selected-list .c-list .c-token .c-label{color:#fff}.selected-list .c-list .c-token .c-remove svg{fill:#fff}.selected-list .c-angle-down svg,.selected-list .c-angle-up svg{fill:#333}.dropdown-list ul li:hover{background:#f5f5f5}.arrow-down,.arrow-up{border-bottom:15px solid #fff}.arrow-2{border-bottom:15px solid #ccc}.list-area{border:1px solid #ccc;background:#fff;box-shadow:0 1px 5px #959595}.list-filter,.select-all{border-bottom:1px solid #ccc}.list-filter .c-clear svg,.list-filter .c-search svg{fill:#888}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:#415269;background-color:#f2f2f2}.pure-checkbox input[type=checkbox]+label{color:#000}.pure-checkbox input[type=checkbox]+label:before{color:#415269;border:1px solid #415269}.pure-checkbox input[type=checkbox]+label:after{background-color:#415269}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=checkbox]+label:after{border-color:#fff}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=checkbox]:checked+label:before{background:#415269}.single-select-mode .pure-checkbox input[type=checkbox]:focus+label:before,.single-select-mode .pure-checkbox input[type=checkbox]:hover+label:before{border-color:#415269;background-color:#f2f2f2}.single-select-mode .pure-checkbox input[type=checkbox]+label{color:#000}.single-select-mode .pure-checkbox input[type=checkbox]+label:before{color:transparent!important;border:0 solid #415269}.single-select-mode .pure-checkbox input[type=checkbox]+label:after{background-color:transparent!important}.single-select-mode .pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.single-select-mode .pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.single-select-mode .pure-checkbox input[type=checkbox]+label:after{border-color:#415269}.single-select-mode .pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.single-select-mode .pure-checkbox input[type=checkbox]:checked+label:before{background:none!important}.selected-item{background:#e9f4ff}.btn-iceblue{background:#415269;border:1px solid #ccc;color:#fff}.cuppa-dropdown{margin-top:2px;min-width:200px}.cuppa-dropdown .c-btn{min-height:34px}.cuppa-dropdown .c-angle-down,.cuppa-dropdown .c-angle-up{margin-top:-2px}.selected-list .c-list{width:auto!important;padding-right:35px!important;margin-top:-2px!important}.selected-list .c-list .c-token{padding:3px 22px 3px 8px!important}.ms-placeholder .cuppa-dropdown .selected-list>div>span{color:#aaa}"]
|
|
@@ -3001,7 +2828,8 @@ FormMultiSelectComponent.ctorParameters = () => [
|
|
|
3001
2828
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
3002
2829
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
3003
2830
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
3004
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2831
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2832
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3005
2833
|
];
|
|
3006
2834
|
FormMultiSelectComponent.propDecorators = {
|
|
3007
2835
|
SelectLabel: [{ type: Input }],
|
|
@@ -3009,27 +2837,24 @@ FormMultiSelectComponent.propDecorators = {
|
|
|
3009
2837
|
};
|
|
3010
2838
|
|
|
3011
2839
|
// Angular
|
|
3012
|
-
/**
|
|
3013
|
-
* Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve
|
|
3014
|
-
*/
|
|
2840
|
+
/** Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve */
|
|
3015
2841
|
class FormTextareaComponent extends BaseFormControl {
|
|
3016
|
-
/**
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
* @ignore
|
|
3020
|
-
*/
|
|
3021
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3022
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2842
|
+
/** @ignore Costruttore */
|
|
2843
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2844
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
3023
2845
|
}
|
|
3024
|
-
/**
|
|
3025
|
-
|
|
3026
|
-
|
|
2846
|
+
/** @ignore */
|
|
2847
|
+
writeValue(obj) {
|
|
2848
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
2849
|
+
super.writeValue(obj);
|
|
2850
|
+
}
|
|
2851
|
+
/** @ignore */
|
|
3027
2852
|
onNotNullValueSet() { }
|
|
3028
2853
|
}
|
|
3029
2854
|
FormTextareaComponent.decorators = [
|
|
3030
2855
|
{ type: Component, args: [{
|
|
3031
2856
|
selector: "form-textarea",
|
|
3032
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-textarea \r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\" \r\n [submitted]=\"Form?.submitted\" \r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\" \r\n [rows]=\"Rows\" \r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\" \r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\" \r\n autocomplete=\"off\" \r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\" \r\n #validationControl=\"ngModel\" \r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n >\r\n </val-textarea>\r\n</ng-template>",
|
|
2857
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-textarea \r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\" \r\n [submitted]=\"Form?.submitted\" \r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\" \r\n [rows]=\"Rows\" \r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\" \r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\" \r\n autocomplete=\"off\" \r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\" \r\n #validationControl=\"ngModel\" \r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n >\r\n </val-textarea>\r\n</ng-template>",
|
|
3033
2858
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3034
2859
|
},] }
|
|
3035
2860
|
];
|
|
@@ -3039,7 +2864,8 @@ FormTextareaComponent.ctorParameters = () => [
|
|
|
3039
2864
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
3040
2865
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
3041
2866
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
3042
|
-
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2867
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2868
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3043
2869
|
];
|
|
3044
2870
|
FormTextareaComponent.propDecorators = {
|
|
3045
2871
|
Rows: [{ type: Input }]
|
|
@@ -3064,55 +2890,35 @@ FormAutocompleteComponentLoc.ctorParameters = () => [
|
|
|
3064
2890
|
];
|
|
3065
2891
|
|
|
3066
2892
|
// Angular
|
|
3067
|
-
/**
|
|
3068
|
-
* Componente di input che si auto-completa in base al valore attuale
|
|
3069
|
-
*/
|
|
2893
|
+
/** Componente di input che si auto-completa in base al valore attuale */
|
|
3070
2894
|
class FormAutocompleteComponent extends BaseFormControl {
|
|
3071
|
-
/**
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
* @ignore
|
|
3075
|
-
*/
|
|
3076
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3077
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2895
|
+
/** @ignore Costruttore */
|
|
2896
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2897
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
3078
2898
|
this.lc = lc;
|
|
3079
|
-
/**
|
|
3080
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3081
|
-
*/
|
|
2899
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3082
2900
|
this.SelectLabel = "";
|
|
3083
|
-
/**
|
|
3084
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
3085
|
-
*/
|
|
2901
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
3086
2902
|
this.SearchFunction = null;
|
|
3087
|
-
/**
|
|
3088
|
-
* Numero minimo di caratteri con cui cercare
|
|
3089
|
-
*/
|
|
2903
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
3090
2904
|
this.MinChars = 3;
|
|
3091
|
-
/**
|
|
3092
|
-
* Override del placeholder per select requried
|
|
3093
|
-
*/
|
|
2905
|
+
/** Override del placeholder per select requried */
|
|
3094
2906
|
this.RequiredPlaceholder = null;
|
|
3095
|
-
/**
|
|
3096
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
3097
|
-
*/
|
|
2907
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
3098
2908
|
this.CaseSensitive = false;
|
|
3099
2909
|
/**
|
|
3100
2910
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
3101
2911
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
3102
2912
|
*/
|
|
3103
2913
|
this.ignoreNextWriteValue = false;
|
|
3104
|
-
/**
|
|
3105
|
-
* Sorgente Bindata Filtrata in base al contenuto della casella di testo
|
|
3106
|
-
*/
|
|
2914
|
+
/** Sorgente Bindata Filtrata in base al contenuto della casella di testo */
|
|
3107
2915
|
this.FilteredBoundSource = [];
|
|
3108
2916
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
3109
2917
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
3110
2918
|
/** @ignore */
|
|
3111
2919
|
this.executionTimers = {};
|
|
3112
2920
|
}
|
|
3113
|
-
/**
|
|
3114
|
-
* @ignore
|
|
3115
|
-
*/
|
|
2921
|
+
/** @ignore */
|
|
3116
2922
|
writeValue(value) {
|
|
3117
2923
|
if (!value)
|
|
3118
2924
|
return;
|
|
@@ -3135,6 +2941,7 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3135
2941
|
var val = this.Source.find(t => t.id == value);
|
|
3136
2942
|
this.propagateChange(val ? val.id : value);
|
|
3137
2943
|
this.Model = val ? val.description : value;
|
|
2944
|
+
this.EvaluatedModel = this.Model;
|
|
3138
2945
|
}
|
|
3139
2946
|
/**
|
|
3140
2947
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -3177,9 +2984,7 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3177
2984
|
}, 100);
|
|
3178
2985
|
}
|
|
3179
2986
|
}
|
|
3180
|
-
/**
|
|
3181
|
-
* @ignore
|
|
3182
|
-
*/
|
|
2987
|
+
/** @ignore */
|
|
3183
2988
|
ngOnChanges(changes) {
|
|
3184
2989
|
var _a;
|
|
3185
2990
|
let newSource = changes["Source"];
|
|
@@ -3193,18 +2998,12 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3193
2998
|
this.cdr.markForCheck();
|
|
3194
2999
|
}
|
|
3195
3000
|
}
|
|
3196
|
-
/**
|
|
3197
|
-
* @ignore
|
|
3198
|
-
*
|
|
3199
|
-
* Override che marca anche il prossimo evento di filterSource da ignorare
|
|
3200
|
-
*/
|
|
3001
|
+
/** @ignore Override che marca anche il prossimo evento di filterSource da ignorare */
|
|
3201
3002
|
changed(forcedValue = null, markForCheck = false) {
|
|
3202
3003
|
this.ignoreNextWriteValue = true;
|
|
3203
3004
|
super.changed(forcedValue, markForCheck);
|
|
3204
3005
|
}
|
|
3205
|
-
/**
|
|
3206
|
-
* @ignore
|
|
3207
|
-
*/
|
|
3006
|
+
/** @ignore */
|
|
3208
3007
|
onNotNullValueSet() { }
|
|
3209
3008
|
/** @ignore */
|
|
3210
3009
|
throttla(id, func, throttleTime) {
|
|
@@ -3218,7 +3017,7 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3218
3017
|
FormAutocompleteComponent.decorators = [
|
|
3219
3018
|
{ type: Component, args: [{
|
|
3220
3019
|
selector: "form-autocomplete",
|
|
3221
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-autocomplete [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [label]=\"SelectLabel\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"filterSource($event);\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n (optionChange)=\"changed($event);\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [FilteredSource]=\"FilteredBoundSource\"\r\n >\r\n </val-autocomplete>\r\n</ng-template>",
|
|
3020
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-autocomplete [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [label]=\"SelectLabel\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"filterSource($event);\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n (optionChange)=\"changed($event);\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [FilteredSource]=\"FilteredBoundSource\"\r\n >\r\n </val-autocomplete>\r\n</ng-template>",
|
|
3222
3021
|
providers: [{ provide: LocalizationService, useClass: FormAutocompleteComponentLoc }],
|
|
3223
3022
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3224
3023
|
},] }
|
|
@@ -3230,7 +3029,8 @@ FormAutocompleteComponent.ctorParameters = () => [
|
|
|
3230
3029
|
{ type: Array, decorators: [{ type: Optional }, { type: Inject, args: [NG_VALIDATORS,] }] },
|
|
3231
3030
|
{ type: AccessControlService, decorators: [{ type: Optional }] },
|
|
3232
3031
|
{ type: ComponentContext, decorators: [{ type: Optional }] },
|
|
3233
|
-
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
3032
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3033
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3234
3034
|
];
|
|
3235
3035
|
FormAutocompleteComponent.propDecorators = {
|
|
3236
3036
|
SelectLabel: [{ type: Input }],
|
|
@@ -3241,35 +3041,21 @@ FormAutocompleteComponent.propDecorators = {
|
|
|
3241
3041
|
};
|
|
3242
3042
|
|
|
3243
3043
|
// Angular
|
|
3244
|
-
/**
|
|
3245
|
-
* Componente che identifica la selezione di un orario
|
|
3246
|
-
*/
|
|
3044
|
+
/** Componente che identifica la selezione di un orario */
|
|
3247
3045
|
class FormTimeComponent extends BaseFormControl {
|
|
3248
|
-
/**
|
|
3249
|
-
* @ignore
|
|
3250
|
-
*/
|
|
3046
|
+
/** @ignore */
|
|
3251
3047
|
constructor(cdr, dateAdapter, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3252
3048
|
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true);
|
|
3253
3049
|
this.dateAdapter = dateAdapter;
|
|
3254
|
-
/**
|
|
3255
|
-
* Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi)
|
|
3256
|
-
*/
|
|
3050
|
+
/** Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi) */
|
|
3257
3051
|
this.ShowSpinners = false;
|
|
3258
|
-
/**
|
|
3259
|
-
* Imposta lo step (minimo avanzamento) per la cella "ore"
|
|
3260
|
-
*/
|
|
3052
|
+
/** Imposta lo step (minimo avanzamento) per la cella "ore" */
|
|
3261
3053
|
this.StepHour = 1;
|
|
3262
|
-
/**
|
|
3263
|
-
* Imposta lo step (minimo avanzamento) per la cella "minuti"
|
|
3264
|
-
*/
|
|
3054
|
+
/** Imposta lo step (minimo avanzamento) per la cella "minuti" */
|
|
3265
3055
|
this.StepMinute = 1;
|
|
3266
|
-
/**
|
|
3267
|
-
* Imposta lo step (minimo avanzamento) per la cella "secondi"
|
|
3268
|
-
*/
|
|
3056
|
+
/** Imposta lo step (minimo avanzamento) per la cella "secondi" */
|
|
3269
3057
|
this.StepSecond = 5;
|
|
3270
|
-
/**
|
|
3271
|
-
* Indica se mostrare i secondi o meno
|
|
3272
|
-
*/
|
|
3058
|
+
/** Indica se mostrare i secondi o meno */
|
|
3273
3059
|
this.ShowSeconds = false;
|
|
3274
3060
|
/**
|
|
3275
3061
|
* Indica il formato da utilizzare sia in Input che in Output
|
|
@@ -3282,28 +3068,27 @@ class FormTimeComponent extends BaseFormControl {
|
|
|
3282
3068
|
*/
|
|
3283
3069
|
this.InOutFormat = 'timestring';
|
|
3284
3070
|
}
|
|
3285
|
-
/**
|
|
3286
|
-
* @ignore Override per gestire input in ingresso
|
|
3287
|
-
*/
|
|
3071
|
+
/** @ignore Override per gestire input in ingresso */
|
|
3288
3072
|
writeValue(obj) {
|
|
3289
|
-
const [hours, minutes, seconds] = (obj || "0:0:0").split(":");
|
|
3290
3073
|
//Qualsiasi cosa mi arrivi devo ricondurla a un dayjs
|
|
3291
3074
|
switch (this.InOutFormat) {
|
|
3292
3075
|
case 'date':
|
|
3293
3076
|
obj = dayjs(obj);
|
|
3077
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3294
3078
|
break;
|
|
3295
3079
|
case 'timestring':
|
|
3296
|
-
|
|
3080
|
+
const [hours, minutes, seconds] = (obj || "00:00:00").split(":");
|
|
3081
|
+
obj = dayjs().hour(parseInt(hours !== null && hours !== void 0 ? hours : 0)).minute(parseInt(minutes !== null && minutes !== void 0 ? minutes : 0)).second(parseInt(seconds !== null && seconds !== void 0 ? seconds : 0));
|
|
3082
|
+
this.EvaluatedModel = `${hours || '00'}:${minutes || '00'}:${seconds || '00'}`;
|
|
3297
3083
|
break;
|
|
3298
3084
|
case 'dayjs':
|
|
3299
3085
|
obj = obj;
|
|
3086
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3300
3087
|
break;
|
|
3301
3088
|
}
|
|
3302
3089
|
super.writeValue(obj);
|
|
3303
3090
|
}
|
|
3304
|
-
/**
|
|
3305
|
-
* @ignore Override per gestire input in uscita
|
|
3306
|
-
*/
|
|
3091
|
+
/** @ignore Override per gestire input in uscita */
|
|
3307
3092
|
changed() {
|
|
3308
3093
|
var toEmit = this.dateAdapter.clone(this.Model);
|
|
3309
3094
|
switch (this.InOutFormat) {
|
|
@@ -3319,15 +3104,13 @@ class FormTimeComponent extends BaseFormControl {
|
|
|
3319
3104
|
}
|
|
3320
3105
|
super.changed(toEmit);
|
|
3321
3106
|
}
|
|
3322
|
-
/**
|
|
3323
|
-
* @ignore
|
|
3324
|
-
*/
|
|
3107
|
+
/** @ignore */
|
|
3325
3108
|
onNotNullValueSet() { }
|
|
3326
3109
|
}
|
|
3327
3110
|
FormTimeComponent.decorators = [
|
|
3328
3111
|
{ type: Component, args: [{
|
|
3329
3112
|
selector: "form-time",
|
|
3330
|
-
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}} m-t-5\">{{Label}}{{Required ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\">\r\n <ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"ShowSpinners\" [stepHour]=\"StepHour\" [stepMinute]=\"StepMinute\" [stepSecond]=\"StepSecond\"\r\n [showSeconds]=\"ShowSeconds\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n\r\n</ng-template>",
|
|
3113
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"ShowSpinners\" [stepHour]=\"StepHour\" [stepMinute]=\"StepMinute\" [stepSecond]=\"StepSecond\"\r\n [showSeconds]=\"ShowSeconds\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n\r\n</ng-template>",
|
|
3331
3114
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
3332
3115
|
},] }
|
|
3333
3116
|
];
|
|
@@ -3420,6 +3203,7 @@ class FormsAndValidationsModule {
|
|
|
3420
3203
|
ngModule: FormsAndValidationsModule,
|
|
3421
3204
|
providers: [
|
|
3422
3205
|
{ provide: FAV_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
|
|
3206
|
+
{ provide: FAV_DEBUG_MODE, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) != null ? config === null || config === void 0 ? void 0 : config.debugMode : false },
|
|
3423
3207
|
{ provide: ACO_CUSTOMKEY, useValue: (config === null || config === void 0 ? void 0 : config.acocustom) || null },
|
|
3424
3208
|
{ provide: NGX_MAT_DATE_FORMATS, useValue: formats_long },
|
|
3425
3209
|
{ provide: NgxMatDateAdapter, useClass: NgxExpandedDayJsDateAdapter },
|
|
@@ -3443,5 +3227,5 @@ FormsAndValidationsModule.decorators = [
|
|
|
3443
3227
|
* Generated bundle index. Do not edit.
|
|
3444
3228
|
*/
|
|
3445
3229
|
|
|
3446
|
-
export { AppFile, FormAdaptiveComponent, FormAutocompleteComponent, FormCheckboxComponent, FormDateComponent, FormDateTimeComponent, FormEmptyComponent, FormErrorComponent, FormFileComponent, FormInfoComponent, FormInputComponent, FormSelectComponent, FormTemplateComponent, FormTextareaComponent, FormTimeComponent, FormsAndValidationsModule, FormsAndValidationsModuleConfig, NgxExpandedDayJsDateAdapter, ValidationAutocompleteComponent, ValidationCurrencyComponent, ValidationDateComponent, ValidationDateTimeComponent, ValidationInputComponent, ValidationSelectComponent, ValidationTextAreaComponent, BaseValidation as ɵa, BaseValidationLoc as ɵb, FAV_LOCALE as ɵc, ACO_CUSTOMKEY as ɵd,
|
|
3230
|
+
export { AppFile, FormAdaptiveComponent, FormAutocompleteComponent, FormCheckboxComponent, FormDateComponent, FormDateTimeComponent, FormEmptyComponent, FormErrorComponent, FormFileComponent, FormInfoComponent, FormInputComponent, FormSelectComponent, FormTemplateComponent, FormTextareaComponent, FormTimeComponent, FormsAndValidationsModule, FormsAndValidationsModuleConfig, NgxExpandedDayJsDateAdapter, ValidationAutocompleteComponent, ValidationCurrencyComponent, ValidationDateComponent, ValidationDateTimeComponent, ValidationInputComponent, ValidationSelectComponent, ValidationTextAreaComponent, BaseValidation as ɵa, BaseValidationLoc as ɵb, FAV_LOCALE as ɵc, ACO_CUSTOMKEY as ɵd, FAV_DEBUG_MODE as ɵe, CustomRequiredDirective as ɵf, BaseFormControl as ɵg, FormSelectComponentLoc as ɵh, FormAdaptiveComponentLoc as ɵi, FormMultiSelectComponent as ɵj, FormMultiSelectComponentLoc as ɵk, FormFileComponentLoc as ɵl, FormAutocompleteComponentLoc as ɵm };
|
|
3447
3231
|
//# sourceMappingURL=esfaenza-forms-and-validations.js.map
|