@esfaenza/es-table 11.2.122 → 11.2.123
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/bundles/esfaenza-es-table.umd.js +471 -263
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.d.ts +8 -4
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/esfaenza-es-table.js +9 -5
- package/esm2015/lib/components/es-table/es_table.component.js +145 -79
- package/esm2015/lib/components/es-td/es_td.component.js +10 -52
- package/esm2015/lib/components/es-th/es_th.component.js +2 -2
- package/esm2015/lib/components/pipes/est-renderer.pipe.js +36 -0
- package/esm2015/lib/components/pipes/est-routerlink.pipe.js +37 -0
- package/esm2015/lib/components/pipes/est_editor.pipe.js +36 -0
- package/esm2015/lib/core/CopyPasteDetector.js +4 -2
- package/esm2015/lib/core/Logger.js +23 -0
- package/esm2015/lib/core/handlers/ColumnMetadataHandler.js +14 -12
- package/esm2015/lib/core/handlers/DynamicModeHandler.js +59 -37
- package/esm2015/lib/core/handlers/SelectionHandler.js +46 -50
- package/esm2015/lib/core/handlers/UtilitiesHandler.js +2 -5
- package/esm2015/lib/directives/es_th.directive.js +9 -2
- package/esm2015/lib/domain/externals/EsTableColumnsDefinition.js +4 -3
- package/esm2015/lib/domain/externals/ItemPropEditableReference.js +1 -1
- package/esm2015/lib/domain/internals/EsTableColumn.js +2 -2
- package/esm2015/lib/domain/internals/PagerInfos.js +15 -0
- package/esm2015/lib/domain/internals/ThGroup.js +2 -0
- package/esm2015/lib/es-table.module.js +42 -19
- package/fesm2015/esfaenza-es-table.js +451 -251
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +55 -60
- package/lib/components/es-td/es_td.component.d.ts +6 -34
- package/lib/components/pipes/est-renderer.pipe.d.ts +12 -0
- package/lib/components/pipes/est-routerlink.pipe.d.ts +17 -0
- package/lib/components/pipes/est_editor.pipe.d.ts +12 -0
- package/lib/core/Logger.d.ts +7 -0
- package/lib/core/handlers/DynamicModeHandler.d.ts +11 -23
- package/lib/core/handlers/SelectionHandler.d.ts +16 -3
- package/lib/core/handlers/UtilitiesHandler.d.ts +4 -1
- package/lib/directives/es_th.directive.d.ts +25 -0
- package/lib/domain/externals/EsTableColumnsDefinition.d.ts +3 -9
- package/lib/domain/externals/ItemPropEditableReference.d.ts +4 -0
- package/lib/domain/internals/EsTableColumn.d.ts +3 -1
- package/lib/domain/internals/PagerInfos.d.ts +13 -0
- package/lib/domain/internals/ThGroup.d.ts +10 -0
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ import { MatSelectModule } from '@angular/material/select';
|
|
|
12
12
|
import { MatInputModule } from '@angular/material/input';
|
|
13
13
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
14
14
|
import { FormsAndValidationsModule } from '@esfaenza/forms-and-validations';
|
|
15
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
16
15
|
import { ModalModule } from 'ngx-bootstrap/modal';
|
|
17
16
|
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
18
17
|
import { ContextMenuModule } from '@esfaenza/ngx-contextmenu';
|
|
@@ -195,6 +194,21 @@ class AppSearch {
|
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
|
|
197
|
+
/** Classe che rappresenta le informazioni di paginazione della tabella attuale */
|
|
198
|
+
class PagerInfos {
|
|
199
|
+
constructor() {
|
|
200
|
+
this.PagerCount = null;
|
|
201
|
+
this.ShowCount = true;
|
|
202
|
+
this.ShowPaging = true;
|
|
203
|
+
this.ShowButtons = true;
|
|
204
|
+
this.ShowPagingOptions = true;
|
|
205
|
+
this.UsesView = true;
|
|
206
|
+
this.View = null;
|
|
207
|
+
this.Ready = false;
|
|
208
|
+
this.Searches = 'items';
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
198
212
|
/** Identifica una selezione applicabile agli oggetti presentati in una tabella */
|
|
199
213
|
class ItemsSelection {
|
|
200
214
|
/**
|
|
@@ -340,6 +354,8 @@ class EsThDirective {
|
|
|
340
354
|
this.thType = null;
|
|
341
355
|
/** Sorgente dei valori disponibili per questa cella se il **Type** è di tipo 'enum' */
|
|
342
356
|
this.thSource = null;
|
|
357
|
+
/** Opzioni da applicare all'editor di questa colonna */
|
|
358
|
+
this.thEditorOptions = {};
|
|
343
359
|
}
|
|
344
360
|
}
|
|
345
361
|
EsThDirective.decorators = [
|
|
@@ -373,7 +389,12 @@ EsThDirective.propDecorators = {
|
|
|
373
389
|
thStaticContent: [{ type: Input }],
|
|
374
390
|
thBackgroundColor: [{ type: Input }],
|
|
375
391
|
thAlignment: [{ type: Input }],
|
|
376
|
-
thFormat: [{ type: Input }]
|
|
392
|
+
thFormat: [{ type: Input }],
|
|
393
|
+
thEditorName: [{ type: Input }],
|
|
394
|
+
thEditorOptions: [{ type: Input }],
|
|
395
|
+
thRendererName: [{ type: Input }],
|
|
396
|
+
thRoutePath: [{ type: Input }],
|
|
397
|
+
thRouteParameterProperties: [{ type: Input }]
|
|
377
398
|
};
|
|
378
399
|
|
|
379
400
|
/** Direttiva che rappresenta il template dell'editor di una cella all'interno della tabella */
|
|
@@ -600,7 +621,7 @@ class EsTableColumn {
|
|
|
600
621
|
* @param {boolean} pinned Indica se è una colonna pinnata
|
|
601
622
|
* @param {number} pinnedWidth Indica la dimensione da assegnare a questa colonna quando è pinnata
|
|
602
623
|
* @param {TemplateRef<any>} template Indica il template da usare per mostrare il testo dell'Header
|
|
603
|
-
* @param {{ tmpl: TemplateRef<any>, content: string }[]} parentTemplates Indica la lista di template padri collegata a questo header, rappresentati come Template o come stringa qualora fosse generato automaticamente (caso **Multi**)
|
|
624
|
+
* @param {{ id: string, tmpl: TemplateRef<any>, content: string }[]} parentTemplates Indica la lista di template padri collegata a questo header, rappresentati come Template o come stringa qualora fosse generato automaticamente (caso **Multi**)
|
|
604
625
|
* @param {boolean} multi Indica che la colonna deriva da una direttiva **Multi**
|
|
605
626
|
* @param {string} multiContent Indica il contenuto della direttiva **Multi** per questa colonna
|
|
606
627
|
*/
|
|
@@ -1073,7 +1094,7 @@ class ColumnMetadataHandler {
|
|
|
1073
1094
|
return;
|
|
1074
1095
|
/****** STEP 1: Creo l'output dei raggruppamenti per header in modo da non dovermi preoccupare di celle non inizializzate ******/
|
|
1075
1096
|
let expandedGroups = [];
|
|
1076
|
-
let visibleUnpinnedLeafs = infos.leafs.filter((t) => t.thVisible && !t.thPinned);
|
|
1097
|
+
let visibleUnpinnedLeafs = infos.leafs.filter((t) => t.thVisible && t.thIf && !t.thPinned);
|
|
1077
1098
|
for (let l = 0; l < infos.groupingLevel; l++) {
|
|
1078
1099
|
expandedGroups.push([]);
|
|
1079
1100
|
for (let i = 0; i < visibleUnpinnedLeafs.length; i++)
|
|
@@ -1083,7 +1104,7 @@ class ColumnMetadataHandler {
|
|
|
1083
1104
|
let orderedLeafs = [];
|
|
1084
1105
|
for (let i = 0; i < this.est.OrderDirectives.length; i++) {
|
|
1085
1106
|
let leaf = infos.thsCache[this.est.OrderDirectives[i]];
|
|
1086
|
-
if (leaf.thVisible && !leaf.thPinned)
|
|
1107
|
+
if (leaf.thVisible && leaf.thIf && !leaf.thPinned)
|
|
1087
1108
|
orderedLeafs.push(leaf);
|
|
1088
1109
|
}
|
|
1089
1110
|
/****** STEP 3: Creo l'array group con tutti i riferimenti del caso ******/
|
|
@@ -1107,7 +1128,7 @@ class ColumnMetadataHandler {
|
|
|
1107
1128
|
}
|
|
1108
1129
|
}
|
|
1109
1130
|
}
|
|
1110
|
-
/****** STEP 4: Compatto nell'elemento finale su cui bindarmi ******/
|
|
1131
|
+
/****** STEP 4: Compatto nell'elemento finale su cui bindarmi. L'ID assegnato è SOLO per ottimizzare gli ngFor ******/
|
|
1111
1132
|
currentParent = "";
|
|
1112
1133
|
let currentSpan = 0;
|
|
1113
1134
|
let finalHeaders = [];
|
|
@@ -1115,25 +1136,25 @@ class ColumnMetadataHandler {
|
|
|
1115
1136
|
let levelArray = [];
|
|
1116
1137
|
finalHeaders.push(levelArray);
|
|
1117
1138
|
if (this.est.Selection || this.est.HasPinnedColumns)
|
|
1118
|
-
levelArray.push({ Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
|
|
1139
|
+
levelArray.push({ ID: "_base_sel_pinned", Span: 1, Template: null, Pinned: this.est.HasPinnedColumns });
|
|
1119
1140
|
for (let h = 0; h < expandedGroups[l].length; h++) {
|
|
1120
1141
|
let item = expandedGroups[l][h];
|
|
1121
1142
|
if (item == currentParent)
|
|
1122
1143
|
currentSpan++;
|
|
1123
1144
|
else {
|
|
1124
1145
|
if (currentSpan > 0)
|
|
1125
|
-
levelArray.push({ Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
|
|
1146
|
+
levelArray.push({ ID: `${currentParent ? infos.thsCache[currentParent].th : 'noth'}_${currentSpan}`, Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
|
|
1126
1147
|
currentSpan = 1;
|
|
1127
1148
|
currentParent = item;
|
|
1128
1149
|
}
|
|
1129
1150
|
}
|
|
1130
1151
|
// Ultima aggiunta che altrimenti mi rimarrebbe in cache
|
|
1131
|
-
levelArray.push({ Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
|
|
1152
|
+
levelArray.push({ ID: `${currentParent ? infos.thsCache[currentParent].th : 'noth'}_${currentSpan}`, Span: currentSpan, Template: currentParent ? infos.thsCache[currentParent].Template : null, Content: currentParent ? infos.thsCache[currentParent]._multi_content : null, Borders: !!currentParent });
|
|
1132
1153
|
// Aggiungo i pezzettini per la rimozione e gli export, se presenti
|
|
1133
1154
|
if (this.est.Removal)
|
|
1134
|
-
levelArray.push({ Span: 1, Template: null });
|
|
1155
|
+
levelArray.push({ ID: "_base_removal", Span: 1, Template: null });
|
|
1135
1156
|
if (this.est.Export || this.est.HiddenColumns || this.est.ColumnsOrdering || this.est.CornerMenuOptions)
|
|
1136
|
-
levelArray.push({ Span: 1, Template: null });
|
|
1157
|
+
levelArray.push({ ID: "_base_extra_opts", Span: 1, Template: null });
|
|
1137
1158
|
currentSpan = 0;
|
|
1138
1159
|
currentParent = "";
|
|
1139
1160
|
}
|
|
@@ -1169,9 +1190,9 @@ class ColumnMetadataHandler {
|
|
|
1169
1190
|
if (parent) {
|
|
1170
1191
|
th = thsCache[parent];
|
|
1171
1192
|
if (!th.thEmpty && !th._multi_content)
|
|
1172
|
-
parentsPrepend.unshift({ tmpl: th.Template });
|
|
1193
|
+
parentsPrepend.unshift({ id: th.th, tmpl: th.Template });
|
|
1173
1194
|
else if (!th.thEmpty && th._multi_content)
|
|
1174
|
-
parentsPrepend.unshift({ content: th._multi_content });
|
|
1195
|
+
parentsPrepend.unshift({ id: th.th, content: th._multi_content });
|
|
1175
1196
|
jumps++;
|
|
1176
1197
|
}
|
|
1177
1198
|
} while (parent);
|
|
@@ -1232,7 +1253,9 @@ class ColumnMetadataHandler {
|
|
|
1232
1253
|
let newContext = [];
|
|
1233
1254
|
this.est.OrderDirectives.forEach(o => {
|
|
1234
1255
|
let contextItem = context.filter(t => t.ID == o)[0];
|
|
1235
|
-
|
|
1256
|
+
// potrebbe esser undefined nel caso ci fossero colonne sotto thIf
|
|
1257
|
+
if (contextItem)
|
|
1258
|
+
newContext.push(contextItem);
|
|
1236
1259
|
});
|
|
1237
1260
|
this.est.TMPRowTDs[this.est.RowContexts[i]] = newContext;
|
|
1238
1261
|
}
|
|
@@ -1448,7 +1471,7 @@ class EsTableColumnsDefinition {
|
|
|
1448
1471
|
* @param {string} EditorName Nome dell'editor da utilizzare per la modifica di questo campo
|
|
1449
1472
|
* @param {string} RendererName Nome del renderer da utilizzare per visualizzare questo campo
|
|
1450
1473
|
*/
|
|
1451
|
-
constructor(Description, PropertyName, RoutePath = null, RouteParameterProperties = null, DataOrder = null, ColumnOrder = null, Visible = true, Clss = null, Orderable = true, HeaderWraps = false, PropertyType = null, PropertySource = [], EditorName = "", RendererName = "", EditorOptions = {}, Pinned = false, Grouping = "") {
|
|
1474
|
+
constructor(Description, PropertyName, RoutePath = null, RouteParameterProperties = null, DataOrder = null, ColumnOrder = null, Visible = true, Clss = null, Orderable = true, HeaderWraps = false, PropertyType = null, PropertySource = [], EditorName = "", RendererName = "", EditorOptions = {}, Pinned = false, PinnedWidth = 150, Pinnable = true, Grouping = "") {
|
|
1452
1475
|
this.Description = Description;
|
|
1453
1476
|
this.PropertyName = PropertyName;
|
|
1454
1477
|
this.RoutePath = RoutePath;
|
|
@@ -1465,8 +1488,9 @@ class EsTableColumnsDefinition {
|
|
|
1465
1488
|
this.RendererName = RendererName;
|
|
1466
1489
|
this.EditorOptions = EditorOptions;
|
|
1467
1490
|
this.Pinned = Pinned;
|
|
1491
|
+
this.PinnedWidth = PinnedWidth;
|
|
1492
|
+
this.Pinnable = Pinnable;
|
|
1468
1493
|
this.Grouping = Grouping;
|
|
1469
|
-
this.edits = {};
|
|
1470
1494
|
}
|
|
1471
1495
|
static build(parsObj) {
|
|
1472
1496
|
return new EsTableColumnsDefinition(parsObj.Description, parsObj.PropertyName, parsObj.RoutePath, parsObj.RouteParameterProperties, parsObj.DataOrder, parsObj.ColumnOrder, parsObj.Visible || true, parsObj.Clss, parsObj.Orderable || true, parsObj.HeaderWraps, parsObj.PropertyType, parsObj.PropertySource, parsObj.EditorName, parsObj.RendererName, parsObj.Pinned, parsObj.Grouping);
|
|
@@ -1479,42 +1503,6 @@ class DynamicModeHandler {
|
|
|
1479
1503
|
constructor(est) {
|
|
1480
1504
|
this.est = est;
|
|
1481
1505
|
}
|
|
1482
|
-
/**
|
|
1483
|
-
* Metodo di supporto alla creazione di un router link parametrizzato all'oggetto corrente utilizzato nella modalità dinamica
|
|
1484
|
-
*
|
|
1485
|
-
* @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
|
|
1486
|
-
* @param {string[]} parameterProps Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
|
|
1487
|
-
* Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
|
|
1488
|
-
* @param {GenericItem} item Oggetto generico collegato a questo contesto
|
|
1489
|
-
*
|
|
1490
|
-
* @returns {any} Router link generato in base al parametri
|
|
1491
|
-
*/
|
|
1492
|
-
generateRouterLink(path, parameterProps, item) {
|
|
1493
|
-
if (this.est.DynamicTableRouterLinkCache[item._hash + path]) {
|
|
1494
|
-
return this.est.DynamicTableRouterLinkCache[item._hash + path];
|
|
1495
|
-
}
|
|
1496
|
-
else {
|
|
1497
|
-
let link = this.getRouterLink(path, parameterProps, item);
|
|
1498
|
-
this.est.DynamicTableRouterLinkCache[item._hash + path] = link;
|
|
1499
|
-
return link;
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
/**
|
|
1503
|
-
* Crea un router link
|
|
1504
|
-
*
|
|
1505
|
-
* @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
|
|
1506
|
-
* @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
|
|
1507
|
-
* Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
|
|
1508
|
-
* @param {GenericItem} item Oggetto generico collegato a questo contesto
|
|
1509
|
-
*
|
|
1510
|
-
* @returns {any} Router link generato in base al parametri
|
|
1511
|
-
*/
|
|
1512
|
-
getRouterLink(path, pars, item) {
|
|
1513
|
-
for (let i = 0; i < pars.length; i++)
|
|
1514
|
-
path = path.replace('{' + i + '}', item.properties[pars[i]]);
|
|
1515
|
-
path = path.replace(/'/g, '"').replace(/ /g, '');
|
|
1516
|
-
return JSON.parse(path);
|
|
1517
|
-
}
|
|
1518
1506
|
/** Se non ho l'Input **DynamicRowColumnsDefinition** in modalità dinamica lo riempio con il default nome della colonna = testo della colonna */
|
|
1519
1507
|
eventuallyReviewDynamicColumns() {
|
|
1520
1508
|
// Senza oggetti esco
|
|
@@ -1533,6 +1521,61 @@ class DynamicModeHandler {
|
|
|
1533
1521
|
else
|
|
1534
1522
|
this.est.UserDefinedDynamicCols = true;
|
|
1535
1523
|
}
|
|
1524
|
+
/** Genera partendo dalle **DynamicRowColumnsDefinition** la lista di **EsThDirective** e **EsTdDirective** che servono per la tabella */
|
|
1525
|
+
emitThsAndTdsBasedOnDynamicDefinition() {
|
|
1526
|
+
// Senza dynamic columns esco
|
|
1527
|
+
if (!this.est.DynamicRowColumnsDefinition || this.est.DynamicRowColumnsDefinition.length == 0)
|
|
1528
|
+
return null;
|
|
1529
|
+
let ths = [];
|
|
1530
|
+
let tds = [];
|
|
1531
|
+
for (let i = 0; i < this.est.DynamicRowColumnsDefinition.length; i++) {
|
|
1532
|
+
let col = this.est.DynamicRowColumnsDefinition[i];
|
|
1533
|
+
ths.push(this.getTh(col));
|
|
1534
|
+
tds.push(this.getTd(col));
|
|
1535
|
+
}
|
|
1536
|
+
return { ths, tds };
|
|
1537
|
+
}
|
|
1538
|
+
/** @ignore Helper */
|
|
1539
|
+
getTh(col) {
|
|
1540
|
+
var ret = new EsThDirective(null);
|
|
1541
|
+
ret.th = col.PropertyName;
|
|
1542
|
+
ret.thPinned = col.Pinned;
|
|
1543
|
+
ret.thPinnable = col.Pinnable;
|
|
1544
|
+
ret.thPinnedWidth = col.PinnedWidth;
|
|
1545
|
+
ret.thVisible = col.Visible;
|
|
1546
|
+
ret.thOrder = col.DataOrder;
|
|
1547
|
+
ret.thOrderable = col.Orderable;
|
|
1548
|
+
ret.thWrap = col.HeaderWraps;
|
|
1549
|
+
ret.thClass = col.Clss;
|
|
1550
|
+
ret.thProperty = col.PropertyName;
|
|
1551
|
+
ret.thType = col.PropertyType;
|
|
1552
|
+
ret.thSource = col.PropertySource;
|
|
1553
|
+
ret.thEditorName = col.EditorName;
|
|
1554
|
+
ret.thEditorOptions = col.EditorOptions;
|
|
1555
|
+
ret.thRendererName = col.RendererName;
|
|
1556
|
+
ret.thRoutePath = col.RoutePath;
|
|
1557
|
+
ret.thRouteParameterProperties = col.RouteParameterProperties;
|
|
1558
|
+
//ret.thFixed = col.Fixed;
|
|
1559
|
+
//ret.thResizable = col.Resizable;
|
|
1560
|
+
//ret.thGroupClass = col.GroupClass;
|
|
1561
|
+
//ret.thGroup = col.Group;
|
|
1562
|
+
//ret.thAggregation = col.Aggregation;
|
|
1563
|
+
//ret.thMulti = col.Multi;
|
|
1564
|
+
//ret.thStaticContent = col.StaticContent;
|
|
1565
|
+
//ret.thBackgroundColor = col.BackgroundColor;
|
|
1566
|
+
//ret.thAlignment = col.Alignment;
|
|
1567
|
+
//ret.thFormat = col.Format;
|
|
1568
|
+
return ret;
|
|
1569
|
+
}
|
|
1570
|
+
/** @ignore Helper */
|
|
1571
|
+
getTd(col) {
|
|
1572
|
+
var ret = new EsTdDirective(null);
|
|
1573
|
+
ret.td = col.PropertyName;
|
|
1574
|
+
ret.tdClass = col.Clss;
|
|
1575
|
+
//ret.tdAlignment = col.Alignment;
|
|
1576
|
+
//ret.tdFormat = col.Format;
|
|
1577
|
+
return ret;
|
|
1578
|
+
}
|
|
1536
1579
|
}
|
|
1537
1580
|
|
|
1538
1581
|
/** Classe contenente la gestione della modalità gerarchica */
|
|
@@ -3079,65 +3122,61 @@ class SelectionHandler {
|
|
|
3079
3122
|
* @param {{ row: number, column: number }} firstSelectionOverride Permette di overridare il primo elemento selezionato
|
|
3080
3123
|
*/
|
|
3081
3124
|
singleCellSelection(event, row, column, firstSelectionOverride) {
|
|
3125
|
+
// Recupero la selezione precedente se presente come punto di partenza
|
|
3082
3126
|
var first = firstSelectionOverride || this.lastSingleSelection;
|
|
3127
|
+
//Il punto di arrivo, che diventerà il prossimo punto di partenza, è la selezione corrente
|
|
3128
|
+
this.lastSingleSelection = { row, column };
|
|
3083
3129
|
this.clearTextSelection(event);
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
this.clearSelectionStatus({ row, column });
|
|
3087
|
-
let rowAddition = row < first.row ? -1 : +1;
|
|
3088
|
-
let columnAddition = column < first.column ? -1 : +1;
|
|
3089
|
-
for (let ir = first.row; ir != row + rowAddition; ir += rowAddition) {
|
|
3090
|
-
let firstRow = ir == first.row;
|
|
3091
|
-
let lastRow = ir == row;
|
|
3092
|
-
for (let ic = first.column; ic != column + columnAddition; ic += columnAddition) {
|
|
3093
|
-
let firstCol = ic == first.column;
|
|
3094
|
-
let lastCol = ic == column;
|
|
3095
|
-
this.est.selectionStatus[ir][ic].selected = true;
|
|
3096
|
-
this.est.selectionStatus[ir][ic].lborder = columnAddition > 0 ? firstCol : lastCol;
|
|
3097
|
-
if (ic > 0)
|
|
3098
|
-
this.est.selectionStatus[ir][ic - 1].roverlaps = this.est.selectionStatus[ir][ic].lborder;
|
|
3099
|
-
this.est.selectionStatus[ir][ic].tborder = rowAddition > 0 ? firstRow : lastRow;
|
|
3100
|
-
this.est.selectionStatus[ir][ic].rborder = columnAddition > 0 ? lastCol : firstCol;
|
|
3101
|
-
if (this.est.selectionStatus[ir][ic + 1])
|
|
3102
|
-
this.est.selectionStatus[ir][ic + 1].loverlaps = this.est.selectionStatus[ir][ic].rborder;
|
|
3103
|
-
this.est.selectionStatus[ir][ic].bborder = rowAddition > 0 ? lastRow : firstRow;
|
|
3104
|
-
}
|
|
3105
|
-
}
|
|
3106
|
-
this.lastSingleSelection = { row, column };
|
|
3107
|
-
}
|
|
3108
|
-
else {
|
|
3109
|
-
// Ripulisco escludendo l'oggetto attuale che eventualmente ci penso io a deseezionare
|
|
3110
|
-
this.clearSelectionStatus({ row, column });
|
|
3111
|
-
let item = this.est.selectionStatus[row][column];
|
|
3112
|
-
item.selected = !item.selected;
|
|
3113
|
-
item.lborder = item.selected;
|
|
3114
|
-
if (column > 0)
|
|
3115
|
-
this.est.selectionStatus[row][column - 1].roverlaps = item.lborder;
|
|
3116
|
-
item.tborder = item.selected;
|
|
3117
|
-
item.rborder = item.selected;
|
|
3118
|
-
if (this.est.selectionStatus[row][column + 1])
|
|
3119
|
-
this.est.selectionStatus[row][column + 1].loverlaps = item.rborder;
|
|
3120
|
-
item.bborder = item.selected;
|
|
3121
|
-
this.lastSingleSelection = { row, column };
|
|
3122
|
-
}
|
|
3130
|
+
this.clearSelectionStatusExcluding(this.lastSingleSelection);
|
|
3131
|
+
this.setSelectionStatusBorders(event.range && first ? first : this.lastSingleSelection, this.lastSingleSelection);
|
|
3123
3132
|
// Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
|
|
3124
3133
|
this.est.cdr.markForCheck();
|
|
3125
3134
|
}
|
|
3135
|
+
setSelectionStatusBorders(from, to) {
|
|
3136
|
+
let rowAddition = to.row < from.row ? -1 : +1;
|
|
3137
|
+
let columnAddition = to.column < from.column ? -1 : +1;
|
|
3138
|
+
let singleItem = from == to;
|
|
3139
|
+
for (let ir = from.row; ir != to.row + rowAddition; ir += rowAddition) {
|
|
3140
|
+
let firstRow = ir == from.row;
|
|
3141
|
+
let lastRow = ir == to.row;
|
|
3142
|
+
for (let ic = from.column; ic != to.column + columnAddition; ic += columnAddition) {
|
|
3143
|
+
let firstCol = ic == from.column;
|
|
3144
|
+
let lastCol = ic == to.column;
|
|
3145
|
+
let current = this.est.selectionStatus[ir][ic];
|
|
3146
|
+
let prevColumn = ic > 0 ? this.est.selectionStatus[ir][ic - 1] : null;
|
|
3147
|
+
let nextcolumn = this.est.selectionStatus[ir][ic + 1];
|
|
3148
|
+
let prevRow = ir > 0 ? this.est.selectionStatus[ir - 1][ic] : null;
|
|
3149
|
+
let nextRow = this.est.selectionStatus[ir + 1] ? this.est.selectionStatus[ir + 1][ic] : null;
|
|
3150
|
+
current.selected = singleItem ? !current.selected : true;
|
|
3151
|
+
current.lborder = !current.selected ? false : columnAddition > 0 ? firstCol : lastCol;
|
|
3152
|
+
current.tborder = !current.selected ? false : rowAddition > 0 ? firstRow : lastRow;
|
|
3153
|
+
current.rborder = !current.selected ? false : columnAddition > 0 ? lastCol : firstCol;
|
|
3154
|
+
current.bborder = !current.selected ? false : rowAddition > 0 ? lastRow : firstRow;
|
|
3155
|
+
if (prevRow)
|
|
3156
|
+
prevRow.boverlaps = current.tborder;
|
|
3157
|
+
if (nextRow)
|
|
3158
|
+
nextRow.toverlaps = current.bborder;
|
|
3159
|
+
if (prevColumn)
|
|
3160
|
+
prevColumn.roverlaps = current.lborder;
|
|
3161
|
+
if (nextcolumn)
|
|
3162
|
+
nextcolumn.loverlaps = current.rborder;
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3126
3166
|
/**
|
|
3127
3167
|
* Helper per ripulire lo stato di selezione delle singole celle della tabella, ad esclusione di una singola coordinata
|
|
3128
3168
|
*
|
|
3129
3169
|
* @param {{row: number, column: number}} exclusion Coordinata da escludere nella pulizia
|
|
3130
3170
|
*/
|
|
3131
|
-
|
|
3171
|
+
clearSelectionStatusExcluding(exclusion) {
|
|
3132
3172
|
for (let row in this.est.selectionStatus) {
|
|
3133
3173
|
for (let column in this.est.selectionStatus[row]) {
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
}
|
|
3174
|
+
// Se è l'elemento che ho escluso dal cleanup, skippo
|
|
3175
|
+
if (exclusion && row == exclusion.row.toString() && column == exclusion.column.toString())
|
|
3176
|
+
continue;
|
|
3177
|
+
// Altrimenti pulisco
|
|
3178
|
+
let curr = this.est.selectionStatus[row][column];
|
|
3179
|
+
curr.selected = curr.lborder = curr.rborder = curr.tborder = curr.bborder = curr.loverlaps = curr.roverlaps = curr.toverlaps = curr.boverlaps = false;
|
|
3141
3180
|
}
|
|
3142
3181
|
}
|
|
3143
3182
|
}
|
|
@@ -3167,10 +3206,10 @@ class SelectionHandler {
|
|
|
3167
3206
|
*/
|
|
3168
3207
|
clearTextSelection(event) {
|
|
3169
3208
|
// Seleziono del testo ma non ho shift premuto -> ignoro la selezione
|
|
3170
|
-
if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.
|
|
3209
|
+
if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && !event.range)
|
|
3171
3210
|
return false;
|
|
3172
3211
|
// Seleziono del testo e ho shift premuto -> annullo la selezione del testo
|
|
3173
|
-
if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.
|
|
3212
|
+
if ((event.view.getSelection().type == 'Range' || event.view.getSelection().toString().length > 0) && event.range)
|
|
3174
3213
|
this.est.utiExts.clearTextSelection();
|
|
3175
3214
|
}
|
|
3176
3215
|
/**
|
|
@@ -3316,10 +3355,7 @@ class UtilitiesHandler {
|
|
|
3316
3355
|
for (let i = min; i <= max; i++)
|
|
3317
3356
|
if (i !== 1)
|
|
3318
3357
|
result.push({ val: i, cssClass: (i === page ? 'btn-main app-white-text' : 'app-white-button') });
|
|
3319
|
-
result.push({
|
|
3320
|
-
val: lastPage,
|
|
3321
|
-
cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button')
|
|
3322
|
-
});
|
|
3358
|
+
result.push({ val: lastPage, cssClass: (lastPage === page ? 'btn-main app-white-text' : 'app-white-button') });
|
|
3323
3359
|
}
|
|
3324
3360
|
return result;
|
|
3325
3361
|
}
|
|
@@ -3394,15 +3430,35 @@ class CopyPasteDetector {
|
|
|
3394
3430
|
});
|
|
3395
3431
|
}
|
|
3396
3432
|
}
|
|
3433
|
+
CopyPasteDetector.ɵprov = ɵɵdefineInjectable({ factory: function CopyPasteDetector_Factory() { return new CopyPasteDetector(); }, token: CopyPasteDetector, providedIn: "root" });
|
|
3397
3434
|
CopyPasteDetector.decorators = [
|
|
3398
|
-
{ type: Injectable }
|
|
3435
|
+
{ type: Injectable, args: [{ providedIn: "root" },] }
|
|
3399
3436
|
];
|
|
3400
3437
|
CopyPasteDetector.ctorParameters = () => [];
|
|
3401
3438
|
|
|
3439
|
+
/** Classe che fornisce dei metodi di estensione in grado di riconoscere e dispatchare l'evento copia e incolla lanciato su una pagina web */
|
|
3440
|
+
class Logger {
|
|
3441
|
+
/** @ignore */
|
|
3442
|
+
constructor(debugMode) {
|
|
3443
|
+
this.debugMode = debugMode;
|
|
3444
|
+
}
|
|
3445
|
+
log(text) {
|
|
3446
|
+
if (this.debugMode)
|
|
3447
|
+
console.log("[@esfaenza/es-table @ " + (new Date()).toISOString() + "] " + text);
|
|
3448
|
+
}
|
|
3449
|
+
}
|
|
3450
|
+
Logger.ɵprov = ɵɵdefineInjectable({ factory: function Logger_Factory() { return new Logger(ɵɵinject(EST_DEBUG, 8)); }, token: Logger, providedIn: "root" });
|
|
3451
|
+
Logger.decorators = [
|
|
3452
|
+
{ type: Injectable, args: [{ providedIn: "root" },] }
|
|
3453
|
+
];
|
|
3454
|
+
Logger.ctorParameters = () => [
|
|
3455
|
+
{ type: Boolean, decorators: [{ type: Optional }, { type: Inject, args: [EST_DEBUG,] }] }
|
|
3456
|
+
];
|
|
3457
|
+
|
|
3402
3458
|
/** Componente che permette di rappresentare una griglia di valori */
|
|
3403
3459
|
class EsTableComponent {
|
|
3404
3460
|
/** @ignore */
|
|
3405
|
-
constructor(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService) {
|
|
3461
|
+
constructor(ngControl, prefService, deafults, locale, lc, cdr, utilities_H, utiExts, expExts, dateExts, msgExts, copyPasteDetector, clipboardService, logger) {
|
|
3406
3462
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
3407
3463
|
this.ngControl = ngControl;
|
|
3408
3464
|
this.prefService = prefService;
|
|
@@ -3417,6 +3473,7 @@ class EsTableComponent {
|
|
|
3417
3473
|
this.msgExts = msgExts;
|
|
3418
3474
|
this.copyPasteDetector = copyPasteDetector;
|
|
3419
3475
|
this.clipboardService = clipboardService;
|
|
3476
|
+
this.logger = logger;
|
|
3420
3477
|
/** Subject utilizzato internamente lato EsTable per causare il Focus lato componente di Input */
|
|
3421
3478
|
this.FocusSubject = new Subject();
|
|
3422
3479
|
/** Se vengono effettuati 2 click a distanza inferiore a questi Millisecondi viene considerato un doppio click */
|
|
@@ -3442,9 +3499,9 @@ class EsTableComponent {
|
|
|
3442
3499
|
this.boundSource = [];
|
|
3443
3500
|
/** Stessa cosa della **boundSource**, utilizzata come appoggio temporaneo interno */
|
|
3444
3501
|
this.TMPBoundSource = [];
|
|
3445
|
-
/** "Fetta" di oggetti utilizzata nell'endless scroll, ogni elemento di questo array è un blocchetto di 100 elementi */
|
|
3502
|
+
/** @deprecated "Fetta" di oggetti utilizzata nell'endless scroll, ogni elemento di questo array è un blocchetto di 100 elementi */
|
|
3446
3503
|
this.boundSubSources = [];
|
|
3447
|
-
/** Questa funge da indicatore per gli slice inseriti, la lunghezza dovrebbe essere corrispondente a **boundSubSources** */
|
|
3504
|
+
/** @deprecated Questa funge da indicatore per gli slice inseriti, la lunghezza dovrebbe essere corrispondente a **boundSubSources** */
|
|
3448
3505
|
this.addedSlices = [];
|
|
3449
3506
|
/** Variabile che identifica il valore del "seleziona Tutto" nella paginazione */
|
|
3450
3507
|
this.defaultAllPageOverride = 999999;
|
|
@@ -3454,22 +3511,20 @@ class EsTableComponent {
|
|
|
3454
3511
|
this.seconds = '10';
|
|
3455
3512
|
/** Impostata a true ogni volta che viene avviata una ricerca, e a false ogni volta che un nuovo valore viene ricevuto */
|
|
3456
3513
|
this.researchInProgress = false;
|
|
3514
|
+
/** Modello di appoggio temporaneo per i **RowTDs** */
|
|
3515
|
+
this.TMPRowTDs = null;
|
|
3457
3516
|
/** Modello rappresentante un dizionario di righe della tabella, con chiave l'hash e valore la lista di celle */
|
|
3458
3517
|
this.RowTDs = null;
|
|
3459
3518
|
/** Indica se **RowTDs** è un oggetto vuoto o meno */
|
|
3460
3519
|
this.EmptyRowTds = true;
|
|
3461
|
-
/** Modello di appoggio temporaneo per i **RowTDs** */
|
|
3462
|
-
this.TMPRowTDs = null;
|
|
3463
|
-
/** Modello rappresentante un singolo th della tabella, generato in base alle configurazioni e agli oggetti ricevuti */
|
|
3464
|
-
this.RowTHs = null;
|
|
3465
3520
|
/** Modello di appoggio temporaneo per i **RowTHs** */
|
|
3466
3521
|
this.TMPRowTHs = null;
|
|
3522
|
+
/** Modello rappresentante un singolo th della tabella, generato in base alle configurazioni e agli oggetti ricevuti */
|
|
3523
|
+
this.RowTHs = null;
|
|
3467
3524
|
/** Modello di appoggio temporaneo per i **RowThGroups** */
|
|
3468
3525
|
this.TMPRowThGroups = null;
|
|
3469
3526
|
/** Modello rappresentante un singolo header group della tabella. Questa lista è già ordinata e pronta per essere utilizzata in ngFor */
|
|
3470
3527
|
this.RowThGroups = null;
|
|
3471
|
-
/** Cache per i routerLink generati nelle tabelle dinamiche */
|
|
3472
|
-
this.DynamicTableRouterLinkCache = {};
|
|
3473
3528
|
/**
|
|
3474
3529
|
* Lista dei contesti. Un contesto non è altro che un hash particolare calcolato su un oggetto che identifica univocamente tale oggetto.
|
|
3475
3530
|
*
|
|
@@ -3480,6 +3535,19 @@ class EsTableComponent {
|
|
|
3480
3535
|
this.OrderDirectives = [];
|
|
3481
3536
|
/** Codice dell'ultimo oggetto solezionato */
|
|
3482
3537
|
this.lastSelectedItemID = null;
|
|
3538
|
+
/**
|
|
3539
|
+
* Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
|
|
3540
|
+
*
|
|
3541
|
+
* 1) Ordinamento e visibilità delle colonne
|
|
3542
|
+
*
|
|
3543
|
+
* 2) Ordinamento dei dati
|
|
3544
|
+
*
|
|
3545
|
+
* 3) Modalità Gerarchica
|
|
3546
|
+
*
|
|
3547
|
+
* ecc...
|
|
3548
|
+
* viene dedotto dal sistema in automatico
|
|
3549
|
+
*/
|
|
3550
|
+
this.UseCustomCells = null;
|
|
3483
3551
|
/**
|
|
3484
3552
|
* Indica se oltre alle colonne dinamiche specifiche di un tipo di oggetto ci sono anche colonne dinamiche aggiunte dall'utente
|
|
3485
3553
|
*
|
|
@@ -3506,24 +3574,8 @@ class EsTableComponent {
|
|
|
3506
3574
|
this.Height = null;
|
|
3507
3575
|
/** Indica il colore di sfondo dello spazio vuoto (non ricoperto da dati). Particolarmente utile da impostare in caso di **Height** diverso da null */
|
|
3508
3576
|
this.EmptySpaceBackgroundColor = null;
|
|
3509
|
-
/**
|
|
3510
|
-
* @experimental Indica se dev'essere l'estable a gestire la ricerca, anche la prima.
|
|
3511
|
-
*
|
|
3512
|
-
* **ATTENZIONE: RICHIEDE MODIFICHE NON TRIVIALI ALLA PAGINA DI RICERCA CHE UTILIZZA QUESTO TIPO DI ES-TABLE. NON UTILIZZARE SE NON SI SA CIO' CHE SI STA FACENDO**
|
|
3513
|
-
**/
|
|
3577
|
+
/** Indica se dev'essere l'estable a gestire la ricerca, anche la prima. **/
|
|
3514
3578
|
this.EsTableHandledSearch = false;
|
|
3515
|
-
/**
|
|
3516
|
-
* Decide se utilizzare o meno le CustomCells. Impostandolo a **true** l'es-table diventa in grado di gestire nativamente:
|
|
3517
|
-
*
|
|
3518
|
-
* 1) Ordinamento e visibilità delle colonne
|
|
3519
|
-
*
|
|
3520
|
-
* 2) Ordinamento dei dati
|
|
3521
|
-
*
|
|
3522
|
-
* 3) Modalità Gerarchica
|
|
3523
|
-
*
|
|
3524
|
-
* ecc...
|
|
3525
|
-
*/
|
|
3526
|
-
this.UseCustomCells = null;
|
|
3527
3579
|
/** Permette di impostare l'altezza massima della tabella. Se null la dimensione si adatta al numero di elementi attualmente in visualizzazione */
|
|
3528
3580
|
this.MaxHeight = null;
|
|
3529
3581
|
/** Classi da applicare al contenitore della tabella */
|
|
@@ -3568,9 +3620,9 @@ class EsTableComponent {
|
|
|
3568
3620
|
this.TableClass = null;
|
|
3569
3621
|
/** Indica di esportare solo le colonne attualmente visibili della view */
|
|
3570
3622
|
this.ExportOnlyVisibleColumns = false;
|
|
3571
|
-
/** Indica la presenza di raggruppamenti a livello di header */
|
|
3623
|
+
/** @deprecated Indica la presenza di raggruppamenti a livello di header */
|
|
3572
3624
|
this.HasHeaderGroup = null;
|
|
3573
|
-
/** Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
|
|
3625
|
+
/** @deprecated Indica la presenza di raggruppamenti a livello del raggruppamento precedentemente esistente, chiaramente è insensata senza **HasHeaderGroup** */
|
|
3574
3626
|
this.HasSecondaryHeaderGroup = null;
|
|
3575
3627
|
/** Indica se nascondere gli Header della tabella */
|
|
3576
3628
|
this.HeaderHidden = null;
|
|
@@ -3596,7 +3648,7 @@ class EsTableComponent {
|
|
|
3596
3648
|
this.HiddenColumns = null;
|
|
3597
3649
|
/** Permette di riordinare le colonne in base alle impostazioni effettuate dal Menù contestuale in alto a destra */
|
|
3598
3650
|
this.ColumnsOrdering = null;
|
|
3599
|
-
/** Eventuale supporto alle ricerche applicate alla modalità Array */
|
|
3651
|
+
/** @deprecated Eventuale supporto alle ricerche applicate alla modalità Array */
|
|
3600
3652
|
this.SearchView = null;
|
|
3601
3653
|
/** Abilita o disabilita il sistema che permette di selezionare tutti gli elementi nella vista */
|
|
3602
3654
|
this.SelectAll = null;
|
|
@@ -3718,13 +3770,23 @@ class EsTableComponent {
|
|
|
3718
3770
|
**/
|
|
3719
3771
|
this.useLocalVisibility = false;
|
|
3720
3772
|
/** Opzioni di paginazione */
|
|
3721
|
-
this.PagerOptions =
|
|
3773
|
+
this.PagerOptions = new PagerInfos();
|
|
3722
3774
|
/** @ignore */
|
|
3723
3775
|
this.propagateChange = (_) => { };
|
|
3724
3776
|
/** Funzione di trackby per il body che dovrebbe evitare il 90% delle change detection */
|
|
3725
|
-
this.bodyTrackBy = (
|
|
3777
|
+
this.bodyTrackBy = (_, item) => item._hash;
|
|
3778
|
+
/** Funzione di trackby generica per tutti gli oggetti che hanno il campo id */
|
|
3779
|
+
this.idTrackBy = (_, item) => item.id;
|
|
3780
|
+
/** Funzione di trackby generica per tutti gli oggetti che hanno il campo PropertyName */
|
|
3781
|
+
this.PropertyNameTrackBy = (_, item) => item.PropertyName;
|
|
3782
|
+
/** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
|
|
3783
|
+
this.IDTrackBy = (_, item) => item.ID;
|
|
3784
|
+
/** Funzione di trackby generica per tutti gli oggetti che hanno il campo ID */
|
|
3785
|
+
this.valTrackBy = (_, item) => item.val;
|
|
3726
3786
|
// Range selection Experimentals
|
|
3727
3787
|
this.mouseIsDown = false;
|
|
3788
|
+
this.rangeSelected = false;
|
|
3789
|
+
this.rangeStartWasIgnored = false;
|
|
3728
3790
|
this.firstCoordinates = null;
|
|
3729
3791
|
//* Piango
|
|
3730
3792
|
this.EsTdsCache = {};
|
|
@@ -3771,7 +3833,7 @@ class EsTableComponent {
|
|
|
3771
3833
|
return;
|
|
3772
3834
|
let shouldEmit = !t.item._selected;
|
|
3773
3835
|
t.item._selected = true;
|
|
3774
|
-
this.selection_H.
|
|
3836
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
3775
3837
|
var itemSelection = this.selection_H.handleItemsSelection([t.item]);
|
|
3776
3838
|
this.changed();
|
|
3777
3839
|
if (shouldEmit)
|
|
@@ -4070,7 +4132,7 @@ class EsTableComponent {
|
|
|
4070
4132
|
}
|
|
4071
4133
|
/** Per poter distinguere le chiamate a questo metodo: Dopo il setTimeout se uso gli EsTd/EsTh vecchi, senza il setTimeout se uso le nuove direttive */
|
|
4072
4134
|
internalPostBoundSource() {
|
|
4073
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4135
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
4074
4136
|
let View = this.View;
|
|
4075
4137
|
let tdsD = this.EsTdsDirective.length == 0 ? ((_c = (_b = (_a = this.EsTableTemplate) === null || _a === void 0 ? void 0 : _a.Template) === null || _b === void 0 ? void 0 : _b.EsTdsDirective) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = this.EsTableTemplate) === null || _d === void 0 ? void 0 : _d.Template) === null || _e === void 0 ? void 0 : _e.EsTdsDirective : this.EsTdsDirective : this.EsTdsDirective;
|
|
4076
4138
|
let thsD = this.EsThsDirective.length == 0 ? ((_h = (_g = (_f = this.EsTableTemplate) === null || _f === void 0 ? void 0 : _f.Template) === null || _g === void 0 ? void 0 : _g.EsThsDirective) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = this.EsTableTemplate) === null || _j === void 0 ? void 0 : _j.Template) === null || _k === void 0 ? void 0 : _k.EsThsDirective : this.EsThsDirective : this.EsThsDirective;
|
|
@@ -4078,6 +4140,7 @@ class EsTableComponent {
|
|
|
4078
4140
|
let tds = tdsD && tdsD.length > 0 ? tdsD.toArray() : [];
|
|
4079
4141
|
// Se non ho colonne dinamiche ma sono in modalità dinamica (lo capisco perché c'è una view piena di genericitem) metto il default delle colonne
|
|
4080
4142
|
this.dynamicMode_H.eventuallyReviewDynamicColumns();
|
|
4143
|
+
// Gestisce la richiesta per gruppi o per singoli oggetti
|
|
4081
4144
|
this.bindDisplayToLoadedItemsOrGroups(View);
|
|
4082
4145
|
// Questo dev'essere per forza lanciato dopo **bindDisplayToLoadedItemsOrGroups** dato che è lì che alcune cose vengono valorizzate
|
|
4083
4146
|
this.setupPagingInformations();
|
|
@@ -4088,16 +4151,24 @@ class EsTableComponent {
|
|
|
4088
4151
|
let si = this.viewMode ? view.selection : this.arraymodeSelection;
|
|
4089
4152
|
// N.B: Rispettare l'ordine di queste 3 macrocategorie è VITALE
|
|
4090
4153
|
// ************************************* Sistemazioni di TH, TD, e visibilità varie *************************************
|
|
4091
|
-
//
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4154
|
+
// Se ho definizioni dinamiche, prima di qualsiasi altra cosa devo trasformarle in th/td in modo che poi il codice qui sotto faccia le sue magie
|
|
4155
|
+
if (!this.arrayMode && ((_l = this.DynamicRowColumnsDefinition) === null || _l === void 0 ? void 0 : _l.length) > 0) {
|
|
4156
|
+
this.logger.log("Generating ths and tds from Dynamic definition");
|
|
4157
|
+
let ret = this.dynamicMode_H.emitThsAndTdsBasedOnDynamicDefinition();
|
|
4158
|
+
ths = ret.ths;
|
|
4159
|
+
tds = ret.tds;
|
|
4160
|
+
}
|
|
4095
4161
|
// Gestione delle view in modalità report, i th e i td vengono rigenerati dalle configurazioni della view
|
|
4096
4162
|
if (!this.arrayMode && view.report_columns) {
|
|
4163
|
+
this.logger.log("Generating ths and tds from report results");
|
|
4097
4164
|
let ret = this.reportMode_H.generateThsAndTdsFromView(view);
|
|
4098
4165
|
ths = ret.ths;
|
|
4099
4166
|
tds = ret.tds;
|
|
4100
4167
|
}
|
|
4168
|
+
// Espando i th e i td multipli duplicandoli
|
|
4169
|
+
let ret = this.columnMetadata_H.expandMultiThsAndTds(ths, tds, itemsAndGroups);
|
|
4170
|
+
ths = ret.expThs;
|
|
4171
|
+
tds = ret.expTds;
|
|
4101
4172
|
// Genero la cache dei th da usare da qui in poi, dopo avergli lasciato fare le sue cose in caso ci siano dei multi o dei report
|
|
4102
4173
|
for (let i = 0; i < ths.length; i++) {
|
|
4103
4174
|
let th = ths[i];
|
|
@@ -4261,6 +4332,7 @@ class EsTableComponent {
|
|
|
4261
4332
|
* @param {EsTdDirective[]} tds Celle della tabella
|
|
4262
4333
|
*/
|
|
4263
4334
|
evaluateRowTds(ths, tds) {
|
|
4335
|
+
var _a;
|
|
4264
4336
|
if (tds.length == 0)
|
|
4265
4337
|
return;
|
|
4266
4338
|
let columnsCache = {};
|
|
@@ -4293,13 +4365,14 @@ class EsTableComponent {
|
|
|
4293
4365
|
PinnedWidth: thCasted.thPinnedWidth,
|
|
4294
4366
|
GroupHeader: false,
|
|
4295
4367
|
GroupAggregation: false,
|
|
4296
|
-
Visible: columnsCache[td.td].visible,
|
|
4368
|
+
Visible: columnsCache[td.td].visible,
|
|
4369
|
+
Wraps: false,
|
|
4297
4370
|
Class: td.tdClass,
|
|
4298
4371
|
Template: thCasted.thGroup && !this.ShowItemGroupsColumns ? null : td.Template,
|
|
4299
4372
|
Multi: td._multi,
|
|
4300
4373
|
MultiProp: td._multi ? td.td.split('_')[0] : null,
|
|
4301
4374
|
MultiIndex: td._multi ? td.td.split('_')[1] : null,
|
|
4302
|
-
Alignment: td.tdAlignment || th.thAlignment,
|
|
4375
|
+
Alignment: (_a = (td.tdAlignment || th.thAlignment)) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
|
|
4303
4376
|
Format: td.tdFormat || th.thFormat,
|
|
4304
4377
|
PropertyName: th.thProperty,
|
|
4305
4378
|
PropertyType: th.thType,
|
|
@@ -4369,7 +4442,24 @@ class EsTableComponent {
|
|
|
4369
4442
|
let toAdd;
|
|
4370
4443
|
if (th.thIf || th.thGroup) {
|
|
4371
4444
|
let thClass = (th.thClass || '') + (th.thGroup ? " est-col-min" : "");
|
|
4372
|
-
toAdd = {
|
|
4445
|
+
toAdd = {
|
|
4446
|
+
Pinned: columnsListCache[th.th].pinned,
|
|
4447
|
+
Fixed: th.thFixed,
|
|
4448
|
+
PinnedWidth: th.thPinnedWidth,
|
|
4449
|
+
ID: th.th,
|
|
4450
|
+
Visible: th.thVisible,
|
|
4451
|
+
Class: thClass,
|
|
4452
|
+
Order: th.thOrder,
|
|
4453
|
+
Orderable: th.thOrderable,
|
|
4454
|
+
Template: th.Template,
|
|
4455
|
+
// Se non è nessun contenuto né nessun template mostro semplicemente l'ID dell'header
|
|
4456
|
+
Content: th.thStaticContent || th.Template ? '' : th.th,
|
|
4457
|
+
Wrap: th.thWrap,
|
|
4458
|
+
LeftBorder: th._lbord,
|
|
4459
|
+
RightBorder: th._rbord,
|
|
4460
|
+
Multi: th._multi,
|
|
4461
|
+
MultiContent: th._multi_content
|
|
4462
|
+
};
|
|
4373
4463
|
this.TMPRowTHs.push(toAdd);
|
|
4374
4464
|
// Se ho un modello che deve funzionare a rowgrouping ma non è ancora stata effettuata nessuna ricerca sui gruppi principali (groupingsUndefined)
|
|
4375
4465
|
// li genero e mando la prima ricerca che dev'essere spedita al backend per il primo caricamento dei gruppi
|
|
@@ -4466,7 +4556,7 @@ class EsTableComponent {
|
|
|
4466
4556
|
* @param {boolean} forcedVal Valore forzato di check da assegnare agli oggetti
|
|
4467
4557
|
*/
|
|
4468
4558
|
globalCheckChanged(forcedVal = null) {
|
|
4469
|
-
this.selection_H.
|
|
4559
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
4470
4560
|
// Prendo tutti gli elementi presenti in questa vista. Se ho gruppi prendo solo i gruppi a livello 0, altrimenti prendo tutti gli oggetti per selezionarli
|
|
4471
4561
|
let items = this.boundSource.find(t => t._group) ? this.boundSource.filter(t => t._group && !t._parent) : this.boundSource;
|
|
4472
4562
|
var itemSelection = this.selection_H.handleItemsSelection(items, forcedVal, this.globalCheck);
|
|
@@ -4485,7 +4575,7 @@ class EsTableComponent {
|
|
|
4485
4575
|
*/
|
|
4486
4576
|
handleClick(event, item) {
|
|
4487
4577
|
this.selection_H.clearTextSelection(event);
|
|
4488
|
-
this.selection_H.
|
|
4578
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
4489
4579
|
let selecteditems = [];
|
|
4490
4580
|
if (event.shiftKey && this.ShiftClick && !this.SingleSelection) {
|
|
4491
4581
|
let startSelecting = false;
|
|
@@ -4706,24 +4796,34 @@ class EsTableComponent {
|
|
|
4706
4796
|
* @param {any} $event Evento nativo javascript
|
|
4707
4797
|
* @param {TdElement} rowItem Riferimento a binder della riga
|
|
4708
4798
|
* @param {any} item Item che rappresenta il contesto su cui è stato effettuato un click
|
|
4709
|
-
* @param {number} rowIndex Indice della riga
|
|
4710
4799
|
*/
|
|
4711
|
-
dbClickEditOrSingleClickRowSelection($event, rowItem, item
|
|
4712
|
-
|
|
4800
|
+
dbClickEditOrSingleClickRowSelection($event, rowItem, item) {
|
|
4801
|
+
// Prima cosa da fare è controllare se ci sono dei range lasciati da operazioni precedenti (se applicabile) e ripulirli
|
|
4802
|
+
if (this.rangeSelected && !$event.ctrlKey && this.Selection) {
|
|
4803
|
+
this.logger.log("clearing previously selected range");
|
|
4804
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
4805
|
+
this.rangeSelected = false;
|
|
4806
|
+
return;
|
|
4807
|
+
}
|
|
4713
4808
|
// Modalità Editable, gestisco i doppi click senza però rallentare la modalità di selezione a range
|
|
4714
4809
|
if (this.Editable) {
|
|
4715
4810
|
// Secondo click: se il timer non è scaduto è un doppio click ed eseguo il resto
|
|
4716
4811
|
if (this.cellDbClickTimer) {
|
|
4812
|
+
this.logger.log("handling doubleclick on editable cell: " + (rowItem.PropertyName ? 'edit mode for property ' + rowItem.PropertyName : 'no property set, fallback to simple click'));
|
|
4717
4813
|
if (rowItem.PropertyName)
|
|
4718
4814
|
this.setupUserEdit(rowItem, item);
|
|
4815
|
+
else
|
|
4816
|
+
this.handleRowClick($event, item, this.Selection, true);
|
|
4719
4817
|
this.clearCellClickTimer();
|
|
4720
4818
|
return;
|
|
4721
4819
|
}
|
|
4722
4820
|
// Primo click: non fa niente e se il tempo per il secondo click scade resetta tutto
|
|
4723
4821
|
this.cellDbClickTimer = setTimeout(() => {
|
|
4724
4822
|
this.clearCellClickTimer();
|
|
4725
|
-
if (!this.RangeSelection)
|
|
4823
|
+
if (!this.RangeSelection || !this.mouseIsDown) {
|
|
4824
|
+
this.logger.log("time's up for second click, handling single click");
|
|
4726
4825
|
this.handleRowClick($event, item, this.Selection, true);
|
|
4826
|
+
}
|
|
4727
4827
|
}, this.doubleClickBufferMs);
|
|
4728
4828
|
}
|
|
4729
4829
|
// In modalità a range la creazione del range è gestita dai mousedown, move ed up...
|
|
@@ -4734,8 +4834,7 @@ class EsTableComponent {
|
|
|
4734
4834
|
if ($event.ctrlKey)
|
|
4735
4835
|
return;
|
|
4736
4836
|
// Tutti i click su una cella già in edit non devono effettuare la selezione della riga
|
|
4737
|
-
if (
|
|
4738
|
-
rowItem._editing)
|
|
4837
|
+
if (rowItem._editing)
|
|
4739
4838
|
return;
|
|
4740
4839
|
// Per evitare di rallentare a prescindere
|
|
4741
4840
|
if (!this.Editable) {
|
|
@@ -4817,14 +4916,12 @@ class EsTableComponent {
|
|
|
4817
4916
|
// Stessa cosa se ho custom cell dato che la gestione dei click viene affidata ai singoli TD
|
|
4818
4917
|
if ($event.ctrlKey || (this.UseCustomCells && !internalCall))
|
|
4819
4918
|
return true;
|
|
4820
|
-
if (selection
|
|
4821
|
-
this.selection_H.
|
|
4919
|
+
if (selection)
|
|
4920
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
4921
|
+
if (selection && !item.locked && !item._sep && !item._group)
|
|
4822
4922
|
this.handleClick($event, item);
|
|
4823
|
-
|
|
4824
|
-
else if (item._group) {
|
|
4825
|
-
this.selection_H.clearSelectionStatus();
|
|
4923
|
+
else if (item._group)
|
|
4826
4924
|
this.handleGroupClick(item);
|
|
4827
|
-
}
|
|
4828
4925
|
// Ora che non è attaccato direttamente all'html devo fare un markforcheck finite le operazioni sui grouping
|
|
4829
4926
|
this.cdr.markForCheck();
|
|
4830
4927
|
}
|
|
@@ -4845,15 +4942,11 @@ class EsTableComponent {
|
|
|
4845
4942
|
*/
|
|
4846
4943
|
setupUserEdit(rowItem, item) {
|
|
4847
4944
|
var _a;
|
|
4848
|
-
this.selection_H.
|
|
4945
|
+
this.selection_H.clearSelectionStatusExcluding(null);
|
|
4849
4946
|
if (this.Editable && rowItem.PropertyName) {
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
else {
|
|
4854
|
-
rowItem._editing = true;
|
|
4855
|
-
rowItem.old_value = item[rowItem.PropertyName];
|
|
4856
|
-
}
|
|
4947
|
+
let dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
4948
|
+
rowItem._editing = true;
|
|
4949
|
+
rowItem.old_value = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
|
|
4857
4950
|
}
|
|
4858
4951
|
this.cdr.detectChanges();
|
|
4859
4952
|
setTimeout(() => { this.FocusSubject.next(); });
|
|
@@ -4868,7 +4961,7 @@ class EsTableComponent {
|
|
|
4868
4961
|
finalizeUserEdit(rowItem, item, columnIndex) {
|
|
4869
4962
|
var _a;
|
|
4870
4963
|
let dynMode = ((_a = this.DynamicRowColumnsDefinition) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
4871
|
-
let rowItm =
|
|
4964
|
+
let rowItm = rowItem;
|
|
4872
4965
|
rowItm._editing = false;
|
|
4873
4966
|
let old = rowItm.old_value;
|
|
4874
4967
|
let niu = dynMode ? item.properties[rowItem.PropertyName] : item[rowItem.PropertyName];
|
|
@@ -4879,22 +4972,27 @@ class EsTableComponent {
|
|
|
4879
4972
|
this.onModelChange.emit([new EsTableModelChange(item, rowItem.ID, rowItem.PropertyName, old, niu)]);
|
|
4880
4973
|
this.selectionStatus[item._ordinal][columnIndex].val_setter(niu);
|
|
4881
4974
|
}
|
|
4882
|
-
mousedown(event, rowItem,
|
|
4883
|
-
var _a, _b;
|
|
4975
|
+
mousedown(event, rowItem, _) {
|
|
4884
4976
|
// Tasto diverso dal click sinistro -> ciao è stato bello e intenso
|
|
4885
4977
|
if (event.buttons != 1 || !this.RangeSelection)
|
|
4886
4978
|
return;
|
|
4887
4979
|
// Sto lavorando su QUESTA es-table
|
|
4888
4980
|
this.copyPasteDetector.ActiveEstReference = this;
|
|
4889
4981
|
// Tutti i click su una cella già in edit non devono effettuare la selezione della riga
|
|
4890
|
-
if (
|
|
4891
|
-
rowItem._editing)
|
|
4982
|
+
if (rowItem._editing)
|
|
4892
4983
|
return;
|
|
4893
|
-
let id = event.currentTarget.id;
|
|
4894
4984
|
this.mouseIsDown = true;
|
|
4895
|
-
let coords = id.split('_');
|
|
4896
|
-
|
|
4897
|
-
|
|
4985
|
+
let coords = event.currentTarget.id.split('_');
|
|
4986
|
+
let row = parseInt(coords[coords.length - 2]);
|
|
4987
|
+
let column = parseInt(coords[coords.length - 1]);
|
|
4988
|
+
this.firstCoordinates = { row, column };
|
|
4989
|
+
// Se ho già un range di selezione ignoro temporanemaente questa selezione in modo da capire bene cosa devo fare dopo (click sulla riga / altra selezione)
|
|
4990
|
+
// e gestire la grafica in maniera un po' più precisa
|
|
4991
|
+
if (!this.rangeSelected || (event.ctrlKey || !this.Selection))
|
|
4992
|
+
this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
|
|
4993
|
+
else
|
|
4994
|
+
this.rangeStartWasIgnored = true;
|
|
4995
|
+
this.logger.log(`mouse down on ${row}:${column}`);
|
|
4898
4996
|
}
|
|
4899
4997
|
mouseenter(event) {
|
|
4900
4998
|
if (!this.RangeSelection)
|
|
@@ -4904,14 +5002,34 @@ class EsTableComponent {
|
|
|
4904
5002
|
if (this.mouseIsDown && this.firstCoordinates) {
|
|
4905
5003
|
let id = event.currentTarget.id;
|
|
4906
5004
|
let coords = id.split('_');
|
|
4907
|
-
let
|
|
4908
|
-
|
|
5005
|
+
let row = parseInt(coords[coords.length - 2]);
|
|
5006
|
+
let column = parseInt(coords[coords.length - 1]);
|
|
5007
|
+
// Se ho ignorato l'inizio della selezione nel mousedown lo recupero qui
|
|
5008
|
+
if (this.rangeStartWasIgnored) {
|
|
5009
|
+
this.selection_H.singleCellSelection({ view: event.view, range: false }, this.firstCoordinates.row, this.firstCoordinates.column);
|
|
5010
|
+
this.rangeStartWasIgnored = false;
|
|
5011
|
+
}
|
|
5012
|
+
this.selection_H.singleCellSelection({ view: event.view, range: true }, row, column, this.firstCoordinates);
|
|
5013
|
+
this.logger.log(`mouse move over ${row}:${column}`);
|
|
5014
|
+
this.rangeSelected = true;
|
|
4909
5015
|
}
|
|
4910
5016
|
}
|
|
4911
5017
|
mouseup(event) {
|
|
4912
5018
|
if (!this.RangeSelection)
|
|
4913
5019
|
return;
|
|
5020
|
+
let id = event.currentTarget.id;
|
|
5021
|
+
let coords = id.split('_');
|
|
5022
|
+
let row = parseInt(coords[coords.length - 2]);
|
|
5023
|
+
let column = parseInt(coords[coords.length - 1]);
|
|
5024
|
+
// Se il mouseup viene effettuato sulla stessa cella del primo mousedown e siamo in modalità di selezione deseleziono la cella perché è un semplice click
|
|
5025
|
+
if (this.mouseIsDown && this.firstCoordinates) {
|
|
5026
|
+
if (this.firstCoordinates.row == row && this.firstCoordinates.column == column && !event.ctrlKey && !this.rangeStartWasIgnored && this.Selection)
|
|
5027
|
+
this.selection_H.singleCellSelection({ view: event.view, range: false }, row, column);
|
|
5028
|
+
else if (event.ctrlKey || !this.Selection)
|
|
5029
|
+
this.rangeSelected = true;
|
|
5030
|
+
}
|
|
4914
5031
|
this.mouseIsDown = false;
|
|
5032
|
+
this.logger.log(`mouse lifted up`);
|
|
4915
5033
|
}
|
|
4916
5034
|
getCellReference(object, column) {
|
|
4917
5035
|
let fkThisShitImOut = this.utiExts.deepClone(object);
|
|
@@ -4931,8 +5049,8 @@ EsTableComponent.decorators = [
|
|
|
4931
5049
|
viewProviders: [{ provide: LocalizationService, useClass: EsTableLoc }],
|
|
4932
5050
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4933
5051
|
encapsulation: ViewEncapsulation.None,
|
|
4934
|
-
template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}} <input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" /> {{'second/s' | localize : lc}}\r\n </div>\r\n <div class=\"pull-right m-t-2\">\r\n <label class=\"est-switch\">\r\n <input type=\"checkbox\" [(ngModel)]=\"autoUpdate\" (ngModelChange)=\"autoUpdateChanged();\" />\r\n <div class=\"est-slider round\"></div>\r\n </label>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<div *ngIf=\"View\" class=\"est-relative\" [style.height]=\"Height\" [style.background-color]=\"EmptySpaceBackgroundColor\">\r\n <div *ngIf=\"FirstBind && ShowLoadingOnBootstrap\" class=\"est-loading-box\">\r\n <div class=\"est-loading-content\">\r\n <span class=\"fa fa-spinner fa-spin\"></span> {{'Performing Table bootstrap' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"est-top-pager\" *ngIf=\"PagingStyle == 'both' || PagingStyle == 'top'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n\r\n <div class=\"est-top-allselect\" *ngIf=\"canSelectAll || (View?.selection || arraymodeSelection)?.all\">\r\n <span>{{ (selectedObjects == -1 ? ('All the' | localize : lc) : ((selectedObjects || 0) | number : '0.0-0' : locale)) + ' ' + ((selectedObjects == 1 ? 'Object Selected' : 'Objects Selected') | localize : lc) }}</span> \r\n <span class=\"est-link est-inline\" (click)=\"selection_H.selectAllOrResetSelection()\">{{ (View?.selection || arraymodeSelection)?.all ? ('Reset Selection' | localize : lc) : ('Select Everything' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class=\"table-responsive datatable est-full-height {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10 est\" style=\"background-color: white;\" [class.est-high-density]=\"HighCellDensity\">\r\n <thead [hidden]=\"HeaderHidden || FirstBind\">\r\n <!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config -->\r\n <tr *ngIf=\"(SelectAll && !SingleSelection) || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && !(View?.selection || arraymodeSelection)?.all && PagingStyle == 'bottom'\">\r\n <p class=\"est-hidden-view app-margin-bottom-0\">\u00A7</p>\r\n </th>\r\n </tr>\r\n\r\n <!-- Blocco header group -->\r\n <ng-container *ngIf=\"RowThGroups\">\r\n <tr *ngFor=\"let level of RowThGroups\">\r\n <th *ngFor=\"let cell of level\" [attr.colspan]=\"cell.Span\" \r\n [class.est-pinned-header]=\"cell.Pinned\" [class.est-col-min]=\"cell.Pinned\"\r\n [class.est-ltab-border]=\"cell.Borders\" [class.est-rtab-border]=\"cell.Borders\"\r\n class=\"est-text-center\">\r\n <ng-container *ngIf=\"cell.Pinned;\">\r\n <div class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!cell.Pinned && cell.Content; Else: cell.Template\">\r\n {{cell.Content}}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!RowThGroups\">\r\n <tr *ngIf=\"HasHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n \r\n <!-- Blocco header group secondario -->\r\n <tr *ngIf=\"HasSecondaryHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"secondaryHeaderGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n </ng-container>\r\n\r\n <!-- Blocco effettivo degli header -->\r\n <tr>\r\n <!-- Aggiungo una checkbox se la selezione \u00E8 attiva -->\r\n <th class=\"est-col-min\" *ngIf=\"Selection && !HasPinnedColumns\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n\r\n <!-- Header che valgono per view mode e array mode -->\r\n <ng-container *ngIf=\"arrayMode || viewMode\">\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"headerRef\"></ng-container>\r\n </ng-container>\r\n\r\n <!-- Se ho un modello dinamico dell'oggetto creo le colonne in base alle propriet\u00E0 -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && DynamicRowColumnsDefinition\">\r\n <th *ngFor=\"let operation of DynamicOperations\" class=\"est-col-min est-no-side-padding\"></th>\r\n \r\n <ng-container *ngFor=\"let rowHeader of DynamicRowColumnsDefinition\">\r\n <ng-container *ngIf=\"rowHeader.Visible\">\r\n <th *ngIf=\"OrderByColumn\" id=\"esth_{{rowHeader.PropertyName}}\" es-th=\"{{rowHeader.PropertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.Clss || '') + (rowHeader.HeaderWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.DataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.PropertyName, $event)\">{{rowHeader.Description}}</th>\r\n <th *ngIf=\"!OrderByColumn\" id=\"esth_{{rowHeader.PropertyName}}\" es-th=\"{{rowHeader.PropertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.Clss || '') + (rowHeader.HeaderWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.DataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\">{{rowHeader.Description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th -->\r\n <ng-container *ngIf=\"UseCustomCells && RowTHs && RowTHs.length > 0\">\r\n <th *ngIf=\"HasPinnedColumns\" class=\"est-pinned-header est-col-min\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-simple-border-bottom\">\r\n <th class=\"est-col-min est-no-border\" *ngIf=\"Selection\" [style.width.px]=\"20\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && rowHeader.Pinned\" [style.width.px]=\"rowHeader.PinnedWidth\" es-th=\"{{rowHeader.ID}}\" \r\n class=\"{{rowHeader.Class || ''}}\" \r\n [class.est-pinned-internal-header]=\"true\" \r\n [class.est-no-border]=\"true\" \r\n [class.est-nowrap]=\"!rowHeader.Wrap\" \r\n [Pinned]=\"true\" [Fixed]=\"rowHeader.Fixed\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onUnpinning)=\"columnMetadata_H.unpinColumn($event)\" (onOrderChange)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } \"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs\">\r\n\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && !rowHeader.Pinned\" es-th=\"{{rowHeader.ID}}\" class=\"{{rowHeader.Class || ''}}\" [class.est-ltab-border]=\"rowHeader.LeftBorder\" [class.est-rtab-border]=\"rowHeader.RightBorder\" [class.est-nowrap]=\"!rowHeader.Wrap\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!--Per l'eliminazione mi serve un header aggiuntivo-->\r\n <th *ngIf=\"Removal\" [class.est-right-9]=\"Export || HiddenColumns\" class=\"est-col-min est-sticky-last-column\"><span class=\"fa fa-trash\"></span></th>\r\n\r\n <!--Per l'esportazione mi serve l'header extra da cui faccio uscire i 3 pallocchi-->\r\n <th *ngIf=\"Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions\" class=\"est-table-dotted-menu est-sticky-last-column est-col-min text-sm-center\">\r\n \r\n <!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni -->\r\n <div class=\"btn-group\" container=\"body\" placement=\"bottom right\" dropdown #dropdown=\"bs-dropdown\" [autoClose]=\"true\">\r\n <span dropdownToggle class=\"fa fa-ellipsis-v est-fs-18 est-pointer est-padding-3\"></span>\r\n\r\n <div *dropdownMenu class=\"dropdown-menu dropdown-menu-right est-bring-to-front-strong\">\r\n <div class=\"est-pointer\">\r\n <a class=\"dropdown-item\" *ngIf=\"HiddenColumns || ColumnsOrdering\" (click)=\"columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && CSVExport\" (click)=\"export_H.tryExport('CSV')\">{{'Export View' | localize : lc}} (CSV)</a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && XLSXExport\" (click)=\"export_H.tryExport('XLSX')\">{{'Export View' | localize : lc}} (XLSX)</a>\r\n <a class=\"dropdown-item\" *ngFor=\"let option of CornerMenuOptions\" (click)=\"cornerActionClicked(option.id)\">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody [hidden]=\"BodyHidden || FirstBind\" [class.est-no-selection]=\"RangeSelection\">\r\n <!--Con selection attiva richiamo il template che gestisce il context menu-->\r\n <ng-container *ngIf=\"Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBodySelection; context: { $implicit: { selDisabled: arrayMode ? false : SelectionDisabled, sel: Selection }}\"></ng-container>\r\n </ng-container>\r\n\r\n <!--Senza selection richiamo il template che NON gestisce il context menu-->\r\n <ng-container *ngIf=\"!Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBody\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div *ngIf=\"PagingStyle == 'both' || PagingStyle == 'bottom'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n<!-- Template che contiene tutte le info di paginazione in modo da poterlo replicare anche sopra -->\r\n<ng-template #pagingElement>\r\n <ng-container *ngIf=\"!FirstBind\">\r\n <!-- Pulsanti avanti-indietro di paginazione -->\r\n <div *ngIf=\"PagerOptions.ShowPaging && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)\" class=\"pull-right btn-toolbar\">\r\n <ng-container *ngIf=\"PagerOptions.View?.pagingavailable || viewMode\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"arrayMode && UseArrayModePaging && !SearchView\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- Paginatore dove appare la count e le opzioni di paginazione -->\r\n <div class=\"pull-right\" *ngIf=\"PagerOptions.ShowCount || PagerOptions.ShowPagingOptions\">\r\n <div class=\"est-mt-min-5\" *ngIf=\"PagerOptions.ShowPaging\">\r\n <app-paging *ngIf=\"!PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [WarnOnAll]=\"false\" [CurrentPageSize]=\"ArraymodeItemsPerPage\" (pagingSelected)=\"items_H.refreshPaging($event)\"></app-paging>\r\n <app-paging *ngIf=\"PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [GroupMode]=\"PagerOptions.Searches == 'groups'\" [AllSearch]=\"AllSearch\" [View]=\"PagerOptions.View\" (pagingSelected)=\"onItemsPerPageChanged($event);\"></app-paging>\r\n </div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Template che contiene i pulsanti per cambiare pagina -->\r\n<ng-template #pagingButtons let-options>\r\n <div class=\"est-flex\" [class.est-margin-left-50]=\"options.Margin\">\r\n <a class=\"btn\" class=\"est-page-prev app-pointer\" (click)=\"options.ATP(-1, options.separator)\"><span class=\"fa fa-chevron-left\"></span></a>\r\n <div *ngIf=\"options.Array\" class=\"est-inline\"><a *ngFor=\"let p of options.Array\" class=\"btn est-page-sel {{p.cssClass}}\" (click)=\"options.GTP(p.val, options.separator)\">{{p.val}}</a></div>\r\n <a class=\"btn\" class=\"est-page-next app-pointer\" (click)=\"options.ATP(1, options.separator)\"><span class=\"fa fa-chevron-right\"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l'unica cosa che davvero cambia, il resto \u00E8 templatizzato -->\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even; let i=index; trackBy: bodyTrackBy\">\r\n <tr *ngIf=\"item._visible || (!Hierarchy && !ArrayGrouping)\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\" \r\n [class.est-pointer]=\"!item.locked\" \r\n [class.est-white-selected]=\"item._selected && !item.locked\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n [contextMenu]=\"!item.locked ? (ContextMenu || emptyMenu) : emptyMenu\" [contextMenuSubject]=\"item\"\r\n (click)=\"!RangeSelection && handleRowClick($event, item, true)\"\r\n (contextmenu)=\"onRightClick();\">\r\n\r\n <td *ngIf=\"!item.locked && !item._sep && !HasPinnedColumns\">\r\n <input type=\"checkbox\" \r\n [disabled]=\"templateOptions.selDisabled\" \r\n [class.est-pointer]=\"!item.locked\"\r\n [(ngModel)]=\"item._selected\" name=\"check{{i}}\" \r\n (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td *ngIf=\"(item.locked || item._sep) && !HasPinnedColumns\"></td>\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container> </ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item, templateOptions: templateOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even;\">\r\n <tr *ngIf=\"item._visible || !Hierarchy\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n (click)=\"handleRowClick($event, item, false)\">\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"dynamicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class=\"est-pinned-body \" *ngIf=\"HasPinnedColumns\"><div class=\"est-pinned-border est-cell-group-padding\"></div></td>\r\n <td *ngIf=\"item._grouplevel > 1\" [attr.colspan]=\"item._grouplevel-1\"></td>\r\n <td [attr.colspan]=\"Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)\">\r\n <div class=\"est-rg-sep-flex-right\" *ngIf=\"RowGroupingPagingStyle == 'right'\">\r\n <div class=\"est-rg-page\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n <div class=\"est-rg-ipp\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><app-paging [CountLabel]=\"CountLabel\" [AllSearch]=\"AllSearch\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n </div>\r\n\r\n <div class=\"est-rg-sep-flex-left\" *ngIf=\"RowGroupingPagingStyle == 'left'\">\r\n <div class=\"est-rg-ipp\"><app-paging [AllSearch]=\"AllSearch\" [CountLabel]=\"CountLabel\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n <div class=\"est-rg-page\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza -->\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || EmptyRowTds) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle definite in maniera dinamica dal modello -->\r\n<ng-template #dynamicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || EmptyRowTds) && DynamicRowColumnsDefinition\">\r\n <ng-container *ngFor=\"let operation of DynamicOperations; let first = first; let last = last;\">\r\n <ng-container *ngIf=\"!operation.conditionField || (item.properties[operation.conditionField] == operation.conditionValue)\">\r\n <td [class.est-no-right-padding]=\"last\" [class.est-no-left-padding]=\"!first\" class=\"est-col-min\"><span title=\"{{operation.title}}\" class=\"{{operation.iconClass}} est-pointer\" (click)=\"dynamicOperation(item, operation.id)\">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"operation.conditionField && (item.properties[operation.conditionField] != operation.conditionValue)\">\r\n <td class=\"est-col-min est-no-side-padding\"></td>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let rowItem of DynamicRowColumnsDefinition; let i = index\">\r\n\r\n <ng-container *ngIf=\"rowItem.RoutePath && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.PropertyName}}\" class=\"{{UserDefinedDynamicCols ? rowItem.Clss : 'est-nowrap'}}\" [Internal]=\"false\" [Context]=\"item._hash\">\r\n <a [routerLink]=\"dynamicMode_H.generateRouterLink(rowItem.RoutePath, rowItem.RouteParameterProperties, item)\" class=\"est-link\" [innerHTML]=\"item.properties[rowItem.PropertyName]\"></a>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!rowItem.RoutePath && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.PropertyName}}\" \r\n [class.est-selected-cell]=\"selectionStatus[item._ordinal][i]?.selected\" \r\n [class.est-cell-lborder]=\"selectionStatus[item._ordinal][i]?.lborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[item._ordinal][i]?.tborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[item._ordinal][i]?.rborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[item._ordinal][i]?.bborder\"\r\n [class.est-cell-lborder-tmp]=\"!selectionStatus[item._ordinal][i]?.lborder && !selectionStatus[item._ordinal][i]?.loverlaps\"\r\n [class.est-cell-rborder-tmp]=\"!selectionStatus[item._ordinal][i]?.rborder && !selectionStatus[item._ordinal][i]?.roverlaps\"\r\n (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\" \r\n class=\"{{UserDefinedDynamicCols ? rowItem.Clss : 'est-nowrap'}} est-default-row-height\" \r\n [Internal]=\"false\" [class.est-no-selection]=\"!!Editable\" [Context]=\"item._hash\"\r\n id=\"estd_{{rowItem.PropertyName}}_{{item._ordinal}}_{{i}}\" (mousedown)=\"mousedown($event, rowItem, item)\" (mouseenter)=\"mouseenter($event)\" (mouseup)=\"mouseup($event)\">\r\n\r\n <div [class.est-edit-hidden]=\"rowItem.edits[item._hash]?._editing\" >\r\n <ng-container *ngTemplateOutlet=\"findEsTd(rowItem.PropertyName, rowItem.RendererName) || defaultEsTd; context: { $implicit: { definition: rowItem, value: item.properties[rowItem.PropertyName], type: rowItem.PropertyType} }\"></ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem.edits[item._hash]?._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName, rowItem.EditorName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEditor let-ctx>\r\n <ng-container *ngIf=\"ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item.properties[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n <ng-container *ngIf=\"!ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-ctx>\r\n <!-- Formattare il valore in base a valType.type -->\r\n <ng-container *ngIf=\"ctx.type == 'enum'\">\r\n {{ (ctx.value | est_lookup : ctx.definition.PropertySource).description }}\r\n </ng-container>\r\n <ng-container *ngIf=\"ctx.type != 'enum'\">\r\n {{ctx.value}}\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale delle celle custom se configurate -->\r\n<ng-template #customCells let-item let-opt=\"templateOptions\">\r\n <ng-container *ngIf=\"UseCustomCells && !EmptyRowTds\">\r\n <td *ngIf=\"HasPinnedColumns\" \r\n class=\"est-pinned-body est-col-min\" [class.est-white-selected]=\"item._selected\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border\">\r\n <td *ngIf=\"!item.locked && !item._sep && Selection\" class=\"est-no-border est-col-min\" [style.width.px]=\"20\">\r\n <input type=\"checkbox\" [disabled]=\"opt.selDisabled\" [class.est-pointer]=\"!item.locked\" [(ngModel)]=\"item._selected\" name=\"check{{item._hash}}\" (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td class=\"est-no-border est-col-min\" *ngIf=\"(item.locked || item._sep) && Selection\" [style.width.px]=\"20\"></td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <td *ngIf=\"rowItem && rowItem.Pinned\" [style.width.px]=\"rowItem.PinnedWidth\" es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" [class.est-no-selection]=\"Editable &&!!rowItem.PropertyName\" [class.est-no-border]=\"true\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\" (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\">\r\n\r\n <div [class.est-edit-hidden]=\"rowItem._editing\" [class.est-pre]=\"!(Hierarchy && i == 0)\"\r\n [style.text-align]=\"rowItem.Alignment == 'Center' ? 'center' : rowItem.Alignment == 'Left' ? 'left' : rowItem.Alignment == 'Right' ? 'right' : null\"\r\n [style.color]=\"item.forecolors && rowItem.PropAccessor ? item.forecolors[rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"item.backcolors && rowItem.PropAccessor ? item.backcolors[rowItem.PropAccessor] : null\">\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"!rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: rowItem.Multi ? (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) : item }\"></ng-container></ng-container>\r\n <span *ngIf=\"rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n <ng-container *ngIf=\"!rowItem.Template && !rowItem.Multi\">\r\n <span *ngIf=\"rowItem.Content && !rowItem.PropAccessor\">{{rowItem.Content}}</span>\r\n <span *ngIf=\"!rowItem.Content && rowItem.PropAccessor\">{{(item.values? item.values[rowItem.PropAccessor] : item[rowItem.PropAccessor]) | est_format: rowItem.Format }}</span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index\">\r\n <ng-container *ngIf=\"rowItem && !rowItem.Pinned\">\r\n\r\n <!-- Casistica senza bodyRef, quindi con direttive per i td -->\r\n <ng-container *ngIf=\"!bodyRef && rowItem.Visible\">\r\n <td es-td=\"{{rowItem.ID}}\" class=\"{{rowItem.Class}}\" \r\n [class.est-selected-cell]=\"selectionStatus[item._ordinal][i]?.selected\" \r\n [class.est-cell-lborder]=\"selectionStatus[item._ordinal][i]?.lborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[item._ordinal][i]?.tborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[item._ordinal][i]?.rborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[item._ordinal][i]?.bborder\"\r\n [class.est-ltab-border]=\"rowItem.LeftBorder && !selectionStatus[item._ordinal][i]?.lborder\" \r\n [class.est-rtab-border]=\"rowItem.RightBorder && !selectionStatus[item._ordinal][i]?.rborder\" \r\n [class.est-cell-lborder-tmp]=\"!selectionStatus[item._ordinal][i]?.lborder && !selectionStatus[item._ordinal][i]?.loverlaps && !rowItem.LeftBorder\"\r\n [class.est-cell-rborder-tmp]=\"!selectionStatus[item._ordinal][i]?.rborder && !selectionStatus[item._ordinal][i]?.roverlaps && !rowItem.RightBorder\"\r\n [class.est-no-selection]=\"Editable && !!rowItem.PropertyName\" [class.est-rg-hdr]=\"rowItem.GroupHeader\" [class.est-rg-agg]=\"rowItem.GroupAggregation\" \r\n [class.est-nowrap]=\"Hierarchy || !rowItem.Wraps\" [Internal]=\"true\" (click)=\"dbClickEditOrSingleClickRowSelection($event, rowItem, item, i)\"\r\n (onCellGeneration)=\"registerCell($event)\" [Context]=\"item._hash\"\r\n id=\"{{item._ordinal}}_{{i}}\" (mousedown)=\"mousedown($event, rowItem, item)\" (mouseenter)=\"mouseenter($event)\" (mouseup)=\"mouseup($event)\"\r\n [style.text-align]=\"rowItem.Alignment == 'Center' ? 'center' : rowItem.Alignment == 'Left' ? 'left' : rowItem.Alignment == 'Right' ? 'right' : null\"\r\n [style.color]=\"item.forecolors && rowItem.PropAccessor ? item.forecolors[rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"item.backcolors && rowItem.PropAccessor ? item.backcolors[rowItem.PropAccessor] : null\">\r\n \r\n <div [class.est-edit-hidden]=\"rowItem._editing\" [class.est-pre]=\"!(Hierarchy && i == 0)\" >\r\n <ng-container *ngIf=\"Hierarchy && i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: item }\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"!rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: item }\"></ng-container></ng-container>\r\n <span *ngIf=\"rowItem.Multi && rowItem.Template\"><ng-container *ngTemplateOutlet=\"rowItem.Template; context: { $implicit: (item[rowItem.MultiProp] ? item[rowItem.MultiProp][rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n <ng-container *ngIf=\"!rowItem.Template && !rowItem.Multi\">\r\n <span *ngIf=\"rowItem.Content && !rowItem.PropAccessor\">{{rowItem.Content}}</span>\r\n <span *ngIf=\"!rowItem.Content && rowItem.PropAccessor\">{{(item.values? item.values[rowItem.PropAccessor] : item[rowItem.PropAccessor]) | est_format: rowItem.Format }}</span>\r\n </ng-container>\r\n </div>\r\n <div *ngIf=\"rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"findEditor(rowItem.PropertyName) || defaultEditor; context: { $implicit: { definition: rowItem, columnIndex: i, item: item, finalizer: finalizeUserEdit.bind(this, rowItem, item, i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf=\"!item.parent\" class=\"fa fa-chevron-down\" style=\"visibility:hidden\"></span>\r\n <span *ngIf=\"item.parent && item._expanded\" class=\"fa fa-chevron-down est-pointer est-no-selection\" (click)=\"hierarchyMode_H.collapseParent(item[this.OwnKey])\"></span>\r\n <span *ngIf=\"item.parent && !item._expanded\" class=\"fa fa-chevron-up est-pointer est-no-selection\" (click)=\"hierarchyMode_H.expandParent(item[this.OwnKey])\"></span>\r\n \r\n</ng-template>\r\n\r\n<!-- Questo template contiene i pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella -->\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf=\"Removal && !RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted)\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted)\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"Removal && RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!options.item[RemovalCondition]\"><span class=\"fa fa-remove est-hidden-view\"></span></td>\r\n </ng-container>\r\n <td *ngIf=\"Export || HiddenColumns || CornerMenuOptions\" class=\"est-sticky-last-column{{options.even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n</ng-template>\r\n\r\n<!-- Context menu vuoto default per tutte le tabella che non ce l'hanno, in modo che al click destro appaia \"nessuna op disponibile\" -->\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem>\r\n <span>\r\n <em>{{'No operations available' | localize : lc}}...</em>\r\n </span>\r\n </ng-template>\r\n</context-menu>\r\n\r\n<!-- Modal per cambiare posizione e visibilit\u00E0 delle colonne dell'es-table -->\r\n<div bsModal #changeColumnVisibilityModal=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-lg\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header est-pointer\" cdkDragHandle>\r\n <h5 class=\"modal-title pull-left\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"changeColumnVisibilityModal.hide();\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"card card-info est-padding-10 est-margin-bottom-0\">\r\n {{'There are no columns configured to be hidden/shown in this view' | localize : lc}}\r\n </div>\r\n <div *ngIf=\"TMPColumnsList && TMPColumnsList.length > 0\" style=\"max-height:500px; overflow-y:auto\">\r\n <!--Aaaaaaah la tristezza... qui mi servirebbe l'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante-->\r\n <table class=\"table table-striped table-sm est-margin-bottom-0\">\r\n <thead>\r\n <tr>\r\n <th class=\"est-col-min\" *ngIf=\"HiddenColumns\">\r\n <input class=\"est-pointer\" type=\"checkbox\" [(ngModel)]=\"globalColVisCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"columnMetadata_H.globalColVisCheckChanged();\">\r\n </th>\r\n <!-- <th class=\"est-col-min\" *ngIf=\"ColumnsOrdering\"></th> -->\r\n <th class=\"est-col-min est-nowrap\">{{'Column Name' | localize : lc}}</th>\r\n <!--Filler-->\r\n <th></th>\r\n <!-- Pinner -->\r\n <th *ngIf=\"DirectivesBased\" class=\"est-col-min\"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]=\"TMPColumnsList\" \r\n (cdkDropListDropped)=\"columnMetadata_H.columnReordered($event)\" \r\n [cdkDropListSortPredicate]=\"columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)\"\r\n class=\"est-dropbox\">\r\n\r\n <tr *ngFor=\"let item of TMPColumnsList; let i = index; let last = last\" \r\n class=\"est-pointer est-droplist\" \r\n [class.est-white-selected]=\"lastSelectedItemID == item.id\" \r\n [class.est-no-selection]=\"!item.visible\"\r\n cdkDrag\r\n [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"!ColumnsOrdering || item.fixed || item.pinned\">\r\n\r\n <td *ngIf=\"HiddenColumns\">\r\n <input type=\"checkbox\" [class.est-hidden-view]=\"item.fixed\" class=\"est-pointer\" [(ngModel)]=\"item.visible\" name=\"visible{{i}}\" (ngModelChange)=\"columnMetadata_H.updateGlobalColVisCheck();\" />\r\n </td>\r\n <td class=\"est-nowrap drag-visible\" (click)=\"columnMetadata_H.columnClicked(item);\">\r\n <ng-container *ngIf=\"item.template\">\r\n <!-- Padri -->\r\n <span *ngIf=\"item.parentTemplates && item.parentTemplates.length > 0\" class=\"est-fw-bold est-fs-13\">\r\n ( \r\n <ng-container *ngFor=\"let parent of item.parentTemplates; let last=last\">\r\n <ng-container *ngIf=\"parent.tmpl\"><ng-container *ngTemplateOutlet=\"parent.tmpl\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"parent.content\">{{parent.content}}</ng-container>\r\n <span *ngIf=\"!last\"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n <!-- Template header originale -->\r\n <ng-container *ngTemplateOutlet=\"item.template; context: { $implicit: item.multi ? item.multiContent : null }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.template\">{{item.description}}</ng-container>\r\n </td>\r\n <!--Filler-->\r\n <td (click)=\"columnMetadata_H.columnClicked(item);\"></td>\r\n <!-- Pinner -->\r\n <td *ngIf=\"DirectivesBased && ColumnsPinnable\"><span *ngIf=\"!item.fixed && item.pinnable\" class=\"fa fa-thumb-tack\" [class.text-success]=\"item.pinned\" (click)=\"columnMetadata_H.pinOrUnpinColumn(item)\"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary est-margin-right-10\" (click)=\"lastSelectedItemID = null; changeColumnVisibilityModal.hide();\">{{'Close' | localize : lc}}</button>\r\n <button type=\"button\" [disabled]=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"btn btn-primary\" (click)=\"columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()\">{{'Confirm' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
|
|
4935
|
-
styles: [".est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-head-resizer{top:0;right:0;bottom:0;width:7px;position:absolute;cursor:col-resize}.est-head-resizer-internal{top:0;right:0;left:6px;bottom:0;width:1px;position:absolute;background-color:#ccc;height:100%}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-default-row-height{height:31px}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-edit-hidden{height:1px!important}.est-edit-hidden,.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-mt-min-5{margin-top:-5px}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-margin-bottom-0{margin-bottom:0!important}.est-margin-right-10{margin-right:10px!important}.est-right-9{right:9px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-13,.est-fs-14{font-size:14px}.est-fw-bold{font-weight:700}.est-padding-3{padding:3px!important}.est-page-container{position:relative}.est-bring-to-front-strong{z-index:99999999!important}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:\"\";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-relative{position:relative}.est-top-pager{position:absolute;right:0;top:5px}.est-top-allselect{position:absolute;left:0;top:5px;font-weight:700}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.est-margin-left-50{margin-left:50px}.est-quick-unpin{color:#000;margin-left:8px;font-size:14px;transform:rotate(45deg)}.est-full-height{height:100%}.est-page-sel{color:#000;margin-left:3px;margin-right:3px;padding:0 5px;font-size:inherit;border:none;border-radius:15px}.est-page-next,.est-page-prev{color:#000;font-size:inherit;padding:2px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:-webkit-sticky;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-simple-border-bottom{border-bottom:1px solid #dee2e6}.est-pinned-internal-header{border-top:0;border-bottom:0 solid #dee2e6}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:-webkit-sticky;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:1px solid #bbb!important}.est-rtab-border{border-right:1px solid #bbb!important}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-selected-cell{background-color:rgba(33,150,243,.2)}.est-cell-lborder{border-left:1.02px solid #2196f3!important}.est-cell-lborder-tmp{border-left:1.02px solid transparent!important}.est-cell-tborder{border-top:1.02px solid #2196f3!important}.est-cell-rborder{border-right:1.02px solid #2196f3!important}.est-cell-rborder-tmp{border-right:1.02px solid transparent!important}.est-cell-bborder{border-bottom:1.02px solid #2196f3!important}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-flex{display:flex}.est-rg-sep-flex-right{display:flex;flex-direction:row-reverse;width:100%;margin:-5px}.est-rg-sep-flex-left{display:flex;flex-direction:row;width:100%;margin:-5px}.est-rg-hdr{font-weight:700}.est-rg-agg{font-style:italic}.est-rg{background-color:hsla(0,0%,46.7%,.4666666666666667)!important}.est-rg-sep{font-size:12px;padding-right:20px!important;background-color:hsla(0,0%,73.3%,.7333333333333333)!important}.est-rg-ipp{text-align:left;display:inline-flex;margin-right:25px}.est-rg-page{text-align:right;display:inline-flex;font-size:inherit;padding-top:5px}.est-droplist.cdk-drag-placeholder{opacity:0}.est-droplist.cdk-drag-preview{z-index:999999999!important;opacity:1;box-sizing:border-box;border-radius:4px;background-color:#fff;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.est-droplist.cdk-drag-preview td:not(.drag-visible){visibility:hidden}.est-droplist.cdk-drag-preview td.drag-visible{padding-top:3px}.est-droplist.cdk-drag-animating,.est-droplist.cdk-drop-list-dragging .est-dropbox:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.est-pre{white-space:pre}.est val-datetime .mat-form-field-appearance-outline .mat-form-field-infix input{margin-bottom:3px!important;min-width:130px!important}.est .mat-form-field-flex{height:29px!important;padding:0!important}.est .mat-form-field-flex .mat-form-field-outline{color:#00f}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-start{border-left:none;border-top:none;border-radius:0}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-end{border-top:none;border-radius:0;border-right:none}.est .mat-form-field-wrapper{height:20px;min-height:20px!important;margin-top:0!important}.est .mat-form-field-infix{width:100%!important;min-width:50px!important}.est .mat-form-field-infix select.mat-input-element{margin-top:-5px!important}.est .mat-datepicker-input{margin-bottom:3px!important}.est input{height:20px;padding-top:0!important}"]
|
|
5052
|
+
template: "<!-- Patacchino di autoaggiornamento -->\r\n<div class=\"w-100\" *ngIf=\"AutoUpdate\">\r\n <div class=\"pull-right\">\r\n {{'Update every' | localize : lc}} <input [readonly]=\"autoUpdate\" maxlength=\"3\" class=\"form-control est-custom-input\" type=\"text\" [(ngModel)]=\"seconds\" /> {{'second/s' | localize : lc}}\r\n </div>\r\n <div class=\"pull-right m-t-2\">\r\n <label class=\"est-switch\">\r\n <input type=\"checkbox\" [(ngModel)]=\"autoUpdate\" (ngModelChange)=\"autoUpdateChanged();\" />\r\n <div class=\"est-slider round\"></div>\r\n </label>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n</div>\r\n\r\n<div *ngIf=\"View\" class=\"est-relative\" [style.height]=\"Height\" [style.background-color]=\"EmptySpaceBackgroundColor\">\r\n <div *ngIf=\"FirstBind && ShowLoadingOnBootstrap\" class=\"est-loading-box\">\r\n <div class=\"est-loading-content\">\r\n <span class=\"fa fa-spinner fa-spin\"></span> {{'Performing Table bootstrap' | localize: lc}}...\r\n </div>\r\n </div>\r\n\r\n <div class=\"est-top-pager\" *ngIf=\"PagingStyle == 'both' || PagingStyle == 'top'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n\r\n <div class=\"est-top-allselect\" *ngIf=\"canSelectAll || (View?.selection || arraymodeSelection)?.all\">\r\n <span>{{ (selectedObjects == -1 ? ('All the' | localize : lc) : ((selectedObjects || 0) | number : '0.0-0' : locale)) + ' ' + ((selectedObjects == 1 ? 'Object Selected' : 'Objects Selected') | localize : lc) }}</span> \r\n <span class=\"est-link est-inline\" (click)=\"selection_H.selectAllOrResetSelection()\">{{ (View?.selection || arraymodeSelection)?.all ? ('Reset Selection' | localize : lc) : ('Select Everything' | localize : lc)}}</span>\r\n </div>\r\n\r\n <div class=\"table-responsive datatable est-full-height {{ContainerClass}}\" [style.max-height.px]=\"MaxHeight\">\r\n <table class=\"{{ TableClass }} est-margin-bottom-10 est\" style=\"background-color: white;\" [class.est-high-density]=\"HighCellDensity\">\r\n <thead [hidden]=\"HeaderHidden || FirstBind\">\r\n <!-- Aggiungo il pezzo che gestisce la selezione di tutto se attivo da config -->\r\n <tr *ngIf=\"(SelectAll && !SingleSelection) || PagingStyle != 'bottom'\">\r\n <th class=\"est-no-selection\" [attr.colspan]=\"Columns.Global\" [class.est-hidden-view]=\"!canSelectAll && !(View?.selection || arraymodeSelection)?.all && PagingStyle == 'bottom'\">\r\n <p class=\"est-hidden-view app-margin-bottom-0\">\u00A7</p>\r\n </th>\r\n </tr>\r\n\r\n <!-- Blocco header group -->\r\n <ng-container *ngIf=\"RowThGroups\">\r\n <tr *ngFor=\"let level of RowThGroups; trackBy: IDTrackBy\">\r\n <th *ngFor=\"let cell of level; trackBy: IDTrackBy\" [attr.colspan]=\"cell.Span\" \r\n [class.est-pinned-header]=\"cell.Pinned\" [class.est-col-min]=\"cell.Pinned\"\r\n [class.est-ltab-border]=\"cell.Borders\" [class.est-rtab-border]=\"cell.Borders\"\r\n class=\"est-text-center\">\r\n <ng-container *ngIf=\"cell.Pinned;\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!cell.Pinned && cell.Content; Else: cell.Template\">\r\n {{cell.Content}}\r\n </ng-container>\r\n </th>\r\n </tr>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"!RowThGroups\">\r\n <tr *ngIf=\"HasHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"headerGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n \r\n <!-- Blocco header group secondario -->\r\n <tr *ngIf=\"HasSecondaryHeaderGroup\">\r\n <ng-container *ngTemplateOutlet=\"secondaryHeaderGroupRef\"></ng-container>\r\n <th *ngIf=\"Export\"></th>\r\n </tr>\r\n </ng-container>\r\n\r\n <!-- Blocco effettivo degli header -->\r\n <tr>\r\n <!-- Aggiungo una checkbox se la selezione \u00E8 attiva -->\r\n <th class=\"est-col-min\" *ngIf=\"Selection && !HasPinnedColumns\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n\r\n <!-- Header che valgono per view mode e array mode -->\r\n <ng-container *ngIf=\"arrayMode || viewMode\">\r\n <!-- In una tabella base prendo semplicemente i th scritti dall'utente nell'HTML -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"headerRef\"></ng-container>\r\n </ng-container>\r\n\r\n <!-- Se ho un modello dinamico dell'oggetto creo le colonne in base alle propriet\u00E0 -->\r\n <ng-container *ngIf=\"(!UseCustomCells || !RowTHs || RowTHs.length == 0) && DynamicRowColumnsDefinition\">\r\n <th *ngFor=\"let operation of DynamicOperations; trackBy: idTrackBy\" class=\"est-col-min est-no-side-padding\"></th>\r\n \r\n <ng-container *ngFor=\"let rowHeader of DynamicRowColumnsDefinition; trackBy: PropertyNameTrackBy\">\r\n <ng-container *ngIf=\"rowHeader.Visible\">\r\n <th *ngIf=\"OrderByColumn\" id=\"esth_{{rowHeader.PropertyName}}\" es-th=\"{{rowHeader.PropertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.Clss || '') + (rowHeader.HeaderWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.DataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.PropertyName, $event)\">{{rowHeader.Description}}</th>\r\n <th *ngIf=\"!OrderByColumn\" id=\"esth_{{rowHeader.PropertyName}}\" es-th=\"{{rowHeader.PropertyName}}\" class=\"{{UserDefinedDynamicCols ? ((rowHeader.Clss || '') + (rowHeader.HeaderWraps ? '' : ' est-nowrap')) : ' est-nowrap'}}\" [Order]=\"rowHeader.DataOrder\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\">{{rowHeader.Description}}</th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- Se non ho un modello dinamico ma invece delle celle custom, genero gli header in base ai row th -->\r\n <ng-container *ngIf=\"UseCustomCells && RowTHs?.length > 0\">\r\n <th *ngIf=\"HasPinnedColumns\" class=\"est-pinned-header est-col-min\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-simple-border-bottom\">\r\n <th class=\"est-col-min est-no-border\" *ngIf=\"Selection\" [style.width.px]=\"20\">\r\n <input *ngIf=\"!SingleSelection\" class=\"est-pointer\" type=\"checkbox\" [disabled]=\"SelectionDisabled\" [(ngModel)]=\"globalCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"globalCheckChanged();\">\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs; trackBy: IDTrackBy\">\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && rowHeader.Pinned\" [style.width.px]=\"rowHeader.PinnedWidth\" es-th=\"{{rowHeader.ID}}\" \r\n class=\"{{rowHeader.Class || ''}}\" \r\n [class.est-pinned-internal-header]=\"true\" \r\n [class.est-no-border]=\"true\" \r\n [class.est-nowrap]=\"!rowHeader.Wrap\" \r\n [Pinned]=\"true\" [Fixed]=\"rowHeader.Fixed\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onUnpinning)=\"columnMetadata_H.unpinColumn($event)\" (onOrderChange)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null } \"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let rowHeader of RowTHs; trackBy: IDTrackBy\">\r\n\r\n <th *ngIf=\"rowHeader && rowHeader.Visible && !rowHeader.Pinned\" es-th=\"{{rowHeader.ID}}\" class=\"{{rowHeader.Class || ''}}\" [class.est-ltab-border]=\"rowHeader.LeftBorder\" [class.est-rtab-border]=\"rowHeader.RightBorder\" [class.est-nowrap]=\"!rowHeader.Wrap\" [Order]=\"rowHeader.Order\" [Resizable]=\"ColumnsResizable\" [Orderable]=\"rowHeader.Orderable\" [OrderBy]=\"OrderByColumn\" [SearchInProgress]=\"!!researchInProgress\" (onOrderChange)=\"thOrderChanged(rowHeader.ID, $event)\">\r\n <ng-container *ngIf=\"rowHeader.Template\"><ng-container *ngTemplateOutlet=\"rowHeader.Template; context: { $implicit: rowHeader.Multi ? rowHeader.MultiContent : null }\"></ng-container></ng-container>\r\n <span *ngIf=\"!rowHeader.Template\">{{rowHeader.Content}}</span>\r\n </th>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!--Per l'eliminazione mi serve un header aggiuntivo-->\r\n <th *ngIf=\"Removal\" [class.est-right-9]=\"Export || HiddenColumns\" class=\"est-col-min est-sticky-last-column\"><span class=\"fa fa-trash\"></span></th>\r\n\r\n <!--Per l'esportazione mi serve l'header extra da cui faccio uscire i 3 pallocchi-->\r\n <th *ngIf=\"Export || HiddenColumns || ColumnsOrdering || CornerMenuOptions\" class=\"est-table-dotted-menu est-sticky-last-column est-col-min text-sm-center\">\r\n \r\n <!-- Blocco con i 3 pallocchi che tira fuori il context menu delle operazioni -->\r\n <div class=\"btn-group\" container=\"body\" placement=\"bottom right\" dropdown #dropdown=\"bs-dropdown\" [autoClose]=\"true\">\r\n <span dropdownToggle class=\"fa fa-ellipsis-v est-fs-18 est-pointer est-padding-3\"></span>\r\n\r\n <div *dropdownMenu class=\"dropdown-menu dropdown-menu-right est-bring-to-front-strong\">\r\n <div class=\"est-pointer\">\r\n <a class=\"dropdown-item\" *ngIf=\"HiddenColumns || ColumnsOrdering\" (click)=\"columnMetadata_H.resetColumnVisSelection(); changeColumnVisibilityModal.show();\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && CSVExport\" (click)=\"export_H.tryExport('CSV')\">{{'Export View' | localize : lc}} (CSV)</a>\r\n <a class=\"dropdown-item\" *ngIf=\"Export && XLSXExport\" (click)=\"export_H.tryExport('XLSX')\">{{'Export View' | localize : lc}} (XLSX)</a>\r\n <a class=\"dropdown-item\" *ngFor=\"let option of CornerMenuOptions; trackBy: idTrackBy\" (click)=\"cornerActionClicked(option.id)\">{{option.description}}</a>\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody [hidden]=\"BodyHidden || FirstBind\" [class.est-no-selection]=\"RangeSelection\">\r\n <!--Con selection attiva richiamo il template che gestisce il context menu-->\r\n <ng-container *ngIf=\"Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBodySelection; context: { $implicit: { selDisabled: arrayMode ? false : SelectionDisabled, sel: Selection }}\"></ng-container>\r\n </ng-container>\r\n\r\n <!--Senza selection richiamo il template che NON gestisce il context menu-->\r\n <ng-container *ngIf=\"!Selection\">\r\n <ng-container *ngTemplateOutlet=\"TBody\"></ng-container>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n\r\n <div *ngIf=\"PagingStyle == 'both' || PagingStyle == 'bottom'\">\r\n <ng-container *ngTemplateOutlet=\"pagingElement\"></ng-container>\r\n </div>\r\n</div>\r\n\r\n<!-- Template che contiene tutte le info di paginazione in modo da poterlo replicare anche sopra -->\r\n<ng-template #pagingElement>\r\n <ng-container *ngIf=\"!FirstBind\">\r\n <!-- Pulsanti avanti-indietro di paginazione -->\r\n <div *ngIf=\"PagerOptions.ShowPaging && PagerOptions.ShowButtons && (PagerOptions.PagerCount > 10 || PagerOptions.PagerCount == -1)\" class=\"pull-right btn-toolbar\">\r\n <ng-container *ngIf=\"PagerOptions.View?.pagingavailable || viewMode\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: addToPage.bind(this), GTP: goToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"arrayMode && UseArrayModePaging && !SearchView\">\r\n <ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { Margin: true, ATP: arrayAddToPage.bind(this), GTP: arrayGoToPage.bind(this), Array: arrayPulsanti }}\"></ng-container>\r\n </ng-container>\r\n </div>\r\n <!-- Paginatore dove appare la count e le opzioni di paginazione -->\r\n <div class=\"pull-right\" *ngIf=\"PagerOptions.ShowCount || PagerOptions.ShowPagingOptions\">\r\n <div class=\"est-mt-min-5\" *ngIf=\"PagerOptions.ShowPaging\">\r\n <app-paging *ngIf=\"!PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [WarnOnAll]=\"false\" [CurrentPageSize]=\"ArraymodeItemsPerPage\" (pagingSelected)=\"items_H.refreshPaging($event)\"></app-paging>\r\n <app-paging *ngIf=\"PagerOptions.UsesView\" [CountLabel]=\"CountLabel\" [ShowPaging]=\"PagerOptions.ShowPagingOptions\" [ShowCount]=\"PagerOptions.ShowCount\" [PagerCount]=\"PagerOptions.PagerCount\" [GroupMode]=\"PagerOptions.Searches == 'groups'\" [AllSearch]=\"AllSearch\" [View]=\"PagerOptions.View\" (pagingSelected)=\"onItemsPerPageChanged($event);\"></app-paging>\r\n </div>\r\n </div>\r\n <div class=\"clearfix\"></div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Template che contiene i pulsanti per cambiare pagina -->\r\n<ng-template #pagingButtons let-options>\r\n <div class=\"est-flex\" [class.est-margin-left-50]=\"options.Margin\">\r\n <a class=\"btn\" class=\"est-page-prev app-pointer\" (click)=\"options.ATP(-1, options.separator)\"><span class=\"fa fa-chevron-left\"></span></a>\r\n <div *ngIf=\"options.Array\" class=\"est-inline\"><a *ngFor=\"let p of options.Array; trackBy: valTrackBy\" class=\"btn est-page-sel {{p.cssClass}}\" (click)=\"options.GTP(p.val, options.separator)\">{{p.val}}</a></div>\r\n <a class=\"btn\" class=\"est-page-next app-pointer\" (click)=\"options.ATP(1, options.separator)\"><span class=\"fa fa-chevron-right\"></span></a>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Questi due template rappresentano effettivamente il body della tabella. essendo il tr l'unica cosa che davvero cambia, il resto \u00E8 templatizzato -->\r\n<ng-template #TBodySelection let-templateOptions>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even; let i=index; trackBy: bodyTrackBy\">\r\n <tr *ngIf=\"item._visible || (!Hierarchy && !ArrayGrouping)\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\" \r\n [class.est-pointer]=\"!item.locked\" \r\n [class.est-white-selected]=\"item._selected && !item.locked\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n [contextMenu]=\"!item.locked ? (ContextMenu || emptyMenu) : emptyMenu\" [contextMenuSubject]=\"item\"\r\n (click)=\"!RangeSelection && handleRowClick($event, item, true)\"\r\n (contextmenu)=\"onRightClick();\">\r\n\r\n <td *ngIf=\"!item.locked && !item._sep && !HasPinnedColumns\">\r\n <input type=\"checkbox\" \r\n [disabled]=\"templateOptions.selDisabled\" \r\n [class.est-pointer]=\"!item.locked\"\r\n [(ngModel)]=\"item._selected\" name=\"check{{i}}\" \r\n (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td *ngIf=\"(item.locked || item._sep) && !HasPinnedColumns\"></td>\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container> </ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item, templateOptions: templateOptions }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #TBody>\r\n <ng-container *ngFor=\"let item of boundSource; let even = even; trackBy: bodyTrackBy\">\r\n <tr *ngIf=\"item._visible || !Hierarchy\" \r\n [class]=\"item._rowClass ? item._rowClass : ''\" \r\n [class.est-line-through]=\"item.removed || item.deleted\"\r\n [class.est-rg]=\"item._group\"\r\n [class.est-rg-sep]=\"item._sep\"\r\n (click)=\"handleRowClick($event, item, false)\">\r\n\r\n <ng-container *ngIf=\"item._sep\"><ng-container *ngTemplateOutlet=\"groupPager; context: { $implicit: item }\"></ng-container></ng-container>\r\n\r\n <ng-container *ngIf=\"!item._sep\">\r\n <ng-container *ngTemplateOutlet=\"basicColumns; context: { $implicit: item }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"customCells; context: { $implicit: item }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"bodyDeleteAndExport; context: { $implicit: { even: even, item: item }}\"></ng-container>\r\n </tr>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #groupPager let-item>\r\n <td class=\"est-pinned-body \" *ngIf=\"HasPinnedColumns\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border est-cell-group-padding\"></div>\r\n </td>\r\n <td *ngIf=\"item._grouplevel > 1\" [attr.colspan]=\"item._grouplevel-1\"></td>\r\n <td [attr.colspan]=\"Columns.VisibleUnpinned - (item._grouplevel > 0 ? item._grouplevel - 1 : 0)\">\r\n <div class=\"est-rg-sep-flex-right\" *ngIf=\"RowGroupingPagingStyle == 'right'\">\r\n <div class=\"est-rg-page\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n <div class=\"est-rg-ipp\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><app-paging [CountLabel]=\"CountLabel\" [AllSearch]=\"AllSearch\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n </div>\r\n\r\n <div class=\"est-rg-sep-flex-left\" *ngIf=\"RowGroupingPagingStyle == 'left'\">\r\n <div class=\"est-rg-ipp\"><app-paging [AllSearch]=\"AllSearch\" [CountLabel]=\"CountLabel\" [GroupMode]=\"item.searches == 'groups'\" [PagerCount]=\"item.searches == 'groups' ? item.view.groupcount : item.view.objectcount\" [View]=\"item.view\" (pagingSelected)=\"onGroupItemsPerPageChanged(item, $event);\"></app-paging></div>\r\n <div class=\"est-rg-page\" *ngIf=\"(item.searches == 'groups' ? item.view.groupcount : item.view.objectcount) > 10\"><ng-container *ngTemplateOutlet=\"pagingButtons; context: { $implicit: { separator: item, ATP: addToPageGroup.bind(this), GTP: goToPageGroup.bind(this), Array: item.buttons }}\"></ng-container></div>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Questo template contiene la print condizionale su tabelle semplici, con header e body scritti a manazza -->\r\n<ng-template #basicColumns let-item>\r\n <ng-container *ngIf=\"(!UseCustomCells || EmptyRowTds) && !DynamicRowColumnsDefinition\">\r\n <ng-container *ngTemplateOutlet=\"bodyRef; context : {$implicit: item}\"></ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEditor let-ctx>\r\n <!-- Un po' triste ma questo \u00E8 il metodo pi\u00F9 semplice per gestire il cambio di modello -->\r\n <ng-container *ngIf=\"ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item.properties[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n <ng-container *ngIf=\"!ctx.item.properties\">\r\n <form-adaptive [FormLayout]=\"false\" [Validation]=\"false\" [Options]=\"ctx.definition.EditorOptions\" [FocusSubject]=\"FocusSubject\" [(ngModel)]=\"ctx.item[ctx.definition.PropertyName]\" name=\"{{ ctx.definition.PropertyName + '_' + ctx.item._hash }}\" [Type]=\"ctx.definition.PropertyType\" [Source]=\"ctx.definition.PropertySource\" (inputFinalized)=\"ctx.finalizer()\"></form-adaptive>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #defaultEsTd let-ctx>\r\n <!-- TODO: Formattare il valore in base a valType.type -->\r\n <ng-container *ngIf=\"ctx.type == 'enum'\">\r\n {{ (ctx.value | est_lookup : ctx.definition.PropertySource).description }}\r\n </ng-container>\r\n <ng-container *ngIf=\"ctx.type != 'enum'\">\r\n {{ctx.value}}\r\n </ng-container>\r\n</ng-template>\r\n\r\n<ng-template #customCells let-item let-opt=\"templateOptions\">\r\n <ng-container *ngIf=\"UseCustomCells && !EmptyRowTds\">\r\n <!-- Cella che aggrega tutte le colonne che devono essere pinnate -->\r\n <td *ngIf=\"HasPinnedColumns\" class=\"est-pinned-body est-col-min\" [class.est-white-selected]=\"item._selected\">\r\n <div [style.width.px]=\"PinnedContainerWidth\" class=\"est-pinned-border\">\r\n <td *ngIf=\"!item.locked && !item._sep && Selection\" class=\"est-no-border est-col-min\" [style.width.px]=\"20\">\r\n <input type=\"checkbox\" [disabled]=\"opt.selDisabled\" [class.est-pointer]=\"!item.locked\" [(ngModel)]=\"item._selected\" name=\"check{{item._hash}}\" (click)=\"$event.stopPropagation(); handleClick($event, item);\">\r\n </td>\r\n <td class=\"est-no-border est-col-min\" *ngIf=\"(item.locked || item._sep) && Selection\" [style.width.px]=\"20\"></td>\r\n\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index; trackBy: IDTrackBy\">\r\n <ng-container *ngIf=\"rowItem.Pinned\">\r\n <ng-container *ngTemplateOutlet=\"customTd; context: { $implicit: { item: item, rowItem : rowItem, i:i, Pinned: true } };\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </td>\r\n\r\n <!-- Eventuali operazioni custom nelle prime righe... hanno senso solo in modalit\u00E0 dinamica ma non si sa mai -->\r\n <ng-container *ngTemplateOutlet=\"customOperations; context: {$implicit: item };\"></ng-container>\r\n\r\n <!-- Body effettivo della riga -->\r\n <ng-container *ngFor=\"let rowItem of RowTDs[item._hash]; let i = index; trackBy: IDTrackBy\">\r\n <ng-container *ngIf=\"!rowItem.Pinned\">\r\n <ng-container *ngTemplateOutlet=\"customTd; context: {$implicit: {item: item, rowItem : rowItem, i:i, Pinned: false} };\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Blocco di operazioni custom da far apparire all'inizio della tabella -->\r\n<ng-template #customOperations let-item>\r\n <ng-container *ngFor=\"let operation of DynamicOperations; let first = first; let last = last; trackBy: idTrackBy\">\r\n <ng-container *ngIf=\"!operation.conditionField || ((item.properties ? item.properties[operation.conditionField] : item[operation.conditionField]) == operation.conditionValue)\">\r\n <td [class.est-no-right-padding]=\"last\" [class.est-no-left-padding]=\"!first\" class=\"est-col-min\"><span title=\"{{operation.title}}\" class=\"{{operation.iconClass}} est-pointer\" (click)=\"dynamicOperation(item, operation.id)\">{{operation.text}}</span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"operation.conditionField && ((item.properties ? item.properties[operation.conditionField] : item[operation.conditionField]) != operation.conditionValue)\">\r\n <td class=\"est-col-min est-no-side-padding\"></td>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>\r\n\r\n<!-- Cella customizzata, elemento grafico base per la tabella -->\r\n<ng-template #customTd let-ctx>\r\n <!-----------------------------------------------------------------------------------------------------------------------\r\n - ATTENZIONE: Gli spazi fra le propriet\u00E0 di questo mega td sono significativi e dividono la dichiarazione in sezioni: -\r\n - . Generiche -\r\n - . Gestione allineamento e colori per la modalit\u00E0 report -\r\n - . Gestioni grafiche particolari per il Pinned -\r\n - . Gestione della selezione a singola cella in assenza di pinned -\r\n - . Gestione click classico -\r\n ------------------------------------------------------------------------------------------------------------------------->\r\n\r\n <!-- class=\"{{ UserDefinedDynamicCols ? ctx.rowItem.Class : 'est-nowrap'}} est-default-row-height\" -->\r\n\r\n <td *ngIf=\"ctx.rowItem?.Visible\" \r\n es-td=\"{{ctx.rowItem.Property || ctx.rowItem.ID}}\"\r\n id=\"estd_{{ctx.rowItem.Property || ctx.rowItem.ID}}_{{ctx.item._ordinal}}_{{ctx.i}}\" \r\n class=\"{{ ctx.rowItem.Class }} est-default-row-height\" \r\n [Context]=\"ctx.item._hash\" \r\n [class.est-no-selection]=\"Editable && ctx.rowItem.PropertyName\" \r\n [class.est-rg-hdr]=\"ctx.rowItem.GroupHeader\" \r\n [class.est-rg-agg]=\"ctx.rowItem.GroupAggregation\"\r\n [class.est-nowrap]=\"Hierarchy || !ctx.rowItem.Wraps\"\r\n \r\n [style.text-align]=\" (!ctx.Pinned && ctx.rowItem.Alignment) ? ctx.rowItem.Alignment : null\"\r\n [style.color]=\"(!ctx.Pinned && ctx.item.forecolors && ctx.rowItem.PropAccessor) ? ctx.item.forecolors[ctx.rowItem.PropAccessor] : null\"\r\n [style.background-color]=\"(!ctx.Pinned && ctx.item.backcolors && ctx.rowItem.PropAccessor) ? ctx.item.backcolors[ctx.rowItem.PropAccessor] : null\"\r\n\r\n [style.width.px]=\"ctx.Pinned ? ctx.rowItem.PinnedWidth : null\"\r\n [class.est-no-border]=\"ctx.Pinned\"\r\n\r\n [class.est-ltab-border]=\"ctx.rowItem.LeftBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.lborder\" \r\n [class.est-rtab-border]=\"ctx.rowItem.RightBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.rborder\" \r\n\r\n [class.est-selected-cell]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.selected\"\r\n [class.est-cell-lborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.lborder\"\r\n [class.est-cell-rborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.rborder\"\r\n [class.est-cell-tborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.tborder\"\r\n [class.est-cell-bborder]=\"selectionStatus[ctx.item._ordinal][ctx.i]?.bborder\"\r\n\r\n [class.est-cell-lborder-tmp]=\"!ctx.rowItem.LeftBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.lborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.loverlaps\"\r\n [class.est-cell-rborder-tmp]=\"!ctx.rowItem.RightBorder && !selectionStatus[ctx.item._ordinal][ctx.i]?.rborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.roverlaps\"\r\n [class.est-cell-tborder-tmp]=\"!selectionStatus[ctx.item._ordinal][ctx.i]?.tborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.toverlaps\"\r\n [class.est-cell-bborder-tmp]=\"!selectionStatus[ctx.item._ordinal][ctx.i]?.bborder && !selectionStatus[ctx.item._ordinal][ctx.i]?.boverlaps\"\r\n\r\n (mousedown)=\"mousedown($event, ctx.rowItem, ctx.item)\" \r\n (mouseenter)=\"mouseenter($event)\" \r\n (mouseup)=\"mouseup($event)\"\r\n (onCellGeneration)=\"registerCell($event)\"\r\n \r\n (click)=\"dbClickEditOrSingleClickRowSelection($event, ctx.rowItem, ctx.item)\">\r\n\r\n <div [class.est-edit-hidden]=\"ctx.rowItem._editing\" [class.est-pre]=\"!(Hierarchy && ctx.i == 0)\">\r\n\r\n <ng-container #DEBUG>\r\n <!-- Debug box in caso la roba che viene scritta nelle celle non torni. Scirvere qui i propri binding per controllare cose -->\r\n </ng-container>\r\n\r\n <!-- 90% Template disponibile, quindi derivante da *td, controllo giusto che non sia un field particolare multi -->\r\n <ng-container *ngIf=\"ctx.rowItem.Template\">\r\n <ng-container *ngIf=\"!ctx.rowItem.Multi\"><ng-container *ngTemplateOutlet=\"ctx.rowItem.Template; context: { $implicit: ctx.item }\"></ng-container></ng-container>\r\n <span *ngIf=\"ctx.rowItem.Multi\"><ng-container *ngTemplateOutlet=\"ctx.rowItem.Template; context: { $implicit: (ctx.item[ctx.rowItem.MultiProp] ? ctx.item[ctx.rowItem.MultiProp][ctx.rowItem.MultiIndex] : {}) }\"></ng-container></span>\r\n </ng-container>\r\n \r\n <!-- 8%\r\n Template non disponibile, pu\u00F2 venire da \r\n RoutePath in caso sia un link di una tabella dinamica\r\n PropAccessor in caso di ReportRow (quindi oggetti con \"values\" dentro), \r\n o Renderer se modalit\u00E0 dinamica/standard (in qual caso il renderer \u00E8 il default)\r\n -->\r\n <ng-container *ngIf=\"!ctx.rowItem.Template && !ctx.rowItem.Multi && !ctx.rowItem.Content\">\r\n <a *ngIf=\"ctx.rowItem.RoutePath\" [routerLink]=\"ctx.item | est_routerlink : ctx.rowItem.RoutePath : ctx.rowItem.RouteParameterProperties\" class=\"est-link\" [innerHTML]=\"ctx.item.properties ? ctx.item.properties[ctx.rowItem.PropertyName] : ctx.item[ctx.rowItem.PropertyName]\"></a>\r\n \r\n <span *ngIf=\"ctx.rowItem.PropAccessor\">\r\n {{(ctx.item.values? ctx.item.values[ctx.rowItem.PropAccessor] : ctx.item[ctx.rowItem.PropAccessor]) | est_format: ctx.rowItem.Format }}\r\n </span>\r\n\r\n <ng-container *ngIf=\"!ctx.rowItem.PropAccessor && !ctx.rowItem.RoutePath\">\r\n <ng-container *ngTemplateOutlet=\"ctx.rowItem.PropertyName | est_renderer: { name: ctx.rowItem.RendererName, src: EsTdsDirective, fallback: defaultEsTd }; context: { $implicit: { definition: ctx.rowItem, value: ctx.item.properties ? ctx.item.properties[ctx.rowItem.PropertyName] : ctx.item[ctx.rowItem.PropertyName], type: ctx.rowItem.PropertyType} }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- 1% Se in modalit\u00E0 gerarchica metto il td per navigare la gerarchia -->\r\n <ng-container *ngIf=\"Hierarchy && ctx.i == 0\"><ng-container *ngTemplateOutlet=\"HierarchyNavigator; context: { $implicit: ctx.item }\"></ng-container></ng-container>\r\n\r\n <!-- 1% Content programmatico per le casistiche di Row Grouping ecc... -->\r\n <ng-container *ngIf=\"ctx.rowItem.Content\">\r\n {{ctx.rowItem.Content}}\r\n </ng-container>\r\n </div>\r\n\r\n <div *ngIf=\"ctx.rowItem._editing\" class=\"est-mt-min-5\">\r\n <ng-container *ngTemplateOutlet=\"ctx.rowItem.PropertyName | est_editor: { name: ctx.rowItem.EditorName, src: EsTdEditorDirectives, fallback: defaultEditor}; context: { $implicit: { definition: ctx.rowItem, columnIndex: ctx.i, item: ctx.item, finalizer: finalizeUserEdit.bind(this, ctx.rowItem, ctx.item, ctx.i) } }\"></ng-container>\r\n </div>\r\n </td>\r\n</ng-template>\r\n\r\n<!-- Navigatore della gerarchia di una view gerarchica, con tasto per espandere e collassare -->\r\n<ng-template #HierarchyNavigator let-item>\r\n <span *ngIf=\"!item.parent\" class=\"fa fa-chevron-down\" style=\"visibility:hidden\"></span>\r\n <span *ngIf=\"item.parent && item._expanded\" class=\"fa fa-chevron-down est-pointer est-no-selection\" (click)=\"hierarchyMode_H.collapseParent(item[this.OwnKey])\"></span>\r\n <span *ngIf=\"item.parent && !item._expanded\" class=\"fa fa-chevron-up est-pointer est-no-selection\" (click)=\"hierarchyMode_H.expandParent(item[this.OwnKey])\"></span>\r\n \r\n</ng-template>\r\n\r\n<!-- Pulsanti di eliminazione/undo eliminazione ed esportazione che vanno in fondo ad un record edlla tabella -->\r\n<ng-template #bodyDeleteAndExport let-options>\r\n <ng-container *ngIf=\"Removal && !RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted)\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted)\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n </ng-container>\r\n <ng-container *ngIf=\"Removal && RemovalCondition\">\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-remove est-pointer text-danger\" [hidden]=\"options.item.removable != undefined && !options.item.removable\" (click)=\"onRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"(options.item.removed || options.item.deleted) && options.item[RemovalCondition]\"><span class=\"fa fa-undo text-warning est-pointer\" (click)=\"onAbortRemoval.emit(options.item)\"></span></td>\r\n <td class=\"est-sticky-last-column{{options.even? '-alt' : ''}} {{Export || HiddenColumns || CornerMenuOptions ? 'est-right-9' : ''}}\" *ngIf=\"!options.item[RemovalCondition]\"><span class=\"fa fa-remove est-hidden-view\"></span></td>\r\n </ng-container>\r\n <td *ngIf=\"Export || HiddenColumns || CornerMenuOptions\" class=\"est-sticky-last-column{{options.even && !Hierarchy ? '-alt' : ''}}\"></td>\r\n</ng-template>\r\n\r\n<!-- Context menu vuoto default per tutte le tabella che non ce l'hanno, in modo che al click destro appaia \"nessuna op disponibile\" -->\r\n<context-menu #emptyMenu>\r\n <ng-template contextMenuItem><span><em>{{'No operations available' | localize : lc}}...</em></span></ng-template>\r\n</context-menu>\r\n\r\n<!-- Modal per cambiare posizione e visibilit\u00E0 delle colonne dell'es-table -->\r\n<div bsModal #changeColumnVisibilityModal=\"bs-modal\" class=\"modal fade\" role=\"dialog\" aria-hidden=\"true\">\r\n <div class=\"modal-dialog modal-lg\" cdkDrag>\r\n <div class=\"modal-content\">\r\n <div class=\"modal-header est-pointer\" cdkDragHandle>\r\n <h5 class=\"modal-title pull-left\">\r\n <ng-container *ngIf=\"!HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Order' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && !ColumnsOrdering\">\r\n {{'Columns Visibility' | localize : lc}}\r\n </ng-container>\r\n <ng-container *ngIf=\"HiddenColumns && ColumnsOrdering\">\r\n {{'Columns Visibility and Order' | localize : lc}}\r\n </ng-container>\r\n </h5>\r\n <button type=\"button\" class=\"close pull-right\" (click)=\"changeColumnVisibilityModal.hide();\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"card card-info est-padding-10 est-margin-bottom-0\">\r\n {{'There are no columns configured to be hidden/shown in this view' | localize : lc}}\r\n </div>\r\n <div *ngIf=\"TMPColumnsList && TMPColumnsList.length > 0\" style=\"max-height:500px; overflow-y:auto\">\r\n <!--Aaaaaaah la tristezza... qui mi servirebbe l'es-table per facilitare la selezione multipla ecc... peccato che se la linko qui entro in un loop impressionante-->\r\n <table class=\"table table-striped table-sm est-margin-bottom-0\">\r\n <thead>\r\n <tr>\r\n <th class=\"est-col-min\" *ngIf=\"HiddenColumns\">\r\n <input class=\"est-pointer\" type=\"checkbox\" [(ngModel)]=\"globalColVisCheck\" [ngModelOptions]=\"{'standalone': true}\" (ngModelChange)=\"columnMetadata_H.globalColVisCheckChanged();\">\r\n </th>\r\n <!-- <th class=\"est-col-min\" *ngIf=\"ColumnsOrdering\"></th> -->\r\n <th class=\"est-col-min est-nowrap\">{{'Column Name' | localize : lc}}</th>\r\n <!--Filler-->\r\n <th></th>\r\n <!-- Pinner -->\r\n <th *ngIf=\"DirectivesBased\" class=\"est-col-min\"></th>\r\n </tr>\r\n </thead>\r\n <tbody \r\n cdkDropList \r\n [cdkDropListData]=\"TMPColumnsList\" \r\n (cdkDropListDropped)=\"columnMetadata_H.columnReordered($event)\" \r\n [cdkDropListSortPredicate]=\"columnMetadata_H.sortPredicate.bind(this.columnMetadata_H)\"\r\n class=\"est-dropbox\">\r\n\r\n <tr *ngFor=\"let item of TMPColumnsList; let i = index; let last = last; trackBy: idTrackBy\" \r\n class=\"est-pointer est-droplist\" \r\n [class.est-white-selected]=\"lastSelectedItemID == item.id\" \r\n [class.est-no-selection]=\"!item.visible\"\r\n cdkDrag\r\n [cdkDragData]=\"item\"\r\n [cdkDragDisabled]=\"!ColumnsOrdering || item.fixed || item.pinned\">\r\n\r\n <td *ngIf=\"HiddenColumns\">\r\n <input type=\"checkbox\" [class.est-hidden-view]=\"item.fixed\" class=\"est-pointer\" [(ngModel)]=\"item.visible\" name=\"visible{{i}}\" (ngModelChange)=\"columnMetadata_H.updateGlobalColVisCheck();\" />\r\n </td>\r\n <td class=\"est-nowrap drag-visible\" (click)=\"columnMetadata_H.columnClicked(item);\">\r\n <ng-container *ngIf=\"item.template\">\r\n <!-- Padri -->\r\n <span *ngIf=\"item.parentTemplates && item.parentTemplates.length > 0\" class=\"est-fw-bold est-fs-13\">\r\n ( \r\n <ng-container *ngFor=\"let parent of item.parentTemplates; let last=last; trackBy: idTrackBy\">\r\n <ng-container *ngIf=\"parent.tmpl\"><ng-container *ngTemplateOutlet=\"parent.tmpl\"></ng-container></ng-container>\r\n <ng-container *ngIf=\"parent.content\">{{parent.content}}</ng-container>\r\n <span *ngIf=\"!last\"> - </span>\r\n </ng-container>\r\n )\r\n </span>\r\n <!-- Template header originale -->\r\n <ng-container *ngTemplateOutlet=\"item.template; context: { $implicit: item.multi ? item.multiContent : null }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!item.template\">{{item.description}}</ng-container>\r\n </td>\r\n <!--Filler-->\r\n <td (click)=\"columnMetadata_H.columnClicked(item);\"></td>\r\n <!-- Pinner -->\r\n <td *ngIf=\"DirectivesBased && ColumnsPinnable\"><span *ngIf=\"!item.fixed && item.pinnable\" class=\"fa fa-thumb-tack\" [class.text-success]=\"item.pinned\" (click)=\"columnMetadata_H.pinOrUnpinColumn(item)\"></span></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary est-margin-right-10\" (click)=\"lastSelectedItemID = null; changeColumnVisibilityModal.hide();\">{{'Close' | localize : lc}}</button>\r\n <button type=\"button\" [disabled]=\"!TMPColumnsList || TMPColumnsList.length == 0\" class=\"btn btn-primary\" (click)=\"columnMetadata_H.confirmColumnVisibilitySelection() && changeColumnVisibilityModal.hide()\">{{'Confirm' | localize : lc}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>",
|
|
5053
|
+
styles: [".est-loading-box{height:200px;text-align:center;position:relative;background:#ccc}.est-loading-content{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:35px}.est-scrollable{max-height:600px;overflow:auto}.est-head-resizer{top:0;right:0;bottom:0;width:7px;position:absolute;cursor:col-resize}.est-head-resizer-internal{top:0;right:0;left:6px;bottom:0;width:1px;position:absolute;background-color:#ccc;height:100%}.est-pointer{cursor:pointer}.est-high-density td,.est-high-density th{padding:0 .2rem}.est-default-row-height{height:31px}.est-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.est-edit-hidden{height:1px!important}.est-edit-hidden,.est-hidden-view{visibility:hidden}.est-no-border{border:none!important}.est-nowrap{white-space:nowrap}.est-mt-min-5{margin-top:-5px}.est-white-selected{background-color:#ddd!important}.est-line-through{text-decoration:line-through}.est-no-side-padding{padding-left:0;padding-right:0}.est-no-left-padding,.est-no-right-padding{padding-left:0}.est-col-min{width:1px}.est-margin-bottom-0{margin-bottom:0!important}.est-margin-right-10{margin-right:10px!important}.est-right-9{right:9px!important}.est-table-dotted-menu{padding:0 0 2px!important;color:#999}.est-fs-18{font-size:18px}.est-fs-13,.est-fs-14{font-size:14px}.est-fw-bold{font-weight:700}.est-padding-3{padding:3px!important}.est-page-container{position:relative}.est-bring-to-front-strong{z-index:99999999!important}.est-switch{position:relative;display:inline-block;width:30px;height:17px;margin-bottom:0;margin-right:5px;margin-left:5px}.est-switch input{display:none}.est-slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc}.est-slider,.est-slider:before{position:absolute;transition:.4s}.est-slider:before{content:\"\";height:13px;width:13px;left:3px;bottom:2px;background-color:#fff}input:checked+.est-slider{background-color:#2196f3}input:focus+.est-slider{box-shadow:0 0 1px #2196f3}input:checked+.est-slider:before{transform:translateX(11px)}.est-slider.round{border-radius:10px}.est-slider.round:before{border-radius:50%}.est-custom-input{width:30px;display:inline;padding:1px;height:20px}.est-row-lvl-1 td:first-child{padding-left:5px}.est-row-lvl-2 td:first-child{padding-left:20px}.est-row-lvl-3 td:first-child{padding-left:35px}.est-row-lvl-4 td:first-child{padding-left:50px}.est-row-lvl-5 td:first-child{padding-left:65px}.est-row-lvl-6 td:first-child{padding-left:80px}.est-row-lvl-7 td:first-child{padding-left:95px}.est-row-lvl-8 td:first-child{padding-left:110px}.est-row-lvl-9 td:first-child{padding-left:125px}.est-row-lvl-10 td:first-child{padding-left:140px}.est-row-lvl-11 td:first-child{padding-left:155px}.est-row-lvl-12 td:first-child{padding-left:170px}.est-row-lvl-13 td:first-child{padding-left:185px}.est-row-lvl-14 td:first-child{padding-left:200px}.est-row-lvl-15 td:first-child{padding-left:215px}.est-row-lvl-16 td:first-child{padding-left:230px}.est-row-lvl-17 td:first-child{padding-left:245px}.est-row-lvl-18 td:first-child{padding-left:260px}.est-row-lvl-19 td:first-child{padding-left:275px}.est-row-lvl-20 td:first-child{padding-left:290px}.est-row-lvl-21 td:first-child{padding-left:305px}.est-row-lvl-22 td:first-child{padding-left:320px}.est-row-lvl-23 td:first-child{padding-left:335px}.est-row-lvl-24 td:first-child{padding-left:350px}.est-row-lvl-25 td:first-child{padding-left:365px}.est-row-lvl-26 td:first-child{padding-left:380px}.est-row-lvl-27 td:first-child{padding-left:395px}.est-row-lvl-28 td:first-child{padding-left:410px}.est-row-lvl-29 td:first-child{padding-left:425px}.est-row-lvl-30 td:first-child{padding-left:440px}.est-row-lvl-31 td:first-child{padding-left:455px}.est-row-lvl-32 td:first-child{padding-left:470px}.est-row-lvl-33 td:first-child{padding-left:485px}.est-row-lvl-34 td:first-child{padding-left:500px}.est-row-lvl-35 td:first-child{padding-left:515px}.est-row-lvl-36 td:first-child{padding-left:530px}.est-row-lvl-37 td:first-child{padding-left:545px}.est-row-lvl-38 td:first-child{padding-left:560px}.est-row-lvl-39 td:first-child{padding-left:575px}.est-row-lvl-40 td:first-child{padding-left:590px}.est-row-lvl-41 td:first-child{padding-left:605px}.est-row-lvl-42 td:first-child{padding-left:620px}.est-row-lvl-43 td:first-child{padding-left:635px}.est-row-lvl-44 td:first-child{padding-left:650px}.est-row-lvl-45 td:first-child{padding-left:665px}.est-row-lvl-46 td:first-child{padding-left:680px}.est-row-lvl-47 td:first-child{padding-left:695px}.est-row-lvl-48 td:first-child{padding-left:710px}.est-row-lvl-49 td:first-child{padding-left:725px}.est-row-lvl-50 td:first-child{padding-left:740px}.est-row-lvl-51 td:first-child{padding-left:755px}.est-row-lvl-52 td:first-child{padding-left:770px}.est-row-lvl-53 td:first-child{padding-left:785px}.est-row-lvl-54 td:first-child{padding-left:800px}.est-row-lvl-55 td:first-child{padding-left:815px}.est-row-lvl-56 td:first-child{padding-left:830px}.est-row-lvl-57 td:first-child{padding-left:845px}.est-row-lvl-58 td:first-child{padding-left:860px}.est-row-lvl-59 td:first-child{padding-left:875px}.est-row-lvl-60 td:first-child{padding-left:890px}.est-row-lvl-61 td:first-child{padding-left:905px}.est-row-lvl-62 td:first-child{padding-left:920px}.est-row-lvl-63 td:first-child{padding-left:935px}.est-row-lvl-64 td:first-child{padding-left:950px}.est-row-lvl-65 td:first-child{padding-left:965px}.est-row-lvl-66 td:first-child{padding-left:980px}.est-row-lvl-67 td:first-child{padding-left:995px}.est-row-lvl-68 td:first-child{padding-left:1010px}.est-row-lvl-69 td:first-child{padding-left:1025px}.est-row-lvl-70 td:first-child{padding-left:1040px}.est-row-lvl-71 td:first-child{padding-left:1055px}.est-row-lvl-72 td:first-child{padding-left:1070px}.est-row-lvl-73 td:first-child{padding-left:1085px}.est-row-lvl-74 td:first-child{padding-left:1100px}.est-row-lvl-75 td:first-child{padding-left:1115px}.est-row-lvl-76 td:first-child{padding-left:1130px}.est-row-lvl-77 td:first-child{padding-left:1145px}.est-row-lvl-78 td:first-child{padding-left:1160px}.est-row-lvl-79 td:first-child{padding-left:1175px}.est-row-lvl-80 td:first-child{padding-left:1190px}.est-row-lvl-81 td:first-child{padding-left:1205px}.est-row-lvl-82 td:first-child{padding-left:1220px}.est-row-lvl-83 td:first-child{padding-left:1235px}.est-row-lvl-84 td:first-child{padding-left:1250px}.est-row-lvl-85 td:first-child{padding-left:1265px}.est-row-lvl-86 td:first-child{padding-left:1280px}.est-row-lvl-87 td:first-child{padding-left:1295px}.est-row-lvl-88 td:first-child{padding-left:1310px}.est-row-lvl-89 td:first-child{padding-left:1325px}.est-row-lvl-90 td:first-child{padding-left:1340px}.est-row-lvl-91 td:first-child{padding-left:1355px}.est-row-lvl-92 td:first-child{padding-left:1370px}.est-row-lvl-93 td:first-child{padding-left:1385px}.est-row-lvl-94 td:first-child{padding-left:1400px}.est-row-lvl-95 td:first-child{padding-left:1415px}.est-row-lvl-96 td:first-child{padding-left:1430px}.est-row-lvl-97 td:first-child{padding-left:1445px}.est-row-lvl-98 td:first-child{padding-left:1460px}.est-row-lvl-99 td:first-child{padding-left:1475px}.est-relative{position:relative}.est-top-pager{position:absolute;right:0;top:5px}.est-top-allselect{position:absolute;left:0;top:5px;font-weight:700}.est-padding-10{padding:10px!important}.est-margin-right-50{margin-right:50px}.est-margin-left-50{margin-left:50px}.est-quick-unpin{color:#000;margin-left:8px;font-size:14px;transform:rotate(45deg)}.est-full-height{height:100%}.est-page-sel{color:#000;margin-left:3px;margin-right:3px;padding:0 5px;font-size:inherit;border:none;border-radius:15px}.est-page-next,.est-page-prev{color:#000;font-size:inherit;padding:2px 0 0}.est-pinned-header{background-color:#fff;left:0;top:0;position:-webkit-sticky;position:sticky;z-index:1;border-bottom:1px solid #dee2e6!important;padding:0!important}.est-simple-border-bottom{border-bottom:1px solid #dee2e6}.est-pinned-internal-header{border-top:0;border-bottom:0 solid #dee2e6}.est-pinned-border{border-right:2px solid #dee2e6!important}.est-cell-padding{padding:.3rem}.est-pinned-body{background-color:#fff;left:0;position:-webkit-sticky;position:sticky;z-index:1;border-top:1px solid #dee2e6!important;padding:0!important}.est-inline{display:inline!important}.est-inline-block{display:inline-block!important}.est-link{color:#0275d8!important;cursor:pointer;text-decoration:none;display:block}.est-link:hover{color:#23527c!important;cursor:pointer;text-decoration:underline!important}.est-sticky-last-column{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#fff}.est-sticky-last-column-alt{right:-1px;position:-webkit-sticky;position:sticky;z-index:0;background-color:#f2f2f2}.est-ltab-border{border-left:1px solid #bbb!important}.est-rtab-border{border-right:1px solid #bbb!important}.est-cell-group-padding{padding:calc(.3rem + 1px);position:absolute;top:0;left:0;height:100%;width:100%}.est-selected-cell{background-color:rgba(33,150,243,.2)}.est-cell-lborder{border-left:1.02px solid #2196f3!important}.est-cell-tborder{border-top:1.02px solid #2196f3!important}.est-cell-rborder{border-right:1.02px solid #2196f3!important}.est-cell-bborder{border-bottom:1.02px solid #2196f3!important}.est-cell-lborder-tmp{border-left:1.02px solid transparent!important}.est-cell-tborder-tmp{border-top:1.02px solid transparent!important}.est-cell-rborder-tmp{border-right:1.02px solid transparent!important}.est-cell-bborder-tmp{border-bottom:1.02px solid transparent!important}.est-margin-bottom-10{margin-bottom:10px}.est-text-center{text-align:center}.est-flex{display:flex}.est-rg-sep-flex-right{display:flex;flex-direction:row-reverse;width:100%;margin:-5px}.est-rg-sep-flex-left{display:flex;flex-direction:row;width:100%;margin:-5px}.est-rg-hdr{font-weight:700}.est-rg-agg{font-style:italic}.est-rg{background-color:hsla(0,0%,46.7%,.4666666666666667)!important}.est-rg-sep{font-size:12px;padding-right:20px!important;background-color:hsla(0,0%,73.3%,.7333333333333333)!important}.est-rg-ipp{text-align:left;display:inline-flex;margin-right:25px}.est-rg-page{text-align:right;display:inline-flex;font-size:inherit;padding-top:5px}.est-droplist.cdk-drag-placeholder{opacity:0}.est-droplist.cdk-drag-preview{z-index:999999999!important;opacity:1;box-sizing:border-box;border-radius:4px;background-color:#fff;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.est-droplist.cdk-drag-preview td:not(.drag-visible){visibility:hidden}.est-droplist.cdk-drag-preview td.drag-visible{padding-top:3px}.est-droplist.cdk-drag-animating,.est-droplist.cdk-drop-list-dragging .est-dropbox:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.est-pre{white-space:pre}.est val-datetime .mat-form-field-appearance-outline .mat-form-field-infix input{margin-bottom:3px!important;min-width:130px!important}.est .mat-form-field-flex{height:29px!important;padding:0!important}.est .mat-form-field-flex .mat-form-field-outline{color:#00f}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-start{border-left:none;border-top:none;border-radius:0}.est .mat-form-field-flex .mat-form-field-outline .mat-form-field-outline-end{border-top:none;border-radius:0;border-right:none}.est .mat-form-field-wrapper{height:20px;min-height:20px!important;margin-top:0!important}.est .mat-form-field-infix{width:100%!important;min-width:50px!important}.est .mat-form-field-infix select.mat-input-element{margin-top:-5px!important}.est .mat-datepicker-input{margin-bottom:3px!important}.est input{height:20px;padding-top:0!important}"]
|
|
4936
5054
|
},] }
|
|
4937
5055
|
];
|
|
4938
5056
|
EsTableComponent.ctorParameters = () => [
|
|
@@ -4948,7 +5066,8 @@ EsTableComponent.ctorParameters = () => [
|
|
|
4948
5066
|
{ type: DateService },
|
|
4949
5067
|
{ type: MessageService },
|
|
4950
5068
|
{ type: CopyPasteDetector },
|
|
4951
|
-
{ type: ClipboardService }
|
|
5069
|
+
{ type: ClipboardService },
|
|
5070
|
+
{ type: Logger }
|
|
4952
5071
|
];
|
|
4953
5072
|
EsTableComponent.propDecorators = {
|
|
4954
5073
|
EsTdEditorDirectives: [{ type: ContentChildren, args: [EsTdEditorDirective,] }],
|
|
@@ -4967,7 +5086,6 @@ EsTableComponent.propDecorators = {
|
|
|
4967
5086
|
Height: [{ type: Input }],
|
|
4968
5087
|
EmptySpaceBackgroundColor: [{ type: Input }],
|
|
4969
5088
|
EsTableHandledSearch: [{ type: Input }],
|
|
4970
|
-
UseCustomCells: [{ type: Input }],
|
|
4971
5089
|
MaxHeight: [{ type: Input }],
|
|
4972
5090
|
ContainerClass: [{ type: Input }],
|
|
4973
5091
|
XLSXExport: [{ type: Input }],
|
|
@@ -5185,7 +5303,7 @@ class EsTh {
|
|
|
5185
5303
|
EsTh.decorators = [
|
|
5186
5304
|
{ type: Component, args: [{
|
|
5187
5305
|
selector: "[es-th]",
|
|
5188
|
-
template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span> \r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
|
|
5306
|
+
template: "<span (click)=\"setupNextOrderAndNotify()\" [class.app-no-selection]=\"!!ID && Orderable\" [class.app-pointer]=\"!!ID && Orderable\">\r\n <span #content>\r\n <ng-container *ngIf=\"!!Template\">\r\n <ng-container *ngTemplateOutlet=\"Template\"></ng-container>\r\n </ng-container>\r\n <ng-content *ngIf=\"!Template\"></ng-content>\r\n </span> \r\n <span class=\"fa\" [class.fa-chevron-down]=\"Order == 'DESC'\" [class.fa-chevron-up]=\"Order == 'ASC'\"></span>\r\n</span>\r\n<span *ngIf=\"Pinned && !Fixed\" class=\"app-pointer fa fa-thumb-tack est-quick-unpin\" (click)=\"unpin()\"></span>\r\n<div [hidden]=\"!Resizable || Fixed || Pinned\" class=\"est-head-resizer\" (mousedown)=\"onResizeStart($event)\">\r\n <div class=\"est-head-resizer-internal\"></div>\r\n</div>",
|
|
5189
5307
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
5190
5308
|
},] }
|
|
5191
5309
|
];
|
|
@@ -5213,59 +5331,26 @@ EsTh.propDecorators = {
|
|
|
5213
5331
|
onMouseMove: [{ type: HostListener, args: ['window:mousemove.out-zone', ['$event'],] }]
|
|
5214
5332
|
};
|
|
5215
5333
|
|
|
5216
|
-
//Angular
|
|
5334
|
+
// Angular
|
|
5217
5335
|
/** Componente rappresentante una singola cella del body della tabella */
|
|
5218
5336
|
class EsTd {
|
|
5219
5337
|
/** @ignore */
|
|
5220
|
-
constructor(cdr
|
|
5338
|
+
constructor(cdr) {
|
|
5221
5339
|
this.cdr = cdr;
|
|
5222
|
-
this.myself = myself;
|
|
5223
|
-
this.renderer = renderer;
|
|
5224
|
-
this.sanitizer = sanitizer;
|
|
5225
5340
|
/** Id della cella, dev'essere lo stesso della colonna **EsTh** relativa */
|
|
5226
5341
|
this.ID = "";
|
|
5227
|
-
/** Valore da mostrare all'interno della cella. Se omesso verrà proiettato il contenuto dal template in cui è stata usata */
|
|
5228
|
-
this.Display = null;
|
|
5229
|
-
/** Template Angular da istanziare per questo TD */
|
|
5230
|
-
this.Template = null;
|
|
5231
5342
|
/** Quando questa cella viene generata questo evento permette di dire "ehi, sono nato!" */
|
|
5232
5343
|
this.onCellGeneration = new EventEmitter();
|
|
5233
|
-
|
|
5344
|
+
/** Errore attualmente presente sulla cella */
|
|
5234
5345
|
this.ValidationError = "";
|
|
5235
5346
|
}
|
|
5236
|
-
/**
|
|
5237
|
-
* Imposta la visibilità o meno della cella, si traduce nell'applicazione o rimozione della classe **app-display-none**
|
|
5238
|
-
*
|
|
5239
|
-
* @param {boolean} expression Indicazione della visibilità
|
|
5240
|
-
*/
|
|
5241
|
-
set Visible(expression) {
|
|
5242
|
-
this._Visible = expression;
|
|
5243
|
-
if (expression)
|
|
5244
|
-
this.renderer.removeClass(this.myself.nativeElement, "app-display-none");
|
|
5245
|
-
else
|
|
5246
|
-
this.renderer.addClass(this.myself.nativeElement, "app-display-none");
|
|
5247
|
-
}
|
|
5248
|
-
/**
|
|
5249
|
-
* Restituisce lo stato di Visibilità della cella in oggetto
|
|
5250
|
-
*
|
|
5251
|
-
* @returns {boolean} **true** se visibile, **false** altrimenti
|
|
5252
|
-
*/
|
|
5253
|
-
get Visible() {
|
|
5254
|
-
if (this._Visible == undefined)
|
|
5255
|
-
this._Visible = true;
|
|
5256
|
-
return this._Visible;
|
|
5257
|
-
}
|
|
5258
5347
|
/** @ignore */
|
|
5259
5348
|
ngAfterViewInit() {
|
|
5260
5349
|
this.onCellGeneration.emit({ id: this.ID, hash: this.Context, self: this });
|
|
5261
|
-
// Se è Internal significa che è gestita internamente da ES-TABLE quindi evito di fare sti due passaggi di lettura del DOM
|
|
5262
|
-
if (this.Internal)
|
|
5263
|
-
return;
|
|
5264
|
-
this.Content = this.Display === null || this.Display === "" ? this.sanitizer.bypassSecurityTrustHtml(this.myself.nativeElement.innerHTML) : this.sanitizer.bypassSecurityTrustHtml(this.Display);
|
|
5265
|
-
this.Class = this.myself.nativeElement.className.replace("app-display-none", "");
|
|
5266
5350
|
}
|
|
5267
|
-
|
|
5268
|
-
|
|
5351
|
+
/** Api per impostare un "errore" su questa cella in maniera programmatica */
|
|
5352
|
+
validationError(error) {
|
|
5353
|
+
this.ValidationError = error;
|
|
5269
5354
|
this.cdr.markForCheck();
|
|
5270
5355
|
}
|
|
5271
5356
|
}
|
|
@@ -5278,20 +5363,12 @@ EsTd.decorators = [
|
|
|
5278
5363
|
},] }
|
|
5279
5364
|
];
|
|
5280
5365
|
EsTd.ctorParameters = () => [
|
|
5281
|
-
{ type: ChangeDetectorRef }
|
|
5282
|
-
{ type: ElementRef },
|
|
5283
|
-
{ type: Renderer2 },
|
|
5284
|
-
{ type: DomSanitizer }
|
|
5366
|
+
{ type: ChangeDetectorRef }
|
|
5285
5367
|
];
|
|
5286
5368
|
EsTd.propDecorators = {
|
|
5287
5369
|
ID: [{ type: Input, args: ['es-td',] }],
|
|
5288
|
-
Internal: [{ type: Input }],
|
|
5289
|
-
RouterLink: [{ type: Input }],
|
|
5290
|
-
Display: [{ type: Input }],
|
|
5291
|
-
Template: [{ type: Input }],
|
|
5292
5370
|
Context: [{ type: Input }],
|
|
5293
|
-
onCellGeneration: [{ type: Output }]
|
|
5294
|
-
Visible: [{ type: Input }]
|
|
5371
|
+
onCellGeneration: [{ type: Output }]
|
|
5295
5372
|
};
|
|
5296
5373
|
|
|
5297
5374
|
// Angular
|
|
@@ -5349,12 +5426,148 @@ EstLookupPipe.decorators = [
|
|
|
5349
5426
|
{ type: Pipe, args: [{ name: 'est_lookup' },] }
|
|
5350
5427
|
];
|
|
5351
5428
|
|
|
5429
|
+
class EstRouterLinkPipe {
|
|
5430
|
+
constructor() {
|
|
5431
|
+
/** Cache per i routerLink generati nelle tabelle dinamiche */
|
|
5432
|
+
this.routerLinksCache = {};
|
|
5433
|
+
}
|
|
5434
|
+
transform(item, path, parameters) {
|
|
5435
|
+
if (this.routerLinksCache[item._hash + path]) {
|
|
5436
|
+
return this.routerLinksCache[item._hash + path];
|
|
5437
|
+
}
|
|
5438
|
+
else {
|
|
5439
|
+
let link = this.getRouterLink(path, parameters, item);
|
|
5440
|
+
this.routerLinksCache[item._hash + path] = link;
|
|
5441
|
+
return link;
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5444
|
+
/**
|
|
5445
|
+
* Crea un router link
|
|
5446
|
+
*
|
|
5447
|
+
* @param {string} path Path su cui navigare con eventuali parametri riferiti all'oggetto cotnestuale come {0}, {1}, ecc...
|
|
5448
|
+
* @param {string[]} pars Lista posizionale delle proprietà a cui bindare i riferimenti del parametro **path**
|
|
5449
|
+
* Es. Il valore dela proprietà all'indice 0 di questo array verrà sostituita al valore {0} del parametro **path**
|
|
5450
|
+
* @param {any} item Oggetto collegato a questo contesto. Può essere un oggetto generico (con "properties") o un oggetto ben definito
|
|
5451
|
+
*
|
|
5452
|
+
* @returns {any} Router link generato in base al parametri
|
|
5453
|
+
*/
|
|
5454
|
+
getRouterLink(path, pars, item) {
|
|
5455
|
+
for (let i = 0; i < pars.length; i++)
|
|
5456
|
+
path = path.replace('{' + i + '}', item.properties ? item.properties[pars[i]] : item[pars[i]]);
|
|
5457
|
+
path = path.replace(/'/g, '"').replace(/ /g, '');
|
|
5458
|
+
return JSON.parse(path);
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
EstRouterLinkPipe.decorators = [
|
|
5462
|
+
{ type: Pipe, args: [{ name: 'est_routerlink' },] }
|
|
5463
|
+
];
|
|
5464
|
+
|
|
5465
|
+
// Angular
|
|
5466
|
+
class EstRendererPipe {
|
|
5467
|
+
constructor(logger) {
|
|
5468
|
+
this.logger = logger;
|
|
5469
|
+
}
|
|
5470
|
+
transform(propName, params) {
|
|
5471
|
+
var EsTd = null;
|
|
5472
|
+
// Perf. Version di `params.src.find((item) => params.name ? item.td === params.name : item.tdForProperty === propName);`
|
|
5473
|
+
for (let i = 0; i < params.src.length; i++) {
|
|
5474
|
+
let item = params.src.get(i);
|
|
5475
|
+
if (params.name && item.td === params.name ||
|
|
5476
|
+
!params.name && item.tdForProperty === propName) {
|
|
5477
|
+
EsTd = item;
|
|
5478
|
+
break;
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
// Name non trovato, fallback al nome della colonna
|
|
5482
|
+
if (propName && params.name && !EsTd) {
|
|
5483
|
+
this.logger.log(`Renderer retrieved in a non performant way`);
|
|
5484
|
+
EsTd = params.src.find((item) => item.tdForProperty === propName);
|
|
5485
|
+
}
|
|
5486
|
+
this.logger.log(`Renderer ${EsTd ? 'found' : 'NOT found'} for '${propName}${params.name ? '/' + params.name : ''}'${!EsTd ? '. Using fallback renderer' : ''}`);
|
|
5487
|
+
var ret = EsTd ? EsTd.Template : params.fallback;
|
|
5488
|
+
return ret;
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5491
|
+
EstRendererPipe.decorators = [
|
|
5492
|
+
{ type: Pipe, args: [{ name: 'est_renderer' },] }
|
|
5493
|
+
];
|
|
5494
|
+
EstRendererPipe.ctorParameters = () => [
|
|
5495
|
+
{ type: Logger }
|
|
5496
|
+
];
|
|
5497
|
+
|
|
5498
|
+
// Angular
|
|
5499
|
+
class EstEditorPipe {
|
|
5500
|
+
constructor(logger) {
|
|
5501
|
+
this.logger = logger;
|
|
5502
|
+
}
|
|
5503
|
+
transform(propName, params) {
|
|
5504
|
+
var Editor = null;
|
|
5505
|
+
// Perf. Version di `params.src.find((item) => params.name ? item.editor === params.name : item.editorForProperty === propName);`
|
|
5506
|
+
for (let i = 0; i < params.src.length; i++) {
|
|
5507
|
+
let item = params.src.get(i);
|
|
5508
|
+
if (params.name && item.editor === params.name ||
|
|
5509
|
+
!params.name && item.editorForProperty === propName) {
|
|
5510
|
+
Editor = item;
|
|
5511
|
+
break;
|
|
5512
|
+
}
|
|
5513
|
+
}
|
|
5514
|
+
// Name non trovato, fallback al nome della colonna
|
|
5515
|
+
if (propName && params.name && !Editor) {
|
|
5516
|
+
this.logger.log(`Editor retrieved in a non performant way`);
|
|
5517
|
+
Editor = params.src.find((item) => item.editorForProperty === propName);
|
|
5518
|
+
}
|
|
5519
|
+
this.logger.log(`Editor ${Editor ? 'found' : 'NOT found'} for '${propName}${params.name ? '/' + params.name : ''}'${!Editor ? '. Using fallback editor' : ''}`);
|
|
5520
|
+
var ret = Editor ? Editor.Template : params.fallback;
|
|
5521
|
+
return ret;
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
EstEditorPipe.decorators = [
|
|
5525
|
+
{ type: Pipe, args: [{ name: 'est_editor' },] }
|
|
5526
|
+
];
|
|
5527
|
+
EstEditorPipe.ctorParameters = () => [
|
|
5528
|
+
{ type: Logger }
|
|
5529
|
+
];
|
|
5530
|
+
|
|
5531
|
+
const MODULES = [
|
|
5532
|
+
CommonModule,
|
|
5533
|
+
FormsModule,
|
|
5534
|
+
RouterModule,
|
|
5535
|
+
LocalizationModule,
|
|
5536
|
+
ModalModule,
|
|
5537
|
+
BsDropdownModule,
|
|
5538
|
+
ContextMenuModule,
|
|
5539
|
+
MatSelectModule,
|
|
5540
|
+
MatInputModule,
|
|
5541
|
+
MatTooltipModule,
|
|
5542
|
+
DragDropModule,
|
|
5543
|
+
FormsAndValidationsModule
|
|
5544
|
+
];
|
|
5545
|
+
const PUBLIC_ELEMENTS = [
|
|
5546
|
+
// Direttive
|
|
5547
|
+
EsTdDirective,
|
|
5548
|
+
EsThDirective,
|
|
5549
|
+
EsTdEditorDirective,
|
|
5550
|
+
// Componenti
|
|
5551
|
+
EsTableComponent,
|
|
5552
|
+
TablePagerComponent,
|
|
5553
|
+
EsTableTemplate
|
|
5554
|
+
];
|
|
5555
|
+
const PRIVATE_ELEMENTS = [
|
|
5556
|
+
// Componenti
|
|
5557
|
+
EsTh,
|
|
5558
|
+
EsTd,
|
|
5559
|
+
// Pipes
|
|
5560
|
+
EstFormatPipe,
|
|
5561
|
+
EstLookupPipe,
|
|
5562
|
+
EstRouterLinkPipe,
|
|
5563
|
+
EstRendererPipe,
|
|
5564
|
+
EstEditorPipe
|
|
5565
|
+
];
|
|
5352
5566
|
class EsTableModule {
|
|
5353
5567
|
static forRoot(config) {
|
|
5354
5568
|
return {
|
|
5355
5569
|
ngModule: EsTableModule,
|
|
5356
5570
|
providers: [
|
|
5357
|
-
CopyPasteDetector,
|
|
5358
5571
|
{ provide: EST_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.locale) || 'it-IT' },
|
|
5359
5572
|
{ provide: EST_DEBUG, useValue: (config === null || config === void 0 ? void 0 : config.debugMode) || false },
|
|
5360
5573
|
{ provide: EST_DEFAULTS, useValue: (config === null || config === void 0 ? void 0 : config.defaults) || null },
|
|
@@ -5364,23 +5577,10 @@ class EsTableModule {
|
|
|
5364
5577
|
}
|
|
5365
5578
|
EsTableModule.decorators = [
|
|
5366
5579
|
{ type: NgModule, args: [{
|
|
5367
|
-
imports: [
|
|
5368
|
-
|
|
5369
|
-
FormsModule,
|
|
5370
|
-
RouterModule,
|
|
5371
|
-
LocalizationModule,
|
|
5372
|
-
ModalModule,
|
|
5373
|
-
BsDropdownModule,
|
|
5374
|
-
ContextMenuModule,
|
|
5375
|
-
MatSelectModule,
|
|
5376
|
-
MatInputModule,
|
|
5377
|
-
MatTooltipModule,
|
|
5378
|
-
DragDropModule,
|
|
5379
|
-
FormsAndValidationsModule
|
|
5380
|
-
],
|
|
5381
|
-
declarations: [EsTh, EsTd, EsTableComponent, EsTdDirective, EsThDirective, EsTdEditorDirective, TablePagerComponent, EsTableTemplate, EstFormatPipe, EstLookupPipe],
|
|
5580
|
+
imports: [MODULES],
|
|
5581
|
+
declarations: [...PUBLIC_ELEMENTS, ...PRIVATE_ELEMENTS],
|
|
5382
5582
|
providers: [UtilityService, ExportService, HashingService, MessageService],
|
|
5383
|
-
exports: [
|
|
5583
|
+
exports: [...PUBLIC_ELEMENTS]
|
|
5384
5584
|
},] }
|
|
5385
5585
|
];
|
|
5386
5586
|
|
|
@@ -5466,5 +5666,5 @@ class ItemPropEditableReference {
|
|
|
5466
5666
|
* Generated bundle index. Do not edit.
|
|
5467
5667
|
*/
|
|
5468
5668
|
|
|
5469
|
-
export { AppOrdering, AppSearch, CornerMenuOption, EsTableColumnsDefinition, EsTableComponent, EsTableDefaultable, EsTableModelChange, EsTableModule, EsTableModuleConfig, EsTableMultiValue, EsTableOperationDefinition, EsTableTemplate, EsTdDirective, EsTdEditorDirective, EsTdReference, EsThDirective, GenericItem, Group, GroupAggregation, GroupFilter, GroupOrAggregation, ItemPropEditableReference, ItemsSelection, ReportColumn, ReportParam, ReportRow, TablePagerComponent, TablePagerLoc as ɵa, EST_LOCALE as ɵb, EST_DEBUG as ɵc, EST_DEFAULTS as ɵd, EsTableLoc as ɵe, UtilitiesHandler as ɵf, CopyPasteDetector as ɵg,
|
|
5669
|
+
export { AppOrdering, AppSearch, CornerMenuOption, EsTableColumnsDefinition, EsTableComponent, EsTableDefaultable, EsTableModelChange, EsTableModule, EsTableModuleConfig, EsTableMultiValue, EsTableOperationDefinition, EsTableTemplate, EsTdDirective, EsTdEditorDirective, EsTdReference, EsThDirective, GenericItem, Group, GroupAggregation, GroupFilter, GroupOrAggregation, ItemPropEditableReference, ItemsSelection, ReportColumn, ReportParam, ReportRow, TablePagerComponent, TablePagerLoc as ɵa, EST_LOCALE as ɵb, EST_DEBUG as ɵc, EST_DEFAULTS as ɵd, EsTableLoc as ɵe, UtilitiesHandler as ɵf, CopyPasteDetector as ɵg, Logger as ɵh, EsTh as ɵi, EsTd as ɵj, EstFormatPipe as ɵk, EstLookupPipe as ɵl, EstRouterLinkPipe as ɵm, EstRendererPipe as ɵn, EstEditorPipe as ɵo };
|
|
5470
5670
|
//# sourceMappingURL=esfaenza-es-table.js.map
|