intelica-library-ui 0.1.178 → 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.
|
@@ -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';
|
|
@@ -1922,6 +1922,56 @@ class TableComponent {
|
|
|
1922
1922
|
scrollable = false;
|
|
1923
1923
|
AllowedPageSizes = [10, 25, 50, 100];
|
|
1924
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
|
+
}
|
|
1925
1975
|
EmitSelectedItem = new EventEmitter();
|
|
1926
1976
|
EmitListDataFilter = new EventEmitter();
|
|
1927
1977
|
EmitSearchEvent = new EventEmitter();
|
|
@@ -1959,11 +2009,28 @@ class TableComponent {
|
|
|
1959
2009
|
this.ValidateSelect();
|
|
1960
2010
|
}
|
|
1961
2011
|
ngAfterContentInit() {
|
|
1962
|
-
this.ColumnList = this.Columns
|
|
1963
|
-
this.ColumnGroupList = this.ColumnGroups
|
|
1964
|
-
this.RowResumenList = this.RowResumenGroups
|
|
1965
|
-
|
|
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;
|
|
1966
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
|
+
}
|
|
1967
2034
|
}
|
|
1968
2035
|
LoadSearchOptions() {
|
|
1969
2036
|
this.ListSearchOptionsSimple = this.ListSearchOptions.map((item) => ({
|
|
@@ -2042,6 +2109,7 @@ class TableComponent {
|
|
|
2042
2109
|
}
|
|
2043
2110
|
if (this.ShowCheckbox)
|
|
2044
2111
|
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
2112
|
+
this.refreshAllHeaderStates();
|
|
2045
2113
|
this.EmitSearchValues();
|
|
2046
2114
|
}
|
|
2047
2115
|
ValidateSelect() {
|
|
@@ -2110,19 +2178,13 @@ class TableComponent {
|
|
|
2110
2178
|
},
|
|
2111
2179
|
]);
|
|
2112
2180
|
}
|
|
2113
|
-
OnHeaderCheckboxChange(
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
const exists = idsSelected.has(id);
|
|
2121
|
-
if (exists) {
|
|
2122
|
-
item[field] = checked;
|
|
2123
|
-
}
|
|
2124
|
-
});
|
|
2125
|
-
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;
|
|
2126
2188
|
}
|
|
2127
2189
|
FilterData(field) {
|
|
2128
2190
|
let c = this.ListData.filter((item) => item[field]);
|
|
@@ -2132,10 +2194,12 @@ class TableComponent {
|
|
|
2132
2194
|
const element = [...document.querySelectorAll("[data-check]")].find((x) => x.getAttribute("data-check") == column);
|
|
2133
2195
|
if (element == undefined)
|
|
2134
2196
|
return;
|
|
2135
|
-
if (rowsChek > 0 && rowsChek < this.ListData.length)
|
|
2197
|
+
if (rowsChek > 0 && rowsChek < this.ListData.length) {
|
|
2136
2198
|
element.setAttribute("class", "prCheckbox--indeterminate");
|
|
2137
|
-
|
|
2199
|
+
}
|
|
2200
|
+
else {
|
|
2138
2201
|
element.removeAttribute("class");
|
|
2202
|
+
}
|
|
2139
2203
|
}
|
|
2140
2204
|
OnRowsPerPageChange(value) {
|
|
2141
2205
|
this.RowsPerPage = value;
|
|
@@ -2168,7 +2232,7 @@ class TableComponent {
|
|
|
2168
2232
|
return result;
|
|
2169
2233
|
}
|
|
2170
2234
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2171
|
-
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 \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 [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 || '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" }] });
|
|
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" }] });
|
|
2172
2236
|
}
|
|
2173
2237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
2174
2238
|
type: Component,
|
|
@@ -2184,7 +2248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2184
2248
|
CheckboxModule,
|
|
2185
2249
|
FormsModule,
|
|
2186
2250
|
FormatCellPipe,
|
|
2187
|
-
], 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 [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (
|
|
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" }]
|
|
2188
2252
|
}], propDecorators: { ComponentId: [{
|
|
2189
2253
|
type: Input
|
|
2190
2254
|
}], ListData: [{
|
|
@@ -2223,6 +2287,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2223
2287
|
type: Input
|
|
2224
2288
|
}], tableStyle: [{
|
|
2225
2289
|
type: Input
|
|
2290
|
+
}], IsTableDisabled: [{
|
|
2291
|
+
type: Input
|
|
2226
2292
|
}], EmitSelectedItem: [{
|
|
2227
2293
|
type: Output
|
|
2228
2294
|
}], EmitListDataFilter: [{
|
|
@@ -5752,6 +5818,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5752
5818
|
type: Input
|
|
5753
5819
|
}] } });
|
|
5754
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
|
+
|
|
5755
5867
|
class HtmlToExcelService {
|
|
5756
5868
|
ExportTOExcel(idTabla, html, filename, tabname, extension) {
|
|
5757
5869
|
let Table = document.getElementById(idTabla);
|
|
@@ -9082,5 +9194,5 @@ const IntelicaTheme = definePreset(Aura, {
|
|
|
9082
9194
|
* Generated bundle index. Do not edit.
|
|
9083
9195
|
*/
|
|
9084
9196
|
|
|
9085
|
-
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 };
|
|
9086
9198
|
//# sourceMappingURL=intelica-library-ui.mjs.map
|