@fluxhub/fluxhub-lib 9.0.29 → 9.0.31

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.
@@ -1879,30 +1879,37 @@ var WinWait = /** @class */ (function () {
1879
1879
  return WinWait;
1880
1880
  }());
1881
1881
 
1882
- var FHComboboxComponent = /** @class */ (function () {
1882
+ var FHComboboxComponent = /** @class */ (function (_super) {
1883
+ __extends(FHComboboxComponent, _super);
1883
1884
  function FHComboboxComponent(_dataService, _dataService_odbc) {
1884
- this._dataService = _dataService;
1885
- this._dataService_odbc = _dataService_odbc;
1886
- this.init_fill = true;
1887
- this.sql = "";
1888
- this.types = [];
1889
- this.values = [];
1890
- this.hidden = false;
1891
- this.label = "";
1892
- this.enabled = true;
1893
- this.required = false;
1894
- this.sel_label = "";
1895
- this.fillend = new EventEmitter();
1896
- this.selchange = new EventEmitter();
1897
- this.initend = new EventEmitter();
1898
- this.myData = [];
1899
- this.valDef = "-1";
1900
- this.selval = "-1";
1901
- this.errorMsg = "";
1902
- this.db_type = "1";
1903
- this.dis_value = '';
1904
- this.descri_val = "";
1885
+ var _this = _super.call(this) || this;
1886
+ _this._dataService = _dataService;
1887
+ _this._dataService_odbc = _dataService_odbc;
1888
+ _this.init_fill = true;
1889
+ _this.sql = "";
1890
+ _this.types = [];
1891
+ _this.values = [];
1892
+ _this.hidden = false;
1893
+ _this.label = "";
1894
+ _this.enabled = true;
1895
+ _this.required = false;
1896
+ _this.sel_label = "";
1897
+ _this.fillend = new EventEmitter();
1898
+ _this.selchange = new EventEmitter();
1899
+ _this.initend = new EventEmitter();
1900
+ _this.myData = [];
1901
+ _this.valDef = "-1";
1902
+ _this.selval = "-1";
1903
+ _this.errorMsg = "";
1904
+ _this.db_type = "1";
1905
+ _this.dis_value = '';
1906
+ _this.descri_val = "";
1907
+ return _this;
1905
1908
  }
1909
+ FHComboboxComponent_1 = FHComboboxComponent;
1910
+ FHComboboxComponent.prototype.setValue = function (desc_val) {
1911
+ this.setByValue(desc_val);
1912
+ };
1906
1913
  FHComboboxComponent.prototype.update_dis = function () {
1907
1914
  this.dis_value = '';
1908
1915
  try {
@@ -2152,6 +2159,31 @@ var FHComboboxComponent = /** @class */ (function () {
2152
2159
  .selchange
2153
2160
  .emit({ event: this.getObj(), valore: this.getValue(), descrizione_valore: this.getDescri() });
2154
2161
  };
2162
+ FHComboboxComponent.prototype.getModelValue = function () {
2163
+ var value = this.getData('valore');
2164
+ return value;
2165
+ };
2166
+ FHComboboxComponent.prototype.emitChanged = function () {
2167
+ var value = this.getModelValue();
2168
+ this.changed.forEach(function (f) { return f(value); });
2169
+ };
2170
+ Object.defineProperty(FHComboboxComponent.prototype, "value", {
2171
+ get: function () {
2172
+ return this.getModelValue();
2173
+ },
2174
+ set: function (value) {
2175
+ if (this.getModelValue() !== value) {
2176
+ this.setByValue(value);
2177
+ this.changed.forEach(function (f) { return f(value); });
2178
+ }
2179
+ },
2180
+ enumerable: true,
2181
+ configurable: true
2182
+ });
2183
+ FHComboboxComponent.prototype.writeValue = function (value) {
2184
+ this.setValue(value);
2185
+ };
2186
+ var FHComboboxComponent_1;
2155
2187
  FHComboboxComponent.ctorParameters = function () { return [
2156
2188
  { type: QueryService },
2157
2189
  { type: OdbcService }
@@ -2216,15 +2248,18 @@ var FHComboboxComponent = /** @class */ (function () {
2216
2248
  Input(),
2217
2249
  __metadata("design:type", String)
2218
2250
  ], FHComboboxComponent.prototype, "db_type", void 0);
2219
- FHComboboxComponent = __decorate([
2251
+ FHComboboxComponent = FHComboboxComponent_1 = __decorate([
2220
2252
  Component({
2221
2253
  selector: 'FHComboBox', template: "\n <mat-form-field [hidden]=\"!enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <mat-select #cmb [(ngModel)]=\"selval\" (selectionChange)=\"sc()\" [required]=\"required\">\n <mat-option value=\"-1\">{{sel_label}}</mat-option>\n <mat-option value=\"{{app.valore}}\" *ngFor=\"let app of myData\">{{app.descrizione_valore}}</mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field [hidden]=\"enabled || hidden\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{label}}</mat-label>\n <input type=\"text\" #el1 matInput [disabled]=\"true\" [(ngModel)]=\"dis_value\">\n </mat-form-field>\n ",
2254
+ providers: [
2255
+ { provide: NG_VALUE_ACCESSOR, useExisting: FHComboboxComponent_1, multi: true },
2256
+ ],
2222
2257
  styles: ["\n\n "]
2223
2258
  }),
2224
2259
  __metadata("design:paramtypes", [QueryService, OdbcService])
2225
2260
  ], FHComboboxComponent);
2226
2261
  return FHComboboxComponent;
2227
- }());
2262
+ }(FHValueAccessor));
2228
2263
 
2229
2264
  var FHUploadComponent = /** @class */ (function () {
2230
2265
  function FHUploadComponent(_dataService, toastr, dialog, app_s) {
@@ -2849,7 +2884,7 @@ var WinAskTextBigComponent = /** @class */ (function () {
2849
2884
  WinAskTextBigComponent = __decorate([
2850
2885
  Component({
2851
2886
  selector: 'app-win_ask_text',
2852
- template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <h2 mat-dialog-title>{{title}}</h2>\n <mat-dialog-content style=\"width:630px;font-size: 15px;\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" style=\"width:100%\"><mat-label>{{label}}</mat-label>\n <textarea matInput [readonly]=\"readonly\" [(ngModel)]=\"valore\" rows=\"15\"\n required></textarea>\n </mat-form-field>\n </mat-dialog-content>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\">\n\n <button *ngIf=\"show_ok\" mat-flat-button color=\"primary\" (click)=\"do_check()\">OK</button>&nbsp;&nbsp;&nbsp;\n <button *ngIf=\"show_annulla\" mat-flat-button color=\"warn\" (click)=\"chiudi()\">ANNULLA</button>\n </div>\n\n\n "
2887
+ template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <h2 mat-dialog-title>{{title}}</h2>\n <mat-dialog-content style=\"width:630px;font-size: 15px;\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" style=\"width:100%\"><mat-label>{{label}}</mat-label>\n <textarea matInput [readonly]=\"readonly\" [(ngModel)]=\"valore\" rows=\"15\"\n required></textarea>\n </mat-form-field>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\" [hidden]=\"readonly\">\n <button *ngIf=\"show_ok\" mat-flat-button color=\"primary\" (click)=\"do_check()\">OK</button>&nbsp;&nbsp;&nbsp;\n <button *ngIf=\"show_annulla\" mat-flat-button color=\"warn\" (click)=\"chiudi()\">ANNULLA</button>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\" [hidden]=\"!readonly\">\n <button *ngIf=\"show_annulla\" mat-flat-button color=\"warn\" (click)=\"chiudi()\">CHIUDI</button>\n </div>\n</mat-dialog-actions>\n "
2853
2888
  }),
2854
2889
  __param(2, Inject(MAT_DIALOG_DATA)),
2855
2890
  __metadata("design:paramtypes", [MatDialogRef, ToastrService, Object])
@@ -3314,6 +3349,7 @@ var WinAskTextComponent = /** @class */ (function () {
3314
3349
  this.valore = "";
3315
3350
  this.min_chars = 3;
3316
3351
  this.max_chars = 50;
3352
+ this.readonly = false;
3317
3353
  if (data != null) {
3318
3354
  if (data.title != null)
3319
3355
  this.title = data.title;
@@ -3321,6 +3357,8 @@ var WinAskTextComponent = /** @class */ (function () {
3321
3357
  this.label = data.label;
3322
3358
  if (data.valore != null)
3323
3359
  this.valore = data.valore;
3360
+ if (data.readonly != null)
3361
+ this.readonly = data.readonly;
3324
3362
  if (data.min_chars != null)
3325
3363
  this.min_chars = data.min_chars;
3326
3364
  if (data.max_chars != null)
@@ -3353,7 +3391,7 @@ var WinAskTextComponent = /** @class */ (function () {
3353
3391
  WinAskTextComponent = __decorate([
3354
3392
  Component({
3355
3393
  selector: 'app-win_ask_text',
3356
- template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <h2 mat-dialog-title>{{title}}</h2>\n <mat-dialog-content style=\"font-size: 15px;\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" style=\"width:100%\"><mat-label>{{label}} (min {{min_chars}} - max {{max_chars}} caratteri)</mat-label>\n <input matInput type=\"text\"\n [(ngModel)]=\"valore\" required>\n </mat-form-field>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-flat-button color=\"primary\" (click)=\"do_check()\">OK</button>&nbsp;&nbsp;&nbsp;<button\n mat-flat-button color=\"warn\" (click)=\"chiudi()\">ANNULLA\n </button>\n </mat-dialog-actions>\n\n\n "
3394
+ template: "\n <div style=\"width:100%\" fxLayout=\"row\" fxLayoutAlign=\"end start\"><img src=\"assets/icons/x.png\" style=\"cursor: pointer;\" (click)=\"close()\" /> </div>\n <hr width=\"100%\" size=\"0.5\" color=\"#DDDDDD\">\n\n <h2 mat-dialog-title>{{title}}</h2>\n <mat-dialog-content style=\"font-size: 15px;\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\" style=\"width:100%\"><mat-label>{{label}} (min {{min_chars}} - max {{max_chars}} caratteri)</mat-label>\n <input matInput type=\"text\"\n [(ngModel)]=\"valore\" required>\n </mat-form-field>\n </mat-dialog-content>\n <mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\" [hidden]=\"readonly\">\n <button mat-flat-button color=\"primary\" (click)=\"do_check()\">OK</button>&nbsp;&nbsp;&nbsp;\n <button mat-flat-button color=\"warn\" (click)=\"chiudi()\">ANNULLA</button>\n </div>\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"width: 100%\" [hidden]=\"!readonly\">\n <button mat-flat-button color=\"warn\" (click)=\"chiudi()\">CHIUDI</button>\n </div>\n </mat-dialog-actions>\n "
3357
3395
  }),
3358
3396
  __param(2, Inject(MAT_DIALOG_DATA)),
3359
3397
  __metadata("design:paramtypes", [MatDialogRef, ToastrService, Object])