@esfaenza/forms-and-validations 11.2.65 → 11.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/esfaenza-forms-and-validations.umd.js +306 -520
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.d.ts +9 -9
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/esfaenza-forms-and-validations.js +10 -10
- package/esm2015/lib/forms/base-form-control.js +61 -118
- package/esm2015/lib/forms/form-adaptive/form-adaptive.component.js +49 -65
- package/esm2015/lib/forms/form-autocomplete/form-autocomplete.component.js +20 -46
- package/esm2015/lib/forms/form-checkbox/form-checkbox.component.js +15 -14
- package/esm2015/lib/forms/form-date/form-date.component.js +19 -20
- package/esm2015/lib/forms/form-datetime/form-datetime.component.js +18 -17
- package/esm2015/lib/forms/form-empty/form-empty.component.js +4 -10
- package/esm2015/lib/forms/form-error/form-error.component.js +6 -16
- package/esm2015/lib/forms/form-file/form-file.component.js +15 -29
- package/esm2015/lib/forms/form-info/form-info.component.js +6 -16
- package/esm2015/lib/forms/form-input/form-input.component.js +21 -35
- package/esm2015/lib/forms/form-multiselect/form-multiselect.component.js +17 -35
- package/esm2015/lib/forms/form-select/form-select.component.js +25 -30
- package/esm2015/lib/forms/form-template/form-template.component.js +10 -28
- package/esm2015/lib/forms/form-textarea/form-textarea.component.js +15 -17
- package/esm2015/lib/forms/form-time/form-time.component.js +17 -34
- package/esm2015/lib/forms-and-validations.module.js +3 -2
- package/esm2015/lib/models/FormsAndValidationsModuleConfig.js +1 -1
- package/esm2015/lib/tokens.js +5 -7
- package/fesm2015/esfaenza-forms-and-validations.js +296 -512
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/forms/base-form-control.d.ts +56 -130
- package/lib/forms/form-adaptive/form-adaptive.component.d.ts +25 -72
- package/lib/forms/form-autocomplete/form-autocomplete.component.d.ts +13 -41
- package/lib/forms/form-checkbox/form-checkbox.component.d.ts +8 -12
- package/lib/forms/form-date/form-date.component.d.ts +9 -15
- package/lib/forms/form-datetime/form-datetime.component.d.ts +8 -12
- package/lib/forms/form-empty/form-empty.component.d.ts +3 -9
- package/lib/forms/form-error/form-error.component.d.ts +5 -15
- package/lib/forms/form-file/form-file.component.d.ts +9 -27
- package/lib/forms/form-info/form-info.component.d.ts +5 -15
- package/lib/forms/form-input/form-input.component.d.ts +14 -36
- package/lib/forms/form-multiselect/form-multiselect.component.d.ts +10 -30
- package/lib/forms/form-select/form-select.component.d.ts +11 -24
- package/lib/forms/form-template/form-template.component.d.ts +9 -27
- package/lib/forms/form-textarea/form-textarea.component.d.ts +7 -15
- package/lib/forms/form-time/form-time.component.d.ts +10 -30
- package/lib/models/FormsAndValidationsModuleConfig.d.ts +6 -8
- package/lib/tokens.d.ts +4 -6
- package/package.json +1 -1
|
@@ -418,14 +418,12 @@
|
|
|
418
418
|
{ type: String, decorators: [{ type: core.Inject, args: [core$1.MAT_DATE_LOCALE,] }] }
|
|
419
419
|
]; };
|
|
420
420
|
|
|
421
|
-
/**
|
|
422
|
-
* Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US"
|
|
423
|
-
*/
|
|
421
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
424
422
|
var FAV_LOCALE = new core.InjectionToken('FAV_LOCALE');
|
|
425
|
-
/**
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
var
|
|
423
|
+
/** Chiave che indica il prefisso dei Contesti Applicativi per permettere l'abilitazione/disabilitazione di input in maniera contestuale */
|
|
424
|
+
var ACO_CUSTOMKEY = new core.InjectionToken('ACO_CUSTOMKEY');
|
|
425
|
+
/** Token che indica la lingua da utilizzare, sono supportate "it-IT" ed "en-US" */
|
|
426
|
+
var FAV_DEBUG_MODE = new core.InjectionToken('FAV_DEBUG_MODE');
|
|
429
427
|
|
|
430
428
|
// Angular
|
|
431
429
|
/**
|
|
@@ -1734,16 +1732,10 @@
|
|
|
1734
1732
|
};
|
|
1735
1733
|
|
|
1736
1734
|
// Angular
|
|
1737
|
-
/**
|
|
1738
|
-
* Componente base da cui tutti i componenti Form implementano
|
|
1739
|
-
*/
|
|
1735
|
+
/** Componente base da cui tutti i componenti Form implementano */
|
|
1740
1736
|
var BaseFormControl = /** @class */ (function () {
|
|
1741
|
-
/**
|
|
1742
|
-
|
|
1743
|
-
*
|
|
1744
|
-
* @ignore
|
|
1745
|
-
*/
|
|
1746
|
-
function BaseFormControl(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, nativeInput) {
|
|
1737
|
+
/** @ignore Costruttore */
|
|
1738
|
+
function BaseFormControl(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE, nativeInput) {
|
|
1747
1739
|
if (nativeInput === void 0) { nativeInput = false; }
|
|
1748
1740
|
this.cdr = cdr;
|
|
1749
1741
|
this.ngControl = ngControl;
|
|
@@ -1751,6 +1743,7 @@
|
|
|
1751
1743
|
this.ac = ac;
|
|
1752
1744
|
this.AppContext = AppContext;
|
|
1753
1745
|
this.ACO_CUSTOMKEY = ACO_CUSTOMKEY;
|
|
1746
|
+
this.FAV_DEBUG_MODE = FAV_DEBUG_MODE;
|
|
1754
1747
|
this.nativeInput = nativeInput;
|
|
1755
1748
|
/**
|
|
1756
1749
|
* https://github.com/angular/angular/issues/14988
|
|
@@ -1759,13 +1752,9 @@
|
|
|
1759
1752
|
* poi mettendo firstBind a false di lì in poi funziono come devo. Vista la casistica evito essenzialmente metà detectChanges
|
|
1760
1753
|
*/
|
|
1761
1754
|
this.firstBind = true;
|
|
1762
|
-
/**
|
|
1763
|
-
* Indica se il campo è obbligatorio i opzionale
|
|
1764
|
-
*/
|
|
1755
|
+
/** Indica se il campo è obbligatorio i opzionale */
|
|
1765
1756
|
this.Required = false;
|
|
1766
|
-
/**
|
|
1767
|
-
* Indica se il Form che contiene questo campo è già stato registrato
|
|
1768
|
-
*/
|
|
1757
|
+
/** Indica se il Form che contiene questo campo è già stato registrato */
|
|
1769
1758
|
this.formHasBennBound = false;
|
|
1770
1759
|
/**
|
|
1771
1760
|
* Indica se questo campo è staccato dal Form, ad esempio nel caso sia in un ng-template proiettato nel form.
|
|
@@ -1773,17 +1762,11 @@
|
|
|
1773
1762
|
* In quel caso la variabile **Form** del componente dev'essere valorizzata
|
|
1774
1763
|
*/
|
|
1775
1764
|
this.detatchedFromform = false;
|
|
1776
|
-
/**
|
|
1777
|
-
* @ignore
|
|
1778
|
-
*/
|
|
1765
|
+
/** @ignore */
|
|
1779
1766
|
this.propagateChange = function (_) { };
|
|
1780
|
-
/**
|
|
1781
|
-
* @ignore
|
|
1782
|
-
*/
|
|
1767
|
+
/** @ignore */
|
|
1783
1768
|
this.onTouched = function () { };
|
|
1784
|
-
/**
|
|
1785
|
-
* @ignore Vedi getter e setter
|
|
1786
|
-
*/
|
|
1769
|
+
/** @ignore Vedi getter e setter */
|
|
1787
1770
|
this._readonly = false;
|
|
1788
1771
|
/**
|
|
1789
1772
|
* Qualora ci fosse un contesto collegato questa variabile identifica se Sono l'Owner o meno.
|
|
@@ -1791,61 +1774,35 @@
|
|
|
1791
1774
|
* Se non lo sono, il campo risulterà in sola lettura
|
|
1792
1775
|
*/
|
|
1793
1776
|
this.AppContextOwnership = true;
|
|
1794
|
-
/**
|
|
1795
|
-
* Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material
|
|
1796
|
-
*/
|
|
1777
|
+
/** Modalità in cui viene mostrato il campo, 1-1 rispetto alle definizioni di Angular Material */
|
|
1797
1778
|
this.FieldAppearence = "outline";
|
|
1798
|
-
/**
|
|
1799
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
1800
|
-
*/
|
|
1779
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
1801
1780
|
this.FormLayout = true;
|
|
1802
|
-
/**
|
|
1803
|
-
|
|
1804
|
-
|
|
1781
|
+
/** 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 */
|
|
1782
|
+
this.DisplayMode = false;
|
|
1783
|
+
/** Definisce se richiamare l'EventEmitter **inputChange** in maniera classica (true) o solo per la change considerate definitive come tasto invio / blur / ecc... (false) */
|
|
1805
1784
|
this.EmitPendingChanges = true;
|
|
1806
|
-
/**
|
|
1807
|
-
* Attiva o disattiva la validazione per questo componente
|
|
1808
|
-
*/
|
|
1785
|
+
/** Attiva o disattiva la validazione per questo componente */
|
|
1809
1786
|
this.Validation = true;
|
|
1810
|
-
/**
|
|
1811
|
-
* Placeholder per quando l'input è vuoto
|
|
1812
|
-
*/
|
|
1787
|
+
/** Placeholder per quando l'input è vuoto */
|
|
1813
1788
|
this.Placeholder = "";
|
|
1814
|
-
/**
|
|
1815
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
1816
|
-
*/
|
|
1789
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
1817
1790
|
this.FormGroupClass = "";
|
|
1818
|
-
/**
|
|
1819
|
-
* Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria
|
|
1820
|
-
*/
|
|
1791
|
+
/** Messaggio da mostrare quando la validazione fallisce per questo componente. Di default viene proposta dalla libreria */
|
|
1821
1792
|
this.FailedValidationMessage = "";
|
|
1822
|
-
/**
|
|
1823
|
-
* Input che forza l'invalidità del componente
|
|
1824
|
-
*/
|
|
1793
|
+
/** Input che forza l'invalidità del componente */
|
|
1825
1794
|
this.ForcedError = false;
|
|
1826
|
-
/**
|
|
1827
|
-
* Mostra un testo a sinistra dell'input (FormLayout permettendo)
|
|
1828
|
-
*/
|
|
1795
|
+
/** Mostra un testo a sinistra dell'input (FormLayout permettendo) */
|
|
1829
1796
|
this.Label = "";
|
|
1830
|
-
/**
|
|
1831
|
-
* col-md-X per la label
|
|
1832
|
-
*/
|
|
1797
|
+
/** col-md-X per la label */
|
|
1833
1798
|
this.LabelColWidth = 4;
|
|
1834
|
-
/**
|
|
1835
|
-
* col-md-X per l'input
|
|
1836
|
-
*/
|
|
1799
|
+
/** col-md-X per l'input */
|
|
1837
1800
|
this.InputColWidth = 8;
|
|
1838
|
-
/**
|
|
1839
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
1840
|
-
*/
|
|
1801
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
1841
1802
|
this.Last = false;
|
|
1842
|
-
/**
|
|
1843
|
-
* Associa il componente Form a questo input
|
|
1844
|
-
*/
|
|
1803
|
+
/** Associa il componente Form a questo input */
|
|
1845
1804
|
this.Form = null;
|
|
1846
|
-
/**
|
|
1847
|
-
* Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source**
|
|
1848
|
-
*/
|
|
1805
|
+
/** Nome della proprietà che contiene l'Id degli oggetti bindati nella **Source** */
|
|
1849
1806
|
this.IdField = 'id';
|
|
1850
1807
|
/**
|
|
1851
1808
|
* Espressione simil-Angular per cambiare il testo dei componenti che scelgono il proprio modello da una **Source**
|
|
@@ -1854,33 +1811,19 @@
|
|
|
1854
1811
|
* È inoltre possibile aggiungere pezzi di descrizione in maniera condizionale con la sintassi **:prop?(Prop vale {prop})**
|
|
1855
1812
|
*/
|
|
1856
1813
|
this.Display = '{description}';
|
|
1857
|
-
/**
|
|
1858
|
-
* Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display**
|
|
1859
|
-
*/
|
|
1814
|
+
/** Risultato dell'unione fra le informazioni degli oggetti in **Source** e le impostazioni specificate nell'Input **Display** */
|
|
1860
1815
|
this.BoundSource = [];
|
|
1861
|
-
/**
|
|
1862
|
-
* Indica se è il primo Bind della Source
|
|
1863
|
-
*/
|
|
1816
|
+
/** Indica se è il primo Bind della Source */
|
|
1864
1817
|
this.SourceFirstBind = true;
|
|
1865
|
-
/**
|
|
1866
|
-
* Evento chiamato alla modifica del valore collegato a questo campo
|
|
1867
|
-
*/
|
|
1818
|
+
/** Evento chiamato alla modifica del valore collegato a questo campo */
|
|
1868
1819
|
this.inputChange = new core.EventEmitter();
|
|
1869
|
-
/**
|
|
1870
|
-
* Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript
|
|
1871
|
-
*/
|
|
1820
|
+
/** Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript */
|
|
1872
1821
|
this.inputFocus = new core.EventEmitter();
|
|
1873
|
-
/**
|
|
1874
|
-
* Evento chiamato al finalize del campo di testo/combo/quelcheè
|
|
1875
|
-
*/
|
|
1822
|
+
/** Evento chiamato al finalize del campo di testo/combo/quelcheè */
|
|
1876
1823
|
this.inputFinalized = new core.EventEmitter();
|
|
1877
|
-
/**
|
|
1878
|
-
* Cache delle condizioni scritte tipo :prop?(Roba con {prop})
|
|
1879
|
-
*/
|
|
1824
|
+
/** Cache delle condizioni scritte tipo :prop?(Roba con {prop}) */
|
|
1880
1825
|
this.BindCheckingGroups = [];
|
|
1881
|
-
/**
|
|
1882
|
-
* Cache delle proprietà scritte tipo --> {prop}
|
|
1883
|
-
*/
|
|
1826
|
+
/** Cache delle proprietà scritte tipo --> {prop} */
|
|
1884
1827
|
this.BindProperties = [];
|
|
1885
1828
|
if (ngControl == null) {
|
|
1886
1829
|
if (!this.handleNullNgControl())
|
|
@@ -1978,6 +1921,7 @@
|
|
|
1978
1921
|
*/
|
|
1979
1922
|
BaseFormControl.prototype.tryBindSourceDisplay = function () {
|
|
1980
1923
|
var _this = this;
|
|
1924
|
+
var _a;
|
|
1981
1925
|
if (!this.Source)
|
|
1982
1926
|
return;
|
|
1983
1927
|
if (this.Source.length == 0 && !this.SourceFirstBind)
|
|
@@ -1995,11 +1939,12 @@
|
|
|
1995
1939
|
// Aggiungo alla BoundSource in formato standard KeyValue
|
|
1996
1940
|
_this.BoundSource.push(_this.transformSourceItem(s));
|
|
1997
1941
|
});
|
|
1942
|
+
// Post trybind se c'è un modello associato ricalcolo l'**EvaluatedModel**
|
|
1943
|
+
if (this.Model)
|
|
1944
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(function (t) { return t.id == _this.Model; })) === null || _a === void 0 ? void 0 : _a.description;
|
|
1998
1945
|
}
|
|
1999
1946
|
};
|
|
2000
|
-
/**
|
|
2001
|
-
* Valuta il contenuto della variabile BindCheckingGroups
|
|
2002
|
-
*/
|
|
1947
|
+
/** Valuta il contenuto della variabile BindCheckingGroups */
|
|
2003
1948
|
BaseFormControl.prototype.evaluateBindCheckingGroups = function () {
|
|
2004
1949
|
var _this = this;
|
|
2005
1950
|
// Blocco per tirare fuori le condizioni scritte tipo --> :prop?(Roba con {prop})
|
|
@@ -2013,9 +1958,7 @@
|
|
|
2013
1958
|
});
|
|
2014
1959
|
}
|
|
2015
1960
|
};
|
|
2016
|
-
/**
|
|
2017
|
-
* Valuta il contenuto della variabile BindProperties
|
|
2018
|
-
*/
|
|
1961
|
+
/** Valuta il contenuto della variabile BindProperties */
|
|
2019
1962
|
BaseFormControl.prototype.evaluateBindProperties = function () {
|
|
2020
1963
|
var _this = this;
|
|
2021
1964
|
// Blocco per tirare fuori le proprietà scritte tipo --> {prop}
|
|
@@ -2054,9 +1997,7 @@
|
|
|
2054
1997
|
BaseFormControl.prototype.handleNullNgControl = function () {
|
|
2055
1998
|
return false;
|
|
2056
1999
|
};
|
|
2057
|
-
/**
|
|
2058
|
-
* @ignore
|
|
2059
|
-
*/
|
|
2000
|
+
/** @ignore */
|
|
2060
2001
|
BaseFormControl.prototype.ngOnInit = function () {
|
|
2061
2002
|
var _this = this;
|
|
2062
2003
|
// A volte nell'ngOnInit non ci passa quindi lo metto sia qui sia nell'afterviewinit, penso che valga per i componenti di terze parti
|
|
@@ -2092,26 +2033,20 @@
|
|
|
2092
2033
|
if (this.detatchedFromform && this.Form)
|
|
2093
2034
|
this.Form.removeControl(this.validationControl);
|
|
2094
2035
|
};
|
|
2095
|
-
/**
|
|
2096
|
-
* Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno
|
|
2097
|
-
*/
|
|
2036
|
+
/** Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno */
|
|
2098
2037
|
BaseFormControl.prototype.checkRequiredValidator = function () {
|
|
2099
2038
|
// controllo se è settato un required per decidere in maniera condizionale se utilizzare il validatore required nel componente interno
|
|
2100
2039
|
// 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
|
|
2101
2040
|
if (this._validators && this._validators.some(function (elem) { return elem instanceof forms.RequiredValidator && elem.required; }))
|
|
2102
2041
|
this.Required = true;
|
|
2103
2042
|
};
|
|
2104
|
-
/**
|
|
2105
|
-
* @ignore
|
|
2106
|
-
*/
|
|
2043
|
+
/** @ignore */
|
|
2107
2044
|
BaseFormControl.prototype.ngAfterViewInit = function () {
|
|
2108
2045
|
if (!this.ngControl)
|
|
2109
2046
|
return;
|
|
2110
2047
|
this.checkRequiredValidator();
|
|
2111
2048
|
};
|
|
2112
|
-
/**
|
|
2113
|
-
* Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante
|
|
2114
|
-
*/
|
|
2049
|
+
/** Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante */
|
|
2115
2050
|
BaseFormControl.prototype.bindResetFunction = function () {
|
|
2116
2051
|
//faccio in modo che se chiamo il reset del controllo (o della form) dall'esterno si resetti anche il controllo nativo
|
|
2117
2052
|
var origFunc = this.ngControl.control.__original_reset__ || this.ngControl.control.reset;
|
|
@@ -2124,9 +2059,7 @@
|
|
|
2124
2059
|
//Per consentire richiami multipli di questa funzione prendendo sempre la fiunzione di reset base
|
|
2125
2060
|
this.ngControl.control.__original_reset__ = origFunc;
|
|
2126
2061
|
};
|
|
2127
|
-
/**
|
|
2128
|
-
* @ignore
|
|
2129
|
-
*/
|
|
2062
|
+
/** @ignore */
|
|
2130
2063
|
BaseFormControl.prototype.writeValue = function (obj) {
|
|
2131
2064
|
if (obj == null && this.firstBind) {
|
|
2132
2065
|
this.firstBind = false;
|
|
@@ -2142,15 +2075,11 @@
|
|
|
2142
2075
|
// setTime*ut che wrappa tutto non va bene sennò spamma delle change detection a suon di interval che rallentano tantissimo l'app
|
|
2143
2076
|
this.cdr.detectChanges();
|
|
2144
2077
|
};
|
|
2145
|
-
/**
|
|
2146
|
-
* @ignore
|
|
2147
|
-
*/
|
|
2078
|
+
/** @ignore */
|
|
2148
2079
|
BaseFormControl.prototype.registerOnChange = function (fn) {
|
|
2149
2080
|
this.propagateChange = fn;
|
|
2150
2081
|
};
|
|
2151
|
-
/**
|
|
2152
|
-
* @ignore
|
|
2153
|
-
*/
|
|
2082
|
+
/** @ignore */
|
|
2154
2083
|
BaseFormControl.prototype.registerOnTouched = function (fn) {
|
|
2155
2084
|
this.onTouched = fn;
|
|
2156
2085
|
};
|
|
@@ -2210,7 +2139,7 @@
|
|
|
2210
2139
|
*/
|
|
2211
2140
|
BaseFormControl.prototype.focused = function (event) {
|
|
2212
2141
|
this.inputFocus.emit(event);
|
|
2213
|
-
|
|
2142
|
+
this.log("Control Focused - " + this.GeneratedName);
|
|
2214
2143
|
};
|
|
2215
2144
|
/**
|
|
2216
2145
|
* @ignore
|
|
@@ -2220,7 +2149,16 @@
|
|
|
2220
2149
|
*/
|
|
2221
2150
|
BaseFormControl.prototype.finalized = function () {
|
|
2222
2151
|
this.inputFinalized.emit();
|
|
2223
|
-
|
|
2152
|
+
this.log("Control Value Finalized - " + this.GeneratedName);
|
|
2153
|
+
};
|
|
2154
|
+
/**
|
|
2155
|
+
* Stampa un log a console
|
|
2156
|
+
*
|
|
2157
|
+
* @param {string} message Messaggio da stampare
|
|
2158
|
+
*/
|
|
2159
|
+
BaseFormControl.prototype.log = function (message) {
|
|
2160
|
+
if (this.FAV_DEBUG_MODE)
|
|
2161
|
+
console.log("@forms-and-validations: " + message);
|
|
2224
2162
|
};
|
|
2225
2163
|
return BaseFormControl;
|
|
2226
2164
|
}());
|
|
@@ -2234,12 +2172,14 @@
|
|
|
2234
2172
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
2235
2173
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
2236
2174
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2175
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] },
|
|
2237
2176
|
{ type: Boolean }
|
|
2238
2177
|
]; };
|
|
2239
2178
|
BaseFormControl.propDecorators = {
|
|
2240
2179
|
FocusSubject: [{ type: core.Input }],
|
|
2241
2180
|
FieldAppearence: [{ type: core.Input }],
|
|
2242
2181
|
FormLayout: [{ type: core.Input }],
|
|
2182
|
+
DisplayMode: [{ type: core.Input }],
|
|
2243
2183
|
EmitPendingChanges: [{ type: core.Input }],
|
|
2244
2184
|
Validation: [{ type: core.Input }],
|
|
2245
2185
|
Placeholder: [{ type: core.Input }],
|
|
@@ -2253,6 +2193,7 @@
|
|
|
2253
2193
|
Form: [{ type: core.Input }],
|
|
2254
2194
|
Source: [{ type: core.Input }],
|
|
2255
2195
|
IdField: [{ type: core.Input }],
|
|
2196
|
+
DisplayModeTemplate: [{ type: core.Input }],
|
|
2256
2197
|
Display: [{ type: core.Input }],
|
|
2257
2198
|
Readonly: [{ type: core.Input }],
|
|
2258
2199
|
LabelInputRatio: [{ type: core.Input }],
|
|
@@ -2286,37 +2227,26 @@
|
|
|
2286
2227
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_LOCALE,] }] }
|
|
2287
2228
|
]; };
|
|
2288
2229
|
|
|
2289
|
-
/**
|
|
2290
|
-
* Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input
|
|
2291
|
-
*/
|
|
2230
|
+
/** Componente che permette all'utente di caricare/scaricare un file all'interno di un campo Input */
|
|
2292
2231
|
var FormFileComponent = /** @class */ (function (_super) {
|
|
2293
2232
|
__extends(FormFileComponent, _super);
|
|
2294
|
-
/**
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
* @ignore
|
|
2298
|
-
*/
|
|
2299
|
-
function FormFileComponent(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc) {
|
|
2300
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
2233
|
+
/** @ignore Costruttore */
|
|
2234
|
+
function FormFileComponent(cdr, utiExts, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, lc, FAV_DEBUG_MODE) {
|
|
2235
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
2301
2236
|
_this.utiExts = utiExts;
|
|
2302
2237
|
_this.lc = lc;
|
|
2303
|
-
/**
|
|
2304
|
-
* Permette di caricare file multipli
|
|
2305
|
-
*/
|
|
2238
|
+
/** Permette di caricare file multipli */
|
|
2306
2239
|
_this.Multiple = false;
|
|
2307
|
-
/**
|
|
2308
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
2309
|
-
*/
|
|
2240
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
2310
2241
|
_this.AllowDownload = true;
|
|
2311
2242
|
//Per questo componente non posso permettermi che il modello sia nullo
|
|
2312
2243
|
_this.Model = new AppFile();
|
|
2313
2244
|
return _this;
|
|
2314
2245
|
}
|
|
2315
|
-
/**
|
|
2316
|
-
* @ignore
|
|
2317
|
-
*/
|
|
2246
|
+
/** @ignore */
|
|
2318
2247
|
FormFileComponent.prototype.writeValue = function (obj) {
|
|
2319
2248
|
var model = obj == null ? new AppFile() : obj;
|
|
2249
|
+
this.EvaluatedModel = model.filename;
|
|
2320
2250
|
_super.prototype.writeValue.call(this, model);
|
|
2321
2251
|
if (obj == null)
|
|
2322
2252
|
this.changed();
|
|
@@ -2347,16 +2277,12 @@
|
|
|
2347
2277
|
}
|
|
2348
2278
|
this.changed(null, true);
|
|
2349
2279
|
};
|
|
2350
|
-
/**
|
|
2351
|
-
* Permette di scaricare l'eventuale file selezionato
|
|
2352
|
-
*/
|
|
2280
|
+
/** Permette di scaricare l'eventuale file selezionato */
|
|
2353
2281
|
FormFileComponent.prototype.downloadAttachment = function () {
|
|
2354
2282
|
var model = this.Model;
|
|
2355
2283
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
2356
2284
|
};
|
|
2357
|
-
/**
|
|
2358
|
-
* @ignore
|
|
2359
|
-
*/
|
|
2285
|
+
/** @ignore */
|
|
2360
2286
|
FormFileComponent.prototype.onNotNullValueSet = function () { };
|
|
2361
2287
|
return FormFileComponent;
|
|
2362
2288
|
}(BaseFormControl));
|
|
@@ -2364,7 +2290,7 @@
|
|
|
2364
2290
|
{ type: core.Component, args: [{
|
|
2365
2291
|
selector: "form-file",
|
|
2366
2292
|
providers: [{ provide: localizations.LocalizationService, useClass: FormFileComponentLoc }],
|
|
2367
|
-
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>",
|
|
2293
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" id=\"{{GeneratedName}}\" #fileInput class=\"file-upload-btn app-pointer\" [multiple]=\"Multiple ? true : null\" />\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && Model.filename && Model.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"Model.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required ? true : null\" />\r\n\r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && Model.filename && Model.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"Model.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n</ng-template>",
|
|
2368
2294
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2369
2295
|
styles: [".frm-padding-left-22{padding-left:22px}"]
|
|
2370
2296
|
},] }
|
|
@@ -2377,7 +2303,8 @@
|
|
|
2377
2303
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
2378
2304
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
2379
2305
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2380
|
-
{ type: localizations.LocalizationService }
|
|
2306
|
+
{ type: localizations.LocalizationService },
|
|
2307
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2381
2308
|
]; };
|
|
2382
2309
|
FormFileComponent.propDecorators = {
|
|
2383
2310
|
Multiple: [{ type: core.Input }],
|
|
@@ -2390,39 +2317,39 @@
|
|
|
2390
2317
|
*/
|
|
2391
2318
|
var FormDateTimeComponent = /** @class */ (function (_super) {
|
|
2392
2319
|
__extends(FormDateTimeComponent, _super);
|
|
2393
|
-
/**
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
function FormDateTimeComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2399
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
2400
|
-
/**
|
|
2401
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
2402
|
-
*/
|
|
2320
|
+
/** @ignore Costruttore */
|
|
2321
|
+
function FormDateTimeComponent(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2322
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
2323
|
+
_this.datesExts = datesExts;
|
|
2324
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
2403
2325
|
_this.JsDates = false;
|
|
2404
2326
|
return _this;
|
|
2405
2327
|
}
|
|
2406
|
-
/**
|
|
2407
|
-
|
|
2408
|
-
|
|
2328
|
+
/** @ignore */
|
|
2329
|
+
FormDateTimeComponent.prototype.writeValue = function (obj) {
|
|
2330
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
2331
|
+
_super.prototype.writeValue.call(this, obj);
|
|
2332
|
+
};
|
|
2333
|
+
/** @ignore */
|
|
2409
2334
|
FormDateTimeComponent.prototype.onNotNullValueSet = function () { };
|
|
2410
2335
|
return FormDateTimeComponent;
|
|
2411
2336
|
}(BaseFormControl));
|
|
2412
2337
|
FormDateTimeComponent.decorators = [
|
|
2413
2338
|
{ type: core.Component, args: [{
|
|
2414
2339
|
selector: "form-datetime",
|
|
2415
|
-
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>",
|
|
2340
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-datetime [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [id]=\"GeneratedName\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-datetime>\r\n</ng-template>",
|
|
2416
2341
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2417
2342
|
},] }
|
|
2418
2343
|
];
|
|
2419
2344
|
FormDateTimeComponent.ctorParameters = function () { return [
|
|
2345
|
+
{ type: extensions.DateService },
|
|
2420
2346
|
{ type: core.ChangeDetectorRef },
|
|
2421
2347
|
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
|
|
2422
2348
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
2423
2349
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
2424
2350
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
2425
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2351
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2352
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2426
2353
|
]; };
|
|
2427
2354
|
FormDateTimeComponent.propDecorators = {
|
|
2428
2355
|
JsDates: [{ type: core.Input }]
|
|
@@ -2451,58 +2378,36 @@
|
|
|
2451
2378
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_LOCALE,] }] }
|
|
2452
2379
|
]; };
|
|
2453
2380
|
|
|
2454
|
-
/**
|
|
2455
|
-
* 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
|
|
2456
|
-
*/
|
|
2381
|
+
/** 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 */
|
|
2457
2382
|
var FormAdaptiveComponent = /** @class */ (function (_super) {
|
|
2458
2383
|
__extends(FormAdaptiveComponent, _super);
|
|
2459
|
-
/**
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
* @ignore
|
|
2463
|
-
*/
|
|
2464
|
-
function FormAdaptiveComponent(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2465
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
2384
|
+
/** @ignore Costruttore */
|
|
2385
|
+
function FormAdaptiveComponent(cdr, utiExts, datesExts, dateAdapter, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2386
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
2466
2387
|
_this.utiExts = utiExts;
|
|
2467
2388
|
_this.datesExts = datesExts;
|
|
2468
2389
|
_this.dateAdapter = dateAdapter;
|
|
2469
2390
|
_this.lc = lc;
|
|
2470
|
-
/**
|
|
2471
|
-
* Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file**
|
|
2472
|
-
*/
|
|
2391
|
+
/** Permette di scaricare l'eventuale file presente qualora il **Type** di questo componente fosse **file** */
|
|
2473
2392
|
_this.AllowDownload = true;
|
|
2474
|
-
/**
|
|
2475
|
-
* Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency)
|
|
2476
|
-
*/
|
|
2393
|
+
/** Utilizzata nel form-adapter per specificare la precisione degli input currencymap (Type: currency) */
|
|
2477
2394
|
_this.Precision = 2;
|
|
2478
|
-
/**
|
|
2479
|
-
* Allineamento della currency mask
|
|
2480
|
-
*/
|
|
2395
|
+
/** Allineamento della currency mask */
|
|
2481
2396
|
_this.Alignment = 'right';
|
|
2482
|
-
/**
|
|
2483
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
2484
|
-
*/
|
|
2397
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
2485
2398
|
_this.SearchFunction = null;
|
|
2486
|
-
/**
|
|
2487
|
-
* Numero minimo di caratteri con cui cercare
|
|
2488
|
-
*/
|
|
2399
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
2489
2400
|
_this.MinChars = 3;
|
|
2490
|
-
/**
|
|
2491
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
2492
|
-
*/
|
|
2401
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
2493
2402
|
_this.CaseSensitive = false;
|
|
2494
|
-
/**
|
|
2495
|
-
* Variabile interna che gestisce se effettuare il riallineamento dei dati o meno
|
|
2496
|
-
*/
|
|
2403
|
+
/** Variabile interna che gestisce se effettuare il riallineamento dei dati o meno */
|
|
2497
2404
|
_this.alignValues = false;
|
|
2498
2405
|
/**
|
|
2499
2406
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
2500
2407
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
2501
2408
|
*/
|
|
2502
2409
|
_this.ignoreNextWriteValue = false;
|
|
2503
|
-
/**
|
|
2504
|
-
* 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
|
|
2505
|
-
*/
|
|
2410
|
+
/** 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 */
|
|
2506
2411
|
_this.FilteredBoundSource = [];
|
|
2507
2412
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
2508
2413
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
@@ -2511,9 +2416,7 @@
|
|
|
2511
2416
|
_this.ModelFile = new AppFile();
|
|
2512
2417
|
return _this;
|
|
2513
2418
|
}
|
|
2514
|
-
/**
|
|
2515
|
-
* @ignore
|
|
2516
|
-
*/
|
|
2419
|
+
/** @ignore */
|
|
2517
2420
|
FormAdaptiveComponent.prototype.ngOnChanges = function (changes) {
|
|
2518
2421
|
var _a;
|
|
2519
2422
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -2536,29 +2439,42 @@
|
|
|
2536
2439
|
});
|
|
2537
2440
|
});
|
|
2538
2441
|
};
|
|
2539
|
-
/**
|
|
2540
|
-
* @ignore
|
|
2541
|
-
*/
|
|
2442
|
+
/** @ignore */
|
|
2542
2443
|
FormAdaptiveComponent.prototype.writeValue = function (obj) {
|
|
2543
2444
|
var _this = this;
|
|
2445
|
+
var _a;
|
|
2544
2446
|
this.alignValues = false;
|
|
2545
|
-
|
|
2447
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
2448
|
+
if (!this.Type) {
|
|
2546
2449
|
this.Type = "string";
|
|
2547
|
-
|
|
2450
|
+
this.EvaluatedModel = obj;
|
|
2451
|
+
}
|
|
2452
|
+
if (this.Type == "date" || this.Type == "datetime") {
|
|
2548
2453
|
this.useJsDates = Object.prototype.toString.call(obj) === "[object Date]";
|
|
2549
|
-
|
|
2454
|
+
if (this.Type == "date")
|
|
2455
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2456
|
+
if (this.Type == "datetime")
|
|
2457
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, false, true);
|
|
2458
|
+
}
|
|
2459
|
+
else if ((this.Type == "float" || this.Type == "number") && obj) {
|
|
2550
2460
|
obj = obj.toString().replace(".", ",");
|
|
2461
|
+
this.EvaluatedModel = obj;
|
|
2462
|
+
}
|
|
2551
2463
|
// Per sicurezza riallineo i valori
|
|
2552
2464
|
else if (this.Type == "boolean") {
|
|
2553
2465
|
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2554
2466
|
this.alignValues = true;
|
|
2467
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2555
2468
|
}
|
|
2556
2469
|
else if (this.Type == "time") {
|
|
2557
|
-
var _b = __read((obj || "
|
|
2558
|
-
obj = dayjs().hour(hours !== null && hours !== void 0 ? hours : 0).minute(minutes !== null && minutes !== void 0 ? minutes : 0).second(seconds !== null && seconds !== void 0 ? seconds : 0);
|
|
2470
|
+
var _b = __read((obj || "00:00:00").split(":"), 3), hours = _b[0], minutes = _b[1], seconds = _b[2];
|
|
2471
|
+
obj = dayjs().hour(parseInt(hours !== null && hours !== void 0 ? hours : 0)).minute(parseInt(minutes !== null && minutes !== void 0 ? minutes : 0)).second(parseInt(seconds !== null && seconds !== void 0 ? seconds : 0));
|
|
2472
|
+
this.EvaluatedModel = (hours || '00') + ":" + (minutes || '00') + ":" + (seconds || '00');
|
|
2559
2473
|
}
|
|
2560
|
-
else if (this.Type == "file")
|
|
2474
|
+
else if (this.Type == "file") {
|
|
2561
2475
|
obj = this.ModelFile;
|
|
2476
|
+
this.EvaluatedModel = this.ModelFile.filename;
|
|
2477
|
+
}
|
|
2562
2478
|
else if (this.Type == "autocomplete") {
|
|
2563
2479
|
if (this.SearchFunction) {
|
|
2564
2480
|
this.SearchFunction(obj, true).subscribe(function (t) {
|
|
@@ -2571,6 +2487,8 @@
|
|
|
2571
2487
|
else
|
|
2572
2488
|
this.finalizeValue(obj);
|
|
2573
2489
|
}
|
|
2490
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
2491
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(function (t) { return t.id == obj; })) === null || _a === void 0 ? void 0 : _a.description;
|
|
2574
2492
|
_super.prototype.writeValue.call(this, obj);
|
|
2575
2493
|
if (this.alignValues) {
|
|
2576
2494
|
this.changed();
|
|
@@ -2586,6 +2504,7 @@
|
|
|
2586
2504
|
var val = this.Source.find(function (t) { return t.id == value; });
|
|
2587
2505
|
this.propagateChange(val ? val.id : value);
|
|
2588
2506
|
this.Model = val ? val.description : value;
|
|
2507
|
+
this.EvaluatedModel = this.Model;
|
|
2589
2508
|
};
|
|
2590
2509
|
/**
|
|
2591
2510
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -2629,9 +2548,7 @@
|
|
|
2629
2548
|
}, 100);
|
|
2630
2549
|
}
|
|
2631
2550
|
};
|
|
2632
|
-
/**
|
|
2633
|
-
* Metodo richiamato quando viene modificato il modello del campo di input
|
|
2634
|
-
*/
|
|
2551
|
+
/** Metodo richiamato quando viene modificato il modello del campo di input */
|
|
2635
2552
|
FormAdaptiveComponent.prototype.changed = function () {
|
|
2636
2553
|
var toEmit = this.getModelToEmit();
|
|
2637
2554
|
if (this.Type == "autocomplete")
|
|
@@ -2639,18 +2556,15 @@
|
|
|
2639
2556
|
if (this.EmitPendingChanges)
|
|
2640
2557
|
_super.prototype.changed.call(this, toEmit);
|
|
2641
2558
|
};
|
|
2559
|
+
/** @ignore */
|
|
2642
2560
|
FormAdaptiveComponent.prototype.finalized = function () {
|
|
2643
2561
|
_super.prototype.finalized.call(this);
|
|
2644
2562
|
};
|
|
2645
|
-
/**
|
|
2646
|
-
* Metodo richiamato quando viene selezionato il campo col mouse
|
|
2647
|
-
*/
|
|
2563
|
+
/** Metodo richiamato quando viene selezionato il campo col mouse */
|
|
2648
2564
|
FormAdaptiveComponent.prototype.focused = function (event) {
|
|
2649
2565
|
_super.prototype.focused.call(this, event);
|
|
2650
2566
|
};
|
|
2651
|
-
/**
|
|
2652
|
-
* Effettua gli aggiustamenti dati del caso ed emette il modello corretto
|
|
2653
|
-
*/
|
|
2567
|
+
/** Effettua gli aggiustamenti dati del caso ed emette il modello corretto */
|
|
2654
2568
|
FormAdaptiveComponent.prototype.getModelToEmit = function () {
|
|
2655
2569
|
var toEmit = this.Model ?
|
|
2656
2570
|
(this.Type == "time" || this.useJsDates ?
|
|
@@ -2693,16 +2607,12 @@
|
|
|
2693
2607
|
}
|
|
2694
2608
|
this.changed();
|
|
2695
2609
|
};
|
|
2696
|
-
/**
|
|
2697
|
-
* Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente
|
|
2698
|
-
*/
|
|
2610
|
+
/** Permette di scaricare il file collegato all'evetnuale file input rappresentato da questo componente */
|
|
2699
2611
|
FormAdaptiveComponent.prototype.downloadAttachment = function () {
|
|
2700
2612
|
var model = this.Model;
|
|
2701
2613
|
this.utiExts.saveFile(model.fileb64, model.filename);
|
|
2702
2614
|
};
|
|
2703
|
-
/**
|
|
2704
|
-
* @ignore
|
|
2705
|
-
*/
|
|
2615
|
+
/** @ignore */
|
|
2706
2616
|
FormAdaptiveComponent.prototype.onNotNullValueSet = function () { };
|
|
2707
2617
|
/** @ignore */
|
|
2708
2618
|
FormAdaptiveComponent.prototype.throttla = function (id, func, throttleTime) {
|
|
@@ -2719,7 +2629,7 @@
|
|
|
2719
2629
|
{ type: core.Component, args: [{
|
|
2720
2630
|
selector: "form-adaptive",
|
|
2721
2631
|
providers: [{ provide: localizations.LocalizationService, useClass: FormAdaptiveComponentLoc }],
|
|
2722
|
-
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>",
|
|
2632
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^([0-9]*[,])?[0-9]+$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || '^[0-9]\\\\d*$'}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
2723
2633
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
2724
2634
|
styles: [".frm-padding-left-22{padding-left:22px}"]
|
|
2725
2635
|
},] }
|
|
@@ -2734,7 +2644,8 @@
|
|
|
2734
2644
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
2735
2645
|
{ type: accessControl.AccessControlService },
|
|
2736
2646
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
2737
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2647
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2648
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
2738
2649
|
]; };
|
|
2739
2650
|
FormAdaptiveComponent.propDecorators = {
|
|
2740
2651
|
Type: [{ type: core.Input }],
|
|
@@ -2756,17 +2667,11 @@
|
|
|
2756
2667
|
*/
|
|
2757
2668
|
var FormEmptyComponent = /** @class */ (function () {
|
|
2758
2669
|
function FormEmptyComponent() {
|
|
2759
|
-
/**
|
|
2760
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2761
|
-
*/
|
|
2670
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2762
2671
|
this.Last = false;
|
|
2763
|
-
/**
|
|
2764
|
-
* Classe extra per il form-group in cui viene wrappato l'input finto
|
|
2765
|
-
*/
|
|
2672
|
+
/** Classe extra per il form-group in cui viene wrappato l'input finto */
|
|
2766
2673
|
this.FormGroupClass = "";
|
|
2767
|
-
/**
|
|
2768
|
-
* Valore placeholder da mostrare
|
|
2769
|
-
*/
|
|
2674
|
+
/** Valore placeholder da mostrare */
|
|
2770
2675
|
this.PlaceholderModel = "Placeholder";
|
|
2771
2676
|
}
|
|
2772
2677
|
return FormEmptyComponent;
|
|
@@ -2790,43 +2695,25 @@
|
|
|
2790
2695
|
*/
|
|
2791
2696
|
var FormTemplateComponent = /** @class */ (function () {
|
|
2792
2697
|
function FormTemplateComponent() {
|
|
2793
|
-
/**
|
|
2794
|
-
* Indica se l'input è obbligatorio o no
|
|
2795
|
-
*/
|
|
2698
|
+
/** Indica se l'input è obbligatorio o no */
|
|
2796
2699
|
this.Required = false;
|
|
2797
|
-
/**
|
|
2798
|
-
* Mostra un testo a sinistra dell'input, **FormLayout** permettendo
|
|
2799
|
-
*/
|
|
2700
|
+
/** Mostra un testo a sinistra dell'input, **FormLayout** permettendo */
|
|
2800
2701
|
this.Label = "";
|
|
2801
|
-
/**
|
|
2802
|
-
* Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top
|
|
2803
|
-
*/
|
|
2702
|
+
/** Eventuali classi extra da applicare alla Label, di default c'è solo un leggero margin top */
|
|
2804
2703
|
this.LabelClass = "m-t-5";
|
|
2805
|
-
/**
|
|
2806
|
-
* Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input
|
|
2807
|
-
*/
|
|
2704
|
+
/** Utilizza o meno il Layout di un form (Label con input di fianco), se false mostra solo l'input */
|
|
2808
2705
|
this.FormLayout = true;
|
|
2809
|
-
/**
|
|
2810
|
-
* col-md-X per la label
|
|
2811
|
-
*/
|
|
2706
|
+
/** col-md-X per la label */
|
|
2812
2707
|
this.LabelColWidth = 4;
|
|
2813
|
-
/**
|
|
2814
|
-
* col-md-X per l'input
|
|
2815
|
-
*/
|
|
2708
|
+
/** col-md-X per l'input */
|
|
2816
2709
|
this.InputColWidth = 8;
|
|
2817
|
-
/**
|
|
2818
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2819
|
-
*/
|
|
2710
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2820
2711
|
this.Last = false;
|
|
2821
|
-
/**
|
|
2822
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2823
|
-
*/
|
|
2712
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2824
2713
|
this.FormGroupClass = "";
|
|
2825
2714
|
}
|
|
2826
2715
|
Object.defineProperty(FormTemplateComponent.prototype, "LabelInputRatio", {
|
|
2827
|
-
/**
|
|
2828
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2829
|
-
*/
|
|
2716
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2830
2717
|
set: function (input) {
|
|
2831
2718
|
var ratio = input.split(/\s/);
|
|
2832
2719
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2863,27 +2750,17 @@
|
|
|
2863
2750
|
*/
|
|
2864
2751
|
var FormErrorComponent = /** @class */ (function () {
|
|
2865
2752
|
function FormErrorComponent() {
|
|
2866
|
-
/**
|
|
2867
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2868
|
-
*/
|
|
2753
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2869
2754
|
this.LabelColWidth = 4;
|
|
2870
|
-
/**
|
|
2871
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2872
|
-
*/
|
|
2755
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2873
2756
|
this.InputColWidth = 8;
|
|
2874
|
-
/**
|
|
2875
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2876
|
-
*/
|
|
2757
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2877
2758
|
this.Last = false;
|
|
2878
|
-
/**
|
|
2879
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2880
|
-
*/
|
|
2759
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2881
2760
|
this.FormGroupClass = "";
|
|
2882
2761
|
}
|
|
2883
2762
|
Object.defineProperty(FormErrorComponent.prototype, "LabelInputRatio", {
|
|
2884
|
-
/**
|
|
2885
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2886
|
-
*/
|
|
2763
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2887
2764
|
set: function (input) {
|
|
2888
2765
|
var ratio = input.split(/\s/);
|
|
2889
2766
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2916,27 +2793,17 @@
|
|
|
2916
2793
|
*/
|
|
2917
2794
|
var FormInfoComponent = /** @class */ (function () {
|
|
2918
2795
|
function FormInfoComponent() {
|
|
2919
|
-
/**
|
|
2920
|
-
* col-md-X per la label (Che in questoc aso è vuota)
|
|
2921
|
-
*/
|
|
2796
|
+
/** col-md-X per la label (Che in questoc aso è vuota) */
|
|
2922
2797
|
this.LabelColWidth = 4;
|
|
2923
|
-
/**
|
|
2924
|
-
* col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML)
|
|
2925
|
-
*/
|
|
2798
|
+
/** col-md-X per l'input (che in questo caso contiene il messaggio d'errore proiettato nell'HTML) */
|
|
2926
2799
|
this.InputColWidth = 8;
|
|
2927
|
-
/**
|
|
2928
|
-
* Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale)
|
|
2929
|
-
*/
|
|
2800
|
+
/** Indica se è l'ultimo componente di un form (serve per rimuovere il margine finale) */
|
|
2930
2801
|
this.Last = false;
|
|
2931
|
-
/**
|
|
2932
|
-
* Classe extra per il form-group in cui viene wrappato l'input
|
|
2933
|
-
*/
|
|
2802
|
+
/** Classe extra per il form-group in cui viene wrappato l'input */
|
|
2934
2803
|
this.FormGroupClass = "";
|
|
2935
2804
|
}
|
|
2936
2805
|
Object.defineProperty(FormInfoComponent.prototype, "LabelInputRatio", {
|
|
2937
|
-
/**
|
|
2938
|
-
* Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y"
|
|
2939
|
-
*/
|
|
2806
|
+
/** Permette di settare in una volta solo gli input LabelColWidth e InputColWidth, basta scriverlo con la sintassi "X Y" */
|
|
2940
2807
|
set: function (input) {
|
|
2941
2808
|
var ratio = input.split(/\s/);
|
|
2942
2809
|
this.LabelColWidth = parseInt(ratio[0]);
|
|
@@ -2962,33 +2829,34 @@
|
|
|
2962
2829
|
LabelInputRatio: [{ type: core.Input }]
|
|
2963
2830
|
};
|
|
2964
2831
|
|
|
2965
|
-
/**
|
|
2966
|
-
* Componente rappresentante una checkbox
|
|
2967
|
-
*/
|
|
2832
|
+
/** Componente rappresentante una checkbox */
|
|
2968
2833
|
var FormCheckboxComponent = /** @class */ (function (_super) {
|
|
2969
2834
|
__extends(FormCheckboxComponent, _super);
|
|
2970
|
-
/**
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
function FormCheckboxComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2976
|
-
return _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true) || this;
|
|
2835
|
+
/** @ignore Costruttore */
|
|
2836
|
+
function FormCheckboxComponent(lc, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
2837
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true) || this;
|
|
2838
|
+
_this.lc = lc;
|
|
2839
|
+
return _this;
|
|
2977
2840
|
}
|
|
2978
|
-
/**
|
|
2979
|
-
|
|
2980
|
-
|
|
2841
|
+
/** @ignore */
|
|
2842
|
+
FormCheckboxComponent.prototype.writeValue = function (obj) {
|
|
2843
|
+
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2844
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Yes' : 'No');
|
|
2845
|
+
_super.prototype.writeValue.call(this, obj);
|
|
2846
|
+
};
|
|
2847
|
+
/** @ignore */
|
|
2981
2848
|
FormCheckboxComponent.prototype.onNotNullValueSet = function () { };
|
|
2982
2849
|
return FormCheckboxComponent;
|
|
2983
2850
|
}(BaseFormControl));
|
|
2984
2851
|
FormCheckboxComponent.decorators = [
|
|
2985
2852
|
{ type: core.Component, args: [{
|
|
2986
2853
|
selector: "form-checkbox",
|
|
2987
|
-
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>",
|
|
2854
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\" [class.m-t-5]=\"!DisplayMode\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <input class=\"app-pointer\" [disabled]=\"Readonly ? true : null\" type=\"checkbox\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" #validationControl=\"ngModel\" (ngModelChange)=\"changed(); finalized()\" (click)=\"focused($event)\" />\r\n</ng-template>",
|
|
2988
2855
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
2989
2856
|
},] }
|
|
2990
2857
|
];
|
|
2991
2858
|
FormCheckboxComponent.ctorParameters = function () { return [
|
|
2859
|
+
{ type: localizations.LocalizationService },
|
|
2992
2860
|
{ type: core.ChangeDetectorRef },
|
|
2993
2861
|
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
|
|
2994
2862
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Host }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
@@ -2997,100 +2865,83 @@
|
|
|
2997
2865
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2998
2866
|
]; };
|
|
2999
2867
|
|
|
3000
|
-
/**
|
|
3001
|
-
* Componente che dà all'utente la possibilità di selezionare una data
|
|
3002
|
-
*/
|
|
2868
|
+
/** Componente che dà all'utente la possibilità di selezionare una data */
|
|
3003
2869
|
var FormDateComponent = /** @class */ (function (_super) {
|
|
3004
2870
|
__extends(FormDateComponent, _super);
|
|
3005
|
-
/**
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
function FormDateComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3011
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
3012
|
-
/**
|
|
3013
|
-
* Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs
|
|
3014
|
-
*/
|
|
2871
|
+
/** @ignore Costruttore */
|
|
2872
|
+
function FormDateComponent(datesExts, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2873
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
2874
|
+
_this.datesExts = datesExts;
|
|
2875
|
+
/** Utilizza il Date di Javascript come modello in uscita. Il modello in entrata verrà comunque ricondotto a un DayJs */
|
|
3015
2876
|
_this.JsDates = false;
|
|
3016
2877
|
return _this;
|
|
3017
2878
|
}
|
|
3018
|
-
/**
|
|
3019
|
-
|
|
3020
|
-
|
|
2879
|
+
/** @ignore */
|
|
2880
|
+
FormDateComponent.prototype.writeValue = function (obj) {
|
|
2881
|
+
this.EvaluatedModel = this.datesExts.getFormatted(obj, true, false);
|
|
2882
|
+
_super.prototype.writeValue.call(this, obj);
|
|
2883
|
+
};
|
|
2884
|
+
/** @ignore */
|
|
3021
2885
|
FormDateComponent.prototype.onNotNullValueSet = function () { };
|
|
3022
2886
|
return FormDateComponent;
|
|
3023
2887
|
}(BaseFormControl));
|
|
3024
2888
|
FormDateComponent.decorators = [
|
|
3025
2889
|
{ type: core.Component, args: [{
|
|
3026
2890
|
selector: "form-date",
|
|
3027
|
-
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>",
|
|
2891
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-date [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\"\r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey' : ''\"\r\n [useJsDates]=\"JsDates\"\r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\">\r\n </val-date>\r\n</ng-template>",
|
|
3028
2892
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3029
2893
|
},] }
|
|
3030
2894
|
];
|
|
3031
2895
|
FormDateComponent.ctorParameters = function () { return [
|
|
2896
|
+
{ type: extensions.DateService },
|
|
3032
2897
|
{ type: core.ChangeDetectorRef },
|
|
3033
2898
|
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
|
|
3034
2899
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3035
2900
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3036
2901
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3037
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2902
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2903
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3038
2904
|
]; };
|
|
3039
2905
|
FormDateComponent.propDecorators = {
|
|
3040
2906
|
JsDates: [{ type: core.Input }]
|
|
3041
2907
|
};
|
|
3042
2908
|
|
|
3043
|
-
/**
|
|
3044
|
-
* Semplice componente di Input testuale, con eventuale prefisso/suffisso
|
|
3045
|
-
*/
|
|
2909
|
+
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
3046
2910
|
var FormInputComponent = /** @class */ (function (_super) {
|
|
3047
2911
|
__extends(FormInputComponent, _super);
|
|
3048
|
-
/**
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
*/
|
|
3053
|
-
function FormInputComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3054
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
3055
|
-
/**
|
|
3056
|
-
* Indica se l'input relativo è di tipo Password
|
|
3057
|
-
*/
|
|
2912
|
+
/** @ignore Costruttore */
|
|
2913
|
+
function FormInputComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2914
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
2915
|
+
/** Indica se l'input relativo è di tipo Password */
|
|
3058
2916
|
_this.Password = false;
|
|
3059
|
-
/**
|
|
3060
|
-
* Delegato per l'esecuzione di un'operazione al click del suffisso
|
|
3061
|
-
*/
|
|
2917
|
+
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
3062
2918
|
_this.onSuffixAction = new core.EventEmitter();
|
|
3063
|
-
/**
|
|
3064
|
-
* Delegato per l'esecuzione di un'operazione al click del prefisso
|
|
3065
|
-
*/
|
|
2919
|
+
/** Delegato per l'esecuzione di un'operazione al click del prefisso */
|
|
3066
2920
|
_this.onPrefixAction = new core.EventEmitter();
|
|
3067
|
-
/**
|
|
3068
|
-
* Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix**
|
|
3069
|
-
*/
|
|
2921
|
+
/** Indica la presenza o meno di un suffisso, si basa sulla "truthiness" della proiezione **suffix** */
|
|
3070
2922
|
_this.HasSuffix = false;
|
|
3071
|
-
/**
|
|
3072
|
-
* Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix**
|
|
3073
|
-
*/
|
|
2923
|
+
/** Indica la presenza o meno di un prefisso, si basa sulla "truthiness" della proiezione **prefix** */
|
|
3074
2924
|
_this.HasPrefix = false;
|
|
3075
2925
|
return _this;
|
|
3076
2926
|
}
|
|
3077
|
-
/**
|
|
3078
|
-
|
|
3079
|
-
|
|
2927
|
+
/** @ignore */
|
|
2928
|
+
FormInputComponent.prototype.writeValue = function (obj) {
|
|
2929
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
2930
|
+
_super.prototype.writeValue.call(this, obj);
|
|
2931
|
+
};
|
|
2932
|
+
/** @ignore */
|
|
3080
2933
|
FormInputComponent.prototype.ngAfterContentInit = function () {
|
|
3081
2934
|
this.HasSuffix = !!this.suffix;
|
|
3082
2935
|
this.HasPrefix = !!this.prefix;
|
|
3083
2936
|
};
|
|
3084
|
-
/**
|
|
3085
|
-
* @ignore
|
|
3086
|
-
*/
|
|
2937
|
+
/** @ignore */
|
|
3087
2938
|
FormInputComponent.prototype.onNotNullValueSet = function () { };
|
|
3088
2939
|
return FormInputComponent;
|
|
3089
2940
|
}(BaseFormControl));
|
|
3090
2941
|
FormInputComponent.decorators = [
|
|
3091
2942
|
{ type: core.Component, args: [{
|
|
3092
2943
|
selector: "form-input",
|
|
3093
|
-
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>",
|
|
2944
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-input [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n autocomplete=\"off\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [Password]=\"Password\">\r\n <ng-container *ngIf=\"HasSuffix\">\r\n <ng-template #suffix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-suffix\"\r\n matSuffix (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngIf=\"HasPrefix\">\r\n <ng-template #prefix_internal>\r\n <button type=\"button\" class=\"mat-button mat-icon-button mat-button-base mat-icon-button-override mat-icon-button-override-prefix\"\r\n matPrefix (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </val-input>\r\n</ng-template>",
|
|
3094
2945
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3095
2946
|
},] }
|
|
3096
2947
|
];
|
|
@@ -3100,7 +2951,8 @@
|
|
|
3100
2951
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3101
2952
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3102
2953
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3103
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
2954
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
2955
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3104
2956
|
]; };
|
|
3105
2957
|
FormInputComponent.propDecorators = {
|
|
3106
2958
|
Password: [{ type: core.Input }],
|
|
@@ -3130,22 +2982,14 @@
|
|
|
3130
2982
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_LOCALE,] }] }
|
|
3131
2983
|
]; };
|
|
3132
2984
|
|
|
3133
|
-
/**
|
|
3134
|
-
* Componente che permette di selezionare un valore da una lista di valori disponibili
|
|
3135
|
-
*/
|
|
2985
|
+
/** Componente che permette di selezionare un valore da una lista di valori disponibili */
|
|
3136
2986
|
var FormSelectComponent = /** @class */ (function (_super) {
|
|
3137
2987
|
__extends(FormSelectComponent, _super);
|
|
3138
|
-
/**
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
* @ignore
|
|
3142
|
-
*/
|
|
3143
|
-
function FormSelectComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3144
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
2988
|
+
/** @ignore Costruttore */
|
|
2989
|
+
function FormSelectComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
2990
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
3145
2991
|
_this.lc = lc;
|
|
3146
|
-
/**
|
|
3147
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3148
|
-
*/
|
|
2992
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3149
2993
|
_this.SelectLabel = "";
|
|
3150
2994
|
/**
|
|
3151
2995
|
* Permette al componente di considerare questo valore come "valore placeholder"
|
|
@@ -3153,9 +2997,7 @@
|
|
|
3153
2997
|
* Si consiglia di mantenere il default
|
|
3154
2998
|
*/
|
|
3155
2999
|
_this.PlaceholderValue = '';
|
|
3156
|
-
/**
|
|
3157
|
-
* Override del placeholder per select requried
|
|
3158
|
-
*/
|
|
3000
|
+
/** Override del placeholder per select requried */
|
|
3159
3001
|
_this.RequiredPlaceholder = null;
|
|
3160
3002
|
/**
|
|
3161
3003
|
* Permette al componente di considerare questo valore come "valore vuoto"
|
|
@@ -3163,15 +3005,11 @@
|
|
|
3163
3005
|
* Si consiglia di mantenere il default
|
|
3164
3006
|
*/
|
|
3165
3007
|
_this.EmptyFieldValue = '-2';
|
|
3166
|
-
/**
|
|
3167
|
-
* Se **true** rimuove il simbolino di validazione (croce rossa o tick verde)
|
|
3168
|
-
*/
|
|
3008
|
+
/** Se **true** rimuove il simbolino di validazione (croce rossa o tick verde) */
|
|
3169
3009
|
_this.ShowValidationSymbol = true;
|
|
3170
3010
|
return _this;
|
|
3171
3011
|
}
|
|
3172
|
-
/**
|
|
3173
|
-
* @ignore
|
|
3174
|
-
*/
|
|
3012
|
+
/** @ignore */
|
|
3175
3013
|
FormSelectComponent.prototype.ngOnChanges = function (changes) {
|
|
3176
3014
|
var _this = this;
|
|
3177
3015
|
var newSource = changes["Source"];
|
|
@@ -3217,6 +3055,7 @@
|
|
|
3217
3055
|
this.cdr.markForCheck();
|
|
3218
3056
|
}
|
|
3219
3057
|
};
|
|
3058
|
+
/** @ignore */
|
|
3220
3059
|
FormSelectComponent.prototype.detatchPreviousAndRetatchNext = function (doStuff) {
|
|
3221
3060
|
var _this = this;
|
|
3222
3061
|
if (this.validationControl && this.Form)
|
|
@@ -3228,14 +3067,21 @@
|
|
|
3228
3067
|
else if (_this.validationControl && _this.Form) {
|
|
3229
3068
|
_this.Form.addControl(_this.validationControl);
|
|
3230
3069
|
}
|
|
3231
|
-
else
|
|
3070
|
+
else if (!_this.validationControl && _this.Form) {
|
|
3071
|
+
// Questo messaggio ha senso solo se almeno il form esiste... se non esiste sticazzi insomma...
|
|
3232
3072
|
console.error("Impossibile aggiungere il componente di validaazione per " + _this.GeneratedName + ", le validazioni potrebbero funzionare in maniera erratica");
|
|
3073
|
+
}
|
|
3233
3074
|
});
|
|
3234
3075
|
});
|
|
3235
3076
|
};
|
|
3236
|
-
/**
|
|
3237
|
-
|
|
3238
|
-
|
|
3077
|
+
/** @ignore */
|
|
3078
|
+
FormSelectComponent.prototype.writeValue = function (obj) {
|
|
3079
|
+
var _a;
|
|
3080
|
+
if (this.BoundSource && this.BoundSource.length > 0)
|
|
3081
|
+
this.EvaluatedModel = (_a = this.BoundSource.find(function (t) { return t.id == obj; })) === null || _a === void 0 ? void 0 : _a.description;
|
|
3082
|
+
_super.prototype.writeValue.call(this, obj);
|
|
3083
|
+
};
|
|
3084
|
+
/** @ignore */
|
|
3239
3085
|
FormSelectComponent.prototype.onNotNullValueSet = function () { };
|
|
3240
3086
|
return FormSelectComponent;
|
|
3241
3087
|
}(BaseFormControl));
|
|
@@ -3243,7 +3089,7 @@
|
|
|
3243
3089
|
{ type: core.Component, args: [{
|
|
3244
3090
|
selector: "form-select",
|
|
3245
3091
|
providers: [{ provide: localizations.LocalizationService, useClass: FormSelectComponentLoc }],
|
|
3246
|
-
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>",
|
|
3092
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <!-- Select vuota per quando non ho Sorgenti dati da cui selezionare. Uguale identica alla piena ma senza option\r\n Purtroppo devono essere due componenti distinti perch\u00E9 una select una volta creata non riesce pi\u00F9 ad adattarsi ai cambi di options -->\r\n <val-select *ngIf=\"!BoundSource || BoundSource.length == 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_zero\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n #validationControl=\"ngModel\">\r\n </val-select>\r\n\r\n <!-- Select vera e propria per quando arrivano i dati -->\r\n <val-select *ngIf=\"BoundSource && BoundSource.length > 0\"\r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [required]=\"Required ? 'required' : null\"\r\n [noValidate]=\"!Validation\"\r\n [readonly]=\"Readonly\"\r\n [forceInvalid]=\"ForcedError\"\r\n [label]=\"SelectLabel\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [showValidationSymbol]=\"ShowValidationSymbol\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [placeHolderValue]=\"PlaceholderValue\"\r\n [submitted]=\"Form?.submitted\"\r\n [emptyFieldValue]=\"Required || Placeholder || SelectLabel ? EmptyFieldValue : ''\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}_filled\"\r\n (inputChange)=\"Model = $event == EmptyFieldValue ? (Required? PlaceholderValue : '') : $event; changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n #validationControl=\"ngModel\">\r\n <option *ngFor=\"let obj of BoundSource\" [value]=\"obj.id\">{{obj.description}}</option>\r\n </val-select>\r\n</ng-template>",
|
|
3247
3093
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3248
3094
|
},] }
|
|
3249
3095
|
];
|
|
@@ -3254,7 +3100,8 @@
|
|
|
3254
3100
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3255
3101
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3256
3102
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3257
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
3103
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3104
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3258
3105
|
]; };
|
|
3259
3106
|
FormSelectComponent.propDecorators = {
|
|
3260
3107
|
SelectLabel: [{ type: core.Input }],
|
|
@@ -3296,13 +3143,9 @@
|
|
|
3296
3143
|
*/
|
|
3297
3144
|
var FormMultiSelectComponent = /** @class */ (function (_super) {
|
|
3298
3145
|
__extends(FormMultiSelectComponent, _super);
|
|
3299
|
-
/**
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
* @ignore
|
|
3303
|
-
*/
|
|
3304
|
-
function FormMultiSelectComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3305
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
3146
|
+
/** @ignore Costruttore */
|
|
3147
|
+
function FormMultiSelectComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3148
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
3306
3149
|
_this.lc = lc;
|
|
3307
3150
|
/**
|
|
3308
3151
|
* Modello temporaneo **NON** compatibile in maniera diretta con il componente **angular2-multiselect** usato internamente
|
|
@@ -3310,29 +3153,19 @@
|
|
|
3310
3153
|
* Serve da appoggio per effettuare un re-bind qualora la sorgente cambiasse e qualora **RebindModelAfterSource** fosse true
|
|
3311
3154
|
*/
|
|
3312
3155
|
_this.TmpModel = [];
|
|
3313
|
-
/**
|
|
3314
|
-
* 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
|
|
3315
|
-
*/
|
|
3156
|
+
/** 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 */
|
|
3316
3157
|
_this.RebindModelAfterSource = false;
|
|
3317
|
-
/**
|
|
3318
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3319
|
-
*/
|
|
3158
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3320
3159
|
_this.SelectLabel = "";
|
|
3321
|
-
/**
|
|
3322
|
-
* Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue
|
|
3323
|
-
*/
|
|
3160
|
+
/** Permette al componente di gestire come modello non una lista di chiavi, ma una lista di KeyValue */
|
|
3324
3161
|
_this.UseKeyValues = false;
|
|
3325
|
-
/**
|
|
3326
|
-
* Impostazioni del componente interno **angular2-multiselect**
|
|
3327
|
-
*/
|
|
3162
|
+
/** Impostazioni del componente interno **angular2-multiselect** */
|
|
3328
3163
|
_this.Settings = null;
|
|
3329
3164
|
// Default dei settings per evitare che siano mai nulli, altrimenti il cazzo di CuppaLab salta in araia che è veramente una bellezza
|
|
3330
3165
|
_this.evaluateSettings(false);
|
|
3331
3166
|
return _this;
|
|
3332
3167
|
}
|
|
3333
|
-
/**
|
|
3334
|
-
* @ignore
|
|
3335
|
-
*/
|
|
3168
|
+
/** @ignore */
|
|
3336
3169
|
FormMultiSelectComponent.prototype.ngOnChanges = function (changes) {
|
|
3337
3170
|
var _a, _b;
|
|
3338
3171
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -3368,9 +3201,7 @@
|
|
|
3368
3201
|
tagToBody: false
|
|
3369
3202
|
};
|
|
3370
3203
|
};
|
|
3371
|
-
/**
|
|
3372
|
-
* @ignore
|
|
3373
|
-
*/
|
|
3204
|
+
/** @ignore */
|
|
3374
3205
|
FormMultiSelectComponent.prototype.onNotNullValueSet = function () { };
|
|
3375
3206
|
/**
|
|
3376
3207
|
* Indica se il comopnente in questione è in grado di gestire ngControl nulli.
|
|
@@ -3381,9 +3212,7 @@
|
|
|
3381
3212
|
FormMultiSelectComponent.prototype.handleNullNgControl = function () {
|
|
3382
3213
|
return true;
|
|
3383
3214
|
};
|
|
3384
|
-
/**
|
|
3385
|
-
* @ignore Override per gestire input in ingresso
|
|
3386
|
-
*/
|
|
3215
|
+
/** @ignore Override per gestire input in ingresso */
|
|
3387
3216
|
FormMultiSelectComponent.prototype.writeValue = function (obj) {
|
|
3388
3217
|
var _this = this;
|
|
3389
3218
|
this.TmpModel = obj;
|
|
@@ -3399,11 +3228,10 @@
|
|
|
3399
3228
|
_this.RebindModelAfterSource = true;
|
|
3400
3229
|
});
|
|
3401
3230
|
}
|
|
3231
|
+
this.EvaluatedModel = toPass.map(function (t) { return t.description; }).join(', ');
|
|
3402
3232
|
_super.prototype.writeValue.call(this, toPass);
|
|
3403
3233
|
};
|
|
3404
|
-
/**
|
|
3405
|
-
* @ignore Override per gestire input in uscita
|
|
3406
|
-
*/
|
|
3234
|
+
/** @ignore Override per gestire input in uscita */
|
|
3407
3235
|
FormMultiSelectComponent.prototype.changed = function () {
|
|
3408
3236
|
var toEmit = null;
|
|
3409
3237
|
if (!this.UseKeyValues)
|
|
@@ -3419,7 +3247,7 @@
|
|
|
3419
3247
|
{ type: core.Component, args: [{
|
|
3420
3248
|
selector: "form-multiselect",
|
|
3421
3249
|
viewProviders: [{ provide: localizations.LocalizationService, useClass: FormMultiSelectComponentLoc }],
|
|
3422
|
-
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>",
|
|
3250
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <div [class.ms-placeholder]=\"!Model || Model.length == 0\" (click)=\"focused($event)\">\r\n <angular2-multiselect #validationControl=\"ngModel\" type=\"text\"\r\n [(ngModel)]=\"Model\" name=\"{{GeneratedName}}\"\r\n [settings]=\"Settings\" [data]=\"BoundSource\"\r\n (onSelect)=\"changed();\" \r\n (onDeSelect)=\"changed();\" \r\n (onSelectAll)=\"changed();\"\r\n (onDeSelectAll)=\"changed();\" \r\n (onDeSelectAll)=\"Model = []; changed();\">\r\n </angular2-multiselect>\r\n </div>\r\n</ng-template>",
|
|
3423
3251
|
encapsulation: core.ViewEncapsulation.None,
|
|
3424
3252
|
changeDetection: core.ChangeDetectionStrategy.Default,
|
|
3425
3253
|
styles: [".c-btn{background:#fff;border:1px solid #ccc;color:#333}.selected-list .c-list .c-token{background:#415269}.selected-list .c-list .c-token .c-label{color:#fff}.selected-list .c-list .c-token .c-remove svg{fill:#fff}.selected-list .c-angle-down svg,.selected-list .c-angle-up svg{fill:#333}.dropdown-list ul li:hover{background:#f5f5f5}.arrow-down,.arrow-up{border-bottom:15px solid #fff}.arrow-2{border-bottom:15px solid #ccc}.list-area{border:1px solid #ccc;background:#fff;box-shadow:0 1px 5px #959595}.list-filter,.select-all{border-bottom:1px solid #ccc}.list-filter .c-clear svg,.list-filter .c-search svg{fill:#888}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:#415269;background-color:#f2f2f2}.pure-checkbox input[type=checkbox]+label{color:#000}.pure-checkbox input[type=checkbox]+label:before{color:#415269;border:1px solid #415269}.pure-checkbox input[type=checkbox]+label:after{background-color:#415269}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=checkbox]+label:after{border-color:#fff}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=checkbox]:checked+label:before{background:#415269}.single-select-mode .pure-checkbox input[type=checkbox]:focus+label:before,.single-select-mode .pure-checkbox input[type=checkbox]:hover+label:before{border-color:#415269;background-color:#f2f2f2}.single-select-mode .pure-checkbox input[type=checkbox]+label{color:#000}.single-select-mode .pure-checkbox input[type=checkbox]+label:before{color:transparent!important;border:0 solid #415269}.single-select-mode .pure-checkbox input[type=checkbox]+label:after{background-color:transparent!important}.single-select-mode .pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.single-select-mode .pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.single-select-mode .pure-checkbox input[type=checkbox]+label:after{border-color:#415269}.single-select-mode .pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.single-select-mode .pure-checkbox input[type=checkbox]:checked+label:before{background:none!important}.selected-item{background:#e9f4ff}.btn-iceblue{background:#415269;border:1px solid #ccc;color:#fff}.cuppa-dropdown{margin-top:2px;min-width:200px}.cuppa-dropdown .c-btn{min-height:34px}.cuppa-dropdown .c-angle-down,.cuppa-dropdown .c-angle-up{margin-top:-2px}.selected-list .c-list{width:auto!important;padding-right:35px!important;margin-top:-2px!important}.selected-list .c-list .c-token{padding:3px 22px 3px 8px!important}.ms-placeholder .cuppa-dropdown .selected-list>div>span{color:#aaa}"]
|
|
@@ -3432,36 +3260,34 @@
|
|
|
3432
3260
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3433
3261
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3434
3262
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3435
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
3263
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3264
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3436
3265
|
]; };
|
|
3437
3266
|
FormMultiSelectComponent.propDecorators = {
|
|
3438
3267
|
SelectLabel: [{ type: core.Input }],
|
|
3439
3268
|
UseKeyValues: [{ type: core.Input }]
|
|
3440
3269
|
};
|
|
3441
3270
|
|
|
3442
|
-
/**
|
|
3443
|
-
* Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve
|
|
3444
|
-
*/
|
|
3271
|
+
/** Componente che presenta una casella di testo tipicamente utilizzata per scrivere delle note o del log breve */
|
|
3445
3272
|
var FormTextareaComponent = /** @class */ (function (_super) {
|
|
3446
3273
|
__extends(FormTextareaComponent, _super);
|
|
3447
|
-
/**
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
* @ignore
|
|
3451
|
-
*/
|
|
3452
|
-
function FormTextareaComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3453
|
-
return _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
3274
|
+
/** @ignore Costruttore */
|
|
3275
|
+
function FormTextareaComponent(cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3276
|
+
return _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
3454
3277
|
}
|
|
3455
|
-
/**
|
|
3456
|
-
|
|
3457
|
-
|
|
3278
|
+
/** @ignore */
|
|
3279
|
+
FormTextareaComponent.prototype.writeValue = function (obj) {
|
|
3280
|
+
this.EvaluatedModel = (obj === null || obj === void 0 ? void 0 : obj.toString()) || "";
|
|
3281
|
+
_super.prototype.writeValue.call(this, obj);
|
|
3282
|
+
};
|
|
3283
|
+
/** @ignore */
|
|
3458
3284
|
FormTextareaComponent.prototype.onNotNullValueSet = function () { };
|
|
3459
3285
|
return FormTextareaComponent;
|
|
3460
3286
|
}(BaseFormControl));
|
|
3461
3287
|
FormTextareaComponent.decorators = [
|
|
3462
3288
|
{ type: core.Component, args: [{
|
|
3463
3289
|
selector: "form-textarea",
|
|
3464
|
-
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>",
|
|
3290
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && BoundSource\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-textarea \r\n [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\"\r\n [noValidate]=\"!Validation\" \r\n [submitted]=\"Form?.submitted\" \r\n [forceInvalid]=\"ForcedError\"\r\n [id]=\"GeneratedName\" \r\n [rows]=\"Rows\" \r\n [readonly]=\"Readonly\"\r\n [class]=\"Readonly ? 'app-bg-lightgrey app-no-resize' : 'app-no-resize'\" \r\n [(ngModel)]=\"Model\"\r\n name=\"{{GeneratedName}}\" \r\n autocomplete=\"off\" \r\n [placeholder]=\"Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\" \r\n #validationControl=\"ngModel\" \r\n (inputChange)=\"changed();\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n >\r\n </val-textarea>\r\n</ng-template>",
|
|
3465
3291
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3466
3292
|
},] }
|
|
3467
3293
|
];
|
|
@@ -3471,7 +3297,8 @@
|
|
|
3471
3297
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3472
3298
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3473
3299
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3474
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
3300
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3301
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3475
3302
|
]; };
|
|
3476
3303
|
FormTextareaComponent.propDecorators = {
|
|
3477
3304
|
Rows: [{ type: core.Input }]
|
|
@@ -3497,47 +3324,29 @@
|
|
|
3497
3324
|
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_LOCALE,] }] }
|
|
3498
3325
|
]; };
|
|
3499
3326
|
|
|
3500
|
-
/**
|
|
3501
|
-
* Componente di input che si auto-completa in base al valore attuale
|
|
3502
|
-
*/
|
|
3327
|
+
/** Componente di input che si auto-completa in base al valore attuale */
|
|
3503
3328
|
var FormAutocompleteComponent = /** @class */ (function (_super) {
|
|
3504
3329
|
__extends(FormAutocompleteComponent, _super);
|
|
3505
|
-
/**
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
* @ignore
|
|
3509
|
-
*/
|
|
3510
|
-
function FormAutocompleteComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3511
|
-
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) || this;
|
|
3330
|
+
/** @ignore Costruttore */
|
|
3331
|
+
function FormAutocompleteComponent(cdr, lc, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) {
|
|
3332
|
+
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, FAV_DEBUG_MODE) || this;
|
|
3512
3333
|
_this.lc = lc;
|
|
3513
|
-
/**
|
|
3514
|
-
* Permette di specificare il testo della Label flottante material-style
|
|
3515
|
-
*/
|
|
3334
|
+
/** Permette di specificare il testo della Label flottante material-style */
|
|
3516
3335
|
_this.SelectLabel = "";
|
|
3517
|
-
/**
|
|
3518
|
-
* Funzione di ricerca che verrà chiamata dal componente
|
|
3519
|
-
*/
|
|
3336
|
+
/** Funzione di ricerca che verrà chiamata dal componente */
|
|
3520
3337
|
_this.SearchFunction = null;
|
|
3521
|
-
/**
|
|
3522
|
-
* Numero minimo di caratteri con cui cercare
|
|
3523
|
-
*/
|
|
3338
|
+
/** Numero minimo di caratteri con cui cercare */
|
|
3524
3339
|
_this.MinChars = 3;
|
|
3525
|
-
/**
|
|
3526
|
-
* Override del placeholder per select requried
|
|
3527
|
-
*/
|
|
3340
|
+
/** Override del placeholder per select requried */
|
|
3528
3341
|
_this.RequiredPlaceholder = null;
|
|
3529
|
-
/**
|
|
3530
|
-
* Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita
|
|
3531
|
-
*/
|
|
3342
|
+
/** Indica se i controlli devono essere effettuati tenendo conto del Case o meno. Vale solo qualora la **Source** fosse fornita */
|
|
3532
3343
|
_this.CaseSensitive = false;
|
|
3533
3344
|
/**
|
|
3534
3345
|
* Indica se ignorare il prossimo evento writeValue che normalmente dovrebbe richiedere la nuova source. Serve per quando l'utente seleziona un elemento:
|
|
3535
3346
|
* Subito dopo partirebbe un altro evento modelChange che ricaricherebbe nuovamente la source
|
|
3536
3347
|
*/
|
|
3537
3348
|
_this.ignoreNextWriteValue = false;
|
|
3538
|
-
/**
|
|
3539
|
-
* Sorgente Bindata Filtrata in base al contenuto della casella di testo
|
|
3540
|
-
*/
|
|
3349
|
+
/** Sorgente Bindata Filtrata in base al contenuto della casella di testo */
|
|
3541
3350
|
_this.FilteredBoundSource = [];
|
|
3542
3351
|
//******************** Funzione di throttling per non spammare richieste in caso di animazioni attivate
|
|
3543
3352
|
//TODO: spostarla in un metodo di utilità (esfaenza/extensions)
|
|
@@ -3545,9 +3354,7 @@
|
|
|
3545
3354
|
_this.executionTimers = {};
|
|
3546
3355
|
return _this;
|
|
3547
3356
|
}
|
|
3548
|
-
/**
|
|
3549
|
-
* @ignore
|
|
3550
|
-
*/
|
|
3357
|
+
/** @ignore */
|
|
3551
3358
|
FormAutocompleteComponent.prototype.writeValue = function (value) {
|
|
3552
3359
|
var _this = this;
|
|
3553
3360
|
if (!value)
|
|
@@ -3571,6 +3378,7 @@
|
|
|
3571
3378
|
var val = this.Source.find(function (t) { return t.id == value; });
|
|
3572
3379
|
this.propagateChange(val ? val.id : value);
|
|
3573
3380
|
this.Model = val ? val.description : value;
|
|
3381
|
+
this.EvaluatedModel = this.Model;
|
|
3574
3382
|
};
|
|
3575
3383
|
/**
|
|
3576
3384
|
* Evento di filtro della sorgente dati in base all'input utente
|
|
@@ -3614,9 +3422,7 @@
|
|
|
3614
3422
|
}, 100);
|
|
3615
3423
|
}
|
|
3616
3424
|
};
|
|
3617
|
-
/**
|
|
3618
|
-
* @ignore
|
|
3619
|
-
*/
|
|
3425
|
+
/** @ignore */
|
|
3620
3426
|
FormAutocompleteComponent.prototype.ngOnChanges = function (changes) {
|
|
3621
3427
|
var _a;
|
|
3622
3428
|
var newSource = changes["Source"];
|
|
@@ -3630,20 +3436,14 @@
|
|
|
3630
3436
|
this.cdr.markForCheck();
|
|
3631
3437
|
}
|
|
3632
3438
|
};
|
|
3633
|
-
/**
|
|
3634
|
-
* @ignore
|
|
3635
|
-
*
|
|
3636
|
-
* Override che marca anche il prossimo evento di filterSource da ignorare
|
|
3637
|
-
*/
|
|
3439
|
+
/** @ignore Override che marca anche il prossimo evento di filterSource da ignorare */
|
|
3638
3440
|
FormAutocompleteComponent.prototype.changed = function (forcedValue, markForCheck) {
|
|
3639
3441
|
if (forcedValue === void 0) { forcedValue = null; }
|
|
3640
3442
|
if (markForCheck === void 0) { markForCheck = false; }
|
|
3641
3443
|
this.ignoreNextWriteValue = true;
|
|
3642
3444
|
_super.prototype.changed.call(this, forcedValue, markForCheck);
|
|
3643
3445
|
};
|
|
3644
|
-
/**
|
|
3645
|
-
* @ignore
|
|
3646
|
-
*/
|
|
3446
|
+
/** @ignore */
|
|
3647
3447
|
FormAutocompleteComponent.prototype.onNotNullValueSet = function () { };
|
|
3648
3448
|
/** @ignore */
|
|
3649
3449
|
FormAutocompleteComponent.prototype.throttla = function (id, func, throttleTime) {
|
|
@@ -3659,7 +3459,7 @@
|
|
|
3659
3459
|
FormAutocompleteComponent.decorators = [
|
|
3660
3460
|
{ type: core.Component, args: [{
|
|
3661
3461
|
selector: "form-autocomplete",
|
|
3662
|
-
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>",
|
|
3462
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}}\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n <val-autocomplete [FocusSubject]=\"FocusSubject\" [FieldAppearence]=\"FieldAppearence\" [noValidate]=\"!Validation\"\r\n [submitted]=\"Form?.submitted\"\r\n [forceInvalid]=\"ForcedError\"\r\n [readonly]=\"Readonly\"\r\n [label]=\"SelectLabel\"\r\n type=\"text\"\r\n [(ngModel)]=\"Model\"\r\n [id]=\"GeneratedName\"\r\n name=\"{{GeneratedName}}\"\r\n #validationControl=\"ngModel\"\r\n (inputChange)=\"filterSource($event);\"\r\n (inputFocus)=\"focused($event);\"\r\n (inputFinalized)=\"finalized()\"\r\n (optionChange)=\"changed($event);\"\r\n [placeholder]=\"Required ? ((RequiredPlaceholder != null ? RequiredPlaceholder : ('Select' | localize : lc) + '...')) : Placeholder\"\r\n [validationFailed]=\"FailedValidationMessage\"\r\n [FilteredSource]=\"FilteredBoundSource\"\r\n >\r\n </val-autocomplete>\r\n</ng-template>",
|
|
3663
3463
|
providers: [{ provide: localizations.LocalizationService, useClass: FormAutocompleteComponentLoc }],
|
|
3664
3464
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3665
3465
|
},] }
|
|
@@ -3671,7 +3471,8 @@
|
|
|
3671
3471
|
{ type: Array, decorators: [{ type: core.Optional }, { type: core.Inject, args: [forms.NG_VALIDATORS,] }] },
|
|
3672
3472
|
{ type: accessControl.AccessControlService, decorators: [{ type: core.Optional }] },
|
|
3673
3473
|
{ type: accessControl.ComponentContext, decorators: [{ type: core.Optional }] },
|
|
3674
|
-
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] }
|
|
3474
|
+
{ type: String, decorators: [{ type: core.Optional }, { type: core.Inject, args: [ACO_CUSTOMKEY,] }] },
|
|
3475
|
+
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FAV_DEBUG_MODE,] }] }
|
|
3675
3476
|
]; };
|
|
3676
3477
|
FormAutocompleteComponent.propDecorators = {
|
|
3677
3478
|
SelectLabel: [{ type: core.Input }],
|
|
@@ -3681,36 +3482,22 @@
|
|
|
3681
3482
|
CaseSensitive: [{ type: core.Input }]
|
|
3682
3483
|
};
|
|
3683
3484
|
|
|
3684
|
-
/**
|
|
3685
|
-
* Componente che identifica la selezione di un orario
|
|
3686
|
-
*/
|
|
3485
|
+
/** Componente che identifica la selezione di un orario */
|
|
3687
3486
|
var FormTimeComponent = /** @class */ (function (_super) {
|
|
3688
3487
|
__extends(FormTimeComponent, _super);
|
|
3689
|
-
/**
|
|
3690
|
-
* @ignore
|
|
3691
|
-
*/
|
|
3488
|
+
/** @ignore */
|
|
3692
3489
|
function FormTimeComponent(cdr, dateAdapter, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY) {
|
|
3693
3490
|
var _this = _super.call(this, cdr, ngControl, _validators, ac, AppContext, ACO_CUSTOMKEY, true) || this;
|
|
3694
3491
|
_this.dateAdapter = dateAdapter;
|
|
3695
|
-
/**
|
|
3696
|
-
* Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi)
|
|
3697
|
-
*/
|
|
3492
|
+
/** Mostra o meno gli spinner dove cliccare per aumentare/diminuire le componenti dell'orologio (ore, minuti e secondi) */
|
|
3698
3493
|
_this.ShowSpinners = false;
|
|
3699
|
-
/**
|
|
3700
|
-
* Imposta lo step (minimo avanzamento) per la cella "ore"
|
|
3701
|
-
*/
|
|
3494
|
+
/** Imposta lo step (minimo avanzamento) per la cella "ore" */
|
|
3702
3495
|
_this.StepHour = 1;
|
|
3703
|
-
/**
|
|
3704
|
-
* Imposta lo step (minimo avanzamento) per la cella "minuti"
|
|
3705
|
-
*/
|
|
3496
|
+
/** Imposta lo step (minimo avanzamento) per la cella "minuti" */
|
|
3706
3497
|
_this.StepMinute = 1;
|
|
3707
|
-
/**
|
|
3708
|
-
* Imposta lo step (minimo avanzamento) per la cella "secondi"
|
|
3709
|
-
*/
|
|
3498
|
+
/** Imposta lo step (minimo avanzamento) per la cella "secondi" */
|
|
3710
3499
|
_this.StepSecond = 5;
|
|
3711
|
-
/**
|
|
3712
|
-
* Indica se mostrare i secondi o meno
|
|
3713
|
-
*/
|
|
3500
|
+
/** Indica se mostrare i secondi o meno */
|
|
3714
3501
|
_this.ShowSeconds = false;
|
|
3715
3502
|
/**
|
|
3716
3503
|
* Indica il formato da utilizzare sia in Input che in Output
|
|
@@ -3724,28 +3511,27 @@
|
|
|
3724
3511
|
_this.InOutFormat = 'timestring';
|
|
3725
3512
|
return _this;
|
|
3726
3513
|
}
|
|
3727
|
-
/**
|
|
3728
|
-
* @ignore Override per gestire input in ingresso
|
|
3729
|
-
*/
|
|
3514
|
+
/** @ignore Override per gestire input in ingresso */
|
|
3730
3515
|
FormTimeComponent.prototype.writeValue = function (obj) {
|
|
3731
|
-
var _a = __read((obj || "0:0:0").split(":"), 3), hours = _a[0], minutes = _a[1], seconds = _a[2];
|
|
3732
3516
|
//Qualsiasi cosa mi arrivi devo ricondurla a un dayjs
|
|
3733
3517
|
switch (this.InOutFormat) {
|
|
3734
3518
|
case 'date':
|
|
3735
3519
|
obj = dayjs(obj);
|
|
3520
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3736
3521
|
break;
|
|
3737
3522
|
case 'timestring':
|
|
3738
|
-
|
|
3523
|
+
var _a = __read((obj || "00:00:00").split(":"), 3), hours = _a[0], minutes = _a[1], seconds = _a[2];
|
|
3524
|
+
obj = dayjs().hour(parseInt(hours !== null && hours !== void 0 ? hours : 0)).minute(parseInt(minutes !== null && minutes !== void 0 ? minutes : 0)).second(parseInt(seconds !== null && seconds !== void 0 ? seconds : 0));
|
|
3525
|
+
this.EvaluatedModel = (hours || '00') + ":" + (minutes || '00') + ":" + (seconds || '00');
|
|
3739
3526
|
break;
|
|
3740
3527
|
case 'dayjs':
|
|
3741
3528
|
obj = obj;
|
|
3529
|
+
this.EvaluatedModel = obj.format('HH:mm:ss');
|
|
3742
3530
|
break;
|
|
3743
3531
|
}
|
|
3744
3532
|
_super.prototype.writeValue.call(this, obj);
|
|
3745
3533
|
};
|
|
3746
|
-
/**
|
|
3747
|
-
* @ignore Override per gestire input in uscita
|
|
3748
|
-
*/
|
|
3534
|
+
/** @ignore Override per gestire input in uscita */
|
|
3749
3535
|
FormTimeComponent.prototype.changed = function () {
|
|
3750
3536
|
var toEmit = this.dateAdapter.clone(this.Model);
|
|
3751
3537
|
switch (this.InOutFormat) {
|
|
@@ -3761,16 +3547,14 @@
|
|
|
3761
3547
|
}
|
|
3762
3548
|
_super.prototype.changed.call(this, toEmit);
|
|
3763
3549
|
};
|
|
3764
|
-
/**
|
|
3765
|
-
* @ignore
|
|
3766
|
-
*/
|
|
3550
|
+
/** @ignore */
|
|
3767
3551
|
FormTimeComponent.prototype.onNotNullValueSet = function () { };
|
|
3768
3552
|
return FormTimeComponent;
|
|
3769
3553
|
}(BaseFormControl));
|
|
3770
3554
|
FormTimeComponent.decorators = [
|
|
3771
3555
|
{ type: core.Component, args: [{
|
|
3772
3556
|
selector: "form-time",
|
|
3773
|
-
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>",
|
|
3557
|
+
template: "<ng-container *ngIf=\"!FormLayout\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout\" class=\"form-group row {{FormGroupClass}}\" [class.app-margin-bottom-0]=\"Last\">\r\n <label class=\"col-md-{{LabelColWidth}}\" [class.app-bold]=\"DisplayMode\" [class.m-t-5]=\"!DisplayMode\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}:</label>\r\n <div class=\"col-md-{{InputColWidth}} m-t-5\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"ShowSpinners\" [stepHour]=\"StepHour\" [stepMinute]=\"StepMinute\" [stepSecond]=\"StepSecond\"\r\n [showSeconds]=\"ShowSeconds\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n\r\n</ng-template>",
|
|
3774
3558
|
changeDetection: core.ChangeDetectionStrategy.OnPush
|
|
3775
3559
|
},] }
|
|
3776
3560
|
];
|
|
@@ -3864,6 +3648,7 @@
|
|
|
3864
3648
|
ngModule: FormsAndValidationsModule,
|
|
3865
3649
|
providers: [
|
|
3866
3650
|
{ provide: FAV_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
|
|
3651
|
+
{ provide: FAV_DEBUG_MODE, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) != null ? config === null || config === void 0 ? void 0 : config.debugMode : false },
|
|
3867
3652
|
{ provide: ACO_CUSTOMKEY, useValue: (config === null || config === void 0 ? void 0 : config.acocustom) || null },
|
|
3868
3653
|
{ provide: datetimePicker.NGX_MAT_DATE_FORMATS, useValue: formats_long },
|
|
3869
3654
|
{ provide: datetimePicker.NgxMatDateAdapter, useClass: NgxExpandedDayJsDateAdapter },
|
|
@@ -3917,14 +3702,15 @@
|
|
|
3917
3702
|
exports.ɵb = BaseValidationLoc;
|
|
3918
3703
|
exports.ɵc = FAV_LOCALE;
|
|
3919
3704
|
exports.ɵd = ACO_CUSTOMKEY;
|
|
3920
|
-
exports.ɵe =
|
|
3921
|
-
exports.ɵf =
|
|
3922
|
-
exports.ɵg =
|
|
3923
|
-
exports.ɵh =
|
|
3924
|
-
exports.ɵi =
|
|
3925
|
-
exports.ɵj =
|
|
3926
|
-
exports.ɵk =
|
|
3927
|
-
exports.ɵl =
|
|
3705
|
+
exports.ɵe = FAV_DEBUG_MODE;
|
|
3706
|
+
exports.ɵf = CustomRequiredDirective;
|
|
3707
|
+
exports.ɵg = BaseFormControl;
|
|
3708
|
+
exports.ɵh = FormSelectComponentLoc;
|
|
3709
|
+
exports.ɵi = FormAdaptiveComponentLoc;
|
|
3710
|
+
exports.ɵj = FormMultiSelectComponent;
|
|
3711
|
+
exports.ɵk = FormMultiSelectComponentLoc;
|
|
3712
|
+
exports.ɵl = FormFileComponentLoc;
|
|
3713
|
+
exports.ɵm = FormAutocompleteComponentLoc;
|
|
3928
3714
|
|
|
3929
3715
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3930
3716
|
|