intelica-library-ui 0.1.176 → 0.1.178
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 +162 -38
- 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 +4 -0
- package/lib/components/table-fetch/table-fetch.component.d.ts +3 -0
- package/lib/components/tree-table/tree-table.component.d.ts +4 -2
- package/lib/services/echart.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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: [{
|
|
@@ -2139,8 +2145,30 @@ class TableComponent {
|
|
|
2139
2145
|
this.ListDataSelectedTemp = [];
|
|
2140
2146
|
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
2141
2147
|
}
|
|
2148
|
+
get minPageSize() {
|
|
2149
|
+
const a = this.AllowedPageSizes ?? [];
|
|
2150
|
+
return a.length ? Math.min(...a) : 0;
|
|
2151
|
+
}
|
|
2152
|
+
get totalItemsCount() {
|
|
2153
|
+
return this.ShowPagination ? this.TotalRecords : this.ListDataFilter.length;
|
|
2154
|
+
}
|
|
2155
|
+
get showRowPerPageControl() {
|
|
2156
|
+
return this.ShowRowPerPage && this.totalItemsCount > this.minPageSize;
|
|
2157
|
+
}
|
|
2158
|
+
get visiblePageSizes() {
|
|
2159
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
2160
|
+
if (!sizes.length)
|
|
2161
|
+
return [];
|
|
2162
|
+
const total = this.totalItemsCount; // usa el getter que ya te dejé
|
|
2163
|
+
const min = sizes[0];
|
|
2164
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
2165
|
+
const nextCeil = sizes.find(s => s >= total);
|
|
2166
|
+
// resultado en orden, sin duplicados, y filtrando undefined
|
|
2167
|
+
const result = Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
2168
|
+
return result;
|
|
2169
|
+
}
|
|
2142
2170
|
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" }] });
|
|
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" }] });
|
|
2144
2172
|
}
|
|
2145
2173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
2146
2174
|
type: Component,
|
|
@@ -2156,7 +2184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2156
2184
|
CheckboxModule,
|
|
2157
2185
|
FormsModule,
|
|
2158
2186
|
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=\"
|
|
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 (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" }]
|
|
2160
2188
|
}], propDecorators: { ComponentId: [{
|
|
2161
2189
|
type: Input
|
|
2162
2190
|
}], ListData: [{
|
|
@@ -2373,7 +2401,6 @@ class TreeTableComponent {
|
|
|
2373
2401
|
SelectedIdentifier = null;
|
|
2374
2402
|
ListSearchOptions = [];
|
|
2375
2403
|
ShowRowPerPage = true;
|
|
2376
|
-
DefaultChildrenColumnName = "";
|
|
2377
2404
|
EmitSelectedItem = new EventEmitter();
|
|
2378
2405
|
EmitListDataFilter = new EventEmitter();
|
|
2379
2406
|
EmitSearchEvent = new EventEmitter();
|
|
@@ -2408,6 +2435,15 @@ class TreeTableComponent {
|
|
|
2408
2435
|
}
|
|
2409
2436
|
this.ExecuteSearch({});
|
|
2410
2437
|
this.ValidateSelect();
|
|
2438
|
+
const vis = this.visiblePageSizes;
|
|
2439
|
+
if (vis.length && !vis.includes(this.RowsPerPage)) {
|
|
2440
|
+
const next = vis.find(v => v >= this.RowsPerPage) ?? vis[vis.length - 1];
|
|
2441
|
+
if (this.RowsPerPage !== next) {
|
|
2442
|
+
this.RowsPerPage = next;
|
|
2443
|
+
this.CurrentPage = 1;
|
|
2444
|
+
this.UpdatePages();
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2411
2447
|
}
|
|
2412
2448
|
ngAfterContentInit() {
|
|
2413
2449
|
this.ColumnList = this.Columns.toArray();
|
|
@@ -2556,8 +2592,29 @@ class TreeTableComponent {
|
|
|
2556
2592
|
this.RowsPerPage = value;
|
|
2557
2593
|
this.ResetTable();
|
|
2558
2594
|
}
|
|
2595
|
+
// Mínimo permitido en AllowedPageSizes
|
|
2596
|
+
get minPageSize() {
|
|
2597
|
+
const a = this.AllowedPageSizes ?? [];
|
|
2598
|
+
return a.length ? Math.min(...a) : 0;
|
|
2599
|
+
}
|
|
2600
|
+
// Opciones visibles: mínimo, todas <= total y la siguiente >= total (ceil)
|
|
2601
|
+
get visiblePageSizes() {
|
|
2602
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
2603
|
+
if (!sizes.length)
|
|
2604
|
+
return [];
|
|
2605
|
+
const total = this.TotalRecords || this.ListDataFilter.length;
|
|
2606
|
+
const min = sizes[0];
|
|
2607
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
2608
|
+
const nextCeil = sizes.find(s => s >= total);
|
|
2609
|
+
return Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
2610
|
+
}
|
|
2611
|
+
// Mostrar el control "Items per page" solo cuando tenga sentido
|
|
2612
|
+
get showRowPerPageControl() {
|
|
2613
|
+
const total = this.TotalRecords || this.ListDataFilter.length;
|
|
2614
|
+
return this.ShowRowPerPage && total > this.minPageSize;
|
|
2615
|
+
}
|
|
2559
2616
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2560
|
-
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", DefaultChildrenColumnName: "DefaultChildrenColumnName" }, 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 === DefaultChildrenColumnName &&\r\n rowData.children && 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 === DefaultChildrenColumnName\r\n ? 'prTable__expandIdentText'\r\n : ''\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" }] });
|
|
2617
|
+
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" }] });
|
|
2561
2618
|
}
|
|
2562
2619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, decorators: [{
|
|
2563
2620
|
type: Component,
|
|
@@ -2574,7 +2631,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2574
2631
|
FormsModule,
|
|
2575
2632
|
ButtonModule,
|
|
2576
2633
|
FormatCellPipe,
|
|
2577
|
-
], 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 === DefaultChildrenColumnName &&\r\n rowData.children && 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 === DefaultChildrenColumnName\r\n ? 'prTable__expandIdentText'\r\n : ''\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" }]
|
|
2634
|
+
], 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" }]
|
|
2578
2635
|
}], propDecorators: { ComponentId: [{
|
|
2579
2636
|
type: Input
|
|
2580
2637
|
}], ListData: [{
|
|
@@ -2617,8 +2674,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2617
2674
|
type: Input
|
|
2618
2675
|
}], ShowRowPerPage: [{
|
|
2619
2676
|
type: Input
|
|
2620
|
-
}], DefaultChildrenColumnName: [{
|
|
2621
|
-
type: Input
|
|
2622
2677
|
}], EmitSelectedItem: [{
|
|
2623
2678
|
type: Output
|
|
2624
2679
|
}], EmitListDataFilter: [{
|
|
@@ -2703,12 +2758,15 @@ class MatrixColumnGroupComponent {
|
|
|
2703
2758
|
header;
|
|
2704
2759
|
sortable = false;
|
|
2705
2760
|
width;
|
|
2761
|
+
className;
|
|
2762
|
+
headerTooltip = "";
|
|
2763
|
+
headerTooltipPosition = "top";
|
|
2706
2764
|
minWidth;
|
|
2707
2765
|
colspan = 1;
|
|
2708
2766
|
rowspan = 1;
|
|
2709
2767
|
level = 0;
|
|
2710
2768
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixColumnGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2711
|
-
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 });
|
|
2769
|
+
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 });
|
|
2712
2770
|
}
|
|
2713
2771
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixColumnGroupComponent, decorators: [{
|
|
2714
2772
|
type: Directive,
|
|
@@ -2721,6 +2779,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2721
2779
|
type: Input
|
|
2722
2780
|
}], width: [{
|
|
2723
2781
|
type: Input
|
|
2782
|
+
}], className: [{
|
|
2783
|
+
type: Input
|
|
2784
|
+
}], headerTooltip: [{
|
|
2785
|
+
type: Input
|
|
2786
|
+
}], headerTooltipPosition: [{
|
|
2787
|
+
type: Input
|
|
2724
2788
|
}], minWidth: [{
|
|
2725
2789
|
type: Input
|
|
2726
2790
|
}], colspan: [{
|
|
@@ -2756,11 +2820,11 @@ class MatrixTableComponent {
|
|
|
2756
2820
|
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
2757
2821
|
}
|
|
2758
2822
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2759
|
-
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\"
|
|
2823
|
+
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 }] });
|
|
2760
2824
|
}
|
|
2761
2825
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MatrixTableComponent, decorators: [{
|
|
2762
2826
|
type: Component,
|
|
2763
|
-
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\"
|
|
2827
|
+
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" }]
|
|
2764
2828
|
}], propDecorators: { ComponentId: [{
|
|
2765
2829
|
type: Input
|
|
2766
2830
|
}], ListData: [{
|
|
@@ -5055,9 +5119,7 @@ class TableFetchComponent {
|
|
|
5055
5119
|
ListDataTable = [];
|
|
5056
5120
|
ngOnChanges(changes) {
|
|
5057
5121
|
this.LoadSearchOptions();
|
|
5058
|
-
if (changes["FilteredList"] ||
|
|
5059
|
-
changes["RowsPerPage"] ||
|
|
5060
|
-
changes["CurrentPage"]) {
|
|
5122
|
+
if (changes["FilteredList"] || changes["RowsPerPage"] || changes["CurrentPage"]) {
|
|
5061
5123
|
this.UpdatePages();
|
|
5062
5124
|
}
|
|
5063
5125
|
if (changes["sortField"] || changes["SortOrder"]) {
|
|
@@ -5068,6 +5130,17 @@ class TableFetchComponent {
|
|
|
5068
5130
|
},
|
|
5069
5131
|
]);
|
|
5070
5132
|
}
|
|
5133
|
+
const vis = this.visiblePageSizes;
|
|
5134
|
+
if (vis.length && !vis.includes(this.RowsPerPage)) {
|
|
5135
|
+
const next = vis.find(v => v >= this.RowsPerPage) ?? vis[vis.length - 1];
|
|
5136
|
+
if (this.RowsPerPage !== next) {
|
|
5137
|
+
this.RowsPerPage = next;
|
|
5138
|
+
if (this.ShowPagination) {
|
|
5139
|
+
this.CurrentPage = 1;
|
|
5140
|
+
}
|
|
5141
|
+
this.UpdatePages();
|
|
5142
|
+
}
|
|
5143
|
+
}
|
|
5071
5144
|
}
|
|
5072
5145
|
ngAfterContentInit() {
|
|
5073
5146
|
this.ColumnList = this.Columns.toArray();
|
|
@@ -5151,8 +5224,28 @@ class TableFetchComponent {
|
|
|
5151
5224
|
this.CurrentPage = 1;
|
|
5152
5225
|
this.ExecuteSearch({});
|
|
5153
5226
|
}
|
|
5227
|
+
// Mínimo de AllowedPageSizes (si no hay, 0)
|
|
5228
|
+
get minPageSize() {
|
|
5229
|
+
const a = this.AllowedPageSizes ?? [];
|
|
5230
|
+
return a.length ? Math.min(...a) : 0;
|
|
5231
|
+
}
|
|
5232
|
+
// Opciones visibles: mínimo, todas <= total, y el siguiente >= total (ceil)
|
|
5233
|
+
get visiblePageSizes() {
|
|
5234
|
+
const sizes = (this.AllowedPageSizes ?? []).slice().sort((a, b) => a - b);
|
|
5235
|
+
if (!sizes.length)
|
|
5236
|
+
return [];
|
|
5237
|
+
const total = this.TotalItems;
|
|
5238
|
+
const min = sizes[0];
|
|
5239
|
+
const lessOrEqual = sizes.filter(s => s <= total);
|
|
5240
|
+
const nextCeil = sizes.find(s => s >= total); // puede repetir min, luego se deduplica
|
|
5241
|
+
return Array.from(new Set([min, ...lessOrEqual, nextCeil].filter((v) => typeof v === 'number')));
|
|
5242
|
+
}
|
|
5243
|
+
// Mostrar control "Items per page" solo si tiene sentido
|
|
5244
|
+
get showRowPerPageControl() {
|
|
5245
|
+
return this.ShowRowPerPage && this.TotalItems > this.minPageSize;
|
|
5246
|
+
}
|
|
5154
5247
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5155
|
-
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" }] });
|
|
5248
|
+
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" }] });
|
|
5156
5249
|
}
|
|
5157
5250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, decorators: [{
|
|
5158
5251
|
type: Component,
|
|
@@ -5168,7 +5261,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
5168
5261
|
SearchComponent,
|
|
5169
5262
|
PaginatorComponent,
|
|
5170
5263
|
FormatCellPipe,
|
|
5171
|
-
], 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=\"
|
|
5264
|
+
], 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" }]
|
|
5172
5265
|
}], propDecorators: { ComponentId: [{
|
|
5173
5266
|
type: Input
|
|
5174
5267
|
}], ShowRowPerPage: [{
|
|
@@ -6278,26 +6371,57 @@ class EchartService {
|
|
|
6278
6371
|
* @param showLegend - Optional flag to show the legend
|
|
6279
6372
|
* @returns - EChartsOption - Configuration object for the bar chart
|
|
6280
6373
|
*/
|
|
6281
|
-
getBarChartTopOptions(categories, series, categoryWidth = 240, labelConfig, tooltipConfig, showLegend = false) {
|
|
6282
|
-
|
|
6374
|
+
getBarChartTopOptions(categories, series, categoryWidth = 240, labelConfig, tooltipConfig, showLegend = false, categoryFormatter) {
|
|
6375
|
+
const barBase = this.getBarChartHorizontalOptions(categories, series, labelConfig, tooltipConfig, showLegend);
|
|
6283
6376
|
if (barBase.yAxis) {
|
|
6284
|
-
barBase.yAxis
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6377
|
+
const y = barBase.yAxis;
|
|
6378
|
+
const gr = barBase.grid;
|
|
6379
|
+
const defaultCategoryFormatter = (value, index) => {
|
|
6380
|
+
const lineLength = 35;
|
|
6381
|
+
const prefix = `${index + 1} - `;
|
|
6382
|
+
const words = value.split(' ');
|
|
6383
|
+
let lines = [];
|
|
6384
|
+
let currentLine = '';
|
|
6385
|
+
for (const word of words) {
|
|
6386
|
+
const testLine = currentLine ? `${currentLine} ${word}` : word;
|
|
6387
|
+
if (testLine.length <= lineLength) {
|
|
6388
|
+
currentLine = testLine;
|
|
6389
|
+
}
|
|
6390
|
+
else {
|
|
6391
|
+
lines.push(currentLine);
|
|
6392
|
+
currentLine = word;
|
|
6393
|
+
}
|
|
6394
|
+
}
|
|
6395
|
+
if (currentLine)
|
|
6396
|
+
lines.push(currentLine);
|
|
6397
|
+
return prefix + lines
|
|
6398
|
+
.map((line, i) => (i === 0 ? line : `\u2008\u2008\u2008\u2008\u2008\u2008\u2009${line}`))
|
|
6399
|
+
.join('\n');
|
|
6400
|
+
};
|
|
6401
|
+
y.inverse = true;
|
|
6402
|
+
y.axisLabel = {
|
|
6403
|
+
...y.axisLabel,
|
|
6404
|
+
color: Color.blue,
|
|
6405
|
+
fontSize: 12,
|
|
6406
|
+
width: categoryWidth,
|
|
6407
|
+
overflow: "break",
|
|
6408
|
+
align: "left",
|
|
6409
|
+
verticalAlign: "middle",
|
|
6410
|
+
margin: categoryWidth + 30,
|
|
6411
|
+
lineHeight: 16,
|
|
6412
|
+
formatter: categoryFormatter || defaultCategoryFormatter,
|
|
6413
|
+
};
|
|
6414
|
+
gr.top = "0%";
|
|
6415
|
+
gr.left = -1 * categoryWidth + 60;
|
|
6416
|
+
gr.right = 20;
|
|
6417
|
+
gr.bottom = "0%";
|
|
6418
|
+
gr.containLabel = true;
|
|
6419
|
+
}
|
|
6420
|
+
barBase.series.forEach((serie) => {
|
|
6421
|
+
serie.label = {
|
|
6422
|
+
...(serie.label || {}),
|
|
6423
|
+
formatter: labelConfig,
|
|
6424
|
+
};
|
|
6301
6425
|
});
|
|
6302
6426
|
return barBase;
|
|
6303
6427
|
}
|