@virusis/angular-ui 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/virusis-angular-ui.mjs +656 -595
- package/fesm2022/virusis-angular-ui.mjs.map +1 -1
- package/index.d.ts +35 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1555,49 +1555,93 @@ class VpBreadcrumbComponent {
|
|
|
1555
1555
|
this.trail = [];
|
|
1556
1556
|
this.navLabel = 'Kırıntı izi';
|
|
1557
1557
|
}
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
}
|
|
1575
|
-
</ol>
|
|
1576
|
-
</nav>
|
|
1558
|
+
/**
|
|
1559
|
+
* Uzun etiket sinirini asinca kisaltiliyor.
|
|
1560
|
+
*
|
|
1561
|
+
* 🔴 Sozlesme `page-anatomy.md` §14'te yazili: 24 karakter + tek karakterlik
|
|
1562
|
+
* ucnokta, tam ad `title` icinde. Kisaltmadan birakmak dar ekranda izin
|
|
1563
|
+
* satirini kirar ve kirinti ana navigasyonun onune gecerdi.
|
|
1564
|
+
*
|
|
1565
|
+
* ⚠️ Kesme **karakter sayisina** gore; kelime siniri aranmiyor. Kirinti
|
|
1566
|
+
* etiketleri kisa ad, cumle degil; kelimeye gore kesmek bazi adlarda
|
|
1567
|
+
* neredeyse hicbir sey birakmazdi.
|
|
1568
|
+
*/
|
|
1569
|
+
shortLabel(label) {
|
|
1570
|
+
const text = label ?? '';
|
|
1571
|
+
return text.length > VpBreadcrumbComponent.MAX_LABEL
|
|
1572
|
+
? `${text.slice(0, VpBreadcrumbComponent.MAX_LABEL)}…`
|
|
1573
|
+
: text;
|
|
1577
1574
|
}
|
|
1575
|
+
/**
|
|
1576
|
+
* `title` yalniz kisaltilmis etiketlerde veriliyor.
|
|
1577
|
+
*
|
|
1578
|
+
* ⚠️ Kisaltilmamis etikete de `title` koymak, fare uzerine gelince ekrandaki
|
|
1579
|
+
* metnin aynisini tekrarlayan bos bir ipucu gosterirdi.
|
|
1580
|
+
*/
|
|
1581
|
+
fullLabel(label) {
|
|
1582
|
+
const text = label ?? '';
|
|
1583
|
+
return text.length > VpBreadcrumbComponent.MAX_LABEL ? text : null;
|
|
1584
|
+
}
|
|
1585
|
+
static { this.MAX_LABEL = 24; }
|
|
1586
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: VpBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1587
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: VpBreadcrumbComponent, isStandalone: true, selector: "vp-breadcrumb", inputs: { trail: "trail", navLabel: "navLabel" }, ngImport: i0, template: `
|
|
1588
|
+
@if (trail.length > 0) {
|
|
1589
|
+
<nav class="vp-breadcrumb" [attr.aria-label]="navLabel">
|
|
1590
|
+
<ol class="vp-breadcrumb__list">
|
|
1591
|
+
@for (crumb of trail; track crumb.path; let last = $last; let first = $first) {
|
|
1592
|
+
<li class="vp-breadcrumb__item">
|
|
1593
|
+
@if (!first) {
|
|
1594
|
+
<span class="vp-breadcrumb__sep" data-vp-crumb-sep aria-hidden="true">/</span>
|
|
1595
|
+
}
|
|
1596
|
+
@if (last) {
|
|
1597
|
+
<span
|
|
1598
|
+
class="vp-breadcrumb__current"
|
|
1599
|
+
data-vp-crumb
|
|
1600
|
+
aria-current="page"
|
|
1601
|
+
[attr.title]="fullLabel(crumb.label)">{{ shortLabel(crumb.label) }}</span>
|
|
1602
|
+
} @else {
|
|
1603
|
+
<a
|
|
1604
|
+
class="vp-breadcrumb__link"
|
|
1605
|
+
data-vp-crumb
|
|
1606
|
+
[attr.href]="crumb.path"
|
|
1607
|
+
[attr.title]="fullLabel(crumb.label)">{{ shortLabel(crumb.label) }}</a>
|
|
1608
|
+
}
|
|
1609
|
+
</li>
|
|
1610
|
+
}
|
|
1611
|
+
</ol>
|
|
1612
|
+
</nav>
|
|
1613
|
+
}
|
|
1578
1614
|
`, isInline: true, styles: [":host{display:block}.vp-breadcrumb__list{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:var(--vp-space-1);margin:0 0 var(--vp-space-3);padding:0;font-size:var(--vp-text-sm)}.vp-breadcrumb__item{display:flex;align-items:center;gap:var(--vp-space-1);margin:0}.vp-breadcrumb__link{color:var(--vp-text-muted);text-decoration:none}.vp-breadcrumb__link:hover{color:var(--vp-text-primary);text-decoration:underline}.vp-breadcrumb__link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset);border-radius:var(--vp-radius-sm)}.vp-breadcrumb__current{color:var(--vp-text-primary);font-weight:var(--vp-weight-medium)}.vp-breadcrumb__sep{color:var(--vp-text-muted)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1579
1615
|
}
|
|
1580
1616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: VpBreadcrumbComponent, decorators: [{
|
|
1581
1617
|
type: Component,
|
|
1582
|
-
args: [{ selector: 'vp-breadcrumb', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1583
|
-
@if (trail.length > 0) {
|
|
1584
|
-
<nav class="vp-breadcrumb" [attr.aria-label]="navLabel">
|
|
1585
|
-
<ol class="vp-breadcrumb__list">
|
|
1586
|
-
@for (crumb of trail; track crumb.path; let last = $last; let first = $first) {
|
|
1587
|
-
<li class="vp-breadcrumb__item">
|
|
1588
|
-
@if (!first) {
|
|
1589
|
-
<span class="vp-breadcrumb__sep" data-vp-crumb-sep aria-hidden="true">/</span>
|
|
1590
|
-
}
|
|
1591
|
-
@if (last) {
|
|
1592
|
-
<span
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1618
|
+
args: [{ selector: 'vp-breadcrumb', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
1619
|
+
@if (trail.length > 0) {
|
|
1620
|
+
<nav class="vp-breadcrumb" [attr.aria-label]="navLabel">
|
|
1621
|
+
<ol class="vp-breadcrumb__list">
|
|
1622
|
+
@for (crumb of trail; track crumb.path; let last = $last; let first = $first) {
|
|
1623
|
+
<li class="vp-breadcrumb__item">
|
|
1624
|
+
@if (!first) {
|
|
1625
|
+
<span class="vp-breadcrumb__sep" data-vp-crumb-sep aria-hidden="true">/</span>
|
|
1626
|
+
}
|
|
1627
|
+
@if (last) {
|
|
1628
|
+
<span
|
|
1629
|
+
class="vp-breadcrumb__current"
|
|
1630
|
+
data-vp-crumb
|
|
1631
|
+
aria-current="page"
|
|
1632
|
+
[attr.title]="fullLabel(crumb.label)">{{ shortLabel(crumb.label) }}</span>
|
|
1633
|
+
} @else {
|
|
1634
|
+
<a
|
|
1635
|
+
class="vp-breadcrumb__link"
|
|
1636
|
+
data-vp-crumb
|
|
1637
|
+
[attr.href]="crumb.path"
|
|
1638
|
+
[attr.title]="fullLabel(crumb.label)">{{ shortLabel(crumb.label) }}</a>
|
|
1639
|
+
}
|
|
1640
|
+
</li>
|
|
1641
|
+
}
|
|
1642
|
+
</ol>
|
|
1643
|
+
</nav>
|
|
1644
|
+
}
|
|
1601
1645
|
`, styles: [":host{display:block}.vp-breadcrumb__list{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:var(--vp-space-1);margin:0 0 var(--vp-space-3);padding:0;font-size:var(--vp-text-sm)}.vp-breadcrumb__item{display:flex;align-items:center;gap:var(--vp-space-1);margin:0}.vp-breadcrumb__link{color:var(--vp-text-muted);text-decoration:none}.vp-breadcrumb__link:hover{color:var(--vp-text-primary);text-decoration:underline}.vp-breadcrumb__link:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset);border-radius:var(--vp-radius-sm)}.vp-breadcrumb__current{color:var(--vp-text-primary);font-weight:var(--vp-weight-medium)}.vp-breadcrumb__sep{color:var(--vp-text-muted)}\n"] }]
|
|
1602
1646
|
}], propDecorators: { trail: [{
|
|
1603
1647
|
type: Input,
|
|
@@ -3472,6 +3516,23 @@ class VpDataTableComponent {
|
|
|
3472
3516
|
this.sortOrder = 'asc';
|
|
3473
3517
|
this.skeletonRows = [0, 1, 2, 3, 4];
|
|
3474
3518
|
}
|
|
3519
|
+
/**
|
|
3520
|
+
* 🔴 Detay şablonu verilmişse genişletme AÇIKTIR.
|
|
3521
|
+
*
|
|
3522
|
+
* Ölçüldü (2026-08-29, Customer Console): ekran `rowDetail` veriyor,
|
|
3523
|
+
* `expandable` vermiyordu. Üç şablon kapısı da `expandable`'a bakıyordu, yani
|
|
3524
|
+
* detay satırına ulaşmanın yolu hiç çizilmedi — tarama listesinden hiçbir
|
|
3525
|
+
* taramanın detayına gidilemiyordu. Ne derleme ne test düşüyordu; belirti
|
|
3526
|
+
* yalnız ekrandaydı.
|
|
3527
|
+
*
|
|
3528
|
+
* ⚠️ İki girdiyi birbirine bağlamak bir kolaylık değil, **tutarlılık**:
|
|
3529
|
+
* detay şablonu verip genişletmeyi kapalı bırakmak anlamlı bir durum değil.
|
|
3530
|
+
* Tersi anlamlı ve korunuyor — `expandable` tek başına, şablonsuz da çalışır
|
|
3531
|
+
* (bileşen bilgilendirici bir metin basar).
|
|
3532
|
+
*/
|
|
3533
|
+
get canExpand() {
|
|
3534
|
+
return this.expandable || this.rowDetail !== null;
|
|
3535
|
+
}
|
|
3475
3536
|
ngOnInit() {
|
|
3476
3537
|
this.loadPrefs();
|
|
3477
3538
|
if (this.savedViewsKey) {
|
|
@@ -3605,7 +3666,7 @@ class VpDataTableComponent {
|
|
|
3605
3666
|
get columnSpan() {
|
|
3606
3667
|
return (this.visibleCols.length +
|
|
3607
3668
|
(this.selectable ? 1 : 0) +
|
|
3608
|
-
(this.
|
|
3669
|
+
(this.canExpand ? 1 : 0) +
|
|
3609
3670
|
// Aksiyon sutunu da sayilmali; sayilmazsa genisletilmis satir tabloyu bir
|
|
3610
3671
|
// hucre eksik doldurur ve yerlesim kayar.
|
|
3611
3672
|
(this.rowActions ? 1 : 0));
|
|
@@ -3746,566 +3807,566 @@ class VpDataTableComponent {
|
|
|
3746
3807
|
return row[field];
|
|
3747
3808
|
}
|
|
3748
3809
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: VpDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3749
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: VpDataTableComponent, isStandalone: true, selector: "vp-data-table", inputs: { columns: "columns", rows: "rows", total: "total", serverSide: "serverSide", pageSize: "pageSize", loading: "loading", error: "error", hasActiveFilter: "hasActiveFilter", caption: "caption", totalLabel: "totalLabel", loadingLabel: "loadingLabel", emptyLabel: "emptyLabel", emptyFilteredLabel: "emptyFilteredLabel", clearFiltersLabel: "clearFiltersLabel", retryLabel: "retryLabel", pagerLabel: "pagerLabel", prevLabel: "prevLabel", nextLabel: "nextLabel", storageKey: "storageKey", selectable: "selectable", rowKey: "rowKey", bulkActions: "bulkActions", bulkResult: "bulkResult", bulkLabel: "bulkLabel", selectedLabel: "selectedLabel", clearSelectionLabel: "clearSelectionLabel", selectPageLabel: "selectPageLabel", selectRowLabel: "selectRowLabel", confirmPrefix: "confirmPrefix", confirmLabel: "confirmLabel", cancelLabel: "cancelLabel", succeededLabel: "succeededLabel", failedLabel: "failedLabel", expandable: "expandable", rowDetail: "rowDetail", expandLabel: "expandLabel", collapseLabel: "collapseLabel", expandColumnLabel: "expandColumnLabel", noDetailLabel: "noDetailLabel", rowActions: "rowActions", rowActionsHeader: "rowActionsHeader", exportScopes: "exportScopes", exportPageLabel: "exportPageLabel", exportAllLabel: "exportAllLabel", savedViewsKey: "savedViewsKey", viewsLabel: "viewsLabel", viewsPlaceholder: "viewsPlaceholder", saveViewLabel: "saveViewLabel", deleteViewLabel: "deleteViewLabel", askViewName: "askViewName", columnPicker: "columnPicker", columnsLabel: "columnsLabel", moveUpLabel: "moveUpLabel", moveDownLabel: "moveDownLabel" }, outputs: { bulkAction: "bulkAction", exportRequest: "exportRequest", viewApplied: "viewApplied", load: "load", clearFilters: "clearFilters" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3750
|
-
<div class="vp-table">
|
|
3751
|
-
<div class="vp-table__meta">
|
|
3752
|
-
<span class="vp-table__total" data-vp-total>
|
|
3753
|
-
{{ total }} {{ totalLabel }}
|
|
3754
|
-
</span>
|
|
3755
|
-
@if (pageCount > 1) {
|
|
3756
|
-
<span class="vp-table__pageinfo">{{ page }} / {{ pageCount }}</span>
|
|
3757
|
-
}
|
|
3758
|
-
|
|
3759
|
-
@if (savedViewsKey) {
|
|
3760
|
-
<span class="vp-table__views" data-vp-views>
|
|
3761
|
-
<select
|
|
3762
|
-
class="vp-table__cols-btn"
|
|
3763
|
-
data-vp-view-select
|
|
3764
|
-
[attr.aria-label]="viewsLabel"
|
|
3765
|
-
[value]="activeView"
|
|
3766
|
-
(change)="applyView(asSelectValue($event))">
|
|
3767
|
-
<option value="">{{ viewsPlaceholder }}</option>
|
|
3768
|
-
@for (view of savedViews; track view.name) {
|
|
3769
|
-
<option [value]="view.name">{{ view.name }}</option>
|
|
3770
|
-
}
|
|
3771
|
-
</select>
|
|
3772
|
-
|
|
3773
|
-
<button type="button" class="vp-table__cols-btn" data-vp-view-save
|
|
3774
|
-
(click)="saveViewPrompt()">{{ saveViewLabel }}</button>
|
|
3775
|
-
|
|
3776
|
-
@if (activeView) {
|
|
3777
|
-
<button type="button" class="vp-table__cols-btn" data-vp-view-delete
|
|
3778
|
-
(click)="deleteActiveView()">{{ deleteViewLabel }}</button>
|
|
3779
|
-
}
|
|
3780
|
-
</span>
|
|
3781
|
-
}
|
|
3782
|
-
|
|
3783
|
-
@if (exportScopes.length > 0) {
|
|
3784
|
-
@for (scope of exportScopes; track scope) {
|
|
3785
|
-
<button
|
|
3786
|
-
type="button"
|
|
3787
|
-
class="vp-table__cols-btn"
|
|
3788
|
-
[attr.data-vp-export]="scope"
|
|
3789
|
-
(click)="requestExport(scope)">{{ exportLabel(scope) }}</button>
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
|
|
3793
|
-
@if (columnPicker) {
|
|
3794
|
-
<button
|
|
3795
|
-
type="button"
|
|
3796
|
-
class="vp-table__cols-btn"
|
|
3797
|
-
data-vp-cols-toggle
|
|
3798
|
-
[attr.aria-expanded]="pickerOpen"
|
|
3799
|
-
(click)="pickerOpen = !pickerOpen">{{ columnsLabel }}</button>
|
|
3800
|
-
}
|
|
3801
|
-
</div>
|
|
3802
|
-
|
|
3803
|
-
@if (selectable && selectedKeys.size > 0) {
|
|
3804
|
-
<div class="vp-table__bulk" data-vp-bulk role="group" [attr.aria-label]="bulkLabel">
|
|
3805
|
-
<span data-vp-bulk-count>{{ selectedKeys.size }} {{ selectedLabel }}</span>
|
|
3806
|
-
|
|
3807
|
-
<div class="vp-table__bulk-actions">
|
|
3808
|
-
@for (action of bulkActions; track action.code) {
|
|
3809
|
-
<button
|
|
3810
|
-
type="button"
|
|
3811
|
-
[attr.data-vp-bulk-action]="action.code"
|
|
3812
|
-
[class.vp-table__bulk-btn--danger]="action.danger"
|
|
3813
|
-
class="vp-table__bulk-btn"
|
|
3814
|
-
(click)="requestBulkAction(action)">{{ action.label }}</button>
|
|
3815
|
-
}
|
|
3816
|
-
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-clear
|
|
3817
|
-
(click)="clearSelection()">{{ clearSelectionLabel }}</button>
|
|
3818
|
-
</div>
|
|
3819
|
-
</div>
|
|
3820
|
-
|
|
3821
|
-
@if (pendingAction) {
|
|
3822
|
-
<div class="vp-table__bulk-confirm" data-vp-bulk-confirm role="alertdialog"
|
|
3823
|
-
[attr.aria-label]="pendingAction.label">
|
|
3824
|
-
<span>{{ confirmPrefix }} {{ selectedKeys.size }} {{ selectedLabel }} — {{ pendingAction.label }}?</span>
|
|
3825
|
-
<span class="vp-table__bulk-actions">
|
|
3826
|
-
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-cancel
|
|
3827
|
-
(click)="pendingAction = null">{{ cancelLabel }}</button>
|
|
3828
|
-
<button type="button" class="vp-table__bulk-btn vp-table__bulk-btn--danger"
|
|
3829
|
-
data-vp-bulk-confirm-ok (click)="confirmBulkAction()">{{ confirmLabel }}</button>
|
|
3830
|
-
</span>
|
|
3831
|
-
</div>
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
|
|
3835
|
-
@if (bulkResult) {
|
|
3836
|
-
<div class="vp-table__bulk-report" data-vp-bulk-report role="status" aria-live="polite">
|
|
3837
|
-
@if (bulkResult.succeeded.length > 0) {
|
|
3838
|
-
<p data-vp-bulk-ok>{{ bulkResult.succeeded.length }} {{ succeededLabel }}</p>
|
|
3839
|
-
}
|
|
3840
|
-
@if (bulkResult.failed.length > 0) {
|
|
3841
|
-
<p data-vp-bulk-failed>{{ bulkResult.failed.length }} {{ failedLabel }}</p>
|
|
3842
|
-
<ul class="vp-table__bulk-failures">
|
|
3843
|
-
@for (failure of bulkResult.failed; track failure.key) {
|
|
3844
|
-
<li [attr.data-vp-bulk-failure]="failure.key">
|
|
3845
|
-
<code>{{ failure.key }}</code> — {{ failure.reason }}
|
|
3846
|
-
</li>
|
|
3847
|
-
}
|
|
3848
|
-
</ul>
|
|
3849
|
-
}
|
|
3850
|
-
</div>
|
|
3851
|
-
}
|
|
3852
|
-
|
|
3853
|
-
@if (columnPicker && pickerOpen) {
|
|
3854
|
-
<div class="vp-table__cols" data-vp-cols role="group" [attr.aria-label]="columnsLabel">
|
|
3855
|
-
@for (col of orderedColumns; track col.field; let i = $index) {
|
|
3856
|
-
<div class="vp-table__cols-row" [attr.data-vp-cols-row]="col.field">
|
|
3857
|
-
<label class="vp-table__cols-label">
|
|
3858
|
-
<input
|
|
3859
|
-
type="checkbox"
|
|
3860
|
-
[attr.data-vp-col-toggle]="col.field"
|
|
3861
|
-
[checked]="isVisible(col.field)"
|
|
3862
|
-
[disabled]="isVisible(col.field) && visibleCount === 1"
|
|
3863
|
-
(change)="setColumnVisible(col.field, !isVisible(col.field))" />
|
|
3864
|
-
{{ col.header }}
|
|
3865
|
-
</label>
|
|
3866
|
-
<span class="vp-table__cols-move">
|
|
3867
|
-
<button
|
|
3868
|
-
type="button"
|
|
3869
|
-
[attr.data-vp-col-up]="col.field"
|
|
3870
|
-
[attr.aria-label]="moveUpLabel + ': ' + col.header"
|
|
3871
|
-
[disabled]="i === 0"
|
|
3872
|
-
(click)="moveColumn(col.field, -1)">↑</button>
|
|
3873
|
-
<button
|
|
3874
|
-
type="button"
|
|
3875
|
-
[attr.data-vp-col-down]="col.field"
|
|
3876
|
-
[attr.aria-label]="moveDownLabel + ': ' + col.header"
|
|
3877
|
-
[disabled]="i === orderedColumns.length - 1"
|
|
3878
|
-
(click)="moveColumn(col.field, 1)">↓</button>
|
|
3879
|
-
</span>
|
|
3880
|
-
</div>
|
|
3881
|
-
}
|
|
3882
|
-
</div>
|
|
3883
|
-
}
|
|
3884
|
-
|
|
3885
|
-
@if (error) {
|
|
3886
|
-
<div class="vp-table__error" data-vp-table-error role="alert">
|
|
3887
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3888
|
-
<use href="#vp-icon-error"></use>
|
|
3889
|
-
</svg>
|
|
3890
|
-
<p class="vp-table__state-text">{{ error }}</p>
|
|
3891
|
-
<button type="button" class="vp-table__retry" (click)="emitLoad()">{{ retryLabel }}</button>
|
|
3892
|
-
</div>
|
|
3893
|
-
} @else if (loading) {
|
|
3894
|
-
<div class="vp-table__skeleton" data-vp-table-skeleton aria-hidden="true">
|
|
3895
|
-
@for (i of skeletonRows; track i) {
|
|
3896
|
-
<span class="vp-table__skeleton-row"></span>
|
|
3897
|
-
}
|
|
3898
|
-
</div>
|
|
3899
|
-
<span class="vp-visually-hidden" role="status">{{ loadingLabel }}</span>
|
|
3900
|
-
} @else if (rows.length === 0) {
|
|
3901
|
-
@if (hasActiveFilter) {
|
|
3902
|
-
<div class="vp-table__empty" data-vp-table-empty-filtered role="status">
|
|
3903
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3904
|
-
<use href="#vp-icon-filter"></use>
|
|
3905
|
-
</svg>
|
|
3906
|
-
<p class="vp-table__state-text">{{ emptyFilteredLabel }}</p>
|
|
3907
|
-
<button type="button" class="vp-table__retry" (click)="clearFilters.emit()">
|
|
3908
|
-
{{ clearFiltersLabel }}
|
|
3909
|
-
</button>
|
|
3910
|
-
</div>
|
|
3911
|
-
} @else {
|
|
3912
|
-
<div class="vp-table__empty" data-vp-table-empty role="status">
|
|
3913
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3914
|
-
<use href="#vp-icon-empty"></use>
|
|
3915
|
-
</svg>
|
|
3916
|
-
<p class="vp-table__state-text">{{ emptyLabel }}</p>
|
|
3917
|
-
</div>
|
|
3918
|
-
}
|
|
3919
|
-
} @else {
|
|
3920
|
-
<div class="vp-table__scroll">
|
|
3921
|
-
<table class="vp-table__table" [attr.aria-label]="caption">
|
|
3922
|
-
<thead>
|
|
3923
|
-
<tr>
|
|
3924
|
-
@if (
|
|
3925
|
-
<th scope="col" class="vp-table__select-cell">
|
|
3926
|
-
<span class="vp-visually-hidden">{{ expandColumnLabel }}</span>
|
|
3927
|
-
</th>
|
|
3928
|
-
}
|
|
3929
|
-
@if (selectable) {
|
|
3930
|
-
<th scope="col" class="vp-table__select-cell">
|
|
3931
|
-
<input
|
|
3932
|
-
type="checkbox"
|
|
3933
|
-
data-vp-select-page
|
|
3934
|
-
[attr.aria-label]="selectPageLabel"
|
|
3935
|
-
[checked]="allOnPageSelected"
|
|
3936
|
-
[indeterminate]="someOnPageSelected"
|
|
3937
|
-
(change)="togglePageSelection()" />
|
|
3938
|
-
</th>
|
|
3939
|
-
}
|
|
3940
|
-
@for (col of visibleCols; track col.field) {
|
|
3941
|
-
<th
|
|
3942
|
-
scope="col"
|
|
3943
|
-
[attr.data-vp-col]="col.field"
|
|
3944
|
-
[attr.aria-sort]="ariaSort(col)"
|
|
3945
|
-
[style.width]="col.width || null">
|
|
3946
|
-
@if (col.sortable) {
|
|
3947
|
-
<button type="button" class="vp-table__sort" (click)="toggleSort(col.field)">
|
|
3948
|
-
{{ col.header }}
|
|
3949
|
-
<span class="vp-table__sort-icon" aria-hidden="true">{{ sortGlyph(col.field) }}</span>
|
|
3950
|
-
</button>
|
|
3951
|
-
} @else {
|
|
3952
|
-
{{ col.header }}
|
|
3953
|
-
}
|
|
3954
|
-
</th>
|
|
3955
|
-
}
|
|
3956
|
-
@if (rowActions) {
|
|
3957
|
-
<th scope="col" class="vp-table__actions-header">{{ rowActionsHeader }}</th>
|
|
3958
|
-
}
|
|
3959
|
-
</tr>
|
|
3960
|
-
</thead>
|
|
3961
|
-
<tbody>
|
|
3962
|
-
@for (row of rows; track $index) {
|
|
3963
|
-
<tr data-vp-row>
|
|
3964
|
-
@if (
|
|
3965
|
-
<td class="vp-table__select-cell">
|
|
3966
|
-
<button
|
|
3967
|
-
type="button"
|
|
3968
|
-
class="vp-table__expand"
|
|
3969
|
-
[attr.data-vp-expand]="keyOf(row)"
|
|
3970
|
-
[attr.aria-expanded]="isExpanded(row)"
|
|
3971
|
-
[attr.aria-label]="isExpanded(row) ? collapseLabel : expandLabel"
|
|
3972
|
-
(click)="toggleExpanded(row)">{{ isExpanded(row) ? '▾' : '▸' }}</button>
|
|
3973
|
-
</td>
|
|
3974
|
-
}
|
|
3975
|
-
@if (selectable) {
|
|
3976
|
-
<td class="vp-table__select-cell">
|
|
3977
|
-
<input
|
|
3978
|
-
type="checkbox"
|
|
3979
|
-
[attr.data-vp-select-row]="keyOf(row)"
|
|
3980
|
-
[attr.aria-label]="selectRowLabel"
|
|
3981
|
-
[checked]="isSelected(row)"
|
|
3982
|
-
(change)="toggleRow(row)" />
|
|
3983
|
-
</td>
|
|
3984
|
-
}
|
|
3985
|
-
@for (col of visibleCols; track col.field) {
|
|
3986
|
-
<td>{{ cell(row, col.field) }}</td>
|
|
3987
|
-
}
|
|
3988
|
-
@if (rowActions) {
|
|
3989
|
-
<td data-vp-row-actions>
|
|
3990
|
-
<ng-container *ngTemplateOutlet="rowActions; context: { $implicit: row }" />
|
|
3991
|
-
</td>
|
|
3992
|
-
}
|
|
3993
|
-
</tr>
|
|
3994
|
-
|
|
3995
|
-
@if (
|
|
3996
|
-
<tr class="vp-table__detail-row" [attr.data-vp-detail]="keyOf(row)">
|
|
3997
|
-
<td [attr.colspan]="columnSpan">
|
|
3998
|
-
@if (rowDetail) {
|
|
3999
|
-
<ng-container *ngTemplateOutlet="rowDetail; context: { $implicit: row }" />
|
|
4000
|
-
} @else {
|
|
4001
|
-
<span class="vp-table__detail-empty">{{ noDetailLabel }}</span>
|
|
4002
|
-
}
|
|
4003
|
-
</td>
|
|
4004
|
-
</tr>
|
|
4005
|
-
}
|
|
4006
|
-
}
|
|
4007
|
-
</tbody>
|
|
4008
|
-
</table>
|
|
4009
|
-
</div>
|
|
4010
|
-
|
|
4011
|
-
@if (pageCount > 1) {
|
|
4012
|
-
<nav class="vp-table__pager" [attr.aria-label]="pagerLabel">
|
|
4013
|
-
<button
|
|
4014
|
-
type="button"
|
|
4015
|
-
class="vp-table__page-btn"
|
|
4016
|
-
[disabled]="page <= 1"
|
|
4017
|
-
(click)="goToPage(page - 1)">{{ prevLabel }}</button>
|
|
4018
|
-
<button
|
|
4019
|
-
type="button"
|
|
4020
|
-
class="vp-table__page-btn"
|
|
4021
|
-
[disabled]="page >= pageCount"
|
|
4022
|
-
(click)="goToPage(page + 1)">{{ nextLabel }}</button>
|
|
4023
|
-
</nav>
|
|
4024
|
-
}
|
|
4025
|
-
}
|
|
4026
|
-
</div>
|
|
3810
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: VpDataTableComponent, isStandalone: true, selector: "vp-data-table", inputs: { columns: "columns", rows: "rows", total: "total", serverSide: "serverSide", pageSize: "pageSize", loading: "loading", error: "error", hasActiveFilter: "hasActiveFilter", caption: "caption", totalLabel: "totalLabel", loadingLabel: "loadingLabel", emptyLabel: "emptyLabel", emptyFilteredLabel: "emptyFilteredLabel", clearFiltersLabel: "clearFiltersLabel", retryLabel: "retryLabel", pagerLabel: "pagerLabel", prevLabel: "prevLabel", nextLabel: "nextLabel", storageKey: "storageKey", selectable: "selectable", rowKey: "rowKey", bulkActions: "bulkActions", bulkResult: "bulkResult", bulkLabel: "bulkLabel", selectedLabel: "selectedLabel", clearSelectionLabel: "clearSelectionLabel", selectPageLabel: "selectPageLabel", selectRowLabel: "selectRowLabel", confirmPrefix: "confirmPrefix", confirmLabel: "confirmLabel", cancelLabel: "cancelLabel", succeededLabel: "succeededLabel", failedLabel: "failedLabel", expandable: "expandable", rowDetail: "rowDetail", expandLabel: "expandLabel", collapseLabel: "collapseLabel", expandColumnLabel: "expandColumnLabel", noDetailLabel: "noDetailLabel", rowActions: "rowActions", rowActionsHeader: "rowActionsHeader", exportScopes: "exportScopes", exportPageLabel: "exportPageLabel", exportAllLabel: "exportAllLabel", savedViewsKey: "savedViewsKey", viewsLabel: "viewsLabel", viewsPlaceholder: "viewsPlaceholder", saveViewLabel: "saveViewLabel", deleteViewLabel: "deleteViewLabel", askViewName: "askViewName", columnPicker: "columnPicker", columnsLabel: "columnsLabel", moveUpLabel: "moveUpLabel", moveDownLabel: "moveDownLabel" }, outputs: { bulkAction: "bulkAction", exportRequest: "exportRequest", viewApplied: "viewApplied", load: "load", clearFilters: "clearFilters" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3811
|
+
<div class="vp-table">
|
|
3812
|
+
<div class="vp-table__meta">
|
|
3813
|
+
<span class="vp-table__total" data-vp-total>
|
|
3814
|
+
{{ total }} {{ totalLabel }}
|
|
3815
|
+
</span>
|
|
3816
|
+
@if (pageCount > 1) {
|
|
3817
|
+
<span class="vp-table__pageinfo">{{ page }} / {{ pageCount }}</span>
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
@if (savedViewsKey) {
|
|
3821
|
+
<span class="vp-table__views" data-vp-views>
|
|
3822
|
+
<select
|
|
3823
|
+
class="vp-table__cols-btn"
|
|
3824
|
+
data-vp-view-select
|
|
3825
|
+
[attr.aria-label]="viewsLabel"
|
|
3826
|
+
[value]="activeView"
|
|
3827
|
+
(change)="applyView(asSelectValue($event))">
|
|
3828
|
+
<option value="">{{ viewsPlaceholder }}</option>
|
|
3829
|
+
@for (view of savedViews; track view.name) {
|
|
3830
|
+
<option [value]="view.name">{{ view.name }}</option>
|
|
3831
|
+
}
|
|
3832
|
+
</select>
|
|
3833
|
+
|
|
3834
|
+
<button type="button" class="vp-table__cols-btn" data-vp-view-save
|
|
3835
|
+
(click)="saveViewPrompt()">{{ saveViewLabel }}</button>
|
|
3836
|
+
|
|
3837
|
+
@if (activeView) {
|
|
3838
|
+
<button type="button" class="vp-table__cols-btn" data-vp-view-delete
|
|
3839
|
+
(click)="deleteActiveView()">{{ deleteViewLabel }}</button>
|
|
3840
|
+
}
|
|
3841
|
+
</span>
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
@if (exportScopes.length > 0) {
|
|
3845
|
+
@for (scope of exportScopes; track scope) {
|
|
3846
|
+
<button
|
|
3847
|
+
type="button"
|
|
3848
|
+
class="vp-table__cols-btn"
|
|
3849
|
+
[attr.data-vp-export]="scope"
|
|
3850
|
+
(click)="requestExport(scope)">{{ exportLabel(scope) }}</button>
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
|
|
3854
|
+
@if (columnPicker) {
|
|
3855
|
+
<button
|
|
3856
|
+
type="button"
|
|
3857
|
+
class="vp-table__cols-btn"
|
|
3858
|
+
data-vp-cols-toggle
|
|
3859
|
+
[attr.aria-expanded]="pickerOpen"
|
|
3860
|
+
(click)="pickerOpen = !pickerOpen">{{ columnsLabel }}</button>
|
|
3861
|
+
}
|
|
3862
|
+
</div>
|
|
3863
|
+
|
|
3864
|
+
@if (selectable && selectedKeys.size > 0) {
|
|
3865
|
+
<div class="vp-table__bulk" data-vp-bulk role="group" [attr.aria-label]="bulkLabel">
|
|
3866
|
+
<span data-vp-bulk-count>{{ selectedKeys.size }} {{ selectedLabel }}</span>
|
|
3867
|
+
|
|
3868
|
+
<div class="vp-table__bulk-actions">
|
|
3869
|
+
@for (action of bulkActions; track action.code) {
|
|
3870
|
+
<button
|
|
3871
|
+
type="button"
|
|
3872
|
+
[attr.data-vp-bulk-action]="action.code"
|
|
3873
|
+
[class.vp-table__bulk-btn--danger]="action.danger"
|
|
3874
|
+
class="vp-table__bulk-btn"
|
|
3875
|
+
(click)="requestBulkAction(action)">{{ action.label }}</button>
|
|
3876
|
+
}
|
|
3877
|
+
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-clear
|
|
3878
|
+
(click)="clearSelection()">{{ clearSelectionLabel }}</button>
|
|
3879
|
+
</div>
|
|
3880
|
+
</div>
|
|
3881
|
+
|
|
3882
|
+
@if (pendingAction) {
|
|
3883
|
+
<div class="vp-table__bulk-confirm" data-vp-bulk-confirm role="alertdialog"
|
|
3884
|
+
[attr.aria-label]="pendingAction.label">
|
|
3885
|
+
<span>{{ confirmPrefix }} {{ selectedKeys.size }} {{ selectedLabel }} — {{ pendingAction.label }}?</span>
|
|
3886
|
+
<span class="vp-table__bulk-actions">
|
|
3887
|
+
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-cancel
|
|
3888
|
+
(click)="pendingAction = null">{{ cancelLabel }}</button>
|
|
3889
|
+
<button type="button" class="vp-table__bulk-btn vp-table__bulk-btn--danger"
|
|
3890
|
+
data-vp-bulk-confirm-ok (click)="confirmBulkAction()">{{ confirmLabel }}</button>
|
|
3891
|
+
</span>
|
|
3892
|
+
</div>
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
@if (bulkResult) {
|
|
3897
|
+
<div class="vp-table__bulk-report" data-vp-bulk-report role="status" aria-live="polite">
|
|
3898
|
+
@if (bulkResult.succeeded.length > 0) {
|
|
3899
|
+
<p data-vp-bulk-ok>{{ bulkResult.succeeded.length }} {{ succeededLabel }}</p>
|
|
3900
|
+
}
|
|
3901
|
+
@if (bulkResult.failed.length > 0) {
|
|
3902
|
+
<p data-vp-bulk-failed>{{ bulkResult.failed.length }} {{ failedLabel }}</p>
|
|
3903
|
+
<ul class="vp-table__bulk-failures">
|
|
3904
|
+
@for (failure of bulkResult.failed; track failure.key) {
|
|
3905
|
+
<li [attr.data-vp-bulk-failure]="failure.key">
|
|
3906
|
+
<code>{{ failure.key }}</code> — {{ failure.reason }}
|
|
3907
|
+
</li>
|
|
3908
|
+
}
|
|
3909
|
+
</ul>
|
|
3910
|
+
}
|
|
3911
|
+
</div>
|
|
3912
|
+
}
|
|
3913
|
+
|
|
3914
|
+
@if (columnPicker && pickerOpen) {
|
|
3915
|
+
<div class="vp-table__cols" data-vp-cols role="group" [attr.aria-label]="columnsLabel">
|
|
3916
|
+
@for (col of orderedColumns; track col.field; let i = $index) {
|
|
3917
|
+
<div class="vp-table__cols-row" [attr.data-vp-cols-row]="col.field">
|
|
3918
|
+
<label class="vp-table__cols-label">
|
|
3919
|
+
<input
|
|
3920
|
+
type="checkbox"
|
|
3921
|
+
[attr.data-vp-col-toggle]="col.field"
|
|
3922
|
+
[checked]="isVisible(col.field)"
|
|
3923
|
+
[disabled]="isVisible(col.field) && visibleCount === 1"
|
|
3924
|
+
(change)="setColumnVisible(col.field, !isVisible(col.field))" />
|
|
3925
|
+
{{ col.header }}
|
|
3926
|
+
</label>
|
|
3927
|
+
<span class="vp-table__cols-move">
|
|
3928
|
+
<button
|
|
3929
|
+
type="button"
|
|
3930
|
+
[attr.data-vp-col-up]="col.field"
|
|
3931
|
+
[attr.aria-label]="moveUpLabel + ': ' + col.header"
|
|
3932
|
+
[disabled]="i === 0"
|
|
3933
|
+
(click)="moveColumn(col.field, -1)">↑</button>
|
|
3934
|
+
<button
|
|
3935
|
+
type="button"
|
|
3936
|
+
[attr.data-vp-col-down]="col.field"
|
|
3937
|
+
[attr.aria-label]="moveDownLabel + ': ' + col.header"
|
|
3938
|
+
[disabled]="i === orderedColumns.length - 1"
|
|
3939
|
+
(click)="moveColumn(col.field, 1)">↓</button>
|
|
3940
|
+
</span>
|
|
3941
|
+
</div>
|
|
3942
|
+
}
|
|
3943
|
+
</div>
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
@if (error) {
|
|
3947
|
+
<div class="vp-table__error" data-vp-table-error role="alert">
|
|
3948
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3949
|
+
<use href="#vp-icon-error"></use>
|
|
3950
|
+
</svg>
|
|
3951
|
+
<p class="vp-table__state-text">{{ error }}</p>
|
|
3952
|
+
<button type="button" class="vp-table__retry" (click)="emitLoad()">{{ retryLabel }}</button>
|
|
3953
|
+
</div>
|
|
3954
|
+
} @else if (loading) {
|
|
3955
|
+
<div class="vp-table__skeleton" data-vp-table-skeleton aria-hidden="true">
|
|
3956
|
+
@for (i of skeletonRows; track i) {
|
|
3957
|
+
<span class="vp-table__skeleton-row"></span>
|
|
3958
|
+
}
|
|
3959
|
+
</div>
|
|
3960
|
+
<span class="vp-visually-hidden" role="status">{{ loadingLabel }}</span>
|
|
3961
|
+
} @else if (rows.length === 0) {
|
|
3962
|
+
@if (hasActiveFilter) {
|
|
3963
|
+
<div class="vp-table__empty" data-vp-table-empty-filtered role="status">
|
|
3964
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3965
|
+
<use href="#vp-icon-filter"></use>
|
|
3966
|
+
</svg>
|
|
3967
|
+
<p class="vp-table__state-text">{{ emptyFilteredLabel }}</p>
|
|
3968
|
+
<button type="button" class="vp-table__retry" (click)="clearFilters.emit()">
|
|
3969
|
+
{{ clearFiltersLabel }}
|
|
3970
|
+
</button>
|
|
3971
|
+
</div>
|
|
3972
|
+
} @else {
|
|
3973
|
+
<div class="vp-table__empty" data-vp-table-empty role="status">
|
|
3974
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
3975
|
+
<use href="#vp-icon-empty"></use>
|
|
3976
|
+
</svg>
|
|
3977
|
+
<p class="vp-table__state-text">{{ emptyLabel }}</p>
|
|
3978
|
+
</div>
|
|
3979
|
+
}
|
|
3980
|
+
} @else {
|
|
3981
|
+
<div class="vp-table__scroll">
|
|
3982
|
+
<table class="vp-table__table" [attr.aria-label]="caption">
|
|
3983
|
+
<thead>
|
|
3984
|
+
<tr>
|
|
3985
|
+
@if (canExpand) {
|
|
3986
|
+
<th scope="col" class="vp-table__select-cell">
|
|
3987
|
+
<span class="vp-visually-hidden">{{ expandColumnLabel }}</span>
|
|
3988
|
+
</th>
|
|
3989
|
+
}
|
|
3990
|
+
@if (selectable) {
|
|
3991
|
+
<th scope="col" class="vp-table__select-cell">
|
|
3992
|
+
<input
|
|
3993
|
+
type="checkbox"
|
|
3994
|
+
data-vp-select-page
|
|
3995
|
+
[attr.aria-label]="selectPageLabel"
|
|
3996
|
+
[checked]="allOnPageSelected"
|
|
3997
|
+
[indeterminate]="someOnPageSelected"
|
|
3998
|
+
(change)="togglePageSelection()" />
|
|
3999
|
+
</th>
|
|
4000
|
+
}
|
|
4001
|
+
@for (col of visibleCols; track col.field) {
|
|
4002
|
+
<th
|
|
4003
|
+
scope="col"
|
|
4004
|
+
[attr.data-vp-col]="col.field"
|
|
4005
|
+
[attr.aria-sort]="ariaSort(col)"
|
|
4006
|
+
[style.width]="col.width || null">
|
|
4007
|
+
@if (col.sortable) {
|
|
4008
|
+
<button type="button" class="vp-table__sort" (click)="toggleSort(col.field)">
|
|
4009
|
+
{{ col.header }}
|
|
4010
|
+
<span class="vp-table__sort-icon" aria-hidden="true">{{ sortGlyph(col.field) }}</span>
|
|
4011
|
+
</button>
|
|
4012
|
+
} @else {
|
|
4013
|
+
{{ col.header }}
|
|
4014
|
+
}
|
|
4015
|
+
</th>
|
|
4016
|
+
}
|
|
4017
|
+
@if (rowActions) {
|
|
4018
|
+
<th scope="col" class="vp-table__actions-header">{{ rowActionsHeader }}</th>
|
|
4019
|
+
}
|
|
4020
|
+
</tr>
|
|
4021
|
+
</thead>
|
|
4022
|
+
<tbody>
|
|
4023
|
+
@for (row of rows; track $index) {
|
|
4024
|
+
<tr data-vp-row>
|
|
4025
|
+
@if (canExpand) {
|
|
4026
|
+
<td class="vp-table__select-cell">
|
|
4027
|
+
<button
|
|
4028
|
+
type="button"
|
|
4029
|
+
class="vp-table__expand"
|
|
4030
|
+
[attr.data-vp-expand]="keyOf(row)"
|
|
4031
|
+
[attr.aria-expanded]="isExpanded(row)"
|
|
4032
|
+
[attr.aria-label]="isExpanded(row) ? collapseLabel : expandLabel"
|
|
4033
|
+
(click)="toggleExpanded(row)">{{ isExpanded(row) ? '▾' : '▸' }}</button>
|
|
4034
|
+
</td>
|
|
4035
|
+
}
|
|
4036
|
+
@if (selectable) {
|
|
4037
|
+
<td class="vp-table__select-cell">
|
|
4038
|
+
<input
|
|
4039
|
+
type="checkbox"
|
|
4040
|
+
[attr.data-vp-select-row]="keyOf(row)"
|
|
4041
|
+
[attr.aria-label]="selectRowLabel"
|
|
4042
|
+
[checked]="isSelected(row)"
|
|
4043
|
+
(change)="toggleRow(row)" />
|
|
4044
|
+
</td>
|
|
4045
|
+
}
|
|
4046
|
+
@for (col of visibleCols; track col.field) {
|
|
4047
|
+
<td>{{ cell(row, col.field) }}</td>
|
|
4048
|
+
}
|
|
4049
|
+
@if (rowActions) {
|
|
4050
|
+
<td data-vp-row-actions>
|
|
4051
|
+
<ng-container *ngTemplateOutlet="rowActions; context: { $implicit: row }" />
|
|
4052
|
+
</td>
|
|
4053
|
+
}
|
|
4054
|
+
</tr>
|
|
4055
|
+
|
|
4056
|
+
@if (canExpand && isExpanded(row)) {
|
|
4057
|
+
<tr class="vp-table__detail-row" [attr.data-vp-detail]="keyOf(row)">
|
|
4058
|
+
<td [attr.colspan]="columnSpan">
|
|
4059
|
+
@if (rowDetail) {
|
|
4060
|
+
<ng-container *ngTemplateOutlet="rowDetail; context: { $implicit: row }" />
|
|
4061
|
+
} @else {
|
|
4062
|
+
<span class="vp-table__detail-empty">{{ noDetailLabel }}</span>
|
|
4063
|
+
}
|
|
4064
|
+
</td>
|
|
4065
|
+
</tr>
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
</tbody>
|
|
4069
|
+
</table>
|
|
4070
|
+
</div>
|
|
4071
|
+
|
|
4072
|
+
@if (pageCount > 1) {
|
|
4073
|
+
<nav class="vp-table__pager" [attr.aria-label]="pagerLabel">
|
|
4074
|
+
<button
|
|
4075
|
+
type="button"
|
|
4076
|
+
class="vp-table__page-btn"
|
|
4077
|
+
[disabled]="page <= 1"
|
|
4078
|
+
(click)="goToPage(page - 1)">{{ prevLabel }}</button>
|
|
4079
|
+
<button
|
|
4080
|
+
type="button"
|
|
4081
|
+
class="vp-table__page-btn"
|
|
4082
|
+
[disabled]="page >= pageCount"
|
|
4083
|
+
(click)="goToPage(page + 1)">{{ nextLabel }}</button>
|
|
4084
|
+
</nav>
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4087
|
+
</div>
|
|
4027
4088
|
`, isInline: true, styles: [":host{display:block}.vp-table{border:1px solid var(--vp-border-subtle);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised);overflow:hidden}.vp-table__meta{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3);padding:var(--vp-space-3) var(--vp-space-4);border-bottom:1px solid var(--vp-border-subtle);color:var(--vp-text-muted);font-size:var(--vp-text-sm);font-variant-numeric:tabular-nums}.vp-table__scroll{overflow-x:auto}.vp-table__table{width:100%;border-collapse:collapse;font-size:var(--vp-text-base)}.vp-table__table th{position:sticky;top:0;z-index:1;height:var(--vp-header-height);padding:0 var(--vp-space-3);text-align:left;white-space:nowrap;background:var(--vp-surface-raised);border-bottom:1px solid var(--vp-border-default);color:var(--vp-text-secondary);font-size:var(--vp-text-sm);font-weight:var(--vp-weight-semibold)}.vp-table__table td{height:var(--vp-row-height);padding:0 var(--vp-space-3);border-bottom:1px solid var(--vp-border-subtle);color:var(--vp-text-primary);font-variant-numeric:tabular-nums}.vp-table__table tbody tr:hover td{background:var(--vp-surface-sunken)}.vp-table__table tbody tr:last-child td{border-bottom:0}.vp-table__sort{display:inline-flex;align-items:center;gap:var(--vp-space-1);min-height:var(--vp-min-target);padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.vp-table__sort:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__sort-icon{color:var(--vp-text-muted)}.vp-table__empty,.vp-table__error{display:flex;flex-direction:column;align-items:center;gap:var(--vp-space-3);padding:var(--vp-space-12) var(--vp-space-6);text-align:center;color:var(--vp-text-secondary)}.vp-table__state-icon{width:40px;height:40px;color:var(--vp-text-muted)}.vp-table__error .vp-table__state-icon{color:var(--vp-sev-critical)}.vp-table__state-text{margin:0}.vp-table__retry{min-height:var(--vp-control-height);padding:0 var(--vp-space-4);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__retry:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__skeleton{display:flex;flex-direction:column;gap:1px;padding:var(--vp-space-2)}.vp-table__skeleton-row{display:block;height:var(--vp-row-height);border-radius:var(--vp-radius-sm);background:var(--vp-surface-sunken);animation:vp-table-pulse 1.4s var(--vp-ease-standard) infinite}@keyframes vp-table-pulse{0%,to{opacity:1}50%{opacity:.55}}.vp-table__pager{display:flex;justify-content:flex-end;gap:var(--vp-space-2);padding:var(--vp-space-3) var(--vp-space-4);border-top:1px solid var(--vp-border-subtle)}.vp-table__page-btn{min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__page-btn:disabled{opacity:.5;cursor:not-allowed}.vp-table__page-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}@media(prefers-reduced-motion:reduce){.vp-table__skeleton-row{animation:none}}.vp-table__cols-btn{margin-left:auto;min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__cols-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__cols{display:flex;flex-direction:column;gap:var(--vp-space-1);margin-bottom:var(--vp-space-3);padding:var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised)}.vp-table__cols-row{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3)}.vp-table__cols-label{display:flex;align-items:center;gap:var(--vp-space-2);cursor:pointer}.vp-table__cols-move button{min-width:var(--vp-min-target);min-height:var(--vp-min-target);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-default);color:var(--vp-text-primary);cursor:pointer}.vp-table__cols-move button:disabled{opacity:.4;cursor:not-allowed}.vp-table__cols-move button:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__select-cell{width:var(--vp-min-target);text-align:center}.vp-table__bulk,.vp-table__bulk-confirm,.vp-table__bulk-report{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3);margin-bottom:var(--vp-space-3);padding:var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised);font-size:var(--vp-text-sm)}.vp-table__bulk-report{display:block}.vp-table__bulk-confirm{border-color:var(--vp-danger)}.vp-table__bulk-actions{display:flex;gap:var(--vp-space-2)}.vp-table__bulk-btn{min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-default);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__bulk-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__bulk-btn--danger{border-color:var(--vp-danger);color:var(--vp-danger)}.vp-table__bulk-failures{margin:var(--vp-space-2) 0 0;padding-left:var(--vp-space-5)}.vp-table__expand{min-width:var(--vp-min-target);min-height:var(--vp-min-target);border:1px solid transparent;border-radius:var(--vp-radius-md);background:transparent;color:var(--vp-text-primary);cursor:pointer}.vp-table__expand:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__detail-row>td{background:var(--vp-surface-raised);padding:var(--vp-space-4)}.vp-table__detail-empty{color:var(--vp-text-muted)}.vp-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4028
4089
|
}
|
|
4029
4090
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: VpDataTableComponent, decorators: [{
|
|
4030
4091
|
type: Component,
|
|
4031
|
-
args: [{ selector: 'vp-data-table', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
4032
|
-
<div class="vp-table">
|
|
4033
|
-
<div class="vp-table__meta">
|
|
4034
|
-
<span class="vp-table__total" data-vp-total>
|
|
4035
|
-
{{ total }} {{ totalLabel }}
|
|
4036
|
-
</span>
|
|
4037
|
-
@if (pageCount > 1) {
|
|
4038
|
-
<span class="vp-table__pageinfo">{{ page }} / {{ pageCount }}</span>
|
|
4039
|
-
}
|
|
4040
|
-
|
|
4041
|
-
@if (savedViewsKey) {
|
|
4042
|
-
<span class="vp-table__views" data-vp-views>
|
|
4043
|
-
<select
|
|
4044
|
-
class="vp-table__cols-btn"
|
|
4045
|
-
data-vp-view-select
|
|
4046
|
-
[attr.aria-label]="viewsLabel"
|
|
4047
|
-
[value]="activeView"
|
|
4048
|
-
(change)="applyView(asSelectValue($event))">
|
|
4049
|
-
<option value="">{{ viewsPlaceholder }}</option>
|
|
4050
|
-
@for (view of savedViews; track view.name) {
|
|
4051
|
-
<option [value]="view.name">{{ view.name }}</option>
|
|
4052
|
-
}
|
|
4053
|
-
</select>
|
|
4054
|
-
|
|
4055
|
-
<button type="button" class="vp-table__cols-btn" data-vp-view-save
|
|
4056
|
-
(click)="saveViewPrompt()">{{ saveViewLabel }}</button>
|
|
4057
|
-
|
|
4058
|
-
@if (activeView) {
|
|
4059
|
-
<button type="button" class="vp-table__cols-btn" data-vp-view-delete
|
|
4060
|
-
(click)="deleteActiveView()">{{ deleteViewLabel }}</button>
|
|
4061
|
-
}
|
|
4062
|
-
</span>
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
|
-
@if (exportScopes.length > 0) {
|
|
4066
|
-
@for (scope of exportScopes; track scope) {
|
|
4067
|
-
<button
|
|
4068
|
-
type="button"
|
|
4069
|
-
class="vp-table__cols-btn"
|
|
4070
|
-
[attr.data-vp-export]="scope"
|
|
4071
|
-
(click)="requestExport(scope)">{{ exportLabel(scope) }}</button>
|
|
4072
|
-
}
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
|
-
@if (columnPicker) {
|
|
4076
|
-
<button
|
|
4077
|
-
type="button"
|
|
4078
|
-
class="vp-table__cols-btn"
|
|
4079
|
-
data-vp-cols-toggle
|
|
4080
|
-
[attr.aria-expanded]="pickerOpen"
|
|
4081
|
-
(click)="pickerOpen = !pickerOpen">{{ columnsLabel }}</button>
|
|
4082
|
-
}
|
|
4083
|
-
</div>
|
|
4084
|
-
|
|
4085
|
-
@if (selectable && selectedKeys.size > 0) {
|
|
4086
|
-
<div class="vp-table__bulk" data-vp-bulk role="group" [attr.aria-label]="bulkLabel">
|
|
4087
|
-
<span data-vp-bulk-count>{{ selectedKeys.size }} {{ selectedLabel }}</span>
|
|
4088
|
-
|
|
4089
|
-
<div class="vp-table__bulk-actions">
|
|
4090
|
-
@for (action of bulkActions; track action.code) {
|
|
4091
|
-
<button
|
|
4092
|
-
type="button"
|
|
4093
|
-
[attr.data-vp-bulk-action]="action.code"
|
|
4094
|
-
[class.vp-table__bulk-btn--danger]="action.danger"
|
|
4095
|
-
class="vp-table__bulk-btn"
|
|
4096
|
-
(click)="requestBulkAction(action)">{{ action.label }}</button>
|
|
4097
|
-
}
|
|
4098
|
-
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-clear
|
|
4099
|
-
(click)="clearSelection()">{{ clearSelectionLabel }}</button>
|
|
4100
|
-
</div>
|
|
4101
|
-
</div>
|
|
4102
|
-
|
|
4103
|
-
@if (pendingAction) {
|
|
4104
|
-
<div class="vp-table__bulk-confirm" data-vp-bulk-confirm role="alertdialog"
|
|
4105
|
-
[attr.aria-label]="pendingAction.label">
|
|
4106
|
-
<span>{{ confirmPrefix }} {{ selectedKeys.size }} {{ selectedLabel }} — {{ pendingAction.label }}?</span>
|
|
4107
|
-
<span class="vp-table__bulk-actions">
|
|
4108
|
-
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-cancel
|
|
4109
|
-
(click)="pendingAction = null">{{ cancelLabel }}</button>
|
|
4110
|
-
<button type="button" class="vp-table__bulk-btn vp-table__bulk-btn--danger"
|
|
4111
|
-
data-vp-bulk-confirm-ok (click)="confirmBulkAction()">{{ confirmLabel }}</button>
|
|
4112
|
-
</span>
|
|
4113
|
-
</div>
|
|
4114
|
-
}
|
|
4115
|
-
}
|
|
4116
|
-
|
|
4117
|
-
@if (bulkResult) {
|
|
4118
|
-
<div class="vp-table__bulk-report" data-vp-bulk-report role="status" aria-live="polite">
|
|
4119
|
-
@if (bulkResult.succeeded.length > 0) {
|
|
4120
|
-
<p data-vp-bulk-ok>{{ bulkResult.succeeded.length }} {{ succeededLabel }}</p>
|
|
4121
|
-
}
|
|
4122
|
-
@if (bulkResult.failed.length > 0) {
|
|
4123
|
-
<p data-vp-bulk-failed>{{ bulkResult.failed.length }} {{ failedLabel }}</p>
|
|
4124
|
-
<ul class="vp-table__bulk-failures">
|
|
4125
|
-
@for (failure of bulkResult.failed; track failure.key) {
|
|
4126
|
-
<li [attr.data-vp-bulk-failure]="failure.key">
|
|
4127
|
-
<code>{{ failure.key }}</code> — {{ failure.reason }}
|
|
4128
|
-
</li>
|
|
4129
|
-
}
|
|
4130
|
-
</ul>
|
|
4131
|
-
}
|
|
4132
|
-
</div>
|
|
4133
|
-
}
|
|
4134
|
-
|
|
4135
|
-
@if (columnPicker && pickerOpen) {
|
|
4136
|
-
<div class="vp-table__cols" data-vp-cols role="group" [attr.aria-label]="columnsLabel">
|
|
4137
|
-
@for (col of orderedColumns; track col.field; let i = $index) {
|
|
4138
|
-
<div class="vp-table__cols-row" [attr.data-vp-cols-row]="col.field">
|
|
4139
|
-
<label class="vp-table__cols-label">
|
|
4140
|
-
<input
|
|
4141
|
-
type="checkbox"
|
|
4142
|
-
[attr.data-vp-col-toggle]="col.field"
|
|
4143
|
-
[checked]="isVisible(col.field)"
|
|
4144
|
-
[disabled]="isVisible(col.field) && visibleCount === 1"
|
|
4145
|
-
(change)="setColumnVisible(col.field, !isVisible(col.field))" />
|
|
4146
|
-
{{ col.header }}
|
|
4147
|
-
</label>
|
|
4148
|
-
<span class="vp-table__cols-move">
|
|
4149
|
-
<button
|
|
4150
|
-
type="button"
|
|
4151
|
-
[attr.data-vp-col-up]="col.field"
|
|
4152
|
-
[attr.aria-label]="moveUpLabel + ': ' + col.header"
|
|
4153
|
-
[disabled]="i === 0"
|
|
4154
|
-
(click)="moveColumn(col.field, -1)">↑</button>
|
|
4155
|
-
<button
|
|
4156
|
-
type="button"
|
|
4157
|
-
[attr.data-vp-col-down]="col.field"
|
|
4158
|
-
[attr.aria-label]="moveDownLabel + ': ' + col.header"
|
|
4159
|
-
[disabled]="i === orderedColumns.length - 1"
|
|
4160
|
-
(click)="moveColumn(col.field, 1)">↓</button>
|
|
4161
|
-
</span>
|
|
4162
|
-
</div>
|
|
4163
|
-
}
|
|
4164
|
-
</div>
|
|
4165
|
-
}
|
|
4166
|
-
|
|
4167
|
-
@if (error) {
|
|
4168
|
-
<div class="vp-table__error" data-vp-table-error role="alert">
|
|
4169
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4170
|
-
<use href="#vp-icon-error"></use>
|
|
4171
|
-
</svg>
|
|
4172
|
-
<p class="vp-table__state-text">{{ error }}</p>
|
|
4173
|
-
<button type="button" class="vp-table__retry" (click)="emitLoad()">{{ retryLabel }}</button>
|
|
4174
|
-
</div>
|
|
4175
|
-
} @else if (loading) {
|
|
4176
|
-
<div class="vp-table__skeleton" data-vp-table-skeleton aria-hidden="true">
|
|
4177
|
-
@for (i of skeletonRows; track i) {
|
|
4178
|
-
<span class="vp-table__skeleton-row"></span>
|
|
4179
|
-
}
|
|
4180
|
-
</div>
|
|
4181
|
-
<span class="vp-visually-hidden" role="status">{{ loadingLabel }}</span>
|
|
4182
|
-
} @else if (rows.length === 0) {
|
|
4183
|
-
@if (hasActiveFilter) {
|
|
4184
|
-
<div class="vp-table__empty" data-vp-table-empty-filtered role="status">
|
|
4185
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4186
|
-
<use href="#vp-icon-filter"></use>
|
|
4187
|
-
</svg>
|
|
4188
|
-
<p class="vp-table__state-text">{{ emptyFilteredLabel }}</p>
|
|
4189
|
-
<button type="button" class="vp-table__retry" (click)="clearFilters.emit()">
|
|
4190
|
-
{{ clearFiltersLabel }}
|
|
4191
|
-
</button>
|
|
4192
|
-
</div>
|
|
4193
|
-
} @else {
|
|
4194
|
-
<div class="vp-table__empty" data-vp-table-empty role="status">
|
|
4195
|
-
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4196
|
-
<use href="#vp-icon-empty"></use>
|
|
4197
|
-
</svg>
|
|
4198
|
-
<p class="vp-table__state-text">{{ emptyLabel }}</p>
|
|
4199
|
-
</div>
|
|
4200
|
-
}
|
|
4201
|
-
} @else {
|
|
4202
|
-
<div class="vp-table__scroll">
|
|
4203
|
-
<table class="vp-table__table" [attr.aria-label]="caption">
|
|
4204
|
-
<thead>
|
|
4205
|
-
<tr>
|
|
4206
|
-
@if (
|
|
4207
|
-
<th scope="col" class="vp-table__select-cell">
|
|
4208
|
-
<span class="vp-visually-hidden">{{ expandColumnLabel }}</span>
|
|
4209
|
-
</th>
|
|
4210
|
-
}
|
|
4211
|
-
@if (selectable) {
|
|
4212
|
-
<th scope="col" class="vp-table__select-cell">
|
|
4213
|
-
<input
|
|
4214
|
-
type="checkbox"
|
|
4215
|
-
data-vp-select-page
|
|
4216
|
-
[attr.aria-label]="selectPageLabel"
|
|
4217
|
-
[checked]="allOnPageSelected"
|
|
4218
|
-
[indeterminate]="someOnPageSelected"
|
|
4219
|
-
(change)="togglePageSelection()" />
|
|
4220
|
-
</th>
|
|
4221
|
-
}
|
|
4222
|
-
@for (col of visibleCols; track col.field) {
|
|
4223
|
-
<th
|
|
4224
|
-
scope="col"
|
|
4225
|
-
[attr.data-vp-col]="col.field"
|
|
4226
|
-
[attr.aria-sort]="ariaSort(col)"
|
|
4227
|
-
[style.width]="col.width || null">
|
|
4228
|
-
@if (col.sortable) {
|
|
4229
|
-
<button type="button" class="vp-table__sort" (click)="toggleSort(col.field)">
|
|
4230
|
-
{{ col.header }}
|
|
4231
|
-
<span class="vp-table__sort-icon" aria-hidden="true">{{ sortGlyph(col.field) }}</span>
|
|
4232
|
-
</button>
|
|
4233
|
-
} @else {
|
|
4234
|
-
{{ col.header }}
|
|
4235
|
-
}
|
|
4236
|
-
</th>
|
|
4237
|
-
}
|
|
4238
|
-
@if (rowActions) {
|
|
4239
|
-
<th scope="col" class="vp-table__actions-header">{{ rowActionsHeader }}</th>
|
|
4240
|
-
}
|
|
4241
|
-
</tr>
|
|
4242
|
-
</thead>
|
|
4243
|
-
<tbody>
|
|
4244
|
-
@for (row of rows; track $index) {
|
|
4245
|
-
<tr data-vp-row>
|
|
4246
|
-
@if (
|
|
4247
|
-
<td class="vp-table__select-cell">
|
|
4248
|
-
<button
|
|
4249
|
-
type="button"
|
|
4250
|
-
class="vp-table__expand"
|
|
4251
|
-
[attr.data-vp-expand]="keyOf(row)"
|
|
4252
|
-
[attr.aria-expanded]="isExpanded(row)"
|
|
4253
|
-
[attr.aria-label]="isExpanded(row) ? collapseLabel : expandLabel"
|
|
4254
|
-
(click)="toggleExpanded(row)">{{ isExpanded(row) ? '▾' : '▸' }}</button>
|
|
4255
|
-
</td>
|
|
4256
|
-
}
|
|
4257
|
-
@if (selectable) {
|
|
4258
|
-
<td class="vp-table__select-cell">
|
|
4259
|
-
<input
|
|
4260
|
-
type="checkbox"
|
|
4261
|
-
[attr.data-vp-select-row]="keyOf(row)"
|
|
4262
|
-
[attr.aria-label]="selectRowLabel"
|
|
4263
|
-
[checked]="isSelected(row)"
|
|
4264
|
-
(change)="toggleRow(row)" />
|
|
4265
|
-
</td>
|
|
4266
|
-
}
|
|
4267
|
-
@for (col of visibleCols; track col.field) {
|
|
4268
|
-
<td>{{ cell(row, col.field) }}</td>
|
|
4269
|
-
}
|
|
4270
|
-
@if (rowActions) {
|
|
4271
|
-
<td data-vp-row-actions>
|
|
4272
|
-
<ng-container *ngTemplateOutlet="rowActions; context: { $implicit: row }" />
|
|
4273
|
-
</td>
|
|
4274
|
-
}
|
|
4275
|
-
</tr>
|
|
4276
|
-
|
|
4277
|
-
@if (
|
|
4278
|
-
<tr class="vp-table__detail-row" [attr.data-vp-detail]="keyOf(row)">
|
|
4279
|
-
<td [attr.colspan]="columnSpan">
|
|
4280
|
-
@if (rowDetail) {
|
|
4281
|
-
<ng-container *ngTemplateOutlet="rowDetail; context: { $implicit: row }" />
|
|
4282
|
-
} @else {
|
|
4283
|
-
<span class="vp-table__detail-empty">{{ noDetailLabel }}</span>
|
|
4284
|
-
}
|
|
4285
|
-
</td>
|
|
4286
|
-
</tr>
|
|
4287
|
-
}
|
|
4288
|
-
}
|
|
4289
|
-
</tbody>
|
|
4290
|
-
</table>
|
|
4291
|
-
</div>
|
|
4292
|
-
|
|
4293
|
-
@if (pageCount > 1) {
|
|
4294
|
-
<nav class="vp-table__pager" [attr.aria-label]="pagerLabel">
|
|
4295
|
-
<button
|
|
4296
|
-
type="button"
|
|
4297
|
-
class="vp-table__page-btn"
|
|
4298
|
-
[disabled]="page <= 1"
|
|
4299
|
-
(click)="goToPage(page - 1)">{{ prevLabel }}</button>
|
|
4300
|
-
<button
|
|
4301
|
-
type="button"
|
|
4302
|
-
class="vp-table__page-btn"
|
|
4303
|
-
[disabled]="page >= pageCount"
|
|
4304
|
-
(click)="goToPage(page + 1)">{{ nextLabel }}</button>
|
|
4305
|
-
</nav>
|
|
4306
|
-
}
|
|
4307
|
-
}
|
|
4308
|
-
</div>
|
|
4092
|
+
args: [{ selector: 'vp-data-table', standalone: true, imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
4093
|
+
<div class="vp-table">
|
|
4094
|
+
<div class="vp-table__meta">
|
|
4095
|
+
<span class="vp-table__total" data-vp-total>
|
|
4096
|
+
{{ total }} {{ totalLabel }}
|
|
4097
|
+
</span>
|
|
4098
|
+
@if (pageCount > 1) {
|
|
4099
|
+
<span class="vp-table__pageinfo">{{ page }} / {{ pageCount }}</span>
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4102
|
+
@if (savedViewsKey) {
|
|
4103
|
+
<span class="vp-table__views" data-vp-views>
|
|
4104
|
+
<select
|
|
4105
|
+
class="vp-table__cols-btn"
|
|
4106
|
+
data-vp-view-select
|
|
4107
|
+
[attr.aria-label]="viewsLabel"
|
|
4108
|
+
[value]="activeView"
|
|
4109
|
+
(change)="applyView(asSelectValue($event))">
|
|
4110
|
+
<option value="">{{ viewsPlaceholder }}</option>
|
|
4111
|
+
@for (view of savedViews; track view.name) {
|
|
4112
|
+
<option [value]="view.name">{{ view.name }}</option>
|
|
4113
|
+
}
|
|
4114
|
+
</select>
|
|
4115
|
+
|
|
4116
|
+
<button type="button" class="vp-table__cols-btn" data-vp-view-save
|
|
4117
|
+
(click)="saveViewPrompt()">{{ saveViewLabel }}</button>
|
|
4118
|
+
|
|
4119
|
+
@if (activeView) {
|
|
4120
|
+
<button type="button" class="vp-table__cols-btn" data-vp-view-delete
|
|
4121
|
+
(click)="deleteActiveView()">{{ deleteViewLabel }}</button>
|
|
4122
|
+
}
|
|
4123
|
+
</span>
|
|
4124
|
+
}
|
|
4125
|
+
|
|
4126
|
+
@if (exportScopes.length > 0) {
|
|
4127
|
+
@for (scope of exportScopes; track scope) {
|
|
4128
|
+
<button
|
|
4129
|
+
type="button"
|
|
4130
|
+
class="vp-table__cols-btn"
|
|
4131
|
+
[attr.data-vp-export]="scope"
|
|
4132
|
+
(click)="requestExport(scope)">{{ exportLabel(scope) }}</button>
|
|
4133
|
+
}
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
@if (columnPicker) {
|
|
4137
|
+
<button
|
|
4138
|
+
type="button"
|
|
4139
|
+
class="vp-table__cols-btn"
|
|
4140
|
+
data-vp-cols-toggle
|
|
4141
|
+
[attr.aria-expanded]="pickerOpen"
|
|
4142
|
+
(click)="pickerOpen = !pickerOpen">{{ columnsLabel }}</button>
|
|
4143
|
+
}
|
|
4144
|
+
</div>
|
|
4145
|
+
|
|
4146
|
+
@if (selectable && selectedKeys.size > 0) {
|
|
4147
|
+
<div class="vp-table__bulk" data-vp-bulk role="group" [attr.aria-label]="bulkLabel">
|
|
4148
|
+
<span data-vp-bulk-count>{{ selectedKeys.size }} {{ selectedLabel }}</span>
|
|
4149
|
+
|
|
4150
|
+
<div class="vp-table__bulk-actions">
|
|
4151
|
+
@for (action of bulkActions; track action.code) {
|
|
4152
|
+
<button
|
|
4153
|
+
type="button"
|
|
4154
|
+
[attr.data-vp-bulk-action]="action.code"
|
|
4155
|
+
[class.vp-table__bulk-btn--danger]="action.danger"
|
|
4156
|
+
class="vp-table__bulk-btn"
|
|
4157
|
+
(click)="requestBulkAction(action)">{{ action.label }}</button>
|
|
4158
|
+
}
|
|
4159
|
+
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-clear
|
|
4160
|
+
(click)="clearSelection()">{{ clearSelectionLabel }}</button>
|
|
4161
|
+
</div>
|
|
4162
|
+
</div>
|
|
4163
|
+
|
|
4164
|
+
@if (pendingAction) {
|
|
4165
|
+
<div class="vp-table__bulk-confirm" data-vp-bulk-confirm role="alertdialog"
|
|
4166
|
+
[attr.aria-label]="pendingAction.label">
|
|
4167
|
+
<span>{{ confirmPrefix }} {{ selectedKeys.size }} {{ selectedLabel }} — {{ pendingAction.label }}?</span>
|
|
4168
|
+
<span class="vp-table__bulk-actions">
|
|
4169
|
+
<button type="button" class="vp-table__bulk-btn" data-vp-bulk-cancel
|
|
4170
|
+
(click)="pendingAction = null">{{ cancelLabel }}</button>
|
|
4171
|
+
<button type="button" class="vp-table__bulk-btn vp-table__bulk-btn--danger"
|
|
4172
|
+
data-vp-bulk-confirm-ok (click)="confirmBulkAction()">{{ confirmLabel }}</button>
|
|
4173
|
+
</span>
|
|
4174
|
+
</div>
|
|
4175
|
+
}
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
@if (bulkResult) {
|
|
4179
|
+
<div class="vp-table__bulk-report" data-vp-bulk-report role="status" aria-live="polite">
|
|
4180
|
+
@if (bulkResult.succeeded.length > 0) {
|
|
4181
|
+
<p data-vp-bulk-ok>{{ bulkResult.succeeded.length }} {{ succeededLabel }}</p>
|
|
4182
|
+
}
|
|
4183
|
+
@if (bulkResult.failed.length > 0) {
|
|
4184
|
+
<p data-vp-bulk-failed>{{ bulkResult.failed.length }} {{ failedLabel }}</p>
|
|
4185
|
+
<ul class="vp-table__bulk-failures">
|
|
4186
|
+
@for (failure of bulkResult.failed; track failure.key) {
|
|
4187
|
+
<li [attr.data-vp-bulk-failure]="failure.key">
|
|
4188
|
+
<code>{{ failure.key }}</code> — {{ failure.reason }}
|
|
4189
|
+
</li>
|
|
4190
|
+
}
|
|
4191
|
+
</ul>
|
|
4192
|
+
}
|
|
4193
|
+
</div>
|
|
4194
|
+
}
|
|
4195
|
+
|
|
4196
|
+
@if (columnPicker && pickerOpen) {
|
|
4197
|
+
<div class="vp-table__cols" data-vp-cols role="group" [attr.aria-label]="columnsLabel">
|
|
4198
|
+
@for (col of orderedColumns; track col.field; let i = $index) {
|
|
4199
|
+
<div class="vp-table__cols-row" [attr.data-vp-cols-row]="col.field">
|
|
4200
|
+
<label class="vp-table__cols-label">
|
|
4201
|
+
<input
|
|
4202
|
+
type="checkbox"
|
|
4203
|
+
[attr.data-vp-col-toggle]="col.field"
|
|
4204
|
+
[checked]="isVisible(col.field)"
|
|
4205
|
+
[disabled]="isVisible(col.field) && visibleCount === 1"
|
|
4206
|
+
(change)="setColumnVisible(col.field, !isVisible(col.field))" />
|
|
4207
|
+
{{ col.header }}
|
|
4208
|
+
</label>
|
|
4209
|
+
<span class="vp-table__cols-move">
|
|
4210
|
+
<button
|
|
4211
|
+
type="button"
|
|
4212
|
+
[attr.data-vp-col-up]="col.field"
|
|
4213
|
+
[attr.aria-label]="moveUpLabel + ': ' + col.header"
|
|
4214
|
+
[disabled]="i === 0"
|
|
4215
|
+
(click)="moveColumn(col.field, -1)">↑</button>
|
|
4216
|
+
<button
|
|
4217
|
+
type="button"
|
|
4218
|
+
[attr.data-vp-col-down]="col.field"
|
|
4219
|
+
[attr.aria-label]="moveDownLabel + ': ' + col.header"
|
|
4220
|
+
[disabled]="i === orderedColumns.length - 1"
|
|
4221
|
+
(click)="moveColumn(col.field, 1)">↓</button>
|
|
4222
|
+
</span>
|
|
4223
|
+
</div>
|
|
4224
|
+
}
|
|
4225
|
+
</div>
|
|
4226
|
+
}
|
|
4227
|
+
|
|
4228
|
+
@if (error) {
|
|
4229
|
+
<div class="vp-table__error" data-vp-table-error role="alert">
|
|
4230
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4231
|
+
<use href="#vp-icon-error"></use>
|
|
4232
|
+
</svg>
|
|
4233
|
+
<p class="vp-table__state-text">{{ error }}</p>
|
|
4234
|
+
<button type="button" class="vp-table__retry" (click)="emitLoad()">{{ retryLabel }}</button>
|
|
4235
|
+
</div>
|
|
4236
|
+
} @else if (loading) {
|
|
4237
|
+
<div class="vp-table__skeleton" data-vp-table-skeleton aria-hidden="true">
|
|
4238
|
+
@for (i of skeletonRows; track i) {
|
|
4239
|
+
<span class="vp-table__skeleton-row"></span>
|
|
4240
|
+
}
|
|
4241
|
+
</div>
|
|
4242
|
+
<span class="vp-visually-hidden" role="status">{{ loadingLabel }}</span>
|
|
4243
|
+
} @else if (rows.length === 0) {
|
|
4244
|
+
@if (hasActiveFilter) {
|
|
4245
|
+
<div class="vp-table__empty" data-vp-table-empty-filtered role="status">
|
|
4246
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4247
|
+
<use href="#vp-icon-filter"></use>
|
|
4248
|
+
</svg>
|
|
4249
|
+
<p class="vp-table__state-text">{{ emptyFilteredLabel }}</p>
|
|
4250
|
+
<button type="button" class="vp-table__retry" (click)="clearFilters.emit()">
|
|
4251
|
+
{{ clearFiltersLabel }}
|
|
4252
|
+
</button>
|
|
4253
|
+
</div>
|
|
4254
|
+
} @else {
|
|
4255
|
+
<div class="vp-table__empty" data-vp-table-empty role="status">
|
|
4256
|
+
<svg class="vp-table__state-icon" aria-hidden="true" viewBox="0 0 24 24" focusable="false">
|
|
4257
|
+
<use href="#vp-icon-empty"></use>
|
|
4258
|
+
</svg>
|
|
4259
|
+
<p class="vp-table__state-text">{{ emptyLabel }}</p>
|
|
4260
|
+
</div>
|
|
4261
|
+
}
|
|
4262
|
+
} @else {
|
|
4263
|
+
<div class="vp-table__scroll">
|
|
4264
|
+
<table class="vp-table__table" [attr.aria-label]="caption">
|
|
4265
|
+
<thead>
|
|
4266
|
+
<tr>
|
|
4267
|
+
@if (canExpand) {
|
|
4268
|
+
<th scope="col" class="vp-table__select-cell">
|
|
4269
|
+
<span class="vp-visually-hidden">{{ expandColumnLabel }}</span>
|
|
4270
|
+
</th>
|
|
4271
|
+
}
|
|
4272
|
+
@if (selectable) {
|
|
4273
|
+
<th scope="col" class="vp-table__select-cell">
|
|
4274
|
+
<input
|
|
4275
|
+
type="checkbox"
|
|
4276
|
+
data-vp-select-page
|
|
4277
|
+
[attr.aria-label]="selectPageLabel"
|
|
4278
|
+
[checked]="allOnPageSelected"
|
|
4279
|
+
[indeterminate]="someOnPageSelected"
|
|
4280
|
+
(change)="togglePageSelection()" />
|
|
4281
|
+
</th>
|
|
4282
|
+
}
|
|
4283
|
+
@for (col of visibleCols; track col.field) {
|
|
4284
|
+
<th
|
|
4285
|
+
scope="col"
|
|
4286
|
+
[attr.data-vp-col]="col.field"
|
|
4287
|
+
[attr.aria-sort]="ariaSort(col)"
|
|
4288
|
+
[style.width]="col.width || null">
|
|
4289
|
+
@if (col.sortable) {
|
|
4290
|
+
<button type="button" class="vp-table__sort" (click)="toggleSort(col.field)">
|
|
4291
|
+
{{ col.header }}
|
|
4292
|
+
<span class="vp-table__sort-icon" aria-hidden="true">{{ sortGlyph(col.field) }}</span>
|
|
4293
|
+
</button>
|
|
4294
|
+
} @else {
|
|
4295
|
+
{{ col.header }}
|
|
4296
|
+
}
|
|
4297
|
+
</th>
|
|
4298
|
+
}
|
|
4299
|
+
@if (rowActions) {
|
|
4300
|
+
<th scope="col" class="vp-table__actions-header">{{ rowActionsHeader }}</th>
|
|
4301
|
+
}
|
|
4302
|
+
</tr>
|
|
4303
|
+
</thead>
|
|
4304
|
+
<tbody>
|
|
4305
|
+
@for (row of rows; track $index) {
|
|
4306
|
+
<tr data-vp-row>
|
|
4307
|
+
@if (canExpand) {
|
|
4308
|
+
<td class="vp-table__select-cell">
|
|
4309
|
+
<button
|
|
4310
|
+
type="button"
|
|
4311
|
+
class="vp-table__expand"
|
|
4312
|
+
[attr.data-vp-expand]="keyOf(row)"
|
|
4313
|
+
[attr.aria-expanded]="isExpanded(row)"
|
|
4314
|
+
[attr.aria-label]="isExpanded(row) ? collapseLabel : expandLabel"
|
|
4315
|
+
(click)="toggleExpanded(row)">{{ isExpanded(row) ? '▾' : '▸' }}</button>
|
|
4316
|
+
</td>
|
|
4317
|
+
}
|
|
4318
|
+
@if (selectable) {
|
|
4319
|
+
<td class="vp-table__select-cell">
|
|
4320
|
+
<input
|
|
4321
|
+
type="checkbox"
|
|
4322
|
+
[attr.data-vp-select-row]="keyOf(row)"
|
|
4323
|
+
[attr.aria-label]="selectRowLabel"
|
|
4324
|
+
[checked]="isSelected(row)"
|
|
4325
|
+
(change)="toggleRow(row)" />
|
|
4326
|
+
</td>
|
|
4327
|
+
}
|
|
4328
|
+
@for (col of visibleCols; track col.field) {
|
|
4329
|
+
<td>{{ cell(row, col.field) }}</td>
|
|
4330
|
+
}
|
|
4331
|
+
@if (rowActions) {
|
|
4332
|
+
<td data-vp-row-actions>
|
|
4333
|
+
<ng-container *ngTemplateOutlet="rowActions; context: { $implicit: row }" />
|
|
4334
|
+
</td>
|
|
4335
|
+
}
|
|
4336
|
+
</tr>
|
|
4337
|
+
|
|
4338
|
+
@if (canExpand && isExpanded(row)) {
|
|
4339
|
+
<tr class="vp-table__detail-row" [attr.data-vp-detail]="keyOf(row)">
|
|
4340
|
+
<td [attr.colspan]="columnSpan">
|
|
4341
|
+
@if (rowDetail) {
|
|
4342
|
+
<ng-container *ngTemplateOutlet="rowDetail; context: { $implicit: row }" />
|
|
4343
|
+
} @else {
|
|
4344
|
+
<span class="vp-table__detail-empty">{{ noDetailLabel }}</span>
|
|
4345
|
+
}
|
|
4346
|
+
</td>
|
|
4347
|
+
</tr>
|
|
4348
|
+
}
|
|
4349
|
+
}
|
|
4350
|
+
</tbody>
|
|
4351
|
+
</table>
|
|
4352
|
+
</div>
|
|
4353
|
+
|
|
4354
|
+
@if (pageCount > 1) {
|
|
4355
|
+
<nav class="vp-table__pager" [attr.aria-label]="pagerLabel">
|
|
4356
|
+
<button
|
|
4357
|
+
type="button"
|
|
4358
|
+
class="vp-table__page-btn"
|
|
4359
|
+
[disabled]="page <= 1"
|
|
4360
|
+
(click)="goToPage(page - 1)">{{ prevLabel }}</button>
|
|
4361
|
+
<button
|
|
4362
|
+
type="button"
|
|
4363
|
+
class="vp-table__page-btn"
|
|
4364
|
+
[disabled]="page >= pageCount"
|
|
4365
|
+
(click)="goToPage(page + 1)">{{ nextLabel }}</button>
|
|
4366
|
+
</nav>
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
</div>
|
|
4309
4370
|
`, styles: [":host{display:block}.vp-table{border:1px solid var(--vp-border-subtle);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised);overflow:hidden}.vp-table__meta{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3);padding:var(--vp-space-3) var(--vp-space-4);border-bottom:1px solid var(--vp-border-subtle);color:var(--vp-text-muted);font-size:var(--vp-text-sm);font-variant-numeric:tabular-nums}.vp-table__scroll{overflow-x:auto}.vp-table__table{width:100%;border-collapse:collapse;font-size:var(--vp-text-base)}.vp-table__table th{position:sticky;top:0;z-index:1;height:var(--vp-header-height);padding:0 var(--vp-space-3);text-align:left;white-space:nowrap;background:var(--vp-surface-raised);border-bottom:1px solid var(--vp-border-default);color:var(--vp-text-secondary);font-size:var(--vp-text-sm);font-weight:var(--vp-weight-semibold)}.vp-table__table td{height:var(--vp-row-height);padding:0 var(--vp-space-3);border-bottom:1px solid var(--vp-border-subtle);color:var(--vp-text-primary);font-variant-numeric:tabular-nums}.vp-table__table tbody tr:hover td{background:var(--vp-surface-sunken)}.vp-table__table tbody tr:last-child td{border-bottom:0}.vp-table__sort{display:inline-flex;align-items:center;gap:var(--vp-space-1);min-height:var(--vp-min-target);padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.vp-table__sort:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__sort-icon{color:var(--vp-text-muted)}.vp-table__empty,.vp-table__error{display:flex;flex-direction:column;align-items:center;gap:var(--vp-space-3);padding:var(--vp-space-12) var(--vp-space-6);text-align:center;color:var(--vp-text-secondary)}.vp-table__state-icon{width:40px;height:40px;color:var(--vp-text-muted)}.vp-table__error .vp-table__state-icon{color:var(--vp-sev-critical)}.vp-table__state-text{margin:0}.vp-table__retry{min-height:var(--vp-control-height);padding:0 var(--vp-space-4);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__retry:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__skeleton{display:flex;flex-direction:column;gap:1px;padding:var(--vp-space-2)}.vp-table__skeleton-row{display:block;height:var(--vp-row-height);border-radius:var(--vp-radius-sm);background:var(--vp-surface-sunken);animation:vp-table-pulse 1.4s var(--vp-ease-standard) infinite}@keyframes vp-table-pulse{0%,to{opacity:1}50%{opacity:.55}}.vp-table__pager{display:flex;justify-content:flex-end;gap:var(--vp-space-2);padding:var(--vp-space-3) var(--vp-space-4);border-top:1px solid var(--vp-border-subtle)}.vp-table__page-btn{min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__page-btn:disabled{opacity:.5;cursor:not-allowed}.vp-table__page-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}@media(prefers-reduced-motion:reduce){.vp-table__skeleton-row{animation:none}}.vp-table__cols-btn{margin-left:auto;min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-raised);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__cols-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__cols{display:flex;flex-direction:column;gap:var(--vp-space-1);margin-bottom:var(--vp-space-3);padding:var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised)}.vp-table__cols-row{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3)}.vp-table__cols-label{display:flex;align-items:center;gap:var(--vp-space-2);cursor:pointer}.vp-table__cols-move button{min-width:var(--vp-min-target);min-height:var(--vp-min-target);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-default);color:var(--vp-text-primary);cursor:pointer}.vp-table__cols-move button:disabled{opacity:.4;cursor:not-allowed}.vp-table__cols-move button:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__select-cell{width:var(--vp-min-target);text-align:center}.vp-table__bulk,.vp-table__bulk-confirm,.vp-table__bulk-report{display:flex;align-items:center;justify-content:space-between;gap:var(--vp-space-3);margin-bottom:var(--vp-space-3);padding:var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-lg);background:var(--vp-surface-raised);font-size:var(--vp-text-sm)}.vp-table__bulk-report{display:block}.vp-table__bulk-confirm{border-color:var(--vp-danger)}.vp-table__bulk-actions{display:flex;gap:var(--vp-space-2)}.vp-table__bulk-btn{min-height:var(--vp-control-height);min-width:var(--vp-min-target);padding:0 var(--vp-space-3);border:1px solid var(--vp-border-default);border-radius:var(--vp-radius-md);background:var(--vp-surface-default);color:var(--vp-text-primary);font:inherit;cursor:pointer}.vp-table__bulk-btn:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__bulk-btn--danger{border-color:var(--vp-danger);color:var(--vp-danger)}.vp-table__bulk-failures{margin:var(--vp-space-2) 0 0;padding-left:var(--vp-space-5)}.vp-table__expand{min-width:var(--vp-min-target);min-height:var(--vp-min-target);border:1px solid transparent;border-radius:var(--vp-radius-md);background:transparent;color:var(--vp-text-primary);cursor:pointer}.vp-table__expand:focus-visible{outline:var(--vp-focus-width) solid var(--vp-focus-ring);outline-offset:var(--vp-focus-offset)}.vp-table__detail-row>td{background:var(--vp-surface-raised);padding:var(--vp-space-4)}.vp-table__detail-empty{color:var(--vp-text-muted)}.vp-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\n"] }]
|
|
4310
4371
|
}], propDecorators: { columns: [{
|
|
4311
4372
|
type: Input,
|