intelica-library-ui 0.1.102 → 0.1.104

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.
@@ -31,6 +31,8 @@ import * as i3$2 from 'primeng/ripple';
31
31
  import { RippleModule } from 'primeng/ripple';
32
32
  import { Dialog } from 'primeng/dialog';
33
33
  import * as echarts from 'echarts';
34
+ import * as i2$2 from 'primeng/multiselect';
35
+ import { MultiSelectModule } from 'primeng/multiselect';
34
36
  import * as i1$3 from 'primeng/skeleton';
35
37
  import { SkeletonModule } from 'primeng/skeleton';
36
38
  import * as XLSX from 'xlsx';
@@ -2751,6 +2753,13 @@ class TemplateMenuComponent {
2751
2753
  if (!event)
2752
2754
  return;
2753
2755
  const target = event.target;
2756
+ // clases que fuerzan el cierre del popover
2757
+ const forceCloseClasses = ["closePopoverNow", "closeTemplateMenu"];
2758
+ // Si se da clic en una clase que debe cerrar sí o sí
2759
+ if (forceCloseClasses.some(className => target.closest(`.${className}`))) {
2760
+ this.closePopover();
2761
+ return;
2762
+ }
2754
2763
  const allowedClasses = [
2755
2764
  "prSelect",
2756
2765
  "p-select-option-selected",
@@ -2828,6 +2837,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
2828
2837
  args: ["document:click", ["$event"]]
2829
2838
  }] } });
2830
2839
 
2840
+ class MultiSelectComponent {
2841
+ /**
2842
+ * @description Id
2843
+ * @default ""
2844
+ * @type {string}
2845
+ */
2846
+ id = "";
2847
+ /**
2848
+ * @description Opciones.
2849
+ * @example [{value: string, text: string}]
2850
+ * @type {any[]}
2851
+ */
2852
+ options = [];
2853
+ /**
2854
+ * @description Label name.
2855
+ * @default "text"
2856
+ * @type {{value: string, label: string}[]}
2857
+ */
2858
+ optionLabel = "text";
2859
+ /**
2860
+ * @description Value name.
2861
+ * @default "value"
2862
+ * @type {{value: string, label: string}[]}
2863
+ */
2864
+ optionValue = "value";
2865
+ /**
2866
+ * @description Placeholder
2867
+ * @default "Select an item"
2868
+ * @type {string}
2869
+ */
2870
+ placeholder = "Select an item";
2871
+ /**
2872
+ * @description Show filter textbox
2873
+ * @default false
2874
+ * @type {boolean}
2875
+ */
2876
+ showFilter = false;
2877
+ /**
2878
+ * @description Show All Checkbox
2879
+ * @default false
2880
+ * @type {boolean}
2881
+ */
2882
+ showAll = false;
2883
+ /**
2884
+ * @description All | Todo
2885
+ * @default "All"
2886
+ * @type {string}
2887
+ */
2888
+ allText = "All";
2889
+ /**
2890
+ * @description Number of selected labels to show
2891
+ * @default 3
2892
+ * @type {number}
2893
+ */
2894
+ maxSelectedLabels = 3;
2895
+ /**
2896
+ * @description Append To
2897
+ * @default ""
2898
+ * @type {string}
2899
+ */
2900
+ appendTo = "";
2901
+ /**
2902
+ * @description Panel Style Class
2903
+ * @default ""
2904
+ * @type {string}
2905
+ */
2906
+ panelStyleClass = "prMultiselect";
2907
+ /**
2908
+ * @description Change event
2909
+ * @emits {string[]}
2910
+ * @type {EventEmitter<string[]>}
2911
+ */
2912
+ onChangeEvent = new EventEmitter();
2913
+ checked = false;
2914
+ selectedOptions = [];
2915
+ toggleAllSelection(event) {
2916
+ this.selectedOptions = event.checked ? this.options.map(option => option.value) : [];
2917
+ this.emitChangeEvent();
2918
+ }
2919
+ onChangeSelect(event) {
2920
+ console.log("onChange -> ", event);
2921
+ this.checked = this.selectedOptions.length === this.options.length;
2922
+ this.emitChangeEvent();
2923
+ }
2924
+ emitChangeEvent() {
2925
+ this.onChangeEvent.emit(this.selectedOptions);
2926
+ }
2927
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2928
+ 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" }, outputs: { onChangeEvent: "onChange" }, 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>\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"] }] });
2929
+ }
2930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MultiSelectComponent, decorators: [{
2931
+ type: Component,
2932
+ args: [{ selector: "intelica-multi-select", imports: [FormsModule, MultiSelectModule, CheckboxModule], 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>\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" }]
2933
+ }], propDecorators: { id: [{
2934
+ type: Input
2935
+ }], options: [{
2936
+ type: Input
2937
+ }], optionLabel: [{
2938
+ type: Input
2939
+ }], optionValue: [{
2940
+ type: Input
2941
+ }], placeholder: [{
2942
+ type: Input
2943
+ }], showFilter: [{
2944
+ type: Input
2945
+ }], showAll: [{
2946
+ type: Input
2947
+ }], allText: [{
2948
+ type: Input
2949
+ }], maxSelectedLabels: [{
2950
+ type: Input
2951
+ }], appendTo: [{
2952
+ type: Input
2953
+ }], panelStyleClass: [{
2954
+ type: Input
2955
+ }], onChangeEvent: [{
2956
+ type: Output,
2957
+ args: ["onChange"]
2958
+ }] } });
2959
+
2831
2960
  class SkeletonService {
2832
2961
  isLoading = signal(false);
2833
2962
  hide() {
@@ -6130,5 +6259,5 @@ const IntelicaTheme = definePreset(Aura, {
6130
6259
  * Generated bundle index. Do not edit.
6131
6260
  */
6132
6261
 
6133
- export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TruncatePipe, decryptData, encryptData, getColor };
6262
+ export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TruncatePipe, decryptData, encryptData, getColor };
6134
6263
  //# sourceMappingURL=intelica-library-ui.mjs.map