intelica-library-components 1.1.50 → 1.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, ContentChildren, Output, HostListener, forwardRef, ViewChild, PLATFORM_ID, Inject, output, Optional, Host } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, signal, Pipe, Component, TemplateRef, ContentChild, Input, Directive, EventEmitter, ContentChildren, Output, HostListener, forwardRef, ViewChild, PLATFORM_ID, Inject, DestroyRef, output, Optional, Host } from '@angular/core';
|
|
3
3
|
import { getCookie, setCookie, Cookies } from 'typescript-cookie';
|
|
4
4
|
import * as i1$4 from '@angular/common/http';
|
|
5
5
|
import { HttpClient, HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
6
|
-
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription,
|
|
6
|
+
import { BehaviorSubject, catchError, throwError, from, switchMap, Subject, Subscription, tap as tap$1, of, map, fromEvent, startWith, distinctUntilChanged, shareReplay, firstValueFrom } from 'rxjs';
|
|
7
7
|
import Swal from 'sweetalert2';
|
|
8
|
-
import {
|
|
8
|
+
import { Guid } from 'guid-typescript';
|
|
9
|
+
import { tap, catchError as catchError$1 } from 'rxjs/operators';
|
|
9
10
|
import * as i1 from '@angular/common';
|
|
10
11
|
import { DatePipe, CommonModule, isPlatformBrowser, NgClass } from '@angular/common';
|
|
11
12
|
import * as i1$1 from '@angular/forms';
|
|
@@ -51,11 +52,11 @@ import * as i2$4 from 'primeng/skeleton';
|
|
|
51
52
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
52
53
|
import * as i1$3 from 'primeng/confirmdialog';
|
|
53
54
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
55
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
54
56
|
import * as XLSX from 'xlsx';
|
|
55
57
|
import { Workbook } from 'exceljs';
|
|
56
58
|
import { saveAs } from 'file-saver';
|
|
57
59
|
import JSEncrypt from 'jsencrypt';
|
|
58
|
-
import { Guid } from 'guid-typescript';
|
|
59
60
|
import Aura from '@primeng/themes/aura';
|
|
60
61
|
import { definePreset } from '@primeng/themes';
|
|
61
62
|
import * as signalR from '@microsoft/signalr';
|
|
@@ -486,6 +487,154 @@ const ErrorInterceptor = (req, next) => {
|
|
|
486
487
|
}
|
|
487
488
|
};
|
|
488
489
|
|
|
490
|
+
class IntelicaSessionService {
|
|
491
|
+
configService = inject(ConfigService);
|
|
492
|
+
prefix = "itl.session.";
|
|
493
|
+
sessionIdKey = "itl.session.__sessionId";
|
|
494
|
+
pageRoot = "";
|
|
495
|
+
sessionId = null;
|
|
496
|
+
constructor() {
|
|
497
|
+
this.ensureSessionId();
|
|
498
|
+
this.cleanupForeignSessions();
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Actualiza el pageRoot actual, es necesario matricularlo en el app.component
|
|
502
|
+
*/
|
|
503
|
+
setPageRoot(pageRoot) {
|
|
504
|
+
this.pageRoot = pageRoot;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Retorna la key de usuario con scope si necesitas reutilizarla manualmente.
|
|
508
|
+
*/
|
|
509
|
+
getUserKey(key) {
|
|
510
|
+
return this.buildScopedKey(key, "user");
|
|
511
|
+
}
|
|
512
|
+
ensureSessionId() {
|
|
513
|
+
if (this.sessionId)
|
|
514
|
+
return this.sessionId;
|
|
515
|
+
const stored = localStorage.getItem(this.sessionIdKey);
|
|
516
|
+
if (stored) {
|
|
517
|
+
this.sessionId = stored;
|
|
518
|
+
return stored;
|
|
519
|
+
}
|
|
520
|
+
const id = this.createGuid();
|
|
521
|
+
this.sessionId = id;
|
|
522
|
+
localStorage.setItem(this.sessionIdKey, id);
|
|
523
|
+
return id;
|
|
524
|
+
}
|
|
525
|
+
createGuid() {
|
|
526
|
+
return Guid.create().toString();
|
|
527
|
+
}
|
|
528
|
+
buildScopedKey(key, scope = "user-profile") {
|
|
529
|
+
const parts = [];
|
|
530
|
+
if (this.pageRoot)
|
|
531
|
+
parts.push(this.pageRoot);
|
|
532
|
+
parts.push(key);
|
|
533
|
+
const userId = this.configService.SessionInformation?.businessUserID;
|
|
534
|
+
const profileId = this.configService.SessionInformation?.businessUserProfile;
|
|
535
|
+
if (scope === "user" || scope === "user-profile") {
|
|
536
|
+
if (userId)
|
|
537
|
+
parts.push(`user:${userId}`);
|
|
538
|
+
}
|
|
539
|
+
if (scope === "profile" || scope === "user-profile") {
|
|
540
|
+
if (profileId)
|
|
541
|
+
parts.push(`profile:${profileId}`);
|
|
542
|
+
}
|
|
543
|
+
return parts.join("|");
|
|
544
|
+
}
|
|
545
|
+
set(key, value, scope = "user-profile") {
|
|
546
|
+
this.ensureSessionId();
|
|
547
|
+
const storageKey = this.buildScopedKey(key, scope);
|
|
548
|
+
const envelope = {
|
|
549
|
+
sessionId: this.sessionId,
|
|
550
|
+
updatedAt: Date.now(),
|
|
551
|
+
value,
|
|
552
|
+
};
|
|
553
|
+
localStorage.setItem(this.prefix + storageKey, JSON.stringify(envelope));
|
|
554
|
+
}
|
|
555
|
+
get(key, scope = "user-profile") {
|
|
556
|
+
const storageKey = this.buildScopedKey(key, scope);
|
|
557
|
+
const raw = localStorage.getItem(this.prefix + storageKey);
|
|
558
|
+
if (!raw)
|
|
559
|
+
return null;
|
|
560
|
+
try {
|
|
561
|
+
const env = JSON.parse(raw);
|
|
562
|
+
if (!this.sessionId || env.sessionId !== this.sessionId)
|
|
563
|
+
return null;
|
|
564
|
+
return env.value;
|
|
565
|
+
}
|
|
566
|
+
catch {
|
|
567
|
+
return null;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Limpia todo lo que haya en localStorage para este servicio (todas las sesiones).
|
|
572
|
+
* Úsalo al iniciar sesión/cerrar sesión para evitar acumulación.
|
|
573
|
+
*/
|
|
574
|
+
clearAll() {
|
|
575
|
+
Object.keys(localStorage)
|
|
576
|
+
.filter(k => k.startsWith(this.prefix))
|
|
577
|
+
.forEach(k => localStorage.removeItem(k));
|
|
578
|
+
localStorage.removeItem(this.sessionIdKey);
|
|
579
|
+
this.sessionId = null;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Limpia los valores de la sesión actual para el pageRoot vigente.
|
|
583
|
+
*/
|
|
584
|
+
clearCurrentPageRoot() {
|
|
585
|
+
if (!this.pageRoot)
|
|
586
|
+
return;
|
|
587
|
+
this.clearPageRoot(this.pageRoot);
|
|
588
|
+
}
|
|
589
|
+
clearPageRoot(pageRoot) {
|
|
590
|
+
const prefix = `${this.prefix}${pageRoot}|`;
|
|
591
|
+
Object.keys(localStorage)
|
|
592
|
+
.filter(k => k.startsWith(prefix))
|
|
593
|
+
.forEach(k => {
|
|
594
|
+
const raw = localStorage.getItem(k);
|
|
595
|
+
if (!raw)
|
|
596
|
+
return;
|
|
597
|
+
const env = this.tryParseEnvelope(raw);
|
|
598
|
+
if (!env || env.sessionId !== this.sessionId)
|
|
599
|
+
return;
|
|
600
|
+
localStorage.removeItem(k);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
cleanupForeignSessions() {
|
|
604
|
+
if (!this.sessionId)
|
|
605
|
+
return;
|
|
606
|
+
Object.keys(localStorage)
|
|
607
|
+
.filter(k => k.startsWith(this.prefix))
|
|
608
|
+
.forEach(k => {
|
|
609
|
+
const raw = localStorage.getItem(k);
|
|
610
|
+
if (!raw)
|
|
611
|
+
return;
|
|
612
|
+
const env = this.tryParseEnvelope(raw);
|
|
613
|
+
if (!env)
|
|
614
|
+
return;
|
|
615
|
+
if (env.sessionId !== this.sessionId) {
|
|
616
|
+
localStorage.removeItem(k);
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
tryParseEnvelope(raw) {
|
|
621
|
+
try {
|
|
622
|
+
return JSON.parse(raw);
|
|
623
|
+
}
|
|
624
|
+
catch {
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
629
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, providedIn: "root" });
|
|
630
|
+
}
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, decorators: [{
|
|
632
|
+
type: Injectable,
|
|
633
|
+
args: [{
|
|
634
|
+
providedIn: "root",
|
|
635
|
+
}]
|
|
636
|
+
}], ctorParameters: () => [] });
|
|
637
|
+
|
|
489
638
|
const RefreshTokenInterceptor = (req, next) => {
|
|
490
639
|
const skip = req.headers.has("Skip-Interceptor");
|
|
491
640
|
if (skip) {
|
|
@@ -497,6 +646,7 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
497
646
|
const configService = inject(ConfigService);
|
|
498
647
|
const httpClient = inject(HttpClient);
|
|
499
648
|
const commonFeatureFlagService = inject(GlobalFeatureFlagService);
|
|
649
|
+
const intelicaSessionService = inject(IntelicaSessionService);
|
|
500
650
|
const cookieAttributesGeneral = GetCookieAttributes(configService.environment?.environment ?? "");
|
|
501
651
|
let _request = req.clone();
|
|
502
652
|
let authenticationLocation = `${configService.environment?.authenticationWeb}?callback=${window.location.href}&clientID=${configService.environment?.clientID}`;
|
|
@@ -511,15 +661,12 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
511
661
|
controller: "",
|
|
512
662
|
httpVerb: "GET",
|
|
513
663
|
businessUserClientGroupID: getCookie("businessUserClientGroupID") ?? "",
|
|
514
|
-
access: authenticationClientID == ""
|
|
515
|
-
? ""
|
|
516
|
-
: getCookie(authenticationClientID) ?? "",
|
|
664
|
+
access: authenticationClientID == "" ? "" : (getCookie(authenticationClientID) ?? ""),
|
|
517
665
|
};
|
|
518
|
-
if (!req.url.includes("ValidateToken") &&
|
|
519
|
-
!req.url.includes("environment.json") &&
|
|
520
|
-
!req.url.includes("GetAuthenticationFromCache"))
|
|
666
|
+
if (!req.url.includes("ValidateToken") && !req.url.includes("environment.json") && !req.url.includes("GetAuthenticationFromCache"))
|
|
521
667
|
return from(httpClient.post(path, validateTokenQuery)).pipe(switchMap((response) => {
|
|
522
668
|
if (response.expired) {
|
|
669
|
+
intelicaSessionService.clearAll();
|
|
523
670
|
Cookies.remove("token", cookieAttributesGeneral);
|
|
524
671
|
Cookies.remove("refreshToken", cookieAttributesGeneral);
|
|
525
672
|
Cookies.remove("data", cookieAttributesGeneral);
|
|
@@ -530,8 +677,9 @@ const RefreshTokenInterceptor = (req, next) => {
|
|
|
530
677
|
window.location.href = authenticationLocation;
|
|
531
678
|
return next(_request);
|
|
532
679
|
}
|
|
533
|
-
if (response.unauthorized)
|
|
680
|
+
if (response.unauthorized) {
|
|
534
681
|
window.location.href = window.location.origin;
|
|
682
|
+
}
|
|
535
683
|
if (response.newToken != "")
|
|
536
684
|
setCookie("token", response.newToken, cookieAttributesGeneral);
|
|
537
685
|
return next(_request);
|
|
@@ -2097,8 +2245,11 @@ class TableComponent {
|
|
|
2097
2245
|
}
|
|
2098
2246
|
this.UpdatePages();
|
|
2099
2247
|
}
|
|
2248
|
+
get RenderPanel() {
|
|
2249
|
+
return Boolean(this.AdditionalTemplate) || this.ShowSearch || Boolean(this.AdditionalCentralTemplate) || Boolean(this.AdditionalExtendedTemplate);
|
|
2250
|
+
}
|
|
2100
2251
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2101
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", IsTableDisabled: "IsTableDisabled" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"grPanel\">\r\n\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t\t@if (ShowSearch) {\r\n\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tclass=\"prInputText\"\r\n\t\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\t\tplaceholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"SearchInput.searchText\"\r\n\t\t\t\t\t\t\t(keydown.enter)=\"ExecuteSearch()\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput.searchText\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput.searchText\"></span>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t\t[sortOrder]=\"DefaultSortOrder\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\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) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t@if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\t\t<p-checkbox\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[binary]=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t\t\t\t\t\t\t\t[(ngModel)]=\"HeaderState[col.field].checked\"\r\n\t\t\t\t\t\t\t\t\t\t\t(ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n\t\t\t\t\t\t\t\t\t\t\t[attr.data-check]=\"col.field\"\r\n\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"IsTableDisabled\"\r\n\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': HeaderState[col.field].indeterminate,\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t\t></p-checkbox>\r\n\t\t\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t@if (ListDataFilter.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<ng-template #defaultContent></ng-template>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\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 $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t<p-checkbox [binary]=\"true\" [(ngModel)]=\"rowData[col.field]\" (onChange)=\"onBodyCheckboxChange(col.field)\" [disabled]=\"IsTableDisabled\"></p-checkbox>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\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 + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</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: IconFieldModule }, { kind: "component", type: i2.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$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: TermPipe, name: "term" }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2252
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", IsTableDisabled: "IsTableDisabled" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t@if (RenderPanel) {\r\n\t\t<div class=\"grPanel\">\r\n\t\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t@if (ShowSearch) {\r\n\t\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tclass=\"prInputText\"\r\n\t\t\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\t\t\tplaceholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"SearchInput.searchText\"\r\n\t\t\t\t\t\t\t\t(keydown.enter)=\"ExecuteSearch()\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput.searchText\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput.searchText\"></span>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\r\n\t\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\t}\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t\t[sortOrder]=\"DefaultSortOrder\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\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) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t@if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\t\t<p-checkbox\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[binary]=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t\t\t\t\t\t\t\t[(ngModel)]=\"HeaderState[col.field].checked\"\r\n\t\t\t\t\t\t\t\t\t\t\t(ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n\t\t\t\t\t\t\t\t\t\t\t[attr.data-check]=\"col.field\"\r\n\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"IsTableDisabled\"\r\n\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': HeaderState[col.field].indeterminate,\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t\t></p-checkbox>\r\n\t\t\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t@if (ListDataFilter.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<ng-template #defaultContent></ng-template>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\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 $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t<p-checkbox [binary]=\"true\" [(ngModel)]=\"rowData[col.field]\" (onChange)=\"onBodyCheckboxChange(col.field)\" [disabled]=\"IsTableDisabled\"></p-checkbox>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\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 + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</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: IconFieldModule }, { kind: "component", type: i2.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$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: TermPipe, name: "term" }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2102
2253
|
}
|
|
2103
2254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TableComponent, decorators: [{
|
|
2104
2255
|
type: Component,
|
|
@@ -2118,7 +2269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2118
2269
|
CheckboxModule,
|
|
2119
2270
|
FormsModule,
|
|
2120
2271
|
FormatCellPipe,
|
|
2121
|
-
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n\t<div class=\"grPanel\">\r\n\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t\t@if (ShowSearch) {\r\n\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\tclass=\"prInputText\"\r\n\t\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\t\tplaceholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"SearchInput.searchText\"\r\n\t\t\t\t\t\t\t(keydown.enter)=\"ExecuteSearch()\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput.searchText\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput.searchText\"></span>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\r\n\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t\t[sortOrder]=\"DefaultSortOrder\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\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) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t@if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\t\t<p-checkbox\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[binary]=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t\t\t\t\t\t\t\t[(ngModel)]=\"HeaderState[col.field].checked\"\r\n\t\t\t\t\t\t\t\t\t\t\t(ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n\t\t\t\t\t\t\t\t\t\t\t[attr.data-check]=\"col.field\"\r\n\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"IsTableDisabled\"\r\n\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': HeaderState[col.field].indeterminate,\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t\t></p-checkbox>\r\n\t\t\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t@if (ListDataFilter.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<ng-template #defaultContent></ng-template>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\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 $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t<p-checkbox [binary]=\"true\" [(ngModel)]=\"rowData[col.field]\" (onChange)=\"onBodyCheckboxChange(col.field)\" [disabled]=\"IsTableDisabled\"></p-checkbox>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\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 + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n</div>\r\n" }]
|
|
2272
|
+
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n\t@if (RenderPanel) {\r\n\t\t<div class=\"grPanel\">\r\n\t\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t@if (ShowSearch) {\r\n\t\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\t\t\tclass=\"prInputText\"\r\n\t\t\t\t\t\t\t\tpInputText\r\n\t\t\t\t\t\t\t\tplaceholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"SearchInput.searchText\"\r\n\t\t\t\t\t\t\t\t(keydown.enter)=\"ExecuteSearch()\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput.searchText\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput.searchText\"></span>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\r\n\t\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\t}\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"ListDataTable\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[(selection)]=\"ListDataSelectedFilter\"\r\n\t\t(onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n\t\t(onRowSelect)=\"OnRowSelect($event)\"\r\n\t\t(onRowUnselect)=\"OnRowUnselect($event)\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t\t[sortOrder]=\"DefaultSortOrder\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\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) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t@if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\t\t\t\t<p-checkbox\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[binary]=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t\t\t\t\t\t\t\t[(ngModel)]=\"HeaderState[col.field].checked\"\r\n\t\t\t\t\t\t\t\t\t\t\t(ngModelChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n\t\t\t\t\t\t\t\t\t\t\t[attr.data-check]=\"col.field\"\r\n\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"IsTableDisabled\"\r\n\t\t\t\t\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': HeaderState[col.field].indeterminate,\r\n\t\t\t\t\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t\t\t\t\t></p-checkbox>\r\n\t\t\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox\r\n\t\t\t\t\t\t\tclass=\"prCheckbox\"\r\n\t\t\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\t\t\t'prCheckbox--indeterminate': ListDataSelectedTemp.length > 0 && ListDataSelectedTemp.length < ListDataFilter.length,\r\n\t\t\t\t\t\t\t}\"\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t\t@if (ListDataFilter.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<ng-template #defaultContent></ng-template>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\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 $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else if (col.isChecboxColumn) {\r\n\t\t\t\t\t\t\t\t<p-checkbox [binary]=\"true\" [(ngModel)]=\"rowData[col.field]\" (onChange)=\"onBodyCheckboxChange(col.field)\" [disabled]=\"IsTableDisabled\"></p-checkbox>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.tooltip\" [tooltipPosition]=\"col.tooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\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 + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n</div>\r\n" }]
|
|
2122
2273
|
}], propDecorators: { ComponentId: [{
|
|
2123
2274
|
type: Input
|
|
2124
2275
|
}], ListData: [{
|
|
@@ -5782,7 +5933,6 @@ class TableFetchComponent {
|
|
|
5782
5933
|
TotalRecords = 0;
|
|
5783
5934
|
IsPaginatorInputSearch = false;
|
|
5784
5935
|
EmitQueryParametersChange = new EventEmitter();
|
|
5785
|
-
SearchTable;
|
|
5786
5936
|
Columns;
|
|
5787
5937
|
ColumnGroups;
|
|
5788
5938
|
RowResumenGroups;
|
|
@@ -5803,7 +5953,6 @@ class TableFetchComponent {
|
|
|
5803
5953
|
this.cdr = cdr;
|
|
5804
5954
|
}
|
|
5805
5955
|
ngOnChanges(changes) {
|
|
5806
|
-
// this.LoadSearchOptions();
|
|
5807
5956
|
if (changes["FilteredList"] || changes["RowsPerPage"] || changes["CurrentPage"]) {
|
|
5808
5957
|
this.UpdatePages();
|
|
5809
5958
|
}
|
|
@@ -5883,10 +6032,6 @@ class TableFetchComponent {
|
|
|
5883
6032
|
}
|
|
5884
6033
|
ResetTable() {
|
|
5885
6034
|
this.CurrentPage = 1;
|
|
5886
|
-
if (this.SearchTable) {
|
|
5887
|
-
this.SearchTable.ClearSearchText();
|
|
5888
|
-
this.SearchInput = "";
|
|
5889
|
-
}
|
|
5890
6035
|
this.ExecuteSearch({});
|
|
5891
6036
|
}
|
|
5892
6037
|
ExecuteSearch(event) {
|
|
@@ -5918,6 +6063,9 @@ class TableFetchComponent {
|
|
|
5918
6063
|
get TotalPages() {
|
|
5919
6064
|
return Math.ceil(this.TotalRecords / this.RowsPerPage);
|
|
5920
6065
|
}
|
|
6066
|
+
get RenderPanel() {
|
|
6067
|
+
return Boolean(this.AdditionalTemplate) || this.ShowSearch || Boolean(this.AdditionalCentralTemplate) || Boolean(this.AdditionalExtendedTemplate);
|
|
6068
|
+
}
|
|
5921
6069
|
onChangeSelectPage(event) {
|
|
5922
6070
|
const eventValue = event.target.value;
|
|
5923
6071
|
if (eventValue === "" || isNaN(parseInt(eventValue)) || eventValue === "0" || eventValue.indexOf("-") >= 0) {
|
|
@@ -5932,7 +6080,7 @@ class TableFetchComponent {
|
|
|
5932
6080
|
this.ExecuteSearch({});
|
|
5933
6081
|
}
|
|
5934
6082
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TableFetchComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5935
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableFetchComponent, isStandalone: true, selector: "intelica-table-fetch", inputs: { ComponentId: "ComponentId", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", 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: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"grPanel\">\r\n\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\r\n\t\t\t@if (ShowSearch) {\r\n\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t<input type=\"text\" class=\"prInputText\" pInputText placeholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\" [(ngModel)]=\"SearchInput\" (keydown.enter)=\"ExecuteSearch()\" />\r\n\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput\"></span>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<!-- -->\r\n\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\t</div>\r\n\t@if (AdditionalExtendedTemplate) {\r\n\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t</div>\r\n\t}\r\n\t<!-- Tabla que muestra FilteredList -->\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"FilteredList\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[sortOrder]=\"SortOrder\"\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<!-- Cabecera con columnas agrupadas -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" F [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\r\n\t\t\t@if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Mensaje cuando no hay datos -->\r\n\t\t<ng-template pTemplate=\"emptymessage\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\r\n\t<!-- <div class=\"prTableToolsBottom\"> -->\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$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: 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: i3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
6083
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TableFetchComponent, isStandalone: true, selector: "intelica-table-fetch", inputs: { ComponentId: "ComponentId", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", 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 }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t@if (RenderPanel) {\r\n\t\t<div class=\"grPanel\">\r\n\t\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t@if (ShowSearch) {\r\n\t\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"prInputText\" pInputText placeholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\" [(ngModel)]=\"SearchInput\" (keydown.enter)=\"ExecuteSearch()\" />\r\n\t\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput\"></span>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t<!-- -->\r\n\t\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t</div>\r\n\t\t}\r\n\t}\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"FilteredList\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[sortOrder]=\"SortOrder\"\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<!-- Cabecera con columnas agrupadas -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" F [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\r\n\t\t\t@if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Mensaje cuando no hay datos -->\r\n\t\t<ng-template pTemplate=\"emptymessage\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\r\n\t<!-- <div class=\"prTableToolsBottom\"> -->\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "component", type: InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$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: 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: i3.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "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: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i3.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
5936
6084
|
}
|
|
5937
6085
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TableFetchComponent, decorators: [{
|
|
5938
6086
|
type: Component,
|
|
@@ -5953,7 +6101,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5953
6101
|
CheckboxModule,
|
|
5954
6102
|
FormsModule,
|
|
5955
6103
|
FormatCellPipe,
|
|
5956
|
-
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n\t<div class=\"grPanel\">\r\n\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\r\n\t\t\t@if (ShowSearch) {\r\n\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t<input type=\"text\" class=\"prInputText\" pInputText placeholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\" [(ngModel)]=\"SearchInput\" (keydown.enter)=\"ExecuteSearch()\" />\r\n\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput\"></span>\r\n\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t\t<!-- -->\r\n\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t}\r\n\t\t</div>\r\n\t</div>\r\n\t@if (AdditionalExtendedTemplate) {\r\n\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t</div>\r\n\t}\r\n\t
|
|
6104
|
+
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n\t@if (RenderPanel) {\r\n\t\t<div class=\"grPanel\">\r\n\t\t\t<div class=\"prCard__row justify-content-end\">\r\n\t\t\t\t<div class=\"prCard__actionflex\">\r\n\t\t\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t@if (ShowSearch) {\r\n\t\t\t\t\t<div class=\"ptSearch\">\r\n\t\t\t\t\t\t<p-iconfield>\r\n\t\t\t\t\t\t\t<input type=\"text\" class=\"prInputText\" pInputText placeholder=\"{{ 'LBL_SEARCH_SELECT' | term: GlobalTermService.languageCode }}\" [(ngModel)]=\"SearchInput\" (keydown.enter)=\"ExecuteSearch()\" />\r\n\t\t\t\t\t\t\t<p-inputicon>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--close\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-cancel\" *ngIf=\"SearchInput\" (click)=\"ClearSearch()\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<span class=\"ptSearch__icon ptSearch__icon--divider\" *ngIf=\"SearchInput\"></span>\r\n\t\t\t\t\t\t\t\t<button class=\"ptSearch__icon ptSearch__icon--search\">\r\n\t\t\t\t\t\t\t\t\t<i class=\"icon icon-search\"></i>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</p-inputicon>\r\n\t\t\t\t\t\t</p-iconfield>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t\t<!-- -->\r\n\t\t\t\t@if (AdditionalCentralTemplate) {\r\n\t\t\t\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t@if (AdditionalExtendedTemplate) {\r\n\t\t\t<div class=\"prTableTools justify-content-start\">\r\n\t\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n\t\t\t</div>\r\n\t\t}\r\n\t}\r\n\t<p-table\r\n\t\tclass=\"prTable\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\t[value]=\"FilteredList\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortField]=\"DefaultSortField\"\r\n\t\t[sortOrder]=\"SortOrder\"\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<!-- Cabecera con columnas agrupadas -->\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t@for (col of ColumnGroupList; track $index) {\r\n\t\t\t\t\t\t@if (col.level === level) {\r\n\t\t\t\t\t\t\t<th [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" F [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t@if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n\t\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\" [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\">\r\n\t\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t@if (col.showHeader) {\r\n\t\t\t\t\t\t<th\r\n\t\t\t\t\t\t\t[class]=\"col.className\"\r\n\t\t\t\t\t\t\t[pSortableColumn]=\"!col.isChecboxColumn && col.sortable ? col.field : ''\"\r\n\t\t\t\t\t\t\t[style.width]=\"col.width\"\r\n\t\t\t\t\t\t\t[style.min-width]=\"col.minWidth\"\r\n\t\t\t\t\t\t\t(click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<div class=\"prTable__header\">\r\n\t\t\t\t\t\t\t\t<span tooltipStyleClass=\"prTooltip\" [pTooltip]=\"col.headerTooltip || col.header\" [tooltipPosition]=\"col.headerTooltipPosition || 'top'\">\r\n\t\t\t\t\t\t\t\t\t{{ col.header }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t@if (!col.showIndex) {\r\n\t\t\t\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n\t\t\t\t\t<th class=\"text-center\" style=\"width: 4%\">\r\n\t\t\t\t\t\t<p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n\t\t\t\t\t</th>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\r\n\t\t\t@if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n\t\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t}\r\n\t\t\t\t</tr>\r\n\t\t\t}\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Cuerpo de la tabla -->\r\n\t\t<ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t\t{{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span class=\"text-breakWord\" tooltipStyleClass=\"prTooltip\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t\t\t{{ rowData[col.field] | formatCell: col.formatType }}\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t\t@if (ShowCheckbox) {\r\n\t\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t\t<p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t}\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\r\n\t\t<!-- Mensaje cuando no hay datos -->\r\n\t\t<ng-template pTemplate=\"emptymessage\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n\r\n\t<!-- <div class=\"prTableToolsBottom\"> -->\r\n\t<div class=\"d-flex justify-content-end\">\r\n\t\t@if (TotalRecords !== 0 && ShowPagination) {\r\n\t\t\t<div class=\"ptTablePaginator\">\r\n\t\t\t\t<p-paginator\r\n\t\t\t\t\tclass=\"prPaginator\"\r\n\t\t\t\t\t[first]=\"(CurrentPage - 1) * RowsPerPage\"\r\n\t\t\t\t\t[rows]=\"RowsPerPage\"\r\n\t\t\t\t\t[totalRecords]=\"TotalRecords\"\r\n\t\t\t\t\t(onPageChange)=\"OnPageChange($event)\"\r\n\t\t\t\t\t[showJumpToPageInput]=\"false\"\r\n\t\t\t\t\t[showCurrentPageReport]=\"false\"\r\n\t\t\t\t\t[showPageLinks]=\"false\"\r\n\t\t\t\t\t[showFirstLastIcon]=\"false\"\r\n\t\t\t\t\t[templateLeft]=\"templateLeft\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<ng-template #previouspagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-left\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template #nextpagelinkicon>\r\n\t\t\t\t\t\t<i class=\"icon icon-arrow-right\"></i>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<ng-template pTemplate=\"templateLeft\" let-state #templateLeft>\r\n\t\t\t\t\t\t<span>{{ \"ROWS_PER_PAGE\" | term: GlobalTermService.languageCode }}</span>\r\n\t\t\t\t\t\t<p-select class=\"prSelect\" [options]=\"AllowedPageSizes\" [ngModel]=\"RowsPerPage\" appendTo=\"body\" (onChange)=\"OnRowsPerPageChange($event.value)\" />\r\n\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t{{ \"Page\" | term: GlobalTermService.languageCode }}\r\n\t\t\t\t\t\t\t<p-inputnumber class=\"p-paginator-jtp-input\" inputId=\"integeronly\" [(ngModel)]=\"CurrentPage\" [allowEmpty]=\"false\" [min]=\"1\" (keyup.enter)=\"onChangeSelectPage($event)\" />\r\n\t\t\t\t\t\t\t{{ \"Of\" | term: GlobalTermService.languageCode }} {{ TotalPages }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t</p-paginator>\r\n\t\t\t</div>\r\n\t\t}\r\n\t</div>\r\n</div>\r\n" }]
|
|
5957
6105
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { ComponentId: [{
|
|
5958
6106
|
type: Input
|
|
5959
6107
|
}], ShowRowPerPage: [{
|
|
@@ -5986,9 +6134,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5986
6134
|
type: Input
|
|
5987
6135
|
}], EmitQueryParametersChange: [{
|
|
5988
6136
|
type: Output
|
|
5989
|
-
}], SearchTable: [{
|
|
5990
|
-
type: ViewChild,
|
|
5991
|
-
args: ["searchTable"]
|
|
5992
6137
|
}], Columns: [{
|
|
5993
6138
|
type: ContentChildren,
|
|
5994
6139
|
args: [ColumnComponent]
|
|
@@ -6026,19 +6171,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6026
6171
|
args: [{ selector: "intelica-alert", standalone: true, imports: [CommonModule, ConfirmDialogModule, ButtonModule], template: "<!-- \r\n Clases Modificadoras para estados:\r\n prConfirmDialog--warning\r\n prConfirmDialog--danger\r\n prConfirmDialog--error\r\n prConfirmDialog--success\r\n prConfirmDialog--default\r\n-->\r\n<p-confirmDialog #cd\r\n [styleClass]=\"'prConfirmDialog ' + ($any(cd.confirmation)?.data?.config?.type ? ' prConfirmDialog--' + $any(cd.confirmation).data.config.type : ' prConfirmDialog--default')\"\r\n key=\"intelica-alert-dialog\" [closable]=\"false\" [visible]=\"undefined\">\r\n <!-- \r\n We use the headless template. \r\n 'message' contains the confirmation object.\r\n 'message.data' contains our custom 'presentationData' object from AlertService.\r\n -->\r\n <ng-template pTemplate=\"headless\" let-message let-onAccept=\"onAccept\" let-onReject=\"onReject\">\r\n <div class=\"prConfirmDialog__content\">\r\n <!-- Close Button -->\r\n @if (message.data.config.showCloseButton) {\r\n <div class=\"prConfirmDialog__close\">\r\n <p-button icon=\"pi pi-times\" class=\"prButton\" [rounded]=\"false\" [text]=\"true\" (onClick)=\"onReject()\"\r\n ariaLabel=\"Cerrar\"></p-button>\r\n </div>\r\n }\r\n\r\n <!-- Icon -->\r\n <div class=\"prConfirmDialog__icon\">\r\n @if (message.data.config.customImageUrl) {\r\n <img [src]=\"message.data.config.customImageUrl\" alt=\"Alert icon\" />\r\n } @else {\r\n <i [class]=\"$any(message).data.iconClass\"></i>\r\n }\r\n </div>\r\n <div class=\"prConfirmDialog__details\">\r\n <!-- Title -->\r\n <h2 class=\"prConfirmDialog__title\">{{ message.header }}</h2>\r\n\r\n <!-- Subtitle / Message -->\r\n @if (message.message) {\r\n <p class=\"prConfirmDialog__subtitle\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\">{{ message.message }}</p>\r\n }\r\n </div>\r\n\r\n <!-- HTML Content -->\r\n @if (message.data.config.htmlContent) {\r\n <div class=\"prConfirmDialog__text\" [innerHTML]=\"$any(message).data.config.htmlContent\"\r\n [style.color]=\"$any(message).data.config.styles?.subtitleColor ?? '#555'\"></div>\r\n }\r\n\r\n <!-- Buttons -->\r\n <div class=\"prConfirmDialog__footer\">\r\n <!-- Confirm Button -->\r\n <p-button class=\"prButton\" [label]=\"message.data.confirmText\" (onClick)=\"onAccept()\" />\r\n <!-- Cancel Button -->\r\n @if (message.data.showCancelButton) {\r\n <p-button class=\"prButton\" [label]=\"message.data.cancelText\" severity=\"secondary\" [outlined]=\"true\"\r\n (onClick)=\"onReject()\" />\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n</p-confirmDialog>" }]
|
|
6027
6172
|
}] });
|
|
6028
6173
|
|
|
6029
|
-
class
|
|
6174
|
+
class GlobalFavoriteService {
|
|
6030
6175
|
configService = inject(ConfigService);
|
|
6176
|
+
http = inject(HttpClient);
|
|
6177
|
+
path = `${this.configService.environment?.securityPath}/favorite-page`;
|
|
6178
|
+
eventFavorites = "FavoritesUpdatedEvent";
|
|
6179
|
+
_favorites = signal([], ...(ngDevMode ? [{ debugName: "_favorites" }] : []));
|
|
6180
|
+
favorites = this._favorites.asReadonly();
|
|
6181
|
+
constructor() {
|
|
6182
|
+
this.loadAllAndStore();
|
|
6183
|
+
window.addEventListener(this.eventFavorites, this.onFavoritesUpdated);
|
|
6184
|
+
}
|
|
6185
|
+
delete(guid) {
|
|
6186
|
+
return this.http.delete(`${this.path}/${guid}`).pipe(tap$1(() => this.loadAllAndStore()));
|
|
6187
|
+
}
|
|
6188
|
+
getAll() {
|
|
6189
|
+
return this.http.get(`${this.path}`);
|
|
6190
|
+
}
|
|
6191
|
+
create() {
|
|
6192
|
+
return this.http.post(`${this.path}`, {}).pipe(tap$1(() => this.loadAllAndStore()));
|
|
6193
|
+
}
|
|
6194
|
+
loadAllAndStore() {
|
|
6195
|
+
this.getAll()
|
|
6196
|
+
.pipe(tap$1(favorites => this.setFavorites(favorites)))
|
|
6197
|
+
.subscribe();
|
|
6198
|
+
}
|
|
6199
|
+
setFavorites(favorites) {
|
|
6200
|
+
this._favorites.set([...favorites]);
|
|
6201
|
+
this.emitFavoritesUpdatedEvent();
|
|
6202
|
+
}
|
|
6203
|
+
removeFavoriteByPageUrl(pageUrl) {
|
|
6204
|
+
const normalizedPageUrl = pageUrl;
|
|
6205
|
+
const filtered = this._favorites().filter(item => !this.matchesPage(item, normalizedPageUrl));
|
|
6206
|
+
this._favorites.set(filtered);
|
|
6207
|
+
this.emitFavoritesUpdatedEvent();
|
|
6208
|
+
}
|
|
6209
|
+
isFavoriteByPageUrl(pageUrl) {
|
|
6210
|
+
const normalizedPageUrl = pageUrl;
|
|
6211
|
+
return this._favorites().some(item => this.matchesPage(item, normalizedPageUrl));
|
|
6212
|
+
}
|
|
6213
|
+
isFavoriteByPageRoot(pageRoot) {
|
|
6214
|
+
return this._favorites().some(item => item.pageRoot === pageRoot);
|
|
6215
|
+
}
|
|
6216
|
+
removeFavoriteByPageRoot(pageRoot) {
|
|
6217
|
+
const favorite = this._favorites().find(item => item.pageRoot === pageRoot);
|
|
6218
|
+
if (!favorite)
|
|
6219
|
+
return of(void 0);
|
|
6220
|
+
return this.delete(Guid.parse(favorite.favoritePageID)).pipe(map(() => void 0));
|
|
6221
|
+
}
|
|
6222
|
+
favoritesChanges() {
|
|
6223
|
+
return fromEvent(window, this.eventFavorites).pipe(map(event => event.detail.favorites), startWith(this._favorites()));
|
|
6224
|
+
}
|
|
6225
|
+
onFavoritesUpdated = (event) => {
|
|
6226
|
+
const detail = event.detail;
|
|
6227
|
+
if (!detail?.favorites)
|
|
6228
|
+
return;
|
|
6229
|
+
this._favorites.set([...detail.favorites]);
|
|
6230
|
+
};
|
|
6231
|
+
emitFavoritesUpdatedEvent() {
|
|
6232
|
+
const event = new CustomEvent(this.eventFavorites, {
|
|
6233
|
+
detail: { favorites: this._favorites() },
|
|
6234
|
+
});
|
|
6235
|
+
window.dispatchEvent(event);
|
|
6236
|
+
}
|
|
6237
|
+
matchesPage(item, value) {
|
|
6238
|
+
return item.pageUrl === value || item.pageRoot === value;
|
|
6239
|
+
}
|
|
6240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalFavoriteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6241
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalFavoriteService, providedIn: "root" });
|
|
6242
|
+
}
|
|
6243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GlobalFavoriteService, decorators: [{
|
|
6244
|
+
type: Injectable,
|
|
6245
|
+
args: [{ providedIn: "root" }]
|
|
6246
|
+
}], ctorParameters: () => [] });
|
|
6247
|
+
|
|
6248
|
+
class AddFavoritesService {
|
|
6249
|
+
favoritesService = inject(GlobalFavoriteService);
|
|
6250
|
+
featureFlagService = inject(GlobalFeatureFlagService);
|
|
6031
6251
|
addPageToFavorites() {
|
|
6032
|
-
return
|
|
6252
|
+
return this.favoritesService.create().pipe(map(() => void 0));
|
|
6253
|
+
}
|
|
6254
|
+
isPageFavorite(pageRoot) {
|
|
6255
|
+
const resolvedPageRoot = this.resolvePageRoot(pageRoot);
|
|
6256
|
+
return this.favoritesService.favoritesChanges().pipe(map(() => this.favoritesService.isFavoriteByPageRoot(resolvedPageRoot)), distinctUntilChanged());
|
|
6033
6257
|
}
|
|
6034
|
-
|
|
6035
|
-
|
|
6258
|
+
watchPageFavorite(pageRoot) {
|
|
6259
|
+
const resolvedPageRoot = this.resolvePageRoot(pageRoot);
|
|
6260
|
+
return this.favoritesService.favoritesChanges().pipe(map(() => this.favoritesService.isFavoriteByPageRoot(resolvedPageRoot)), distinctUntilChanged());
|
|
6036
6261
|
}
|
|
6037
|
-
|
|
6038
|
-
|
|
6262
|
+
removeFromFavorites(pageRoot) {
|
|
6263
|
+
const resolvedPageRoot = this.resolvePageRoot(pageRoot);
|
|
6264
|
+
return this.favoritesService.removeFavoriteByPageRoot(resolvedPageRoot);
|
|
6039
6265
|
}
|
|
6040
|
-
|
|
6041
|
-
return
|
|
6266
|
+
resolvePageRoot(pageRoot) {
|
|
6267
|
+
return pageRoot?.trim() || this.featureFlagService.GetPageRoot();
|
|
6042
6268
|
}
|
|
6043
6269
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddFavoritesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6044
6270
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddFavoritesService, providedIn: "root" });
|
|
@@ -6054,25 +6280,34 @@ const ICON_ON = "icon-favorites-on";
|
|
|
6054
6280
|
const ICON_OFF = "icon-favorites-off";
|
|
6055
6281
|
class AddFavoritesComponent {
|
|
6056
6282
|
termService = inject(GlobalTermService);
|
|
6057
|
-
|
|
6283
|
+
addFavoriteService = inject(AddFavoritesService);
|
|
6284
|
+
destroyRef = inject(DestroyRef);
|
|
6058
6285
|
favoriteChanged = output();
|
|
6059
6286
|
isFavorite = false;
|
|
6287
|
+
isToggling = false;
|
|
6060
6288
|
iconClass = ICON_OFF;
|
|
6061
6289
|
ngOnInit() {
|
|
6062
6290
|
this.loadInitialState();
|
|
6063
6291
|
}
|
|
6064
6292
|
toggleFavorite() {
|
|
6065
|
-
|
|
6293
|
+
if (this.isToggling)
|
|
6294
|
+
return;
|
|
6295
|
+
this.isToggling = true;
|
|
6296
|
+
const nextFavorite = !this.isFavorite;
|
|
6297
|
+
const action$ = this.isFavorite ? this.addFavoriteService.removeFromFavorites() : this.addFavoriteService.addPageToFavorites();
|
|
6066
6298
|
action$.subscribe({
|
|
6067
6299
|
next: () => {
|
|
6068
|
-
this.
|
|
6069
|
-
this.updateIcon();
|
|
6070
|
-
this.favoriteChanged.emit(this.isFavorite);
|
|
6300
|
+
this.favoriteChanged.emit(nextFavorite);
|
|
6071
6301
|
},
|
|
6302
|
+
complete: () => (this.isToggling = false),
|
|
6303
|
+
error: () => (this.isToggling = false),
|
|
6072
6304
|
});
|
|
6073
6305
|
}
|
|
6074
6306
|
loadInitialState() {
|
|
6075
|
-
this.
|
|
6307
|
+
this.addFavoriteService
|
|
6308
|
+
.watchPageFavorite()
|
|
6309
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
6310
|
+
.subscribe({
|
|
6076
6311
|
next: isFavorite => {
|
|
6077
6312
|
this.isFavorite = isFavorite;
|
|
6078
6313
|
this.updateIcon();
|
|
@@ -6083,11 +6318,11 @@ class AddFavoritesComponent {
|
|
|
6083
6318
|
this.iconClass = this.isFavorite ? ICON_ON : ICON_OFF;
|
|
6084
6319
|
}
|
|
6085
6320
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddFavoritesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6086
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AddFavoritesComponent, isStandalone: true, selector: "intelica-add-favorites", outputs: { favoriteChanged: "favoriteChanged" }, ngImport: i0, template: "<p-button class=\"prButton\" severity=\"secondary\" (onClick)=\"toggleFavorite()\">\r\n\t<i class=\"icon p-button-icon-left\" [ngClass]=\"iconClass\" pButtonIcon></i>\r\n\t<span pButtonLabel>{{ \"ADD_TO_FAVORITES\" | term : termService.languageCode }}</span>\r\n</p-button>\r\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TermPipe, name: "term" }] });
|
|
6321
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AddFavoritesComponent, isStandalone: true, selector: "intelica-add-favorites", outputs: { favoriteChanged: "favoriteChanged" }, ngImport: i0, template: "<p-button class=\"prButton\" severity=\"secondary\" [disabled]=\"isToggling\" (onClick)=\"toggleFavorite()\">\r\n\t<i class=\"icon p-button-icon-left\" [ngClass]=\"iconClass\" pButtonIcon></i>\r\n\t<span pButtonLabel>{{ \"ADD_TO_FAVORITES\" | term : termService.languageCode }}</span>\r\n</p-button>\r\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TermPipe, name: "term" }] });
|
|
6087
6322
|
}
|
|
6088
6323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AddFavoritesComponent, decorators: [{
|
|
6089
6324
|
type: Component,
|
|
6090
|
-
args: [{ selector: "intelica-add-favorites", imports: [Button, TermPipe, NgClass], template: "<p-button class=\"prButton\" severity=\"secondary\" (onClick)=\"toggleFavorite()\">\r\n\t<i class=\"icon p-button-icon-left\" [ngClass]=\"iconClass\" pButtonIcon></i>\r\n\t<span pButtonLabel>{{ \"ADD_TO_FAVORITES\" | term : termService.languageCode }}</span>\r\n</p-button>\r\n" }]
|
|
6325
|
+
args: [{ selector: "intelica-add-favorites", imports: [Button, TermPipe, NgClass], template: "<p-button class=\"prButton\" severity=\"secondary\" [disabled]=\"isToggling\" (onClick)=\"toggleFavorite()\">\r\n\t<i class=\"icon p-button-icon-left\" [ngClass]=\"iconClass\" pButtonIcon></i>\r\n\t<span pButtonLabel>{{ \"ADD_TO_FAVORITES\" | term : termService.languageCode }}</span>\r\n</p-button>\r\n" }]
|
|
6091
6326
|
}], propDecorators: { favoriteChanged: [{ type: i0.Output, args: ["favoriteChanged"] }] } });
|
|
6092
6327
|
|
|
6093
6328
|
class CheckboxFilterDirective extends FilterDirective {
|
|
@@ -7766,7 +8001,7 @@ class EchartService {
|
|
|
7766
8001
|
* @param color - Progress and end dot color
|
|
7767
8002
|
* @param total - Max value (default 100)
|
|
7768
8003
|
*/
|
|
7769
|
-
getRateSemiDoughnutOptions(letter, value, textSize, color, total = 100) {
|
|
8004
|
+
getRateSemiDoughnutOptions(letter, value, textSize, color, total = 100, bottomText) {
|
|
7770
8005
|
const safeTotal = total > 0 ? total : 100;
|
|
7771
8006
|
const safeValue = Math.max(0, Math.min(value, safeTotal));
|
|
7772
8007
|
const START_ANGLE = 210;
|
|
@@ -7780,17 +8015,7 @@ class EchartService {
|
|
|
7780
8015
|
const RADIUS = "96%";
|
|
7781
8016
|
const CENTER = ["50%", "50%"];
|
|
7782
8017
|
const dotSizePx = THICKNESS + 5;
|
|
7783
|
-
const
|
|
7784
|
-
const BASE_THICKNESS = 11;
|
|
7785
|
-
const BASE_DOT_SIZE = THICKNESS + 5;
|
|
7786
|
-
const BASE_POINTER_LENGTH = 196; // tu valor comprobado
|
|
7787
|
-
const radiusPercent = parseFloat(RADIUS);
|
|
7788
|
-
const radiusFactor = radiusPercent / BASE_RADIUS_PERCENT;
|
|
7789
|
-
const thicknessFactor = THICKNESS / BASE_THICKNESS;
|
|
7790
|
-
const dotFactor = dotSizePx / BASE_DOT_SIZE;
|
|
7791
|
-
const scale = radiusFactor * 0.5 + thicknessFactor * 0.3 + dotFactor * 0.2;
|
|
7792
|
-
const pointerLengthPercent = Math.round(BASE_POINTER_LENGTH * scale);
|
|
7793
|
-
const POINTER_LENGTH = `${pointerLengthPercent}%`;
|
|
8018
|
+
const POINTER_LENGTH = "98%";
|
|
7794
8019
|
const option = {
|
|
7795
8020
|
tooltip: { trigger: "none", appendTo: "body" },
|
|
7796
8021
|
series: [
|
|
@@ -7822,11 +8047,26 @@ class EchartService {
|
|
|
7822
8047
|
axisLabel: { show: false },
|
|
7823
8048
|
detail: {
|
|
7824
8049
|
show: true,
|
|
7825
|
-
offsetCenter: [0, "
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
8050
|
+
offsetCenter: [0, "8%"],
|
|
8051
|
+
formatter: () => (bottomText ? `{letter|${letter}}\n{bottom|${bottomText}}` : `{letter|${letter}}`),
|
|
8052
|
+
rich: {
|
|
8053
|
+
letter: {
|
|
8054
|
+
fontSize: textSize,
|
|
8055
|
+
fontWeight: 700,
|
|
8056
|
+
color: TEXT_COLOR,
|
|
8057
|
+
fontFamily: "Lato, sans-serif",
|
|
8058
|
+
lineHeight: textSize + 2,
|
|
8059
|
+
align: "center",
|
|
8060
|
+
},
|
|
8061
|
+
bottom: {
|
|
8062
|
+
fontSize: 16,
|
|
8063
|
+
fontWeight: 500,
|
|
8064
|
+
color: TEXT_COLOR,
|
|
8065
|
+
fontFamily: "Lato, sans-serif",
|
|
8066
|
+
lineHeight: 22,
|
|
8067
|
+
align: "center",
|
|
8068
|
+
},
|
|
8069
|
+
},
|
|
7830
8070
|
},
|
|
7831
8071
|
data: [
|
|
7832
8072
|
{
|
|
@@ -7988,157 +8228,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7988
8228
|
args: [{ providedIn: "root" }]
|
|
7989
8229
|
}] });
|
|
7990
8230
|
|
|
7991
|
-
class IntelicaSessionService {
|
|
7992
|
-
configService = inject(ConfigService);
|
|
7993
|
-
prefix = "itl.session.";
|
|
7994
|
-
sessionIdKey = "itl.session.__sessionId";
|
|
7995
|
-
pageRoot = "";
|
|
7996
|
-
sessionId = null;
|
|
7997
|
-
constructor() {
|
|
7998
|
-
this.ensureSessionId();
|
|
7999
|
-
this.cleanupForeignSessions();
|
|
8000
|
-
}
|
|
8001
|
-
/**
|
|
8002
|
-
* Actualiza el pageRoot actual, es necesario matricularlo en el app.component
|
|
8003
|
-
*/
|
|
8004
|
-
setPageRoot(pageRoot) {
|
|
8005
|
-
this.pageRoot = pageRoot;
|
|
8006
|
-
}
|
|
8007
|
-
/**
|
|
8008
|
-
* Retorna la key de usuario con scope si necesitas reutilizarla manualmente.
|
|
8009
|
-
*/
|
|
8010
|
-
getUserKey(key) {
|
|
8011
|
-
return this.buildScopedKey(key, "user");
|
|
8012
|
-
}
|
|
8013
|
-
ensureSessionId() {
|
|
8014
|
-
if (this.sessionId)
|
|
8015
|
-
return this.sessionId;
|
|
8016
|
-
const stored = localStorage.getItem(this.sessionIdKey);
|
|
8017
|
-
if (stored) {
|
|
8018
|
-
this.sessionId = stored;
|
|
8019
|
-
return stored;
|
|
8020
|
-
}
|
|
8021
|
-
const id = this.createGuid();
|
|
8022
|
-
this.sessionId = id;
|
|
8023
|
-
localStorage.setItem(this.sessionIdKey, id);
|
|
8024
|
-
return id;
|
|
8025
|
-
}
|
|
8026
|
-
createGuid() {
|
|
8027
|
-
return Guid.create().toString();
|
|
8028
|
-
}
|
|
8029
|
-
buildScopedKey(key, scope = "user-profile") {
|
|
8030
|
-
const parts = [];
|
|
8031
|
-
if (this.pageRoot)
|
|
8032
|
-
parts.push(this.pageRoot);
|
|
8033
|
-
parts.push(key);
|
|
8034
|
-
const userId = this.configService.SessionInformation?.businessUserID;
|
|
8035
|
-
const profileId = this.configService.SessionInformation?.businessUserProfile;
|
|
8036
|
-
if (scope === "user" || scope === "user-profile") {
|
|
8037
|
-
if (userId)
|
|
8038
|
-
parts.push(`user:${userId}`);
|
|
8039
|
-
}
|
|
8040
|
-
if (scope === "profile" || scope === "user-profile") {
|
|
8041
|
-
if (profileId)
|
|
8042
|
-
parts.push(`profile:${profileId}`);
|
|
8043
|
-
}
|
|
8044
|
-
return parts.join("|");
|
|
8045
|
-
}
|
|
8046
|
-
set(key, value, scope = "user-profile") {
|
|
8047
|
-
this.ensureSessionId();
|
|
8048
|
-
const storageKey = this.buildScopedKey(key, scope);
|
|
8049
|
-
const envelope = {
|
|
8050
|
-
sessionId: this.sessionId,
|
|
8051
|
-
updatedAt: Date.now(),
|
|
8052
|
-
value,
|
|
8053
|
-
};
|
|
8054
|
-
localStorage.setItem(this.prefix + storageKey, JSON.stringify(envelope));
|
|
8055
|
-
}
|
|
8056
|
-
get(key, scope = "user-profile") {
|
|
8057
|
-
const storageKey = this.buildScopedKey(key, scope);
|
|
8058
|
-
const raw = localStorage.getItem(this.prefix + storageKey);
|
|
8059
|
-
if (!raw)
|
|
8060
|
-
return null;
|
|
8061
|
-
try {
|
|
8062
|
-
const env = JSON.parse(raw);
|
|
8063
|
-
if (!this.sessionId || env.sessionId !== this.sessionId)
|
|
8064
|
-
return null;
|
|
8065
|
-
return env.value;
|
|
8066
|
-
}
|
|
8067
|
-
catch {
|
|
8068
|
-
return null;
|
|
8069
|
-
}
|
|
8070
|
-
}
|
|
8071
|
-
/**
|
|
8072
|
-
* Limpia todo lo que haya en localStorage para este servicio (todas las sesiones).
|
|
8073
|
-
* Úsalo al iniciar sesión/cerrar sesión para evitar acumulación.
|
|
8074
|
-
*/
|
|
8075
|
-
clearAll() {
|
|
8076
|
-
Object.keys(localStorage)
|
|
8077
|
-
.filter(k => k.startsWith(this.prefix))
|
|
8078
|
-
.forEach(k => localStorage.removeItem(k));
|
|
8079
|
-
localStorage.removeItem(this.sessionIdKey);
|
|
8080
|
-
this.sessionId = null;
|
|
8081
|
-
}
|
|
8082
|
-
/**
|
|
8083
|
-
* Limpia los valores de la sesión actual para el pageRoot vigente.
|
|
8084
|
-
*/
|
|
8085
|
-
clearCurrentPageRoot() {
|
|
8086
|
-
if (!this.pageRoot)
|
|
8087
|
-
return;
|
|
8088
|
-
this.clearPageRoot(this.pageRoot);
|
|
8089
|
-
}
|
|
8090
|
-
clearPageRoot(pageRoot) {
|
|
8091
|
-
const prefix = `${this.prefix}${pageRoot}|`;
|
|
8092
|
-
Object.keys(localStorage)
|
|
8093
|
-
.filter(k => k.startsWith(prefix))
|
|
8094
|
-
.forEach(k => {
|
|
8095
|
-
const raw = localStorage.getItem(k);
|
|
8096
|
-
if (!raw)
|
|
8097
|
-
return;
|
|
8098
|
-
const env = this.tryParseEnvelope(raw);
|
|
8099
|
-
if (!env || env.sessionId !== this.sessionId)
|
|
8100
|
-
return;
|
|
8101
|
-
localStorage.removeItem(k);
|
|
8102
|
-
});
|
|
8103
|
-
}
|
|
8104
|
-
cleanupForeignSessions() {
|
|
8105
|
-
if (!this.sessionId)
|
|
8106
|
-
return;
|
|
8107
|
-
Object.keys(localStorage)
|
|
8108
|
-
.filter(k => k.startsWith(this.prefix))
|
|
8109
|
-
.forEach(k => {
|
|
8110
|
-
const raw = localStorage.getItem(k);
|
|
8111
|
-
if (!raw)
|
|
8112
|
-
return;
|
|
8113
|
-
const env = this.tryParseEnvelope(raw);
|
|
8114
|
-
if (!env)
|
|
8115
|
-
return;
|
|
8116
|
-
if (env.sessionId !== this.sessionId) {
|
|
8117
|
-
localStorage.removeItem(k);
|
|
8118
|
-
}
|
|
8119
|
-
});
|
|
8120
|
-
}
|
|
8121
|
-
tryParseEnvelope(raw) {
|
|
8122
|
-
try {
|
|
8123
|
-
return JSON.parse(raw);
|
|
8124
|
-
}
|
|
8125
|
-
catch {
|
|
8126
|
-
return null;
|
|
8127
|
-
}
|
|
8128
|
-
}
|
|
8129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8130
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, providedIn: "root" });
|
|
8131
|
-
}
|
|
8132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IntelicaSessionService, decorators: [{
|
|
8133
|
-
type: Injectable,
|
|
8134
|
-
args: [{
|
|
8135
|
-
providedIn: "root",
|
|
8136
|
-
}]
|
|
8137
|
-
}], ctorParameters: () => [] });
|
|
8138
|
-
|
|
8139
8231
|
class GlobalMenuService {
|
|
8140
8232
|
_isMenuVisible = signal(true, ...(ngDevMode ? [{ debugName: "_isMenuVisible" }] : []));
|
|
8141
|
-
_selectedProduct = signal("", ...(ngDevMode ? [{ debugName: "_selectedProduct" }] : []));
|
|
8233
|
+
_selectedProduct = signal({ product: "", icon: "", authClient: "" }, ...(ngDevMode ? [{ debugName: "_selectedProduct" }] : []));
|
|
8142
8234
|
isMenuVisible = this._isMenuVisible.asReadonly();
|
|
8143
8235
|
selectedProduct = this._selectedProduct.asReadonly();
|
|
8144
8236
|
eventMenu = "MenuBarEvent";
|
|
@@ -8162,9 +8254,13 @@ class GlobalMenuService {
|
|
|
8162
8254
|
this._isMenuVisible.set(menuIsVisible);
|
|
8163
8255
|
};
|
|
8164
8256
|
onSelectedProductEvent = (event) => {
|
|
8165
|
-
const
|
|
8166
|
-
if (
|
|
8167
|
-
|
|
8257
|
+
const detail = event.detail;
|
|
8258
|
+
if (!detail)
|
|
8259
|
+
return;
|
|
8260
|
+
const { product, icon, authClient } = detail;
|
|
8261
|
+
if (typeof product === "string" && typeof icon === "string" && typeof authClient === "string") {
|
|
8262
|
+
this._selectedProduct.set({ product, icon, authClient });
|
|
8263
|
+
}
|
|
8168
8264
|
};
|
|
8169
8265
|
emitMenuEvent(isVisible) {
|
|
8170
8266
|
const event = new CustomEvent(this.eventMenu, {
|
|
@@ -8172,9 +8268,9 @@ class GlobalMenuService {
|
|
|
8172
8268
|
});
|
|
8173
8269
|
window.dispatchEvent(event);
|
|
8174
8270
|
}
|
|
8175
|
-
emitSelectedProductEvent(
|
|
8271
|
+
emitSelectedProductEvent(selectedProduct) {
|
|
8176
8272
|
const event = new CustomEvent(this.eventProducts, {
|
|
8177
|
-
detail: {
|
|
8273
|
+
detail: { product: selectedProduct.product, icon: selectedProduct.icon, authClient: selectedProduct.authClient },
|
|
8178
8274
|
});
|
|
8179
8275
|
window.dispatchEvent(event);
|
|
8180
8276
|
}
|
|
@@ -8186,6 +8282,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8186
8282
|
args: [{ providedIn: "root" }]
|
|
8187
8283
|
}] });
|
|
8188
8284
|
|
|
8285
|
+
class RequestCacheService {
|
|
8286
|
+
cache = new Map();
|
|
8287
|
+
maxEntries = 300;
|
|
8288
|
+
defaultTtlMs = 5 * 60 * 1000;
|
|
8289
|
+
getOrSet(key, factory, ttlMs = this.defaultTtlMs) {
|
|
8290
|
+
this.removeExpiredEntries();
|
|
8291
|
+
const now = Date.now();
|
|
8292
|
+
const cached = this.cache.get(key);
|
|
8293
|
+
if (cached && cached.expiresAt > now) {
|
|
8294
|
+
return cached.value$;
|
|
8295
|
+
}
|
|
8296
|
+
const value$ = factory().pipe(shareReplay(1), catchError$1(error => {
|
|
8297
|
+
this.cache.delete(key);
|
|
8298
|
+
return throwError(() => error);
|
|
8299
|
+
}));
|
|
8300
|
+
this.cache.set(key, { value$, expiresAt: now + Math.max(ttlMs, 0) });
|
|
8301
|
+
this.enforceCapacityLimit();
|
|
8302
|
+
return value$;
|
|
8303
|
+
}
|
|
8304
|
+
invalidate(prefix) {
|
|
8305
|
+
if (!prefix) {
|
|
8306
|
+
this.cache.clear();
|
|
8307
|
+
return;
|
|
8308
|
+
}
|
|
8309
|
+
for (const key of this.cache.keys()) {
|
|
8310
|
+
if (key.startsWith(prefix)) {
|
|
8311
|
+
this.cache.delete(key);
|
|
8312
|
+
}
|
|
8313
|
+
}
|
|
8314
|
+
}
|
|
8315
|
+
removeExpiredEntries() {
|
|
8316
|
+
const now = Date.now();
|
|
8317
|
+
for (const [key, entry] of this.cache.entries()) {
|
|
8318
|
+
if (entry.expiresAt <= now) {
|
|
8319
|
+
this.cache.delete(key);
|
|
8320
|
+
}
|
|
8321
|
+
}
|
|
8322
|
+
}
|
|
8323
|
+
enforceCapacityLimit() {
|
|
8324
|
+
while (this.cache.size > this.maxEntries) {
|
|
8325
|
+
const oldestKey = this.cache.keys().next().value;
|
|
8326
|
+
if (!oldestKey)
|
|
8327
|
+
break;
|
|
8328
|
+
this.cache.delete(oldestKey);
|
|
8329
|
+
}
|
|
8330
|
+
}
|
|
8331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RequestCacheService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8332
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RequestCacheService, providedIn: "root" });
|
|
8333
|
+
}
|
|
8334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RequestCacheService, decorators: [{
|
|
8335
|
+
type: Injectable,
|
|
8336
|
+
args: [{ providedIn: "root" }]
|
|
8337
|
+
}] });
|
|
8338
|
+
|
|
8189
8339
|
/**
|
|
8190
8340
|
* Función de comparación genérica para ordenar objetos por un campo específico.
|
|
8191
8341
|
*
|
|
@@ -11145,5 +11295,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
11145
11295
|
* Generated bundle index. Do not edit.
|
|
11146
11296
|
*/
|
|
11147
11297
|
|
|
11148
|
-
export { ALERT_DEFAULTS, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, ErrorNewInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, ResponseHeadersInterceptor, RouteGuard, RouteNewGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
11298
|
+
export { ALERT_DEFAULTS, ALERT_ICON_PATHS, ALERT_TYPE_CONFIG, ActionDirective, ActionsMenuComponent, AddFavoritesComponent, AlertButtonMode, AlertService, AlertType, ButtonSplitComponent, CheckboxFilterDirective, Color, ColumnComponent, ColumnGroupComponent, CompareByField, ConfigService, CookieAttributesGeneral, DATEPICKER_BUTTON_TYPES, DataDirective, DateFilterDirective, DateModeOptions, DatepickerComponent, DynamicInputValidation, EchartComponent, EchartService, ElementService, EmailInputValidation, ErrorInterceptor, ErrorNewInterceptor, FeatureFlagService, FilterChipsComponent, FiltersComponent, FormatAmountPipe, GetCookieAttributes, GlobalFavoriteService, GlobalFeatureFlagService, GlobalMenuService, GlobalTermService, HtmlToExcelService, InitializeConfigService, InputValidation, IntelicaAlertComponent, IntelicaCellCheckboxDirective, IntelicaSessionService, IntelicaTheme, ItemSplitDirective, LanguageService, MatrixColumnComponent, MatrixColumnGroupComponent, MatrixTableComponent, ModalDialogComponent, MultiSelectComponent, NotificationJobService, NotificationOrchestratorService, NotificationService, NotificationSignalRService, OrderConstants, PageInformation, PageRootChildGuard, PaginatorComponent, Patterns, PopoverComponent, ProfileService, RecordPerPageComponent, RefreshTokenInterceptor, RequestCacheService, ResponseHeadersInterceptor, RouteGuard, RouteNewGuard, RowResumenComponent, RowResumenTreeComponent, SearchComponent, SelectDetailFilterDirective, SelectFilterDirective, SharedService, SkeletonChartComponent, SkeletonComponent, SkeletonService, SkeletonTableComponent, SortingComponent, SpinnerComponent, SpinnerService, SweetAlertService, TableComponent, TableFetchComponent, TableSortOrder, TemplateDirective, TemplateMenuComponent, TermGuard, TermPipe, TermService, TextAreaFilterDirective, TextFilterDirective, TextRangeFilterDirective, TreeColumnComponent, TreeColumnGroupComponent, TreeTableComponent, TruncatePipe, decryptData, encryptData, getColor };
|
|
11149
11299
|
//# sourceMappingURL=intelica-library-components.mjs.map
|