@esfaenza/forms-and-validations 19.2.88 → 19.2.89
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, EventEmitter, signal, computed, ChangeDetectorRef, booleanAttribute, Input, Output, ViewChild, ContentChild, Directive, ChangeDetectionStrategy, ViewEncapsulation, Component, forwardRef, numberAttribute,
|
|
2
|
+
import { InjectionToken, Injectable, EventEmitter, signal, computed, ChangeDetectorRef, booleanAttribute, Input, Output, ViewChild, ContentChild, Directive, input, ChangeDetectionStrategy, ViewEncapsulation, Component, forwardRef, numberAttribute, NgModule } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
@@ -185,6 +185,7 @@ class BaseFormControl {
|
|
|
185
185
|
this.statusChangesObservable = null;
|
|
186
186
|
this.performFormLogic = true;
|
|
187
187
|
this.destroyed$ = new Subject();
|
|
188
|
+
this.This = signal(this);
|
|
188
189
|
// Leggero debounce sul finalize in quanto ci sono alcuni componenti che per attaccare tutti gli eventi "finalizzanti" potrebbero duplicare le chiamate.
|
|
189
190
|
// vedi form-date i cui eventi finalizzanti sono sia l'onBlur che l'onSelect, ma in alcune situazioni vengono richiamati entrambi
|
|
190
191
|
this.finalizedDebounceInterval = null;
|
|
@@ -195,6 +196,15 @@ class BaseFormControl {
|
|
|
195
196
|
this.helper = this.inj.get(FormsHelper);
|
|
196
197
|
this.FRM_DEBUG_MODE = this.inj.get(FRM_DEBUG_MODE, null);
|
|
197
198
|
}
|
|
199
|
+
ngOnChanges(changes) {
|
|
200
|
+
for (const inputName in changes) {
|
|
201
|
+
if (inputName == "DisplayMode") {
|
|
202
|
+
// Forzo il signal passato ad inputskeleton. Devo rileggere il DisplayMode
|
|
203
|
+
this.This.set(null);
|
|
204
|
+
requestAnimationFrame(() => this.This.set(this));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
198
208
|
ngOnDestroy() {
|
|
199
209
|
this.hideTooltip();
|
|
200
210
|
if (this.Form && this.ngModel && !!this.Form.getControl(this.ngModel) && this.performFormLogic)
|
|
@@ -376,7 +386,7 @@ class BaseFormControl {
|
|
|
376
386
|
isEmptyValue(value) { return !value; }
|
|
377
387
|
;
|
|
378
388
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BaseFormControl, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
379
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.15", type: BaseFormControl, isStandalone: true, inputs: { DisplayCondition: "DisplayCondition", DisplayMode: "DisplayMode", DisplayLayout: "DisplayLayout", FormLayout: "FormLayout", DisplayModeTemplate: "DisplayModeTemplate", FailedValidationMessage: "FailedValidationMessage", Label: "Label", Last: "Last", FormGroupClass: "FormGroupClass", Placeholder: "Placeholder", LabelInputRatio: "LabelInputRatio", Form: "Form", name: "name", readonly: ["readonly", "readonly", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], pattern: "pattern", Validation: "Validation", SetValidationSubject: "SetValidationSubject", required: ["required", "required", booleanAttribute], Display: "Display", IdField: "IdField", Source: "Source", statusChangesObservable: "statusChangesObservable", Configuration: "Configuration" }, outputs: { onSuffixAction: "onSuffixAction", onPrefixAction: "onPrefixAction", inputChange: "inputChange", inputFocus: "inputFocus", inputFinalized: "inputFinalized" }, queries: [{ propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true }], viewQueries: [{ propertyName: "innerInput", first: true, predicate: ["innerInput"], descendants: true }, { propertyName: "innerElement", first: true, predicate: ["innerElement"], descendants: true }, { propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }], ngImport: i0 }); }
|
|
389
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.15", type: BaseFormControl, isStandalone: true, inputs: { DisplayCondition: "DisplayCondition", DisplayMode: "DisplayMode", DisplayLayout: "DisplayLayout", FormLayout: "FormLayout", DisplayModeTemplate: "DisplayModeTemplate", FailedValidationMessage: "FailedValidationMessage", Label: "Label", Last: "Last", FormGroupClass: "FormGroupClass", Placeholder: "Placeholder", LabelInputRatio: "LabelInputRatio", Form: "Form", name: "name", readonly: ["readonly", "readonly", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], pattern: "pattern", Validation: "Validation", SetValidationSubject: "SetValidationSubject", required: ["required", "required", booleanAttribute], Display: "Display", IdField: "IdField", Source: "Source", statusChangesObservable: "statusChangesObservable", Configuration: "Configuration" }, outputs: { onSuffixAction: "onSuffixAction", onPrefixAction: "onPrefixAction", inputChange: "inputChange", inputFocus: "inputFocus", inputFinalized: "inputFinalized" }, queries: [{ propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true }], viewQueries: [{ propertyName: "innerInput", first: true, predicate: ["innerInput"], descendants: true }, { propertyName: "innerElement", first: true, predicate: ["innerElement"], descendants: true }, { propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }], usesOnChanges: true, ngImport: i0 }); }
|
|
380
390
|
}
|
|
381
391
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BaseFormControl, decorators: [{
|
|
382
392
|
type: Directive
|
|
@@ -462,18 +472,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
462
472
|
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
463
473
|
class InputSkeletonComponent {
|
|
464
474
|
/** @ignore Costruttore */
|
|
465
|
-
constructor() {
|
|
475
|
+
constructor() {
|
|
476
|
+
this.For = input();
|
|
477
|
+
this.Control = input();
|
|
478
|
+
}
|
|
466
479
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
467
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
480
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: InputSkeletonComponent, isStandalone: true, selector: "input-skeleton", inputs: { For: { classPropertyName: "For", publicName: "For", isSignal: true, isRequired: false, transformFunction: null }, Control: { classPropertyName: "Control", publicName: "Control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *ngIf=\"For()\">\r\n Skeleton DisplayMode: {{For().DisplayMode}}\r\n <ng-container *ngIf=\"!For().FormLayout\">\r\n <ng-container *ngIf=\"!For().DisplayMode || (For().DisplayLayout != 'hidden' && For().DisplayCondition)\">\r\n <ng-container *ngIf=\"For().DisplayMode && !For().DisplayModeTemplate\">\r\n <ng-container *ngIf=\"For().DisplayLayout == 'form'\">{{ For().EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"For().DisplayLayout == 'inline'\" class=\"app-inline\">{{ For().EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"For().DisplayMode && For().DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"For().DisplayModeTemplate, context: { $implicit: For().EvaluatedModel }\"></ng-container></ng-container>\r\n </ng-container>\r\n <div [hidden]=\"For().DisplayMode || (For().DisplayLayout == 'hidden' || !For().DisplayCondition)\"><ng-container *ngTemplateOutlet=\"Control()\"></ng-container></div>\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"For().FormLayout\">\r\n <div [hidden]=\"!(!For().DisplayMode || (For().DisplayLayout != 'hidden' && For().DisplayCondition))\" class=\"{{For().FormGroupClass + (For().Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (For().DisplayLayout == 'inline' && For().DisplayMode ? (' app-inline-block ' + (!For().Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n <label class=\"col-md-{{(For().DisplayMode && For().DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : For().LabelColWidth) + (For().DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{For().Label}}{{For().required !== undefined && For().required !== false && !For().DisplayMode ? '*' : ''}}{{For().Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"For().DisplayMode && For().DisplayLayout == 'inline' && For().InlineSeparator != ''\">{{For().InlineSeparator}}</span>\r\n <div class=\"col-md-{{For().DisplayMode && For().DisplayLayout == 'inline' ? 'none app-inline-block' : For().InputColWidth}}\">\r\n <ng-container *ngIf=\"For().DisplayMode && !For().DisplayModeTemplate\">{{ For().EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"For().DisplayMode && For().DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"For().DisplayModeTemplate, context: { $implicit: For().EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"For().DisplayMode || (For().DisplayLayout == 'hidden' || !For().DisplayCondition)\"><ng-container *ngTemplateOutlet=\"Control()\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n </ng-container>\r\n</ng-container>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
468
481
|
}
|
|
469
482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: InputSkeletonComponent, decorators: [{
|
|
470
483
|
type: Component,
|
|
471
|
-
args: [{ selector: "input-skeleton", encapsulation: ViewEncapsulation.None, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-container *ngIf=\"!For.FormLayout\">\r\n
|
|
472
|
-
}], ctorParameters: () => []
|
|
473
|
-
type: Input
|
|
474
|
-
}], Control: [{
|
|
475
|
-
type: Input
|
|
476
|
-
}] } });
|
|
484
|
+
args: [{ selector: "input-skeleton", encapsulation: ViewEncapsulation.None, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-container *ngIf=\"For()\">\r\n Skeleton DisplayMode: {{For().DisplayMode}}\r\n <ng-container *ngIf=\"!For().FormLayout\">\r\n <ng-container *ngIf=\"!For().DisplayMode || (For().DisplayLayout != 'hidden' && For().DisplayCondition)\">\r\n <ng-container *ngIf=\"For().DisplayMode && !For().DisplayModeTemplate\">\r\n <ng-container *ngIf=\"For().DisplayLayout == 'form'\">{{ For().EvaluatedModel }}</ng-container>\r\n <div *ngIf=\"For().DisplayLayout == 'inline'\" class=\"app-inline\">{{ For().EvaluatedModel }}</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"For().DisplayMode && For().DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"For().DisplayModeTemplate, context: { $implicit: For().EvaluatedModel }\"></ng-container></ng-container>\r\n </ng-container>\r\n <div [hidden]=\"For().DisplayMode || (For().DisplayLayout == 'hidden' || !For().DisplayCondition)\"><ng-container *ngTemplateOutlet=\"Control()\"></ng-container></div>\r\n </ng-container>\r\n\r\n\r\n <ng-container *ngIf=\"For().FormLayout\">\r\n <div [hidden]=\"!(!For().DisplayMode || (For().DisplayLayout != 'hidden' && For().DisplayCondition))\" class=\"{{For().FormGroupClass + (For().Last ? ' app-margin-bottom-0 app-margin-right-0 ' : '') + (For().DisplayLayout == 'inline' && For().DisplayMode ? (' app-inline-block ' + (!For().Last ? 'app-margin-right-10' : '')) : ' form-group row')}}\">\r\n <label class=\"col-md-{{(For().DisplayMode && For().DisplayLayout == 'inline' ? 'none app-bold app-margin-bottom-0' : For().LabelColWidth) + (For().DisplayMode ? ' app-bold' : ' m-t-5') }}\">{{For().Label}}{{For().required !== undefined && For().required !== false && !For().DisplayMode ? '*' : ''}}{{For().Label ? \":\" : \"\"}}</label>\r\n <span *ngIf=\"For().DisplayMode && For().DisplayLayout == 'inline' && For().InlineSeparator != ''\">{{For().InlineSeparator}}</span>\r\n <div class=\"col-md-{{For().DisplayMode && For().DisplayLayout == 'inline' ? 'none app-inline-block' : For().InputColWidth}}\">\r\n <ng-container *ngIf=\"For().DisplayMode && !For().DisplayModeTemplate\">{{ For().EvaluatedModel }}</ng-container>\r\n <ng-container *ngIf=\"For().DisplayMode && For().DisplayModeTemplate\"><ng-container *ngTemplateOutlet=\"For().DisplayModeTemplate, context: { $implicit: For().EvaluatedModel }\"></ng-container></ng-container>\r\n <div [hidden]=\"For().DisplayMode || (For().DisplayLayout == 'hidden' || !For().DisplayCondition)\"><ng-container *ngTemplateOutlet=\"Control()\"></ng-container></div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n </ng-container>\r\n</ng-container>" }]
|
|
485
|
+
}], ctorParameters: () => [] });
|
|
477
486
|
|
|
478
487
|
// Angular
|
|
479
488
|
class EsFormInputComponent extends BaseFormControl {
|
|
@@ -538,11 +547,11 @@ class EsFormSelectComponent extends BaseFormControl {
|
|
|
538
547
|
return value !== null && value !== undefined && value !== "" ? value.toString() : null;
|
|
539
548
|
}
|
|
540
549
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EsFormSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
541
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EsFormSelectComponent, isStandalone: true, selector: "form-select", inputs: { OptionsTemplate: "OptionsTemplate" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormSelectComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<input-skeleton [Control]=\"controlTemplate\" [For]=\"
|
|
550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: EsFormSelectComponent, isStandalone: true, selector: "form-select", inputs: { OptionsTemplate: "OptionsTemplate" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormSelectComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\nExternal DisplayMode: {{DisplayMode}}\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <p-inputgroup>\r\n <p-inputgroup-addon *ngIf=\"!!prefix\">\r\n <span (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </span>\r\n </p-inputgroup-addon>\r\n\r\n <p-floatlabel variant=\"on\">\r\n\r\n <p-select\r\n style=\"width: 100%\"\r\n size=\"small\"\r\n #innerInput=\"ngModel\"\r\n #innerElement\r\n [attr.name]=\"InternalName\"\r\n [attr.id]=\"InternalName\"\r\n [filter]=\"true\" \r\n filterBy=\"description\"\r\n [showClear]=\"true\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [options]=\"BoundSource()\"\r\n [placeholder]=\"RequiredPlaceholder\"\r\n [overlayOptions]=\"{ appendTo: 'body' }\"\r\n optionLabel=\"description\"\r\n optionValue=\"id\"\r\n [ngModel]=\"value\"\r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (onChange)=\"onTouched(); finalized()\">\r\n\r\n <ng-template *ngIf=\"OptionsTemplate\" let-selectedOption #selectedItem>\r\n <ng-container *ngTemplateOutlet=\"OptionsTemplate; context : { $implicit: BoundSourceCache[selectedOption.id].source}\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"OptionsTemplate\" let-itm #item>\r\n <ng-container *ngTemplateOutlet=\"OptionsTemplate; context : { $implicit: BoundSourceCache[itm.id].source}\"></ng-container>\r\n </ng-template>\r\n </p-select>\r\n \r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\r\n\r\n <p-inputgroup-addon *ngIf=\"!!suffix\">\r\n <span (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </span>\r\n </p-inputgroup-addon>\r\n </p-inputgroup>\r\n\r\n</ng-template>\r\n\r\n<p-popover appendTo=\"body\" styleClass='validation-tooltip' #tooltip>{{TooltipText}}</p-popover>", styles: [".validation-tooltip.p-popover:before,.validation-tooltip.p-popover:after{border-bottom-color:var(--p-form-field-invalid-placeholder-color)}.validation-tooltip .p-popover-content{padding:5px;color:#fff;background:var(--p-form-field-invalid-placeholder-color);border-radius:5px}p-datepicker{display:flex}.p-datepicker{flex-grow:1}.p-datepicker-panel{min-width:400px!important}.p-inputgroupaddon{padding:0!important}p-autocomplete input.p-autocomplete-input{width:100%}input.p-select-filter{width:100%!important}textarea{resize:none}.p-select-clear-icon{margin-top:-.5rem!important}\n"], dependencies: [{ kind: "ngmodule", type: SelectModule }, { kind: "component", type: i1$1.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3$1.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i4.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i6.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i7.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "component", type: InputSkeletonComponent, selector: "input-skeleton", inputs: ["For", "Control"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
542
551
|
}
|
|
543
552
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: EsFormSelectComponent, decorators: [{
|
|
544
553
|
type: Component,
|
|
545
|
-
args: [{ selector: "form-select", encapsulation: ViewEncapsulation.None, imports: [SelectModule, FormsModule, CommonModule, FloatLabelModule, PopoverModule, InputGroupModule, InputGroupAddonModule, InputSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormSelectComponent), multi: true }], standalone: true, template: "<input-skeleton [Control]=\"controlTemplate\" [For]=\"
|
|
554
|
+
args: [{ selector: "form-select", encapsulation: ViewEncapsulation.None, imports: [SelectModule, FormsModule, CommonModule, FloatLabelModule, PopoverModule, InputGroupModule, InputGroupAddonModule, InputSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormSelectComponent), multi: true }], standalone: true, template: "<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\nExternal DisplayMode: {{DisplayMode}}\r\n\r\n<ng-template #controlTemplate>\r\n\r\n <p-inputgroup>\r\n <p-inputgroup-addon *ngIf=\"!!prefix\">\r\n <span (click)=\"onPrefixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"prefix\"></ng-container>\r\n </span>\r\n </p-inputgroup-addon>\r\n\r\n <p-floatlabel variant=\"on\">\r\n\r\n <p-select\r\n style=\"width: 100%\"\r\n size=\"small\"\r\n #innerInput=\"ngModel\"\r\n #innerElement\r\n [attr.name]=\"InternalName\"\r\n [attr.id]=\"InternalName\"\r\n [filter]=\"true\" \r\n filterBy=\"description\"\r\n [showClear]=\"true\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [options]=\"BoundSource()\"\r\n [placeholder]=\"RequiredPlaceholder\"\r\n [overlayOptions]=\"{ appendTo: 'body' }\"\r\n optionLabel=\"description\"\r\n optionValue=\"id\"\r\n [ngModel]=\"value\"\r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (onChange)=\"onTouched(); finalized()\">\r\n\r\n <ng-template *ngIf=\"OptionsTemplate\" let-selectedOption #selectedItem>\r\n <ng-container *ngTemplateOutlet=\"OptionsTemplate; context : { $implicit: BoundSourceCache[selectedOption.id].source}\"></ng-container>\r\n </ng-template>\r\n\r\n <ng-template *ngIf=\"OptionsTemplate\" let-itm #item>\r\n <ng-container *ngTemplateOutlet=\"OptionsTemplate; context : { $implicit: BoundSourceCache[itm.id].source}\"></ng-container>\r\n </ng-template>\r\n </p-select>\r\n \r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\r\n\r\n <p-inputgroup-addon *ngIf=\"!!suffix\">\r\n <span (click)=\"onSuffixAction.emit(); $event.stopPropagation(); $event.preventDefault();\">\r\n <ng-container *ngTemplateOutlet=\"suffix\"></ng-container>\r\n </span>\r\n </p-inputgroup-addon>\r\n </p-inputgroup>\r\n\r\n</ng-template>\r\n\r\n<p-popover appendTo=\"body\" styleClass='validation-tooltip' #tooltip>{{TooltipText}}</p-popover>", styles: [".validation-tooltip.p-popover:before,.validation-tooltip.p-popover:after{border-bottom-color:var(--p-form-field-invalid-placeholder-color)}.validation-tooltip .p-popover-content{padding:5px;color:#fff;background:var(--p-form-field-invalid-placeholder-color);border-radius:5px}p-datepicker{display:flex}.p-datepicker{flex-grow:1}.p-datepicker-panel{min-width:400px!important}.p-inputgroupaddon{padding:0!important}p-autocomplete input.p-autocomplete-input{width:100%}input.p-select-filter{width:100%!important}textarea{resize:none}.p-select-clear-icon{margin-top:-.5rem!important}\n"] }]
|
|
546
555
|
}], propDecorators: { OptionsTemplate: [{
|
|
547
556
|
type: Input
|
|
548
557
|
}] } });
|