@fluxhub/fluxhub-lib 9.0.118 → 9.0.119
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 +77 -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 +83 -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 +51 -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 +111 -52
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +77 -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,23 @@ 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("."));
|
|
9671
|
+
console.log('onChange ', this.value);
|
|
9662
9672
|
this.onChange(this.value);
|
|
9663
9673
|
}, 50);
|
|
9664
9674
|
}
|
|
9665
9675
|
writeValue(value) {
|
|
9676
|
+
if (this.value == parseFloat(this.formattedAmount.split(".").join("").split(",").join("."))) {
|
|
9677
|
+
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9678
|
+
return;
|
|
9679
|
+
}
|
|
9666
9680
|
if (value == null)
|
|
9667
9681
|
value = 0;
|
|
9668
9682
|
// if (value !== this.innerValue) {
|
|
9669
|
-
|
|
9683
|
+
if (typeof (value) == 'string') {
|
|
9684
|
+
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
9685
|
+
}
|
|
9686
|
+
console.log('value ', value);
|
|
9670
9687
|
this.value = value;
|
|
9671
9688
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9672
9689
|
//}
|
|
@@ -9683,7 +9700,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9683
9700
|
// if (typeof (element.target.value) !== 'number')
|
|
9684
9701
|
// this.formattedAmount = this.currencyPipe.transform(this.value);
|
|
9685
9702
|
setTimeout(() => {
|
|
9686
|
-
this.value = parseFloat(this.formattedAmount.split(
|
|
9703
|
+
this.value = parseFloat(this.formattedAmount.split(".").join("").split(",").join("."));
|
|
9687
9704
|
// this.writeValue(this.value);
|
|
9688
9705
|
this.formattedAmount = this.transform(this.value, this.decimal);
|
|
9689
9706
|
}, 50);
|
|
@@ -9696,13 +9713,21 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9696
9713
|
}
|
|
9697
9714
|
}
|
|
9698
9715
|
transform(value, fractionSize = 2) {
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9716
|
+
console.log('b', typeof (value));
|
|
9717
|
+
if (typeof (value) == 'string') {
|
|
9718
|
+
value = parseFloat(value.split(".").join("").split(",").join("."));
|
|
9719
|
+
}
|
|
9720
|
+
console.log('a', typeof (value));
|
|
9721
|
+
let [integer, fraction = ""] = (value || "").toString().split(".");
|
|
9722
|
+
console.log('transform ', value);
|
|
9723
|
+
fraction =
|
|
9724
|
+
fractionSize > 0
|
|
9725
|
+
? "," + (fraction + "000000").substring(0, fractionSize)
|
|
9726
|
+
: "";
|
|
9727
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
9728
|
+
if (integer == "")
|
|
9729
|
+
integer = "0";
|
|
9730
|
+
console.log('transform end ', integer + fraction);
|
|
9706
9731
|
return integer + fraction;
|
|
9707
9732
|
}
|
|
9708
9733
|
removeCurrencyPipeFormat(element) {
|
|
@@ -9729,7 +9754,7 @@ let FHCurrencyFieldComponent = class FHCurrencyFieldComponent {
|
|
|
9729
9754
|
}
|
|
9730
9755
|
};
|
|
9731
9756
|
__decorate([
|
|
9732
|
-
ViewChild(
|
|
9757
|
+
ViewChild("el"),
|
|
9733
9758
|
__metadata("design:type", ElementRef)
|
|
9734
9759
|
], FHCurrencyFieldComponent.prototype, "el", void 0);
|
|
9735
9760
|
__decorate([
|
|
@@ -9774,25 +9799,47 @@ __decorate([
|
|
|
9774
9799
|
], FHCurrencyFieldComponent.prototype, "value", void 0);
|
|
9775
9800
|
FHCurrencyFieldComponent = __decorate([
|
|
9776
9801
|
Component({
|
|
9777
|
-
selector:
|
|
9802
|
+
selector: "FHCurrencyField",
|
|
9778
9803
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$7],
|
|
9779
9804
|
template: `
|
|
9780
|
-
<mat-form-field
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9805
|
+
<mat-form-field
|
|
9806
|
+
[hidden]="!enabled || hidden"
|
|
9807
|
+
appearance="outline"
|
|
9808
|
+
floatLabel="always"
|
|
9809
|
+
><mat-label>{{ label }}</mat-label>
|
|
9810
|
+
<input
|
|
9811
|
+
type="text"
|
|
9812
|
+
style="text-align:right"
|
|
9813
|
+
#el
|
|
9814
|
+
matInput
|
|
9815
|
+
[disabled]="!enabled"
|
|
9816
|
+
[(ngModel)]="formattedAmount"
|
|
9817
|
+
(focusout)="chg()"
|
|
9818
|
+
[style.color]="getStyle_color()"
|
|
9819
|
+
(keydown)="kd($event)"
|
|
9820
|
+
|
|
9821
|
+
(click)="click_select_allf($event)"
|
|
9822
|
+
(focus)="removeCurrencyPipeFormat($event); select_allf($event)"
|
|
9823
|
+
|
|
9824
|
+
/>
|
|
9786
9825
|
</mat-form-field>
|
|
9787
|
-
<mat-form-field
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9826
|
+
<mat-form-field
|
|
9827
|
+
[hidden]="enabled || hidden"
|
|
9828
|
+
appearance="outline"
|
|
9829
|
+
floatLabel="always"
|
|
9830
|
+
><mat-label>{{ label }}</mat-label>
|
|
9831
|
+
<input
|
|
9832
|
+
type="text"
|
|
9833
|
+
style="text-align:right"
|
|
9834
|
+
[style.color]="getStyle_color()"
|
|
9835
|
+
#el1
|
|
9836
|
+
matInput
|
|
9837
|
+
[disabled]="true"
|
|
9838
|
+
[(ngModel)]="formattedAmount"
|
|
9839
|
+
/>
|
|
9791
9840
|
</mat-form-field>
|
|
9792
9841
|
`,
|
|
9793
|
-
styles: [
|
|
9794
|
-
|
|
9795
|
-
`]
|
|
9842
|
+
styles: [``]
|
|
9796
9843
|
}),
|
|
9797
9844
|
__metadata("design:paramtypes", [])
|
|
9798
9845
|
], FHCurrencyFieldComponent);
|
|
@@ -11636,7 +11683,14 @@ let LocalDBService = class LocalDBService {
|
|
|
11636
11683
|
}
|
|
11637
11684
|
if (crypt) {
|
|
11638
11685
|
if (json_format) {
|
|
11639
|
-
|
|
11686
|
+
try {
|
|
11687
|
+
resolve(JSON.parse(this.uti.decrypt_v2(localStorage.getItem(key))));
|
|
11688
|
+
}
|
|
11689
|
+
catch (e) {
|
|
11690
|
+
console.log(e, 'Errore JSON ' + ' ' + this.uti.decrypt_v2(localStorage.getItem(key)));
|
|
11691
|
+
resolve({});
|
|
11692
|
+
return;
|
|
11693
|
+
}
|
|
11640
11694
|
return;
|
|
11641
11695
|
}
|
|
11642
11696
|
else {
|
|
@@ -11646,7 +11700,14 @@ let LocalDBService = class LocalDBService {
|
|
|
11646
11700
|
}
|
|
11647
11701
|
else {
|
|
11648
11702
|
if (json_format) {
|
|
11649
|
-
|
|
11703
|
+
try {
|
|
11704
|
+
resolve(JSON.parse('' + localStorage.getItem(key)));
|
|
11705
|
+
}
|
|
11706
|
+
catch (e) {
|
|
11707
|
+
console.log(e, 'Errore JSON ' + localStorage.getItem(key));
|
|
11708
|
+
resolve({});
|
|
11709
|
+
return;
|
|
11710
|
+
}
|
|
11650
11711
|
return;
|
|
11651
11712
|
}
|
|
11652
11713
|
else {
|
|
@@ -11654,8 +11715,6 @@ let LocalDBService = class LocalDBService {
|
|
|
11654
11715
|
return;
|
|
11655
11716
|
}
|
|
11656
11717
|
}
|
|
11657
|
-
resolve(null);
|
|
11658
|
-
return;
|
|
11659
11718
|
});
|
|
11660
11719
|
}
|
|
11661
11720
|
write(k, obj, crypt = true, json_format = true) {
|
|
@@ -14080,8 +14139,8 @@ class dati_aggiuntivi {
|
|
|
14080
14139
|
console.log('min_liv ', min_liv);
|
|
14081
14140
|
for (let i = 0; i < this.livs.length; i++)
|
|
14082
14141
|
if (min_liv == this.livs[i].livello) {
|
|
14083
|
-
console.log('this.user_idp.toUpperCase() ',
|
|
14084
|
-
console.log('this.livs[i].idp.toUpperCase() ',
|
|
14142
|
+
//console.log('this.user_idp.toUpperCase() ',this.user_idp.toUpperCase());
|
|
14143
|
+
//console.log('this.livs[i].idp.toUpperCase() ',this.livs[i].idp.toUpperCase() );
|
|
14085
14144
|
if (this.user_idp.toUpperCase() == this.livs[i].idp.toUpperCase() || this.livs[i].gruppo_parallelo == '*ALLUSERS') {
|
|
14086
14145
|
if (this.livs[i].abilita_indietro == 1)
|
|
14087
14146
|
this.respingi_enabled = true;
|