@esfaenza/forms-and-validations 13.3.3 → 13.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/forms/base-form-control.mjs +67 -119
- package/esm2020/lib/forms/form-adaptive/form-adaptive.component.mjs +53 -66
- package/esm2020/lib/forms/form-autocomplete/form-autocomplete.component.mjs +25 -47
- package/esm2020/lib/forms/form-checkbox/form-checkbox.component.mjs +21 -21
- package/esm2020/lib/forms/form-date/form-date.component.mjs +30 -28
- package/esm2020/lib/forms/form-datetime/form-datetime.component.mjs +29 -25
- package/esm2020/lib/forms/form-empty/form-empty.component.mjs +4 -10
- package/esm2020/lib/forms/form-error/form-error.component.mjs +6 -16
- package/esm2020/lib/forms/form-file/form-file.component.mjs +21 -31
- package/esm2020/lib/forms/form-info/form-info.component.mjs +6 -16
- package/esm2020/lib/forms/form-input/form-input.component.mjs +26 -36
- package/esm2020/lib/forms/form-multiselect/form-multiselect.component.mjs +22 -36
- package/esm2020/lib/forms/form-select/form-select.component.mjs +33 -34
- package/esm2020/lib/forms/form-template/form-template.component.mjs +10 -28
- package/esm2020/lib/forms/form-textarea/form-textarea.component.mjs +20 -18
- package/esm2020/lib/forms/form-time/form-time.component.mjs +18 -35
- package/esm2020/lib/forms-and-validations.module.mjs +3 -2
- package/esm2020/lib/models/FormsAndValidationsModuleConfig.mjs +1 -1
- package/esm2020/lib/tokens.mjs +5 -7
- package/fesm2015/esfaenza-forms-and-validations.mjs +378 -554
- package/fesm2015/esfaenza-forms-and-validations.mjs.map +1 -1
- package/fesm2020/esfaenza-forms-and-validations.mjs +375 -554
- package/fesm2020/esfaenza-forms-and-validations.mjs.map +1 -1
- package/lib/forms/base-form-control.d.ts +57 -131
- package/lib/forms/form-adaptive/form-adaptive.component.d.ts +26 -73
- package/lib/forms/form-autocomplete/form-autocomplete.component.d.ts +14 -42
- package/lib/forms/form-checkbox/form-checkbox.component.d.ts +9 -13
- package/lib/forms/form-date/form-date.component.d.ts +10 -16
- package/lib/forms/form-datetime/form-datetime.component.d.ts +9 -13
- 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 +10 -28
- package/lib/forms/form-info/form-info.component.d.ts +5 -15
- package/lib/forms/form-input/form-input.component.d.ts +15 -37
- package/lib/forms/form-multiselect/form-multiselect.component.d.ts +11 -31
- package/lib/forms/form-select/form-select.component.d.ts +12 -25
- package/lib/forms/form-template/form-template.component.d.ts +9 -27
- package/lib/forms/form-textarea/form-textarea.component.d.ts +8 -16
- 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
|
@@ -25,7 +25,7 @@ import * as i7 from 'ngx-bootstrap/tooltip';
|
|
|
25
25
|
import { TooltipDirective, TooltipModule } from 'ngx-bootstrap/tooltip';
|
|
26
26
|
import * as i2 from '@angular/material/form-field';
|
|
27
27
|
import * as i1$1 from '@esfaenza/extensions';
|
|
28
|
-
import * as
|
|
28
|
+
import * as i3$1 from '@esfaenza/access-control';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Classe che identifica un file
|
|
@@ -129,14 +129,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
129
129
|
args: [MAT_DATE_LOCALE]
|
|
130
130
|
}] }]; } });
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
134
|
-
*/
|
|
132
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
135
133
|
const FAV_LOCALE = new InjectionToken('FAV_LOCALE');
|
|
136
|
-
/**
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
const
|
|
134
|
+
/** Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale */
|
|
135
|
+
const ACO_CUSTOMKEY = new InjectionToken('ACO_CUSTOMKEY');
|
|
136
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
137
|
+
const FAV_DEBUG_MODE = new InjectionToken('FAV_DEBUG_MODE');
|
|
140
138
|
|
|
141
139
|
// Angular
|
|
142
140
|
/**
|
|
@@ -1492,22 +1490,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
1492
1490
|
}] } });
|
|
1493
1491
|
|
|
1494
1492
|
// Angular
|
|
1495
|
-
/**
|
|
1496
|
-
* Componente base da cui tutti i componenti Form implementano
|
|
1497
|
-
*/
|
|
1493
|
+
/** Componente base da cui tutti i componenti Form implementano */
|
|
1498
1494
|
class BaseFormControl {
|
|
1499
|
-
/**
|
|
1500
|
-
|
|
1501
|
-
*
|
|
1502
|
-
* @ignore
|
|
1503
|
-
*/
|
|
1504
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, nativeInput = false) {
|
|
1495
|
+
/** @ignore Costruttore */
|
|
1496
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE, nativeInput = false) {
|
|
1505
1497
|
this.cdr = cdr;
|
|
1506
1498
|
this.ngControl = ngControl;
|
|
1507
1499
|
this._validators = _validators;
|
|
1508
1500
|
this.ac = ac;
|
|
1509
1501
|
this.AppContext = AppContext;
|
|
1510
1502
|
this.ACO_CUSTOMKEY = ACO_CUSTOMKEY;
|
|
1503
|
+
this.FAV_DEBUG_MODE = FAV_DEBUG_MODE;
|
|
1511
1504
|
this.nativeInput = nativeInput;
|
|
1512
1505
|
/**
|
|
1513
1506
|
* https://github.com/angular/angular/issues/14988
|
|
@@ -1516,13 +1509,9 @@ class BaseFormControl {
|
|
|
1516
1509
|
* poi mettendo firstBind a false di lì in poi funziono come devo. Vista la casistica evito essenzialmente metà detectChanges
|
|
1517
1510
|
*/
|
|
1518
1511
|
this.firstBind = true;
|
|
1519
|
-
/**
|
|
1520
|
-
* Indica se il campo è obbligatorio i opzionale
|
|
1521
|
-
*/
|
|
1512
|
+
/** Indica se il campo è obbligatorio i opzionale */
|
|
1522
1513
|
this.Required = false;
|
|
1523
|
-
/**
|
|
1524
|
-
* Indica se il Form che contiene questo campo è già stato registrato
|
|
1525
|
-
*/
|
|
1514
|
+
/** Indica se il Form che contiene questo campo è già stato registrato */
|
|
1526
1515
|
this.formHasBennBound = false;
|
|
1527
1516
|
/**
|
|
1528
1517
|
* Indica se questo campo è staccato dal Form, ad esempio nel caso sia in un ng-template proiettato nel form.
|
|
@@ -1530,17 +1519,11 @@ class BaseFormControl {
|
|
|
1530
1519
|
* In quel caso la variabile **Form** del componente dev'essere valorizzata
|
|
1531
1520
|
*/
|
|
1532
1521
|
this.detatchedFromform = false;
|
|
1533
|
-
/**
|
|
1534
|
-
* @ignore
|
|
1535
|
-
*/
|
|
1522
|
+
/** @ignore */
|
|
1536
1523
|
this.propagateChange = (_) => { };
|
|
1537
|
-
/**
|
|
1538
|
-
* @ignore
|
|
1539
|
-
*/
|
|
1524
|
+
/** @ignore */
|
|
1540
1525
|
this.onTouched = () => { };
|
|
1541
|
-
/**
|
|
1542
|
-
* @ignore Vedi getter e setter
|
|
1543
|
-
*/
|
|
1526
|
+
/** @ignore Vedi getter e setter */
|
|
1544
1527
|
this._readonly = false;
|
|
1545
1528
|
/**
|
|
1546
1529
|
* Qualora ci fosse un contesto collegato questa variabile identifica se Sono l'Owner o meno.
|
|
@@ -1548,61 +1531,35 @@ class BaseFormControl {
|
|
|
1548
1531
|
* Se non lo sono, il campo risulterà in sola lettura
|
|
1549
1532
|
*/
|
|
1550
1533
|
this.AppContextOwnership = true;
|
|
1551
|
-
/**
|
|
1552
|
-
* Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material
|
|
1553
|
-
*/
|
|
1534
|
+
/** Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material */
|
|
1554
1535
|
this.FieldAppearence = "outline";
|
|
1555
|
-
/**
|
|
1556
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
1557
|
-
*/
|
|
1536
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
1558
1537
|
this.FormLayout = true;
|
|
1559
|
-
/**
|
|
1560
|
-
|
|
1561
|
-
|
|
1538
|
+
/** 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 */
|
|
1539
|
+
this.DisplayMode = false;
|
|
1540
|
+
/** Definisce se richiamare l'EventEmitter **inputChange** in maniera classica (true) o solo per la change considerate definitive come tasto invio / blur / ecc... (false) */
|
|
1562
1541
|
this.EmitPendingChanges = true;
|
|
1563
|
-
/**
|
|
1564
|
-
* Attiva o disattiva la validazione per questo componente
|
|
1565
|
-
*/
|
|
1542
|
+
/** Attiva o disattiva la validazione per questo componente */
|
|
1566
1543
|
this.Validation = true;
|
|
1567
|
-
/**
|
|
1568
|
-
* Placeholder per quando l'input è vuoto
|
|
1569
|
-
*/
|
|
1544
|
+
/** Placeholder per quando l'input è vuoto */
|
|
1570
1545
|
this.Placeholder = "";
|
|
1571
|
-
/**
|
|
1572
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
1573
|
-
*/
|
|
1546
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
1574
1547
|
this.FormGroupClass = "";
|
|
1575
|
-
/**
|
|
1576
|
-
* Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria
|
|
1577
|
-
*/
|
|
1548
|
+
/** Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria */
|
|
1578
1549
|
this.FailedValidationMessage = "";
|
|
1579
|
-
/**
|
|
1580
|
-
* Input che forza l'invalidità del componente
|
|
1581
|
-
*/
|
|
1550
|
+
/** Input che forza l'invalidità del componente */
|
|
1582
1551
|
this.ForcedError = false;
|
|
1583
|
-
/**
|
|
1584
|
-
* Mostra un testo a sinistra dell'input (FormLayout permettendo)
|
|
1585
|
-
*/
|
|
1552
|
+
/** Mostra un testo a sinistra dell'input (FormLayout permettendo) */
|
|
1586
1553
|
this.Label = "";
|
|
1587
|
-
/**
|
|
1588
|
-
* col-md-X per la label
|
|
1589
|
-
*/
|
|
1554
|
+
/** col-md-X per la label */
|
|
1590
1555
|
this.LabelColWidth = 4;
|
|
1591
|
-
/**
|
|
1592
|
-
* col-md-X per l'input
|
|
1593
|
-
*/
|
|
1556
|
+
/** col-md-X per l'input */
|
|
1594
1557
|
this.InputColWidth = 8;
|
|
1595
|
-
/**
|
|
1596
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
1597
|
-
*/
|
|
1558
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
1598
1559
|
this.Last = false;
|
|
1599
|
-
/**
|
|
1600
|
-
* Associa il componente Form a questo input
|
|
1601
|
-
*/
|
|
1560
|
+
/** Associa il componente Form a questo input */
|
|
1602
1561
|
this.Form = null;
|
|
1603
|
-
/**
|
|
1604
|
-
* Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source**
|
|
1605
|
-
*/
|
|
1562
|
+
/** Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source** */
|
|
1606
1563
|
this.IdField = 'id';
|
|
1607
1564
|
/**
|
|
1608
1565
|
* Espressione simil-Angular per cambiare il testo dei componenti che scelgono il proprio modello da una **Source**
|
|
@@ -1611,33 +1568,19 @@ class BaseFormControl {
|
|
|
1611
1568
|
* È inoltre possibile aggiungere pezzi di descrizione in maniera condizionale con la sintassi **:prop?(Prop vale {prop})**
|
|
1612
1569
|
*/
|
|
1613
1570
|
this.Display = '{description}';
|
|
1614
|
-
/**
|
|
1615
|
-
* Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display**
|
|
1616
|
-
*/
|
|
1571
|
+
/** Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display** */
|
|
1617
1572
|
this.BoundSource = [];
|
|
1618
|
-
/**
|
|
1619
|
-
* Indica se è il primo Bind della Source
|
|
1620
|
-
*/
|
|
1573
|
+
/** Indica se è il primo Bind della Source */
|
|
1621
1574
|
this.SourceFirstBind = true;
|
|
1622
|
-
/**
|
|
1623
|
-
* Evento chiamato alla modifica del valore collegato a questo campo
|
|
1624
|
-
*/
|
|
1575
|
+
/** Evento chiamato alla modifica del valore collegato a questo campo */
|
|
1625
1576
|
this.inputChange = new EventEmitter();
|
|
1626
|
-
/**
|
|
1627
|
-
* Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript
|
|
1628
|
-
*/
|
|
1577
|
+
/** Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript */
|
|
1629
1578
|
this.inputFocus = new EventEmitter();
|
|
1630
|
-
/**
|
|
1631
|
-
* Evento chiamato al finalize del campo di testo/combo/quelcheè
|
|
1632
|
-
*/
|
|
1579
|
+
/** Evento chiamato al finalize del campo di testo/combo/quelcheè */
|
|
1633
1580
|
this.inputFinalized = new EventEmitter();
|
|
1634
|
-
/**
|
|
1635
|
-
* Cache delle condizioni scritte tipo :prop?(Roba con {prop})
|
|
1636
|
-
*/
|
|
1581
|
+
/** Cache delle condizioni scritte tipo :prop?(Roba con {prop}) */
|
|
1637
1582
|
this.BindCheckingGroups = [];
|
|
1638
|
-
/**
|
|
1639
|
-
* Cache delle proprietà scritte tipo --> {prop}
|
|
1640
|
-
*/
|
|
1583
|
+
/** Cache delle proprietà scritte tipo --> {prop} */
|
|
1641
1584
|
this.BindProperties = [];
|
|
1642
1585
|
if (ngControl == null) {
|
|
1643
1586
|
if (!this.handleNullNgControl())
|
|
@@ -1734,11 +1677,12 @@ class BaseFormControl {
|
|
|
1734
1677
|
// Aggiungo alla BoundSource in formato standard KeyValue
|
|
1735
1678
|
this.BoundSource.push(this.transformSourceItem(s));
|
|
1736
1679
|
});
|
|
1680
|
+
// Post trybind se c'è un modello associato ricalcolo l'**EvaluatedModel**
|
|
1681
|
+
if (this.Model)
|
|
1682
|
+
this.EvaluatedModel = this.BoundSource.find(t => t.id == this.Model)?.description;
|
|
1737
1683
|
}
|
|
1738
1684
|
}
|
|
1739
|
-
/**
|
|
1740
|
-
* Valuta il contenuto della variabile BindCheckingGroups
|
|
1741
|
-
*/
|
|
1685
|
+
/** Valuta il contenuto della variabile BindCheckingGroups */
|
|
1742
1686
|
evaluateBindCheckingGroups() {
|
|
1743
1687
|
// Blocco per tirare fuori le condizioni scritte tipo --> :prop?(Roba con {prop})
|
|
1744
1688
|
var iffedMatches = this.Display.match(/:([a-z]+)\?\(([^\(\)]+)\)/g);
|
|
@@ -1751,9 +1695,7 @@ class BaseFormControl {
|
|
|
1751
1695
|
});
|
|
1752
1696
|
}
|
|
1753
1697
|
}
|
|
1754
|
-
/**
|
|
1755
|
-
* Valuta il contenuto della variabile BindProperties
|
|
1756
|
-
*/
|
|
1698
|
+
/** Valuta il contenuto della variabile BindProperties */
|
|
1757
1699
|
evaluateBindProperties() {
|
|
1758
1700
|
// Blocco per tirare fuori le proprietà scritte tipo --> {prop}
|
|
1759
1701
|
var matches = this.Display.match(/{[a-z]+}/gi);
|
|
@@ -1791,9 +1733,7 @@ class BaseFormControl {
|
|
|
1791
1733
|
handleNullNgControl() {
|
|
1792
1734
|
return false;
|
|
1793
1735
|
}
|
|
1794
|
-
/**
|
|
1795
|
-
* @ignore
|
|
1796
|
-
*/
|
|
1736
|
+
/** @ignore */
|
|
1797
1737
|
ngOnInit() {
|
|
1798
1738
|
// A volte nell'ngOnInit non ci passa quindi lo metto sia qui sia nell'afterviewinit, penso che valga per i componenti di terze parti
|
|
1799
1739
|
// che si collegano per i cazzi loro al form ecc, quindi la parte sopra non serve... BOH
|
|
@@ -1828,26 +1768,20 @@ class BaseFormControl {
|
|
|
1828
1768
|
if (this.detatchedFromform && this.Form)
|
|
1829
1769
|
this.Form.removeControl(this.validationControl);
|
|
1830
1770
|
}
|
|
1831
|
-
/**
|
|
1832
|
-
* Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno
|
|
1833
|
-
*/
|
|
1771
|
+
/** Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno */
|
|
1834
1772
|
checkRequiredValidator() {
|
|
1835
1773
|
// controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
|
|
1836
1774
|
// 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
|
|
1837
1775
|
if (this._validators && this._validators.some(elem => elem instanceof RequiredValidator && elem.required))
|
|
1838
1776
|
this.Required = true;
|
|
1839
1777
|
}
|
|
1840
|
-
/**
|
|
1841
|
-
* @ignore
|
|
1842
|
-
*/
|
|
1778
|
+
/** @ignore */
|
|
1843
1779
|
ngAfterViewInit() {
|
|
1844
1780
|
if (!this.ngControl)
|
|
1845
1781
|
return;
|
|
1846
1782
|
this.checkRequiredValidator();
|
|
1847
1783
|
}
|
|
1848
|
-
/**
|
|
1849
|
-
* Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante
|
|
1850
|
-
*/
|
|
1784
|
+
/** Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante */
|
|
1851
1785
|
bindResetFunction() {
|
|
1852
1786
|
//faccio in modo che se chiamo il reset del controllo (o della form) dall'esterno si resetti anche il controllo nativo
|
|
1853
1787
|
const origFunc = this.ngControl.control.__original_reset__ || this.ngControl.control.reset;
|
|
@@ -1860,9 +1794,7 @@ class BaseFormControl {
|
|
|
1860
1794
|
//Per consentire richiami multipli di questa funzione prendendo sempre la fiunzione di reset base
|
|
1861
1795
|
this.ngControl.control.__original_reset__ = origFunc;
|
|
1862
1796
|
}
|
|
1863
|
-
/**
|
|
1864
|
-
* @ignore
|
|
1865
|
-
*/
|
|
1797
|
+
/** @ignore */
|
|
1866
1798
|
writeValue(obj) {
|
|
1867
1799
|
if (obj == null && this.firstBind) {
|
|
1868
1800
|
this.firstBind = false;
|
|
@@ -1878,15 +1810,11 @@ class BaseFormControl {
|
|
|
1878
1810
|
// setTime*ut che wrappa tutto non va bene sennò spamma delle change detection a suon di interval che rallentano tantissimo l'app
|
|
1879
1811
|
this.cdr.detectChanges();
|
|
1880
1812
|
}
|
|
1881
|
-
/**
|
|
1882
|
-
* @ignore
|
|
1883
|
-
*/
|
|
1813
|
+
/** @ignore */
|
|
1884
1814
|
registerOnChange(fn) {
|
|
1885
1815
|
this.propagateChange = fn;
|
|
1886
1816
|
}
|
|
1887
|
-
/**
|
|
1888
|
-
* @ignore
|
|
1889
|
-
*/
|
|
1817
|
+
/** @ignore */
|
|
1890
1818
|
registerOnTouched(fn) {
|
|
1891
1819
|
this.onTouched = fn;
|
|
1892
1820
|
}
|
|
@@ -1943,7 +1871,7 @@ class BaseFormControl {
|
|
|
1943
1871
|
*/
|
|
1944
1872
|
focused(event) {
|
|
1945
1873
|
this.inputFocus.emit(event);
|
|
1946
|
-
|
|
1874
|
+
this.log("Control Focused - " + this.GeneratedName);
|
|
1947
1875
|
}
|
|
1948
1876
|
/**
|
|
1949
1877
|
* @ignore
|
|
@@ -1953,28 +1881,44 @@ class BaseFormControl {
|
|
|
1953
1881
|
*/
|
|
1954
1882
|
finalized() {
|
|
1955
1883
|
this.inputFinalized.emit();
|
|
1956
|
-
|
|
1884
|
+
this.log("Control Value Finalized - " + this.GeneratedName);
|
|
1885
|
+
}
|
|
1886
|
+
/**
|
|
1887
|
+
* Stampa un log a console
|
|
1888
|
+
*
|
|
1889
|
+
* @param {string} message Messaggio da stampare
|
|
1890
|
+
*/
|
|
1891
|
+
log(message) {
|
|
1892
|
+
if (this.FAV_DEBUG_MODE)
|
|
1893
|
+
console.log("@forms-and-validations: " + message);
|
|
1957
1894
|
}
|
|
1958
1895
|
}
|
|
1959
1896
|
BaseFormControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BaseFormControl, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1960
|
-
BaseFormControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.9", type: BaseFormControl, inputs: { FocusSubject: "FocusSubject", FieldAppearence: "FieldAppearence", FormLayout: "FormLayout", EmitPendingChanges: "EmitPendingChanges", Validation: "Validation", Placeholder: "Placeholder", FormGroupClass: "FormGroupClass", FailedValidationMessage: "FailedValidationMessage", ForcedError: "ForcedError", Label: "Label", LabelColWidth: "LabelColWidth", InputColWidth: "InputColWidth", Last: "Last", Form: "Form", Source: "Source", IdField: "IdField", Display: "Display", Readonly: "Readonly", LabelInputRatio: "LabelInputRatio" }, outputs: { inputChange: "inputChange", inputFocus: "inputFocus", inputFinalized: "inputFinalized" }, viewQueries: [{ propertyName: "_validationControl", first: true, predicate: ["validationControl"], descendants: true }, { propertyName: "validationControl_static", first: true, predicate: ["validationControl"], descendants: true, static: true }], ngImport: i0 });
|
|
1897
|
+
BaseFormControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.9", type: BaseFormControl, inputs: { FocusSubject: "FocusSubject", FieldAppearence: "FieldAppearence", FormLayout: "FormLayout", DisplayMode: "DisplayMode", EmitPendingChanges: "EmitPendingChanges", Validation: "Validation", Placeholder: "Placeholder", FormGroupClass: "FormGroupClass", FailedValidationMessage: "FailedValidationMessage", ForcedError: "ForcedError", Label: "Label", LabelColWidth: "LabelColWidth", InputColWidth: "InputColWidth", Last: "Last", Form: "Form", Source: "Source", IdField: "IdField", DisplayModeTemplate: "DisplayModeTemplate", Display: "Display", Readonly: "Readonly", LabelInputRatio: "LabelInputRatio" }, outputs: { inputChange: "inputChange", inputFocus: "inputFocus", inputFinalized: "inputFinalized" }, viewQueries: [{ propertyName: "_validationControl", first: true, predicate: ["validationControl"], descendants: true }, { propertyName: "validationControl_static", first: true, predicate: ["validationControl"], descendants: true, static: true }], ngImport: i0 });
|
|
1961
1898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BaseFormControl, decorators: [{
|
|
1962
1899
|
type: Directive
|
|
1963
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl }, { type: Array }, { type:
|
|
1900
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl }, { type: Array }, { type: i3$1.AccessControlService, decorators: [{
|
|
1964
1901
|
type: Optional
|
|
1965
|
-
}] }, { type:
|
|
1902
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
1966
1903
|
type: Optional
|
|
1967
1904
|
}] }, { type: undefined, decorators: [{
|
|
1968
1905
|
type: Optional
|
|
1969
1906
|
}, {
|
|
1970
1907
|
type: Inject,
|
|
1971
1908
|
args: [ACO_CUSTOMKEY]
|
|
1909
|
+
}] }, { type: undefined, decorators: [{
|
|
1910
|
+
type: Optional
|
|
1911
|
+
}, {
|
|
1912
|
+
type: Inject,
|
|
1913
|
+
args: [FAV_DEBUG_MODE]
|
|
1972
1914
|
}] }, { type: undefined }]; }, propDecorators: { FocusSubject: [{
|
|
1973
1915
|
type: Input
|
|
1974
1916
|
}], FieldAppearence: [{
|
|
1975
1917
|
type: Input
|
|
1976
1918
|
}], FormLayout: [{
|
|
1977
1919
|
type: Input
|
|
1920
|
+
}], DisplayMode: [{
|
|
1921
|
+
type: Input
|
|
1978
1922
|
}], EmitPendingChanges: [{
|
|
1979
1923
|
type: Input
|
|
1980
1924
|
}], Validation: [{
|
|
@@ -2001,6 +1945,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2001
1945
|
type: Input
|
|
2002
1946
|
}], IdField: [{
|
|
2003
1947
|
type: Input
|
|
1948
|
+
}], DisplayModeTemplate: [{
|
|
1949
|
+
type: Input
|
|
2004
1950
|
}], Display: [{
|
|
2005
1951
|
type: Input
|
|
2006
1952
|
}], Readonly: [{
|
|
@@ -2046,35 +1992,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2046
1992
|
}] }]; } });
|
|
2047
1993
|
|
|
2048
1994
|
// Angular
|
|
2049
|
-
/**
|
|
2050
|
-
* Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input
|
|
2051
|
-
*/
|
|
1995
|
+
/** Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input */
|
|
2052
1996
|
class FormFileComponent extends BaseFormControl {
|
|
2053
|
-
/**
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
* @ignore
|
|
2057
|
-
*/
|
|
2058
|
-
constructor(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc) {
|
|
2059
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
1997
|
+
/** @ignore Costruttore */
|
|
1998
|
+
constructor(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc, FAV_DEBUG_MODE) {
|
|
1999
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2060
2000
|
this.utiExts = utiExts;
|
|
2061
2001
|
this.lc = lc;
|
|
2062
|
-
/**
|
|
2063
|
-
* Permette di caricare file multipli
|
|
2064
|
-
*/
|
|
2002
|
+
/** Permette di caricare file multipli */
|
|
2065
2003
|
this.Multiple = false;
|
|
2066
|
-
/**
|
|
2067
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
2068
|
-
*/
|
|
2004
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
2069
2005
|
this.AllowDownload = true;
|
|
2070
2006
|
//Per questo componente non posso permettermi che il modello sia nullo
|
|
2071
2007
|
this.Model = new AppFile();
|
|
2072
2008
|
}
|
|
2073
|
-
/**
|
|
2074
|
-
* @ignore
|
|
2075
|
-
*/
|
|
2009
|
+
/** @ignore */
|
|
2076
2010
|
writeValue(obj) {
|
|
2077
2011
|
var model = obj == null ? new AppFile() : obj;
|
|
2012
|
+
this.EvaluatedModel = model.filename;
|
|
2078
2013
|
super.writeValue(model);
|
|
2079
2014
|
if (obj == null)
|
|
2080
2015
|
this.changed();
|
|
@@ -2104,23 +2039,19 @@ class FormFileComponent extends BaseFormControl {
|
|
|
2104
2039
|
}
|
|
2105
2040
|
this.changed(null, true);
|
|
2106
2041
|
}
|
|
2107
|
-
/**
|
|
2108
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
2109
|
-
*/
|
|
2042
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
2110
2043
|
downloadAttachment() {
|
|
2111
2044
|
let model = this.Model;
|
|
2112
2045
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
2113
2046
|
}
|
|
2114
|
-
/**
|
|
2115
|
-
* @ignore
|
|
2116
|
-
*/
|
|
2047
|
+
/** @ignore */
|
|
2117
2048
|
onNotNullValueSet() { }
|
|
2118
2049
|
}
|
|
2119
|
-
FormFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.UtilityService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
2120
|
-
FormFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormFileComponent, selector: "form-file", inputs: { Multiple: "Multiple", AllowDownload: "AllowDownload" }, providers: [{ provide: LocalizationService, useClass: FormFileComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, 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>", styles: [".frm-padding-left-22{padding-left:22px}\n"], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2050
|
+
FormFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormFileComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.UtilityService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: i1.LocalizationService }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2051
|
+
FormFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormFileComponent, selector: "form-file", inputs: { Multiple: "Multiple", AllowDownload: "AllowDownload" }, providers: [{ provide: LocalizationService, useClass: FormFileComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", styles: [".frm-padding-left-22{padding-left:22px}\n"], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2121
2052
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormFileComponent, decorators: [{
|
|
2122
2053
|
type: Component,
|
|
2123
|
-
args: [{ selector: "form-file", providers: [{ provide: LocalizationService, useClass: FormFileComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [".frm-padding-left-22{padding-left:22px}\n"] }]
|
|
2054
|
+
args: [{ selector: "form-file", providers: [{ provide: LocalizationService, useClass: FormFileComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>", styles: [".frm-padding-left-22{padding-left:22px}\n"] }]
|
|
2124
2055
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.UtilityService }, { type: i2$1.NgControl, decorators: [{
|
|
2125
2056
|
type: Optional
|
|
2126
2057
|
}, {
|
|
@@ -2130,16 +2061,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2130
2061
|
}, {
|
|
2131
2062
|
type: Inject,
|
|
2132
2063
|
args: [NG_VALIDATORS]
|
|
2133
|
-
}] }, { type:
|
|
2064
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
2134
2065
|
type: Optional
|
|
2135
|
-
}] }, { type:
|
|
2066
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
2136
2067
|
type: Optional
|
|
2137
2068
|
}] }, { type: undefined, decorators: [{
|
|
2138
2069
|
type: Optional
|
|
2139
2070
|
}, {
|
|
2140
2071
|
type: Inject,
|
|
2141
2072
|
args: [ACO_CUSTOMKEY]
|
|
2142
|
-
}] }, { type: i1.LocalizationService }
|
|
2073
|
+
}] }, { type: i1.LocalizationService }, { type: undefined, decorators: [{
|
|
2074
|
+
type: Optional
|
|
2075
|
+
}, {
|
|
2076
|
+
type: Inject,
|
|
2077
|
+
args: [FAV_DEBUG_MODE]
|
|
2078
|
+
}] }]; }, propDecorators: { Multiple: [{
|
|
2143
2079
|
type: Input
|
|
2144
2080
|
}], AllowDownload: [{
|
|
2145
2081
|
type: Input
|
|
@@ -2153,29 +2089,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2153
2089
|
* Componente che dà all'utente la possibilità di selezionare una data insieme ad un orario
|
|
2154
2090
|
*/
|
|
2155
2091
|
class FormDateTimeComponent extends BaseFormControl {
|
|
2156
|
-
/**
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2162
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2163
|
-
/**
|
|
2164
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
2165
|
-
*/
|
|
2092
|
+
/** @ignore Costruttore */
|
|
2093
|
+
constructor(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2094
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2095
|
+
this.datesExts = datesExts;
|
|
2096
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
2166
2097
|
this.JsDates = false;
|
|
2167
2098
|
}
|
|
2168
|
-
/**
|
|
2169
|
-
|
|
2170
|
-
|
|
2099
|
+
/** @ignore */
|
|
2100
|
+
writeValue(obj) {
|
|
2101
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
2102
|
+
super.writeValue(obj);
|
|
2103
|
+
}
|
|
2104
|
+
/** @ignore */
|
|
2171
2105
|
onNotNullValueSet() { }
|
|
2172
2106
|
}
|
|
2173
|
-
FormDateTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateTimeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
2174
|
-
FormDateTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormDateTimeComponent, selector: "form-datetime", inputs: { JsDates: "JsDates" }, usesInheritance: true, ngImport: i0, 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>", components: [{ type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2107
|
+
FormDateTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateTimeComponent, deps: [{ token: i1$1.DateService }, { token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2108
|
+
FormDateTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormDateTimeComponent, selector: "form-datetime", inputs: { JsDates: "JsDates" }, usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2175
2109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateTimeComponent, decorators: [{
|
|
2176
2110
|
type: Component,
|
|
2177
|
-
args: [{ selector: "form-datetime", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
2178
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2111
|
+
args: [{ selector: "form-datetime", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
2112
|
+
}], ctorParameters: function () { return [{ type: i1$1.DateService }, { type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2179
2113
|
type: Optional
|
|
2180
2114
|
}, {
|
|
2181
2115
|
type: Self
|
|
@@ -2184,15 +2118,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2184
2118
|
}, {
|
|
2185
2119
|
type: Inject,
|
|
2186
2120
|
args: [NG_VALIDATORS]
|
|
2187
|
-
}] }, { type:
|
|
2121
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
2188
2122
|
type: Optional
|
|
2189
|
-
}] }, { type:
|
|
2123
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
2190
2124
|
type: Optional
|
|
2191
2125
|
}] }, { type: undefined, decorators: [{
|
|
2192
2126
|
type: Optional
|
|
2193
2127
|
}, {
|
|
2194
2128
|
type: Inject,
|
|
2195
2129
|
args: [ACO_CUSTOMKEY]
|
|
2130
|
+
}] }, { type: undefined, decorators: [{
|
|
2131
|
+
type: Optional
|
|
2132
|
+
}, {
|
|
2133
|
+
type: Inject,
|
|
2134
|
+
args: [FAV_DEBUG_MODE]
|
|
2196
2135
|
}] }]; }, propDecorators: { JsDates: [{
|
|
2197
2136
|
type: Input
|
|
2198
2137
|
}] } });
|
|
@@ -2222,57 +2161,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2222
2161
|
}] }]; } });
|
|
2223
2162
|
|
|
2224
2163
|
// Angular
|
|
2225
|
-
/**
|
|
2226
|
-
* 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
|
|
2227
|
-
*/
|
|
2164
|
+
/** 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 */
|
|
2228
2165
|
class FormAdaptiveComponent extends BaseFormControl {
|
|
2229
|
-
/**
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
* @ignore
|
|
2233
|
-
*/
|
|
2234
|
-
constructor(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2235
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2166
|
+
/** @ignore Costruttore */
|
|
2167
|
+
constructor(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2168
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2236
2169
|
this.utiExts = utiExts;
|
|
2237
2170
|
this.datesExts = datesExts;
|
|
2238
2171
|
this.dateAdapter = dateAdapter;
|
|
2239
2172
|
this.lc = lc;
|
|
2240
|
-
/**
|
|
2241
|
-
* Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file**
|
|
2242
|
-
*/
|
|
2173
|
+
/** Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file** */
|
|
2243
2174
|
this.AllowDownload = true;
|
|
2244
|
-
/**
|
|
2245
|
-
* Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency)
|
|
2246
|
-
*/
|
|
2175
|
+
/** Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency) */
|
|
2247
2176
|
this.Precision = 2;
|
|
2248
|
-
/**
|
|
2249
|
-
* Allineamento della currency mask
|
|
2250
|
-
*/
|
|
2177
|
+
/** Allineamento della currency mask */
|
|
2251
2178
|
this.Alignment = 'right';
|
|
2252
|
-
/**
|
|
2253
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
2254
|
-
*/
|
|
2179
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
2255
2180
|
this.SearchFunction = null;
|
|
2256
|
-
/**
|
|
2257
|
-
* Numero minimo di caratteri con cui cercare
|
|
2258
|
-
*/
|
|
2181
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
2259
2182
|
this.MinChars = 3;
|
|
2260
|
-
/**
|
|
2261
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
2262
|
-
*/
|
|
2183
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
2263
2184
|
this.CaseSensitive = false;
|
|
2264
|
-
/**
|
|
2265
|
-
* Variabile interna che gestisce se effettuare il riallineamento dei dati o meno
|
|
2266
|
-
*/
|
|
2185
|
+
/** Variabile interna che gestisce se effettuare il riallineamento dei dati o meno */
|
|
2267
2186
|
this.alignValues = false;
|
|
2268
2187
|
/**
|
|
2269
2188
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
2270
2189
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
2271
2190
|
*/
|
|
2272
2191
|
this.ignoreNextWriteValue = false;
|
|
2273
|
-
/**
|
|
2274
|
-
* 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
|
|
2275
|
-
*/
|
|
2192
|
+
/** 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 */
|
|
2276
2193
|
this.FilteredBoundSource = [];
|
|
2277
2194
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
2278
2195
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
@@ -2280,9 +2197,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2280
2197
|
this.executionTimers = {};
|
|
2281
2198
|
this.ModelFile = new AppFile();
|
|
2282
2199
|
}
|
|
2283
|
-
/**
|
|
2284
|
-
* @ignore
|
|
2285
|
-
*/
|
|
2200
|
+
/** @ignore */
|
|
2286
2201
|
async ngOnChanges(changes) {
|
|
2287
2202
|
const newSource = changes["Source"];
|
|
2288
2203
|
const newType = changes["Type"];
|
|
@@ -2298,28 +2213,40 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2298
2213
|
if (newType && this.Model)
|
|
2299
2214
|
this.writeValue(this.Model);
|
|
2300
2215
|
}
|
|
2301
|
-
/**
|
|
2302
|
-
* @ignore
|
|
2303
|
-
*/
|
|
2216
|
+
/** @ignore */
|
|
2304
2217
|
writeValue(obj) {
|
|
2305
2218
|
this.alignValues = false;
|
|
2306
|
-
|
|
2219
|
+
this.EvaluatedModel = obj?.toString() || "";
|
|
2220
|
+
if (!this.Type) {
|
|
2307
2221
|
this.Type = "string";
|
|
2308
|
-
|
|
2222
|
+
this.EvaluatedModel = obj;
|
|
2223
|
+
}
|
|
2224
|
+
if (this.Type == "date" || this.Type == "datetime") {
|
|
2309
2225
|
this.useJsDates = Object.prototype.toString.call(obj) === "[object Date]";
|
|
2310
|
-
|
|
2226
|
+
if (this.Type == "date")
|
|
2227
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2228
|
+
if (this.Type == "datetime")
|
|
2229
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
2230
|
+
}
|
|
2231
|
+
else if ((this.Type == "float" || this.Type == "number") && obj) {
|
|
2311
2232
|
obj = obj.toString().replace(".", ",");
|
|
2233
|
+
this.EvaluatedModel = obj;
|
|
2234
|
+
}
|
|
2312
2235
|
// Per sicurezza riallineo i valori
|
|
2313
2236
|
else if (this.Type == "boolean") {
|
|
2314
2237
|
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2315
2238
|
this.alignValues = true;
|
|
2239
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2316
2240
|
}
|
|
2317
2241
|
else if (this.Type == "time") {
|
|
2318
|
-
const [hours, minutes, seconds] = (obj || "
|
|
2319
|
-
obj = dayjs().hour(hours ?? 0).minute(minutes ?? 0).second(seconds ?? 0);
|
|
2242
|
+
const [hours, minutes, seconds] = (obj || "00:00:00").split(":");
|
|
2243
|
+
obj = dayjs().hour(parseInt(hours ?? 0)).minute(parseInt(minutes ?? 0)).second(parseInt(seconds ?? 0));
|
|
2244
|
+
this.EvaluatedModel = `${hours || '00'}:${minutes || '00'}:${seconds || '00'}`;
|
|
2320
2245
|
}
|
|
2321
|
-
else if (this.Type == "file")
|
|
2246
|
+
else if (this.Type == "file") {
|
|
2322
2247
|
obj = this.ModelFile;
|
|
2248
|
+
this.EvaluatedModel = this.ModelFile.filename;
|
|
2249
|
+
}
|
|
2323
2250
|
else if (this.Type == "autocomplete") {
|
|
2324
2251
|
if (this.SearchFunction) {
|
|
2325
2252
|
this.SearchFunction(obj, true).subscribe(t => {
|
|
@@ -2332,6 +2259,8 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2332
2259
|
else
|
|
2333
2260
|
this.finalizeValue(obj);
|
|
2334
2261
|
}
|
|
2262
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
2263
|
+
this.EvaluatedModel = this.BoundSource.find(t => t.id == obj)?.description;
|
|
2335
2264
|
super.writeValue(obj);
|
|
2336
2265
|
if (this.alignValues) {
|
|
2337
2266
|
this.changed();
|
|
@@ -2347,6 +2276,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2347
2276
|
var val = this.Source.find(t => t.id == value);
|
|
2348
2277
|
this.propagateChange(val ? val.id : value);
|
|
2349
2278
|
this.Model = val ? val.description : value;
|
|
2279
|
+
this.EvaluatedModel = this.Model;
|
|
2350
2280
|
}
|
|
2351
2281
|
/**
|
|
2352
2282
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -2389,9 +2319,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2389
2319
|
}, 100);
|
|
2390
2320
|
}
|
|
2391
2321
|
}
|
|
2392
|
-
/**
|
|
2393
|
-
* Metodo richiamato quando viene modificato il modello del campo di input
|
|
2394
|
-
*/
|
|
2322
|
+
/** Metodo richiamato quando viene modificato il modello del campo di input */
|
|
2395
2323
|
changed() {
|
|
2396
2324
|
var toEmit = this.getModelToEmit();
|
|
2397
2325
|
if (this.Type == "autocomplete")
|
|
@@ -2399,18 +2327,15 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2399
2327
|
if (this.EmitPendingChanges)
|
|
2400
2328
|
super.changed(toEmit);
|
|
2401
2329
|
}
|
|
2330
|
+
/** @ignore */
|
|
2402
2331
|
finalized() {
|
|
2403
2332
|
super.finalized();
|
|
2404
2333
|
}
|
|
2405
|
-
/**
|
|
2406
|
-
* Metodo richiamato quando viene selezionato il campo col mouse
|
|
2407
|
-
*/
|
|
2334
|
+
/** Metodo richiamato quando viene selezionato il campo col mouse */
|
|
2408
2335
|
focused(event) {
|
|
2409
2336
|
super.focused(event);
|
|
2410
2337
|
}
|
|
2411
|
-
/**
|
|
2412
|
-
* Effettua gli aggiustamenti dati del caso ed emette il modello corretto
|
|
2413
|
-
*/
|
|
2338
|
+
/** Effettua gli aggiustamenti dati del caso ed emette il modello corretto */
|
|
2414
2339
|
getModelToEmit() {
|
|
2415
2340
|
var toEmit = this.Model ?
|
|
2416
2341
|
(this.Type == "time" || this.useJsDates ?
|
|
@@ -2452,16 +2377,12 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2452
2377
|
}
|
|
2453
2378
|
this.changed();
|
|
2454
2379
|
}
|
|
2455
|
-
/**
|
|
2456
|
-
* Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente
|
|
2457
|
-
*/
|
|
2380
|
+
/** Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente */
|
|
2458
2381
|
downloadAttachment() {
|
|
2459
2382
|
let model = this.Model;
|
|
2460
2383
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
2461
2384
|
}
|
|
2462
|
-
/**
|
|
2463
|
-
* @ignore
|
|
2464
|
-
*/
|
|
2385
|
+
/** @ignore */
|
|
2465
2386
|
onNotNullValueSet() { }
|
|
2466
2387
|
/** @ignore */
|
|
2467
2388
|
throttla(id, func, throttleTime) {
|
|
@@ -2472,11 +2393,11 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2472
2393
|
this.executionTimers[id] = setTimeout(() => { func(); this.executionTimers[id] = null; }, throttleTime);
|
|
2473
2394
|
}
|
|
2474
2395
|
}
|
|
2475
|
-
FormAdaptiveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAdaptiveComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.UtilityService }, { token: i1$1.DateService }, { token: i2$2.NgxMatDateAdapter }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
2476
|
-
FormAdaptiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormAdaptiveComponent, selector: "form-adaptive", inputs: { Type: "Type", TypeMissingMessage: "TypeMissingMessage", Pattern: "Pattern", AllowDownload: "AllowDownload", Precision: "Precision", Alignment: "Alignment", SearchFunction: "SearchFunction", MinChars: "MinChars", CaseSensitive: "CaseSensitive" }, providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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>", styles: [".frm-padding-left-22{padding-left:22px}\n"], components: [{ type: ValidationCurrencyComponent, selector: "val-currency", inputs: ["CurrencyOptions"] }, { type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }, { type: ValidationInputComponent, selector: "val-input", inputs: ["Password", "showWarning", "warningTitle", "warningClass", "value"] }, { type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }, { type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }, { type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }, { type: i2$2.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2396
|
+
FormAdaptiveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAdaptiveComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.UtilityService }, { token: i1$1.DateService }, { token: i2$2.NgxMatDateAdapter }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2397
|
+
FormAdaptiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormAdaptiveComponent, selector: "form-adaptive", inputs: { Type: "Type", TypeMissingMessage: "TypeMissingMessage", Pattern: "Pattern", AllowDownload: "AllowDownload", Precision: "Precision", Alignment: "Alignment", SearchFunction: "SearchFunction", MinChars: "MinChars", CaseSensitive: "CaseSensitive" }, providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", styles: [".frm-padding-left-22{padding-left:22px}\n"], components: [{ type: ValidationCurrencyComponent, selector: "val-currency", inputs: ["CurrencyOptions"] }, { type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }, { type: ValidationInputComponent, selector: "val-input", inputs: ["Password", "showWarning", "warningTitle", "warningClass", "value"] }, { type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }, { type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }, { type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }, { type: i2$2.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2477
2398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAdaptiveComponent, decorators: [{
|
|
2478
2399
|
type: Component,
|
|
2479
|
-
args: [{ selector: "form-adaptive", providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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>", styles: [".frm-padding-left-22{padding-left:22px}\n"] }]
|
|
2400
|
+
args: [{ selector: "form-adaptive", providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>", styles: [".frm-padding-left-22{padding-left:22px}\n"] }]
|
|
2480
2401
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.UtilityService }, { type: i1$1.DateService }, { type: i2$2.NgxMatDateAdapter }, { type: i1.LocalizationService }, { type: i2$1.NgControl, decorators: [{
|
|
2481
2402
|
type: Optional
|
|
2482
2403
|
}, {
|
|
@@ -2486,13 +2407,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2486
2407
|
}, {
|
|
2487
2408
|
type: Inject,
|
|
2488
2409
|
args: [NG_VALIDATORS]
|
|
2489
|
-
}] }, { type:
|
|
2410
|
+
}] }, { type: i3$1.AccessControlService }, { type: i3$1.ComponentContext, decorators: [{
|
|
2490
2411
|
type: Optional
|
|
2491
2412
|
}] }, { type: undefined, decorators: [{
|
|
2492
2413
|
type: Optional
|
|
2493
2414
|
}, {
|
|
2494
2415
|
type: Inject,
|
|
2495
2416
|
args: [ACO_CUSTOMKEY]
|
|
2417
|
+
}] }, { type: undefined, decorators: [{
|
|
2418
|
+
type: Optional
|
|
2419
|
+
}, {
|
|
2420
|
+
type: Inject,
|
|
2421
|
+
args: [FAV_DEBUG_MODE]
|
|
2496
2422
|
}] }]; }, propDecorators: { Type: [{
|
|
2497
2423
|
type: Input
|
|
2498
2424
|
}], TypeMissingMessage: [{
|
|
@@ -2523,17 +2449,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2523
2449
|
*/
|
|
2524
2450
|
class FormEmptyComponent {
|
|
2525
2451
|
constructor() {
|
|
2526
|
-
/**
|
|
2527
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2528
|
-
*/
|
|
2452
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2529
2453
|
this.Last = false;
|
|
2530
|
-
/**
|
|
2531
|
-
* Classe extra per il form-group in cui viene wrappato l'input finto
|
|
2532
|
-
*/
|
|
2454
|
+
/** Classe extra per il form-group in cui viene wrappato l'input finto */
|
|
2533
2455
|
this.FormGroupClass = "";
|
|
2534
|
-
/**
|
|
2535
|
-
* Valore placeholder da mostrare
|
|
2536
|
-
*/
|
|
2456
|
+
/** Valore placeholder da mostrare */
|
|
2537
2457
|
this.PlaceholderModel = "Placeholder";
|
|
2538
2458
|
}
|
|
2539
2459
|
}
|
|
@@ -2555,42 +2475,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2555
2475
|
*/
|
|
2556
2476
|
class FormTemplateComponent {
|
|
2557
2477
|
constructor() {
|
|
2558
|
-
/**
|
|
2559
|
-
* Indica se l'input è obbligatorio o no
|
|
2560
|
-
*/
|
|
2478
|
+
/** Indica se l'input è obbligatorio o no */
|
|
2561
2479
|
this.Required = false;
|
|
2562
|
-
/**
|
|
2563
|
-
* Mostra un testo a sinistra dell'input, **FormLayout** permettendo
|
|
2564
|
-
*/
|
|
2480
|
+
/** Mostra un testo a sinistra dell'input, **FormLayout** permettendo */
|
|
2565
2481
|
this.Label = "";
|
|
2566
|
-
/**
|
|
2567
|
-
* Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top
|
|
2568
|
-
*/
|
|
2482
|
+
/** Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top */
|
|
2569
2483
|
this.LabelClass = "m-t-5";
|
|
2570
|
-
/**
|
|
2571
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
2572
|
-
*/
|
|
2484
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
2573
2485
|
this.FormLayout = true;
|
|
2574
|
-
/**
|
|
2575
|
-
* col-md-X per la label
|
|
2576
|
-
*/
|
|
2486
|
+
/** col-md-X per la label */
|
|
2577
2487
|
this.LabelColWidth = 4;
|
|
2578
|
-
/**
|
|
2579
|
-
* col-md-X per l'input
|
|
2580
|
-
*/
|
|
2488
|
+
/** col-md-X per l'input */
|
|
2581
2489
|
this.InputColWidth = 8;
|
|
2582
|
-
/**
|
|
2583
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2584
|
-
*/
|
|
2490
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2585
2491
|
this.Last = false;
|
|
2586
|
-
/**
|
|
2587
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2588
|
-
*/
|
|
2492
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2589
2493
|
this.FormGroupClass = "";
|
|
2590
2494
|
}
|
|
2591
|
-
/**
|
|
2592
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2593
|
-
*/
|
|
2495
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2594
2496
|
set LabelInputRatio(input) {
|
|
2595
2497
|
var ratio = input.split(/\s/);
|
|
2596
2498
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2629,26 +2531,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2629
2531
|
*/
|
|
2630
2532
|
class FormErrorComponent {
|
|
2631
2533
|
constructor() {
|
|
2632
|
-
/**
|
|
2633
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2634
|
-
*/
|
|
2534
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2635
2535
|
this.LabelColWidth = 4;
|
|
2636
|
-
/**
|
|
2637
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2638
|
-
*/
|
|
2536
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2639
2537
|
this.InputColWidth = 8;
|
|
2640
|
-
/**
|
|
2641
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2642
|
-
*/
|
|
2538
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2643
2539
|
this.Last = false;
|
|
2644
|
-
/**
|
|
2645
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2646
|
-
*/
|
|
2540
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2647
2541
|
this.FormGroupClass = "";
|
|
2648
2542
|
}
|
|
2649
|
-
/**
|
|
2650
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2651
|
-
*/
|
|
2543
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2652
2544
|
set LabelInputRatio(input) {
|
|
2653
2545
|
var ratio = input.split(/\s/);
|
|
2654
2546
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2679,26 +2571,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2679
2571
|
*/
|
|
2680
2572
|
class FormInfoComponent {
|
|
2681
2573
|
constructor() {
|
|
2682
|
-
/**
|
|
2683
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2684
|
-
*/
|
|
2574
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2685
2575
|
this.LabelColWidth = 4;
|
|
2686
|
-
/**
|
|
2687
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2688
|
-
*/
|
|
2576
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2689
2577
|
this.InputColWidth = 8;
|
|
2690
|
-
/**
|
|
2691
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2692
|
-
*/
|
|
2578
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2693
2579
|
this.Last = false;
|
|
2694
|
-
/**
|
|
2695
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2696
|
-
*/
|
|
2580
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2697
2581
|
this.FormGroupClass = "";
|
|
2698
2582
|
}
|
|
2699
|
-
/**
|
|
2700
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2701
|
-
*/
|
|
2583
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2702
2584
|
set LabelInputRatio(input) {
|
|
2703
2585
|
var ratio = input.split(/\s/);
|
|
2704
2586
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2723,29 +2605,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2723
2605
|
}] } });
|
|
2724
2606
|
|
|
2725
2607
|
// Angular
|
|
2726
|
-
/**
|
|
2727
|
-
* Componente rappresentante una checkbox
|
|
2728
|
-
*/
|
|
2608
|
+
/** Componente rappresentante una checkbox */
|
|
2729
2609
|
class FormCheckboxComponent extends BaseFormControl {
|
|
2730
|
-
/**
|
|
2731
|
-
|
|
2732
|
-
*
|
|
2733
|
-
* @ignore
|
|
2734
|
-
*/
|
|
2735
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2610
|
+
/** @ignore Costruttore */
|
|
2611
|
+
constructor(lc, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2736
2612
|
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true);
|
|
2613
|
+
this.lc = lc;
|
|
2737
2614
|
}
|
|
2738
|
-
/**
|
|
2739
|
-
|
|
2740
|
-
|
|
2615
|
+
/** @ignore */
|
|
2616
|
+
writeValue(obj) {
|
|
2617
|
+
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2618
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2619
|
+
super.writeValue(obj);
|
|
2620
|
+
}
|
|
2621
|
+
/** @ignore */
|
|
2741
2622
|
onNotNullValueSet() { }
|
|
2742
2623
|
}
|
|
2743
|
-
FormCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, host: true, optional: true }, { token:
|
|
2744
|
-
FormCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormCheckboxComponent, selector: "form-checkbox", usesInheritance: true, ngImport: i0, 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>", directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2624
|
+
FormCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormCheckboxComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, host: true, optional: true }, { token: i3$1.AccessControlService }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2625
|
+
FormCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormCheckboxComponent, selector: "form-checkbox", usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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 <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>", directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2745
2626
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormCheckboxComponent, decorators: [{
|
|
2746
2627
|
type: Component,
|
|
2747
|
-
args: [{ selector: "form-checkbox", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
2748
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2628
|
+
args: [{ selector: "form-checkbox", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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 <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>" }]
|
|
2629
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2749
2630
|
type: Optional
|
|
2750
2631
|
}, {
|
|
2751
2632
|
type: Self
|
|
@@ -2756,7 +2637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2756
2637
|
}, {
|
|
2757
2638
|
type: Inject,
|
|
2758
2639
|
args: [NG_VALIDATORS]
|
|
2759
|
-
}] }, { type:
|
|
2640
|
+
}] }, { type: i3$1.AccessControlService }, { type: i3$1.ComponentContext, decorators: [{
|
|
2760
2641
|
type: Optional
|
|
2761
2642
|
}] }, { type: undefined, decorators: [{
|
|
2762
2643
|
type: Optional
|
|
@@ -2766,33 +2647,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2766
2647
|
}] }]; } });
|
|
2767
2648
|
|
|
2768
2649
|
// Angular
|
|
2769
|
-
/**
|
|
2770
|
-
* Componente che dà all'utente la possibilità di selezionare una data
|
|
2771
|
-
*/
|
|
2650
|
+
/** Componente che dà all'utente la possibilità di selezionare una data */
|
|
2772
2651
|
class FormDateComponent extends BaseFormControl {
|
|
2773
|
-
/**
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2779
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2780
|
-
/**
|
|
2781
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
2782
|
-
*/
|
|
2652
|
+
/** @ignore Costruttore */
|
|
2653
|
+
constructor(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2654
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2655
|
+
this.datesExts = datesExts;
|
|
2656
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
2783
2657
|
this.JsDates = false;
|
|
2784
2658
|
}
|
|
2785
|
-
/**
|
|
2786
|
-
|
|
2787
|
-
|
|
2659
|
+
/** @ignore */
|
|
2660
|
+
writeValue(obj) {
|
|
2661
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2662
|
+
super.writeValue(obj);
|
|
2663
|
+
}
|
|
2664
|
+
/** @ignore */
|
|
2788
2665
|
onNotNullValueSet() { }
|
|
2789
2666
|
}
|
|
2790
|
-
FormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
2791
|
-
FormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormDateComponent, selector: "form-date", inputs: { JsDates: "JsDates" }, usesInheritance: true, ngImport: i0, 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>", components: [{ type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2667
|
+
FormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateComponent, deps: [{ token: i1$1.DateService }, { token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2668
|
+
FormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormDateComponent, selector: "form-date", inputs: { JsDates: "JsDates" }, usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2792
2669
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormDateComponent, decorators: [{
|
|
2793
2670
|
type: Component,
|
|
2794
|
-
args: [{ selector: "form-date", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
2795
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2671
|
+
args: [{ selector: "form-date", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
2672
|
+
}], ctorParameters: function () { return [{ type: i1$1.DateService }, { type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2796
2673
|
type: Optional
|
|
2797
2674
|
}, {
|
|
2798
2675
|
type: Self
|
|
@@ -2801,69 +2678,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2801
2678
|
}, {
|
|
2802
2679
|
type: Inject,
|
|
2803
2680
|
args: [NG_VALIDATORS]
|
|
2804
|
-
}] }, { type:
|
|
2681
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
2805
2682
|
type: Optional
|
|
2806
|
-
}] }, { type:
|
|
2683
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
2807
2684
|
type: Optional
|
|
2808
2685
|
}] }, { type: undefined, decorators: [{
|
|
2809
2686
|
type: Optional
|
|
2810
2687
|
}, {
|
|
2811
2688
|
type: Inject,
|
|
2812
2689
|
args: [ACO_CUSTOMKEY]
|
|
2690
|
+
}] }, { type: undefined, decorators: [{
|
|
2691
|
+
type: Optional
|
|
2692
|
+
}, {
|
|
2693
|
+
type: Inject,
|
|
2694
|
+
args: [FAV_DEBUG_MODE]
|
|
2813
2695
|
}] }]; }, propDecorators: { JsDates: [{
|
|
2814
2696
|
type: Input
|
|
2815
2697
|
}] } });
|
|
2816
2698
|
|
|
2817
2699
|
// Angular
|
|
2818
|
-
/**
|
|
2819
|
-
* Semplice componente di Input testuale, con eventuale prefisso/suffisso
|
|
2820
|
-
*/
|
|
2700
|
+
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
2821
2701
|
class FormInputComponent extends BaseFormControl {
|
|
2822
|
-
/**
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
*/
|
|
2827
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2828
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2829
|
-
/**
|
|
2830
|
-
* Indica se l'input relativo è di tipo Password
|
|
2831
|
-
*/
|
|
2702
|
+
/** @ignore Costruttore */
|
|
2703
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2704
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2705
|
+
/** Indica se l'input relativo è di tipo Password */
|
|
2832
2706
|
this.Password = false;
|
|
2833
|
-
/**
|
|
2834
|
-
* Delegato per l'esecuzione di un'operazione al click del suffisso
|
|
2835
|
-
*/
|
|
2707
|
+
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
2836
2708
|
this.onSuffixAction = new EventEmitter();
|
|
2837
|
-
/**
|
|
2838
|
-
* Delegato per l'esecuzione di un'operazione al click del prefisso
|
|
2839
|
-
*/
|
|
2709
|
+
/** Delegato per l'esecuzione di un'operazione al click del prefisso */
|
|
2840
2710
|
this.onPrefixAction = new EventEmitter();
|
|
2841
|
-
/**
|
|
2842
|
-
* Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix**
|
|
2843
|
-
*/
|
|
2711
|
+
/** Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix** */
|
|
2844
2712
|
this.HasSuffix = false;
|
|
2845
|
-
/**
|
|
2846
|
-
* Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix**
|
|
2847
|
-
*/
|
|
2713
|
+
/** Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix** */
|
|
2848
2714
|
this.HasPrefix = false;
|
|
2849
2715
|
}
|
|
2850
|
-
/**
|
|
2851
|
-
|
|
2852
|
-
|
|
2716
|
+
/** @ignore */
|
|
2717
|
+
writeValue(obj) {
|
|
2718
|
+
this.EvaluatedModel = obj?.toString() || "";
|
|
2719
|
+
super.writeValue(obj);
|
|
2720
|
+
}
|
|
2721
|
+
/** @ignore */
|
|
2853
2722
|
ngAfterContentInit() {
|
|
2854
2723
|
this.HasSuffix = !!this.suffix;
|
|
2855
2724
|
this.HasPrefix = !!this.prefix;
|
|
2856
2725
|
}
|
|
2857
|
-
/**
|
|
2858
|
-
* @ignore
|
|
2859
|
-
*/
|
|
2726
|
+
/** @ignore */
|
|
2860
2727
|
onNotNullValueSet() { }
|
|
2861
2728
|
}
|
|
2862
|
-
FormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
2863
|
-
FormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormInputComponent, selector: "form-input", inputs: { Password: "Password" }, outputs: { onSuffixAction: "onSuffixAction", onPrefixAction: "onPrefixAction" }, queries: [{ propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true }], usesInheritance: true, ngImport: i0, 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>", components: [{ type: ValidationInputComponent, selector: "val-input", inputs: ["Password", "showWarning", "warningTitle", "warningClass", "value"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i2.MatPrefix, selector: "[matPrefix]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2729
|
+
FormInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormInputComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2730
|
+
FormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormInputComponent, selector: "form-input", inputs: { Password: "Password" }, outputs: { onSuffixAction: "onSuffixAction", onPrefixAction: "onPrefixAction" }, queries: [{ propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true }], usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationInputComponent, selector: "val-input", inputs: ["Password", "showWarning", "warningTitle", "warningClass", "value"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2.MatSuffix, selector: "[matSuffix]" }, { type: i2.MatPrefix, selector: "[matPrefix]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2864
2731
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormInputComponent, decorators: [{
|
|
2865
2732
|
type: Component,
|
|
2866
|
-
args: [{ selector: "form-input", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
2733
|
+
args: [{ selector: "form-input", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
2867
2734
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
2868
2735
|
type: Optional
|
|
2869
2736
|
}, {
|
|
@@ -2873,15 +2740,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2873
2740
|
}, {
|
|
2874
2741
|
type: Inject,
|
|
2875
2742
|
args: [NG_VALIDATORS]
|
|
2876
|
-
}] }, { type:
|
|
2743
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
2877
2744
|
type: Optional
|
|
2878
|
-
}] }, { type:
|
|
2745
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
2879
2746
|
type: Optional
|
|
2880
2747
|
}] }, { type: undefined, decorators: [{
|
|
2881
2748
|
type: Optional
|
|
2882
2749
|
}, {
|
|
2883
2750
|
type: Inject,
|
|
2884
2751
|
args: [ACO_CUSTOMKEY]
|
|
2752
|
+
}] }, { type: undefined, decorators: [{
|
|
2753
|
+
type: Optional
|
|
2754
|
+
}, {
|
|
2755
|
+
type: Inject,
|
|
2756
|
+
args: [FAV_DEBUG_MODE]
|
|
2885
2757
|
}] }]; }, propDecorators: { Password: [{
|
|
2886
2758
|
type: Input
|
|
2887
2759
|
}], onSuffixAction: [{
|
|
@@ -2919,21 +2791,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
2919
2791
|
}] }]; } });
|
|
2920
2792
|
|
|
2921
2793
|
// Angular
|
|
2922
|
-
/**
|
|
2923
|
-
* Componente che permette di selezionare un valore da una lista di valori disponibili
|
|
2924
|
-
*/
|
|
2794
|
+
/** Componente che permette di selezionare un valore da una lista di valori disponibili */
|
|
2925
2795
|
class FormSelectComponent extends BaseFormControl {
|
|
2926
|
-
/**
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
* @ignore
|
|
2930
|
-
*/
|
|
2931
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2932
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2796
|
+
/** @ignore Costruttore */
|
|
2797
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2798
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
2933
2799
|
this.lc = lc;
|
|
2934
|
-
/**
|
|
2935
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
2936
|
-
*/
|
|
2800
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
2937
2801
|
this.SelectLabel = "";
|
|
2938
2802
|
/**
|
|
2939
2803
|
* Permette al componente di considerare questo valore come "valore placeholder"
|
|
@@ -2941,9 +2805,7 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2941
2805
|
* Si consiglia di mantenere il default
|
|
2942
2806
|
*/
|
|
2943
2807
|
this.PlaceholderValue = '';
|
|
2944
|
-
/**
|
|
2945
|
-
* Override del placeholder per select requried
|
|
2946
|
-
*/
|
|
2808
|
+
/** Override del placeholder per select requried */
|
|
2947
2809
|
this.RequiredPlaceholder = null;
|
|
2948
2810
|
/**
|
|
2949
2811
|
* Permette al componente di considerare questo valore come "valore vuoto"
|
|
@@ -2951,14 +2813,10 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
2951
2813
|
* Si consiglia di mantenere il default
|
|
2952
2814
|
*/
|
|
2953
2815
|
this.EmptyFieldValue = '-2';
|
|
2954
|
-
/**
|
|
2955
|
-
* Se **true** rimuove il simbolino di validazione (croce rossa o tick verde)
|
|
2956
|
-
*/
|
|
2816
|
+
/** Se **true** rimuove il simbolino di validazione (croce rossa o tick verde) */
|
|
2957
2817
|
this.ShowValidationSymbol = true;
|
|
2958
2818
|
}
|
|
2959
|
-
/**
|
|
2960
|
-
* @ignore
|
|
2961
|
-
*/
|
|
2819
|
+
/** @ignore */
|
|
2962
2820
|
ngOnChanges(changes) {
|
|
2963
2821
|
let newSource = changes["Source"];
|
|
2964
2822
|
if (!newSource)
|
|
@@ -3003,30 +2861,38 @@ class FormSelectComponent extends BaseFormControl {
|
|
|
3003
2861
|
this.cdr.markForCheck();
|
|
3004
2862
|
}
|
|
3005
2863
|
}
|
|
2864
|
+
/** @ignore */
|
|
3006
2865
|
detatchPreviousAndRetatchNext(doStuff) {
|
|
3007
|
-
this.
|
|
2866
|
+
if (this.validationControl && this.Form)
|
|
2867
|
+
this.Form.removeControl(this.validationControl);
|
|
3008
2868
|
setTimeout(() => {
|
|
3009
2869
|
doStuff(() => {
|
|
3010
|
-
if (this.validationControl)
|
|
2870
|
+
if (this.validationControl && this.Form)
|
|
3011
2871
|
this.Form.addControl(this.validationControl);
|
|
3012
|
-
else if (this.validationControl) {
|
|
2872
|
+
else if (this.validationControl && this.Form) {
|
|
3013
2873
|
this.Form.addControl(this.validationControl);
|
|
3014
2874
|
}
|
|
3015
|
-
else
|
|
2875
|
+
else if (!this.validationControl && this.Form) {
|
|
2876
|
+
// Questo messaggio ha senso solo se almeno il form esiste... se non esiste sticazzi insomma...
|
|
3016
2877
|
console.error(`Impossibile aggiungere il componente di validaazione per ${this.GeneratedName}, le validazioni potrebbero funzionare in maniera erratica`);
|
|
2878
|
+
}
|
|
3017
2879
|
});
|
|
3018
2880
|
});
|
|
3019
2881
|
}
|
|
3020
|
-
/**
|
|
3021
|
-
|
|
3022
|
-
|
|
2882
|
+
/** @ignore */
|
|
2883
|
+
writeValue(obj) {
|
|
2884
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
2885
|
+
this.EvaluatedModel = this.BoundSource.find(t => t.id == obj)?.description;
|
|
2886
|
+
super.writeValue(obj);
|
|
2887
|
+
}
|
|
2888
|
+
/** @ignore */
|
|
3023
2889
|
onNotNullValueSet() { }
|
|
3024
2890
|
}
|
|
3025
|
-
FormSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
3026
|
-
FormSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormSelectComponent, selector: "form-select", inputs: { SelectLabel: "SelectLabel", PlaceholderValue: "PlaceholderValue", RequiredPlaceholder: "RequiredPlaceholder", EmptyFieldValue: "EmptyFieldValue", ShowValidationSymbol: "ShowValidationSymbol" }, providers: [{ provide: LocalizationService, useClass: FormSelectComponentLoc }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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>", components: [{ type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2891
|
+
FormSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2892
|
+
FormSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormSelectComponent, selector: "form-select", inputs: { SelectLabel: "SelectLabel", PlaceholderValue: "PlaceholderValue", RequiredPlaceholder: "RequiredPlaceholder", EmptyFieldValue: "EmptyFieldValue", ShowValidationSymbol: "ShowValidationSymbol" }, providers: [{ provide: LocalizationService, useClass: FormSelectComponentLoc }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3027
2893
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormSelectComponent, decorators: [{
|
|
3028
2894
|
type: Component,
|
|
3029
|
-
args: [{ selector: "form-select", providers: [{ provide: LocalizationService, useClass: FormSelectComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
2895
|
+
args: [{ selector: "form-select", providers: [{ provide: LocalizationService, useClass: FormSelectComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
3030
2896
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i2$1.NgControl, decorators: [{
|
|
3031
2897
|
type: Optional
|
|
3032
2898
|
}, {
|
|
@@ -3036,15 +2902,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3036
2902
|
}, {
|
|
3037
2903
|
type: Inject,
|
|
3038
2904
|
args: [NG_VALIDATORS]
|
|
3039
|
-
}] }, { type:
|
|
2905
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
3040
2906
|
type: Optional
|
|
3041
|
-
}] }, { type:
|
|
2907
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
3042
2908
|
type: Optional
|
|
3043
2909
|
}] }, { type: undefined, decorators: [{
|
|
3044
2910
|
type: Optional
|
|
3045
2911
|
}, {
|
|
3046
2912
|
type: Inject,
|
|
3047
2913
|
args: [ACO_CUSTOMKEY]
|
|
2914
|
+
}] }, { type: undefined, decorators: [{
|
|
2915
|
+
type: Optional
|
|
2916
|
+
}, {
|
|
2917
|
+
type: Inject,
|
|
2918
|
+
args: [FAV_DEBUG_MODE]
|
|
3048
2919
|
}] }]; }, propDecorators: { SelectLabel: [{
|
|
3049
2920
|
type: Input
|
|
3050
2921
|
}], PlaceholderValue: [{
|
|
@@ -3090,13 +2961,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3090
2961
|
* utilizzato internamente (angular2-multiselect) non è stato assolutamente pensato per essere usato con **ChangeDetectionStrategy.OnPush**
|
|
3091
2962
|
*/
|
|
3092
2963
|
class FormMultiSelectComponent extends BaseFormControl {
|
|
3093
|
-
/**
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
* @ignore
|
|
3097
|
-
*/
|
|
3098
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3099
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
2964
|
+
/** @ignore Costruttore */
|
|
2965
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2966
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
3100
2967
|
this.lc = lc;
|
|
3101
2968
|
/**
|
|
3102
2969
|
* Modello temporaneo **NON** compatibile in maniera diretta con il componente **angular2-multiselect** usato internamente
|
|
@@ -3104,28 +2971,18 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3104
2971
|
* Serve da appoggio per effettuare un re-bind qualora la sorgente cambiasse e qualora **RebindModelAfterSource** fosse true
|
|
3105
2972
|
*/
|
|
3106
2973
|
this.TmpModel = [];
|
|
3107
|
-
/**
|
|
3108
|
-
* 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
|
|
3109
|
-
*/
|
|
2974
|
+
/** 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 */
|
|
3110
2975
|
this.RebindModelAfterSource = false;
|
|
3111
|
-
/**
|
|
3112
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3113
|
-
*/
|
|
2976
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3114
2977
|
this.SelectLabel = "";
|
|
3115
|
-
/**
|
|
3116
|
-
* Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue
|
|
3117
|
-
*/
|
|
2978
|
+
/** Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue */
|
|
3118
2979
|
this.UseKeyValues = false;
|
|
3119
|
-
/**
|
|
3120
|
-
* Impostazioni del componente interno **angular2-multiselect**
|
|
3121
|
-
*/
|
|
2980
|
+
/** Impostazioni del componente interno **angular2-multiselect** */
|
|
3122
2981
|
this.Settings = null;
|
|
3123
2982
|
// Default dei settings per evitare che siano mai nulli, altrimenti il cazzo di CuppaLab salta in araia che è veramente una bellezza
|
|
3124
2983
|
this.evaluateSettings(false);
|
|
3125
2984
|
}
|
|
3126
|
-
/**
|
|
3127
|
-
* @ignore
|
|
3128
|
-
*/
|
|
2985
|
+
/** @ignore */
|
|
3129
2986
|
async ngOnChanges(changes) {
|
|
3130
2987
|
const newSource = changes["Source"];
|
|
3131
2988
|
if (newSource) {
|
|
@@ -3154,9 +3011,7 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3154
3011
|
tagToBody: false
|
|
3155
3012
|
};
|
|
3156
3013
|
}
|
|
3157
|
-
/**
|
|
3158
|
-
* @ignore
|
|
3159
|
-
*/
|
|
3014
|
+
/** @ignore */
|
|
3160
3015
|
onNotNullValueSet() { }
|
|
3161
3016
|
/**
|
|
3162
3017
|
* Indica se il comopnente in questione è in grado di gestire ngControl nulli.
|
|
@@ -3167,9 +3022,7 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3167
3022
|
handleNullNgControl() {
|
|
3168
3023
|
return true;
|
|
3169
3024
|
}
|
|
3170
|
-
/**
|
|
3171
|
-
* @ignore Override per gestire input in ingresso
|
|
3172
|
-
*/
|
|
3025
|
+
/** @ignore Override per gestire input in ingresso */
|
|
3173
3026
|
writeValue(obj) {
|
|
3174
3027
|
this.TmpModel = obj;
|
|
3175
3028
|
let toPass = [];
|
|
@@ -3184,11 +3037,10 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3184
3037
|
this.RebindModelAfterSource = true;
|
|
3185
3038
|
});
|
|
3186
3039
|
}
|
|
3040
|
+
this.EvaluatedModel = toPass.map(t => t.description).join(', ');
|
|
3187
3041
|
super.writeValue(toPass);
|
|
3188
3042
|
}
|
|
3189
|
-
/**
|
|
3190
|
-
* @ignore Override per gestire input in uscita
|
|
3191
|
-
*/
|
|
3043
|
+
/** @ignore Override per gestire input in uscita */
|
|
3192
3044
|
changed() {
|
|
3193
3045
|
let toEmit = null;
|
|
3194
3046
|
if (!this.UseKeyValues)
|
|
@@ -3199,11 +3051,11 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3199
3051
|
super.finalized();
|
|
3200
3052
|
}
|
|
3201
3053
|
}
|
|
3202
|
-
FormMultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormMultiSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
3203
|
-
FormMultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormMultiSelectComponent, selector: "form-multiselect", inputs: { SelectLabel: "SelectLabel", UseKeyValues: "UseKeyValues" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, 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>", 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-up,.arrow-down{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}.select-all,.list-filter{border-bottom:1px solid #ccc}.list-filter .c-search svg{fill:#888}.list-filter .c-clear 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:0px 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}\n"], components: [{ type: i4$3.AngularMultiSelect, selector: "angular2-multiselect", inputs: ["settings", "data", "loading"], outputs: ["onSelect", "onDeSelect", "onSelectAll", "onDeSelectAll", "onOpen", "onClose", "onScrollToEnd", "onFilterSelectAll", "onFilterDeSelectAll", "onAddFilterNewItem", "onGroupSelect", "onGroupDeSelect"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], viewProviders: [{ provide: LocalizationService, useClass: FormMultiSelectComponentLoc }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3054
|
+
FormMultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormMultiSelectComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3055
|
+
FormMultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormMultiSelectComponent, selector: "form-multiselect", inputs: { SelectLabel: "SelectLabel", UseKeyValues: "UseKeyValues" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", 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-up,.arrow-down{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}.select-all,.list-filter{border-bottom:1px solid #ccc}.list-filter .c-search svg{fill:#888}.list-filter .c-clear 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:0px 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}\n"], components: [{ type: i4$3.AngularMultiSelect, selector: "angular2-multiselect", inputs: ["settings", "data", "loading"], outputs: ["onSelect", "onDeSelect", "onSelectAll", "onDeSelectAll", "onOpen", "onClose", "onScrollToEnd", "onFilterSelectAll", "onFilterDeSelectAll", "onAddFilterNewItem", "onGroupSelect", "onGroupDeSelect"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], viewProviders: [{ provide: LocalizationService, useClass: FormMultiSelectComponentLoc }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3204
3056
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormMultiSelectComponent, decorators: [{
|
|
3205
3057
|
type: Component,
|
|
3206
|
-
args: [{ selector: "form-multiselect", viewProviders: [{ provide: LocalizationService, useClass: FormMultiSelectComponentLoc }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, 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>", 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-up,.arrow-down{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}.select-all,.list-filter{border-bottom:1px solid #ccc}.list-filter .c-search svg{fill:#888}.list-filter .c-clear 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:0px 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}\n"] }]
|
|
3058
|
+
args: [{ selector: "form-multiselect", viewProviders: [{ provide: LocalizationService, useClass: FormMultiSelectComponentLoc }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, 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}} m-t-5\" [class.app-strong]=\"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>", 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-up,.arrow-down{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}.select-all,.list-filter{border-bottom:1px solid #ccc}.list-filter .c-search svg{fill:#888}.list-filter .c-clear 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:0px 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}\n"] }]
|
|
3207
3059
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i2$1.NgControl, decorators: [{
|
|
3208
3060
|
type: Optional
|
|
3209
3061
|
}, {
|
|
@@ -3213,15 +3065,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3213
3065
|
}, {
|
|
3214
3066
|
type: Inject,
|
|
3215
3067
|
args: [NG_VALIDATORS]
|
|
3216
|
-
}] }, { type:
|
|
3068
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
3217
3069
|
type: Optional
|
|
3218
|
-
}] }, { type:
|
|
3070
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
3219
3071
|
type: Optional
|
|
3220
3072
|
}] }, { type: undefined, decorators: [{
|
|
3221
3073
|
type: Optional
|
|
3222
3074
|
}, {
|
|
3223
3075
|
type: Inject,
|
|
3224
3076
|
args: [ACO_CUSTOMKEY]
|
|
3077
|
+
}] }, { type: undefined, decorators: [{
|
|
3078
|
+
type: Optional
|
|
3079
|
+
}, {
|
|
3080
|
+
type: Inject,
|
|
3081
|
+
args: [FAV_DEBUG_MODE]
|
|
3225
3082
|
}] }]; }, propDecorators: { SelectLabel: [{
|
|
3226
3083
|
type: Input
|
|
3227
3084
|
}], UseKeyValues: [{
|
|
@@ -3229,28 +3086,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3229
3086
|
}] } });
|
|
3230
3087
|
|
|
3231
3088
|
// Angular
|
|
3232
|
-
/**
|
|
3233
|
-
* Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve
|
|
3234
|
-
*/
|
|
3089
|
+
/** Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve */
|
|
3235
3090
|
class FormTextareaComponent extends BaseFormControl {
|
|
3236
|
-
/**
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
* @ignore
|
|
3240
|
-
*/
|
|
3241
|
-
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3242
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
3091
|
+
/** @ignore Costruttore */
|
|
3092
|
+
constructor(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3093
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
3243
3094
|
}
|
|
3244
|
-
/**
|
|
3245
|
-
|
|
3246
|
-
|
|
3095
|
+
/** @ignore */
|
|
3096
|
+
writeValue(obj) {
|
|
3097
|
+
this.EvaluatedModel = obj?.toString() || "";
|
|
3098
|
+
super.writeValue(obj);
|
|
3099
|
+
}
|
|
3100
|
+
/** @ignore */
|
|
3247
3101
|
onNotNullValueSet() { }
|
|
3248
3102
|
}
|
|
3249
|
-
FormTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTextareaComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
3250
|
-
FormTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormTextareaComponent, selector: "form-textarea", inputs: { Rows: "Rows" }, usesInheritance: true, ngImport: i0, 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>", components: [{ type: ValidationTextAreaComponent, selector: "val-textarea", inputs: ["rows"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3103
|
+
FormTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTextareaComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3104
|
+
FormTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormTextareaComponent, selector: "form-textarea", inputs: { Rows: "Rows" }, usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationTextAreaComponent, selector: "val-textarea", inputs: ["rows"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3251
3105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTextareaComponent, decorators: [{
|
|
3252
3106
|
type: Component,
|
|
3253
|
-
args: [{ selector: "form-textarea", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
3107
|
+
args: [{ selector: "form-textarea", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
3254
3108
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$1.NgControl, decorators: [{
|
|
3255
3109
|
type: Optional
|
|
3256
3110
|
}, {
|
|
@@ -3260,15 +3114,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3260
3114
|
}, {
|
|
3261
3115
|
type: Inject,
|
|
3262
3116
|
args: [NG_VALIDATORS]
|
|
3263
|
-
}] }, { type:
|
|
3117
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
3264
3118
|
type: Optional
|
|
3265
|
-
}] }, { type:
|
|
3119
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
3266
3120
|
type: Optional
|
|
3267
3121
|
}] }, { type: undefined, decorators: [{
|
|
3268
3122
|
type: Optional
|
|
3269
3123
|
}, {
|
|
3270
3124
|
type: Inject,
|
|
3271
3125
|
args: [ACO_CUSTOMKEY]
|
|
3126
|
+
}] }, { type: undefined, decorators: [{
|
|
3127
|
+
type: Optional
|
|
3128
|
+
}, {
|
|
3129
|
+
type: Inject,
|
|
3130
|
+
args: [FAV_DEBUG_MODE]
|
|
3272
3131
|
}] }]; }, propDecorators: { Rows: [{
|
|
3273
3132
|
type: Input
|
|
3274
3133
|
}] } });
|
|
@@ -3296,55 +3155,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3296
3155
|
}] }]; } });
|
|
3297
3156
|
|
|
3298
3157
|
// Angular
|
|
3299
|
-
/**
|
|
3300
|
-
* Componente di input che si auto-completa in base al valore attuale
|
|
3301
|
-
*/
|
|
3158
|
+
/** Componente di input che si auto-completa in base al valore attuale */
|
|
3302
3159
|
class FormAutocompleteComponent extends BaseFormControl {
|
|
3303
|
-
/**
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
* @ignore
|
|
3307
|
-
*/
|
|
3308
|
-
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3309
|
-
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY);
|
|
3160
|
+
/** @ignore Costruttore */
|
|
3161
|
+
constructor(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3162
|
+
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE);
|
|
3310
3163
|
this.lc = lc;
|
|
3311
|
-
/**
|
|
3312
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3313
|
-
*/
|
|
3164
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3314
3165
|
this.SelectLabel = "";
|
|
3315
|
-
/**
|
|
3316
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
3317
|
-
*/
|
|
3166
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
3318
3167
|
this.SearchFunction = null;
|
|
3319
|
-
/**
|
|
3320
|
-
* Numero minimo di caratteri con cui cercare
|
|
3321
|
-
*/
|
|
3168
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
3322
3169
|
this.MinChars = 3;
|
|
3323
|
-
/**
|
|
3324
|
-
* Override del placeholder per select requried
|
|
3325
|
-
*/
|
|
3170
|
+
/** Override del placeholder per select requried */
|
|
3326
3171
|
this.RequiredPlaceholder = null;
|
|
3327
|
-
/**
|
|
3328
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
3329
|
-
*/
|
|
3172
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
3330
3173
|
this.CaseSensitive = false;
|
|
3331
3174
|
/**
|
|
3332
3175
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
3333
3176
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
3334
3177
|
*/
|
|
3335
3178
|
this.ignoreNextWriteValue = false;
|
|
3336
|
-
/**
|
|
3337
|
-
* Sorgente Bindata Filtrata in base al contenuto della casella di testo
|
|
3338
|
-
*/
|
|
3179
|
+
/** Sorgente Bindata Filtrata in base al contenuto della casella di testo */
|
|
3339
3180
|
this.FilteredBoundSource = [];
|
|
3340
3181
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
3341
3182
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
3342
3183
|
/** @ignore */
|
|
3343
3184
|
this.executionTimers = {};
|
|
3344
3185
|
}
|
|
3345
|
-
/**
|
|
3346
|
-
* @ignore
|
|
3347
|
-
*/
|
|
3186
|
+
/** @ignore */
|
|
3348
3187
|
writeValue(value) {
|
|
3349
3188
|
if (!value)
|
|
3350
3189
|
return;
|
|
@@ -3367,6 +3206,7 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3367
3206
|
var val = this.Source.find(t => t.id == value);
|
|
3368
3207
|
this.propagateChange(val ? val.id : value);
|
|
3369
3208
|
this.Model = val ? val.description : value;
|
|
3209
|
+
this.EvaluatedModel = this.Model;
|
|
3370
3210
|
}
|
|
3371
3211
|
/**
|
|
3372
3212
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -3409,9 +3249,7 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3409
3249
|
}, 100);
|
|
3410
3250
|
}
|
|
3411
3251
|
}
|
|
3412
|
-
/**
|
|
3413
|
-
* @ignore
|
|
3414
|
-
*/
|
|
3252
|
+
/** @ignore */
|
|
3415
3253
|
ngOnChanges(changes) {
|
|
3416
3254
|
let newSource = changes["Source"];
|
|
3417
3255
|
if (newSource) {
|
|
@@ -3424,18 +3262,12 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3424
3262
|
this.cdr.markForCheck();
|
|
3425
3263
|
}
|
|
3426
3264
|
}
|
|
3427
|
-
/**
|
|
3428
|
-
* @ignore
|
|
3429
|
-
*
|
|
3430
|
-
* Override che marca anche il prossimo evento di filterSource da ignorare
|
|
3431
|
-
*/
|
|
3265
|
+
/** @ignore Override che marca anche il prossimo evento di filterSource da ignorare */
|
|
3432
3266
|
changed(forcedValue = null, markForCheck = false) {
|
|
3433
3267
|
this.ignoreNextWriteValue = true;
|
|
3434
3268
|
super.changed(forcedValue, markForCheck);
|
|
3435
3269
|
}
|
|
3436
|
-
/**
|
|
3437
|
-
* @ignore
|
|
3438
|
-
*/
|
|
3270
|
+
/** @ignore */
|
|
3439
3271
|
onNotNullValueSet() { }
|
|
3440
3272
|
/** @ignore */
|
|
3441
3273
|
throttla(id, func, throttleTime) {
|
|
@@ -3446,11 +3278,11 @@ class FormAutocompleteComponent extends BaseFormControl {
|
|
|
3446
3278
|
this.executionTimers[id] = setTimeout(() => { func(); this.executionTimers[id] = null; }, throttleTime);
|
|
3447
3279
|
}
|
|
3448
3280
|
}
|
|
3449
|
-
FormAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token:
|
|
3450
|
-
FormAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormAutocompleteComponent, selector: "form-autocomplete", inputs: { SelectLabel: "SelectLabel", SearchFunction: "SearchFunction", MinChars: "MinChars", RequiredPlaceholder: "RequiredPlaceholder", CaseSensitive: "CaseSensitive" }, providers: [{ provide: LocalizationService, useClass: FormAutocompleteComponentLoc }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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>", components: [{ type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3281
|
+
FormAutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3$1.AccessControlService, optional: true }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3282
|
+
FormAutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormAutocompleteComponent, selector: "form-autocomplete", inputs: { SelectLabel: "SelectLabel", SearchFunction: "SearchFunction", MinChars: "MinChars", RequiredPlaceholder: "RequiredPlaceholder", CaseSensitive: "CaseSensitive" }, providers: [{ provide: LocalizationService, useClass: FormAutocompleteComponentLoc }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "localize": i1.LocalizePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3451
3283
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormAutocompleteComponent, decorators: [{
|
|
3452
3284
|
type: Component,
|
|
3453
|
-
args: [{ selector: "form-autocomplete", providers: [{ provide: LocalizationService, useClass: FormAutocompleteComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
3285
|
+
args: [{ selector: "form-autocomplete", providers: [{ provide: LocalizationService, useClass: FormAutocompleteComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
3454
3286
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i2$1.NgControl, decorators: [{
|
|
3455
3287
|
type: Optional
|
|
3456
3288
|
}, {
|
|
@@ -3460,15 +3292,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3460
3292
|
}, {
|
|
3461
3293
|
type: Inject,
|
|
3462
3294
|
args: [NG_VALIDATORS]
|
|
3463
|
-
}] }, { type:
|
|
3295
|
+
}] }, { type: i3$1.AccessControlService, decorators: [{
|
|
3464
3296
|
type: Optional
|
|
3465
|
-
}] }, { type:
|
|
3297
|
+
}] }, { type: i3$1.ComponentContext, decorators: [{
|
|
3466
3298
|
type: Optional
|
|
3467
3299
|
}] }, { type: undefined, decorators: [{
|
|
3468
3300
|
type: Optional
|
|
3469
3301
|
}, {
|
|
3470
3302
|
type: Inject,
|
|
3471
3303
|
args: [ACO_CUSTOMKEY]
|
|
3304
|
+
}] }, { type: undefined, decorators: [{
|
|
3305
|
+
type: Optional
|
|
3306
|
+
}, {
|
|
3307
|
+
type: Inject,
|
|
3308
|
+
args: [FAV_DEBUG_MODE]
|
|
3472
3309
|
}] }]; }, propDecorators: { SelectLabel: [{
|
|
3473
3310
|
type: Input
|
|
3474
3311
|
}], SearchFunction: [{
|
|
@@ -3482,35 +3319,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3482
3319
|
}] } });
|
|
3483
3320
|
|
|
3484
3321
|
// Angular
|
|
3485
|
-
/**
|
|
3486
|
-
* Componente che identifica la selezione di un orario
|
|
3487
|
-
*/
|
|
3322
|
+
/** Componente che identifica la selezione di un orario */
|
|
3488
3323
|
class FormTimeComponent extends BaseFormControl {
|
|
3489
|
-
/**
|
|
3490
|
-
* @ignore
|
|
3491
|
-
*/
|
|
3324
|
+
/** @ignore */
|
|
3492
3325
|
constructor(cdr, dateAdapter, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3493
3326
|
super(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true);
|
|
3494
3327
|
this.dateAdapter = dateAdapter;
|
|
3495
|
-
/**
|
|
3496
|
-
* Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi)
|
|
3497
|
-
*/
|
|
3328
|
+
/** Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi) */
|
|
3498
3329
|
this.ShowSpinners = false;
|
|
3499
|
-
/**
|
|
3500
|
-
* Imposta lo step (minimo avanzamento) per la cella "ore"
|
|
3501
|
-
*/
|
|
3330
|
+
/** Imposta lo step (minimo avanzamento) per la cella "ore" */
|
|
3502
3331
|
this.StepHour = 1;
|
|
3503
|
-
/**
|
|
3504
|
-
* Imposta lo step (minimo avanzamento) per la cella "minuti"
|
|
3505
|
-
*/
|
|
3332
|
+
/** Imposta lo step (minimo avanzamento) per la cella "minuti" */
|
|
3506
3333
|
this.StepMinute = 1;
|
|
3507
|
-
/**
|
|
3508
|
-
* Imposta lo step (minimo avanzamento) per la cella "secondi"
|
|
3509
|
-
*/
|
|
3334
|
+
/** Imposta lo step (minimo avanzamento) per la cella "secondi" */
|
|
3510
3335
|
this.StepSecond = 5;
|
|
3511
|
-
/**
|
|
3512
|
-
* Indica se mostrare i secondi o meno
|
|
3513
|
-
*/
|
|
3336
|
+
/** Indica se mostrare i secondi o meno */
|
|
3514
3337
|
this.ShowSeconds = false;
|
|
3515
3338
|
/**
|
|
3516
3339
|
* Indica il formato da utilizzare sia in Input che in Output
|
|
@@ -3523,28 +3346,27 @@ class FormTimeComponent extends BaseFormControl {
|
|
|
3523
3346
|
*/
|
|
3524
3347
|
this.InOutFormat = 'timestring';
|
|
3525
3348
|
}
|
|
3526
|
-
/**
|
|
3527
|
-
* @ignore Override per gestire input in ingresso
|
|
3528
|
-
*/
|
|
3349
|
+
/** @ignore Override per gestire input in ingresso */
|
|
3529
3350
|
writeValue(obj) {
|
|
3530
|
-
const [hours, minutes, seconds] = (obj || "0:0:0").split(":");
|
|
3531
3351
|
//Qualsiasi cosa mi arrivi devo ricondurla a un dayjs
|
|
3532
3352
|
switch (this.InOutFormat) {
|
|
3533
3353
|
case 'date':
|
|
3534
3354
|
obj = dayjs(obj);
|
|
3355
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3535
3356
|
break;
|
|
3536
3357
|
case 'timestring':
|
|
3537
|
-
|
|
3358
|
+
const [hours, minutes, seconds] = (obj || "00:00:00").split(":");
|
|
3359
|
+
obj = dayjs().hour(parseInt(hours ?? 0)).minute(parseInt(minutes ?? 0)).second(parseInt(seconds ?? 0));
|
|
3360
|
+
this.EvaluatedModel = `${hours || '00'}:${minutes || '00'}:${seconds || '00'}`;
|
|
3538
3361
|
break;
|
|
3539
3362
|
case 'dayjs':
|
|
3540
3363
|
obj = obj;
|
|
3364
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3541
3365
|
break;
|
|
3542
3366
|
}
|
|
3543
3367
|
super.writeValue(obj);
|
|
3544
3368
|
}
|
|
3545
|
-
/**
|
|
3546
|
-
* @ignore Override per gestire input in uscita
|
|
3547
|
-
*/
|
|
3369
|
+
/** @ignore Override per gestire input in uscita */
|
|
3548
3370
|
changed() {
|
|
3549
3371
|
var toEmit = this.dateAdapter.clone(this.Model);
|
|
3550
3372
|
switch (this.InOutFormat) {
|
|
@@ -3560,16 +3382,14 @@ class FormTimeComponent extends BaseFormControl {
|
|
|
3560
3382
|
}
|
|
3561
3383
|
super.changed(toEmit);
|
|
3562
3384
|
}
|
|
3563
|
-
/**
|
|
3564
|
-
* @ignore
|
|
3565
|
-
*/
|
|
3385
|
+
/** @ignore */
|
|
3566
3386
|
onNotNullValueSet() { }
|
|
3567
3387
|
}
|
|
3568
|
-
FormTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTimeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$2.NgxMatDateAdapter }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, host: true, optional: true }, { token:
|
|
3569
|
-
FormTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormTimeComponent, selector: "form-time", inputs: { ShowSpinners: "ShowSpinners", StepHour: "StepHour", StepMinute: "StepMinute", StepSecond: "StepSecond", ShowSeconds: "ShowSeconds", InOutFormat: "InOutFormat" }, usesInheritance: true, ngImport: i0, 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>", components: [{ type: i2$2.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3388
|
+
FormTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTimeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$2.NgxMatDateAdapter }, { token: i2$1.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, host: true, optional: true }, { token: i3$1.AccessControlService }, { token: i3$1.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
3389
|
+
FormTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: FormTimeComponent, selector: "form-time", inputs: { ShowSpinners: "ShowSpinners", StepHour: "StepHour", StepMinute: "StepMinute", StepSecond: "StepSecond", ShowSeconds: "ShowSeconds", InOutFormat: "InOutFormat" }, usesInheritance: true, ngImport: i0, 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}} m-t-5\" [class.app-strong]=\"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>", components: [{ type: i2$2.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3570
3390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: FormTimeComponent, decorators: [{
|
|
3571
3391
|
type: Component,
|
|
3572
|
-
args: [{ selector: "form-time", changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
|
|
3392
|
+
args: [{ selector: "form-time", changeDetection: ChangeDetectionStrategy.OnPush, 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}} m-t-5\" [class.app-strong]=\"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>" }]
|
|
3573
3393
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i2$2.NgxMatDateAdapter }, { type: i2$1.NgControl, decorators: [{
|
|
3574
3394
|
type: Optional
|
|
3575
3395
|
}, {
|
|
@@ -3581,7 +3401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImpor
|
|
|
3581
3401
|
}, {
|
|
3582
3402
|
type: Inject,
|
|
3583
3403
|
args: [NG_VALIDATORS]
|
|
3584
|
-
}] }, { type:
|
|
3404
|
+
}] }, { type: i3$1.AccessControlService }, { type: i3$1.ComponentContext, decorators: [{
|
|
3585
3405
|
type: Optional
|
|
3586
3406
|
}] }, { type: undefined, decorators: [{
|
|
3587
3407
|
type: Optional
|
|
@@ -3673,6 +3493,7 @@ class FormsAndValidationsModule {
|
|
|
3673
3493
|
ngModule: FormsAndValidationsModule,
|
|
3674
3494
|
providers: [
|
|
3675
3495
|
{ provide: FAV_LOCALE, useValue: config?.locale || 'it-IT' },
|
|
3496
|
+
{ provide: FAV_DEBUG_MODE, useValue: config?.debugMode != null ? config?.debugMode : false },
|
|
3676
3497
|
{ provide: ACO_CUSTOMKEY, useValue: config?.acocustom || null },
|
|
3677
3498
|
{ provide: NGX_MAT_DATE_FORMATS, useValue: formats_long },
|
|
3678
3499
|
{ provide: NgxMatDateAdapter, useClass: NgxExpandedDayJsDateAdapter },
|