@fluxhub/fluxhub-lib 9.0.118 → 9.0.120
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/fluxhub-fluxhub-lib.umd.js +71 -38
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhcurrencyfield.js +75 -41
- package/esm2015/lib/controls/fhdatepicker.js +2 -2
- package/esm2015/lib/controls/fhgrid.js +7 -2
- package/esm2015/lib/controls/fhupload.js +4 -5
- package/esm2015/lib/services/localstorage.service.js +17 -5
- package/esm2015/lib/services/utility.service.js +5 -4
- package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +3 -3
- package/esm5/lib/controls/fhcurrencyfield.js +45 -30
- package/esm5/lib/controls/fhdatepicker.js +2 -2
- package/esm5/lib/controls/fhgrid.js +7 -2
- package/esm5/lib/controls/fhupload.js +2 -2
- package/esm5/lib/services/localstorage.service.js +17 -5
- package/esm5/lib/services/utility.service.js +5 -4
- package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +3 -3
- package/fesm2015/fluxhub-fluxhub-lib.js +103 -52
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +71 -38
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhcurrencyfield.d.ts +5 -3
- package/lib/services/utility.service.d.ts +2 -3
- package/package.json +1 -1
|
@@ -227,7 +227,6 @@ var UtilityService_1;
|
|
|
227
227
|
let UtilityService = UtilityService_1 = class UtilityService {
|
|
228
228
|
constructor(app_s) {
|
|
229
229
|
this.app_s = app_s;
|
|
230
|
-
this.simpleCrypt = new SimpleCrypt();
|
|
231
230
|
}
|
|
232
231
|
set_home_title(s) {
|
|
233
232
|
setTimeout(() => { this.app_s.getState().topnavTitle = s; }, 100);
|
|
@@ -738,10 +737,12 @@ let UtilityService = UtilityService_1 = class UtilityService {
|
|
|
738
737
|
return enc;
|
|
739
738
|
}
|
|
740
739
|
encrypt_v2(s) {
|
|
741
|
-
|
|
740
|
+
let simpleCrypt = new SimpleCrypt();
|
|
741
|
+
return simpleCrypt.encode("prologika_fluxhub_etjda", s);
|
|
742
742
|
}
|
|
743
743
|
decrypt_v2(s) {
|
|
744
|
-
|
|
744
|
+
let simpleCrypt = new SimpleCrypt();
|
|
745
|
+
return simpleCrypt.decode("prologika_fluxhub_etjda", s);
|
|
745
746
|
}
|
|
746
747
|
string_sqlvalue(s) {
|
|
747
748
|
if (s == null)
|
|
@@ -2133,10 +2134,9 @@ FHUploadComponent = __decorate([
|
|
|
2133
2134
|
</button>
|
|
2134
2135
|
</div>
|
|
2135
2136
|
</div>
|
|
2136
|
-
<div *ngIf="!enabled" fxLayout="row">
|
|
2137
|
-
<label>{{label}}:</label>{{descrizione}}
|
|
2138
|
-
<button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size:
|
|
2139
|
-
|
|
2137
|
+
<div *ngIf="!enabled" fxLayout="row" fxLayoutGap="10px">
|
|
2138
|
+
<label>{{label}}:</label><div *ngIf="label!=descrizione">{{descrizione}}</div>
|
|
2139
|
+
<button mat-flat-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px;background-color: #F5F5F5">{{label_b}}</button>
|
|
2140
2140
|
</div>
|
|
2141
2141
|
|
|
2142
2142
|
`,
|
|
@@ -6018,7 +6018,12 @@ let FHGridComponent = class FHGridComponent {
|
|
|
6018
6018
|
for (let j = 0; j < p_col.length; j++) {
|
|
6019
6019
|
if (str_fields != '')
|
|
6020
6020
|
str_fields += ',';
|
|
6021
|
-
|
|
6021
|
+
if (p_col[j].getColDef().headerName == null)
|
|
6022
|
+
str_fields += '[' + p_col[j].getColDef().field + ']';
|
|
6023
|
+
else if (p_col[j].getColDef().headerName == null)
|
|
6024
|
+
str_fields += '[' + p_col[j].getColDef().field + ']';
|
|
6025
|
+
else
|
|
6026
|
+
str_fields += '[' + p_col[j].getColDef().field + '] [' + p_col[j].getColDef().headerName + ']';
|
|
6022
6027
|
}
|
|
6023
6028
|
if (this.fields.indexOf('DISTINCT') != -1)
|
|
6024
6029
|
str_fields = 'DISTINCT ' + str_fields;
|
|
@@ -8497,7 +8502,7 @@ FHDatePickerComponent = __decorate([
|
|
|
8497
8502
|
|
|
8498
8503
|
<mat-form-field (click)="chxx($event)" appearance="outline" floatLabel="always"><mat-label>{{label}}</mat-label>
|
|
8499
8504
|
<input [disabled]="!enabled" #pickerId (dateChange)="ch($event)" (focusout)="dt_chg($event)" (keyup)="checkInput($event)"
|
|
8500
|
-
|
|
8505
|
+
[min]="min_date" [max]="max_date" (click)="chxx($event)" [(ngModel)]="date_sel" matInput [matDatepicker]="picker" >
|
|
8501
8506
|
<mat-datepicker-toggle matSuffix [for]="picker" (click)="chxx($event)"></mat-datepicker-toggle>
|
|
8502
8507
|
<mat-datepicker (click)="chxx($event)" #picker></mat-datepicker>
|
|
8503
8508
|
</mat-form-field>
|
|
@@ -9614,32 +9619,28 @@ FHLogPanelComponent = __decorate([
|
|
|
9614
9619
|
__metadata("design:paramtypes", [UtilityService])
|
|
9615
9620
|
], FHLogPanelComponent);
|
|
9616
9621
|
|
|
9617
|
-
const noop$6 = () => {
|
|
9618
|
-
};
|
|
9622
|
+
const noop$6 = () => { };
|
|
9619
9623
|
const ɵ0$6 = noop$6;
|
|
9620
9624
|
const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7 = {
|
|
9621
9625
|
provide: NG_VALUE_ACCESSOR,
|
|
9622
9626
|
useExisting: forwardRef(() => FHCurrencyFieldComponent),
|
|
9623
|
-
multi: true
|
|
9627
|
+
multi: true,
|
|
9624
9628
|
};
|
|
9625
9629
|
let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
9626
9630
|
constructor() {
|
|
9627
9631
|
this.decimal = 2;
|
|
9628
|
-
this.label =
|
|
9632
|
+
this.label = "";
|
|
9629
9633
|
this.required = false;
|
|
9630
9634
|
this.enabled = true;
|
|
9631
9635
|
this.hidden = false;
|
|
9632
|
-
this.color =
|
|
9633
|
-
this.m_color =
|
|
9636
|
+
this.color = "";
|
|
9637
|
+
this.m_color = "";
|
|
9634
9638
|
this.label_width = "";
|
|
9635
9639
|
this.change = new EventEmitter();
|
|
9636
9640
|
this.enter_pressed = new EventEmitter();
|
|
9637
|
-
this.
|
|
9638
|
-
this.
|
|
9639
|
-
|
|
9640
|
-
this.onTouched = () => {
|
|
9641
|
-
};
|
|
9642
|
-
this.formattedAmount = '0,00';
|
|
9641
|
+
this.onChange = (_) => { };
|
|
9642
|
+
this.onTouched = () => { };
|
|
9643
|
+
this.formattedAmount = "0,00";
|
|
9643
9644
|
this.value = 0;
|
|
9644
9645
|
}
|
|
9645
9646
|
kd(event) {
|
|
@@ -9647,6 +9648,14 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9647
9648
|
this.enter_pressed.emit();
|
|
9648
9649
|
}
|
|
9649
9650
|
}
|
|
9651
|
+
click_select_allf(element) {
|
|
9652
|
+
setTimeout(() => {
|
|
9653
|
+
this.el.nativeElement.select();
|
|
9654
|
+
}, 200);
|
|
9655
|
+
}
|
|
9656
|
+
select_allf(element) {
|
|
9657
|
+
this.el.nativeElement.select();
|
|
9658
|
+
}
|
|
9650
9659
|
getStyle_color() {
|
|
9651
9660
|
return this.m_color;
|
|
9652
9661
|
}
|
|
@@ -9658,15 +9667,21 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9658
9667
|
}
|
|
9659
9668
|
chg() {
|
|
9660
9669
|
setTimeout(() => {
|
|
9661
|
-
this.value = parseFloat(this.formattedAmount.split(
|
|
9670
|
+
this.value = parseFloat(this.formattedAmount.split(".").join("").split(",").join("."));
|
|
9662
9671
|
this.onChange(this.value);
|
|
9663
9672
|
}, 50);
|
|
9664
9673
|
}
|
|
9665
9674
|
writeValue(value) {
|
|
9675
|
+
if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
|
|
9676
|
+
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9677
|
+
return;
|
|
9678
|
+
}
|
|
9666
9679
|
if (value == null)
|
|
9667
9680
|
value = 0;
|
|
9668
9681
|
// if (value !== this.innerValue) {
|
|
9669
|
-
|
|
9682
|
+
if (typeof (value) == 'string') {
|
|
9683
|
+
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
9684
|
+
}
|
|
9670
9685
|
this.value = value;
|
|
9671
9686
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9672
9687
|
//}
|
|
@@ -9683,7 +9698,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9683
9698
|
// if (typeof (element.target.value) !== 'number')
|
|
9684
9699
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
9685
9700
|
setTimeout(() => {
|
|
9686
|
-
this.value = parseFloat(this.formattedAmount.split(
|
|
9701
|
+
this.value = parseFloat(this.formattedAmount.split(".").join("").split(",").join("."));
|
|
9687
9702
|
// this.writeValue(this.value);
|
|
9688
9703
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9689
9704
|
}, 50);
|
|
@@ -9696,13 +9711,17 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9696
9711
|
}
|
|
9697
9712
|
}
|
|
9698
9713
|
transform(value, fractionSize = 2) {
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9714
|
+
if (typeof (value) == 'string') {
|
|
9715
|
+
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
9716
|
+
}
|
|
9717
|
+
let [integer, fraction = ""] = (value || "").toString().split(".");
|
|
9718
|
+
fraction =
|
|
9719
|
+
fractionSize > 0
|
|
9720
|
+
? "," + (fraction + "000000").substring(0, fractionSize)
|
|
9721
|
+
: "";
|
|
9722
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
9723
|
+
if (integer == "")
|
|
9724
|
+
integer = "0";
|
|
9706
9725
|
return integer + fraction;
|
|
9707
9726
|
}
|
|
9708
9727
|
removeCurrencyPipeFormat(element) {
|
|
@@ -9729,7 +9748,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9729
9748
|
}
|
|
9730
9749
|
};
|
|
9731
9750
|
__decorate([
|
|
9732
|
-
ViewChild(
|
|
9751
|
+
ViewChild("el"),
|
|
9733
9752
|
__metadata("design:type", ElementRef)
|
|
9734
9753
|
], FHCurrencyFieldComponent.prototype, "el", void 0);
|
|
9735
9754
|
__decorate([
|
|
@@ -9774,25 +9793,45 @@ __decorate([
|
|
|
9774
9793
|
], FHCurrencyFieldComponent.prototype, "value", void 0);
|
|
9775
9794
|
FHCurrencyFieldComponent = __decorate([
|
|
9776
9795
|
Component({
|
|
9777
|
-
selector:
|
|
9796
|
+
selector: "FHCurrencyField",
|
|
9778
9797
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
9779
9798
|
template: `
|
|
9780
|
-
<mat-form-field
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9799
|
+
<mat-form-field
|
|
9800
|
+
[hidden]="!enabled || hidden"
|
|
9801
|
+
appearance="outline"
|
|
9802
|
+
floatLabel="always"
|
|
9803
|
+
><mat-label>{{ label }}</mat-label>
|
|
9804
|
+
<input
|
|
9805
|
+
type="text"
|
|
9806
|
+
style="text-align:right"
|
|
9807
|
+
#el
|
|
9808
|
+
matInput
|
|
9809
|
+
[disabled]="!enabled"
|
|
9810
|
+
[(ngModel)]="formattedAmount"
|
|
9811
|
+
(focusout)="chg()"
|
|
9812
|
+
[style.color]="getStyle_color()"
|
|
9813
|
+
(keydown)="kd($event)"
|
|
9814
|
+
(click)="click_select_allf($event)"
|
|
9815
|
+
(focus)="removeCurrencyPipeFormat($event); select_allf($event)"
|
|
9816
|
+
/>
|
|
9786
9817
|
</mat-form-field>
|
|
9787
|
-
<mat-form-field
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9818
|
+
<mat-form-field
|
|
9819
|
+
[hidden]="enabled || hidden"
|
|
9820
|
+
appearance="outline"
|
|
9821
|
+
floatLabel="always"
|
|
9822
|
+
><mat-label>{{ label }}</mat-label>
|
|
9823
|
+
<input
|
|
9824
|
+
type="text"
|
|
9825
|
+
style="text-align:right"
|
|
9826
|
+
[style.color]="getStyle_color()"
|
|
9827
|
+
#el1
|
|
9828
|
+
matInput
|
|
9829
|
+
[disabled]="true"
|
|
9830
|
+
[(ngModel)]="formattedAmount"
|
|
9831
|
+
/>
|
|
9791
9832
|
</mat-form-field>
|
|
9792
9833
|
`,
|
|
9793
|
-
styles: [
|
|
9794
|
-
|
|
9795
|
-
`]
|
|
9834
|
+
styles: [``]
|
|
9796
9835
|
}),
|
|
9797
9836
|
__metadata("design:paramtypes", [])
|
|
9798
9837
|
], FHCurrencyFieldComponent);
|
|
@@ -11636,7 +11675,14 @@ let LocalDBService = class LocalDBService {
|
|
|
11636
11675
|
}
|
|
11637
11676
|
if (crypt) {
|
|
11638
11677
|
if (json_format) {
|
|
11639
|
-
|
|
11678
|
+
try {
|
|
11679
|
+
resolve(JSON.parse(this.uti.decrypt_v2(localStorage.getItem(key))));
|
|
11680
|
+
}
|
|
11681
|
+
catch (e) {
|
|
11682
|
+
console.log(e, 'Errore JSON ' + ' ' + this.uti.decrypt_v2(localStorage.getItem(key)));
|
|
11683
|
+
resolve({});
|
|
11684
|
+
return;
|
|
11685
|
+
}
|
|
11640
11686
|
return;
|
|
11641
11687
|
}
|
|
11642
11688
|
else {
|
|
@@ -11646,7 +11692,14 @@ let LocalDBService = class LocalDBService {
|
|
|
11646
11692
|
}
|
|
11647
11693
|
else {
|
|
11648
11694
|
if (json_format) {
|
|
11649
|
-
|
|
11695
|
+
try {
|
|
11696
|
+
resolve(JSON.parse('' + localStorage.getItem(key)));
|
|
11697
|
+
}
|
|
11698
|
+
catch (e) {
|
|
11699
|
+
console.log(e, 'Errore JSON ' + localStorage.getItem(key));
|
|
11700
|
+
resolve({});
|
|
11701
|
+
return;
|
|
11702
|
+
}
|
|
11650
11703
|
return;
|
|
11651
11704
|
}
|
|
11652
11705
|
else {
|
|
@@ -11654,8 +11707,6 @@ let LocalDBService = class LocalDBService {
|
|
|
11654
11707
|
return;
|
|
11655
11708
|
}
|
|
11656
11709
|
}
|
|
11657
|
-
resolve(null);
|
|
11658
|
-
return;
|
|
11659
11710
|
});
|
|
11660
11711
|
}
|
|
11661
11712
|
write(k, obj, crypt = true, json_format = true) {
|
|
@@ -14080,8 +14131,8 @@ class dati_aggiuntivi {
|
|
|
14080
14131
|
console.log('min_liv ', min_liv);
|
|
14081
14132
|
for (let i = 0; i < this.livs.length; i++)
|
|
14082
14133
|
if (min_liv == this.livs[i].livello) {
|
|
14083
|
-
console.log('this.user_idp.toUpperCase() ',
|
|
14084
|
-
console.log('this.livs[i].idp.toUpperCase() ',
|
|
14134
|
+
//console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
|
|
14135
|
+
//console.log('this.livs[i].idp.toUpperCase() ',this.livs[i].idp.toUpperCase() );
|
|
14085
14136
|
if (this.user_idp.toUpperCase() == this.livs[i].idp.toUpperCase() || this.livs[i].gruppo_parallelo == '*ALLUSERS') {
|
|
14086
14137
|
if (this.livs[i].abilita_indietro == 1)
|
|
14087
14138
|
this.respingi_enabled = true;
|