intelica-library-ui 0.1.27 → 0.1.29
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.
- package/fesm2022/intelica-library-ui.mjs +306 -9
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/components/actions-menu/action.directive.d.ts +61 -0
- package/lib/components/actions-menu/actions-menu.component.d.ts +63 -0
- package/lib/components/paginator/paginator.component.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -22,6 +22,9 @@ import { ButtonModule } from 'primeng/button';
|
|
|
22
22
|
import moment from 'moment';
|
|
23
23
|
import * as _ from 'lodash';
|
|
24
24
|
import * as i3 from 'primeng/api';
|
|
25
|
+
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
26
|
+
import * as i3$1 from 'primeng/ripple';
|
|
27
|
+
import { RippleModule } from 'primeng/ripple';
|
|
25
28
|
|
|
26
29
|
class IntelicaLibraryUiComponent {
|
|
27
30
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaLibraryUiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -190,13 +193,13 @@ class SweetAlertService {
|
|
|
190
193
|
html: "",
|
|
191
194
|
};
|
|
192
195
|
messageBox(message) {
|
|
193
|
-
let options =
|
|
196
|
+
let options = structuredClone(this.options);
|
|
194
197
|
options.showCancelButton = false;
|
|
195
198
|
options.text = message;
|
|
196
199
|
return Swal.fire(options);
|
|
197
200
|
}
|
|
198
201
|
messageTextBox(message = "", swHtml = false) {
|
|
199
|
-
let options = this.options;
|
|
202
|
+
let options = structuredClone(this.options);
|
|
200
203
|
options.showCancelButton = false;
|
|
201
204
|
if (!swHtml)
|
|
202
205
|
options.text = message.length === 0 ? "Something went wrong!" : message;
|
|
@@ -205,7 +208,7 @@ class SweetAlertService {
|
|
|
205
208
|
Swal.fire(options);
|
|
206
209
|
}
|
|
207
210
|
confirmBox(message, confirmButtonText, cancelButtonText, title, html, popupClass) {
|
|
208
|
-
let options =
|
|
211
|
+
let options = structuredClone(this.options);
|
|
209
212
|
options.title = title ?? "";
|
|
210
213
|
options.showCancelButton = cancelButtonText == "" ? false : true;
|
|
211
214
|
options.text = message;
|
|
@@ -220,7 +223,7 @@ class SweetAlertService {
|
|
|
220
223
|
return Swal.fire(options);
|
|
221
224
|
}
|
|
222
225
|
messageHTMLBox(title, html, confirmButtonText) {
|
|
223
|
-
let options =
|
|
226
|
+
let options = structuredClone(this.options);
|
|
224
227
|
options.showCancelButton = false;
|
|
225
228
|
options.title = title;
|
|
226
229
|
options.html = html;
|
|
@@ -663,6 +666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
663
666
|
}] } });
|
|
664
667
|
|
|
665
668
|
class PaginatorComponent {
|
|
669
|
+
GlobalTermService = inject(GlobalTermService);
|
|
666
670
|
/**
|
|
667
671
|
* Número total de elementos que se están paginando.
|
|
668
672
|
* @type {number}
|
|
@@ -734,11 +738,11 @@ class PaginatorComponent {
|
|
|
734
738
|
this.EmitPageChange();
|
|
735
739
|
}
|
|
736
740
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
737
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: PaginatorComponent, isStandalone: true, selector: "intelica-paginator", inputs: { TotalItems: "TotalItems", CurrentPage: "CurrentPage", ItemsPerPage: "ItemsPerPage" }, outputs: { PageChange: "PageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} Records</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">Of {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: PositiveNumberDirective, selector: "[positiveNumber]" }] });
|
|
741
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: PaginatorComponent, isStandalone: true, selector: "intelica-paginator", inputs: { TotalItems: "TotalItems", CurrentPage: "CurrentPage", ItemsPerPage: "ItemsPerPage" }, outputs: { PageChange: "PageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} {{ \"Records\" | term : GlobalTermService.languageCode }}</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">{{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$1.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain", "fluid", "label", "icon", "buttonProps"] }, { kind: "directive", type: PositiveNumberDirective, selector: "[positiveNumber]" }, { kind: "pipe", type: TermPipe, name: "term" }] });
|
|
738
742
|
}
|
|
739
743
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
740
744
|
type: Component,
|
|
741
|
-
args: [{ selector: "intelica-paginator", imports: [FormsModule, ButtonModule, PositiveNumberDirective], template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} Records</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">Of {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n" }]
|
|
745
|
+
args: [{ selector: "intelica-paginator", imports: [FormsModule, ButtonModule, PositiveNumberDirective, TermPipe], template: "<div class=\"prPaginator\">\r\n\t<span class=\"prPaginator__info\">{{ TotalItems }} {{ \"Records\" | term : GlobalTermService.languageCode }}</span>\r\n\t<div class=\"prPaginator__controls\">\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--first\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToFirstPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--previous\" [disabled]=\"CurrentPage === 1\" (click)=\"GoToPreviousPage()\"></button>\r\n\t\t<input pInputText type=\"text\" (keydown.enter)=\"$event.preventDefault()\" [(ngModel)]=\"CurrentPage\" positiveNumber class=\"prPaginator__input\" (keyup.enter)=\"onKeyUp($event)\" />\r\n\t\t<span class=\"prPaginator__total\">{{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalPages }}</span>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--next\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToNextPage()\"></button>\r\n\t\t<button pButton type=\"button\" class=\"prPaginator__btn prPaginator__btn--last\" [disabled]=\"CurrentPage === TotalPages\" (click)=\"GoToLastPage()\"></button>\r\n\t</div>\r\n</div>\r\n" }]
|
|
742
746
|
}], propDecorators: { TotalItems: [{
|
|
743
747
|
type: Input
|
|
744
748
|
}], CurrentPage: [{
|
|
@@ -1469,11 +1473,11 @@ class TableComponent {
|
|
|
1469
1473
|
this.EmmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
1470
1474
|
}
|
|
1471
1475
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1472
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier" }, outputs: { EmmitSelectedItem: "EmmitSelectedItem" }, queries: [{ propertyName: "Columns", predicate: ColumnComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\"
|
|
1476
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier" }, outputs: { EmmitSelectedItem: "EmmitSelectedItem" }, queries: [{ propertyName: "Columns", predicate: ColumnComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">{{ col.header }}</span>\r\n\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngIf=\"ShowCheckbox\" class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" [ngClass]=\"{ 'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length }\" />\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\">\r\n\t\t\t\t\t<ng-container *ngIf=\"col.showIndex; else columnContent\">\r\n\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<ng-template #columnContent>\r\n\t\t\t\t\t\t<ng-container *ngIf=\"col.templateRef; else defaultContent\">\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #defaultContent>\r\n\t\t\t\t\t\t\t<span pTooltip=\"{{ rowData[col.tooltip] }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngIf=\"ShowCheckbox\" class=\"text-center\">\r\n\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$2.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$2.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$2.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$2.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$2.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
1473
1477
|
}
|
|
1474
1478
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
1475
1479
|
type: Component,
|
|
1476
|
-
args: [{ selector: "intelica-table", standalone: true, imports: [CommonModule, SearchComponent, PaginatorComponent, TableModule, BadgeModule, Popover, ColumnComponent, TooltipModule], template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\"
|
|
1480
|
+
args: [{ selector: "intelica-table", standalone: true, imports: [CommonModule, SearchComponent, PaginatorComponent, TableModule, BadgeModule, Popover, ColumnComponent, TooltipModule], template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<intelica-search\r\n\t\t\t#searchTable\r\n\t\t\t*ngIf=\"ShowSearch\"\r\n\t\t\t[ComponentId]=\"ComponentId + 'Search'\"\r\n\t\t\t(OnSearch)=\"ExecuteSearch($event)\"\r\n\t\t\t[SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n\t\t\t[SearchOnKeyup]=\"false\"\r\n\t\t\t[SimpleSearchInput]=\"false\"\r\n\t\t></intelica-search>\r\n\t\t<intelica-paginator #paginatorTable *ngIf=\"ShowPagination\" [TotalItems]=\"ListDataFilter.length\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t>\r\n\t\t<!-- Encabezados -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th *ngFor=\"let col of ColumnList\" [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" (click)=\"OnSort(col.field)\">\r\n\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">{{ col.header }}</span>\r\n\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t</th>\r\n\t\t\t\t<th *ngIf=\"ShowCheckbox\" class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" [ngClass]=\"{ 'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length }\" />\r\n\t\t\t\t</th>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\">\r\n\t\t\t\t\t<ng-container *ngIf=\"col.showIndex; else columnContent\">\r\n\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t<ng-template #columnContent>\r\n\t\t\t\t\t\t<ng-container *ngIf=\"col.templateRef; else defaultContent\">\r\n\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #defaultContent>\r\n\t\t\t\t\t\t\t<span pTooltip=\"{{ rowData[col.tooltip] }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</td>\r\n\t\t\t\t<td *ngIf=\"ShowCheckbox\" class=\"text-center\">\r\n\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n</div>\r\n" }]
|
|
1477
1481
|
}], ctorParameters: () => [], propDecorators: { ComponentId: [{
|
|
1478
1482
|
type: Input
|
|
1479
1483
|
}], ListData: [{
|
|
@@ -1505,9 +1509,302 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
1505
1509
|
args: [ColumnComponent]
|
|
1506
1510
|
}] } });
|
|
1507
1511
|
|
|
1512
|
+
class ActionDirective {
|
|
1513
|
+
/**
|
|
1514
|
+
* Nombre de la acción.
|
|
1515
|
+
* @type {string}
|
|
1516
|
+
*/
|
|
1517
|
+
name = "";
|
|
1518
|
+
/**
|
|
1519
|
+
* Indica si los botones asociados a la acción deben ocultarse.
|
|
1520
|
+
* @type {boolean}
|
|
1521
|
+
* @default false
|
|
1522
|
+
*/
|
|
1523
|
+
hideButtons = false;
|
|
1524
|
+
/**
|
|
1525
|
+
* Texto que se mostrará en el botón de aplicar.
|
|
1526
|
+
* @type {string}
|
|
1527
|
+
* @default 'Apply'
|
|
1528
|
+
*/
|
|
1529
|
+
textApply = "Apply";
|
|
1530
|
+
/**
|
|
1531
|
+
* Texto que se mostrará en el botón de cancelar.
|
|
1532
|
+
* @type {string}
|
|
1533
|
+
* @default 'Clear'
|
|
1534
|
+
*/
|
|
1535
|
+
textCancel = "Clear";
|
|
1536
|
+
/**
|
|
1537
|
+
* Indica si detener la propagación de eventos al hacer clic en la acción.
|
|
1538
|
+
* @type {boolean}
|
|
1539
|
+
* @default false
|
|
1540
|
+
*/
|
|
1541
|
+
stopPropagation = false;
|
|
1542
|
+
/**
|
|
1543
|
+
* Evento emitido cuando se aplica la acción.
|
|
1544
|
+
* @type {EventEmitter<any>}
|
|
1545
|
+
*/
|
|
1546
|
+
onApply = new EventEmitter();
|
|
1547
|
+
/**
|
|
1548
|
+
* Evento emitido cuando se cancela la acción.
|
|
1549
|
+
* @type {EventEmitter<any>}
|
|
1550
|
+
*/
|
|
1551
|
+
onCancel = new EventEmitter();
|
|
1552
|
+
/**
|
|
1553
|
+
* Evento emitido cuando se hace clic en la acción.
|
|
1554
|
+
* @type {EventEmitter<any>}
|
|
1555
|
+
*/
|
|
1556
|
+
onClick = new EventEmitter();
|
|
1557
|
+
/**
|
|
1558
|
+
* Referencia al contenido proporcionado por la plantilla.
|
|
1559
|
+
* @type {any}
|
|
1560
|
+
*/
|
|
1561
|
+
template;
|
|
1562
|
+
/**
|
|
1563
|
+
* Indica si la acción está activa o no.
|
|
1564
|
+
* @type {boolean}
|
|
1565
|
+
* @default false
|
|
1566
|
+
*/
|
|
1567
|
+
active = false;
|
|
1568
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1569
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: ActionDirective, isStandalone: true, selector: "action", inputs: { name: "name", hideButtons: "hideButtons", textApply: "textApply", textCancel: "textCancel", stopPropagation: "stopPropagation" }, outputs: { onApply: "onApply", onCancel: "onCancel", onClick: "onClick" }, queries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true }], ngImport: i0 });
|
|
1570
|
+
}
|
|
1571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ActionDirective, decorators: [{
|
|
1572
|
+
type: Directive,
|
|
1573
|
+
args: [{
|
|
1574
|
+
selector: "action",
|
|
1575
|
+
}]
|
|
1576
|
+
}], propDecorators: { name: [{
|
|
1577
|
+
type: Input
|
|
1578
|
+
}], hideButtons: [{
|
|
1579
|
+
type: Input
|
|
1580
|
+
}], textApply: [{
|
|
1581
|
+
type: Input
|
|
1582
|
+
}], textCancel: [{
|
|
1583
|
+
type: Input
|
|
1584
|
+
}], stopPropagation: [{
|
|
1585
|
+
type: Input
|
|
1586
|
+
}], onApply: [{
|
|
1587
|
+
type: Output
|
|
1588
|
+
}], onCancel: [{
|
|
1589
|
+
type: Output
|
|
1590
|
+
}], onClick: [{
|
|
1591
|
+
type: Output
|
|
1592
|
+
}], template: [{
|
|
1593
|
+
type: ContentChild,
|
|
1594
|
+
args: ["template"]
|
|
1595
|
+
}] } });
|
|
1596
|
+
|
|
1597
|
+
class ActionsMenuComponent {
|
|
1598
|
+
termPipe;
|
|
1599
|
+
GlobalTermService = inject(GlobalTermService);
|
|
1600
|
+
Popover;
|
|
1601
|
+
MenuButton;
|
|
1602
|
+
PopoverContainer;
|
|
1603
|
+
IsPopoverOpen = false;
|
|
1604
|
+
IsClickInsideDatepicker = false;
|
|
1605
|
+
/**
|
|
1606
|
+
* Indica si el menú de acciones está visible o no.
|
|
1607
|
+
* @type {boolean}
|
|
1608
|
+
* @default false
|
|
1609
|
+
*/
|
|
1610
|
+
ShowActionsMenu = false;
|
|
1611
|
+
/**
|
|
1612
|
+
* Indica si la sección de selección de acciones está visible o no.
|
|
1613
|
+
* @type {boolean}
|
|
1614
|
+
* @default false
|
|
1615
|
+
*/
|
|
1616
|
+
ShowSelectActions = false;
|
|
1617
|
+
constructor(termPipe) {
|
|
1618
|
+
this.termPipe = termPipe;
|
|
1619
|
+
}
|
|
1620
|
+
ngOnInit() {
|
|
1621
|
+
// const specificRegex = /local.*filt|filt.*local/i;
|
|
1622
|
+
// const generalRegex = /filt/i;
|
|
1623
|
+
// const specificResults = this.actions.filter(action => specificRegex.test(action.name));
|
|
1624
|
+
// if (specificResults.length === 0) {
|
|
1625
|
+
// const generalResults = this.actions.filter(action => generalRegex.test(action.name));
|
|
1626
|
+
// generalResults.forEach(action => this.showTemplate(action));
|
|
1627
|
+
// } else {
|
|
1628
|
+
// specificResults.forEach(action => this.showTemplate(action));
|
|
1629
|
+
// }
|
|
1630
|
+
}
|
|
1631
|
+
openPopover() {
|
|
1632
|
+
this.IsPopoverOpen = true;
|
|
1633
|
+
// Cambia el estado de visibilidad del menú de acciones.
|
|
1634
|
+
this.ShowActionsMenu = true;
|
|
1635
|
+
// Muestra u oculta el menú de selección de acciones.
|
|
1636
|
+
this.ShowSelectActions = true;
|
|
1637
|
+
this.Popover.nativeElement.style.display = "block";
|
|
1638
|
+
this.MenuButton.nativeElement.classList.add("active");
|
|
1639
|
+
this.PopoverContainer.nativeElement.classList.add("backdrop-visible");
|
|
1640
|
+
}
|
|
1641
|
+
closePopover() {
|
|
1642
|
+
this.IsPopoverOpen = false;
|
|
1643
|
+
// Cambia el estado de visibilidad del menú de acciones.
|
|
1644
|
+
this.ShowActionsMenu = false;
|
|
1645
|
+
// Muestra u oculta el menú de selección de acciones.
|
|
1646
|
+
this.ShowSelectActions = true;
|
|
1647
|
+
this.Popover.nativeElement.style.display = "none";
|
|
1648
|
+
this.MenuButton.nativeElement.classList.remove("active");
|
|
1649
|
+
this.PopoverContainer.nativeElement.classList.remove("backdrop-visible");
|
|
1650
|
+
}
|
|
1651
|
+
/** Método para alternar el estado del popover */
|
|
1652
|
+
togglePopover(event) {
|
|
1653
|
+
this.IsPopoverOpen ? this.closePopover() : this.openPopover();
|
|
1654
|
+
// Desactiva todas las acciones dentro del menú.
|
|
1655
|
+
this.actions.forEach(action => {
|
|
1656
|
+
action.active = false;
|
|
1657
|
+
});
|
|
1658
|
+
}
|
|
1659
|
+
onMouseDown(event) {
|
|
1660
|
+
const target = event.target;
|
|
1661
|
+
if (target.closest(".p-datepicker") || target.closest(".p-inputtext") || target.closest(".p-select-panel") || target.closest(".p-multiselect-panel")) {
|
|
1662
|
+
this.IsClickInsideDatepicker = true;
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
onMouseDownOutsideBody(event) {
|
|
1666
|
+
const target = event.target;
|
|
1667
|
+
if (target.closest(".p-datepicker") || target.closest(".p-inputtext") || target.closest(".p-select-panel") || target.closest(".p-multiselect-panel")) {
|
|
1668
|
+
this.IsClickInsideDatepicker = true;
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
onMouseUp(event) {
|
|
1672
|
+
setTimeout(() => {
|
|
1673
|
+
this.IsClickInsideDatepicker = false;
|
|
1674
|
+
}, 100);
|
|
1675
|
+
}
|
|
1676
|
+
closeAll(event) {
|
|
1677
|
+
if (!event)
|
|
1678
|
+
return;
|
|
1679
|
+
const target = event.target;
|
|
1680
|
+
const allowedClasses = [
|
|
1681
|
+
"prSelect",
|
|
1682
|
+
"p-select-option-selected",
|
|
1683
|
+
"p-select-option",
|
|
1684
|
+
"p-datepicker-panel",
|
|
1685
|
+
"p-datepicker-select-month",
|
|
1686
|
+
"p-button-text",
|
|
1687
|
+
"p-datepicker-select-year",
|
|
1688
|
+
"p-datepicker-month",
|
|
1689
|
+
"p-datepicker-year",
|
|
1690
|
+
"p-checkbox-input",
|
|
1691
|
+
"p-multiselect-option",
|
|
1692
|
+
"p-multiselect-filter",
|
|
1693
|
+
"p-multiselect-empty-message",
|
|
1694
|
+
"p-inputicon",
|
|
1695
|
+
"p-tree-node-selected",
|
|
1696
|
+
"p-tree-node-content",
|
|
1697
|
+
"p-multiselect-header",
|
|
1698
|
+
"grButton--icon-close-modal",
|
|
1699
|
+
"p-overlay-mask",
|
|
1700
|
+
"p-select-clear-icon",
|
|
1701
|
+
"formRowInputClear",
|
|
1702
|
+
"icon-times",
|
|
1703
|
+
"p-select-empty-message",
|
|
1704
|
+
"p-select-list",
|
|
1705
|
+
"p-iconfield",
|
|
1706
|
+
"p-inputtext",
|
|
1707
|
+
"p-select-header",
|
|
1708
|
+
"p-overlay",
|
|
1709
|
+
"p-select-filter",
|
|
1710
|
+
"p-overlay-content",
|
|
1711
|
+
"p-select-overlay",
|
|
1712
|
+
"p-select-panel",
|
|
1713
|
+
"p-multiselect-panel",
|
|
1714
|
+
];
|
|
1715
|
+
if (this.IsClickInsideDatepicker) {
|
|
1716
|
+
return;
|
|
1717
|
+
}
|
|
1718
|
+
if (allowedClasses.some(className => target.closest(`.${className}`))) {
|
|
1719
|
+
return;
|
|
1720
|
+
}
|
|
1721
|
+
if (this.Popover && !this.Popover.nativeElement.contains(target) && this.MenuButton && !this.MenuButton.nativeElement.contains(target)) {
|
|
1722
|
+
this.closePopover();
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Directiva que representa una colección de elementos hijos del tipo `ActionDirective`.
|
|
1727
|
+
* Se utiliza para acceder a las instancias de la directiva `ActionDirective` dentro de un componente.
|
|
1728
|
+
* @type {QueryList<ActionDirective>}
|
|
1729
|
+
*/
|
|
1730
|
+
actions;
|
|
1731
|
+
/**
|
|
1732
|
+
* Muestra la plantilla asociada a una acción si se proporciona un manejador de eventos `onClick`.
|
|
1733
|
+
* - Emite el evento `onClick` de la acción si está definido.
|
|
1734
|
+
* - Detiene la propagación del evento si la propiedad `stopPropagation` de la acción está establecida.
|
|
1735
|
+
* - Activa la acción.
|
|
1736
|
+
* - Oculta el menú de selección de acciones si se cumplen ciertas condiciones.
|
|
1737
|
+
*
|
|
1738
|
+
* @param {ActionDirective} action - La acción para la cual mostrar la plantilla.
|
|
1739
|
+
*/
|
|
1740
|
+
showTemplate(action) {
|
|
1741
|
+
// Emite el evento onClick de la acción si está definido.
|
|
1742
|
+
if (action.onClick) {
|
|
1743
|
+
action.onClick.emit();
|
|
1744
|
+
}
|
|
1745
|
+
// Detiene la propagación del evento si la propiedad stopPropagation de la acción está establecida.
|
|
1746
|
+
if (action.stopPropagation) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
// Activa la acción.
|
|
1750
|
+
action.active = true;
|
|
1751
|
+
// Oculta el menú de selección de acciones si se cumplen ciertas condiciones.
|
|
1752
|
+
if (action.active) {
|
|
1753
|
+
// || this.showRecordsPerPage || this.showSorting) {
|
|
1754
|
+
this.ShowSelectActions = false;
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Restablece el estado de una acción y muestra el menú de selección de acciones.
|
|
1759
|
+
* - Desactiva la acción proporcionada.
|
|
1760
|
+
* - Muestra el menú de acciones.
|
|
1761
|
+
* - Muestra el menú de selección de acciones.
|
|
1762
|
+
*
|
|
1763
|
+
* @param {ActionDirective} action - La acción que se va a restablecer.
|
|
1764
|
+
*/
|
|
1765
|
+
returnSelectActions(action) {
|
|
1766
|
+
// Desactiva la acción proporcionada.
|
|
1767
|
+
action.active = false;
|
|
1768
|
+
// Muestra el menú de acciones.
|
|
1769
|
+
this.ShowActionsMenu = true;
|
|
1770
|
+
// Muestra el menú de selección de acciones.
|
|
1771
|
+
this.ShowSelectActions = true;
|
|
1772
|
+
}
|
|
1773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ActionsMenuComponent, deps: [{ token: TermPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
1774
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: ActionsMenuComponent, isStandalone: true, selector: "intelica-actions-menu", host: { listeners: { "mousedown": "onMouseDown($event)", "window:mousedown": "onMouseDownOutsideBody($event)", "mouseup": "onMouseUp($event)", "document:click": "closeAll($event)" } }, queries: [{ propertyName: "actions", predicate: ActionDirective }], 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=\"grMenuAction\" (click)=\"togglePopover($event)\">\r\n\t\t<i class=\"icon icon-bars\"></i>\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>{{ \"SelectAction\" | 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\">\r\n\t\t\t\t<button pRipple class=\"grButtonActions\" *ngFor=\"let item of actions; let $index = index\" (click)=\"showTemplate(item)\">\r\n\t\t\t\t\t<span class=\"formRowInputNumber\">{{ $index + 1 }}</span>\r\n\t\t\t\t\t<span class=\"grButtonActionName\">{{ item.name | term : GlobalTermService.languageCode }}</span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<!-- Sub Men\u00FA -->\r\n\t\t<div class=\"grPopoverSubMenu\" [ngClass]=\"{ hidden: !item.active }\" *ngFor=\"let item of actions\">\r\n\t\t\t<div class=\"grPopoverHeader\">\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t<button class=\"backButton\" (click)=\"returnSelectActions(item)\">\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<span>{{ item.name | 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\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"item.template\"></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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "directive", type: i3$1.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: TermPipe, name: "term" }] });
|
|
1775
|
+
}
|
|
1776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ActionsMenuComponent, decorators: [{
|
|
1777
|
+
type: Component,
|
|
1778
|
+
args: [{ selector: "intelica-actions-menu", imports: [ButtonModule, InputGroupAddonModule, CommonModule, RippleModule, TermPipe], template: "<div #popoverContainer class=\"grPopoverContainer\">\r\n\t<button #menuButton class=\"grMenuAction\" (click)=\"togglePopover($event)\">\r\n\t\t<i class=\"icon icon-bars\"></i>\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>{{ \"SelectAction\" | 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\">\r\n\t\t\t\t<button pRipple class=\"grButtonActions\" *ngFor=\"let item of actions; let $index = index\" (click)=\"showTemplate(item)\">\r\n\t\t\t\t\t<span class=\"formRowInputNumber\">{{ $index + 1 }}</span>\r\n\t\t\t\t\t<span class=\"grButtonActionName\">{{ item.name | term : GlobalTermService.languageCode }}</span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<!-- Sub Men\u00FA -->\r\n\t\t<div class=\"grPopoverSubMenu\" [ngClass]=\"{ hidden: !item.active }\" *ngFor=\"let item of actions\">\r\n\t\t\t<div class=\"grPopoverHeader\">\r\n\t\t\t\t<h3>\r\n\t\t\t\t\t<button class=\"backButton\" (click)=\"returnSelectActions(item)\">\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<span>{{ item.name | 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\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"item.template\"></ng-container>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n" }]
|
|
1779
|
+
}], ctorParameters: () => [{ type: TermPipe }], propDecorators: { Popover: [{
|
|
1780
|
+
type: ViewChild,
|
|
1781
|
+
args: ["popover"]
|
|
1782
|
+
}], MenuButton: [{
|
|
1783
|
+
type: ViewChild,
|
|
1784
|
+
args: ["menuButton"]
|
|
1785
|
+
}], PopoverContainer: [{
|
|
1786
|
+
type: ViewChild,
|
|
1787
|
+
args: ["popoverContainer"]
|
|
1788
|
+
}], onMouseDown: [{
|
|
1789
|
+
type: HostListener,
|
|
1790
|
+
args: ["mousedown", ["$event"]]
|
|
1791
|
+
}], onMouseDownOutsideBody: [{
|
|
1792
|
+
type: HostListener,
|
|
1793
|
+
args: ["window:mousedown", ["$event"]]
|
|
1794
|
+
}], onMouseUp: [{
|
|
1795
|
+
type: HostListener,
|
|
1796
|
+
args: ["mouseup", ["$event"]]
|
|
1797
|
+
}], closeAll: [{
|
|
1798
|
+
type: HostListener,
|
|
1799
|
+
args: ["document:click", ["$event"]]
|
|
1800
|
+
}], actions: [{
|
|
1801
|
+
type: ContentChildren,
|
|
1802
|
+
args: [ActionDirective]
|
|
1803
|
+
}] } });
|
|
1804
|
+
|
|
1508
1805
|
/**
|
|
1509
1806
|
* Generated bundle index. Do not edit.
|
|
1510
1807
|
*/
|
|
1511
1808
|
|
|
1512
|
-
export { ColumnComponent, ConfigService, CookieAttributesGeneral, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, InitializeConfigService, IntelicaLibraryUiComponent, LanguageService, RefreshTokenInterceptor, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermPipe, TermService };
|
|
1809
|
+
export { ActionDirective, ActionsMenuComponent, ColumnComponent, ConfigService, CookieAttributesGeneral, ErrorInterceptor, FeatureFlagService, GlobalFeatureFlagService, GlobalTermService, InitializeConfigService, IntelicaLibraryUiComponent, LanguageService, RefreshTokenInterceptor, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TermPipe, TermService };
|
|
1513
1810
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|