@fluxhub/fluxhub-lib 10.0.202 → 10.0.203
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 +40 -27
- 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/fhautocomplete.js +34 -28
- package/fesm2015/fluxhub-fluxhub-lib.js +33 -27
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -7127,36 +7127,49 @@
|
|
|
7127
7127
|
this.focusout.emit();
|
|
7128
7128
|
};
|
|
7129
7129
|
FHAutoCompleteComponent.prototype.onChange_up = function (e) {
|
|
7130
|
+
var _this = this;
|
|
7130
7131
|
// console.log('onChange()');
|
|
7131
|
-
this.
|
|
7132
|
-
|
|
7132
|
+
if (this.sItem == null)
|
|
7133
|
+
this.sItem = '';
|
|
7134
|
+
if (this.sItem != '')
|
|
7135
|
+
this.searchItemsFiltered = this.myData.filter(function (option) { return option.descrizione_valore.toLowerCase().includes(_this.sItem); }).map(function (_a) {
|
|
7136
|
+
var data = _a.data;
|
|
7137
|
+
return data.slice(0, 20);
|
|
7138
|
+
});
|
|
7139
|
+
else
|
|
7140
|
+
this.searchItemsFiltered = this.myData.map(function (_a) {
|
|
7141
|
+
var data = _a.data;
|
|
7142
|
+
return data.slice(0, 20);
|
|
7143
|
+
});
|
|
7144
|
+
/* if (this.sItem != null) {
|
|
7133
7145
|
if (this.sItem != "") {
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
if (ps.length < 4 && this.searchItemsFiltered.length == 20) {
|
|
7145
|
-
break;
|
|
7146
|
-
}
|
|
7147
|
-
}
|
|
7148
|
-
}
|
|
7149
|
-
else {
|
|
7150
|
-
// console.log('onChange()1');
|
|
7151
|
-
if (this.myData != null)
|
|
7152
|
-
for (var i = 0; i < this.myData.length; i++) {
|
|
7153
|
-
this.searchItemsFiltered.push(this.myData[i]);
|
|
7154
|
-
if (i == 20) {
|
|
7155
|
-
break;
|
|
7156
|
-
}
|
|
7146
|
+
this.searchItemsFiltered = [];
|
|
7147
|
+
let ps: string = this.sItem.toLowerCase();
|
|
7148
|
+
if (this.myData != null)
|
|
7149
|
+
for (let i: number = 0; i < this.myData.length; i++) {
|
|
7150
|
+
if (this.myData[i].descrizione_valore != null) {
|
|
7151
|
+
if (
|
|
7152
|
+
this.myData[i].descrizione_valore.toLowerCase().indexOf(ps) !=
|
|
7153
|
+
-1
|
|
7154
|
+
) {
|
|
7155
|
+
this.searchItemsFiltered.push(this.myData[i]);
|
|
7157
7156
|
}
|
|
7157
|
+
}
|
|
7158
|
+
if (ps.length < 4 && this.searchItemsFiltered.length == 20) {
|
|
7159
|
+
break;
|
|
7160
|
+
}
|
|
7161
|
+
}
|
|
7162
|
+
} else {
|
|
7163
|
+
// console.log('onChange()1');
|
|
7164
|
+
if (this.myData != null)
|
|
7165
|
+
for (let i: number = 0; i < this.myData.length; i++) {
|
|
7166
|
+
this.searchItemsFiltered.push(this.myData[i]);
|
|
7167
|
+
if (i == 20) {
|
|
7168
|
+
break;
|
|
7169
|
+
}
|
|
7170
|
+
}
|
|
7158
7171
|
}
|
|
7159
|
-
|
|
7172
|
+
}*/
|
|
7160
7173
|
};
|
|
7161
7174
|
FHAutoCompleteComponent.prototype.selectedSearchItem = function (event) {
|
|
7162
7175
|
this.setByDescri(event.option.value);
|
|
@@ -7412,7 +7425,7 @@
|
|
|
7412
7425
|
{ type: i0.Component, args: [{
|
|
7413
7426
|
selector: "FHAutoComplete",
|
|
7414
7427
|
providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$4],
|
|
7415
|
-
template: "\n <div style=\"min-height:45px\" *ngIf=\"enabled && !hidden && !is_loaded && myData?.length==0\"><mat-spinner diameter=\"25\" ></mat-spinner></div>\n <mat-form-field\n [hidden]=\"!enabled || hidden || (!is_loaded && myData?.length==0)\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n matInput\n [disabled]=\"!enabled || hidden\"\n [matAutocomplete]=\"auto\"\n [required]=\"required\"\n (keyup)=\"onChange_up($event)\"\n [(ngModel)]=\"sItem\"\n (focus)=\"fi_search()\"\n (focusout)=\"fo_search($event)\"\n #searchp\n />\n </mat-form-field>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectedSearchItem($event)\"\n autoActiveFirstOption\n >\n <mat-option\n *ngFor=\"let objx of searchItemsFiltered\"\n [value]=\"objx.descrizione_valore\"\n >\n {{ objx.descrizione_valore }}\n </mat-option>\n </mat-autocomplete>\n\n <div class=\"ui negative message\" *ngIf=\"errorMsg != ''\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n {{ errorMsg }}\n </div>\n </div>\n <mat-form-field\n [hidden]=\"enabled || hidden\"\n\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [required]=\"required\" [(ngModel)]=\"sItem\" />\n </mat-form-field>\n ",
|
|
7428
|
+
template: "\n <div style=\"min-height:45px\" *ngIf=\"enabled && !hidden && !is_loaded && myData?.length==0\"><mat-spinner diameter=\"25\" ></mat-spinner></div>\n <mat-form-field\n [hidden]=\"!enabled || hidden || (!is_loaded && myData?.length==0)\"\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input\n matInput\n [disabled]=\"!enabled || hidden\"\n [matAutocomplete]=\"auto\"\n [required]=\"required\"\n (keyup)=\"onChange_up($event)\"\n [(ngModel)]=\"sItem\"\n (focus)=\"fi_search();onChange_up($event)\"\n (focusout)=\"fo_search($event)\"\n #searchp\n />\n </mat-form-field>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"selectedSearchItem($event)\"\n autoActiveFirstOption\n >\n <mat-option\n *ngFor=\"let objx of searchItemsFiltered\"\n [value]=\"objx.descrizione_valore\"\n >\n {{ objx.descrizione_valore }}\n </mat-option>\n </mat-autocomplete>\n\n <div class=\"ui negative message\" *ngIf=\"errorMsg != ''\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n {{ errorMsg }}\n </div>\n </div>\n <mat-form-field\n [hidden]=\"enabled || hidden\"\n\n appearance=\"outline\"\n floatLabel=\"always\"\n ><mat-label>{{ label }}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [required]=\"required\" [(ngModel)]=\"sItem\" />\n </mat-form-field>\n ",
|
|
7416
7429
|
styles: [""]
|
|
7417
7430
|
},] }
|
|
7418
7431
|
];
|