@fluxhub/fluxhub-lib 9.0.8 → 9.0.10

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.
Files changed (37) hide show
  1. package/bundles/fluxhub-fluxhub-lib.umd.js +238 -32
  2. package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
  3. package/bundles/fluxhub-fluxhub-lib.umd.min.js +2 -2
  4. package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
  5. package/esm2015/fluxhub-fluxhub-lib.js +20 -19
  6. package/esm2015/lib/controls/fhmdreader.js +12 -3
  7. package/esm2015/lib/fluxhub-lib.module.js +10 -5
  8. package/esm2015/lib/form_builder/form_builder.js +233 -0
  9. package/esm2015/lib/form_builder/form_executer.js +115 -0
  10. package/esm2015/lib/services/prismservice.js +36 -0
  11. package/esm2015/lib/services/utility.service.js +4 -1
  12. package/esm2015/lib/wkf_engine/wkfapp.js +3 -3
  13. package/esm2015/lib/wkf_engine/wkfdatiaggiuntivi.js +3 -3
  14. package/esm2015/public_api.js +3 -1
  15. package/esm5/fluxhub-fluxhub-lib.js +20 -19
  16. package/esm5/lib/controls/fhmdreader.js +12 -3
  17. package/esm5/lib/fluxhub-lib.module.js +10 -5
  18. package/esm5/lib/form_builder/form_builder.js +121 -0
  19. package/esm5/lib/form_builder/form_executer.js +62 -0
  20. package/esm5/lib/services/prismservice.js +37 -0
  21. package/esm5/lib/services/utility.service.js +5 -1
  22. package/esm5/lib/wkf_engine/wkfapp.js +3 -3
  23. package/esm5/lib/wkf_engine/wkfdatiaggiuntivi.js +3 -3
  24. package/esm5/public_api.js +3 -1
  25. package/fesm2015/fluxhub-fluxhub-lib.js +392 -13
  26. package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
  27. package/fesm5/fluxhub-fluxhub-lib.js +230 -14
  28. package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
  29. package/fluxhub-fluxhub-lib.d.ts +20 -19
  30. package/fluxhub-fluxhub-lib.metadata.json +1 -1
  31. package/lib/controls/fhmdreader.d.ts +3 -1
  32. package/lib/form_builder/form_builder.d.ts +27 -0
  33. package/lib/form_builder/form_executer.d.ts +23 -0
  34. package/lib/services/prismservice.d.ts +17 -0
  35. package/lib/services/utility.service.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/public_api.d.ts +2 -0
@@ -1,5 +1,5 @@
1
- import { __decorate, __metadata, __read, __extends, __assign, __param } from 'tslib';
2
- import { ɵɵdefineInjectable, Injectable, Component, ɵɵinject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, ElementRef, forwardRef, HostListener, Pipe, Optional, Inject, NgModule } from '@angular/core';
1
+ import { __decorate, __metadata, __read, __extends, __param, __assign } from 'tslib';
2
+ import { ɵɵdefineInjectable, Injectable, Component, ɵɵinject, ViewChild, ViewContainerRef, Directive, EventEmitter, Input, Output, ElementRef, forwardRef, HostListener, Pipe, Inject, PLATFORM_ID, Optional, NgModule } from '@angular/core';
3
3
  import { HttpHeaders, HttpClient } from '@angular/common/http';
4
4
  import { ToastrService } from 'ngx-toastr';
5
5
  import { map, catchError, flatMap } from 'rxjs/operators';
