@esfaenza/forms-and-validations 15.2.23 → 15.2.25
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/esm2020/lib/forms/form-adaptive/form-adaptive.component.mjs +3 -3
- package/esm2020/lib/forms/form-multiselect/form-multiselect.component.mjs +2 -2
- package/fesm2015/esfaenza-forms-and-validations.mjs +3 -3
- package/fesm2015/esfaenza-forms-and-validations.mjs.map +1 -1
- package/fesm2020/esfaenza-forms-and-validations.mjs +3 -3
- package/fesm2020/esfaenza-forms-and-validations.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2829,10 +2829,10 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
}
|
|
2831
2831
|
FormAdaptiveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormAdaptiveComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.UtilityService }, { token: i1$1.DateService }, { token: i2$1.NgxMatDateAdapter }, { token: i1.LocalizationService }, { token: i2.NgControl, optional: true, self: true }, { token: NG_VALIDATORS, optional: true }, { token: i3.AccessControlService }, { token: i3.ComponentContext, optional: true }, { token: ACO_CUSTOMKEY, optional: true }, { token: FAV_DEBUG_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
2832
|
-
FormAdaptiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormAdaptiveComponent, selector: "form-adaptive", inputs: { Type: "Type", TypeMissingMessage: "TypeMissingMessage", Pattern: "Pattern", AdjustNumber: "AdjustNumber", AllowDownload: "AllowDownload", Precision: "Precision", Alignment: "Alignment", SearchFunction: "SearchFunction", MinChars: "MinChars", CaseSensitive: "CaseSensitive", Options: "Options" }, providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || FloatPattern}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || IntPattern}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".frm-padding-left-22{padding-left:22px}.drop-container{position:relative;display:flex;gap:10px;flex-direction:column;justify-content:center;align-items:center;height:200px;padding:20px;border-radius:10px;border:2px dashed #0d45a5;color:#444;cursor:pointer;transition:background .2s ease-in-out,border .2s ease-in-out}.drop-container:hover{background:#eee;border-color:#111}.drop-container:hover .drop-title{color:#222}.drop-title{color:#444;font-size:20px;font-weight:700;text-align:center;transition:color .2s ease-in-out}input[type=file]{width:350px;max-width:100%;color:#444;padding:5px;background:#fff;border-radius:10px;border:1px solid #555}input[type=file]::file-selector-button{margin-right:20px;border:none;background:#084cdf;padding:10px 20px;border-radius:10px;color:#fff;cursor:pointer;transition:background .2s ease-in-out}input[type=file]::file-selector-button:hover{background:#0d45a5}.file-download-btn{border-radius:5px;padding:5px 10px;background-color:#0d45a5}.file-download-btn:hover{background-color:#084cdf}.file-download-btn-text{color:#fff}.file-delete-btn{color:red;position:absolute;right:10px;top:10px}.file-name-container{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow-y:clip;text-align:center}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }, { kind: "component", type: ValidationInputComponent, selector: "val-input", inputs: ["Frozen", "Password", "showWarning", "warningTitle", "warningClass", "value"] }, { kind: "component", type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }, { kind: "component", type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }, { kind: "component", type: ValidationCurrencyComponent, selector: "val-currency", inputs: ["CurrencyOptions"] }, { kind: "component", type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }, { kind: "component", type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }, { kind: "pipe", type: i1.LocalizePipe, name: "localize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2832
|
+
FormAdaptiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FormAdaptiveComponent, selector: "form-adaptive", inputs: { Type: "Type", TypeMissingMessage: "TypeMissingMessage", Pattern: "Pattern", AdjustNumber: "AdjustNumber", AllowDownload: "AllowDownload", Precision: "Precision", Alignment: "Alignment", SearchFunction: "SearchFunction", MinChars: "MinChars", CaseSensitive: "CaseSensitive", Options: "Options" }, providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["fileInput"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || FloatPattern}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || IntPattern}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".frm-padding-left-22{padding-left:22px}.drop-container{position:relative;display:flex;gap:10px;flex-direction:column;justify-content:center;align-items:center;height:200px;padding:20px;border-radius:10px;border:2px dashed #0d45a5;color:#444;cursor:pointer;transition:background .2s ease-in-out,border .2s ease-in-out}.drop-container:hover{background:#eee;border-color:#111}.drop-container:hover .drop-title{color:#222}.drop-title{color:#444;font-size:20px;font-weight:700;text-align:center;transition:color .2s ease-in-out}input[type=file]{width:350px;max-width:100%;color:#444;padding:5px;background:#fff;border-radius:10px;border:1px solid #555}input[type=file]::file-selector-button{margin-right:20px;border:none;background:#084cdf;padding:10px 20px;border-radius:10px;color:#fff;cursor:pointer;transition:background .2s ease-in-out}input[type=file]::file-selector-button:hover{background:#0d45a5}.file-download-btn{border-radius:5px;padding:5px 10px;background-color:#0d45a5}.file-download-btn:hover{background-color:#084cdf}.file-download-btn-text{color:#fff}.file-delete-btn{color:red;position:absolute;right:10px;top:10px}.file-name-container{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow-y:clip;text-align:center}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.NgxMatTimepickerComponent, selector: "ngx-mat-timepicker", inputs: ["disabled", "showSpinners", "stepHour", "stepMinute", "stepSecond", "showSeconds", "disableMinute", "enableMeridian", "defaultTime", "color"], exportAs: ["ngxMatTimepicker"] }, { kind: "component", type: ValidationInputComponent, selector: "val-input", inputs: ["Frozen", "Password", "showWarning", "warningTitle", "warningClass", "value"] }, { kind: "component", type: ValidationSelectComponent, selector: "val-select", inputs: ["emptyFieldValue", "placeHolderValue", "emptyValue", "showValidationSymbol", "label"], outputs: ["onBlur"] }, { kind: "component", type: ValidationDateComponent, selector: "val-date", inputs: ["useJsDates"] }, { kind: "component", type: ValidationCurrencyComponent, selector: "val-currency", inputs: ["CurrencyOptions"] }, { kind: "component", type: ValidationAutocompleteComponent, selector: "val-autocomplete", inputs: ["FilteredSource", "value", "label"], outputs: ["optionChange"] }, { kind: "component", type: ValidationDateTimeComponent, selector: "val-datetime", inputs: ["useJsDates"] }, { kind: "pipe", type: i1.LocalizePipe, name: "localize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2833
2833
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FormAdaptiveComponent, decorators: [{
|
|
2834
2834
|
type: Component,
|
|
2835
|
-
args: [{ selector: "form-adaptive", providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || FloatPattern}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || IntPattern}}\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".frm-padding-left-22{padding-left:22px}.drop-container{position:relative;display:flex;gap:10px;flex-direction:column;justify-content:center;align-items:center;height:200px;padding:20px;border-radius:10px;border:2px dashed #0d45a5;color:#444;cursor:pointer;transition:background .2s ease-in-out,border .2s ease-in-out}.drop-container:hover{background:#eee;border-color:#111}.drop-container:hover .drop-title{color:#222}.drop-title{color:#444;font-size:20px;font-weight:700;text-align:center;transition:color .2s ease-in-out}input[type=file]{width:350px;max-width:100%;color:#444;padding:5px;background:#fff;border-radius:10px;border:1px solid #555}input[type=file]::file-selector-button{margin-right:20px;border:none;background:#084cdf;padding:10px 20px;border-radius:10px;color:#fff;cursor:pointer;transition:background .2s ease-in-out}input[type=file]::file-selector-button:hover{background:#0d45a5}.file-download-btn{border-radius:5px;padding:5px 10px;background-color:#0d45a5}.file-download-btn:hover{background-color:#084cdf}.file-download-btn-text{color:#fff}.file-delete-btn{color:red;position:absolute;right:10px;top:10px}.file-name-container{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow-y:clip;text-align:center}\n"] }]
|
|
2835
|
+
args: [{ selector: "form-adaptive", providers: [{ provide: LocalizationService, useClass: FormAdaptiveComponentLoc }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Uguale in tutti i componenti --------------------------------------------------------------------------->\r\n<ng-container *ngIf=\"!FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\">\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">\r\n <ng-container *ngIf=\"DisplayLayout == 'form'\">{{ EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"DisplayLayout == 'inline'\" class=\"app-inline\">{{ EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n</ng-container>\r\n\r\n<div *ngIf=\"FormLayout && (!DisplayMode || (DisplayLayout != 'hidden' && DisplayCondition))\" class=\"{{FormGroupClass + (Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (DisplayLayout == 'inline' && DisplayMode ? (' app-inline-block ' + (!Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n\r\n <label class=\"col-md-{{(DisplayMode && DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : LabelColWidth) + (DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{Label}}{{Required && !DisplayMode ? '*' : ''}}{{Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"DisplayMode && DisplayLayout == 'inline' && InlineSeparator != ''\">{{InlineSeparator}}</span>\r\n <div class=\"col-md-{{DisplayMode && DisplayLayout == 'inline' ? 'none app-inline-block' : InputColWidth}}\">\r\n\r\n <ng-container *ngIf=\"DisplayMode && !DisplayModeTemplate\">{{ EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"DisplayMode && DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"DisplayModeTemplate, context: { $implicit: EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"DisplayMode\"><ng-container *ngTemplateOutlet=\"controlTemplate\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n<!----------------------------------------------------------------------------------------------------------->\r\n\r\n<ng-template #controlTemplate>\r\n <div *ngIf=\"!Type\" class=\"app-margin-top-5\">\r\n <em>{{TypeMissingMessage}}</em>\r\n </div>\r\n \r\n <!--Se currency-->\r\n <div *ngIf=\"Type == 'currency'\">\r\n <val-currency #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\"\r\n [CurrencyOptions]=\"{ prefix: '', thousands: '.', decimal: ',', precision: Precision, align: Alignment }\" [noValidate]=\"!Validation\"\r\n type=\"text\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed();\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-currency>\r\n </div>\r\n <!--Se data-->\r\n <div *ngIf=\"Type == 'date'\">\r\n <val-date #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" [useJsDates]=\"useJsDates\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-date>\r\n </div>\r\n <!--Se stringa-->\r\n <div *ngIf=\"Type == 'string'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || ''}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero-->\r\n <div *ngIf=\"Type == 'float' || Type == 'number'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || FloatPattern}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se numero intero-->\r\n <div *ngIf=\"Type == 'int'\">\r\n <val-input #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" type=\"text\" pattern=\"{{Pattern || IntPattern}}\" [required]=\"Required\" [placeholder]=\"Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-input>\r\n </div>\r\n <!--Se boolean-->\r\n <div class=\"m-t-5\" *ngIf=\"Type == 'boolean'\">\r\n <input #validationControl=\"ngModel\" [readonly]=\"Readonly\" type=\"checkbox\" class=\"app-pointer\" [(ngModel)]=\"Model\" id=\"{{GeneratedName}}\" name=\"{{GeneratedName}}\" (ngModelChange)=\"changed(); finalized();\" (click)=\"focused($event);\" />\r\n </div>\r\n <!--Se enum-->\r\n <div *ngIf=\"Type == 'enum'\">\r\n <val-select #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [placeHolderValue]=\"''\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [required]=\"Required\" [(ngModel)]=\"Model\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\">\r\n <option *ngFor=\"let val of BoundSource\" [value]=\"val.id\">{{val.description}}</option>\r\n </val-select>\r\n </div>\r\n <!--Se autocomplete-->\r\n <div *ngIf=\"Type == 'autocomplete'\">\r\n <val-autocomplete #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [placeholder]=\"Required ? ('Select' | localize : lc) + '...' : Placeholder\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" [FilteredSource]=\"FilteredBoundSource\" (inputChange)=\"filterSource($event); changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-autocomplete>\r\n </div>\r\n <!--Se date time-->\r\n <div *ngIf=\"Type == 'datetime'\">\r\n <val-datetime #validationControl=\"ngModel\" [FocusSubject]=\"FocusSubject\" [SetValidationSubject]=\"SetValidationSubject\" [FieldAppearence]=\"FieldAppearence\" [forceInvalid]=\"ForcedError\" [FloatingLabel]=\"FloatingLabel\" [noValidate]=\"!Validation\" [Readonly]=\"Readonly\" [submitted]=\"Form?.submitted\" [required]=\"Required\" [useJsDates]=\"useJsDates\" [(ngModel)]=\"Model\" [id]=\"GeneratedName\" name=\"{{GeneratedName}}\" autocomplete=\"off\" (inputChange)=\"changed($event);\" (inputFocus)=\"focused($event);\" (inputFinalized)=\"finalized()\"></val-datetime>\r\n </div>\r\n <!--Se time-->\r\n <div *ngIf=\"Type == 'time'\">\r\n <ngx-mat-timepicker name=\"val-time\" #elementRef #baseInput=\"ngModel\" [(ngModel)]=\"Model\" [disabled]=\"Readonly\"\r\n [showSpinners]=\"false\" [stepHour]=\"2\" [stepMinute]=\"5\" [stepSecond]=\"30\"\r\n [showSeconds]=\"true\" (ngModelChange)=\"changed()\" #validationControl=\"ngModel\">\r\n </ngx-mat-timepicker>\r\n </div>\r\n <!--Se file-->\r\n <div *ngIf=\"Type == 'file'\">\r\n <div class=\"input-group file-upload\">\r\n <input type=\"file\" (change)=\"fileChange()\" #fileInput id=\"{{GeneratedName}}\" class=\"file-upload-btn app-pointer\" [multiple]=\"null\"/>\r\n <input type=\"text\" [class.frm-padding-left-22]=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" class=\"form-control checking-field\" placeholder=\"{{'Select a file' | localize : lc}}...\" [(ngModel)]=\"ModelFile.filename\" name=\"dsfile\" #validationControl=\"ngModel\" [required]=\"Required\"/>\r\n \r\n <a class=\"fa fa-download app-pointer app-input-icon\" *ngIf=\"AllowDownload && ModelFile.filename && ModelFile.fileb64\" (click)=\"downloadAttachment()\"></a>\r\n <i class=\"fa fa-times delete-file\" (click)=\"fileChange(true)\" *ngIf=\"ModelFile.filename\"></i>\r\n <span class=\"input-group-btn\">\r\n <button class=\"btn btn-primary btn-file-upload\" type=\"button\"><i class=\"fa fa-upload\"></i></button>\r\n </span>\r\n </div>\r\n </div>\r\n</ng-template>", styles: [".frm-padding-left-22{padding-left:22px}.drop-container{position:relative;display:flex;gap:10px;flex-direction:column;justify-content:center;align-items:center;height:200px;padding:20px;border-radius:10px;border:2px dashed #0d45a5;color:#444;cursor:pointer;transition:background .2s ease-in-out,border .2s ease-in-out}.drop-container:hover{background:#eee;border-color:#111}.drop-container:hover .drop-title{color:#222}.drop-title{color:#444;font-size:20px;font-weight:700;text-align:center;transition:color .2s ease-in-out}input[type=file]{width:350px;max-width:100%;color:#444;padding:5px;background:#fff;border-radius:10px;border:1px solid #555}input[type=file]::file-selector-button{margin-right:20px;border:none;background:#084cdf;padding:10px 20px;border-radius:10px;color:#fff;cursor:pointer;transition:background .2s ease-in-out}input[type=file]::file-selector-button:hover{background:#0d45a5}.file-download-btn{border-radius:5px;padding:5px 10px;background-color:#0d45a5}.file-download-btn:hover{background-color:#084cdf}.file-download-btn-text{color:#fff}.file-delete-btn{color:red;position:absolute;right:10px;top:10px}.file-name-container{width:100%;white-space:nowrap;text-overflow:ellipsis;overflow-y:clip;text-align:center}\n"] }]
|
|
2836
2836
|
}], ctorParameters: function () {
|
|
2837
2837
|
return [{ type: i0.ChangeDetectorRef }, { type: i1$1.UtilityService }, { type: i1$1.DateService }, { type: i2$1.NgxMatDateAdapter }, { type: i1.LocalizationService }, { type: i2.NgControl, decorators: [{
|
|
2838
2838
|
type: Optional
|
|
@@ -3533,7 +3533,7 @@ class FormMultiSelectComponent extends BaseFormControl {
|
|
|
3533
3533
|
writeValue(obj) {
|
|
3534
3534
|
this.TmpModel = obj;
|
|
3535
3535
|
let toPass = [];
|
|
3536
|
-
if (this.UseCommaSeparatedList && obj &&
|
|
3536
|
+
if (this.UseCommaSeparatedList && obj && (typeof obj === 'string' || obj instanceof String))
|
|
3537
3537
|
obj = obj.split(',');
|
|
3538
3538
|
//Qui arrivano solo gli id, o {id: x, description: y} in caso sono in UseKeyValues,
|
|
3539
3539
|
//devo tirare fuori gli oggetti relativi e piazzarli come lista per il Model
|