@esfaenza/forms-and-validations 20.3.3 → 20.3.4
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.
|
@@ -1212,10 +1212,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImpo
|
|
|
1212
1212
|
class EsFormAutocompleteComponent extends BaseFormControl {
|
|
1213
1213
|
constructor() {
|
|
1214
1214
|
super(...arguments);
|
|
1215
|
+
this.SeparatorRegexp = /,|\s/;
|
|
1215
1216
|
this._baseSource = null;
|
|
1216
1217
|
/** Numero minimo di caratteri per far partire la ricerca */
|
|
1217
1218
|
this.MinChars = input(3, ...(ngDevMode ? [{ debugName: "MinChars" }] : []));
|
|
1218
1219
|
this.SearchFunction = null;
|
|
1220
|
+
/** Indica se usare la modalità multiselezione o no */
|
|
1221
|
+
this.multiple = false;
|
|
1222
|
+
this.forceSelection = false;
|
|
1219
1223
|
this.style = signal({ "width": "100%" }, ...(ngDevMode ? [{ debugName: "style" }] : []));
|
|
1220
1224
|
this.typeahead = signal(true, ...(ngDevMode ? [{ debugName: "typeahead" }] : []));
|
|
1221
1225
|
this.mode = signal("autocomplete", ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
@@ -1287,14 +1291,17 @@ class EsFormAutocompleteComponent extends BaseFormControl {
|
|
|
1287
1291
|
// Senza typeahead invece emette delle stringhe con il valore scritto.
|
|
1288
1292
|
// L'ultimo valore aggiunto (in caso di inserimento multiplo), o il valore attuale (in caso di inseirmento singolo)
|
|
1289
1293
|
// devono essere trasformati da una string al formato { id: event, description: event }
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
arr
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1294
|
+
// Se è in modalità chip, tengo la lista di stringhe e basta
|
|
1295
|
+
if (this.mode() !== "chips") {
|
|
1296
|
+
if (this.multiple) {
|
|
1297
|
+
let arr = event;
|
|
1298
|
+
let lastElement = arr.slice(-1)[0];
|
|
1299
|
+
if (typeof lastElement === "string")
|
|
1300
|
+
arr[arr.length - 1] = { id: lastElement, description: lastElement };
|
|
1301
|
+
}
|
|
1302
|
+
else if (typeof event === "string") {
|
|
1303
|
+
event = { id: event, description: event };
|
|
1304
|
+
}
|
|
1298
1305
|
}
|
|
1299
1306
|
super.changed(event);
|
|
1300
1307
|
}
|
|
@@ -1314,10 +1321,12 @@ class EsFormAutocompleteComponent extends BaseFormControl {
|
|
|
1314
1321
|
this.Source = res.flat();
|
|
1315
1322
|
return this.multiple ? res.flat() : res.flat()[0];
|
|
1316
1323
|
}
|
|
1324
|
+
// Se la source è vuota può essere modalità chips
|
|
1317
1325
|
if ((this._baseSource?.length || 0) === 0)
|
|
1318
|
-
return
|
|
1326
|
+
return this.mode() == "chips" ? vals : this.multiple ? vals.map(t => { return { id: t, description: t }; }) : { id: vals[0], description: vals[0] };
|
|
1327
|
+
// Altrimenti di sicuro no
|
|
1319
1328
|
let items = this._baseSource.filter(t => vals.map(v => v.toString()).includes(t.id));
|
|
1320
|
-
return
|
|
1329
|
+
return this.multiple ? items : items[0];
|
|
1321
1330
|
}
|
|
1322
1331
|
/*
|
|
1323
1332
|
Possono arrivare valori nel seguente modo:
|
|
@@ -1332,11 +1341,11 @@ class EsFormAutocompleteComponent extends BaseFormControl {
|
|
|
1332
1341
|
typeof value === "string" ? (this.BoundSourceCache[value]?.description ?? value) : (value.description ?? value.id);
|
|
1333
1342
|
}
|
|
1334
1343
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: EsFormAutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.24", type: EsFormAutocompleteComponent, isStandalone: true, selector: "form-autocomplete", inputs: { MinChars: { classPropertyName: "MinChars", publicName: "MinChars", isSignal: true, isRequired: false, transformFunction: null }, SearchFunctionContext: { classPropertyName: "SearchFunctionContext", publicName: "SearchFunctionContext", isSignal: false, isRequired: false, transformFunction: null }, SearchFunction: { classPropertyName: "SearchFunction", publicName: "SearchFunction", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormAutocompleteComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n
|
|
1344
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.24", type: EsFormAutocompleteComponent, isStandalone: true, selector: "form-autocomplete", inputs: { MinChars: { classPropertyName: "MinChars", publicName: "MinChars", isSignal: true, isRequired: false, transformFunction: null }, SearchFunctionContext: { classPropertyName: "SearchFunctionContext", publicName: "SearchFunctionContext", isSignal: false, isRequired: false, transformFunction: null }, SearchFunction: { classPropertyName: "SearchFunction", publicName: "SearchFunction", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormAutocompleteComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div>\r\n<div><strong>BoundSource:</strong> {{BoundSource() | json}}</div>\r\n<div><strong>mode:</strong> {{mode()}}</div>\r\n<div><strong>multiple:</strong> {{multiple}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n<ng-template #controlTemplate>\r\n <p-floatlabel variant=\"on\">\r\n <p-autocomplete \r\n size=\"small\" \r\n autocomplete=\"off\"\r\n #innerInput=\"ngModel\" \r\n #innerElement \r\n [style]=\"style()\"\r\n [attr.name]=\"InternalName\" \r\n [attr.id]=\"InternalName\" \r\n [multiple]=\"mode() == 'chips' ? true : multiple\"\r\n [fluid]=\"mode() == 'chips' ? true : multiple\"\r\n [addOnBlur]=\"mode() == 'chips'\"\r\n [addOnTab]=\"mode() == 'chips'\"\r\n [separator]=\"mode() == 'chips' ? SeparatorRegexp : undefined\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [suggestions]=\"BoundSource()\"\r\n [forceSelection]=\"forceSelection\"\r\n [typeahead]=\"mode() == 'chips' ? false : typeahead()\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"44\"\r\n [optionLabel]=\"mode() == 'chips' ? undefined : 'description'\"\r\n (completeMethod)=\"search($event)\"\r\n [minLength]=\"MinChars()\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (blur)=\"onTouched(); finalized()\">\r\n </p-autocomplete>\r\n\r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\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: AutoCompleteModule }, { kind: "component", type: i1$6.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "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: "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: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: InputSkeletonComponent, selector: "input-skeleton", inputs: ["For", "Control", "ForceControlDisplay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1336
1345
|
}
|
|
1337
1346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: EsFormAutocompleteComponent, decorators: [{
|
|
1338
1347
|
type: Component,
|
|
1339
|
-
args: [{ selector: "form-autocomplete", encapsulation: ViewEncapsulation.None, imports: [AutoCompleteModule, AutoComplete, FormsModule, CommonModule, FloatLabelModule, PopoverModule, InputGroupModule, InputGroupAddonModule, InputSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormAutocompleteComponent), multi: true }], standalone: true, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n
|
|
1348
|
+
args: [{ selector: "form-autocomplete", encapsulation: ViewEncapsulation.None, imports: [AutoCompleteModule, AutoComplete, FormsModule, CommonModule, FloatLabelModule, PopoverModule, InputGroupModule, InputGroupAddonModule, InputSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormAutocompleteComponent), multi: true }], standalone: true, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div>\r\n<div><strong>BoundSource:</strong> {{BoundSource() | json}}</div>\r\n<div><strong>mode:</strong> {{mode()}}</div>\r\n<div><strong>multiple:</strong> {{multiple}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n<ng-template #controlTemplate>\r\n <p-floatlabel variant=\"on\">\r\n <p-autocomplete \r\n size=\"small\" \r\n autocomplete=\"off\"\r\n #innerInput=\"ngModel\" \r\n #innerElement \r\n [style]=\"style()\"\r\n [attr.name]=\"InternalName\" \r\n [attr.id]=\"InternalName\" \r\n [multiple]=\"mode() == 'chips' ? true : multiple\"\r\n [fluid]=\"mode() == 'chips' ? true : multiple\"\r\n [addOnBlur]=\"mode() == 'chips'\"\r\n [addOnTab]=\"mode() == 'chips'\"\r\n [separator]=\"mode() == 'chips' ? SeparatorRegexp : undefined\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [suggestions]=\"BoundSource()\"\r\n [forceSelection]=\"forceSelection\"\r\n [typeahead]=\"mode() == 'chips' ? false : typeahead()\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"44\"\r\n [optionLabel]=\"mode() == 'chips' ? undefined : 'description'\"\r\n (completeMethod)=\"search($event)\"\r\n [minLength]=\"MinChars()\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (blur)=\"onTouched(); finalized()\">\r\n </p-autocomplete>\r\n\r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\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"] }]
|
|
1340
1349
|
}], propDecorators: { MinChars: [{ type: i0.Input, args: [{ isSignal: true, alias: "MinChars", required: false }] }], SearchFunctionContext: [{
|
|
1341
1350
|
type: Input
|
|
1342
1351
|
}], SearchFunction: [{
|
|
@@ -1573,14 +1582,14 @@ class EsFormChipsComponent extends EsFormAutocompleteComponent {
|
|
|
1573
1582
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.24", type: EsFormChipsComponent, isStandalone: true, selector: "form-chips", inputs: { ValidateEmail: "ValidateEmail" }, providers: [
|
|
1574
1583
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormChipsComponent), multi: true },
|
|
1575
1584
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => EsFormChipsComponent), multi: true }
|
|
1576
|
-
], usesInheritance: true, ngImport: i0, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n
|
|
1585
|
+
], usesInheritance: true, ngImport: i0, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div>\r\n<div><strong>BoundSource:</strong> {{BoundSource() | json}}</div>\r\n<div><strong>mode:</strong> {{mode()}}</div>\r\n<div><strong>multiple:</strong> {{multiple}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n<ng-template #controlTemplate>\r\n <p-floatlabel variant=\"on\">\r\n <p-autocomplete \r\n size=\"small\" \r\n autocomplete=\"off\"\r\n #innerInput=\"ngModel\" \r\n #innerElement \r\n [style]=\"style()\"\r\n [attr.name]=\"InternalName\" \r\n [attr.id]=\"InternalName\" \r\n [multiple]=\"mode() == 'chips' ? true : multiple\"\r\n [fluid]=\"mode() == 'chips' ? true : multiple\"\r\n [addOnBlur]=\"mode() == 'chips'\"\r\n [addOnTab]=\"mode() == 'chips'\"\r\n [separator]=\"mode() == 'chips' ? SeparatorRegexp : undefined\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [suggestions]=\"BoundSource()\"\r\n [forceSelection]=\"forceSelection\"\r\n [typeahead]=\"mode() == 'chips' ? false : typeahead()\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"44\"\r\n [optionLabel]=\"mode() == 'chips' ? undefined : 'description'\"\r\n (completeMethod)=\"search($event)\"\r\n [minLength]=\"MinChars()\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (blur)=\"onTouched(); finalized()\">\r\n </p-autocomplete>\r\n\r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\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: AutoCompleteModule }, { kind: "component", type: i1$6.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "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: "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: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: InputSkeletonComponent, selector: "input-skeleton", inputs: ["For", "Control", "ForceControlDisplay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1577
1586
|
}
|
|
1578
1587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.24", ngImport: i0, type: EsFormChipsComponent, decorators: [{
|
|
1579
1588
|
type: Component,
|
|
1580
1589
|
args: [{ selector: "form-chips", encapsulation: ViewEncapsulation.None, imports: [AutoCompleteModule, AutoComplete, FormsModule, CommonModule, FloatLabelModule, PopoverModule, InputGroupModule, InputGroupAddonModule, InputSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1581
1590
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => EsFormChipsComponent), multi: true },
|
|
1582
1591
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => EsFormChipsComponent), multi: true }
|
|
1583
|
-
], standalone: true, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n
|
|
1592
|
+
], standalone: true, template: "<!-- Riga di debug -->\r\n<!-- <div><strong>Valore interno:</strong> {{value | json}}</div>\r\n<div><strong>BoundSource:</strong> {{BoundSource() | json}}</div>\r\n<div><strong>mode:</strong> {{mode()}}</div>\r\n<div><strong>multiple:</strong> {{multiple}}</div> -->\r\n\r\n<input-skeleton [Control]=\"controlTemplate\" [For]=\"This()\"></input-skeleton>\r\n\r\n<ng-template #controlTemplate>\r\n <p-floatlabel variant=\"on\">\r\n <p-autocomplete \r\n size=\"small\" \r\n autocomplete=\"off\"\r\n #innerInput=\"ngModel\" \r\n #innerElement \r\n [style]=\"style()\"\r\n [attr.name]=\"InternalName\" \r\n [attr.id]=\"InternalName\" \r\n [multiple]=\"mode() == 'chips' ? true : multiple\"\r\n [fluid]=\"mode() == 'chips' ? true : multiple\"\r\n [addOnBlur]=\"mode() == 'chips'\"\r\n [addOnTab]=\"mode() == 'chips'\"\r\n [separator]=\"mode() == 'chips' ? SeparatorRegexp : undefined\"\r\n [disabled]=\"disabled\" \r\n [required]=\"required\"\r\n [readonly]=\"readonly\"\r\n [suggestions]=\"BoundSource()\"\r\n [forceSelection]=\"forceSelection\"\r\n [typeahead]=\"mode() == 'chips' ? false : typeahead()\"\r\n [virtualScroll]=\"true\"\r\n [virtualScrollItemSize]=\"44\"\r\n [optionLabel]=\"mode() == 'chips' ? undefined : 'description'\"\r\n (completeMethod)=\"search($event)\"\r\n [minLength]=\"MinChars()\"\r\n [ngModel]=\"value\" \r\n (ngModelChange)=\"changed($event)\" \r\n (click)=\"focused($event);\"\r\n (blur)=\"onTouched(); finalized()\">\r\n </p-autocomplete>\r\n\r\n <label>{{Placeholder}}</label>\r\n </p-floatlabel>\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"] }]
|
|
1584
1593
|
}], propDecorators: { ValidateEmail: [{
|
|
1585
1594
|
type: Input
|
|
1586
1595
|
}] } });
|