intelica-library-ui 0.1.119 → 0.1.120
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.
|
@@ -2901,24 +2901,55 @@ class MultiSelectComponent {
|
|
|
2901
2901
|
onChangeEvent = new EventEmitter();
|
|
2902
2902
|
checked = false;
|
|
2903
2903
|
selectedOptions = [];
|
|
2904
|
+
onChange = () => { };
|
|
2905
|
+
onTouched = () => { };
|
|
2904
2906
|
toggleAllSelection(event) {
|
|
2905
2907
|
this.selectedOptions = event.checked ? this.options.map(option => option.value) : [];
|
|
2906
2908
|
this.emitChangeEvent();
|
|
2909
|
+
this.onChange(this.selectedOptions);
|
|
2910
|
+
this.onTouched();
|
|
2907
2911
|
}
|
|
2908
2912
|
onChangeSelect(event) {
|
|
2909
2913
|
console.log("onChange -> ", event);
|
|
2910
2914
|
this.checked = this.selectedOptions.length === this.options.length;
|
|
2911
2915
|
this.emitChangeEvent();
|
|
2916
|
+
this.onChange(this.selectedOptions);
|
|
2917
|
+
this.onTouched();
|
|
2912
2918
|
}
|
|
2913
2919
|
emitChangeEvent() {
|
|
2914
2920
|
this.onChangeEvent.emit(this.selectedOptions);
|
|
2915
2921
|
}
|
|
2922
|
+
writeValue(value) {
|
|
2923
|
+
this.selectedOptions = value || [];
|
|
2924
|
+
this.checked = this.selectedOptions.length === this.options.length;
|
|
2925
|
+
}
|
|
2926
|
+
registerOnChange(fn) {
|
|
2927
|
+
this.onChange = fn;
|
|
2928
|
+
}
|
|
2929
|
+
registerOnTouched(fn) {
|
|
2930
|
+
this.onTouched = fn;
|
|
2931
|
+
}
|
|
2932
|
+
setDisabledState(isDisabled) {
|
|
2933
|
+
// Aquí puedes manejar el estado disabled si es necesario
|
|
2934
|
+
}
|
|
2916
2935
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2917
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MultiSelectComponent, isStandalone: true, selector: "intelica-multi-select", inputs: { id: "id", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", placeholder: "placeholder", showFilter: "showFilter", showAll: "showAll", allText: "allText", maxSelectedLabels: "maxSelectedLabels", appendTo: "appendTo", panelStyleClass: "panelStyleClass", virtualScroll: "virtualScroll", selectedItemsLabel: "selectedItemsLabel" }, outputs: { onChangeEvent: "onChange" },
|
|
2936
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MultiSelectComponent, isStandalone: true, selector: "intelica-multi-select", inputs: { id: "id", options: "options", optionLabel: "optionLabel", optionValue: "optionValue", placeholder: "placeholder", showFilter: "showFilter", showAll: "showAll", allText: "allText", maxSelectedLabels: "maxSelectedLabels", appendTo: "appendTo", panelStyleClass: "panelStyleClass", virtualScroll: "virtualScroll", selectedItemsLabel: "selectedItemsLabel" }, outputs: { onChangeEvent: "onChange" }, providers: [
|
|
2937
|
+
{
|
|
2938
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2939
|
+
useExisting: forwardRef(() => MultiSelectComponent),
|
|
2940
|
+
multi: true,
|
|
2941
|
+
},
|
|
2942
|
+
], ngImport: i0, template: "<p-multiSelect\r\n\tclass=\"prMultiselect\"\r\n\t[options]=\"options\"\r\n\t[(ngModel)]=\"selectedOptions\"\r\n\t[optionLabel]=\"optionLabel\"\r\n\t[optionValue]=\"optionValue\"\r\n\t[placeholder]=\"placeholder\"\r\n\t[maxSelectedLabels]=\"maxSelectedLabels\"\r\n\t[filter]=\"showFilter\"\r\n\t[showToggleAll]=\"false\"\r\n\t(onChange)=\"onChangeSelect($event)\"\r\n\t[appendTo]=\"appendTo\"\r\n\t[panelStyleClass]=\"panelStyleClass\"\r\n\t[virtualScroll]=\"virtualScroll\"\r\n\t[virtualScrollOptions]=\"{ itemSize: 25, scrollHeight: '200px' }\"\r\n\tselectedItemsLabel=\"{0} {{ selectedItemsLabel }}\"\r\n>\r\n\t@if(showAll){\r\n\t<ng-template #header>\r\n\t\t<div class=\"prMultiselect__all\">\r\n\t\t\t<label [for]=\"id + '-all'\">\r\n\t\t\t\t<p-checkbox [inputId]=\"id + '-all'\" [binary]=\"true\" [(ngModel)]=\"checked\" (onChange)=\"toggleAllSelection($event)\"></p-checkbox>\r\n\t\t\t\t{{ allText }}\r\n\t\t\t</label>\r\n\t\t</div>\r\n\t</ng-template>\r\n\t}\r\n</p-multiSelect>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2$2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }] });
|
|
2918
2943
|
}
|
|
2919
2944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
2920
2945
|
type: Component,
|
|
2921
|
-
args: [{ selector: "intelica-multi-select", imports: [FormsModule, MultiSelectModule, CheckboxModule],
|
|
2946
|
+
args: [{ selector: "intelica-multi-select", imports: [FormsModule, MultiSelectModule, CheckboxModule], providers: [
|
|
2947
|
+
{
|
|
2948
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2949
|
+
useExisting: forwardRef(() => MultiSelectComponent),
|
|
2950
|
+
multi: true,
|
|
2951
|
+
},
|
|
2952
|
+
], template: "<p-multiSelect\r\n\tclass=\"prMultiselect\"\r\n\t[options]=\"options\"\r\n\t[(ngModel)]=\"selectedOptions\"\r\n\t[optionLabel]=\"optionLabel\"\r\n\t[optionValue]=\"optionValue\"\r\n\t[placeholder]=\"placeholder\"\r\n\t[maxSelectedLabels]=\"maxSelectedLabels\"\r\n\t[filter]=\"showFilter\"\r\n\t[showToggleAll]=\"false\"\r\n\t(onChange)=\"onChangeSelect($event)\"\r\n\t[appendTo]=\"appendTo\"\r\n\t[panelStyleClass]=\"panelStyleClass\"\r\n\t[virtualScroll]=\"virtualScroll\"\r\n\t[virtualScrollOptions]=\"{ itemSize: 25, scrollHeight: '200px' }\"\r\n\tselectedItemsLabel=\"{0} {{ selectedItemsLabel }}\"\r\n>\r\n\t@if(showAll){\r\n\t<ng-template #header>\r\n\t\t<div class=\"prMultiselect__all\">\r\n\t\t\t<label [for]=\"id + '-all'\">\r\n\t\t\t\t<p-checkbox [inputId]=\"id + '-all'\" [binary]=\"true\" [(ngModel)]=\"checked\" (onChange)=\"toggleAllSelection($event)\"></p-checkbox>\r\n\t\t\t\t{{ allText }}\r\n\t\t\t</label>\r\n\t\t</div>\r\n\t</ng-template>\r\n\t}\r\n</p-multiSelect>\r\n" }]
|
|
2922
2953
|
}], propDecorators: { id: [{
|
|
2923
2954
|
type: Input
|
|
2924
2955
|
}], options: [{
|