@@ -18,17 +18,30 @@ import { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autoco
18
18
  import * as momentNs from 'moment';
19
19
  import { isMoment } from 'moment';
20
20
  import { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule } from '@angular/material/core';
21
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
22
+ import 'clipboard';
23
+ import 'prismjs';
24
+ import 'prismjs/plugins/toolbar/prism-toolbar';
25
+ import 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard';
26
+ import 'prismjs/components/prism-css';
27
+ import 'prismjs/components/prism-javascript';
28
+ import 'prismjs/components/prism-java';
29
+ import 'prismjs/components/prism-markup';
30
+ import 'prismjs/components/prism-typescript';
31
+ import 'prismjs/components/prism-sass';
32
+ import 'prismjs/components/prism-scss';
33
+ import 'prismjs/components/prism-sql';
21
34
  import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
22
35
  import { MatTabGroup, MatTabsModule } from '@angular/material/tabs';
23
36
  import { FlexLayoutModule } from '@angular/flex-layout';
24
37
  import { MarkdownModule } from 'ngx-markdown';
25
38
  import { CKEditorModule } from 'ng2-ckeditor';
26
- import { CommonModule } from '@angular/common';
27
39
  import { AgGridModule } from 'ag-grid-angular';
28
40
  import { AgmCoreModule } from '@agm/core';
29
41
  import { CdkTableModule } from '@angular/cdk/table';
30
42
  import { NgForage } from 'ngforage';
31
43
  import { TranslateModule } from '@ngx-translate/core';
44
+ import { DragulaService, DragulaModule } from 'ng2-dragula';
32
45
  import { DomSanitizer } from '@angular/platform-browser';
33
46
  import { MatCardModule } from '@angular/material/card';
34
47
  import { MatButtonModule } from '@angular/material/button';
@@ -389,6 +402,10 @@ var UtilityService = /** @class */ (function () {
389
402
  this.simpleCrypt = new SimpleCrypt();
390
403
  }
391
404
  UtilityService_1 = UtilityService;
405
+ UtilityService.prototype.set_home_title = function (s) {
406
+ var _this = this;
407
+ setTimeout(function () { _this.app_s.getState().topnavTitle = s; }, 10);
408
+ };
392
409
  UtilityService.prototype.check_value_combo = function (obj_value, combo_value) {
393
410
  if (combo_value != null)
394
411
  if (combo_value != '-1')
@@ -4658,7 +4675,7 @@ var wkfapp = /** @class */ (function () {
4658
4675
  .getState()
4659
4676
  .wkf_obj
4660
4677
  .title;
4661
- this.app_s.getState().topnavTitle = this.att_panelcat;
4678
+ this.m_uti.set_home_title(this.att_panelcat);
4662
4679
  };
4663
4680
  wkfapp.prototype.init_Panel = function (cod_documento, id_Doc) {
4664
4681
  this.m_id_Doc = id_Doc;
@@ -4727,7 +4744,7 @@ var wkfapp = /** @class */ (function () {
4727
4744
  _this.user_nome = _this.app_s.user_name;
4728
4745
  _this.user_cognome = _this.app_s.user_surname;
4729
4746
  _this.user_email = _this.app_s.user_email;
4730
- _this.app_s.getState().topnavTitle = _this.att_panelcat;
4747
+ _this.m_uti.set_home_title(_this.att_panelcat);
4731
4748
  var p_3 = new QParam();
4732
4749
  p_3.sql = "SELECT_UTENTE_WKF_ADMIN";
4733
4750
  p_3.types = ['string', 'string'];
@@ -7855,15 +7872,43 @@ var WinAskNumberComponent = /** @class */ (function () {
7855
7872
  return WinAskNumberComponent;
7856
7873
  }());
7857
7874
 
7875
+ var HighlightService = /** @class */ (function () {
7876
+ function HighlightService(platformId) {
7877
+ this.platformId = platformId;
7878
+ }
7879
+ HighlightService.prototype.highlightAll = function () {
7880
+ if (isPlatformBrowser(this.platformId)) {
7881
+ Prism.highlightAll();
7882
+ }
7883
+ };
7884
+ HighlightService.ctorParameters = function () { return [
7885
+ { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
7886
+ ]; };
7887
+ HighlightService = __decorate([
7888
+ Injectable(),
7889
+ __param(0, Inject(PLATFORM_ID)),
7890
+ __metadata("design:paramtypes", [Object])
7891
+ ], HighlightService);
7892
+ return HighlightService;
7893
+ }());
7894
+
7858
7895
  var FHMdReader = /** @class */ (function () {
7859
- function FHMdReader() {
7896
+ function FHMdReader(highlightService) {
7897
+ this.highlightService = highlightService;
7860
7898
  this.highlighted = false;
7861
7899
  this.path_md = "";
7862
7900
  }
7863
7901
  FHMdReader.prototype.ngAfterViewChecked = function () {
7902
+ if (!this.highlighted && !this.path_md == null) {
7903
+ this.highlightService.highlightAll();
7904
+ this.highlighted = true;
7905
+ }
7864
7906
  };
7865
7907
  FHMdReader.prototype.ngAfterViewInit = function () {
7866
7908
  };
7909
+ FHMdReader.ctorParameters = function () { return [
7910
+ { type: HighlightService }
7911
+ ]; };
7867
7912
  __decorate([
7868
7913
  Input(),
7869
7914
  __metadata("design:type", String)
@@ -7873,7 +7918,7 @@ var FHMdReader = /** @class */ (function () {
7873
7918
  selector: 'FHMdReader', template: "\n <markdown [src]=\"path_md\">\n\n </markdown>\n\n ",
7874
7919
  styles: ["\n\n "]
7875
7920
  }),
7876
- __metadata("design:paramtypes", [])
7921
+ __metadata("design:paramtypes", [HighlightService])
7877
7922
  ], FHMdReader);
7878
7923
  return FHMdReader;
7879
7924
  }());
@@ -11920,7 +11965,7 @@ var dati_aggiuntivi = /** @class */ (function () {
11920
11965
  this.btnApprova_label = 'APPROVA';
11921
11966
  this.btnAssegna_label = "Assegna";
11922
11967
  this.btnRespingi_label = 'RESPINGI';
11923
- this.app_s.getState().topnavTitle = this.app_info.descrizione_breve + ' - Nuova Richiesta';
11968
+ this.uti_s.set_home_title(this.app_info.descrizione_breve + ' - Nuova Richiesta');
11924
11969
  this.reset_form(this.app_info.descrizione_breve + ' - Nuova Richiesta');
11925
11970
  this.reset_counters_int(0, 0);
11926
11971
  /*
@@ -12005,7 +12050,7 @@ var dati_aggiuntivi = /** @class */ (function () {
12005
12050
  break;
12006
12051
  }
12007
12052
  this.app_s.getState().wkf_doc_info.in_carico_a = this.s_uto;
12008
- this.app_s.getState().topnavTitle = this.app_info.descrizione_breve + ' ' + this.m_obj.codice + ' - ' + this.m_obj.stat_stato; //+' ('+s_uto+')';
12053
+ this.uti_s.set_home_title(this.app_info.descrizione_breve + ' ' + this.m_obj.codice + ' - ' + this.m_obj.stat_stato);
12009
12054
  this.reset_form(this.app_info.descrizione_breve + ' ' + this.m_obj.codice + ' - ' + this.m_obj.stat_stato); //+' ('+s_uto+')');
12010
12055
  };
12011
12056
  dati_aggiuntivi.prototype.onResize = function (event) {
@@ -12173,6 +12218,176 @@ var wkf_header_bar = /** @class */ (function () {
12173
12218
  return wkf_header_bar;
12174
12219
  }());
12175
12220
 
12221
+ var FormBuilderComponent = /** @class */ (function () {
12222
+ function FormBuilderComponent(fhutility, _dialog, dragula) {
12223
+ this.fhutility = fhutility;
12224
+ this._dialog = _dialog;
12225
+ this.dragula = dragula;
12226
+ this.change = new EventEmitter();
12227
+ this.items = [];
12228
+ this.edit_obj = null;
12229
+ this.radio_values = '';
12230
+ }
12231
+ FormBuilderComponent.prototype.add_component = function (o) {
12232
+ if (o == 1)
12233
+ this.items.push({ type: 'text_field', label: 'Label', default_value: '', uiid: this.fhutility.newGuid(), selected: false, required: false });
12234
+ if (o == 2)
12235
+ this.items.push({ type: 'numeric_field', label: 'Label', default_value: 0, decimali: 2, uiid: this.fhutility.newGuid(), selected: false, required: false });
12236
+ if (o == 3)
12237
+ this.items.push({ type: 'textarea', label: 'Label', default_value: '', uiid: this.fhutility.newGuid(), selected: false, required: false });
12238
+ if (o == 4)
12239
+ this.items.push({ type: 'checkbox', label: 'Label', default_value: '', uiid: this.fhutility.newGuid(), selected: false, required: false });
12240
+ if (o == 5)
12241
+ this.items.push({ type: 'radiobutton', label: 'Label', default_value: '', opts: ['Option1', 'Option2'], uiid: this.fhutility.newGuid(), selected: false, required: false });
12242
+ if (o == 6)
12243
+ this.items.push({ type: 'select', label: 'Label', default_value: '', opts: ['', 'Value1', 'Value2'], uiid: this.fhutility.newGuid(), selected: false, required: false });
12244
+ if (o == 7)
12245
+ this.items.push({ type: 'date_field', label: 'Label', default_value: null, uiid: this.fhutility.newGuid(), selected: false, required: false });
12246
+ this.change.emit();
12247
+ this.edit_obj = null;
12248
+ // this.bottoml.nativeElement.scrollIntoView(false)
12249
+ };
12250
+ FormBuilderComponent.prototype.setStyles = function (o) {
12251
+ if (this.edit_obj != null)
12252
+ if (this.edit_obj.uiid == o)
12253
+ return { width: '90%', padding: '15px', margin: '15px', border: '3px solid #3db3cd', 'background-color': "#C2CACB" };
12254
+ return { width: '90%', padding: '15px', margin: '15px', border: '1px solid #3db3cd', 'background-color': "#ECF0F1" };
12255
+ };
12256
+ FormBuilderComponent.prototype.ok_panel = function () {
12257
+ this.change.emit();
12258
+ this.edit_obj = null;
12259
+ };
12260
+ FormBuilderComponent.prototype.edit_item = function (uiid_obj) {
12261
+ for (var i = 0; i < this.items.length; i++) {
12262
+ if (this.items[i].uiid == uiid_obj) {
12263
+ this.edit_obj = this.items[i];
12264
+ if (this.edit_obj.type == 'radiobutton' || this.edit_obj.type == 'select')
12265
+ if (this.edit_obj.opts != null)
12266
+ this.radio_values = this.edit_obj.opts.join(',');
12267
+ }
12268
+ }
12269
+ };
12270
+ FormBuilderComponent.prototype.del_item = function (uiid_obj) {
12271
+ var _this = this;
12272
+ var dialogRef = this._dialog.open(FHConfirmComponent, { 'disableClose': true });
12273
+ setTimeout(function () {
12274
+ dialogRef.componentInstance.title = 'Confirm';
12275
+ dialogRef.componentInstance.msg = "Remove Element?";
12276
+ });
12277
+ dialogRef.afterClosed().subscribe(function (result) {
12278
+ if (result) {
12279
+ for (var i = 0; i < _this.items.length; i++)
12280
+ if (_this.items[i].uiid == uiid_obj) {
12281
+ _this.items.splice(i, 1);
12282
+ _this.change.emit();
12283
+ _this.edit_obj = null;
12284
+ }
12285
+ }
12286
+ });
12287
+ };
12288
+ FormBuilderComponent.prototype.ngAfterViewInit = function () {
12289
+ var _this = this;
12290
+ setTimeout(function () {
12291
+ try {
12292
+ _this.dragula.createGroup('bag-items', {
12293
+ revertOnSpill: true
12294
+ });
12295
+ }
12296
+ catch (e) {
12297
+ console.log(e);
12298
+ }
12299
+ _this.dragula
12300
+ .drag.call(function (value) {
12301
+ _this.change.emit();
12302
+ _this.edit_obj = null;
12303
+ });
12304
+ _this.dragula
12305
+ .drop
12306
+ .call(function (value) {
12307
+ _this.change.emit();
12308
+ _this.edit_obj = null;
12309
+ });
12310
+ });
12311
+ };
12312
+ FormBuilderComponent.ctorParameters = function () { return [
12313
+ { type: UtilityService },
12314
+ { type: MatDialog },
12315
+ { type: DragulaService }
12316
+ ]; };
12317
+ __decorate([
12318
+ Output(),
12319
+ __metadata("design:type", EventEmitter)
12320
+ ], FormBuilderComponent.prototype, "change", void 0);
12321
+ __decorate([
12322
+ ViewChild('bottoml'),
12323
+ __metadata("design:type", ElementRef)
12324
+ ], FormBuilderComponent.prototype, "bottoml", void 0);
12325
+ FormBuilderComponent = __decorate([
12326
+ Component({
12327
+ selector: 'FHFormBuilder', template: "\n <div fxLayout=\"row\" style=\"width: 100%;height:100%\">\n <mat-toolbar color=\"primary\" style=\"max-width: 200px;height:100%;\" >\n <mat-toolbar-row (click)=\"add_component(1)\">\n <mat-icon>text_fields</mat-icon>&nbsp;&nbsp;&nbsp;<span>Text Field</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(2)\">\n <mat-icon>filter_1</mat-icon>&nbsp;&nbsp;&nbsp;<span>Number</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(3)\">\n <mat-icon>filter_none</mat-icon>&nbsp;&nbsp;&nbsp;<span>Text Area</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(4)\">\n <mat-icon>check_box</mat-icon>&nbsp;&nbsp;&nbsp;<span>Check Box</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(5)\">\n <mat-icon>radio_button_checked</mat-icon>&nbsp;&nbsp;&nbsp;<span>Radio</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(6)\">\n <mat-icon>dehaze</mat-icon>&nbsp;&nbsp;&nbsp;<span>Select</span>\n </mat-toolbar-row>\n <mat-toolbar-row (click)=\"add_component(7)\">\n <mat-icon>today</mat-icon>&nbsp;&nbsp;&nbsp;<span>Date</span>\n </mat-toolbar-row>\n\n </mat-toolbar>\n <div fxLayout=\"column\" fxFlex=\"100\" style=\"width:100%;border:1px solid #004040;height:100%;overflow:auto;background-color: #a6aec4\">\n <div fxLayout=\"row\" style=\"width:90%;width:100%;height:5000px;\">\n\n <ul [dragula]='\"bag-items\"' [(dragulaModel)]='items' style=\"width:100%;\">\n <li fxLayout=\"row\" *ngFor=\"let item of items\" [ngStyle]=\"setStyles(item.uiid)\" fxLayoutAlign=\"start center\">\n <div style=\"width:100%\">\n\n <div style=\"width: 90%\">\n <mat-form-field *ngIf=\"item.type=='text_field'\" style=\"max-width: 350px\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <input matInput [required]=\"item.required\" type=\"text\" [(ngModel)]=\"item.default_value\">\n </mat-form-field>\n\n\n <mat-form-field *ngIf=\"item.type=='numeric_field'\" style=\"max-width: 220px\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <input matInput [required]=\"item.required\" type=\"number\" [(ngModel)]=\"item.default_value\">\n </mat-form-field>\n\n\n <FHRichText *ngIf=\"item.type=='textarea'\" [label]=\"item.label\" [required]=\"item.required\" [(ngModel)]=\"item.default_value\" height=\"15'\" enabled=\"false\"></FHRichText>\n\n <mat-checkbox *ngIf=\"item.type=='checkbox'\" [required]=\"item.required\" [(ngModel)]=\"item.default_value\"><b>{{item.label}}</b></mat-checkbox>\n\n\n <section class=\"custom-section\" *ngIf=\"item.type=='radiobutton'\" >\n <label class=\"custom-margin\">{{item.label}}:</label>\n <mat-radio-group [(ngModel)]=\"item.default_value\" [required]=\"item.required\" >\n <mat-radio-button *ngFor=\"let opt of item.opts\" class=\"custom-margin\" value=\"{{opt}}\"><b>{{opt}}</b></mat-radio-button>\n </mat-radio-group>\n </section>\n\n <mat-form-field *ngIf=\"item.type=='select'\" style=\"max-width: 400px\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <mat-select [required]=\"item.required\" [(ngModel)]=\"item.default_value\">\n <mat-option *ngFor=\"let opt of item.opts\" value=\"{{opt}}\">{{opt}}</mat-option>\n </mat-select>\n </mat-form-field>\n <div style=\"width: 220px\" *ngIf=\"item.type=='date_field'\">\n <FHDatePicker [required]=\"item.required\" [(ngModel)]=\"item.default_value\" [label]=\"item.label\" ></FHDatePicker>&nbsp;&nbsp;\n </div>\n\n </div></div>\n <div fxLayout=\"column\" style=\"width:70px\" fxLayoutGap=\"10px\">\n <button mat-flat-button (click)=\"edit_item(item.uiid)\" color=\"primary\"><mat-icon>edit</mat-icon></button>\n <button mat-flat-button (click)=\"del_item(item.uiid)\" color=\"warn\"><mat-icon>delete</mat-icon></button>\n </div>\n </li>\n </ul>\n\n\n </div>\n <mat-form-field [hidden]=\"true\">\n <input matInput #bottoml>\n </mat-form-field>\n </div>\n\n <div style=\"width:400px;height:100%;background-color: #3F51B5\" fxLayoutAlign=\"start center\" fxLayout=\"column\" *ngIf=\"edit_obj!=null\">\n <br><br>\n <mat-card style=\"width: 96%\">\n <mat-card-title>Properties</mat-card-title>\n <mat-card-content>\n <div fxLayout=\"column\">\n <mat-form-field appearance=\"outline\" floatLabel=\"always\"><mat-label>Label</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"edit_obj.label\">\n </mat-form-field>\n <mat-checkbox [(ngModel)]=\"edit_obj.required\">Required</mat-checkbox>\n\n <mat-form-field *ngIf=\"edit_obj.type=='numeric_field_tobe'\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Decimal Places</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"edit_obj.decimali\">\n </mat-form-field>\n <mat-form-field *ngIf=\"edit_obj.type=='text_field'\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Default Value</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"edit_obj.default_value\" >\n </mat-form-field>\n\n\n <mat-checkbox *ngIf=\"edit_obj.type=='checkbox'\" [(ngModel)]=\"edit_obj.default_value\">Default Value</mat-checkbox>\n\n <mat-form-field *ngIf=\"edit_obj.type=='radiobutton' || edit_obj.type=='select'\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Values</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"radio_values\" (ngModelChange)=\"edit_obj.opts=$event.split(',');\" >\n </mat-form-field>\n <mat-form-field *ngIf=\"edit_obj.type=='radiobutton' || edit_obj.type=='select'\" appearance=\"outline\" floatLabel=\"always\"><mat-label>Default Value</mat-label>\n <input matInput type=\"text\" [(ngModel)]=\"edit_obj.default_value\" >\n </mat-form-field>\n\n <button mat-flat-button (click)=\"ok_panel()\" color=\"primary\">OK</button>\n </div></mat-card-content>\n </mat-card>\n </div>\n </div>\n ",
12328
+ styles: ["\n\n "]
12329
+ }),
12330
+ __metadata("design:paramtypes", [UtilityService, MatDialog, DragulaService])
12331
+ ], FormBuilderComponent);
12332
+ return FormBuilderComponent;
12333
+ }());
12334
+
12335
+ var FormExecuterComponent = /** @class */ (function () {
12336
+ function FormExecuterComponent(fhutility, _dialog, toastr) {
12337
+ this.fhutility = fhutility;
12338
+ this._dialog = _dialog;
12339
+ this.toastr = toastr;
12340
+ this.items = null;
12341
+ this.enabled = true;
12342
+ }
12343
+ FormExecuterComponent.prototype.ck_field_custom = function () {
12344
+ for (var i = 0; i < this.items.length; i++) {
12345
+ if (this.items[i].required) {
12346
+ if (this.items[i].default_value == null)
12347
+ this.items[i].default_value = '';
12348
+ if (('' + this.items[i].default_value).trim() == '') {
12349
+ this.toastr.error('Compilare il campo: ' + this.items[i].label);
12350
+ return false;
12351
+ }
12352
+ }
12353
+ }
12354
+ return true;
12355
+ };
12356
+ FormExecuterComponent.prototype.add_component = function (o) {
12357
+ this.items.push(o);
12358
+ };
12359
+ FormExecuterComponent.prototype.setStyles = function (o) {
12360
+ return { width: '90%', padding: '15px', margin: '15px', border: '1px solid #3db3cd', 'background-color': "#ECF0F1" };
12361
+ };
12362
+ FormExecuterComponent.prototype.ngAfterViewInit = function () {
12363
+ };
12364
+ FormExecuterComponent.ctorParameters = function () { return [
12365
+ { type: UtilityService },
12366
+ { type: MatDialog },
12367
+ { type: ToastrService }
12368
+ ]; };
12369
+ __decorate([
12370
+ Input(),
12371
+ __metadata("design:type", Array)
12372
+ ], FormExecuterComponent.prototype, "items", void 0);
12373
+ __decorate([
12374
+ Input(),
12375
+ __metadata("design:type", Boolean)
12376
+ ], FormExecuterComponent.prototype, "enabled", void 0);
12377
+ __decorate([
12378
+ ViewChild('bottoml'),
12379
+ __metadata("design:type", ElementRef)
12380
+ ], FormExecuterComponent.prototype, "bottoml", void 0);
12381
+ FormExecuterComponent = __decorate([
12382
+ Component({
12383
+ selector: 'FHFormExecuter', template: "\n\n <div fxLayout=\"column\" fxFlex=\"100\" style=\"width:100%;border:1px solid #004040;height:100%\" *ngIf=\"items!=null\">\n\n\n <div fxLayout=\"row\" *ngFor=\"let item of items\" [ngStyle]=\"setStyles(item.uiid)\" fxLayoutAlign=\"start center\">\n\n <div style=\"width: 90%\">\n <mat-form-field *ngIf=\"item.type=='text_field'\" style=\"max-width: 350px\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <input matInput [required]=\"item.required\" [disabled]=\"!enabled\" type=\"text\" [(ngModel)]=\"item.default_value\">\n </mat-form-field>\n\n\n\n <mat-form-field *ngIf=\"item.type=='numeric_field'\" style=\"max-width: 220px\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <input matInput [required]=\"item.required\" [disabled]=\"!enabled\" type=\"number\" [(ngModel)]=\"item.default_value\">\n </mat-form-field>\n\n\n <FHRichText *ngIf=\"item.type=='textarea'\" [label]=\"item.label\" [required]=\"item.required\" [(ngModel)]=\"item.default_value\" height=\"15'\" enabled=\"false\"></FHRichText>\n\n <mat-checkbox *ngIf=\"item.type=='checkbox'\" [required]=\"item.required\" [disabled]=\"!enabled\" [(ngModel)]=\"item.default_value\"><b>{{item.label}}</b></mat-checkbox>\n\n\n <section *ngIf=\"item.type=='radiobutton'\" >\n <label *ngIf=\"!item.required\">{{item.label}}: </label>&nbsp;\n <label *ngIf=\"item.required\">{{item.label}}: *</label>&nbsp;\n <mat-radio-group [(ngModel)]=\"item.default_value\" [required]=\"item.required\" >\n <mat-radio-button *ngFor=\"let opt of item.opts\" [disabled]=\"!enabled\" class=\"custom-margin\" value=\"{{opt}}\"><b>{{opt}}</b>&nbsp;&nbsp;&nbsp;&nbsp;</mat-radio-button>\n </mat-radio-group>\n </section>\n\n <mat-form-field *ngIf=\"item.type=='select'\" appearance=\"outline\" floatLabel=\"always\"><mat-label>{{item.label}}</mat-label>\n <mat-select [required]=\"item.required\" [(ngModel)]=\"item.default_value\">\n <mat-option *ngFor=\"let opt of item.opts\" [disabled]=\"!enabled\" value=\"{{opt}}\">{{opt}}</mat-option>\n </mat-select>\n </mat-form-field>\n <div style=\"width: 220px\" *ngIf=\"item.type=='date_field'\">\n <FHDatePicker [required]=\"item.required\" [disabled]=\"!enabled\" [(ngModel)]=\"item.default_value\" [label]=\"item.label\" ></FHDatePicker>&nbsp;&nbsp;\n </div>\n\n </div>\n\n </div>\n\n\n <mat-form-field [hidden]=\"true\">\n <input matInput #bottoml>\n </mat-form-field>\n </div>\n\n\n ",
12384
+ styles: ["\n\n "]
12385
+ }),
12386
+ __metadata("design:paramtypes", [UtilityService, MatDialog, ToastrService])
12387
+ ], FormExecuterComponent);
12388
+ return FormExecuterComponent;
12389
+ }());
12390
+
12176
12391
  var WinAskButtonsComponent = /** @class */ (function () {
12177
12392
  function WinAskButtonsComponent(dialogRef) {
12178
12393
  this.dialogRef = dialogRef;
@@ -13860,7 +14075,7 @@ var FluxhubLibModule = /** @class */ (function () {
13860
14075
  MatPaginatorModule,
13861
14076
  MatSortModule,
13862
14077
  MatTableModule,
13863
- MatNativeDateModule, FileUploadModule, AgGridModule.withComponents([NumericEditorComponent]), CommonModule, FormsModule,
14078
+ MatNativeDateModule, FileUploadModule, AgGridModule.withComponents([NumericEditorComponent]), CommonModule, DragulaModule, FormsModule,
13864
14079
  AgmCoreModule.forRoot({
13865
14080
  apiKey: 'AIzaSyD3-g3b_QqxUruxBY4PGJKaH2fubIVXvN4'
13866
14081
  }),
@@ -13870,7 +14085,7 @@ var FluxhubLibModule = /** @class */ (function () {
13870
14085
  FHUserPickerComponent, ApprovaGridComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, win_mappa, win_grid_help, TextAreaEditor,
13871
14086
  ComboBoxEditor, FHListComponent, FHWinComboSelect, ReplaceLineBreaks, WinAskTextComponent, FHPickListComponent, WinAskNumberComponent,
13872
14087
  FHMdReader, FHLogPanelComponent, WinAskTextBigComponent, FHCurrencyFieldComponent, FHRichText, WinOutputComponent, FHNumericFieldComponent, wkf_header_bar,
13873
- FHListPick, WinWait, FHUserFieldComponent, FSInput, FSResult, QGParam, QGResult, QParam, QResult, FHGridJSONComponent, win_salva_annulla, FHTableManager],
14088
+ FHListPick, WinWait, FHUserFieldComponent, FSInput, FSResult, QGParam, QGResult, QParam, QResult, FHGridJSONComponent, win_salva_annulla, FormBuilderComponent, FormExecuterComponent, FHTableManager],
13874
14089
  declarations: [FHHelpButton, win_user_info, win_insert_commento, FHRoleManager, FHFieldPickListComponent, SafePipe, FHViewerComponent,
13875
14090
  fhimagepreview, win_show_image, WinAskButtonsComponent, FHGridToolBarComponent, win_time_slider, DecimalMask, FHTimePickerComponent, CurrencyComponent, FHUploadPanelComponent, FHUploadComponent, wkf_header_bar,
13876
14091
  FHGridComponent, FHComboboxComponent, FHConfirmComponent, FHAutoCompleteComponent, FHDatePickerComponent, NumericEditorComponent,
@@ -13879,8 +14094,9 @@ var FluxhubLibModule = /** @class */ (function () {
13879
14094
  FHMdReader, FHLogPanelComponent, WinAskTextBigComponent, FHCurrencyFieldComponent, FHRichText, WinOutputComponent, FHNumericFieldComponent,
13880
14095
  FHListPick, WinWait, FHUserFieldComponent, FSInput, FSResult, QGParam, QGResult, QParam, QResult, win_salva_annulla, win_assegna,
13881
14096
  win_conferma, win_select_canale, win_select_level, win_uploads, win_commenti, win_info_doc, win_log, win_recupera_doc, win_riassegna_select_level,
13882
- win_riassegna_select_user, win_sostituisci_utente, win_commento_sel_notif, FHGridJSONComponent, FHTableManager, win_manage_values, win_manage_roles, FHComboboxComponentFilter],
13883
- providers: [],
14097
+ win_riassegna_select_user, win_sostituisci_utente, win_commento_sel_notif, FHGridJSONComponent, FormBuilderComponent, FormExecuterComponent, FHTableManager, win_manage_values, win_manage_roles, FHComboboxComponentFilter],
14098
+ providers: [HighlightService, DragulaService
14099
+ ],
13884
14100
  entryComponents: [
13885
14101
  // Customize dialog must be import here.
13886
14102
  win_user_info, win_insert_commento, win_manage_roles, win_manage_values, win_show_image, WinAskButtonsComponent, win_salva_annulla, win_assegna, win_conferma, win_select_canale, win_select_level, win_uploads, win_commenti, win_info_doc, win_log, win_recupera_doc, win_riassegna_select_level, win_sostituisci_utente, win_riassegna_select_user, win_commento_sel_notif,
@@ -14060,5 +14276,5 @@ var FHGuard = /** @class */ (function () {
14060
14276
  * Generated bundle index. Do not edit.
14061
14277
  */
14062
14278
 
14063
- export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵb, win_sostituisci_utente as ɵba, win_commento_sel_notif as ɵbb, win_manage_values as ɵbc, win_manage_roles as ɵbd, FHComboboxComponentFilter as ɵbe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, FHHelpButton as ɵf, SafePipe as ɵg, DecimalMask as ɵh, FHValueAccessor as ɵi, MOMENT_DATE_FORMATS as ɵj, MomentDateAdapter as ɵk, win_grid_help as ɵl, FHViewerComponent as ɵm, FHGridToolBarComponent as ɵo, win_assegna as ɵp, win_conferma as ɵq, win_select_canale as ɵr, win_select_level as ɵs, win_uploads as ɵt, win_commenti as ɵu, win_info_doc as ɵv, win_log as ɵw, win_recupera_doc as ɵx, win_riassegna_select_level as ɵy, win_riassegna_select_user as ɵz };
14279
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthenticationService, ComboBoxEditor, CurrencyComponent, FHAutoCompleteComponent, FHComboboxComponent, FHConfirmComponent, FHCurrencyFieldComponent, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHFieldPickListComponent, FHGridComponent, FHGridJSONComponent, FHGuard, FHListComponent, FHListPick, FHLogPanelComponent, FHMdReader, FHNumericFieldComponent, FHPickListComponent, FHRichText, FHRoleManager, FHTableManager, FHTimePickerComponent, FHUploadComponent, FHUploadPanelComponent, FHUserFieldComponent, FHUserPickerComponent, FHWinComboSelect, FSInput, FSResult, FileService, FluxhubLibModule, FormBuilderComponent, FormExecuterComponent, GridService, LocalDBService, NumericEditorComponent, OdbcService, OfficeAutomatorService, QGParam, QGResult, QParam, QResult, QueryService, ReplaceLineBreaks, TextAreaEditor, UtilityService, WinAskButtonsComponent, WinAskNumberComponent, WinAskTextBigComponent, WinAskTextComponent, WinOutputComponent, WinWait, WkfService, dati_aggiuntivi, fhimagepreview, win_insert_commento, win_mappa, win_salva_annulla, win_show_image, win_time_slider, win_user_info, wkf_header_bar, wkfapp, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as ɵa, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as ɵb, win_riassegna_select_user as ɵba, win_sostituisci_utente as ɵbb, win_commento_sel_notif as ɵbc, win_manage_values as ɵbd, win_manage_roles as ɵbe, FHComboboxComponentFilter as ɵbf, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_NUMERIC as ɵc, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR_RT as ɵd, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR as ɵe, FHHelpButton as ɵf, SafePipe as ɵg, DecimalMask as ɵh, FHValueAccessor as ɵi, MOMENT_DATE_FORMATS as ɵj, MomentDateAdapter as ɵk, win_grid_help as ɵl, HighlightService as ɵm, FHViewerComponent as ɵn, FHGridToolBarComponent as ɵp, win_assegna as ɵq, win_conferma as ɵr, win_select_canale as ɵs, win_select_level as ɵt, win_uploads as ɵu, win_commenti as ɵv, win_info_doc as ɵw, win_log as ɵx, win_recupera_doc as ɵy, win_riassegna_select_level as ɵz };
14064
14280
  //# sourceMappingURL=fluxhub-fluxhub-lib.js.map