intelica-library-ui 0.1.164 → 0.1.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/intelica-library-ui.mjs +392 -65
- package/fesm2022/intelica-library-ui.mjs.map +1 -1
- package/lib/components/table/table.component.d.ts +3 -1
- package/lib/components/table-fetch/table-fetch.component.d.ts +2 -1
- package/lib/components/tree-table/tree-table.component.d.ts +46 -4
- package/lib/services/shared.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -618,8 +618,34 @@ class SharedService {
|
|
|
618
618
|
pageId = 0;
|
|
619
619
|
openActionMenu$ = new Subject();
|
|
620
620
|
months = {
|
|
621
|
-
en: [
|
|
622
|
-
|
|
621
|
+
en: [
|
|
622
|
+
"January",
|
|
623
|
+
"February",
|
|
624
|
+
"March",
|
|
625
|
+
"April",
|
|
626
|
+
"May",
|
|
627
|
+
"June",
|
|
628
|
+
"July",
|
|
629
|
+
"August",
|
|
630
|
+
"September",
|
|
631
|
+
"October",
|
|
632
|
+
"November",
|
|
633
|
+
"December",
|
|
634
|
+
],
|
|
635
|
+
es: [
|
|
636
|
+
"Enero",
|
|
637
|
+
"Febrero",
|
|
638
|
+
"Marzo",
|
|
639
|
+
"Abril",
|
|
640
|
+
"Mayo",
|
|
641
|
+
"Junio",
|
|
642
|
+
"Julio",
|
|
643
|
+
"Agosto",
|
|
644
|
+
"Septiembre",
|
|
645
|
+
"Octubre",
|
|
646
|
+
"Noviembre",
|
|
647
|
+
"Diciembre",
|
|
648
|
+
],
|
|
623
649
|
};
|
|
624
650
|
subtitleDescriptionNotification$;
|
|
625
651
|
constructor(location) {
|
|
@@ -643,21 +669,22 @@ class SharedService {
|
|
|
643
669
|
return listGeneral.reduce((a, b) => a + (b[col] || 0), 0);
|
|
644
670
|
}
|
|
645
671
|
GetTotalAverageByColumn(col, listGeneral) {
|
|
646
|
-
return listGeneral.reduce((a, b) => a + (b[col] || 0), 0) /
|
|
672
|
+
return (listGeneral.reduce((a, b) => a + (b[col] || 0), 0) /
|
|
673
|
+
(listGeneral.length || 1));
|
|
647
674
|
}
|
|
648
675
|
GetTotalByGroup(col, listGeneral, groupBy) {
|
|
649
676
|
if (!groupBy?.length)
|
|
650
677
|
return [listGeneral.reduce((a, b) => a + (b[col] || 0), 0)];
|
|
651
678
|
let result = listGeneral.reduce((acc, item) => {
|
|
652
|
-
const groupKey = groupBy.map(prop => item[prop]).join("||");
|
|
679
|
+
const groupKey = groupBy.map((prop) => item[prop]).join("||");
|
|
653
680
|
acc[groupKey] = (acc[groupKey] || 0) + item[col];
|
|
654
681
|
return acc;
|
|
655
682
|
}, {});
|
|
656
683
|
const propiedades = Object.keys(result).sort();
|
|
657
684
|
const indexGroup = groupBy.indexOf(col);
|
|
658
685
|
if (indexGroup != -1)
|
|
659
|
-
return propiedades.map(propiedad => propiedad.split("||")[indexGroup]);
|
|
660
|
-
return propiedades.map(propiedad => result[propiedad]);
|
|
686
|
+
return propiedades.map((propiedad) => propiedad.split("||")[indexGroup]);
|
|
687
|
+
return propiedades.map((propiedad) => result[propiedad]);
|
|
661
688
|
}
|
|
662
689
|
TransformNegative(value) {
|
|
663
690
|
value = value?.toString() ?? "0.00";
|
|
@@ -667,7 +694,10 @@ class SharedService {
|
|
|
667
694
|
return value.toString();
|
|
668
695
|
}
|
|
669
696
|
FormatNumber(value, decimalMax, decimalMin) {
|
|
670
|
-
return value.toLocaleString("en-US", {
|
|
697
|
+
return value.toLocaleString("en-US", {
|
|
698
|
+
maximumFractionDigits: decimalMax,
|
|
699
|
+
minimumFractionDigits: decimalMin,
|
|
700
|
+
});
|
|
671
701
|
}
|
|
672
702
|
ClickOutSideValidator(event) {
|
|
673
703
|
let res = false;
|
|
@@ -687,7 +717,9 @@ class SharedService {
|
|
|
687
717
|
var res = ids.some(function (v) {
|
|
688
718
|
return src.id === v;
|
|
689
719
|
});
|
|
690
|
-
if (!res &&
|
|
720
|
+
if (!res &&
|
|
721
|
+
(src.tagName === "BODY" || src.parentElement === null) &&
|
|
722
|
+
c === 0) {
|
|
691
723
|
res = true;
|
|
692
724
|
}
|
|
693
725
|
if (!res &&
|
|
@@ -702,10 +734,18 @@ class SharedService {
|
|
|
702
734
|
return res;
|
|
703
735
|
}
|
|
704
736
|
GetTitleByRegionOrCountry(CurrentGroup, Current, field) {
|
|
705
|
-
return CurrentGroup
|
|
737
|
+
return CurrentGroup
|
|
738
|
+
? CurrentGroup.groupName + " - " + Current[field]
|
|
739
|
+
: Current[field];
|
|
706
740
|
}
|
|
707
741
|
GetTitleByBank(ListGeneralCountryAll, CurrentBank) {
|
|
708
|
-
return ListGeneralCountryAll.length > 1
|
|
742
|
+
return ListGeneralCountryAll.length > 1
|
|
743
|
+
? CurrentBank.groupName +
|
|
744
|
+
" - " +
|
|
745
|
+
CurrentBank.countryName +
|
|
746
|
+
" - " +
|
|
747
|
+
CurrentBank.bankNameCommercial
|
|
748
|
+
: CurrentBank.bankNameCommercial;
|
|
709
749
|
}
|
|
710
750
|
Roundgen(value, precision) {
|
|
711
751
|
var multiplier = Math.pow(10, precision || 0);
|
|
@@ -715,17 +755,32 @@ class SharedService {
|
|
|
715
755
|
if (isNaN(amount))
|
|
716
756
|
amount = 0;
|
|
717
757
|
let resultado = "";
|
|
718
|
-
let AmountStr = amount === 0
|
|
758
|
+
let AmountStr = amount === 0
|
|
759
|
+
? "0"
|
|
760
|
+
: amount.toLocaleString("en-US", {
|
|
761
|
+
maximumFractionDigits: 1,
|
|
762
|
+
minimumFractionDigits: 1,
|
|
763
|
+
});
|
|
719
764
|
if (AmountStr.indexOf(".0") !== -1)
|
|
720
|
-
AmountStr = amount.toLocaleString("en-US", {
|
|
765
|
+
AmountStr = amount.toLocaleString("en-US", {
|
|
766
|
+
maximumFractionDigits: 0,
|
|
767
|
+
minimumFractionDigits: 0,
|
|
768
|
+
});
|
|
721
769
|
if (amount < 0 && parseInt(amount.toString()) * -1 === 0) {
|
|
722
|
-
resultado =
|
|
770
|
+
resultado =
|
|
771
|
+
amount
|
|
772
|
+
.toLocaleString("en-US", {
|
|
773
|
+
maximumFractionDigits: 1,
|
|
774
|
+
minimumFractionDigits: 1,
|
|
775
|
+
})
|
|
776
|
+
.replace("-", "(") + "%)";
|
|
723
777
|
}
|
|
724
778
|
else if (amount < 0)
|
|
725
779
|
resultado = AmountStr.replace("-", "(") + "%)";
|
|
726
780
|
else
|
|
727
781
|
resultado = AmountStr + "%";
|
|
728
|
-
if (Number.NEGATIVE_INFINITY === amount ||
|
|
782
|
+
if (Number.NEGATIVE_INFINITY === amount ||
|
|
783
|
+
Number.POSITIVE_INFINITY === amount)
|
|
729
784
|
resultado = "";
|
|
730
785
|
return resultado;
|
|
731
786
|
}
|
|
@@ -773,7 +828,8 @@ class SharedService {
|
|
|
773
828
|
let position = resultado.indexOf(" ");
|
|
774
829
|
output = [a.slice(0, position), b, a.slice(position)].join("");
|
|
775
830
|
}
|
|
776
|
-
else if (resultado.indexOf(" ") === -1 &&
|
|
831
|
+
else if (resultado.indexOf(" ") === -1 &&
|
|
832
|
+
resultado.indexOf(")") !== -1) {
|
|
777
833
|
let position = resultado.indexOf(")");
|
|
778
834
|
output = [a.slice(0, position), b, a.slice(position)].join("");
|
|
779
835
|
}
|
|
@@ -805,7 +861,12 @@ class SharedService {
|
|
|
805
861
|
document.body.removeChild(a);
|
|
806
862
|
}
|
|
807
863
|
GetNumberCurrency(amount) {
|
|
808
|
-
return amount === 0
|
|
864
|
+
return amount === 0
|
|
865
|
+
? "0"
|
|
866
|
+
: amount.toLocaleString("en-US", {
|
|
867
|
+
maximumFractionDigits: 2,
|
|
868
|
+
minimumFractionDigits: 2,
|
|
869
|
+
});
|
|
809
870
|
}
|
|
810
871
|
CountDecimals(param) {
|
|
811
872
|
if (Math.floor(param) === param)
|
|
@@ -819,17 +880,17 @@ class SharedService {
|
|
|
819
880
|
let colUnique = [];
|
|
820
881
|
if (columnGroup != "") {
|
|
821
882
|
colUnique = [
|
|
822
|
-
...new Set(data.map(item => {
|
|
883
|
+
...new Set(data.map((item) => {
|
|
823
884
|
return item[columnGroup];
|
|
824
885
|
})),
|
|
825
|
-
].filter(unique => !this.IsEmpty(unique));
|
|
886
|
+
].filter((unique) => !this.IsEmpty(unique));
|
|
826
887
|
}
|
|
827
888
|
else {
|
|
828
889
|
colUnique = [
|
|
829
|
-
...new Set(data.map(item => {
|
|
890
|
+
...new Set(data.map((item) => {
|
|
830
891
|
return item;
|
|
831
892
|
})),
|
|
832
|
-
].filter(unique => !this.IsEmpty(unique));
|
|
893
|
+
].filter((unique) => !this.IsEmpty(unique));
|
|
833
894
|
}
|
|
834
895
|
return colUnique;
|
|
835
896
|
}
|
|
@@ -854,7 +915,7 @@ class SharedService {
|
|
|
854
915
|
FormatterStringJsonByKey(data, key, separador) {
|
|
855
916
|
let result = "";
|
|
856
917
|
let colUnique = [];
|
|
857
|
-
data.forEach(element => {
|
|
918
|
+
data.forEach((element) => {
|
|
858
919
|
colUnique.push(element[key]);
|
|
859
920
|
});
|
|
860
921
|
result = colUnique.join(separador);
|
|
@@ -877,7 +938,7 @@ class SharedService {
|
|
|
877
938
|
}
|
|
878
939
|
RemoveProjectsCss(route) {
|
|
879
940
|
const elements = this.CheckProjectsCss(route);
|
|
880
|
-
elements.forEach(element => {
|
|
941
|
+
elements.forEach((element) => {
|
|
881
942
|
document.getElementsByTagName("head")[0].removeChild(element);
|
|
882
943
|
});
|
|
883
944
|
}
|
|
@@ -905,7 +966,7 @@ class SharedService {
|
|
|
905
966
|
}
|
|
906
967
|
GetMaxNumberDecimals(data, key) {
|
|
907
968
|
let arrCountDecimals = [];
|
|
908
|
-
data.forEach(element => {
|
|
969
|
+
data.forEach((element) => {
|
|
909
970
|
let decimals = this.CountDecimalsDigits(element[key]);
|
|
910
971
|
arrCountDecimals.push(decimals);
|
|
911
972
|
});
|
|
@@ -919,7 +980,7 @@ class SharedService {
|
|
|
919
980
|
return moment(date).format(format);
|
|
920
981
|
}
|
|
921
982
|
CopyTo(src, dest) {
|
|
922
|
-
Object.keys(src).forEach(property => {
|
|
983
|
+
Object.keys(src).forEach((property) => {
|
|
923
984
|
dest[property] = src[property];
|
|
924
985
|
});
|
|
925
986
|
}
|
|
@@ -953,30 +1014,38 @@ class SharedService {
|
|
|
953
1014
|
if (word.length > 1) {
|
|
954
1015
|
word.forEach((element) => {
|
|
955
1016
|
if (count === 0) {
|
|
956
|
-
listTemp = listTempAll.filter(a => a[key]
|
|
1017
|
+
listTemp = listTempAll.filter((a) => a[key]
|
|
1018
|
+
?.toString()
|
|
1019
|
+
?.toLowerCase()
|
|
1020
|
+
.includes(element.toLowerCase()));
|
|
957
1021
|
}
|
|
958
1022
|
else {
|
|
959
|
-
listTemp = listTemp.filter((a) => a[key]
|
|
1023
|
+
listTemp = listTemp.filter((a) => a[key]
|
|
1024
|
+
?.toString()
|
|
1025
|
+
?.toLowerCase()
|
|
1026
|
+
.includes(element.toLowerCase()));
|
|
960
1027
|
}
|
|
961
1028
|
count++;
|
|
962
1029
|
});
|
|
963
1030
|
listFilter = listTemp;
|
|
964
1031
|
}
|
|
965
1032
|
else {
|
|
966
|
-
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().includes(value));
|
|
1033
|
+
listFilter = listTempAll.filter((a) => a[key]?.toString()?.toLowerCase().includes(value));
|
|
967
1034
|
}
|
|
968
1035
|
break;
|
|
969
1036
|
case 1: //'Exact'
|
|
970
|
-
listFilter = value
|
|
1037
|
+
listFilter = value
|
|
1038
|
+
? listTempAll.filter((a) => a[key]?.toString()?.toLowerCase() === value)
|
|
1039
|
+
: listTempAll;
|
|
971
1040
|
break;
|
|
972
1041
|
case 2: //'Begin'
|
|
973
|
-
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().startsWith(value));
|
|
1042
|
+
listFilter = listTempAll.filter((a) => a[key]?.toString()?.toLowerCase().startsWith(value));
|
|
974
1043
|
break;
|
|
975
1044
|
case 3: //'Ends'
|
|
976
|
-
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().endsWith(value));
|
|
1045
|
+
listFilter = listTempAll.filter((a) => a[key]?.toString()?.toLowerCase().endsWith(value));
|
|
977
1046
|
break;
|
|
978
1047
|
default:
|
|
979
|
-
listFilter = listTempAll.filter(a => a[key]?.toString()?.toLowerCase().includes(value));
|
|
1048
|
+
listFilter = listTempAll.filter((a) => a[key]?.toString()?.toLowerCase().includes(value));
|
|
980
1049
|
break;
|
|
981
1050
|
}
|
|
982
1051
|
return listFilter;
|
|
@@ -988,7 +1057,9 @@ class SharedService {
|
|
|
988
1057
|
return [];
|
|
989
1058
|
let listFilter = listTempAll;
|
|
990
1059
|
value = value.toString().toLowerCase();
|
|
991
|
-
const words = value.includes("&")
|
|
1060
|
+
const words = value.includes("&")
|
|
1061
|
+
? value.split("&").filter(Boolean)
|
|
1062
|
+
: [value];
|
|
992
1063
|
const filterFunction = (item) => {
|
|
993
1064
|
const itemValue = item[key]?.toString()?.toLowerCase();
|
|
994
1065
|
switch (operatorId) {
|
|
@@ -1006,14 +1077,14 @@ class SharedService {
|
|
|
1006
1077
|
};
|
|
1007
1078
|
if (subKey) {
|
|
1008
1079
|
// Filtrar primero a nivel de sublista
|
|
1009
|
-
listFilter = listFilter.map(filter => {
|
|
1080
|
+
listFilter = listFilter.map((filter) => {
|
|
1010
1081
|
return {
|
|
1011
1082
|
...filter,
|
|
1012
1083
|
[subKey]: filter[subKey]?.filter((item) => filterFunction(item)),
|
|
1013
1084
|
};
|
|
1014
1085
|
});
|
|
1015
1086
|
// Filtrar luego la lista principal basado en si la sublista contiene elementos
|
|
1016
|
-
listFilter = listFilter.filter(filter => filter[subKey].length > 0);
|
|
1087
|
+
listFilter = listFilter.filter((filter) => filter[subKey].length > 0);
|
|
1017
1088
|
}
|
|
1018
1089
|
else {
|
|
1019
1090
|
// Filtrar solo la lista principal
|
|
@@ -1031,7 +1102,7 @@ class SharedService {
|
|
|
1031
1102
|
TransformArrayToMap(arr, getKey) {
|
|
1032
1103
|
//example of Use:
|
|
1033
1104
|
// this.transformArrayToMap<string,any>([{id:1,prop1:"prop1Value"}],(o)=>o.id.toString())
|
|
1034
|
-
return new Map(arr.map(obj => [getKey(obj), obj]));
|
|
1105
|
+
return new Map(arr.map((obj) => [getKey(obj), obj]));
|
|
1035
1106
|
}
|
|
1036
1107
|
UrlHasQaUatSubdomain() {
|
|
1037
1108
|
const { hostname } = new URL(window.location.href);
|
|
@@ -1051,7 +1122,8 @@ class SharedService {
|
|
|
1051
1122
|
"1": "penalty-summary",
|
|
1052
1123
|
};
|
|
1053
1124
|
// Verifica si lastSegment es un número y si tiene un mapeo correspondiente
|
|
1054
|
-
if (!isNaN(Number(lastSegment)) &&
|
|
1125
|
+
if (!isNaN(Number(lastSegment)) &&
|
|
1126
|
+
numberMappings.hasOwnProperty(lastSegment))
|
|
1055
1127
|
return numberMappings[lastSegment];
|
|
1056
1128
|
else
|
|
1057
1129
|
return lastSegment;
|
|
@@ -1096,7 +1168,9 @@ class SharedService {
|
|
|
1096
1168
|
else {
|
|
1097
1169
|
number = this.NumberFormatByNumberCriteria(number, fixed);
|
|
1098
1170
|
}
|
|
1099
|
-
return numberOriginal < 0
|
|
1171
|
+
return numberOriginal < 0
|
|
1172
|
+
? `(${number}${formatCant})`
|
|
1173
|
+
: `${number}${formatCant}`;
|
|
1100
1174
|
}
|
|
1101
1175
|
NumberFormatByNumberCriteria(number, fixed = 4) {
|
|
1102
1176
|
const rounded = (Math.round(number * Math.pow(10, fixed)) / Math.pow(10, fixed)).toFixed(fixed);
|
|
@@ -1121,7 +1195,9 @@ class SharedService {
|
|
|
1121
1195
|
const absoluteValue = Math.abs(number);
|
|
1122
1196
|
const scaledNumber = parseFloat((absoluteValue / 1000).toFixed(decimalPlaces)).toLocaleString("en-US");
|
|
1123
1197
|
const suffix = " K";
|
|
1124
|
-
return isNegative
|
|
1198
|
+
return isNegative
|
|
1199
|
+
? `(${scaledNumber}${suffix})`
|
|
1200
|
+
: `${scaledNumber}${suffix}`;
|
|
1125
1201
|
}
|
|
1126
1202
|
//SYNFCUNTION
|
|
1127
1203
|
GenerateGUID() {
|
|
@@ -1162,8 +1238,8 @@ class SharedService {
|
|
|
1162
1238
|
return isNegative ? `(${finalNumber})` : `${finalNumber}`;
|
|
1163
1239
|
}
|
|
1164
1240
|
SortRecursive(data, column, criteria) {
|
|
1165
|
-
return _.orderBy(data.map(item => {
|
|
1166
|
-
Object.keys(item).forEach(key => {
|
|
1241
|
+
return _.orderBy(data.map((item) => {
|
|
1242
|
+
Object.keys(item).forEach((key) => {
|
|
1167
1243
|
if (Array.isArray(item[key])) {
|
|
1168
1244
|
item[key] = this.SortRecursive(item[key], column, criteria);
|
|
1169
1245
|
}
|
|
@@ -1185,8 +1261,8 @@ class SharedService {
|
|
|
1185
1261
|
], [criteria]);
|
|
1186
1262
|
}
|
|
1187
1263
|
SortRecursivePrimeNg(data, column, criteria) {
|
|
1188
|
-
return _.orderBy(data.map(item => {
|
|
1189
|
-
Object.keys(item).forEach(key => {
|
|
1264
|
+
return _.orderBy(data.map((item) => {
|
|
1265
|
+
Object.keys(item).forEach((key) => {
|
|
1190
1266
|
if (Array.isArray(item[key])) {
|
|
1191
1267
|
item[key] = this.SortRecursive(item[key], column, criteria);
|
|
1192
1268
|
}
|
|
@@ -1195,7 +1271,8 @@ class SharedService {
|
|
|
1195
1271
|
}), [
|
|
1196
1272
|
(elm) => {
|
|
1197
1273
|
let value = elm[column];
|
|
1198
|
-
if (value == null ||
|
|
1274
|
+
if (value == null ||
|
|
1275
|
+
(typeof value === "string" && value.trim() === "")) {
|
|
1199
1276
|
return "___0";
|
|
1200
1277
|
}
|
|
1201
1278
|
if (typeof value === "string") {
|
|
@@ -1211,8 +1288,8 @@ class SharedService {
|
|
|
1211
1288
|
], [criteria]);
|
|
1212
1289
|
}
|
|
1213
1290
|
SortRecursiveNumber(data, column, criteria) {
|
|
1214
|
-
return _.orderBy(data.map(item => {
|
|
1215
|
-
Object.keys(item).forEach(key => {
|
|
1291
|
+
return _.orderBy(data.map((item) => {
|
|
1292
|
+
Object.keys(item).forEach((key) => {
|
|
1216
1293
|
if (Array.isArray(item[key])) {
|
|
1217
1294
|
item[key] = this.SortRecursiveNumber(item[key], column, criteria);
|
|
1218
1295
|
}
|
|
@@ -1234,6 +1311,31 @@ class SharedService {
|
|
|
1234
1311
|
},
|
|
1235
1312
|
], [criteria]);
|
|
1236
1313
|
}
|
|
1314
|
+
IsDateFormat(value) {
|
|
1315
|
+
return (typeof value === "string" && /^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(value));
|
|
1316
|
+
}
|
|
1317
|
+
SortRecursiveDate(data, column, criteria) {
|
|
1318
|
+
return _.orderBy(data.map((item) => {
|
|
1319
|
+
Object.keys(item).forEach((key) => {
|
|
1320
|
+
if (Array.isArray(item[key])) {
|
|
1321
|
+
item[key] = this.SortRecursiveDate(item[key], column, criteria);
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
return item;
|
|
1325
|
+
}), [
|
|
1326
|
+
(elm) => {
|
|
1327
|
+
let value = elm[column];
|
|
1328
|
+
if (value == null || value === "") {
|
|
1329
|
+
return Number.NEGATIVE_INFINITY;
|
|
1330
|
+
}
|
|
1331
|
+
const dateValue = new Date(value);
|
|
1332
|
+
if (isNaN(dateValue.getTime())) {
|
|
1333
|
+
return Number.NEGATIVE_INFINITY;
|
|
1334
|
+
}
|
|
1335
|
+
return dateValue.getTime();
|
|
1336
|
+
},
|
|
1337
|
+
], [criteria]);
|
|
1338
|
+
}
|
|
1237
1339
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedService, deps: [{ token: i1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1238
1340
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SharedService, providedIn: "root" });
|
|
1239
1341
|
}
|
|
@@ -1797,6 +1899,7 @@ class TableComponent {
|
|
|
1797
1899
|
SelectedIdentifier = null;
|
|
1798
1900
|
ClassName = "";
|
|
1799
1901
|
DefaultSortField = "";
|
|
1902
|
+
DefaultSortOrder = 1;
|
|
1800
1903
|
scrollHeight = "400px";
|
|
1801
1904
|
scrollable = false;
|
|
1802
1905
|
AllowedPageSizes = [10, 25, 50, 100];
|
|
@@ -1811,6 +1914,7 @@ class TableComponent {
|
|
|
1811
1914
|
ColumnGroups;
|
|
1812
1915
|
RowResumenGroups;
|
|
1813
1916
|
AdditionalTemplate;
|
|
1917
|
+
AdditionalExtendedTemplate;
|
|
1814
1918
|
AdditionalCentralTemplate;
|
|
1815
1919
|
ColumnList = [];
|
|
1816
1920
|
ColumnGroupList = [];
|
|
@@ -1829,6 +1933,10 @@ class TableComponent {
|
|
|
1829
1933
|
Levels = [];
|
|
1830
1934
|
ngOnChanges() {
|
|
1831
1935
|
this.LoadSearchOptions();
|
|
1936
|
+
if (!this.SortField && this.DefaultSortField) {
|
|
1937
|
+
this.SortField = this.DefaultSortField;
|
|
1938
|
+
this.SortOrder = this.DefaultSortOrder;
|
|
1939
|
+
}
|
|
1832
1940
|
this.ExecuteSearch({});
|
|
1833
1941
|
this.ValidateSelect();
|
|
1834
1942
|
}
|
|
@@ -1877,14 +1985,30 @@ class TableComponent {
|
|
|
1877
1985
|
this.SortPages();
|
|
1878
1986
|
}
|
|
1879
1987
|
SortPages() {
|
|
1988
|
+
if (!this.SortField) {
|
|
1989
|
+
this.UpdatePages();
|
|
1990
|
+
return;
|
|
1991
|
+
}
|
|
1880
1992
|
const order = this.SortOrder === 1 ? "asc" : "desc";
|
|
1881
1993
|
const field = this.SortField;
|
|
1994
|
+
const colConfig = this.ColumnList.find((c) => c.field === field);
|
|
1995
|
+
if (!colConfig) {
|
|
1996
|
+
console.warn("Columna no encontrada:", field);
|
|
1997
|
+
this.UpdatePages();
|
|
1998
|
+
return;
|
|
1999
|
+
}
|
|
2000
|
+
const formatType = colConfig.formatType;
|
|
1882
2001
|
const sampleValue = this.ListDataFilter.find((item) => item[field] !== null && item[field] !== undefined)?.[field];
|
|
1883
2002
|
if (typeof sampleValue === "number") {
|
|
1884
2003
|
this.ListDataFilter = this.SharedService.SortRecursiveNumber([...this.ListDataFilter], field, order);
|
|
1885
2004
|
}
|
|
1886
2005
|
else {
|
|
1887
|
-
|
|
2006
|
+
if (formatType === "date") {
|
|
2007
|
+
this.ListDataFilter = this.SharedService.SortRecursiveDate([...this.ListDataFilter], field, order);
|
|
2008
|
+
}
|
|
2009
|
+
else {
|
|
2010
|
+
this.ListDataFilter = this.SharedService.SortRecursivePrimeNg([...this.ListDataFilter], field, order);
|
|
2011
|
+
}
|
|
1888
2012
|
}
|
|
1889
2013
|
this.UpdatePages();
|
|
1890
2014
|
}
|
|
@@ -2004,7 +2128,7 @@ class TableComponent {
|
|
|
2004
2128
|
this.ListDataSelectedFilter = [...this.ListDataSelectedTemp];
|
|
2005
2129
|
}
|
|
2006
2130
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2007
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"-1\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >{{ col.header }}</span\r\n >\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2131
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableComponent, isStandalone: true, selector: "intelica-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ClassName: "ClassName", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >{{ col.header }}</span\r\n >\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
2008
2132
|
}
|
|
2009
2133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
2010
2134
|
type: Component,
|
|
@@ -2020,7 +2144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2020
2144
|
CheckboxModule,
|
|
2021
2145
|
FormsModule,
|
|
2022
2146
|
FormatCellPipe,
|
|
2023
|
-
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"
|
|
2147
|
+
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"ListDataTable\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelectedFilter\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"DefaultSortOrder\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >{{ col.header }}</span\r\n >\r\n @if(!col.showIndex) { @if(col.isChecboxColumn){\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if(ShowCheckbox && ColumnGroupList.length == 0 ){\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if(col.isChecboxColumn){\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
2024
2148
|
}], propDecorators: { ComponentId: [{
|
|
2025
2149
|
type: Input
|
|
2026
2150
|
}], ListData: [{
|
|
@@ -2049,6 +2173,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2049
2173
|
type: Input
|
|
2050
2174
|
}], DefaultSortField: [{
|
|
2051
2175
|
type: Input
|
|
2176
|
+
}], DefaultSortOrder: [{
|
|
2177
|
+
type: Input
|
|
2052
2178
|
}], scrollHeight: [{
|
|
2053
2179
|
type: Input
|
|
2054
2180
|
}], scrollable: [{
|
|
@@ -2083,6 +2209,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2083
2209
|
}], AdditionalTemplate: [{
|
|
2084
2210
|
type: ContentChild,
|
|
2085
2211
|
args: ["additionalTemplate"]
|
|
2212
|
+
}], AdditionalExtendedTemplate: [{
|
|
2213
|
+
type: ContentChild,
|
|
2214
|
+
args: ["additionalExtendedTemplate"]
|
|
2086
2215
|
}], AdditionalCentralTemplate: [{
|
|
2087
2216
|
type: ContentChild,
|
|
2088
2217
|
args: ["additionalCentralTemplate"]
|
|
@@ -2208,16 +2337,36 @@ class TreeTableComponent {
|
|
|
2208
2337
|
groupRowsBy = "";
|
|
2209
2338
|
dataKey = "";
|
|
2210
2339
|
DefaultSortField = "";
|
|
2340
|
+
DefaultSortOrder = 1;
|
|
2211
2341
|
scrollHeight = "400px";
|
|
2212
2342
|
scrollable = false;
|
|
2213
2343
|
tableStyle = {};
|
|
2344
|
+
ShowSearch = false;
|
|
2345
|
+
ShowPagination = false;
|
|
2346
|
+
RowsPerPage = 10;
|
|
2347
|
+
AllowedPageSizes = [10, 25, 50, 100];
|
|
2348
|
+
ShowCheckbox = false;
|
|
2349
|
+
ShowIndex = false;
|
|
2350
|
+
ShowSearchTooltip = false;
|
|
2351
|
+
ListDataSelected = [];
|
|
2352
|
+
SelectedIdentifier = null;
|
|
2353
|
+
ListSearchOptions = [];
|
|
2354
|
+
ShowRowPerPage = true;
|
|
2355
|
+
EmitSelectedItem = new EventEmitter();
|
|
2356
|
+
EmitListDataFilter = new EventEmitter();
|
|
2357
|
+
EmitSearchEvent = new EventEmitter();
|
|
2358
|
+
EmitSortEvent = new EventEmitter();
|
|
2214
2359
|
Columns;
|
|
2215
2360
|
ColumnGroups;
|
|
2216
2361
|
RowResumenGroups;
|
|
2217
2362
|
AdditionalTemplate;
|
|
2218
2363
|
AdditionalCentralTemplate;
|
|
2219
|
-
|
|
2364
|
+
AdditionalExtendedTemplate;
|
|
2365
|
+
PaginatorTable;
|
|
2366
|
+
SearchTable;
|
|
2220
2367
|
ListDataFilter = [];
|
|
2368
|
+
ListDataTable = [];
|
|
2369
|
+
ListDataSelectedTemp = [];
|
|
2221
2370
|
ColumnList = [];
|
|
2222
2371
|
ColumnGroupList = [];
|
|
2223
2372
|
RowResumenList = [];
|
|
@@ -2225,21 +2374,26 @@ class TreeTableComponent {
|
|
|
2225
2374
|
Levels = [];
|
|
2226
2375
|
SortOrder = 1;
|
|
2227
2376
|
SortField = null;
|
|
2377
|
+
TotalRecords = 0;
|
|
2378
|
+
CurrentPage = 1;
|
|
2379
|
+
SearchInput = {};
|
|
2380
|
+
ListSearchOptionsSimple = [];
|
|
2228
2381
|
ngOnChanges() {
|
|
2229
2382
|
this.ListDataFilter = [...this.ListData];
|
|
2383
|
+
if (!this.SortField && this.DefaultSortField) {
|
|
2384
|
+
this.SortField = this.DefaultSortField;
|
|
2385
|
+
this.SortOrder = this.DefaultSortOrder;
|
|
2386
|
+
}
|
|
2387
|
+
this.ExecuteSearch({});
|
|
2388
|
+
this.ValidateSelect();
|
|
2230
2389
|
}
|
|
2231
2390
|
ngAfterContentInit() {
|
|
2232
2391
|
this.ColumnList = this.Columns.toArray();
|
|
2233
2392
|
this.ColumnGroupList = this.ColumnGroups.toArray();
|
|
2234
2393
|
this.RowResumenList = this.RowResumenGroups.toArray();
|
|
2235
|
-
this.MaxLevel = Math.max(...this.ColumnGroupList.map(c => c.level)) + 1;
|
|
2394
|
+
this.MaxLevel = Math.max(...this.ColumnGroupList.map((c) => c.level)) + 1;
|
|
2236
2395
|
this.Levels = Array.from({ length: this.MaxLevel }, (_, i) => i);
|
|
2237
2396
|
}
|
|
2238
|
-
getLetter(index) {
|
|
2239
|
-
if (index < 0 || index > 25)
|
|
2240
|
-
return "";
|
|
2241
|
-
return String.fromCharCode(97 + index);
|
|
2242
|
-
}
|
|
2243
2397
|
OnSort(field) {
|
|
2244
2398
|
if (this.SortField === field) {
|
|
2245
2399
|
this.SortOrder *= -1;
|
|
@@ -2250,24 +2404,154 @@ class TreeTableComponent {
|
|
|
2250
2404
|
}
|
|
2251
2405
|
this.SortPages();
|
|
2252
2406
|
}
|
|
2407
|
+
OnPageChange(pageIndex) {
|
|
2408
|
+
this.CurrentPage = pageIndex;
|
|
2409
|
+
this.UpdatePages();
|
|
2410
|
+
}
|
|
2253
2411
|
SortPages() {
|
|
2254
2412
|
const order = this.SortOrder === 1 ? "asc" : "desc";
|
|
2255
2413
|
const field = this.SortField;
|
|
2256
|
-
const sampleValue = this.ListDataFilter.find(item => item[field] !== null && item[field] !== undefined)?.[field];
|
|
2414
|
+
const sampleValue = this.ListDataFilter.find((item) => item[field] !== null && item[field] !== undefined)?.[field];
|
|
2257
2415
|
if (typeof sampleValue === "number") {
|
|
2258
2416
|
this.ListDataFilter = this.SharedService.SortRecursiveNumber([...this.ListDataFilter], field, order);
|
|
2259
2417
|
}
|
|
2260
2418
|
else {
|
|
2261
2419
|
this.ListDataFilter = this.SharedService.SortRecursivePrimeNg([...this.ListDataFilter], field, order);
|
|
2262
2420
|
}
|
|
2263
|
-
this.
|
|
2421
|
+
this.UpdatePages();
|
|
2422
|
+
}
|
|
2423
|
+
ExecuteSearch(event) {
|
|
2424
|
+
this.ListDataFilter = [...this.ListData];
|
|
2425
|
+
this.SortPages();
|
|
2426
|
+
}
|
|
2427
|
+
OnHeaderCheckboxChange(event, field) {
|
|
2428
|
+
const checked = event.checked;
|
|
2429
|
+
if (!this.SelectedIdentifier)
|
|
2430
|
+
return;
|
|
2431
|
+
const idsSelected = new Set(this.ListDataFilter.map((item) => item[this.SelectedIdentifier]));
|
|
2432
|
+
this.ListData.forEach((item) => {
|
|
2433
|
+
const id = item[this.SelectedIdentifier];
|
|
2434
|
+
const exists = idsSelected.has(id);
|
|
2435
|
+
if (exists) {
|
|
2436
|
+
item[field] = checked;
|
|
2437
|
+
}
|
|
2438
|
+
});
|
|
2439
|
+
this.IsInderteminate(field);
|
|
2440
|
+
}
|
|
2441
|
+
IsInderteminate(column) {
|
|
2442
|
+
const rowsChek = this.ListData.filter((item) => item[column]).length;
|
|
2443
|
+
const element = [...document.querySelectorAll("[data-check]")].find((x) => x.getAttribute("data-check") == column);
|
|
2444
|
+
if (element == undefined)
|
|
2445
|
+
return;
|
|
2446
|
+
if (rowsChek > 0 && rowsChek < this.ListData.length)
|
|
2447
|
+
element.setAttribute("class", "prCheckbox--indeterminate");
|
|
2448
|
+
else
|
|
2449
|
+
element.removeAttribute("class");
|
|
2450
|
+
}
|
|
2451
|
+
getLetter(index) {
|
|
2452
|
+
if (index < 0 || index > 25)
|
|
2453
|
+
return "";
|
|
2454
|
+
return String.fromCharCode(97 + index);
|
|
2455
|
+
}
|
|
2456
|
+
UpdatePages() {
|
|
2457
|
+
if (this.ShowPagination) {
|
|
2458
|
+
this.TotalRecords = this.ListDataFilter.length;
|
|
2459
|
+
const start = (this.CurrentPage - 1) * this.RowsPerPage;
|
|
2460
|
+
const end = start + this.RowsPerPage;
|
|
2461
|
+
this.ListDataTable = this.ListDataFilter.slice(start, end);
|
|
2462
|
+
}
|
|
2463
|
+
else {
|
|
2464
|
+
this.ListDataTable = this.ListDataFilter;
|
|
2465
|
+
}
|
|
2466
|
+
this.EmitSearchValues();
|
|
2467
|
+
}
|
|
2468
|
+
ValidateSelect() {
|
|
2469
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox) {
|
|
2470
|
+
this.ShowCheckbox = false;
|
|
2471
|
+
return;
|
|
2472
|
+
}
|
|
2473
|
+
const selectedIds = new Set(this.ListDataSelected.map((item) => item[this.SelectedIdentifier]));
|
|
2474
|
+
this.ListDataSelectedTemp = this.ListData.filter((item) => selectedIds.has(item[this.SelectedIdentifier]));
|
|
2475
|
+
}
|
|
2476
|
+
SelectAll(event) {
|
|
2477
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
2478
|
+
return;
|
|
2479
|
+
if (event.checked) {
|
|
2480
|
+
const idsSelected = new Set(this.ListDataSelectedTemp.map((item) => item[this.SelectedIdentifier]));
|
|
2481
|
+
this.ListDataFilter.forEach((item) => {
|
|
2482
|
+
if (!idsSelected.has(item[this.SelectedIdentifier])) {
|
|
2483
|
+
this.ListDataSelectedTemp.push(item);
|
|
2484
|
+
}
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
else {
|
|
2488
|
+
const idsSelected = new Set(this.ListDataFilter.map((item) => item[this.SelectedIdentifier]));
|
|
2489
|
+
this.ListDataSelectedTemp = this.ListDataSelectedTemp.filter((item) => !idsSelected.has(item[this.SelectedIdentifier]));
|
|
2490
|
+
}
|
|
2491
|
+
this.EmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
2492
|
+
}
|
|
2493
|
+
OnRowSelect(event) {
|
|
2494
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
2495
|
+
return;
|
|
2496
|
+
const selectedItem = event.data;
|
|
2497
|
+
const exists = this.ListDataSelectedTemp.some((item) => item[this.SelectedIdentifier] ===
|
|
2498
|
+
selectedItem[this.SelectedIdentifier]);
|
|
2499
|
+
if (!exists) {
|
|
2500
|
+
this.ListDataSelectedTemp.push(selectedItem);
|
|
2501
|
+
}
|
|
2502
|
+
this.EmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
2503
|
+
}
|
|
2504
|
+
OnRowUnselect(event) {
|
|
2505
|
+
if (!this.SelectedIdentifier && this.ShowCheckbox)
|
|
2506
|
+
return;
|
|
2507
|
+
const unselectedItem = event.data;
|
|
2508
|
+
this.ListDataSelectedTemp = this.ListDataSelectedTemp.filter((item) => item[this.SelectedIdentifier] !==
|
|
2509
|
+
unselectedItem[this.SelectedIdentifier]);
|
|
2510
|
+
this.EmitSelectedItem.emit(this.ListDataSelectedTemp);
|
|
2511
|
+
}
|
|
2512
|
+
ResetTable() {
|
|
2513
|
+
if (this.PaginatorTable) {
|
|
2514
|
+
this.PaginatorTable.CurrentPage = 1;
|
|
2515
|
+
this.CurrentPage = 1;
|
|
2516
|
+
}
|
|
2517
|
+
if (this.SearchTable) {
|
|
2518
|
+
this.SearchTable.ClearSearchText();
|
|
2519
|
+
this.SearchInput.fieldText = "";
|
|
2520
|
+
}
|
|
2521
|
+
this.ExecuteSearch({});
|
|
2522
|
+
}
|
|
2523
|
+
EmitSearchValues() {
|
|
2524
|
+
this.EmitListDataFilter.emit(this.ListDataFilter);
|
|
2525
|
+
this.EmitSearchEvent.emit(this.SearchInput);
|
|
2526
|
+
this.EmitSortEvent.emit([
|
|
2527
|
+
{
|
|
2528
|
+
sortOrder: this.SortOrder,
|
|
2529
|
+
sortField: this.SortField?.toString() ?? "",
|
|
2530
|
+
},
|
|
2531
|
+
]);
|
|
2532
|
+
}
|
|
2533
|
+
OnRowsPerPageChange(value) {
|
|
2534
|
+
this.RowsPerPage = value;
|
|
2535
|
+
this.ResetTable();
|
|
2264
2536
|
}
|
|
2265
2537
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2266
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TreeTableComponent, isStandalone: true, selector: "intelica-tree-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ClassName: "ClassName", groupRowsBy: "groupRowsBy", dataKey: "dataKey", DefaultSortField: "DefaultSortField", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle" }, outputs: { EmitSortEvent: "EmitSortEvent" }, queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: TreeColumnComponent }, { propertyName: "ColumnGroups", predicate: TreeColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenTreeComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n\t<div class=\"prTableTools\">\r\n\t\t<div class=\"prTableTools__new prTableTools__new--left\">\r\n\t\t\t@if (AdditionalTemplate) {\r\n\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n\t\t\t}\r\n\t\t</div>\r\n\t\t@if (AdditionalCentralTemplate) {\r\n\t\t<div class=\"prTableTools__new prTableTools__new--right\">\r\n\t\t\t<ng-container *ngTemplateOutlet=\"AdditionalCentralTemplate\"></ng-container>\r\n\t\t</div>\r\n\t\t}\r\n\t</div>\r\n\t<p-table\r\n\t\tclass=\"prTableBasic\"\r\n\t\t[value]=\"ListDataFilter\"\r\n\t\t[ngClass]=\"ClassName\"\r\n\t\tresponsiveLayout=\"scroll\"\r\n\t\t[sortOrder]=\"-1\"\r\n\t\t[groupRowsBy]=\"groupRowsBy\"\r\n\t\t[dataKey]=\"dataKey\"\r\n\t\t[scrollable]=\"scrollable\"\r\n\t\t[scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n\t\t[tableStyle]=\"tableStyle\"\r\n\t>\r\n\t\t<ng-template pTemplate=\"header\">\r\n\t\t\t@for (level of Levels; track $index) {\r\n\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnGroupList; track $index) { @if (col.level === level) {\r\n\t\t\t\t<th [attr.colspan]=\"col.colspan\" \r\n\t\t\t\t\t[attr.rowspan]=\"col.rowspan\" \r\n\t\t\t\t\t[style.min-width]=\"col.minWidth\" \r\n\t\t\t\t\t[pSortableColumn]=\"col.sortable ? col.field : ''\" \r\n\t\t\t\t\t(click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t\t}\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) { @if(col.showHeader ){\r\n\t\t\t\t<th [class]=\"col.className\" [pSortableColumn]=\"col.sortable ? col.field : ''\" [style.width]=\"col.width\" [style.min-width]=\"col.minWidth\" (click)=\"col.sortable && OnSort(col.field)\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<span pTooltip=\"{{ col.headerTooltip }}\" tooltipPosition=\"{{ col.headerTooltipPosition }}\">{{ col.header }}</span>\r\n\t\t\t\t\t\t<p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</th>\r\n\t\t\t\t} }\r\n\t\t\t</tr>\r\n\t\t\t@if (ListDataFilter.length > 0) {\r\n\t\t\t<tr class=\"fixedRow\">\r\n\t\t\t\t@for (col of RowResumenList; track $index) {\r\n\t\t\t\t<td [ngClass]=\"col.className\" [attr.colspan]=\"col.colspan\" [attr.rowspan]=\"col.rowspan\">\r\n\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t} @else {\r\n\t\t\t\t\t<ng-template #defaultContent></ng-template>\r\n\t\t\t\t\t}\r\n\t\t\t\t</td>\r\n\t\t\t\t}\r\n\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\" let-expanded=\"expanded\">\r\n\t\t\t<tr>\r\n\t\t\t\t@for (col of ColumnList; track $index) {\r\n\t\t\t\t<td [ngClass]=\"col.className\">\r\n\t\t\t\t\t@if (col.showIndex) {\r\n\t\t\t\t\t\t{{ rowIndex + 1 }}\r\n\t\t\t\t\t} @else if (col.field === 'name' && rowData.children && rowData.children.length > 0) {\r\n\t\t\t\t\t<div class=\"prTable__expandToggleRow\">\r\n\t\t\t\t\t\t<!-- <p-button type=\"button\" pRipple [pRowToggler]=\"rowData\" [text]=\"true\" [rounded]=\"true\" [plain]=\"true\" [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"></p-button> -->\r\n\t\t\t\t\t\t<p-button [pRowToggler]=\"rowData\" class=\"prButton prButton--icon prButton--iconBlue\">\r\n\t\t\t\t\t\t\t<i [class]=\"expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\"></i>\r\n\t\t\t\t\t\t</p-button>\r\n\r\n\t\t\t\t\t\t<!-- Texto de la columna \"name\" -->\r\n\t\t\t\t\t\t<span class=\"text-breakWord\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t} @else {\r\n\t\t\t\t\t<!-- Otras columnas -->\r\n\t\t\t\t\t@if (col.templateRef) {\r\n\t\t\t\t\t<ng-container *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"></ng-container>\r\n\t\t\t\t\t} @else {\r\n\t\t\t\t\t<span class=\"text-breakWord\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t{{ rowData[col.field] }}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\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 pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n\t\t\t<ng-container *ngIf=\"rowData.children?.length\">\r\n\t\t\t\t<tr *ngFor=\"let childRow of rowData.children; let i = index\" class=\"subRow\">\r\n\t\t\t\t\t<td *ngFor=\"let col of ColumnList; let j = index\" [ngClass]=\"col.className\">\r\n\t\t\t\t\t\t<span class=\"text-breakWord\" pTooltip=\"{{ col.tooltip }}\" tooltipPosition=\"{{ col.tooltipPosition }}\">\r\n\t\t\t\t\t\t\t<ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n\t\t\t\t\t\t\t\t<!-- \u00CDndice tipo 4.a, 4.b, etc -->\r\n\t\t\t\t\t\t\t\t{{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<ng-template #normalCell>\r\n\t\t\t\t\t\t\t\t<!-- {{ col.field === \"id\" && i < 26 ? childRow[col.field] + \".\" + getLetter(i) : childRow[col.field] }} -->\r\n\t\t\t\t\t\t\t\t@if(col.field === \"id\" && i < 26) {\r\n\t\t\t\t\t\t\t\t<span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n\t\t\t\t\t\t\t\t} @else {\r\n\t\t\t\t\t\t\t\t<span [class]=\"col.field === 'name' ? 'prTable__expandIdentText' : ''\">{{ childRow[col.field] }}</span>\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</ng-container>\r\n\t\t</ng-template>\r\n\r\n\t\t<ng-template #emptymessage>\r\n\t\t\t<tr>\r\n\t\t\t\t<td [attr.colspan]=\"ColumnList.length\" class=\"text-center\">\r\n\t\t\t\t\t{{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</ng-template>\r\n\t</p-table>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i2$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
2538
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TreeTableComponent, isStandalone: true, selector: "intelica-tree-table", inputs: { ComponentId: "ComponentId", ListData: "ListData", ClassName: "ClassName", groupRowsBy: "groupRowsBy", dataKey: "dataKey", DefaultSortField: "DefaultSortField", DefaultSortOrder: "DefaultSortOrder", scrollHeight: "scrollHeight", scrollable: "scrollable", tableStyle: "tableStyle", ShowSearch: "ShowSearch", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", AllowedPageSizes: "AllowedPageSizes", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ListDataSelected: "ListDataSelected", SelectedIdentifier: "SelectedIdentifier", ListSearchOptions: "ListSearchOptions", ShowRowPerPage: "ShowRowPerPage" }, outputs: { EmitSelectedItem: "EmitSelectedItem", EmitListDataFilter: "EmitListDataFilter", EmitSearchEvent: "EmitSearchEvent", EmitSortEvent: "EmitSortEvent" }, queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "Columns", predicate: TreeColumnComponent }, { propertyName: "ColumnGroups", predicate: TreeColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenTreeComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if(col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else if (col.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (ShowRowPerPage) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i2$1.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i5.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "name", "disabled", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "inputStyle", "styleClass", "inputClass", "indeterminate", "size", "formControl", "checkboxIcon", "readonly", "required", "autofocus", "trueValue", "falseValue", "variant"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
2267
2539
|
}
|
|
2268
2540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TreeTableComponent, decorators: [{
|
|
2269
2541
|
type: Component,
|
|
2270
|
-
args: [{ selector: "intelica-tree-table", standalone: true, imports: [
|
|
2542
|
+
args: [{ selector: "intelica-tree-table", standalone: true, imports: [
|
|
2543
|
+
CommonModule,
|
|
2544
|
+
SearchComponent,
|
|
2545
|
+
PaginatorComponent,
|
|
2546
|
+
Select,
|
|
2547
|
+
TableModule,
|
|
2548
|
+
BadgeModule,
|
|
2549
|
+
TooltipModule,
|
|
2550
|
+
TermPipe,
|
|
2551
|
+
CheckboxModule,
|
|
2552
|
+
FormsModule,
|
|
2553
|
+
ButtonModule,
|
|
2554
|
+
], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <p-table\r\n class=\"prTableBasic\"\r\n [value]=\"ListDataTable\"\r\n [ngClass]=\"ClassName\"\r\n responsiveLayout=\"scroll\"\r\n [(selection)]=\"ListDataSelected\"\r\n (onHeaderCheckboxToggle)=\"SelectAll($event)\"\r\n (onRowSelect)=\"OnRowSelect($event)\"\r\n (onRowUnselect)=\"OnRowUnselect($event)\"\r\n [groupRowsBy]=\"groupRowsBy\"\r\n [dataKey]=\"dataKey\"\r\n [sortField]=\"DefaultSortField\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n [sortOrder]=\"SortOrder\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if(col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) { @if (col.isChecboxColumn) {\r\n <br />\r\n <p-checkbox\r\n [binary]=\"true\"\r\n (click)=\"$event.stopPropagation()\"\r\n (onChange)=\"OnHeaderCheckboxChange($event, col.field)\"\r\n [attr.data-check]=\"col.field\"\r\n ></p-checkbox>\r\n } @else {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n } }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox\r\n class=\"prCheckbox\"\r\n [ngClass]=\"{\r\n 'prCheckbox--indeterminate':\r\n ListDataSelectedTemp.length > 0 &&\r\n ListDataSelectedTemp.length < ListDataFilter.length\r\n }\"\r\n />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (ListDataFilter.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span\r\n ><ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container\r\n ></span>\r\n } @else {\r\n <ng-template #defaultContent></ng-template>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowData\r\n let-rowIndex=\"rowIndex\"\r\n let-expanded=\"expanded\"\r\n >\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else if (col.field === 'name' && rowData.children &&\r\n rowData.children.length > 0) {\r\n <div class=\"prTable__expandToggleRow\">\r\n <p-button\r\n [pRowToggler]=\"rowData\"\r\n class=\"prButton prButton--icon prButton--iconBlue\"\r\n >\r\n <i\r\n [class]=\"\r\n expanded ? 'icon icon-collapse-rows' : 'icon icon-expand-rows'\r\n \"\r\n ></i>\r\n </p-button>\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] }}\r\n </span>\r\n </div>\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else if (col.isChecboxColumn) {\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [(ngModel)]=\"rowData[col.field]\"\r\n (onChange)=\"IsInderteminate(col.field)\"\r\n ></p-checkbox>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"expandedrow\" let-rowData let-rowIndex=\"rowIndex\">\r\n <ng-container *ngIf=\"rowData.children?.length\">\r\n <tr\r\n *ngFor=\"let childRow of rowData.children; let i = index\"\r\n class=\"subRow\"\r\n >\r\n <td\r\n *ngFor=\"let col of ColumnList; let j = index\"\r\n [ngClass]=\"col.className\"\r\n >\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n <ng-container *ngIf=\"col.showIndex && j === 0; else normalCell\">\r\n {{ rowIndex + 1 + \".\" + getLetter(i) }}\r\n </ng-container>\r\n <ng-template #normalCell>\r\n @if (col.field === \"id\" && i < 26) {\r\n <span>{{ childRow[col.field] + \".\" + getLetter(i) }}</span>\r\n } @else {\r\n <span\r\n [class]=\"\r\n col.field === 'name' ? 'prTable__expandIdentText' : ''\r\n \"\r\n >\r\n {{ childRow[col.field] }}\r\n </span>\r\n }\r\n </ng-template>\r\n </span>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-template>\r\n\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <div class=\"prTableToolsBottom\">\r\n @if (ShowRowPerPage) {\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"ListDataFilter.length\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n >\r\n </intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
2271
2555
|
}], propDecorators: { ComponentId: [{
|
|
2272
2556
|
type: Input
|
|
2273
2557
|
}], ListData: [{
|
|
@@ -2280,12 +2564,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2280
2564
|
type: Input
|
|
2281
2565
|
}], DefaultSortField: [{
|
|
2282
2566
|
type: Input
|
|
2567
|
+
}], DefaultSortOrder: [{
|
|
2568
|
+
type: Input
|
|
2283
2569
|
}], scrollHeight: [{
|
|
2284
2570
|
type: Input
|
|
2285
2571
|
}], scrollable: [{
|
|
2286
2572
|
type: Input
|
|
2287
2573
|
}], tableStyle: [{
|
|
2288
2574
|
type: Input
|
|
2575
|
+
}], ShowSearch: [{
|
|
2576
|
+
type: Input
|
|
2577
|
+
}], ShowPagination: [{
|
|
2578
|
+
type: Input
|
|
2579
|
+
}], RowsPerPage: [{
|
|
2580
|
+
type: Input
|
|
2581
|
+
}], AllowedPageSizes: [{
|
|
2582
|
+
type: Input
|
|
2583
|
+
}], ShowCheckbox: [{
|
|
2584
|
+
type: Input
|
|
2585
|
+
}], ShowIndex: [{
|
|
2586
|
+
type: Input
|
|
2587
|
+
}], ShowSearchTooltip: [{
|
|
2588
|
+
type: Input
|
|
2589
|
+
}], ListDataSelected: [{
|
|
2590
|
+
type: Input
|
|
2591
|
+
}], SelectedIdentifier: [{
|
|
2592
|
+
type: Input
|
|
2593
|
+
}], ListSearchOptions: [{
|
|
2594
|
+
type: Input
|
|
2595
|
+
}], ShowRowPerPage: [{
|
|
2596
|
+
type: Input
|
|
2597
|
+
}], EmitSelectedItem: [{
|
|
2598
|
+
type: Output
|
|
2599
|
+
}], EmitListDataFilter: [{
|
|
2600
|
+
type: Output
|
|
2601
|
+
}], EmitSearchEvent: [{
|
|
2602
|
+
type: Output
|
|
2603
|
+
}], EmitSortEvent: [{
|
|
2604
|
+
type: Output
|
|
2289
2605
|
}], Columns: [{
|
|
2290
2606
|
type: ContentChildren,
|
|
2291
2607
|
args: [TreeColumnComponent]
|
|
@@ -2301,8 +2617,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2301
2617
|
}], AdditionalCentralTemplate: [{
|
|
2302
2618
|
type: ContentChild,
|
|
2303
2619
|
args: ["additionalCentralTemplate"]
|
|
2304
|
-
}],
|
|
2305
|
-
type:
|
|
2620
|
+
}], AdditionalExtendedTemplate: [{
|
|
2621
|
+
type: ContentChild,
|
|
2622
|
+
args: ["additionalExtendedTemplate"]
|
|
2623
|
+
}], PaginatorTable: [{
|
|
2624
|
+
type: ViewChild,
|
|
2625
|
+
args: ["paginatorTable"]
|
|
2626
|
+
}], SearchTable: [{
|
|
2627
|
+
type: ViewChild,
|
|
2628
|
+
args: ["searchTable"]
|
|
2306
2629
|
}] } });
|
|
2307
2630
|
|
|
2308
2631
|
class MatrixColumnComponent {
|
|
@@ -2801,11 +3124,11 @@ class FilterChipsComponent {
|
|
|
2801
3124
|
return value ?? null;
|
|
2802
3125
|
}
|
|
2803
3126
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FilterChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2804
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: FilterChipsComponent, isStandalone: true, selector: "filter-chips", inputs: { filters: "filters" }, outputs: { remove: "remove", openPopUp: "openPopUp" }, providers: [DatePipe], ngImport: i0, template: "<div class=\"d-flex gap-2\">\r\n @for (item of filters; track $index) {\r\n <button\r\n class=\"prPill\"\r\n pInputText\r\n [pTooltip]=\"\r\n item.isTooltipForm\r\n ? tooltipFormContent\r\n : item.valueName!.length > 1\r\n ? tooltipContent\r\n : item.title ?? ''\r\n \"\r\n tooltipPosition=\"top\"\r\n >\r\n <ng-template #tooltipFormContent>\r\n <span>{{ item.text?.toString() }}</span\r\n ><br />\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of item.valueName\">{{ value }}</li>\r\n </ul>\r\n </ng-template>\r\n <ng-template #tooltipContent>\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of sortList(item.valueName)\">\r\n {{ value }}\r\n </li>\r\n </ul>\r\n </ng-template>\r\n <span\r\n *ngIf=\"isBooleanTrue(item.value)\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title && item.title.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"\r\n (!item.valueName || item.valueName.length === 0) &&\r\n item.value &&\r\n item.value.length > 0 &&\r\n !item.dateFormat\r\n \"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15\r\n }}{{ item.text && item.text.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.dateFormat\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ formatDateValue(item.value, item.dateFormat) }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName?.length === 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15 }}{{ item.text!.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title!.length > 15 ? \"...\" : \"\" }}</span\r\n >\r\n <span\r\n *ngIf=\"item.valueName!.length > 1 && !item.isTooltipForm\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n ({{ item.valueName?.length }})\r\n </span>\r\n <i class=\"icon-close1\" (click)=\"onRemove(item)\"></i>\r\n </button>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
3127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: FilterChipsComponent, isStandalone: true, selector: "filter-chips", inputs: { filters: "filters" }, outputs: { remove: "remove", openPopUp: "openPopUp" }, providers: [DatePipe], ngImport: i0, template: "<div class=\"d-flex gap-2 flex-wrap\">\r\n @for (item of filters; track $index) {\r\n <button\r\n class=\"prPill\"\r\n pInputText\r\n [pTooltip]=\"\r\n item.isTooltipForm\r\n ? tooltipFormContent\r\n : item.valueName!.length > 1\r\n ? tooltipContent\r\n : item.title ?? ''\r\n \"\r\n tooltipPosition=\"top\"\r\n >\r\n <ng-template #tooltipFormContent>\r\n <span>{{ item.text?.toString() }}</span\r\n ><br />\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of item.valueName\">{{ value }}</li>\r\n </ul>\r\n </ng-template>\r\n <ng-template #tooltipContent>\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of sortList(item.valueName)\">\r\n {{ value }}\r\n </li>\r\n </ul>\r\n </ng-template>\r\n <span\r\n *ngIf=\"isBooleanTrue(item.value)\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title && item.title.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"\r\n (!item.valueName || item.valueName.length === 0) &&\r\n item.value &&\r\n item.value.length > 0 &&\r\n !item.dateFormat\r\n \"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15\r\n }}{{ item.text && item.text.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.dateFormat\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ formatDateValue(item.value, item.dateFormat) }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName?.length === 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15 }}{{ item.text!.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title!.length > 15 ? \"...\" : \"\" }}</span\r\n >\r\n <span\r\n *ngIf=\"item.valueName!.length > 1 && !item.isTooltipForm\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n ({{ item.valueName?.length }})\r\n </span>\r\n <i class=\"icon-close1\" (click)=\"onRemove(item)\"></i>\r\n </button>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }] });
|
|
2805
3128
|
}
|
|
2806
3129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FilterChipsComponent, decorators: [{
|
|
2807
3130
|
type: Component,
|
|
2808
|
-
args: [{ selector: "filter-chips", imports: [CommonModule, TooltipModule], providers: [DatePipe], template: "<div class=\"d-flex gap-2\">\r\n @for (item of filters; track $index) {\r\n <button\r\n class=\"prPill\"\r\n pInputText\r\n [pTooltip]=\"\r\n item.isTooltipForm\r\n ? tooltipFormContent\r\n : item.valueName!.length > 1\r\n ? tooltipContent\r\n : item.title ?? ''\r\n \"\r\n tooltipPosition=\"top\"\r\n >\r\n <ng-template #tooltipFormContent>\r\n <span>{{ item.text?.toString() }}</span\r\n ><br />\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of item.valueName\">{{ value }}</li>\r\n </ul>\r\n </ng-template>\r\n <ng-template #tooltipContent>\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of sortList(item.valueName)\">\r\n {{ value }}\r\n </li>\r\n </ul>\r\n </ng-template>\r\n <span\r\n *ngIf=\"isBooleanTrue(item.value)\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title && item.title.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"\r\n (!item.valueName || item.valueName.length === 0) &&\r\n item.value &&\r\n item.value.length > 0 &&\r\n !item.dateFormat\r\n \"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15\r\n }}{{ item.text && item.text.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.dateFormat\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ formatDateValue(item.value, item.dateFormat) }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName?.length === 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15 }}{{ item.text!.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title!.length > 15 ? \"...\" : \"\" }}</span\r\n >\r\n <span\r\n *ngIf=\"item.valueName!.length > 1 && !item.isTooltipForm\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n ({{ item.valueName?.length }})\r\n </span>\r\n <i class=\"icon-close1\" (click)=\"onRemove(item)\"></i>\r\n </button>\r\n }\r\n</div>\r\n" }]
|
|
3131
|
+
args: [{ selector: "filter-chips", imports: [CommonModule, TooltipModule], providers: [DatePipe], template: "<div class=\"d-flex gap-2 flex-wrap\">\r\n @for (item of filters; track $index) {\r\n <button\r\n class=\"prPill\"\r\n pInputText\r\n [pTooltip]=\"\r\n item.isTooltipForm\r\n ? tooltipFormContent\r\n : item.valueName!.length > 1\r\n ? tooltipContent\r\n : item.title ?? ''\r\n \"\r\n tooltipPosition=\"top\"\r\n >\r\n <ng-template #tooltipFormContent>\r\n <span>{{ item.text?.toString() }}</span\r\n ><br />\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of item.valueName\">{{ value }}</li>\r\n </ul>\r\n </ng-template>\r\n <ng-template #tooltipContent>\r\n <ul\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"tooltip-list list-unlisted text-start filterChipsList\"\r\n >\r\n <li *ngFor=\"let value of sortList(item.valueName)\">\r\n {{ value }}\r\n </li>\r\n </ul>\r\n </ng-template>\r\n <span\r\n *ngIf=\"isBooleanTrue(item.value)\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title && item.title.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"\r\n (!item.valueName || item.valueName.length === 0) &&\r\n item.value &&\r\n item.value.length > 0 &&\r\n !item.dateFormat\r\n \"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15\r\n }}{{ item.text && item.text.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.dateFormat\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ formatDateValue(item.value, item.dateFormat) }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName?.length === 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.text | slice : 0 : 15 }}{{ item.text!.length > 15 ? \"...\" : \"\" }}\r\n </span>\r\n <span\r\n *ngIf=\"item.valueName!.length > 1\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n {{ item.title | slice : 0 : 15\r\n }}{{ item.title!.length > 15 ? \"...\" : \"\" }}</span\r\n >\r\n <span\r\n *ngIf=\"item.valueName!.length > 1 && !item.isTooltipForm\"\r\n class=\"prPill__value\"\r\n (click)=\"onTapChip(item)\"\r\n >\r\n ({{ item.valueName?.length }})\r\n </span>\r\n <i class=\"icon-close1\" (click)=\"onRemove(item)\"></i>\r\n </button>\r\n }\r\n</div>\r\n" }]
|
|
2809
3132
|
}], propDecorators: { filters: [{
|
|
2810
3133
|
type: Input
|
|
2811
3134
|
}], remove: [{
|
|
@@ -4637,6 +4960,7 @@ class TableFetchComponent {
|
|
|
4637
4960
|
RowResumenGroups;
|
|
4638
4961
|
AdditionalTemplate;
|
|
4639
4962
|
AdditionalCentralTemplate;
|
|
4963
|
+
AdditionalExtendedTemplate;
|
|
4640
4964
|
EmitSortEvent = new EventEmitter();
|
|
4641
4965
|
ColumnList = [];
|
|
4642
4966
|
ColumnGroupList = [];
|
|
@@ -4747,7 +5071,7 @@ class TableFetchComponent {
|
|
|
4747
5071
|
this.ExecuteSearch({});
|
|
4748
5072
|
}
|
|
4749
5073
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4750
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableFetchComponent, isStandalone: true, selector: "intelica-table-fetch", inputs: { ComponentId: "ComponentId", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ClassName: "ClassName", DefaultSortField: "DefaultSortField", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", FilteredList: "FilteredList", TotalItems: "TotalItems", CurrentPage: "CurrentPage", SortOrder: "SortOrder", SortField: "SortField" }, outputs: { EmitQueryParametersChange: "EmitQueryParametersChange", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
5074
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TableFetchComponent, isStandalone: true, selector: "intelica-table-fetch", inputs: { ComponentId: "ComponentId", ShowRowPerPage: "ShowRowPerPage", ShowSearch: "ShowSearch", ListSearchOptions: "ListSearchOptions", ShowPagination: "ShowPagination", RowsPerPage: "RowsPerPage", ShowCheckbox: "ShowCheckbox", ShowIndex: "ShowIndex", ShowSearchTooltip: "ShowSearchTooltip", ClassName: "ClassName", DefaultSortField: "DefaultSortField", scrollHeight: "scrollHeight", scrollable: "scrollable", AllowedPageSizes: "AllowedPageSizes", tableStyle: "tableStyle", FilteredList: "FilteredList", TotalItems: "TotalItems", CurrentPage: "CurrentPage", SortOrder: "SortOrder", SortField: "SortField" }, outputs: { EmitQueryParametersChange: "EmitQueryParametersChange", EmitSortEvent: "EmitSortEvent" }, providers: [FormatCellPipe, DatePipe], queries: [{ propertyName: "AdditionalTemplate", first: true, predicate: ["additionalTemplate"], descendants: true }, { propertyName: "AdditionalCentralTemplate", first: true, predicate: ["additionalCentralTemplate"], descendants: true }, { propertyName: "AdditionalExtendedTemplate", first: true, predicate: ["additionalExtendedTemplate"], descendants: true }, { propertyName: "Columns", predicate: ColumnComponent }, { propertyName: "ColumnGroups", predicate: ColumnGroupComponent }, { propertyName: "RowResumenGroups", predicate: RowResumenComponent }], viewQueries: [{ propertyName: "PaginatorTable", first: true, predicate: ["paginatorTable"], descendants: true }, { propertyName: "SearchTable", first: true, predicate: ["searchTable"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "virtualRowHeight", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$1.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i2$1.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$1.TableCheckbox, selector: "p-tableCheckbox", inputs: ["disabled", "value", "index", "inputId", "name", "required", "ariaLabel"] }, { kind: "component", type: i2$1.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: TermPipe, name: "term" }, { kind: "ngmodule", type: CheckboxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SearchComponent, selector: "intelica-search", inputs: ["ComponentId", "ShowTooltip", "SearchFieldOptions", "SearchOnKeyup", "SimpleSearchInput", "Placeholder"], outputs: ["OnSearch"] }, { kind: "component", type: PaginatorComponent, selector: "intelica-paginator", inputs: ["TotalItems", "CurrentPage", "ItemsPerPage"], outputs: ["PageChange"] }, { kind: "pipe", type: FormatCellPipe, name: "formatCell" }] });
|
|
4751
5075
|
}
|
|
4752
5076
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TableFetchComponent, decorators: [{
|
|
4753
5077
|
type: Component,
|
|
@@ -4763,7 +5087,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
4763
5087
|
SearchComponent,
|
|
4764
5088
|
PaginatorComponent,
|
|
4765
5089
|
FormatCellPipe,
|
|
4766
|
-
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
5090
|
+
], providers: [FormatCellPipe, DatePipe], template: "<div class=\"prTable\">\r\n <div class=\"prTableTools\">\r\n <div class=\"prTableTools__new prTableTools__new--left\">\r\n @if (AdditionalTemplate) {\r\n <ng-container *ngTemplateOutlet=\"AdditionalTemplate\"></ng-container>\r\n }\r\n </div>\r\n\r\n @if (ShowSearch) {\r\n <intelica-search\r\n #searchTable\r\n [ComponentId]=\"ComponentId + 'Search'\"\r\n (OnSearch)=\"ExecuteSearch($event)\"\r\n [SearchFieldOptions]=\"ListSearchOptionsSimple\"\r\n [SearchOnKeyup]=\"false\"\r\n [SimpleSearchInput]=\"false\"\r\n [ShowTooltip]=\"ShowSearchTooltip\"\r\n ></intelica-search>\r\n } @if (AdditionalCentralTemplate) {\r\n <div class=\"prTableTools__new prTableTools__new--right\">\r\n <ng-container\r\n *ngTemplateOutlet=\"AdditionalCentralTemplate\"\r\n ></ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (AdditionalExtendedTemplate) {\r\n <div class=\"prTableTools justify-content-start\">\r\n <ng-container *ngTemplateOutlet=\"AdditionalExtendedTemplate\"></ng-container>\r\n </div>\r\n\r\n }\r\n <!-- Tabla que muestra FilteredList -->\r\n <p-table\r\n class=\"prTableBasic\"\r\n [ngClass]=\"ClassName\"\r\n [value]=\"FilteredList\"\r\n responsiveLayout=\"scroll\"\r\n [sortField]=\"DefaultSortField\"\r\n [sortOrder]=\"SortOrder\"\r\n [scrollable]=\"scrollable\"\r\n [scrollHeight]=\"scrollable ? scrollHeight : 'auto'\"\r\n [tableStyle]=\"tableStyle\"\r\n >\r\n <!-- Cabecera con columnas agrupadas -->\r\n <ng-template pTemplate=\"header\">\r\n @for (level of Levels; track $index) {\r\n <tr>\r\n @for (col of ColumnGroupList; track $index) { @if (col.level === level)\r\n {\r\n <th\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span pTooltip=\"{{ col.header }}\">{{ col.header }}</span>\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && level === 0 && ColumnGroupList.length != 0) {\r\n <th\r\n class=\"text-center\"\r\n style=\"width: 4%\"\r\n [attr.rowspan]=\"MaxLevel === 1 ? 2 : MaxLevel\"\r\n >\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @for (col of ColumnList; track $index) { @if (col.showHeader) {\r\n <th\r\n [class]=\"col.className\"\r\n [pSortableColumn]=\"\r\n !col.isChecboxColumn && col.sortable ? col.field : ''\r\n \"\r\n [style.width]=\"col.width\"\r\n [style.min-width]=\"col.minWidth\"\r\n (click)=\"!col.isChecboxColumn && col.sortable && OnSort(col.field)\"\r\n >\r\n <div>\r\n <span\r\n pTooltip=\"{{ col.headerTooltip }}\"\r\n tooltipPosition=\"{{ col.headerTooltipPosition }}\"\r\n >\r\n {{ col.header }}\r\n </span>\r\n @if (!col.showIndex) {\r\n <p-sortIcon *ngIf=\"col.sortable\" [field]=\"col.field\"></p-sortIcon>\r\n }\r\n </div>\r\n </th>\r\n } } @if (ShowCheckbox && ColumnGroupList.length == 0) {\r\n <th class=\"text-center\" style=\"width: 4%\">\r\n <p-tableHeaderCheckbox class=\"prCheckbox\" />\r\n </th>\r\n }\r\n </tr>\r\n\r\n @if (FilteredList.length > 0 && RowResumenList.length > 0) {\r\n <tr class=\"fixedRow\">\r\n @for (col of RowResumenList; track $index) {\r\n <td\r\n [ngClass]=\"col.className\"\r\n [attr.colspan]=\"col.colspan\"\r\n [attr.rowspan]=\"col.rowspan\"\r\n >\r\n @if (col.templateRef) {\r\n <span>\r\n <ng-container *ngTemplateOutlet=\"col.templateRef\"></ng-container>\r\n </span>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Cuerpo de la tabla -->\r\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\">\r\n <tr>\r\n @for (col of ColumnList; track $index) {\r\n <td [ngClass]=\"col.className\">\r\n @if (col.showIndex) {\r\n {{ rowIndex + 1 + (CurrentPage - 1) * RowsPerPage }}\r\n } @else { @if (col.templateRef) {\r\n <ng-container\r\n *ngTemplateOutlet=\"col.templateRef; context: { $implicit: rowData }\"\r\n ></ng-container>\r\n } @else {\r\n <span\r\n class=\"text-breakWord\"\r\n pTooltip=\"{{ col.tooltip }}\"\r\n tooltipPosition=\"{{ col.tooltipPosition }}\"\r\n >\r\n {{ rowData[col.field] | formatCell : col.formatType }}\r\n </span>\r\n } }\r\n </td>\r\n } @if (ShowCheckbox) {\r\n <td class=\"text-center\">\r\n <p-tableCheckbox [value]=\"rowData\" class=\"prCheckbox\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Mensaje cuando no hay datos -->\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"ColumnList.length + (ShowCheckbox ? 1 : 0)\"\r\n class=\"text-center\"\r\n >\r\n {{ \"Nodata\" | term : GlobalTermService.languageCode }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- Paginaci\u00F3n y control de elementos por p\u00E1gina -->\r\n <div class=\"prTableToolsBottom\">\r\n @if(ShowRowPerPage){\r\n <div class=\"prTableToolsBottom__itemPerPage\">\r\n {{ \"ItemPerPage\" | term : GlobalTermService.languageCode }}\r\n <p-select\r\n [options]=\"AllowedPageSizes\"\r\n [ngModel]=\"RowsPerPage\"\r\n appendTo=\"body\"\r\n (onChange)=\"OnRowsPerPageChange($event.value)\"\r\n />\r\n <label for=\"pageSize\" class=\"control-label\">\r\n {{ 1 + RowsPerPage * (CurrentPage - 1) }} -\r\n {{\r\n CurrentPage * RowsPerPage >= TotalRecords\r\n ? TotalRecords\r\n : CurrentPage * RowsPerPage\r\n }}\r\n {{ \"Of\" | term : GlobalTermService.languageCode }} {{ TotalRecords }}\r\n {{ \"Items\" | term : GlobalTermService.languageCode }}\r\n </label>\r\n </div>\r\n } @if (ShowPagination) {\r\n <intelica-paginator\r\n #paginatorTable\r\n [TotalItems]=\"TotalRecords\"\r\n [CurrentPage]=\"CurrentPage\"\r\n [ItemsPerPage]=\"RowsPerPage\"\r\n (PageChange)=\"OnPageChange($event)\"\r\n ></intelica-paginator>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
4767
5091
|
}], propDecorators: { ComponentId: [{
|
|
4768
5092
|
type: Input
|
|
4769
5093
|
}], ShowRowPerPage: [{
|
|
@@ -4821,6 +5145,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
4821
5145
|
}], AdditionalCentralTemplate: [{
|
|
4822
5146
|
type: ContentChild,
|
|
4823
5147
|
args: ["additionalCentralTemplate"]
|
|
5148
|
+
}], AdditionalExtendedTemplate: [{
|
|
5149
|
+
type: ContentChild,
|
|
5150
|
+
args: ["additionalExtendedTemplate"]
|
|
4824
5151
|
}], EmitSortEvent: [{
|
|
4825
5152
|
type: Output
|
|
4826
5153
|
}], CurrentPage: [{
|