intelica-library-ui 0.1.177 → 0.1.179
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 +295 -56
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/components/matrix-table/column.component.d.ts +4 -1
- package/lib/components/table/column.component.d.ts +4 -1
- package/lib/components/table/table.component.d.ts +19 -2
- package/lib/components/table-fetch/table-fetch.component.d.ts +3 -0
- package/lib/components/tree-table/tree-table.component.d.ts +3 -0
- package/lib/directives/table/cell-checkbox.directive.d.ts +12 -0
- package/lib/services/echart.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, signal, Pipe, Component, HostListener, Directive, EventEmitter, Output, Input, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, PLATFORM_ID, Inject } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, signal, Pipe, Component, HostListener, Directive, EventEmitter, Output, Input, forwardRef, TemplateRef, ContentChild, ContentChildren, ViewChild, PLATFORM_ID, Inject, Optional, Host } from '@angular/core';
|
|
3
3
|
import { getCookie, Cookies, setCookie } from 'typescript-cookie';
|
|
4
4
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription, of, tap, map } from 'rxjs';
|
|
@@ -1728,9 +1728,9 @@ class ColumnGroupComponent {
|
|
|
1728
1728
|
sortable = false;
|
|
1729
1729
|
width;
|
|
1730
1730
|
minWidth;
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1731
|
+
className;
|
|
1732
|
+
headerTooltip = "";
|
|
1733
|
+
headerTooltipPosition = "top";
|
|
1734
1734
|
// @Input() tooltip: string = "";
|
|
1735
1735
|
// @Input() tooltipPosition: "top" | "bottom" | "left" | "right" = "top";
|
|
1736
1736
|
// @Input() showIndex: boolean = false;
|
|
@@ -1741,7 +1741,7 @@ class ColumnGroupComponent {
|
|
|
1741
1741
|
level = 0;
|
|
1742
1742
|
formatType = "string";
|
|
1743
1743
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ColumnGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1744
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: ColumnGroupComponent, isStandalone: true, selector: "columnGroup", inputs: { field: "field", header: "header", sortable: "sortable", width: "width", minWidth: "minWidth", colspan: "colspan", rowspan: "rowspan", level: "level", formatType: "formatType" }, ngImport: i0 });
|
|
1744
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: ColumnGroupComponent, isStandalone: true, selector: "columnGroup", inputs: { field: "field", header: "header", sortable: "sortable", width: "width", minWidth: "minWidth", className: "className", headerTooltip: "headerTooltip", headerTooltipPosition: "headerTooltipPosition", colspan: "colspan", rowspan: "rowspan", level: "level", formatType: "formatType" }, ngImport: i0 });
|
|
1745
1745
|
}
|
|
1746
1746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ColumnGroupComponent, decorators: [{
|
|
1747
1747
|
type: Directive,
|
|
@@ -1756,6 +1756,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
1756
1756
|
type: Input
|
|
1757
1757
|
}], minWidth: [{
|
|
1758
1758
|
type: Input
|
|
1759
|
+
}], className: [{
|
|
1760
|
+
type: Input
|
|
1761
|
+
}], headerTooltip: [{
|
|
1762
|
+
type: Input
|
|
1763
|
+
}], headerTooltipPosition: [{
|
|
1764
|
+
type: Input
|
|
1759
1765
|
}], colspan: [{
|
|
1760
1766
|
type: Input
|
|
1761
1767
|
}], rowspan: [{
|
|
@@ -1916,6 +1922,56 @@ class TableComponent {
|
|
|
1916
1922
|
scrollable = false;
|
|
1917
1923
|
AllowedPageSizes = [10, 25, 50, 100];
|
|
1918
1924
|
tableStyle = {};
|
|
1925
|
+
_isTableDisabled = false;
|
|
1926
|
+
_pendingUncheck = false;
|
|
1927
|
+
HeaderState = {};
|
|
1928
|
+
set IsTableDisabled(val) {
|
|
1929
|
+
this._isTableDisabled = val;
|
|
1930
|
+
if (val) {
|
|
1931
|
+
if (!this.ColumnList || this.ColumnList.length === 0) {
|
|
1932
|
+
this._pendingUncheck = true;
|
|
1933
|
+
}
|
|
1934
|
+
else {
|
|
1935
|
+
this.uncheckAllCheckboxColumns();
|
|
1936
|
+
this.ListDataSelectedTemp = [];
|
|
1937
|
+
this.ListDataSelectedFilter = [];
|
|
1938
|
+
this.ExecuteSearch({});
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
get IsTableDisabled() {
|
|
1943
|
+
return this._isTableDisabled;
|
|
1944
|
+
}
|
|
1945
|
+
recomputeHeaderState(field) {
|
|
1946
|
+
const scope = this.getHeaderScope();
|
|
1947
|
+
const total = scope.length;
|
|
1948
|
+
if (total === 0) {
|
|
1949
|
+
this.HeaderState[field] = { checked: false, indeterminate: false };
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
const checked = scope.filter((r) => r[field] === true).length;
|
|
1953
|
+
this.HeaderState[field] = {
|
|
1954
|
+
checked: checked === total,
|
|
1955
|
+
indeterminate: checked > 0 && checked < total,
|
|
1956
|
+
};
|
|
1957
|
+
}
|
|
1958
|
+
onBodyCheckboxChange(field) {
|
|
1959
|
+
this.recomputeHeaderState(field);
|
|
1960
|
+
}
|
|
1961
|
+
refreshAllHeaderStates() {
|
|
1962
|
+
this.ColumnList.filter((c) => c.isChecboxColumn).forEach((c) => this.recomputeHeaderState(c.field));
|
|
1963
|
+
}
|
|
1964
|
+
uncheckAllCheckboxColumns() {
|
|
1965
|
+
this.ListData = this.ListData.map((row) => {
|
|
1966
|
+
const copy = { ...row };
|
|
1967
|
+
this.ColumnList.filter((c) => c.isChecboxColumn).forEach((c) => {
|
|
1968
|
+
if (c.field && Object.prototype.hasOwnProperty.call(copy, c.field)) {
|
|
1969
|
+
copy[c.field] = false;
|
|
1970
|
+
}
|
|
1971
|
+
});
|
|
1972
|
+
return copy;
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1919
1975
|
EmitSelectedItem = new EventEmitter();
|
|
1920
1976
|
EmitListDataFilter = new EventEmitter();
|
|
1921
1977
|
EmitSearchEvent = new EventEmitter();
|
|
@@ -1953,11 +2009,28 @@ class TableComponent {
|
|
|
1953
2009
|
this.ValidateSelect();
|
|
1954
2010
|
}
|
|
1955
2011
|
ngAfterContentInit() {
|
|
1956
|
-
this.ColumnList = this.Columns
|
|
1957
|
-
this.ColumnGroupList = this.ColumnGroups
|
|
1958
|
-
this.RowResumenList = this.RowResumenGroups
|
|
1959
|
-
|
|
2012
|
+
this.ColumnList = this.Columns?.toArray() ?? [];
|
|
2013
|
+
this.ColumnGroupList = this.ColumnGroups?.toArray() ?? [];
|
|
2014
|
+
this.RowResumenList = this.RowResumenGroups?.toArray() ?? [];
|
|
2015
|
+
const levels = this.ColumnGroupList.map((c) => c.level);
|
|
2016
|
+
this.MaxLevel = levels.length ? Math.max(...levels) + 1 : 1;
|
|
1960
2017
|
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
2018
|
+
// Inicializa entradas para evitar usar ?. en la vista
|
|
2019
|
+
this.ColumnList.filter((c) => c.isChecboxColumn).forEach((c) => {
|
|
2020
|
+
if (!this.HeaderState[c.field]) {
|
|
2021
|
+
this.HeaderState[c.field] = { checked: false, indeterminate: false };
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
if (this._isTableDisabled && this._pendingUncheck) {
|
|
2025
|
+
this.uncheckAllCheckboxColumns();
|
|
2026
|
+
this.ListDataSelectedTemp = [];
|
|
2027
|
+
this.ListDataSelectedFilter = [];
|
|
2028
|
+
this._pendingUncheck = false;
|
|
2029
|
+
this.ExecuteSearch({}); // UpdatePages() llamará a refreshAllHeaderStates()
|
|
2030
|
+
}
|
|
2031
|
+
else {
|
|
2032
|
+
this.refreshAllHeaderStates();
|
|
2033
|
+
}
|
|
1961
2034
|
}
|
|
1962
2035
|
LoadSearchOptions() {
|
|
1963
2036
|
this.ListSearchOptionsSimple = this.ListSearchOptions.map((item) => ({
|
|
@@ -2036,6 +2109,7 @@ class TableComponent {
|
|
|
2036
2109
|
}
|
|
2037
2110
|
if (this.ShowCheckbox)
|
|
2038
2111
|
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
2112
|
+
this.refreshAllHeaderStates();
|
|
2039
2113
|
this.EmitSearchValues();
|
|
2040
2114
|
}
|
|
2041
2115
|
ValidateSelect() {
|
|
@@ -2104,19 +2178,13 @@ class TableComponent {
|
|
|
2104
2178
|
},
|
|
2105
2179
|
]);
|
|
2106
2180
|
}
|
|
2107
|
-
OnHeaderCheckboxChange(
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
const exists = idsSelected.has(id);
|
|
2115
|
-
if (exists) {
|
|
2116
|
-
item[field] = checked;
|
|
2117
|
-
}
|
|
2118
|
-
});
|
|
2119
|
-
this.IsInderteminate(field);
|
|
2181
|
+
OnHeaderCheckboxChange(checked, field) {
|
|
2182
|
+
const scope = this.getHeaderScope(); // ver punto 2
|
|
2183
|
+
scope.forEach((r) => (r[field] = checked));
|
|
2184
|
+
this.HeaderState[field] = { checked, indeterminate: false };
|
|
2185
|
+
}
|
|
2186
|
+
getHeaderScope() {
|
|
2187
|
+
return this.ShowPagination ? this.ListDataTable : this.ListDataFilter;
|
|
2120
2188
|
}
|
|
2121
2189
|
FilterData(field) {
|
|
2122
2190
|
let c = this.ListData.filter((item) => item[field]);
|
|
@@ -2126,10 +2194,12 @@ class TableComponent {
|
|
|
2126
2194
|
const element = [...document.querySelectorAll("[data-check]")].find((x) => x.getAttribute("data-check") == column);
|
|
2127
2195
|
if (element == undefined)
|
|
2128
2196
|
return;
|
|
2129
|
-
if (rowsChek > 0 && rowsChek < this.ListData.length)
|
|
2197
|
+
if (rowsChek > 0 && rowsChek < this.ListData.length) {
|
|
2130
2198
|
element.setAttribute("class", "prCheckbox--indeterminate");
|
|
2131
|
-
|
|
2199
|
+
}
|
|
2200
|
+
else {
|
|
2132
2201
|
element.removeAttribute("class");
|
|
2202
|
+
}
|
|
2133
2203
|
}
|
|
2134
2204
|
OnRowsPerPageChange(value) {
|
|
2135
2205
|
this.RowsPerPage = value;
|
|
@@ -2139,8 +2209,30 @@ class TableComponent {
|
|
|
2139
2209
|
this.ListDataSelectedTemp = [];
|
|
2140
2210
|
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
2141
2211
|
}
|
|
2212
|
+
get minPageSize() {
|
|
2213
|
+
const a = this.AllowedPageSizes ?? [];
|
|
2214
|
+
return a.length ? Math.min(...a) : 0;
|
|
2215
|
+
}
|
|
2216
|
+
get totalItemsCount() {
|
|
2217
|
+
return this.ShowPagination ? this.TotalRecords : this.ListDataFilter.length;
|
|
2218
|
+
}
|
|
2219
|
+
get showRowPerPageControl() {
|
|
2220
|
+
return this.ShowRowPerPage && this.totalItemsCount > this.minPageSize;
|
|
2221
|
+
}
|
|
2222
|
+
get visiblePageSizes() {
|
|
2223
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
2224
|
+
if (!sizes.length)
|
|
2225
|
+
return [];
|
|
2226
|
+
const total = this.totalItemsCount; // usa el getter que ya te dejé
|
|
2227
|
+
const min = sizes[0];
|
|
2228
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
2229
|
+
const nextCeil = sizes.find(s => s >= total);
|
|
2230
|
+
// resultado en orden, sin duplicados, y filtrando undefined
|
|
2231
|
+
const result = Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
2232
|
+
return result;
|
|
2233
|
+
}
|
|
2142
2234
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2143
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], 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 @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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >{{ col.header }}</span\r\n >\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"TotalRecords === 0\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", 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: "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"] }, { 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: "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"] }, { 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: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2235
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", IsTableDisabled: "IsTableDisabled" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], 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 @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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\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 {\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 \r\n [pTooltip]=\"col.headerTooltip || col.header\"\r\n [tooltipPosition]=\"col.headerTooltipPosition || 'top'\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n [pTooltip]=\"col.headerTooltip || col.header\"\r\n [tooltipPosition]=\"col.headerTooltipPosition || 'top'\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n class=\"prCheckbox\"\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n [(ngModel)]=\"HeaderState[col.field].checked\"\r\n (ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n [disabled]=\"IsTableDisabled\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n HeaderState[col.field].indeterminate\r\n }\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"onBodyCheckboxChange(col.field)\"\r\n [disabled]=\"IsTableDisabled\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n [pTooltip]=\"col.tooltip\"\r\n [tooltipPosition]=\"col.tooltipPosition || 'top'\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"totalItemsCount === 0\"\r\n />\r\n \r\n <label class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= totalItemsCount\r\n ? totalItemsCount\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ totalItemsCount }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n \r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", 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: "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"] }, { 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: "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"] }, { 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: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2144
2236
|
}
|
|
2145
2237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
2146
2238
|
type: Component,
|
|
@@ -2156,7 +2248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2156
2248
|
CheckboxModule,
|
|
2157
2249
|
FormsModule,
|
|
2158
2250
|
FormatCellPipe,
|
|
2159
|
-
], providers: [FormatCellPipe, DatePipe], 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 @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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\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 {\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=\"
|
|
2251
|
+
], providers: [FormatCellPipe, DatePipe], 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 @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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\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 {\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 \r\n [pTooltip]=\"col.headerTooltip || col.header\"\r\n [tooltipPosition]=\"col.headerTooltipPosition || 'top'\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n [pTooltip]=\"col.headerTooltip || col.header\"\r\n [tooltipPosition]=\"col.headerTooltipPosition || 'top'\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n class=\"prCheckbox\"\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n [(ngModel)]=\"HeaderState[col.field].checked\"\r\n (ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n [disabled]=\"IsTableDisabled\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n HeaderState[col.field].indeterminate\r\n }\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"onBodyCheckboxChange(col.field)\"\r\n [disabled]=\"IsTableDisabled\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n [pTooltip]=\"col.tooltip\"\r\n [tooltipPosition]=\"col.tooltipPosition || 'top'\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"totalItemsCount === 0\"\r\n />\r\n \r\n <label class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= totalItemsCount\r\n ? totalItemsCount\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ totalItemsCount }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n \r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
2160
2252
|
}], propDecorators: { ComponentId: [{
|
|
2161
2253
|
type: Input
|
|
2162
2254
|
}], ListData: [{
|
|
@@ -2195,6 +2287,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2195
2287
|
type: Input
|
|
2196
2288
|
}], tableStyle: [{
|
|
2197
2289
|
type: Input
|
|
2290
|
+
}], IsTableDisabled: [{
|
|
2291
|
+
type: Input
|
|
2198
2292
|
}], EmitSelectedItem: [{
|
|
2199
2293
|
type: Output
|
|
2200
2294
|
}], EmitListDataFilter: [{
|
|
@@ -2407,6 +2501,15 @@ class TreeTableComponent {
|
|
|
2407
2501
|
}
|
|
2408
2502
|
this.ExecuteSearch({});
|
|
2409
2503
|
this.ValidateSelect();
|
|
2504
|
+
const vis = this.visiblePageSizes;
|
|
2505
|
+
if (vis.length && !vis.includes(this.RowsPerPage)) {
|
|
2506
|
+
const next = vis.find(v => v >= this.RowsPerPage) ?? vis[vis.length - 1];
|
|
2507
|
+
if (this.RowsPerPage !== next) {
|
|
2508
|
+
this.RowsPerPage = next;
|
|
2509
|
+
this.CurrentPage = 1;
|
|
2510
|
+
this.UpdatePages();
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2410
2513
|
}
|
|
2411
2514
|
ngAfterContentInit() {
|
|
2412
2515
|
this.ColumnList = this.Columns.toArray();
|
|
@@ -2555,8 +2658,29 @@ class TreeTableComponent {
|
|
|
2555
2658
|
this.RowsPerPage = value;
|
|
2556
2659
|
this.ResetTable();
|
|
2557
2660
|
}
|
|
2661
|
+
// Mínimo permitido en AllowedPageSizes
|
|
2662
|
+
get minPageSize() {
|
|
2663
|
+
const a = this.AllowedPageSizes ?? [];
|
|
2664
|
+
return a.length ? Math.min(...a) : 0;
|
|
2665
|
+
}
|
|
2666
|
+
// Opciones visibles: mínimo, todas <= total y la siguiente >= total (ceil)
|
|
2667
|
+
get visiblePageSizes() {
|
|
2668
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
2669
|
+
if (!sizes.length)
|
|
2670
|
+
return [];
|
|
2671
|
+
const total = this.TotalRecords || this.ListDataFilter.length;
|
|
2672
|
+
const min = sizes[0];
|
|
2673
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
2674
|
+
const nextCeil = sizes.find(s => s >= total);
|
|
2675
|
+
return Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
2676
|
+
}
|
|
2677
|
+
// Mostrar el control "Items per page" solo cuando tenga sentido
|
|
2678
|
+
get showRowPerPageControl() {
|
|
2679
|
+
const total = this.TotalRecords || this.ListDataFilter.length;
|
|
2680
|
+
return this.ShowRowPerPage && total > this.minPageSize;
|
|
2681
|
+
}
|
|
2558
2682
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2559
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TreeTableComponent, isStandalone: true, selector: "intelica-tree-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ClassName: "ClassName", groupRowsBy: "groupRowsBy", dataKey: "dataKey", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", AllowedPageSizes: "AllowedPageSizes", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ListSearchOptions: "ListSearchOptions", ShowRowPerPage: "ShowRowPerPage" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "Columns", predicate: TreeColumnComponent }, { propertyName: "ColumnGroups", predicate: TreeColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenTreeComponent }], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\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.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] | formatCell : col.formatType }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (ShowRowPerPage) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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"] }, { 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: 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: "directive", type: i2$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { 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: "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: "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"] }, { 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: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TreeTableComponent, isStandalone: true, selector: "intelica-tree-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ClassName: "ClassName", groupRowsBy: "groupRowsBy", dataKey: "dataKey", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", AllowedPageSizes: "AllowedPageSizes", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ListSearchOptions: "ListSearchOptions", ShowRowPerPage: "ShowRowPerPage" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "Columns", predicate: TreeColumnComponent }, { propertyName: "ColumnGroups", predicate: TreeColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenTreeComponent }], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\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.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] | formatCell : col.formatType }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"TotalRecords === 0\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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"] }, { 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: 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: "directive", type: i2$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { 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: "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: "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"] }, { 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: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2560
2684
|
}
|
|
2561
2685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, decorators: [{
|
|
2562
2686
|
type: Component,
|
|
@@ -2573,7 +2697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2573
2697
|
FormsModule,
|
|
2574
2698
|
ButtonModule,
|
|
2575
2699
|
FormatCellPipe,
|
|
2576
|
-
], providers: [FormatCellPipe, DatePipe], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\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.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] | formatCell : col.formatType }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (ShowRowPerPage) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
2700
|
+
], providers: [FormatCellPipe, DatePipe], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\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.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] | formatCell : col.formatType }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"TotalRecords === 0\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
2577
2701
|
}], propDecorators: { ComponentId: [{
|
|
2578
2702
|
type: Input
|
|
2579
2703
|
}], ListData: [{
|
|
@@ -2700,12 +2824,15 @@ class MatrixColumnGroupComponent {
|
|
|
2700
2824
|
header;
|
|
2701
2825
|
sortable = false;
|
|
2702
2826
|
width;
|
|
2827
|
+
className;
|
|
2828
|
+
headerTooltip = "";
|
|
2829
|
+
headerTooltipPosition = "top";
|
|
2703
2830
|
minWidth;
|
|
2704
2831
|
colspan = 1;
|
|
2705
2832
|
rowspan = 1;
|
|
2706
2833
|
level = 0;
|
|
2707
2834
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixColumnGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2708
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: MatrixColumnGroupComponent, isStandalone: true, selector: "columnGroup", inputs: { field: "field", header: "header", sortable: "sortable", width: "width", minWidth: "minWidth", colspan: "colspan", rowspan: "rowspan", level: "level" }, ngImport: i0 });
|
|
2835
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: MatrixColumnGroupComponent, isStandalone: true, selector: "columnGroup", inputs: { field: "field", header: "header", sortable: "sortable", width: "width", className: "className", headerTooltip: "headerTooltip", headerTooltipPosition: "headerTooltipPosition", minWidth: "minWidth", colspan: "colspan", rowspan: "rowspan", level: "level" }, ngImport: i0 });
|
|
2709
2836
|
}
|
|
2710
2837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixColumnGroupComponent, decorators: [{
|
|
2711
2838
|
type: Directive,
|
|
@@ -2718,6 +2845,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2718
2845
|
type: Input
|
|
2719
2846
|
}], width: [{
|
|
2720
2847
|
type: Input
|
|
2848
|
+
}], className: [{
|
|
2849
|
+
type: Input
|
|
2850
|
+
}], headerTooltip: [{
|
|
2851
|
+
type: Input
|
|
2852
|
+
}], headerTooltipPosition: [{
|
|
2853
|
+
type: Input
|
|
2721
2854
|
}], minWidth: [{
|
|
2722
2855
|
type: Input
|
|
2723
2856
|
}], colspan: [{
|
|
@@ -2753,11 +2886,11 @@ class MatrixTableComponent {
|
|
|
2753
2886
|
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
2754
2887
|
}
|
|
2755
2888
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2756
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MatrixTableComponent, isStandalone: true, selector: "intelica-matrix-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowIndex: "ShowIndex", ClassName: "ClassName", dataKey: "dataKey", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle" }, queries: [{ propertyName: "Columns", predicate: MatrixColumnComponent }, { propertyName: "ColumnGroups", predicate: MatrixColumnGroupComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable prTable--blueLeft\">\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListData\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortOrder]=\"-1\"\r\n\t\tdataKey=\"dataKey\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n\r\n\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\"
|
|
2889
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: MatrixTableComponent, isStandalone: true, selector: "intelica-matrix-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowIndex: "ShowIndex", ClassName: "ClassName", dataKey: "dataKey", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle" }, queries: [{ propertyName: "Columns", predicate: MatrixColumnComponent }, { propertyName: "ColumnGroups", predicate: MatrixColumnGroupComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable prTable--blueLeft\">\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListData\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortOrder]=\"-1\"\r\n\t\tdataKey=\"dataKey\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n\t\t\t\r\n\t\t\t\t<th [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\"\r\n\t\t\t\t\t[style.min-width]=\"col.minWidth\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t\t}\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n\t\t\t\t<th [class]=\"col.className\" [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t</ng-template>\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@for (col of ColumnList; track col; let i = $index) {\r\n\t\t\t\t<td [ngClass]=\"col.className\" [class.left-header]=\"i === 0\">\r\n\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t<span class=\"text-breakWord\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ rowData[col.field] ?? \"-\" }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t}\r\n\t\t\t\t</td>\r\n\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t<ng-container *ngIf=\"rowData.children?.length > 0\">\r\n\t\t\t\t<tr *ngFor=\"let childRow of rowData.children\">\r\n\t\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\" [class.child-cell-padding]=\"i === 0\" [class.left-header]=\"i === 0\">\r\n\t\t\t\t\t\t{{ childRow[col.field] }}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</ng-container>\r\n\t\t</ng-template>\r\n\t\t<ng-template #emptymessage>\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length\" 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\t</p-table>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "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: "ngmodule", type: ButtonModule }] });
|
|
2757
2890
|
}
|
|
2758
2891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixTableComponent, decorators: [{
|
|
2759
2892
|
type: Component,
|
|
2760
|
-
args: [{ selector: "intelica-matrix-table", standalone: true, imports: [CommonModule, TableModule, BadgeModule, TooltipModule, TermPipe, CheckboxModule, FormsModule, ButtonModule], template: "<div class=\"prTable prTable--blueLeft\">\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListData\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortOrder]=\"-1\"\r\n\t\tdataKey=\"dataKey\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n\r\n\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\"
|
|
2893
|
+
args: [{ selector: "intelica-matrix-table", standalone: true, imports: [CommonModule, TableModule, BadgeModule, TooltipModule, TermPipe, CheckboxModule, FormsModule, ButtonModule], template: "<div class=\"prTable prTable--blueLeft\">\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListData\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortOrder]=\"-1\"\r\n\t\tdataKey=\"dataKey\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n\t\t\t\r\n\t\t\t\t<th [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\"\r\n\t\t\t\t\t[style.min-width]=\"col.minWidth\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t\t}\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n\t\t\t\t<th [class]=\"col.className\" [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t</ng-template>\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@for (col of ColumnList; track col; let i = $index) {\r\n\t\t\t\t<td [ngClass]=\"col.className\" [class.left-header]=\"i === 0\">\r\n\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t<span class=\"text-breakWord\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t{{ rowData[col.field] ?? \"-\" }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t}\r\n\t\t\t\t</td>\r\n\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t<ng-container *ngIf=\"rowData.children?.length > 0\">\r\n\t\t\t\t<tr *ngFor=\"let childRow of rowData.children\">\r\n\t\t\t\t\t<td *ngFor=\"let col of ColumnList; let i = index\" [ngClass]=\"col.className\" [class.child-cell-padding]=\"i === 0\" [class.left-header]=\"i === 0\">\r\n\t\t\t\t\t\t{{ childRow[col.field] }}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</ng-container>\r\n\t\t</ng-template>\r\n\t\t<ng-template #emptymessage>\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length\" 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\t</p-table>\r\n</div>\r\n" }]
|
|
2761
2894
|
}], propDecorators: { ComponentId: [{
|
|
2762
2895
|
type: Input
|
|
2763
2896
|
}], ListData: [{
|
|
@@ -5052,9 +5185,7 @@ class TableFetchComponent {
|
|
|
5052
5185
|
ListDataTable = [];
|
|
5053
5186
|
ngOnChanges(changes) {
|
|
5054
5187
|
this.LoadSearchOptions();
|
|
5055
|
-
if (changes["FilteredList"] ||
|
|
5056
|
-
changes["RowsPerPage"] ||
|
|
5057
|
-
changes["CurrentPage"]) {
|
|
5188
|
+
if (changes["FilteredList"] || changes["RowsPerPage"] || changes["CurrentPage"]) {
|
|
5058
5189
|
this.UpdatePages();
|
|
5059
5190
|
}
|
|
5060
5191
|
if (changes["sortField"] || changes["SortOrder"]) {
|
|
@@ -5065,6 +5196,17 @@ class TableFetchComponent {
|
|
|
5065
5196
|
},
|
|
5066
5197
|
]);
|
|
5067
5198
|
}
|
|
5199
|
+
const vis = this.visiblePageSizes;
|
|
5200
|
+
if (vis.length && !vis.includes(this.RowsPerPage)) {
|
|
5201
|
+
const next = vis.find(v => v >= this.RowsPerPage) ?? vis[vis.length - 1];
|
|
5202
|
+
if (this.RowsPerPage !== next) {
|
|
5203
|
+
this.RowsPerPage = next;
|
|
5204
|
+
if (this.ShowPagination) {
|
|
5205
|
+
this.CurrentPage = 1;
|
|
5206
|
+
}
|
|
5207
|
+
this.UpdatePages();
|
|
5208
|
+
}
|
|
5209
|
+
}
|
|
5068
5210
|
}
|
|
5069
5211
|
ngAfterContentInit() {
|
|
5070
5212
|
this.ColumnList = this.Columns.toArray();
|
|
@@ -5148,8 +5290,28 @@ class TableFetchComponent {
|
|
|
5148
5290
|
this.CurrentPage = 1;
|
|
5149
5291
|
this.ExecuteSearch({});
|
|
5150
5292
|
}
|
|
5293
|
+
// Mínimo de AllowedPageSizes (si no hay, 0)
|
|
5294
|
+
get minPageSize() {
|
|
5295
|
+
const a = this.AllowedPageSizes ?? [];
|
|
5296
|
+
return a.length ? Math.min(...a) : 0;
|
|
5297
|
+
}
|
|
5298
|
+
// Opciones visibles: mínimo, todas <= total, y el siguiente >= total (ceil)
|
|
5299
|
+
get visiblePageSizes() {
|
|
5300
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
5301
|
+
if (!sizes.length)
|
|
5302
|
+
return [];
|
|
5303
|
+
const total = this.TotalItems;
|
|
5304
|
+
const min = sizes[0];
|
|
5305
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
5306
|
+
const nextCeil = sizes.find(s => s >= total); // puede repetir min, luego se deduplica
|
|
5307
|
+
return Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
5308
|
+
}
|
|
5309
|
+
// Mostrar control "Items per page" solo si tiene sentido
|
|
5310
|
+
get showRowPerPageControl() {
|
|
5311
|
+
return this.ShowRowPerPage && this.TotalItems > this.minPageSize;
|
|
5312
|
+
}
|
|
5151
5313
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5152
|
-
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", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", FilteredList: "FilteredList", TotalItems: "TotalItems", CurrentPage: "CurrentPage", SortOrder: "SortOrder", SortField: "SortField" }, outputs: { EmitQueryParametersChange: "EmitQueryParametersChange", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\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 [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\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 {\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 } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\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 } } @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\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </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 <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", 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"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
5314
|
+
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", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", FilteredList: "FilteredList", TotalItems: "TotalItems", CurrentPage: "CurrentPage", SortOrder: "SortOrder", SortField: "SortField" }, outputs: { EmitQueryParametersChange: "EmitQueryParametersChange", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\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 [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\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 {\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.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n {{ col.header }}\r\n </span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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 || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\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 } } @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\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </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 (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"TotalRecords === 0\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", 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"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
5153
5315
|
}
|
|
5154
5316
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, decorators: [{
|
|
5155
5317
|
type: Component,
|
|
@@ -5165,7 +5327,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5165
5327
|
SearchComponent,
|
|
5166
5328
|
PaginatorComponent,
|
|
5167
5329
|
FormatCellPipe,
|
|
5168
|
-
], providers: [FormatCellPipe, DatePipe], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\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 [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\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 {\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=\"
|
|
5330
|
+
], providers: [FormatCellPipe, DatePipe], 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 } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\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 [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\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 {\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.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n {{ col.header }}\r\n </span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\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]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\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 || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\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 } } @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\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\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\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\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 <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </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 (showRowPerPageControl) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"visiblePageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n [disabled]=\"TotalRecords === 0\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n }\r\n @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
5169
5331
|
}], propDecorators: { ComponentId: [{
|
|
5170
5332
|
type: Input
|
|
5171
5333
|
}], ShowRowPerPage: [{
|
|
@@ -5656,6 +5818,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5656
5818
|
type: Input
|
|
5657
5819
|
}] } });
|
|
5658
5820
|
|
|
5821
|
+
class IntelicaCellCheckboxDirective {
|
|
5822
|
+
table;
|
|
5823
|
+
field;
|
|
5824
|
+
row;
|
|
5825
|
+
constructor(table) {
|
|
5826
|
+
this.table = table;
|
|
5827
|
+
}
|
|
5828
|
+
// ngModel (Angular forms)
|
|
5829
|
+
onNgModelChange(val) {
|
|
5830
|
+
if (!this.table || !this.field || !this.row)
|
|
5831
|
+
return;
|
|
5832
|
+
this.row[this.field] = val;
|
|
5833
|
+
this.table.recomputeHeaderState(this.field);
|
|
5834
|
+
}
|
|
5835
|
+
// onChange (PrimeNG p-checkbox)
|
|
5836
|
+
onPrimeChange(evt) {
|
|
5837
|
+
const val = !!evt?.checked;
|
|
5838
|
+
this.onNgModelChange(val);
|
|
5839
|
+
}
|
|
5840
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaCellCheckboxDirective, deps: [{ token: TableComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5841
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: IntelicaCellCheckboxDirective, isStandalone: true, selector: "[intelicaCellCheckbox]", inputs: { field: ["intelicaCellCheckbox", "field"], row: ["intelicaCellCheckboxRow", "row"] }, host: { listeners: { "ngModelChange": "onNgModelChange($event)", "onChange": "onPrimeChange($event)" } }, ngImport: i0 });
|
|
5842
|
+
}
|
|
5843
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: IntelicaCellCheckboxDirective, decorators: [{
|
|
5844
|
+
type: Directive,
|
|
5845
|
+
args: [{
|
|
5846
|
+
selector: "[intelicaCellCheckbox]",
|
|
5847
|
+
standalone: true,
|
|
5848
|
+
}]
|
|
5849
|
+
}], ctorParameters: () => [{ type: TableComponent, decorators: [{
|
|
5850
|
+
type: Optional
|
|
5851
|
+
}, {
|
|
5852
|
+
type: Host
|
|
5853
|
+
}] }], propDecorators: { field: [{
|
|
5854
|
+
type: Input,
|
|
5855
|
+
args: ["intelicaCellCheckbox"]
|
|
5856
|
+
}], row: [{
|
|
5857
|
+
type: Input,
|
|
5858
|
+
args: ["intelicaCellCheckboxRow"]
|
|
5859
|
+
}], onNgModelChange: [{
|
|
5860
|
+
type: HostListener,
|
|
5861
|
+
args: ["ngModelChange", ["$event"]]
|
|
5862
|
+
}], onPrimeChange: [{
|
|
5863
|
+
type: HostListener,
|
|
5864
|
+
args: ["onChange", ["$event"]]
|
|
5865
|
+
}] } });
|
|
5866
|
+
|
|
5659
5867
|
class HtmlToExcelService {
|
|
5660
5868
|
ExportTOExcel(idTabla, html, filename, tabname, extension) {
|
|
5661
5869
|
let Table = document.getElementById(idTabla);
|
|
@@ -6275,26 +6483,57 @@ class EchartService {
|
|
|
6275
6483
|
* @param showLegend - Optional flag to show the legend
|
|
6276
6484
|
* @returns - EChartsOption - Configuration object for the bar chart
|
|
6277
6485
|
*/
|
|
6278
|
-
getBarChartTopOptions(categories, series, categoryWidth = 240, labelConfig, tooltipConfig, showLegend = false) {
|
|
6279
|
-
|
|
6486
|
+
getBarChartTopOptions(categories, series, categoryWidth = 240, labelConfig, tooltipConfig, showLegend = false, categoryFormatter) {
|
|
6487
|
+
const barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
6280
6488
|
if (barBase.yAxis) {
|
|
6281
|
-
barBase.yAxis
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6489
|
+
const y = barBase.yAxis;
|
|
6490
|
+
const gr = barBase.grid;
|
|
6491
|
+
const defaultCategoryFormatter = (value, index) => {
|
|
6492
|
+
const lineLength = 35;
|
|
6493
|
+
const prefix = `${index + 1} - `;
|
|
6494
|
+
const words = value.split(' ');
|
|
6495
|
+
let lines = [];
|
|
6496
|
+
let currentLine = '';
|
|
6497
|
+
for (const word of words) {
|
|
6498
|
+
const testLine = currentLine ? `${currentLine} ${word}` : word;
|
|
6499
|
+
if (testLine.length <= lineLength) {
|
|
6500
|
+
currentLine = testLine;
|
|
6501
|
+
}
|
|
6502
|
+
else {
|
|
6503
|
+
lines.push(currentLine);
|
|
6504
|
+
currentLine = word;
|
|
6505
|
+
}
|
|
6506
|
+
}
|
|
6507
|
+
if (currentLine)
|
|
6508
|
+
lines.push(currentLine);
|
|
6509
|
+
return prefix + lines
|
|
6510
|
+
.map((line, i) => (i === 0 ? line : `\u2008\u2008\u2008\u2008\u2008\u2008\u2009${line}`))
|
|
6511
|
+
.join('\n');
|
|
6512
|
+
};
|
|
6513
|
+
y.inverse = true;
|
|
6514
|
+
y.axisLabel = {
|
|
6515
|
+
...y.axisLabel,
|
|
6516
|
+
color: Color.blue,
|
|
6517
|
+
fontSize: 12,
|
|
6518
|
+
width: categoryWidth,
|
|
6519
|
+
overflow: "break",
|
|
6520
|
+
align: "left",
|
|
6521
|
+
verticalAlign: "middle",
|
|
6522
|
+
margin: categoryWidth + 30,
|
|
6523
|
+
lineHeight: 16,
|
|
6524
|
+
formatter: categoryFormatter || defaultCategoryFormatter,
|
|
6525
|
+
};
|
|
6526
|
+
gr.top = "0%";
|
|
6527
|
+
gr.left = -1 * categoryWidth + 60;
|
|
6528
|
+
gr.right = 20;
|
|
6529
|
+
gr.bottom = "0%";
|
|
6530
|
+
gr.containLabel = true;
|
|
6531
|
+
}
|
|
6532
|
+
barBase.series.forEach((serie) => {
|
|
6533
|
+
serie.label = {
|
|
6534
|
+
...(serie.label || {}),
|
|
6535
|
+
formatter: labelConfig,
|
|
6536
|
+
};
|
|
6298
6537
|
});
|
|
6299
6538
|
return barBase;
|
|
6300
6539
|
}
|
|
@@ -8955,5 +9194,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
8955
9194
|
* Generated bundle index. Do not edit.
|
|
8956
9195
|
*/
|
|
8957
9196
|
|
|
8958
|
-
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DateFilterDirective, DateModeOptions, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
9197
|
+
export { ActionDirective, ActionsMenuComponent, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DataDirective, DateFilterDirective, DateModeOptions, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaCellCheckboxDirective, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, OrderConstants, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RouteGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
8959
9198
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|