intelica-library-ui 0.1.77 → 0.1.78
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.
|
@@ -2553,6 +2553,163 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2553
2553
|
type: Output
|
|
2554
2554
|
}] } });
|
|
2555
2555
|
|
|
2556
|
+
class TemplateMenuComponent {
|
|
2557
|
+
termPipe;
|
|
2558
|
+
GlobalTermService = inject(GlobalTermService);
|
|
2559
|
+
Popover;
|
|
2560
|
+
MenuButton;
|
|
2561
|
+
PopoverContainer;
|
|
2562
|
+
template;
|
|
2563
|
+
IsPopoverOpen = false;
|
|
2564
|
+
IsClickInsideDatepicker = false;
|
|
2565
|
+
/**
|
|
2566
|
+
* Indica si el menú de acciones está visible o no.
|
|
2567
|
+
* @type {boolean}
|
|
2568
|
+
* @default false
|
|
2569
|
+
*/
|
|
2570
|
+
ShowActionsMenu = false;
|
|
2571
|
+
/**
|
|
2572
|
+
* Indica si la sección de selección de acciones está visible o no.
|
|
2573
|
+
* @type {boolean}
|
|
2574
|
+
* @default false
|
|
2575
|
+
*/
|
|
2576
|
+
ShowSelectActions = false;
|
|
2577
|
+
constructor(termPipe) {
|
|
2578
|
+
this.termPipe = termPipe;
|
|
2579
|
+
}
|
|
2580
|
+
ngOnInit() {
|
|
2581
|
+
// const specificRegex = /local.*filt|filt.*local/i;
|
|
2582
|
+
// const generalRegex = /filt/i;
|
|
2583
|
+
// const specificResults = this.actions.filter(action => specificRegex.test(action.name));
|
|
2584
|
+
// if (specificResults.length === 0) {
|
|
2585
|
+
// const generalResults = this.actions.filter(action => generalRegex.test(action.name));
|
|
2586
|
+
// generalResults.forEach(action => this.showTemplate(action));
|
|
2587
|
+
// } else {
|
|
2588
|
+
// specificResults.forEach(action => this.showTemplate(action));
|
|
2589
|
+
// }
|
|
2590
|
+
}
|
|
2591
|
+
openPopover() {
|
|
2592
|
+
this.IsPopoverOpen = true;
|
|
2593
|
+
// Cambia el estado de visibilidad del menú de acciones.
|
|
2594
|
+
this.ShowActionsMenu = true;
|
|
2595
|
+
// Muestra u oculta el menú de selección de acciones.
|
|
2596
|
+
this.ShowSelectActions = true;
|
|
2597
|
+
this.Popover.nativeElement.style.display = "block";
|
|
2598
|
+
this.MenuButton.nativeElement.classList.add("active");
|
|
2599
|
+
this.PopoverContainer.nativeElement.classList.add("backdrop-visible");
|
|
2600
|
+
}
|
|
2601
|
+
closePopover() {
|
|
2602
|
+
this.IsPopoverOpen = false;
|
|
2603
|
+
// Cambia el estado de visibilidad del menú de acciones.
|
|
2604
|
+
this.ShowActionsMenu = false;
|
|
2605
|
+
// Muestra u oculta el menú de selección de acciones.
|
|
2606
|
+
this.ShowSelectActions = true;
|
|
2607
|
+
this.Popover.nativeElement.style.display = "none";
|
|
2608
|
+
this.MenuButton.nativeElement.classList.remove("active");
|
|
2609
|
+
this.PopoverContainer.nativeElement.classList.remove("backdrop-visible");
|
|
2610
|
+
}
|
|
2611
|
+
/** Método para alternar el estado del popover */
|
|
2612
|
+
togglePopover(event) {
|
|
2613
|
+
this.IsPopoverOpen ? this.closePopover() : this.openPopover();
|
|
2614
|
+
}
|
|
2615
|
+
onMouseDown(event) {
|
|
2616
|
+
const target = event.target;
|
|
2617
|
+
if (target.closest(".p-datepicker") || target.closest(".p-inputtext") || target.closest(".p-select-panel") || target.closest(".p-multiselect-panel")) {
|
|
2618
|
+
this.IsClickInsideDatepicker = true;
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2621
|
+
onMouseDownOutsideBody(event) {
|
|
2622
|
+
const target = event.target;
|
|
2623
|
+
if (target.closest(".p-datepicker") || target.closest(".p-inputtext") || target.closest(".p-select-panel") || target.closest(".p-multiselect-panel")) {
|
|
2624
|
+
this.IsClickInsideDatepicker = true;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
onMouseUp(event) {
|
|
2628
|
+
setTimeout(() => {
|
|
2629
|
+
this.IsClickInsideDatepicker = false;
|
|
2630
|
+
}, 100);
|
|
2631
|
+
}
|
|
2632
|
+
closeAll(event) {
|
|
2633
|
+
if (!event)
|
|
2634
|
+
return;
|
|
2635
|
+
const target = event.target;
|
|
2636
|
+
const allowedClasses = [
|
|
2637
|
+
"prSelect",
|
|
2638
|
+
"p-select-option-selected",
|
|
2639
|
+
"p-select-option",
|
|
2640
|
+
"p-datepicker-panel",
|
|
2641
|
+
"p-datepicker-select-month",
|
|
2642
|
+
"p-button-text",
|
|
2643
|
+
"p-datepicker-select-year",
|
|
2644
|
+
"p-datepicker-month",
|
|
2645
|
+
"p-datepicker-year",
|
|
2646
|
+
"p-checkbox-input",
|
|
2647
|
+
"p-multiselect-option",
|
|
2648
|
+
"p-multiselect-filter",
|
|
2649
|
+
"p-multiselect-empty-message",
|
|
2650
|
+
"p-inputicon",
|
|
2651
|
+
"p-tree-node-selected",
|
|
2652
|
+
"p-tree-node-content",
|
|
2653
|
+
"p-multiselect-header",
|
|
2654
|
+
"grButton--icon-close-modal",
|
|
2655
|
+
"p-overlay-mask",
|
|
2656
|
+
"p-select-clear-icon",
|
|
2657
|
+
"formRowInputClear",
|
|
2658
|
+
"icon-times",
|
|
2659
|
+
"p-select-empty-message",
|
|
2660
|
+
"p-select-list",
|
|
2661
|
+
"p-iconfield",
|
|
2662
|
+
"p-inputtext",
|
|
2663
|
+
"p-select-header",
|
|
2664
|
+
"p-overlay",
|
|
2665
|
+
"p-select-filter",
|
|
2666
|
+
"p-overlay-content",
|
|
2667
|
+
"p-select-overlay",
|
|
2668
|
+
"p-select-panel",
|
|
2669
|
+
"p-multiselect-panel",
|
|
2670
|
+
];
|
|
2671
|
+
if (this.IsClickInsideDatepicker) {
|
|
2672
|
+
return;
|
|
2673
|
+
}
|
|
2674
|
+
if (allowedClasses.some(className => target.closest(`.${className}`))) {
|
|
2675
|
+
return;
|
|
2676
|
+
}
|
|
2677
|
+
if (this.Popover && !this.Popover.nativeElement.contains(target) && this.MenuButton && !this.MenuButton.nativeElement.contains(target)) {
|
|
2678
|
+
this.closePopover();
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TemplateMenuComponent, deps: [{ token: TermPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
2682
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: TemplateMenuComponent, isStandalone: true, selector: "intelica-template-menu", host: { listeners: { "mousedown": "onMouseDown($event)", "window:mousedown": "onMouseDownOutsideBody($event)", "mouseup": "onMouseUp($event)", "document:click": "closeAll($event)" } }, queries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }], viewQueries: [{ propertyName: "Popover", first: true, predicate: ["popover"], descendants: true }, { propertyName: "MenuButton", first: true, predicate: ["menuButton"], descendants: true }, { propertyName: "PopoverContainer", first: true, predicate: ["popoverContainer"], descendants: true }], ngImport: i0, template: "<div #popoverContainer class=\"grPopoverContainer\">\r\n\t<button #menuButton class=\"grMenuTemplate\" (click)=\"togglePopover($event)\">\r\n\t\t<span class=\"grMenuTemplate__ico\"><i class=\"icon icon-filter-option\"></i></span>\r\n\t\t<span class=\"grMenuTemplate__txt\">{{ \"Filters\" | term : GlobalTermService.languageCode }}</span>\r\n\t</button>\r\n\t<div class=\"grPopover\" #popover>\r\n\t\t<!-- Men\u00FA -->\r\n\t\t<div class=\"grPopoverMenu\" *ngIf=\"ShowActionsMenu\" [ngClass]=\"{ hidden: !ShowSelectActions }\">\r\n\t\t\t<div class=\"grPopoverHeader\">\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t<span>{{ \"Filters\" | term : GlobalTermService.languageCode }}</span>\r\n\t\t\t\t</h3>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"grPopoverBody grPopoverBody--template\">\r\n\t\t\t\t<ng-container *ngIf=\"template\">\r\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"template\"></ng-container>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "ngmodule", type: InputGroupAddonModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RippleModule }, { kind: "pipe", type: TermPipe, name: "term" }] });
|
|
2683
|
+
}
|
|
2684
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TemplateMenuComponent, decorators: [{
|
|
2685
|
+
type: Component,
|
|
2686
|
+
args: [{ selector: "intelica-template-menu", imports: [ButtonModule, InputGroupAddonModule, CommonModule, RippleModule, TermPipe], template: "<div #popoverContainer class=\"grPopoverContainer\">\r\n\t<button #menuButton class=\"grMenuTemplate\" (click)=\"togglePopover($event)\">\r\n\t\t<span class=\"grMenuTemplate__ico\"><i class=\"icon icon-filter-option\"></i></span>\r\n\t\t<span class=\"grMenuTemplate__txt\">{{ \"Filters\" | term : GlobalTermService.languageCode }}</span>\r\n\t</button>\r\n\t<div class=\"grPopover\" #popover>\r\n\t\t<!-- Men\u00FA -->\r\n\t\t<div class=\"grPopoverMenu\" *ngIf=\"ShowActionsMenu\" [ngClass]=\"{ hidden: !ShowSelectActions }\">\r\n\t\t\t<div class=\"grPopoverHeader\">\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t<span>{{ \"Filters\" | term : GlobalTermService.languageCode }}</span>\r\n\t\t\t\t</h3>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"grPopoverBody grPopoverBody--template\">\r\n\t\t\t\t<ng-container *ngIf=\"template\">\r\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"template\"></ng-container>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n" }]
|
|
2687
|
+
}], ctorParameters: () => [{ type: TermPipe }], propDecorators: { Popover: [{
|
|
2688
|
+
type: ViewChild,
|
|
2689
|
+
args: ["popover"]
|
|
2690
|
+
}], MenuButton: [{
|
|
2691
|
+
type: ViewChild,
|
|
2692
|
+
args: ["menuButton"]
|
|
2693
|
+
}], PopoverContainer: [{
|
|
2694
|
+
type: ViewChild,
|
|
2695
|
+
args: ["popoverContainer"]
|
|
2696
|
+
}], template: [{
|
|
2697
|
+
type: ContentChild,
|
|
2698
|
+
args: ["template", { static: true }]
|
|
2699
|
+
}], onMouseDown: [{
|
|
2700
|
+
type: HostListener,
|
|
2701
|
+
args: ["mousedown", ["$event"]]
|
|
2702
|
+
}], onMouseDownOutsideBody: [{
|
|
2703
|
+
type: HostListener,
|
|
2704
|
+
args: ["window:mousedown", ["$event"]]
|
|
2705
|
+
}], onMouseUp: [{
|
|
2706
|
+
type: HostListener,
|
|
2707
|
+
args: ["mouseup", ["$event"]]
|
|
2708
|
+
}], closeAll: [{
|
|
2709
|
+
type: HostListener,
|
|
2710
|
+
args: ["document:click", ["$event"]]
|
|
2711
|
+
}] } });
|
|
2712
|
+
|
|
2556
2713
|
class HtmlToExcelService {
|
|
2557
2714
|
ExportTOExcel(idTabla, html, filename, tabname, extension) {
|
|
2558
2715
|
let Table = document.getElementById(idTabla);
|
|
@@ -5446,5 +5603,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
5446
5603
|
* Generated bundle index. Do not edit.
|
|
5447
5604
|
*/
|
|
5448
5605
|
|
|
5449
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermGuard, TermPipe, TermService, decryptData, encryptData };
|
|
5606
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, ModalDialogComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RowResumenComponent, SearchComponent, SharedService, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, decryptData, encryptData };
|
|
5450
5607
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|