intelica-library-ui 0.1.126 → 0.1.128
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.
|
@@ -3461,6 +3461,195 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
3461
3461
|
args: [DataDirective]
|
|
3462
3462
|
}] } });
|
|
3463
3463
|
|
|
3464
|
+
class TableFetchComponent {
|
|
3465
|
+
GlobalTermService = inject(GlobalTermService);
|
|
3466
|
+
ComponentId = "";
|
|
3467
|
+
ShowRowPerPage = true;
|
|
3468
|
+
ShowSearch = false;
|
|
3469
|
+
ListSearchOptions = [];
|
|
3470
|
+
ShowPagination = false;
|
|
3471
|
+
RowsPerPage = 10;
|
|
3472
|
+
ShowCheckbox = false;
|
|
3473
|
+
ShowIndex = false;
|
|
3474
|
+
ShowSearchTooltip = false;
|
|
3475
|
+
ClassName = "";
|
|
3476
|
+
DefaultSortField = "";
|
|
3477
|
+
AllowedPageSizes = [10, 25, 50, 100];
|
|
3478
|
+
Levels = [];
|
|
3479
|
+
FilteredList = [];
|
|
3480
|
+
TotalItems = 0;
|
|
3481
|
+
TotalRecords = 0;
|
|
3482
|
+
EmitQueryParametersChange = new EventEmitter();
|
|
3483
|
+
PaginatorTable;
|
|
3484
|
+
SearchTable;
|
|
3485
|
+
Columns;
|
|
3486
|
+
ColumnGroups;
|
|
3487
|
+
RowResumenGroups;
|
|
3488
|
+
AdditionalTemplate;
|
|
3489
|
+
AdditionalCentralTemplate;
|
|
3490
|
+
EmitSortEvent = new EventEmitter();
|
|
3491
|
+
ColumnList = [];
|
|
3492
|
+
ColumnGroupList = [];
|
|
3493
|
+
RowResumenList = [];
|
|
3494
|
+
SearchInput = {};
|
|
3495
|
+
CurrentPage = 1;
|
|
3496
|
+
SortOrder = 1;
|
|
3497
|
+
SortField = null;
|
|
3498
|
+
ListSearchOptionsSimple = [];
|
|
3499
|
+
MaxLevel = 0;
|
|
3500
|
+
ListDataTable = [];
|
|
3501
|
+
ngOnChanges(changes) {
|
|
3502
|
+
this.LoadSearchOptions();
|
|
3503
|
+
if (changes["FilteredList"] || changes["RowsPerPage"] || changes["CurrentPage"]) {
|
|
3504
|
+
this.UpdatePages();
|
|
3505
|
+
}
|
|
3506
|
+
if (changes["sortField"] || changes["SortOrder"]) {
|
|
3507
|
+
this.EmitSortEvent.emit([{ sortOrder: this.SortOrder, sortField: this.SortField?.toString() ?? "" }]);
|
|
3508
|
+
}
|
|
3509
|
+
}
|
|
3510
|
+
ngAfterContentInit() {
|
|
3511
|
+
this.ColumnList = this.Columns.toArray();
|
|
3512
|
+
this.ColumnGroupList = this.ColumnGroups.toArray();
|
|
3513
|
+
this.RowResumenList = this.RowResumenGroups.toArray();
|
|
3514
|
+
this.MaxLevel = Math.max(...this.ColumnGroupList.map(c => c.level)) + 1;
|
|
3515
|
+
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
3516
|
+
}
|
|
3517
|
+
LoadSearchOptions() {
|
|
3518
|
+
this.ListSearchOptionsSimple = this.ListSearchOptions.map(item => ({
|
|
3519
|
+
id: item.id,
|
|
3520
|
+
value: item.name,
|
|
3521
|
+
}));
|
|
3522
|
+
}
|
|
3523
|
+
OnSort(field) {
|
|
3524
|
+
if (this.SortField === field) {
|
|
3525
|
+
this.SortOrder *= -1;
|
|
3526
|
+
}
|
|
3527
|
+
else {
|
|
3528
|
+
this.SortField = field;
|
|
3529
|
+
this.SortOrder = 1;
|
|
3530
|
+
}
|
|
3531
|
+
this.ExecuteSearch({});
|
|
3532
|
+
}
|
|
3533
|
+
UpdatePages() {
|
|
3534
|
+
if (this.ShowPagination) {
|
|
3535
|
+
if (this.SearchInput.searchText != "" && this.SearchInput.searchText != undefined) {
|
|
3536
|
+
this.TotalRecords = this.FilteredList.length;
|
|
3537
|
+
}
|
|
3538
|
+
else {
|
|
3539
|
+
this.TotalRecords = this.TotalItems;
|
|
3540
|
+
}
|
|
3541
|
+
const start = (this.CurrentPage - 1) * this.RowsPerPage;
|
|
3542
|
+
const end = start + this.RowsPerPage;
|
|
3543
|
+
this.ListDataTable = this.FilteredList.slice(start, end);
|
|
3544
|
+
}
|
|
3545
|
+
else {
|
|
3546
|
+
this.ListDataTable = this.FilteredList;
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
OnPageChange(pageIndex) {
|
|
3550
|
+
this.CurrentPage = pageIndex;
|
|
3551
|
+
this.ExecuteSearch({});
|
|
3552
|
+
}
|
|
3553
|
+
ResetTable() {
|
|
3554
|
+
if (this.PaginatorTable) {
|
|
3555
|
+
this.PaginatorTable.CurrentPage = 1;
|
|
3556
|
+
this.CurrentPage = 1;
|
|
3557
|
+
}
|
|
3558
|
+
if (this.SearchTable) {
|
|
3559
|
+
this.SearchTable.ClearSearchText();
|
|
3560
|
+
this.SearchInput.fieldText = "";
|
|
3561
|
+
}
|
|
3562
|
+
this.ExecuteSearch({});
|
|
3563
|
+
}
|
|
3564
|
+
ExecuteSearch(event) {
|
|
3565
|
+
if (event?.fieldText !== undefined && event?.fieldText !== "") {
|
|
3566
|
+
this.SearchInput = event;
|
|
3567
|
+
}
|
|
3568
|
+
const field = this.ListSearchOptions.find(item => item.id === this.SearchInput.fieldId)?.field;
|
|
3569
|
+
const newQueryParameters = {
|
|
3570
|
+
FilterBy: field || undefined,
|
|
3571
|
+
FilterValue: this.SearchInput.searchText?.trim(),
|
|
3572
|
+
FilterOperator: this.SearchInput.operatorId?.toString(),
|
|
3573
|
+
OrderBy: this.SortField ? String(this.SortField) : undefined,
|
|
3574
|
+
SortDirection: this.SortOrder === 1 ? "asc" : "desc",
|
|
3575
|
+
PageNumber: this.CurrentPage,
|
|
3576
|
+
PageSize: this.RowsPerPage,
|
|
3577
|
+
};
|
|
3578
|
+
this.EmitQueryParametersChange.emit(newQueryParameters);
|
|
3579
|
+
this.UpdatePages();
|
|
3580
|
+
}
|
|
3581
|
+
OnRowsPerPageChange(value) {
|
|
3582
|
+
this.RowsPerPage = value;
|
|
3583
|
+
this.CurrentPage = 1;
|
|
3584
|
+
this.ExecuteSearch({});
|
|
3585
|
+
}
|
|
3586
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableFetchComponent, isStandalone: true, selector: "intelica-table-fetch", inputs: { ComponentId: "ComponentId", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ClassName: "ClassName", DefaultSortField: "DefaultSortField", AllowedPageSizes: "AllowedPageSizes", FilteredList: "FilteredList", TotalItems: "TotalItems", CurrentPage: "CurrentPage", SortOrder: "SortOrder", SortField: "SortField" }, outputs: { EmitQueryParametersChange: "EmitQueryParametersChange", EmitSortEvent: "EmitSortEvent" }, queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], 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 <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n }\r\n\r\n @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } }\r\n\r\n @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } }\r\n @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n } @else {\r\n <span class=\"text-breakWord\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n {{ rowData[col.field] }}\r\n </span>\r\n } }\r\n </td>\r\n }\r\n\r\n @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n\t\t\t<div class=\"prTableToolsBottom__itemPerPage\">\r\n\t\t\t\t{{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t<p-select [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t<label for=\"pageSize\" class=\"control-label\">\r\n\t\t\t\t\t{{ 1 + RowsPerPage * (CurrentPage - 1) }} - {{ CurrentPage * RowsPerPage >= TotalRecords ? TotalRecords : CurrentPage * RowsPerPage }} {{ \"Of\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t\t{{ TotalRecords }} {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t</label>\r\n\t\t\t</div>\r\n\t\t\t} @if (ShowPagination) {\r\n\t\t\t<intelica-paginator #paginatorTable [TotalItems]=\"TotalRecords\" [CurrentPage]=\"CurrentPage\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t\t\t}\r\n </div>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.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$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { 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"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { 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: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }] });
|
|
3588
|
+
}
|
|
3589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, decorators: [{
|
|
3590
|
+
type: Component,
|
|
3591
|
+
args: [{ selector: "intelica-table-fetch", standalone: true, imports: [CommonModule, TableModule, Select, BadgeModule, TooltipModule, TermPipe, CheckboxModule, FormsModule, SearchComponent, PaginatorComponent], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n }\r\n\r\n @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } }\r\n\r\n @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } }\r\n @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n } @else {\r\n <span class=\"text-breakWord\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n {{ rowData[col.field] }}\r\n </span>\r\n } }\r\n </td>\r\n }\r\n\r\n @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n\t\t\t<div class=\"prTableToolsBottom__itemPerPage\">\r\n\t\t\t\t{{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t<p-select [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t<label for=\"pageSize\" class=\"control-label\">\r\n\t\t\t\t\t{{ 1 + RowsPerPage * (CurrentPage - 1) }} - {{ CurrentPage * RowsPerPage >= TotalRecords ? TotalRecords : CurrentPage * RowsPerPage }} {{ \"Of\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t\t{{ TotalRecords }} {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t</label>\r\n\t\t\t</div>\r\n\t\t\t} @if (ShowPagination) {\r\n\t\t\t<intelica-paginator #paginatorTable [TotalItems]=\"TotalRecords\" [CurrentPage]=\"CurrentPage\" [ItemsPerPage]=\"RowsPerPage\" (PageChange)=\"OnPageChange($event)\"></intelica-paginator>\r\n\t\t\t}\r\n </div>\r\n</div>" }]
|
|
3592
|
+
}], propDecorators: { ComponentId: [{
|
|
3593
|
+
type: Input
|
|
3594
|
+
}], ShowRowPerPage: [{
|
|
3595
|
+
type: Input
|
|
3596
|
+
}], ShowSearch: [{
|
|
3597
|
+
type: Input
|
|
3598
|
+
}], ListSearchOptions: [{
|
|
3599
|
+
type: Input
|
|
3600
|
+
}], ShowPagination: [{
|
|
3601
|
+
type: Input
|
|
3602
|
+
}], RowsPerPage: [{
|
|
3603
|
+
type: Input
|
|
3604
|
+
}], ShowCheckbox: [{
|
|
3605
|
+
type: Input
|
|
3606
|
+
}], ShowIndex: [{
|
|
3607
|
+
type: Input
|
|
3608
|
+
}], ShowSearchTooltip: [{
|
|
3609
|
+
type: Input
|
|
3610
|
+
}], ClassName: [{
|
|
3611
|
+
type: Input
|
|
3612
|
+
}], DefaultSortField: [{
|
|
3613
|
+
type: Input
|
|
3614
|
+
}], AllowedPageSizes: [{
|
|
3615
|
+
type: Input
|
|
3616
|
+
}], FilteredList: [{
|
|
3617
|
+
type: Input
|
|
3618
|
+
}], TotalItems: [{
|
|
3619
|
+
type: Input
|
|
3620
|
+
}], EmitQueryParametersChange: [{
|
|
3621
|
+
type: Output
|
|
3622
|
+
}], PaginatorTable: [{
|
|
3623
|
+
type: ViewChild,
|
|
3624
|
+
args: ["paginatorTable"]
|
|
3625
|
+
}], SearchTable: [{
|
|
3626
|
+
type: ViewChild,
|
|
3627
|
+
args: ["searchTable"]
|
|
3628
|
+
}], Columns: [{
|
|
3629
|
+
type: ContentChildren,
|
|
3630
|
+
args: [ColumnComponent]
|
|
3631
|
+
}], ColumnGroups: [{
|
|
3632
|
+
type: ContentChildren,
|
|
3633
|
+
args: [ColumnGroupComponent]
|
|
3634
|
+
}], RowResumenGroups: [{
|
|
3635
|
+
type: ContentChildren,
|
|
3636
|
+
args: [RowResumenComponent]
|
|
3637
|
+
}], AdditionalTemplate: [{
|
|
3638
|
+
type: ContentChild,
|
|
3639
|
+
args: ["additionalTemplate"]
|
|
3640
|
+
}], AdditionalCentralTemplate: [{
|
|
3641
|
+
type: ContentChild,
|
|
3642
|
+
args: ["additionalCentralTemplate"]
|
|
3643
|
+
}], EmitSortEvent: [{
|
|
3644
|
+
type: Output
|
|
3645
|
+
}], CurrentPage: [{
|
|
3646
|
+
type: Input
|
|
3647
|
+
}], SortOrder: [{
|
|
3648
|
+
type: Input
|
|
3649
|
+
}], SortField: [{
|
|
3650
|
+
type: Input
|
|
3651
|
+
}] } });
|
|
3652
|
+
|
|
3464
3653
|
class HtmlToExcelService {
|
|
3465
3654
|
ExportTOExcel(idTabla, html, filename, tabname, extension) {
|
|
3466
3655
|
let Table = document.getElementById(idTabla);
|
|
@@ -6721,5 +6910,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
6721
6910
|
* Generated bundle index. Do not edit.
|
|
6722
6911
|
*/
|
|
6723
6912
|
|
|
6724
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RouteGuard, RowResumenComponent, SearchComponent, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
6913
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DynamicInputValidation, EchartComponent, EchartService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RouteGuard, RowResumenComponent, SearchComponent, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TemplateMenuComponent, TermGuard, TermPipe, TermService, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
6725
6914
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|