@esfaenza/es-table 20.3.18 → 20.3.19
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.
|
@@ -6214,10 +6214,14 @@ class EsTable2PagerComponent {
|
|
|
6214
6214
|
</label>
|
|
6215
6215
|
|
|
6216
6216
|
<div class="est2-pager__nav" *ngIf="showButtons() && pages() > 1">
|
|
6217
|
-
<button type="button" class="est2-pager__btn"
|
|
6217
|
+
<button type="button" class="est2-pager__btn est2-pager__btn--nav"
|
|
6218
6218
|
[disabled]="page()! <= 1"
|
|
6219
6219
|
(click)="goto(page()! - 1)"
|
|
6220
|
-
aria-label="Pagina precedente"
|
|
6220
|
+
aria-label="Pagina precedente">
|
|
6221
|
+
<svg class="est2-pager__chev" viewBox="0 0 24 24" aria-hidden="true">
|
|
6222
|
+
<path d="M15 5l-7 7 7 7" />
|
|
6223
|
+
</svg>
|
|
6224
|
+
</button>
|
|
6221
6225
|
|
|
6222
6226
|
@for (p of visiblePages(); track p.key) {
|
|
6223
6227
|
@if (p.page === -1) {
|
|
@@ -6230,13 +6234,17 @@ class EsTable2PagerComponent {
|
|
|
6230
6234
|
}
|
|
6231
6235
|
}
|
|
6232
6236
|
|
|
6233
|
-
<button type="button" class="est2-pager__btn"
|
|
6237
|
+
<button type="button" class="est2-pager__btn est2-pager__btn--nav"
|
|
6234
6238
|
[disabled]="page()! >= pages()"
|
|
6235
6239
|
(click)="goto(page()! + 1)"
|
|
6236
|
-
aria-label="Pagina successiva"
|
|
6240
|
+
aria-label="Pagina successiva">
|
|
6241
|
+
<svg class="est2-pager__chev" viewBox="0 0 24 24" aria-hidden="true">
|
|
6242
|
+
<path d="M9 5l7 7-7 7" />
|
|
6243
|
+
</svg>
|
|
6244
|
+
</button>
|
|
6237
6245
|
</div>
|
|
6238
6246
|
</div>
|
|
6239
|
-
`, isInline: true, styles: [".est2-pager{--est-ctrl-h: 30px;display:flex;align-items:center;gap:12px;padding:10px 4px 2px;font-size:var(--est-fs
|
|
6247
|
+
`, isInline: true, styles: [".est2-pager{--est-ctrl-h: 30px;display:flex;align-items:center;gap:12px;padding:10px 4px 2px;font-size:var(--est-fs);color:var(--est-fg-muted);flex-wrap:wrap;line-height:1}.est2-pager__spacer{flex:1 1 auto}.est2-pager__count{display:inline-flex;align-items:center;height:var(--est-ctrl-h)}.est2-pager__count strong{color:var(--est-fg);font-weight:600;margin-left:6px}.est2-pager__ipp{display:inline-flex;align-items:center;height:var(--est-ctrl-h);margin:0;gap:6px}.est2-pager__select{font:inherit;height:var(--est-ctrl-h);color:var(--est-fg);background:var(--est-bg);border:1px solid var(--est-border);border-radius:var(--est-radius-sm);padding:0 8px;cursor:pointer;transition:border-color var(--est-transition)}.est2-pager__select:hover{border-color:var(--est-border-strong)}.est2-pager__select:focus-visible{outline:none;box-shadow:var(--est-ring);border-color:var(--est-accent)}.est2-pager__nav{display:inline-flex;align-items:center;gap:4px}.est2-pager__btn{display:inline-flex;align-items:center;justify-content:center;min-width:var(--est-ctrl-h);height:var(--est-ctrl-h);padding:0 8px;border:1px solid var(--est-border);border-radius:var(--est-radius-sm);background:var(--est-bg);color:var(--est-fg);font:inherit;cursor:pointer;transition:background var(--est-transition),border-color var(--est-transition),color var(--est-transition)}.est2-pager__btn:hover:not(:disabled){background:var(--est-bg-hover);border-color:var(--est-border-strong)}.est2-pager__btn:disabled{opacity:.4;cursor:default}.est2-pager__btn:focus-visible{outline:none;box-shadow:var(--est-ring)}.est2-pager__btn--active{background:var(--est-accent);border-color:var(--est-accent);color:var(--est-accent-fg);font-weight:600}.est2-pager__btn--active:hover:not(:disabled){background:var(--est-accent)}.est2-pager__btn--nav{padding:0}.est2-pager__chev{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;display:block}.est2-pager__ellipsis{color:var(--est-fg-faint);padding:0 2px}\n"], dependencies: [{ kind: "directive", type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6240
6248
|
}
|
|
6241
6249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.28", ngImport: i0, type: EsTable2PagerComponent, decorators: [{
|
|
6242
6250
|
type: Component,
|
|
@@ -6260,10 +6268,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.28", ngImpo
|
|
|
6260
6268
|
</label>
|
|
6261
6269
|
|
|
6262
6270
|
<div class="est2-pager__nav" *ngIf="showButtons() && pages() > 1">
|
|
6263
|
-
<button type="button" class="est2-pager__btn"
|
|
6271
|
+
<button type="button" class="est2-pager__btn est2-pager__btn--nav"
|
|
6264
6272
|
[disabled]="page()! <= 1"
|
|
6265
6273
|
(click)="goto(page()! - 1)"
|
|
6266
|
-
aria-label="Pagina precedente"
|
|
6274
|
+
aria-label="Pagina precedente">
|
|
6275
|
+
<svg class="est2-pager__chev" viewBox="0 0 24 24" aria-hidden="true">
|
|
6276
|
+
<path d="M15 5l-7 7 7 7" />
|
|
6277
|
+
</svg>
|
|
6278
|
+
</button>
|
|
6267
6279
|
|
|
6268
6280
|
@for (p of visiblePages(); track p.key) {
|
|
6269
6281
|
@if (p.page === -1) {
|
|
@@ -6276,13 +6288,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.28", ngImpo
|
|
|
6276
6288
|
}
|
|
6277
6289
|
}
|
|
6278
6290
|
|
|
6279
|
-
<button type="button" class="est2-pager__btn"
|
|
6291
|
+
<button type="button" class="est2-pager__btn est2-pager__btn--nav"
|
|
6280
6292
|
[disabled]="page()! >= pages()"
|
|
6281
6293
|
(click)="goto(page()! + 1)"
|
|
6282
|
-
aria-label="Pagina successiva"
|
|
6294
|
+
aria-label="Pagina successiva">
|
|
6295
|
+
<svg class="est2-pager__chev" viewBox="0 0 24 24" aria-hidden="true">
|
|
6296
|
+
<path d="M9 5l7 7-7 7" />
|
|
6297
|
+
</svg>
|
|
6298
|
+
</button>
|
|
6283
6299
|
</div>
|
|
6284
6300
|
</div>
|
|
6285
|
-
`, styles: [".est2-pager{--est-ctrl-h: 30px;display:flex;align-items:center;gap:12px;padding:10px 4px 2px;font-size:var(--est-fs
|
|
6301
|
+
`, styles: [".est2-pager{--est-ctrl-h: 30px;display:flex;align-items:center;gap:12px;padding:10px 4px 2px;font-size:var(--est-fs);color:var(--est-fg-muted);flex-wrap:wrap;line-height:1}.est2-pager__spacer{flex:1 1 auto}.est2-pager__count{display:inline-flex;align-items:center;height:var(--est-ctrl-h)}.est2-pager__count strong{color:var(--est-fg);font-weight:600;margin-left:6px}.est2-pager__ipp{display:inline-flex;align-items:center;height:var(--est-ctrl-h);margin:0;gap:6px}.est2-pager__select{font:inherit;height:var(--est-ctrl-h);color:var(--est-fg);background:var(--est-bg);border:1px solid var(--est-border);border-radius:var(--est-radius-sm);padding:0 8px;cursor:pointer;transition:border-color var(--est-transition)}.est2-pager__select:hover{border-color:var(--est-border-strong)}.est2-pager__select:focus-visible{outline:none;box-shadow:var(--est-ring);border-color:var(--est-accent)}.est2-pager__nav{display:inline-flex;align-items:center;gap:4px}.est2-pager__btn{display:inline-flex;align-items:center;justify-content:center;min-width:var(--est-ctrl-h);height:var(--est-ctrl-h);padding:0 8px;border:1px solid var(--est-border);border-radius:var(--est-radius-sm);background:var(--est-bg);color:var(--est-fg);font:inherit;cursor:pointer;transition:background var(--est-transition),border-color var(--est-transition),color var(--est-transition)}.est2-pager__btn:hover:not(:disabled){background:var(--est-bg-hover);border-color:var(--est-border-strong)}.est2-pager__btn:disabled{opacity:.4;cursor:default}.est2-pager__btn:focus-visible{outline:none;box-shadow:var(--est-ring)}.est2-pager__btn--active{background:var(--est-accent);border-color:var(--est-accent);color:var(--est-accent-fg);font-weight:600}.est2-pager__btn--active:hover:not(:disabled){background:var(--est-accent)}.est2-pager__btn--nav{padding:0}.est2-pager__chev{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.25;stroke-linecap:round;stroke-linejoin:round;display:block}.est2-pager__ellipsis{color:var(--est-fg-faint);padding:0 2px}\n"] }]
|
|
6286
6302
|
}], propDecorators: { page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }], pages: [{ type: i0.Input, args: [{ isSignal: true, alias: "pages", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], itemsPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPage", required: false }] }], countLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "countLabel", required: false }] }], showCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCount", required: false }] }], showButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtons", required: false }] }], showPagingOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagingOptions", required: false }] }], allowAll: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowAll", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], itemsPerPageChange: [{ type: i0.Output, args: ["itemsPerPageChange"] }] } });
|
|
6287
6303
|
|
|
6288
6304
|
// Angular
|
|
@@ -7458,6 +7474,15 @@ class EsTable2Component {
|
|
|
7458
7474
|
const sel = this.currentSelection();
|
|
7459
7475
|
const shift = !!event?.shiftKey;
|
|
7460
7476
|
const ctrl = !!(event?.ctrlKey || event?.metaKey);
|
|
7477
|
+
// In modalità "tutto selezionato" (selectEverything → sel.all), un Ctrl+click
|
|
7478
|
+
// NON deve azzerare la selezione: deve solo togliere/rimettere la singola riga
|
|
7479
|
+
// dalle esclusioni, mantenendo sel.all. `toggleRow` gestisce già esattamente
|
|
7480
|
+
// questo caso (come fa la checkbox). Senza questo ramo, il reset di sel.all/
|
|
7481
|
+
// exclusions in coda a questa funzione collasserebbe la selezione a 0.
|
|
7482
|
+
if (sel.all && ctrl && !shift) {
|
|
7483
|
+
this.toggleRow(item);
|
|
7484
|
+
return;
|
|
7485
|
+
}
|
|
7461
7486
|
if (shift && this.selectionAnchor != null && rows.indexOf(this.selectionAnchor) >= 0) {
|
|
7462
7487
|
const a = rows.indexOf(this.selectionAnchor);
|
|
7463
7488
|
const b = rows.indexOf(item);
|
|
@@ -8201,7 +8226,15 @@ class EsTable2Component {
|
|
|
8201
8226
|
// `pinned` è un'estensione retro-compatibile: se assente (prefs vecchie/originali)
|
|
8202
8227
|
// resta il pin di default delle direttive.
|
|
8203
8228
|
const pinned = Array.isArray(prefs.pinned) ? prefs.pinned.filter(id => currentIds.has(id)) : undefined;
|
|
8204
|
-
|
|
8229
|
+
// Nascondo SOLO le colonne che le preferenze conoscevano davvero (presenti
|
|
8230
|
+
// nell'ordinamento o nell'elenco visibili) ma non marcate come visibili.
|
|
8231
|
+
// Una colonna del tutto assente dalle prefs è NUOVA (aggiunta dopo il
|
|
8232
|
+
// salvataggio): resta visibile — `setColumns` la accoda in fondo. Diversamente
|
|
8233
|
+
// dall'originale (che nascondeva ogni colonna non salvata), così gli utenti non
|
|
8234
|
+
// "perdono" le colonne aggiunte a una tabella con preferenze già memorizzate.
|
|
8235
|
+
const knownToPrefs = new Set([...order, ...visible]);
|
|
8236
|
+
const hidden = [...currentIds].filter(id => knownToPrefs.has(id) && !visible.includes(id));
|
|
8237
|
+
this.columnPrefs = { order, hidden, pinned };
|
|
8205
8238
|
this.setColumns(this.columns());
|
|
8206
8239
|
if (prefs.orders?.length) {
|
|
8207
8240
|
this.orders.set([...prefs.orders]);
|