@aseansc/ui 4.0.1 → 5.0.0
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/CHANGELOG.md +1021 -978
- package/fesm2022/aseansc-ui.mjs +106 -27
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/_semantic.scss +6 -2
- package/tokens/layout/_main.scss +1 -1
- package/tokens/layout/_menu.scss +25 -7
- package/tokens/layout/_responsive.scss +12 -1
- package/tokens/layout/_topbar.scss +164 -159
- package/tokens/layout/variables/_common.scss +4 -0
- package/tokens/layout/variables/_dark.scss +2 -0
- package/tokens/layout/variables/_light.scss +2 -1
- package/tokens/preset.css +48 -14
- package/types/aseansc-ui.d.ts +16 -1
package/fesm2022/aseansc-ui.mjs
CHANGED
|
@@ -482,6 +482,11 @@ const ASC_PRESET = definePreset(Aura, {
|
|
|
482
482
|
},
|
|
483
483
|
// ── Component-level overrides ──────────────────────────────────────────────
|
|
484
484
|
components: {
|
|
485
|
+
breadcrumb: {
|
|
486
|
+
root: {
|
|
487
|
+
background: 'transparent', // nằm trên topbar blur — không phủ nền riêng
|
|
488
|
+
},
|
|
489
|
+
},
|
|
485
490
|
button: {
|
|
486
491
|
root: {
|
|
487
492
|
borderRadius: '999px',
|
|
@@ -548,6 +553,15 @@ const ASC_PRESET = definePreset(Aura, {
|
|
|
548
553
|
root: {
|
|
549
554
|
borderColor: '{surface.200}',
|
|
550
555
|
},
|
|
556
|
+
// Aura khai báo root.borderColor riêng trong colorScheme (light = content.border.color,
|
|
557
|
+
// dark = surface.800) → ghi đè root ở trên, nên phải override tại colorScheme.
|
|
558
|
+
colorScheme: {
|
|
559
|
+
light: {
|
|
560
|
+
root: {
|
|
561
|
+
borderColor: 'var(--asc-table-border-color)', // #0C0C0D1A — xem _semantic.scss
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
},
|
|
551
565
|
headerCell: {
|
|
552
566
|
padding: '10px 8px',
|
|
553
567
|
},
|
|
@@ -5572,6 +5586,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
5572
5586
|
* @example
|
|
5573
5587
|
* <asc-icon src="/assets/icons/user.svg" />
|
|
5574
5588
|
* <asc-icon src="/assets/icons/star.svg" size="24px" (loadError)="onIconError($event)" />
|
|
5589
|
+
* <asc-icon src="/assets/icons/logo.svg" width="96px" height="24px" />
|
|
5575
5590
|
*/
|
|
5576
5591
|
class AscIconComponent {
|
|
5577
5592
|
constructor() {
|
|
@@ -5582,6 +5597,12 @@ class AscIconComponent {
|
|
|
5582
5597
|
/** Kích thước CSS áp cho width/height — vd '24px', '1.5rem' */
|
|
5583
5598
|
this.size = input('1em', /* @ts-ignore */
|
|
5584
5599
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
5600
|
+
/** Ghi đè riêng chiều rộng — ưu tiên hơn `size` (icon không vuông) */
|
|
5601
|
+
this.width = input(undefined, /* @ts-ignore */
|
|
5602
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
5603
|
+
/** Ghi đè riêng chiều cao — ưu tiên hơn `size` (icon không vuông) */
|
|
5604
|
+
this.height = input(undefined, /* @ts-ignore */
|
|
5605
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
5585
5606
|
/** Emit khi fetch SVG lỗi (404, network...) */
|
|
5586
5607
|
this.loadError = output();
|
|
5587
5608
|
this.svg$ = toObservable(this.src).pipe(switchMap(src => this.iconService.load(src).pipe(catchError(err => {
|
|
@@ -5591,17 +5612,17 @@ class AscIconComponent {
|
|
|
5591
5612
|
this.svg = toSignal(this.svg$, { initialValue: null });
|
|
5592
5613
|
}
|
|
5593
5614
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AscIconComponent, isStandalone: true, selector: "asc-icon", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadError: "loadError" }, host: { properties: { "style.display": "'inline-flex'", "style.width": "size()", "style.height": "size()" }, classAttribute: "asc-icon" }, ngImport: i0, template: `<span class="asc-icon__svg" [innerHTML]="svg()"></span>`, isInline: true, styles: [":host{line-height:0}.asc-icon__svg{display:contents}:host ::ng-deep svg{width:100%;height:100%;display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5615
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AscIconComponent, isStandalone: true, selector: "asc-icon", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadError: "loadError" }, host: { properties: { "style.display": "'inline-flex'", "style.width": "width() || size()", "style.height": "height() || size()" }, classAttribute: "asc-icon" }, ngImport: i0, template: `<span class="asc-icon__svg" [innerHTML]="svg()"></span>`, isInline: true, styles: [":host{line-height:0}.asc-icon__svg{display:contents}:host ::ng-deep svg{width:100%;height:100%;display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5595
5616
|
}
|
|
5596
5617
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, decorators: [{
|
|
5597
5618
|
type: Component,
|
|
5598
5619
|
args: [{ selector: 'asc-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5599
5620
|
class: 'asc-icon',
|
|
5600
5621
|
'[style.display]': "'inline-flex'",
|
|
5601
|
-
'[style.width]': 'size()',
|
|
5602
|
-
'[style.height]': 'size()',
|
|
5622
|
+
'[style.width]': 'width() || size()',
|
|
5623
|
+
'[style.height]': 'height() || size()',
|
|
5603
5624
|
}, template: `<span class="asc-icon__svg" [innerHTML]="svg()"></span>`, styles: [":host{line-height:0}.asc-icon__svg{display:contents}:host ::ng-deep svg{width:100%;height:100%;display:block}\n"] }]
|
|
5604
|
-
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], loadError: [{ type: i0.Output, args: ["loadError"] }] } });
|
|
5625
|
+
}], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], loadError: [{ type: i0.Output, args: ["loadError"] }] } });
|
|
5605
5626
|
|
|
5606
5627
|
/**
|
|
5607
5628
|
* @file asc-table.directive.ts
|
|
@@ -5805,7 +5826,7 @@ class AscTableComponent {
|
|
|
5805
5826
|
this.rowsPerPageOptions = input([10, 25, 50, 100], /* @ts-ignore */
|
|
5806
5827
|
...(ngDevMode ? [{ debugName: "rowsPerPageOptions" }] : /* istanbul ignore next */ []));
|
|
5807
5828
|
/** Hiện nút về trang đầu/cuối (double chevron) trên thanh phân trang */
|
|
5808
|
-
this.showFirstLastIcon = input(
|
|
5829
|
+
this.showFirstLastIcon = input(true, /* @ts-ignore */
|
|
5809
5830
|
...(ngDevMode ? [{ debugName: "showFirstLastIcon" }] : /* istanbul ignore next */ []));
|
|
5810
5831
|
/** Hiện dòng báo cáo tổng số bản ghi (vd: "50 bản ghi") */
|
|
5811
5832
|
this.showCurrentPageReport = input(true, /* @ts-ignore */
|
|
@@ -5872,7 +5893,7 @@ class AscTableComponent {
|
|
|
5872
5893
|
...(ngDevMode ? [{ debugName: "virtualScrollItemSize" }] : /* istanbul ignore next */ []));
|
|
5873
5894
|
this.showGridlines = input(true, /* @ts-ignore */
|
|
5874
5895
|
...(ngDevMode ? [{ debugName: "showGridlines" }] : /* istanbul ignore next */ []));
|
|
5875
|
-
this.stripedRows = input(
|
|
5896
|
+
this.stripedRows = input(false, /* @ts-ignore */
|
|
5876
5897
|
...(ngDevMode ? [{ debugName: "stripedRows" }] : /* istanbul ignore next */ []));
|
|
5877
5898
|
this.resizableColumns = input(false, /* @ts-ignore */
|
|
5878
5899
|
...(ngDevMode ? [{ debugName: "resizableColumns" }] : /* istanbul ignore next */ []));
|
|
@@ -6521,7 +6542,7 @@ class AscTableComponent {
|
|
|
6521
6542
|
URL.revokeObjectURL(url);
|
|
6522
6543
|
}
|
|
6523
6544
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6524
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscTableComponent, isStandalone: true, selector: "asc-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsDisplay: { classPropertyName: "actionsDisplay", publicName: "actionsDisplay", isSignal: true, isRequired: false, transformFunction: null }, contextMenuActions: { classPropertyName: "contextMenuActions", publicName: "contextMenuActions", isSignal: true, isRequired: false, transformFunction: null }, selectionActions: { classPropertyName: "selectionActions", publicName: "selectionActions", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: true, isRequired: false, transformFunction: null }, showCurrentPageReport: { classPropertyName: "showCurrentPageReport", publicName: "showCurrentPageReport", isSignal: true, isRequired: false, transformFunction: null }, currentPageReportTemplate: { classPropertyName: "currentPageReportTemplate", publicName: "currentPageReportTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, rowDisabled: { classPropertyName: "rowDisabled", publicName: "rowDisabled", isSignal: true, isRequired: false, transformFunction: null }, selectionGroupField: { classPropertyName: "selectionGroupField", publicName: "selectionGroupField", isSignal: true, isRequired: false, transformFunction: null }, checkedField: { classPropertyName: "checkedField", publicName: "checkedField", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, showGridlines: { classPropertyName: "showGridlines", publicName: "showGridlines", isSignal: true, isRequired: false, transformFunction: null }, stripedRows: { classPropertyName: "stripedRows", publicName: "stripedRows", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, reorderableColumns: { classPropertyName: "reorderableColumns", publicName: "reorderableColumns", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showColumnManager: { classPropertyName: "showColumnManager", publicName: "showColumnManager", isSignal: true, isRequired: false, transformFunction: null }, exportable: { classPropertyName: "exportable", publicName: "exportable", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, showRowNumber: { classPropertyName: "showRowNumber", publicName: "showRowNumber", isSignal: true, isRequired: false, transformFunction: null }, rowNumberHeader: { classPropertyName: "rowNumberHeader", publicName: "rowNumberHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsHeader: { classPropertyName: "actionsHeader", publicName: "actionsHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMinWidth: { classPropertyName: "actionsMinWidth", publicName: "actionsMinWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMaxWidth: { classPropertyName: "actionsMaxWidth", publicName: "actionsMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", pageChange: "pageChange", sortChange: "sortChange", filterChange: "filterChange", selectionChange: "selectionChange", rowSelected: "rowSelected", rowUnselected: "rowUnselected", rowClicked: "rowClicked", rowExpanded: "rowExpanded", rowCollapsed: "rowCollapsed", groupCheckedChange: "groupCheckedChange" }, providers: [DatePipe], queries: [{ propertyName: "cellTpls", predicate: AscTableCellDirective, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: AscTableExpandDirective, descendants: true, isSignal: true }, { propertyName: "emptyTpl", first: true, predicate: AscTableEmptyDirective, descendants: true, isSignal: true }, { propertyName: "captionTpl", first: true, predicate: AscTableCaptionDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n @file asc-table.html\n AscTableComponent template\n\n Structure:\n .asc-table-wrapper\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\n \u2514\u2500\u2500 p-table\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\n-->\n\n<div class=\"asc-table-wrapper\">\n\n <!-- \u2500\u2500 Caption / Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <ng-template #defaultCaption>\n @if (showToolbar()) {\n <div class=\"asc-table-toolbar\">\n <!-- Left slot: search -->\n <div class=\"asc-table-toolbar-left\">\n @if (showSearch()) {\n <p-iconfield iconPosition=\"left\">\n <p-inputicon class=\"pi pi-search\"/>\n <input\n pInputText\n type=\"text\"\n [placeholder]=\"msg.table.searchPlaceholder\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"handleGlobalFilter($event)\"\n class=\"asc-table-search-input\"\n />\n </p-iconfield>\n }\n </div>\n\n <!-- Right slot: column manager + export -->\n <div class=\"asc-table-toolbar-right\">\n @if (showColumnManager()) {\n <p-button\n #columnManagerBtn\n icon=\"pi pi-table\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\n (onClick)=\"columnManagerOverlay.toggle($event)\"\n />\n <!-- Column manager popover -->\n <p-popover #columnManagerOverlay>\n <div class=\"asc-column-manager\">\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\n @for (col of columnVisibility(); track col.field) {\n <div class=\"asc-column-manager-item\">\n <p-checkbox\n [ngModel]=\"col.visible\"\n [binary]=\"true\"\n [inputId]=\"'col-' + col.field\"\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\n />\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\n </div>\n }\n </div>\n </p-popover>\n }\n\n @if (exportable()) {\n <p-button\n icon=\"pi pi-download\"\n [label]=\"msg.table.exportCsv\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"exportCsv()\"\n />\n }\n </div>\n </div>\n }\n </ng-template>\n\n <!-- \u2500\u2500 PrimeNG Table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p-table\n #dt\n [value]=\"data()\"\n [loading]=\"loading()\"\n [lazy]=\"lazy()\"\n [totalRecords]=\"totalRecords()\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [paginator]=\"paginator()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\n [sortMode]=\"sortMode()\"\n [defaultSortOrder]=\"1\"\n [reorderableColumns]=\"reorderableColumns()\"\n [resizableColumns]=\"resizableColumns()\"\n [columnResizeMode]=\"'expand'\"\n [showGridlines]=\"showGridlines()\"\n [stripedRows]=\"stripedRows()\"\n [scrollable]=\"resolvedScrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [virtualScroll]=\"virtualScroll()\"\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\n [selectionMode]=\"pSelectionMode()\"\n [(selection)]=\"selectedRowsModel\"\n [rowSelectable]=\"pRowSelectable\"\n [dataKey]=\"dataKey()\"\n [(contextMenuSelection)]=\"contextMenuRow\"\n [globalFilterFields]=\"globalFilterFields()\"\n [rowExpandMode]=\"'multiple'\"\n [class]=\"tableStyleClass()\"\n (onPage)=\"handlePage($event)\"\n (onSort)=\"handleSort($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n (onRowSelect)=\"rowSelected.emit($event)\"\n (onRowUnselect)=\"rowUnselected.emit($event)\"\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\n >\n\n <!-- \u2500\u2500 Context menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #header>\n <tr>\n <!-- Expand toggle column -->\n @if (expandable()) {\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\n }\n\n <!-- Selection column -->\n @if (selectionMode() === 'multiple') {\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\n style=\"width: 3rem\" [frozen]=\"true\">\n <p-tableHeaderCheckbox/>\n </th>\n }\n @if (selectionMode() === 'single') {\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\n }\n\n <!-- Row number column -->\n @if (showRowNumber()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-th asc-th-row-number\"\n style=\"width: 4rem; text-align: center\"\n >\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\n </th>\n }\n\n <!-- Data columns -->\n @for (cell of headerCells(); track cell.col.field) {\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\n </th>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{\n col: cell.col,\n colspan: cell.colspan,\n rowspan: hasHeaderGroups() ? 2 : 1\n }\"\n />\n }\n }\n\n <!-- Actions column header -->\n @if (hasActionsColumn()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-th asc-th-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n style=\"text-align: center\"\n >\n {{ actionsHeader() ?? msg.table.actionsHeader }}\n </th>\n }\n </tr>\n\n <!-- H\u00E0ng header th\u1EE9 2 (opt-in) \u2014 ch\u1EC9 xu\u1EA5t hi\u1EC7n khi c\u00F3 \u00EDt nh\u1EA5t 1 group (headerGroup) -->\n @if (hasHeaderGroups()) {\n <tr>\n @for (col of subHeaderColumns(); track col.field) {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\n />\n }\n </tr>\n }\n </ng-template>\n\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\n <th\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\n [pSortableColumnDisabled]=\"!col.sortable\"\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"col.headerClass ?? ''\"\n class=\"asc-th\"\n >\n <div class=\"asc-th-content\">\n <span class=\"asc-th-text\">{{ col.header }}</span>\n\n @if (col.sortable) {\n <p-sortIcon [field]=\"col.field\"/>\n }\n\n @if (col.filterable) {\n <p-column-filter\n [field]=\"col.field\"\n [type]=\"resolveFilterType(col)\"\n display=\"menu\"\n class=\"asc-col-filter\"\n />\n }\n </div>\n </th>\n </ng-template>\n\n <!-- \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowIndex]=\"rowIndex\"\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\n [pContextMenuRow]=\"row\"\n [class.asc-row-selected]=\"isSelected(row)\"\n [class.asc-row-expanded]=\"expanded\"\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\n (click)=\"rowClicked.emit(row)\"\n >\n <!-- Expand toggle -->\n @if (expandable()) {\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\n <p-button\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pRowToggler]=\"row\"\n />\n </td>\n }\n\n <!-- Selection -->\n @if (selectionMode() === 'multiple') {\n @if (!selectionGroupField()) {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\"\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\n (click)=\"$event.stopPropagation()\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\n />\n </td>\n }\n }\n @if (selectionMode() === 'single') {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n }\n\n <!-- Row number cell -->\n @if (showRowNumber()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-td asc-td-row-number\"\n style=\"text-align: center\"\n >{{ rowIndex + 1 }}\n </td>\n }\n\n <!-- Data cells -->\n @for (col of visibleColumns(); track col.field) {\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\n <td\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"resolveCellClass(col, row)\"\n class=\"asc-td\"\n >\n <ng-container\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\n [ngTemplateOutletContext]=\"{\n $implicit: getCellValue(row, col.field),\n row: row,\n index: rowIndex,\n column: col\n }\"\n />\n </td>\n }\n }\n\n <!-- Actions column -->\n @if (hasActionsColumn()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-td asc-td-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (actionsDisplay() === 'dropdown') {\n <p-button\n icon=\"pi pi-ellipsis-v\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\n />\n } @else {\n <div class=\"asc-actions-wrap\">\n @for (action of getVisibleActions(row); track action.label) {\n <p-button\n [icon]=\"action.iconSrc ? '' : (action.icon ?? '')\"\n [label]=\"action.label ?? ''\"\n [severity]=\"action.severity ?? 'secondary'\"\n [disabled]=\"action.disabled?.(row) ?? false\"\n [pTooltip]=\"action.tooltip ?? ''\"\n tooltipPosition=\"top\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"action.command(row, rowIndex)\"\n >\n @if (action.iconSrc) {\n <ng-template #icon>\n <asc-icon [src]=\"action.iconSrc\" />\n </ng-template>\n }\n </p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\n @if (hasFooter()) {\n <ng-template #footer>\n <tr>\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\n @if (expandable()) {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'multiple') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'single') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (showRowNumber()) {\n <td class=\"asc-td-footer\"></td>\n }\n\n @for (cell of footerCells(); track cell.col.field) {\n <td\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\n [class]=\"cell.col.headerClass ?? ''\"\n class=\"asc-td-footer\"\n >\n {{ cell.col.footer }}\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td class=\"asc-td-footer\"></td>\n }\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Row expand content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (expandable() && expandTpl()) {\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\n <tr class=\"asc-row-expansion\">\n <td [attr.colspan]=\"expandColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\n />\n </td>\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Loading skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #loadingbody>\n @for (i of skeletonRows(); track i) {\n <tr class=\"asc-row-skeleton\">\n @if (expandable()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\n </td>\n }\n @if (selectionMode() === 'multiple') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (selectionMode() === 'single') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (showRowNumber()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n\n @for (col of visibleColumns(); track col.field) {\n <td>\n <p-skeleton\n height=\"1.5rem\"\n [width]=\"getSkeletonWidth(col)\"\n />\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\n </td>\n }\n </tr>\n }\n </ng-template>\n\n <!-- \u2500\u2500 Empty state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\n @if (emptyTpl()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\n } @else {\n <div class=\"asc-empty-default\">\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n </p-table>\n\n <!-- Shared popup menu for dropdown action mode -->\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\n <ng-template #item let-item>\n <a class=\"p-menu-item-link\" pRipple>\n @if (item.iconSrc) {\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\n } @else if (item.icon) {\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\n }\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n </a>\n </ng-template>\n </p-menu>\n\n</div>\n\n<!-- \u2500\u2500 Default cell template (text) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n<!--\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\n-->\n<ng-template\n #defaultCell\n let-value\n let-row=\"row\"\n let-col=\"column\"\n>\n @switch (col?.type ?? 'text') {\n\n @case ('number') {\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\n }\n @case ('currency') {\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\n }\n @case ('date') {\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\n }\n @case ('datetime') {\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\n }\n @case ('boolean') {\n <i\n [class]=\"value\n ? 'pi pi-check-circle text-green-600'\n : 'pi pi-times-circle text-red-400'\"\n class=\"asc-cell-boolean\"\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\n ></i>\n }\n @case ('badge') {\n @if (resolveBadge(value, col); as badge) {\n <p-tag\n [value]=\"badge.label\"\n [severity]=\"mapSeverityToTag(badge.severity)\"\n [icon]=\"badge.icon ?? ''\"\n />\n } @else {\n <span>{{ value ?? '\u2014' }}</span>\n }\n }\n @case ('avatar') {\n <div class=\"asc-cell-avatar\">\n <p-avatar\n [label]=\"getInitials(value)\"\n shape=\"circle\"\n size=\"normal\"\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\n />\n <span>{{ value }}</span>\n </div>\n }\n @default {\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\n <span\n class=\"asc-cell-text\"\n [class.asc-cell-text-clamp]=\"textClamped\"\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\n tooltipPosition=\"right\"\n >{{ formatText(value, col?.format) }}</span>\n }\n\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);overflow:hidden}.asc-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--asc-border-color);gap:.75rem;flex-wrap:wrap;background:var(--asc-surface-0)}.asc-table-toolbar-left,.asc-table-toolbar-right{display:flex;align-items:center;gap:.5rem}.asc-table-search-input{width:18rem;font-size:.875rem}.asc-table-selection-bar{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;background:color-mix(in srgb,var(--p-primary-500) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--p-primary-500) 20%,transparent);font-size:.875rem;color:var(--p-primary-700)}.asc-table-selection-bar-actions{display:flex;align-items:center;gap:.25rem}.asc-table-selection-count{font-weight:500}.asc-column-manager{min-width:14rem;display:flex;flex-direction:column;gap:.5rem}.asc-column-manager-title{font-size:.8125rem;font-weight:600;color:var(--asc-text-secondary);text-transform:uppercase;letter-spacing:.05em;margin:0 0 .25rem}.asc-column-manager-item{display:flex;align-items:center;gap:.625rem;font-size:.875rem;cursor:pointer;padding:.25rem 0}.asc-column-manager-item label{cursor:pointer}.asc-th{font-size:var(--asc-text-xs);font-weight:500;color:var(--asc-text-primary);white-space:nowrap;-webkit-user-select:none;user-select:none}.asc-th-content{display:flex;align-items:center;gap:.25rem}.asc-th-text{flex:1}.asc-th-expand,.asc-th-select{padding:.5rem!important;text-align:center}.asc-th-actions{text-align:center!important}.asc-th-group{text-align:center;font-weight:600}.asc-col-filter{margin-left:auto;flex-shrink:0}.asc-td{font-size:12px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:.25rem .5rem!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:.875rem;font-weight:600;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums;font-weight:500}.asc-cell-boolean{font-size:1.125rem}.asc-cell-avatar{display:flex;align-items:center;gap:.5rem;font-weight:500}.asc-cell-text-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.asc-actions-wrap{display:flex;align-items:center;justify-content:center;gap:.125rem}.asc-row-expansion>td{padding:0!important;border-top:none!important}.asc-row-skeleton td{border-color:transparent!important}.asc-row-disabled .asc-td-select{opacity:.5}.asc-empty-default{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;gap:.75rem}.asc-empty-icon{font-size:2.5rem;color:var(--asc-text-muted)}.asc-empty-text{font-size:.875rem;color:var(--asc-text-secondary);margin:0}::ng-deep .asc-table-wrapper .p-datatable{border:none}::ng-deep .asc-table-wrapper .p-datatable-thead>tr>th{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-paginator{margin-top:22px;padding:unset;justify-content:end}::ng-deep .asc-table-wrapper .p-paginator .p-select-label{padding:unset}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-rpp-dropdown{order:1}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-current{order:2;font-size:12px;color:var(--asc-text-secondary)}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-first{order:3}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-prev{order:4;margin-left:24px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-pages{order:5;gap:8px;margin:0 16px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-next{order:6}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-last{order:7}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown{border:none;background:transparent;box-shadow:none;min-width:auto}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{border:1px solid var(--asc-border-color);border-radius:8px;background:var(--asc-surface-0);min-width:32px;height:32px;font-size:14px}::ng-deep .asc-table-wrapper .p-paginator-page.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-prev.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-next.p-paginator-page-selected{background:var(--p-primary-500);border-color:var(--p-primary-500);color:#fff}::ng-deep .asc-table-wrapper .p-datatable-frozen-column{background:var(--asc-surface-0);box-shadow:2px 0 6px -2px #0000001f}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n) .p-datatable-frozen-column{background:var(--asc-surface-50)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i3$4.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i3$4.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "directive", type: i3$4.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i3$4.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "component", type: i3$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3$4.TableRadioButton, selector: "p-tableRadioButton", inputs: ["value", "disabled", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2$7.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i3$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i4.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i9.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i10.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i11.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i13.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i14.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo", "motionOptions"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i15.Ripple, selector: "[pRipple]" }, { kind: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size"], outputs: ["loadError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscTableComponent, isStandalone: true, selector: "asc-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, actionsDisplay: { classPropertyName: "actionsDisplay", publicName: "actionsDisplay", isSignal: true, isRequired: false, transformFunction: null }, contextMenuActions: { classPropertyName: "contextMenuActions", publicName: "contextMenuActions", isSignal: true, isRequired: false, transformFunction: null }, selectionActions: { classPropertyName: "selectionActions", publicName: "selectionActions", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: true, isRequired: false, transformFunction: null }, showCurrentPageReport: { classPropertyName: "showCurrentPageReport", publicName: "showCurrentPageReport", isSignal: true, isRequired: false, transformFunction: null }, currentPageReportTemplate: { classPropertyName: "currentPageReportTemplate", publicName: "currentPageReportTemplate", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, rowDisabled: { classPropertyName: "rowDisabled", publicName: "rowDisabled", isSignal: true, isRequired: false, transformFunction: null }, selectionGroupField: { classPropertyName: "selectionGroupField", publicName: "selectionGroupField", isSignal: true, isRequired: false, transformFunction: null }, checkedField: { classPropertyName: "checkedField", publicName: "checkedField", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, showGridlines: { classPropertyName: "showGridlines", publicName: "showGridlines", isSignal: true, isRequired: false, transformFunction: null }, stripedRows: { classPropertyName: "stripedRows", publicName: "stripedRows", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, reorderableColumns: { classPropertyName: "reorderableColumns", publicName: "reorderableColumns", isSignal: true, isRequired: false, transformFunction: null }, showToolbar: { classPropertyName: "showToolbar", publicName: "showToolbar", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, showColumnManager: { classPropertyName: "showColumnManager", publicName: "showColumnManager", isSignal: true, isRequired: false, transformFunction: null }, exportable: { classPropertyName: "exportable", publicName: "exportable", isSignal: true, isRequired: false, transformFunction: null }, expandable: { classPropertyName: "expandable", publicName: "expandable", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, showRowNumber: { classPropertyName: "showRowNumber", publicName: "showRowNumber", isSignal: true, isRequired: false, transformFunction: null }, rowNumberHeader: { classPropertyName: "rowNumberHeader", publicName: "rowNumberHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsHeader: { classPropertyName: "actionsHeader", publicName: "actionsHeader", isSignal: true, isRequired: false, transformFunction: null }, actionsWidth: { classPropertyName: "actionsWidth", publicName: "actionsWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMinWidth: { classPropertyName: "actionsMinWidth", publicName: "actionsMinWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsMaxWidth: { classPropertyName: "actionsMaxWidth", publicName: "actionsMaxWidth", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", pageChange: "pageChange", sortChange: "sortChange", filterChange: "filterChange", selectionChange: "selectionChange", rowSelected: "rowSelected", rowUnselected: "rowUnselected", rowClicked: "rowClicked", rowExpanded: "rowExpanded", rowCollapsed: "rowCollapsed", groupCheckedChange: "groupCheckedChange" }, providers: [DatePipe], queries: [{ propertyName: "cellTpls", predicate: AscTableCellDirective, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: AscTableExpandDirective, descendants: true, isSignal: true }, { propertyName: "emptyTpl", first: true, predicate: AscTableEmptyDirective, descendants: true, isSignal: true }, { propertyName: "captionTpl", first: true, predicate: AscTableCaptionDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n @file asc-table.html\n AscTableComponent template\n\n Structure:\n .asc-table-wrapper\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\n \u2514\u2500\u2500 p-table\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\n-->\n\n<div class=\"asc-table-wrapper\">\n\n <!-- \u2500\u2500 Caption / Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <ng-template #defaultCaption>\n @if (showToolbar()) {\n <div class=\"asc-table-toolbar\">\n <!-- Left slot: search -->\n <div class=\"asc-table-toolbar-left\">\n @if (showSearch()) {\n <p-iconfield iconPosition=\"left\">\n <p-inputicon class=\"pi pi-search\"/>\n <input\n pInputText\n type=\"text\"\n [placeholder]=\"msg.table.searchPlaceholder\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"handleGlobalFilter($event)\"\n class=\"asc-table-search-input\"\n />\n </p-iconfield>\n }\n </div>\n\n <!-- Right slot: column manager + export -->\n <div class=\"asc-table-toolbar-right\">\n @if (showColumnManager()) {\n <p-button\n #columnManagerBtn\n icon=\"pi pi-table\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\n (onClick)=\"columnManagerOverlay.toggle($event)\"\n />\n <!-- Column manager popover -->\n <p-popover #columnManagerOverlay>\n <div class=\"asc-column-manager\">\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\n @for (col of columnVisibility(); track col.field) {\n <div class=\"asc-column-manager-item\">\n <p-checkbox\n [ngModel]=\"col.visible\"\n [binary]=\"true\"\n [inputId]=\"'col-' + col.field\"\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\n />\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\n </div>\n }\n </div>\n </p-popover>\n }\n\n @if (exportable()) {\n <p-button\n icon=\"pi pi-download\"\n [label]=\"msg.table.exportCsv\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"exportCsv()\"\n />\n }\n </div>\n </div>\n }\n </ng-template>\n\n <!-- \u2500\u2500 PrimeNG Table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p-table\n #dt\n [value]=\"data()\"\n [loading]=\"loading()\"\n [lazy]=\"lazy()\"\n [totalRecords]=\"totalRecords()\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [paginator]=\"paginator()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\n [sortMode]=\"sortMode()\"\n [defaultSortOrder]=\"1\"\n [reorderableColumns]=\"reorderableColumns()\"\n [resizableColumns]=\"resizableColumns()\"\n [columnResizeMode]=\"'expand'\"\n [showGridlines]=\"showGridlines()\"\n [stripedRows]=\"stripedRows()\"\n [scrollable]=\"resolvedScrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [virtualScroll]=\"virtualScroll()\"\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\n [selectionMode]=\"pSelectionMode()\"\n [(selection)]=\"selectedRowsModel\"\n [rowSelectable]=\"pRowSelectable\"\n [dataKey]=\"dataKey()\"\n [(contextMenuSelection)]=\"contextMenuRow\"\n [globalFilterFields]=\"globalFilterFields()\"\n [rowExpandMode]=\"'multiple'\"\n [class]=\"tableStyleClass()\"\n (onPage)=\"handlePage($event)\"\n (onSort)=\"handleSort($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n (onRowSelect)=\"rowSelected.emit($event)\"\n (onRowUnselect)=\"rowUnselected.emit($event)\"\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\n >\n\n <!-- \u2500\u2500 Context menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #header>\n <tr>\n <!-- Expand toggle column -->\n @if (expandable()) {\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\n }\n\n <!-- Selection column -->\n @if (selectionMode() === 'multiple') {\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\n style=\"width: 3rem\" [frozen]=\"true\">\n <p-tableHeaderCheckbox/>\n </th>\n }\n @if (selectionMode() === 'single') {\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\n }\n\n <!-- Row number column -->\n @if (showRowNumber()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-th asc-th-row-number\"\n style=\"width: 4rem; text-align: center\"\n >\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\n </th>\n }\n\n <!-- Data columns -->\n @for (cell of headerCells(); track cell.col.field) {\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\n </th>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{\n col: cell.col,\n colspan: cell.colspan,\n rowspan: hasHeaderGroups() ? 2 : 1\n }\"\n />\n }\n }\n\n <!-- Actions column header -->\n @if (hasActionsColumn()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-th asc-th-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n style=\"text-align: center\"\n >\n {{ actionsHeader() ?? msg.table.actionsHeader }}\n </th>\n }\n </tr>\n\n <!-- H\u00E0ng header th\u1EE9 2 (opt-in) \u2014 ch\u1EC9 xu\u1EA5t hi\u1EC7n khi c\u00F3 \u00EDt nh\u1EA5t 1 group (headerGroup) -->\n @if (hasHeaderGroups()) {\n <tr>\n @for (col of subHeaderColumns(); track col.field) {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\n />\n }\n </tr>\n }\n </ng-template>\n\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\n <th\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\n [pSortableColumnDisabled]=\"!col.sortable\"\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"col.headerClass ?? ''\"\n class=\"asc-th\"\n >\n <div class=\"asc-th-content\">\n <span class=\"asc-th-text\">{{ col.header }}</span>\n\n @if (col.sortable) {\n <p-sortIcon [field]=\"col.field\"/>\n }\n\n @if (col.filterable) {\n <p-column-filter\n [field]=\"col.field\"\n [type]=\"resolveFilterType(col)\"\n display=\"menu\"\n class=\"asc-col-filter\"\n />\n }\n </div>\n </th>\n </ng-template>\n\n <!-- \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowIndex]=\"rowIndex\"\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\n [pContextMenuRow]=\"row\"\n [class.asc-row-selected]=\"isSelected(row)\"\n [class.asc-row-expanded]=\"expanded\"\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\n (click)=\"rowClicked.emit(row)\"\n >\n <!-- Expand toggle -->\n @if (expandable()) {\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\n <p-button\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pRowToggler]=\"row\"\n />\n </td>\n }\n\n <!-- Selection -->\n @if (selectionMode() === 'multiple') {\n @if (!selectionGroupField()) {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\"\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\n (click)=\"$event.stopPropagation()\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\n />\n </td>\n }\n }\n @if (selectionMode() === 'single') {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n }\n\n <!-- Row number cell -->\n @if (showRowNumber()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-td asc-td-row-number\"\n style=\"text-align: center\"\n >{{ rowIndex + 1 }}\n </td>\n }\n\n <!-- Data cells -->\n @for (col of visibleColumns(); track col.field) {\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\n <td\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"resolveCellClass(col, row)\"\n class=\"asc-td\"\n >\n <ng-container\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\n [ngTemplateOutletContext]=\"{\n $implicit: getCellValue(row, col.field),\n row: row,\n index: rowIndex,\n column: col\n }\"\n />\n </td>\n }\n }\n\n <!-- Actions column -->\n @if (hasActionsColumn()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-td asc-td-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (actionsDisplay() === 'dropdown') {\n <p-button\n icon=\"pi pi-ellipsis-v\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\n />\n } @else {\n <div class=\"asc-actions-wrap\">\n @for (action of getVisibleActions(row); track action.label) {\n <p-button\n [icon]=\"action.iconSrc ? '' : (action.icon ?? '')\"\n [label]=\"action.label ?? ''\"\n [severity]=\"action.severity ?? 'secondary'\"\n [disabled]=\"action.disabled?.(row) ?? false\"\n [pTooltip]=\"action.tooltip ?? ''\"\n tooltipPosition=\"top\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"action.command(row, rowIndex)\"\n >\n @if (action.iconSrc) {\n <ng-template #icon>\n <asc-icon [src]=\"action.iconSrc\" />\n </ng-template>\n }\n </p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\n @if (hasFooter()) {\n <ng-template #footer>\n <tr>\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\n @if (expandable()) {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'multiple') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'single') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (showRowNumber()) {\n <td class=\"asc-td-footer\"></td>\n }\n\n @for (cell of footerCells(); track cell.col.field) {\n <td\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\n [class]=\"cell.col.headerClass ?? ''\"\n class=\"asc-td-footer\"\n >\n {{ cell.col.footer }}\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td class=\"asc-td-footer\"></td>\n }\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Row expand content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (expandable() && expandTpl()) {\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\n <tr class=\"asc-row-expansion\">\n <td [attr.colspan]=\"expandColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\n />\n </td>\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Loading skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #loadingbody>\n @for (i of skeletonRows(); track i) {\n <tr class=\"asc-row-skeleton\">\n @if (expandable()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\n </td>\n }\n @if (selectionMode() === 'multiple') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (selectionMode() === 'single') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (showRowNumber()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n\n @for (col of visibleColumns(); track col.field) {\n <td>\n <p-skeleton\n height=\"1.5rem\"\n [width]=\"getSkeletonWidth(col)\"\n />\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\n </td>\n }\n </tr>\n }\n </ng-template>\n\n <!-- \u2500\u2500 Empty state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\n @if (emptyTpl()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\n } @else {\n <div class=\"asc-empty-default\">\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n </p-table>\n\n <!-- Shared popup menu for dropdown action mode -->\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\n <ng-template #item let-item>\n <a class=\"p-menu-item-link\" pRipple>\n @if (item.iconSrc) {\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\n } @else if (item.icon) {\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\n }\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n </a>\n </ng-template>\n </p-menu>\n\n</div>\n\n<!-- \u2500\u2500 Default cell template (text) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n<!--\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\n-->\n<ng-template\n #defaultCell\n let-value\n let-row=\"row\"\n let-col=\"column\"\n>\n @switch (col?.type ?? 'text') {\n\n @case ('number') {\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\n }\n @case ('currency') {\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\n }\n @case ('date') {\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\n }\n @case ('datetime') {\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\n }\n @case ('boolean') {\n <i\n [class]=\"value\n ? 'pi pi-check-circle text-green-600'\n : 'pi pi-times-circle text-red-400'\"\n class=\"asc-cell-boolean\"\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\n ></i>\n }\n @case ('badge') {\n @if (resolveBadge(value, col); as badge) {\n <p-tag\n [value]=\"badge.label\"\n [severity]=\"mapSeverityToTag(badge.severity)\"\n [icon]=\"badge.icon ?? ''\"\n />\n } @else {\n <span>{{ value ?? '\u2014' }}</span>\n }\n }\n @case ('avatar') {\n <div class=\"asc-cell-avatar\">\n <p-avatar\n [label]=\"getInitials(value)\"\n shape=\"circle\"\n size=\"normal\"\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\n />\n <span>{{ value }}</span>\n </div>\n }\n @default {\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\n <span\n class=\"asc-cell-text\"\n [class.asc-cell-text-clamp]=\"textClamped\"\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\n tooltipPosition=\"right\"\n >{{ formatText(value, col?.format) }}</span>\n }\n\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0)}.asc-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--asc-border-color);gap:.75rem;flex-wrap:wrap;background:var(--asc-surface-0)}.asc-table-toolbar-left,.asc-table-toolbar-right{display:flex;align-items:center;gap:.5rem}.asc-table-search-input{width:18rem;font-size:.875rem}.asc-table-selection-bar{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;background:color-mix(in srgb,var(--p-primary-500) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--p-primary-500) 20%,transparent);font-size:.875rem;color:var(--p-primary-700)}.asc-table-selection-bar-actions{display:flex;align-items:center;gap:.25rem}.asc-table-selection-count{font-weight:500}.asc-column-manager{min-width:14rem;display:flex;flex-direction:column;gap:.5rem}.asc-column-manager-title{font-size:.8125rem;font-weight:600;color:var(--asc-text-secondary);text-transform:uppercase;letter-spacing:.05em;margin:0 0 .25rem}.asc-column-manager-item{display:flex;align-items:center;gap:.625rem;font-size:.875rem;cursor:pointer;padding:.25rem 0}.asc-column-manager-item label{cursor:pointer}.asc-th{font-size:var(--asc-text-xs);font-weight:400;color:var(--asc-table-header-color);white-space:nowrap;-webkit-user-select:none;user-select:none}.asc-th-content{display:flex;align-items:center;gap:.25rem}.asc-th-text{flex:1}.asc-th-expand,.asc-th-select{padding:.5rem!important;text-align:center}.asc-th-actions{text-align:center!important}.asc-th-group{text-align:center;font-weight:600}.asc-col-filter{margin-left:auto;flex-shrink:0}.asc-td{font-size:12px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:.25rem .5rem!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:.875rem;font-weight:600;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums;font-weight:500}.asc-cell-boolean{font-size:1.125rem}.asc-cell-avatar{display:flex;align-items:center;gap:.5rem;font-weight:500}.asc-cell-text-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.asc-actions-wrap{display:flex;align-items:center;justify-content:center;gap:.125rem}.asc-row-expansion>td{padding:0!important;border-top:none!important}.asc-row-skeleton td{border-color:transparent!important}.asc-row-disabled .asc-td-select{opacity:.5}.asc-empty-default{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;gap:.75rem}.asc-empty-icon{font-size:2.5rem;color:var(--asc-text-muted)}.asc-empty-text{font-size:.875rem;color:var(--asc-text-secondary);margin:0}::ng-deep .asc-table-wrapper .p-datatable{border:none}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th{border-top-width:0;border-left-width:1px;border-right-width:0}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:first-child{border-left-width:0}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-tbody>tr>td{border-left-width:0;border-right-width:0}::ng-deep .asc-table-wrapper .p-datatable-thead>tr>th{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-paginator{margin-top:22px;padding:unset;justify-content:end}::ng-deep .asc-table-wrapper .p-paginator .p-select-label{padding:unset}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-rpp-dropdown{order:1}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-current{order:2;font-size:12px;color:var(--asc-text-secondary)}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-first{order:3}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-prev{order:4}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-pages{order:5;gap:8px;margin:0 16px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-next{order:6}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-last{order:7}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown{border:none;background:transparent;box-shadow:none;min-width:auto}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{border:1px solid var(--asc-border-color);border-radius:8px;background:var(--asc-surface-0);min-width:32px;height:32px;font-size:14px}::ng-deep .asc-table-wrapper .p-paginator-page.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-prev.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-next.p-paginator-page-selected{background:var(--p-primary-500);border-color:var(--p-primary-500);color:#fff}::ng-deep .asc-table-wrapper .p-datatable-frozen-column{background:var(--asc-surface-0);box-shadow:2px 0 6px -2px #0000001f}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n) .p-datatable-frozen-column{background:var(--asc-surface-50)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i3$4.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i3$4.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i3$4.FrozenColumn, selector: "[pFrozenColumn]", inputs: ["frozen", "alignFrozen"] }, { kind: "directive", type: i3$4.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "directive", type: i3$4.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i3$4.ContextMenuRow, selector: "[pContextMenuRow]", inputs: ["pContextMenuRow", "pContextMenuRowIndex", "pContextMenuRowDisabled"] }, { kind: "component", type: i3$4.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i3$4.TableRadioButton, selector: "p-tableRadioButton", inputs: ["value", "disabled", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i3$4.ColumnFilter, selector: "p-columnFilter, p-column-filter, p-columnfilter", inputs: ["field", "type", "display", "showMenu", "matchMode", "operator", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "hideOnClear", "placeholder", "matchModeOptions", "maxConstraints", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "locale", "localeMatcher", "currency", "currencyDisplay", "filterOn", "useGrouping", "showButtons", "ariaLabel", "filterButtonProps", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i2$7.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i2$2.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: IconFieldModule }, { kind: "component", type: i3$1.IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "ngmodule", type: InputIconModule }, { kind: "component", type: i4.InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i9.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i10.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i11.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "ngmodule", type: PopoverModule }, { kind: "component", type: i13.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i14.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex", "appendTo", "motionOptions"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i15.Ripple, selector: "[pRipple]" }, { kind: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size", "width", "height"], outputs: ["loadError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6525
6546
|
}
|
|
6526
6547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscTableComponent, decorators: [{
|
|
6527
6548
|
type: Component,
|
|
@@ -6543,7 +6564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
6543
6564
|
MenuModule,
|
|
6544
6565
|
RippleModule,
|
|
6545
6566
|
AscIconComponent,
|
|
6546
|
-
], providers: [DatePipe], template: "<!--\n @file asc-table.html\n AscTableComponent template\n\n Structure:\n .asc-table-wrapper\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\n \u2514\u2500\u2500 p-table\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\n-->\n\n<div class=\"asc-table-wrapper\">\n\n <!-- \u2500\u2500 Caption / Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <ng-template #defaultCaption>\n @if (showToolbar()) {\n <div class=\"asc-table-toolbar\">\n <!-- Left slot: search -->\n <div class=\"asc-table-toolbar-left\">\n @if (showSearch()) {\n <p-iconfield iconPosition=\"left\">\n <p-inputicon class=\"pi pi-search\"/>\n <input\n pInputText\n type=\"text\"\n [placeholder]=\"msg.table.searchPlaceholder\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"handleGlobalFilter($event)\"\n class=\"asc-table-search-input\"\n />\n </p-iconfield>\n }\n </div>\n\n <!-- Right slot: column manager + export -->\n <div class=\"asc-table-toolbar-right\">\n @if (showColumnManager()) {\n <p-button\n #columnManagerBtn\n icon=\"pi pi-table\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\n (onClick)=\"columnManagerOverlay.toggle($event)\"\n />\n <!-- Column manager popover -->\n <p-popover #columnManagerOverlay>\n <div class=\"asc-column-manager\">\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\n @for (col of columnVisibility(); track col.field) {\n <div class=\"asc-column-manager-item\">\n <p-checkbox\n [ngModel]=\"col.visible\"\n [binary]=\"true\"\n [inputId]=\"'col-' + col.field\"\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\n />\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\n </div>\n }\n </div>\n </p-popover>\n }\n\n @if (exportable()) {\n <p-button\n icon=\"pi pi-download\"\n [label]=\"msg.table.exportCsv\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"exportCsv()\"\n />\n }\n </div>\n </div>\n }\n </ng-template>\n\n <!-- \u2500\u2500 PrimeNG Table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p-table\n #dt\n [value]=\"data()\"\n [loading]=\"loading()\"\n [lazy]=\"lazy()\"\n [totalRecords]=\"totalRecords()\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [paginator]=\"paginator()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\n [sortMode]=\"sortMode()\"\n [defaultSortOrder]=\"1\"\n [reorderableColumns]=\"reorderableColumns()\"\n [resizableColumns]=\"resizableColumns()\"\n [columnResizeMode]=\"'expand'\"\n [showGridlines]=\"showGridlines()\"\n [stripedRows]=\"stripedRows()\"\n [scrollable]=\"resolvedScrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [virtualScroll]=\"virtualScroll()\"\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\n [selectionMode]=\"pSelectionMode()\"\n [(selection)]=\"selectedRowsModel\"\n [rowSelectable]=\"pRowSelectable\"\n [dataKey]=\"dataKey()\"\n [(contextMenuSelection)]=\"contextMenuRow\"\n [globalFilterFields]=\"globalFilterFields()\"\n [rowExpandMode]=\"'multiple'\"\n [class]=\"tableStyleClass()\"\n (onPage)=\"handlePage($event)\"\n (onSort)=\"handleSort($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n (onRowSelect)=\"rowSelected.emit($event)\"\n (onRowUnselect)=\"rowUnselected.emit($event)\"\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\n >\n\n <!-- \u2500\u2500 Context menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #header>\n <tr>\n <!-- Expand toggle column -->\n @if (expandable()) {\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\n }\n\n <!-- Selection column -->\n @if (selectionMode() === 'multiple') {\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\n style=\"width: 3rem\" [frozen]=\"true\">\n <p-tableHeaderCheckbox/>\n </th>\n }\n @if (selectionMode() === 'single') {\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\n }\n\n <!-- Row number column -->\n @if (showRowNumber()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-th asc-th-row-number\"\n style=\"width: 4rem; text-align: center\"\n >\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\n </th>\n }\n\n <!-- Data columns -->\n @for (cell of headerCells(); track cell.col.field) {\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\n </th>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{\n col: cell.col,\n colspan: cell.colspan,\n rowspan: hasHeaderGroups() ? 2 : 1\n }\"\n />\n }\n }\n\n <!-- Actions column header -->\n @if (hasActionsColumn()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-th asc-th-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n style=\"text-align: center\"\n >\n {{ actionsHeader() ?? msg.table.actionsHeader }}\n </th>\n }\n </tr>\n\n <!-- H\u00E0ng header th\u1EE9 2 (opt-in) \u2014 ch\u1EC9 xu\u1EA5t hi\u1EC7n khi c\u00F3 \u00EDt nh\u1EA5t 1 group (headerGroup) -->\n @if (hasHeaderGroups()) {\n <tr>\n @for (col of subHeaderColumns(); track col.field) {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\n />\n }\n </tr>\n }\n </ng-template>\n\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\n <th\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\n [pSortableColumnDisabled]=\"!col.sortable\"\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"col.headerClass ?? ''\"\n class=\"asc-th\"\n >\n <div class=\"asc-th-content\">\n <span class=\"asc-th-text\">{{ col.header }}</span>\n\n @if (col.sortable) {\n <p-sortIcon [field]=\"col.field\"/>\n }\n\n @if (col.filterable) {\n <p-column-filter\n [field]=\"col.field\"\n [type]=\"resolveFilterType(col)\"\n display=\"menu\"\n class=\"asc-col-filter\"\n />\n }\n </div>\n </th>\n </ng-template>\n\n <!-- \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowIndex]=\"rowIndex\"\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\n [pContextMenuRow]=\"row\"\n [class.asc-row-selected]=\"isSelected(row)\"\n [class.asc-row-expanded]=\"expanded\"\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\n (click)=\"rowClicked.emit(row)\"\n >\n <!-- Expand toggle -->\n @if (expandable()) {\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\n <p-button\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pRowToggler]=\"row\"\n />\n </td>\n }\n\n <!-- Selection -->\n @if (selectionMode() === 'multiple') {\n @if (!selectionGroupField()) {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\"\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\n (click)=\"$event.stopPropagation()\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\n />\n </td>\n }\n }\n @if (selectionMode() === 'single') {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n }\n\n <!-- Row number cell -->\n @if (showRowNumber()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-td asc-td-row-number\"\n style=\"text-align: center\"\n >{{ rowIndex + 1 }}\n </td>\n }\n\n <!-- Data cells -->\n @for (col of visibleColumns(); track col.field) {\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\n <td\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"resolveCellClass(col, row)\"\n class=\"asc-td\"\n >\n <ng-container\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\n [ngTemplateOutletContext]=\"{\n $implicit: getCellValue(row, col.field),\n row: row,\n index: rowIndex,\n column: col\n }\"\n />\n </td>\n }\n }\n\n <!-- Actions column -->\n @if (hasActionsColumn()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-td asc-td-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (actionsDisplay() === 'dropdown') {\n <p-button\n icon=\"pi pi-ellipsis-v\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\n />\n } @else {\n <div class=\"asc-actions-wrap\">\n @for (action of getVisibleActions(row); track action.label) {\n <p-button\n [icon]=\"action.iconSrc ? '' : (action.icon ?? '')\"\n [label]=\"action.label ?? ''\"\n [severity]=\"action.severity ?? 'secondary'\"\n [disabled]=\"action.disabled?.(row) ?? false\"\n [pTooltip]=\"action.tooltip ?? ''\"\n tooltipPosition=\"top\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"action.command(row, rowIndex)\"\n >\n @if (action.iconSrc) {\n <ng-template #icon>\n <asc-icon [src]=\"action.iconSrc\" />\n </ng-template>\n }\n </p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\n @if (hasFooter()) {\n <ng-template #footer>\n <tr>\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\n @if (expandable()) {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'multiple') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'single') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (showRowNumber()) {\n <td class=\"asc-td-footer\"></td>\n }\n\n @for (cell of footerCells(); track cell.col.field) {\n <td\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\n [class]=\"cell.col.headerClass ?? ''\"\n class=\"asc-td-footer\"\n >\n {{ cell.col.footer }}\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td class=\"asc-td-footer\"></td>\n }\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Row expand content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (expandable() && expandTpl()) {\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\n <tr class=\"asc-row-expansion\">\n <td [attr.colspan]=\"expandColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\n />\n </td>\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Loading skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #loadingbody>\n @for (i of skeletonRows(); track i) {\n <tr class=\"asc-row-skeleton\">\n @if (expandable()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\n </td>\n }\n @if (selectionMode() === 'multiple') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (selectionMode() === 'single') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (showRowNumber()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n\n @for (col of visibleColumns(); track col.field) {\n <td>\n <p-skeleton\n height=\"1.5rem\"\n [width]=\"getSkeletonWidth(col)\"\n />\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\n </td>\n }\n </tr>\n }\n </ng-template>\n\n <!-- \u2500\u2500 Empty state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\n @if (emptyTpl()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\n } @else {\n <div class=\"asc-empty-default\">\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n </p-table>\n\n <!-- Shared popup menu for dropdown action mode -->\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\n <ng-template #item let-item>\n <a class=\"p-menu-item-link\" pRipple>\n @if (item.iconSrc) {\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\n } @else if (item.icon) {\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\n }\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n </a>\n </ng-template>\n </p-menu>\n\n</div>\n\n<!-- \u2500\u2500 Default cell template (text) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n<!--\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\n-->\n<ng-template\n #defaultCell\n let-value\n let-row=\"row\"\n let-col=\"column\"\n>\n @switch (col?.type ?? 'text') {\n\n @case ('number') {\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\n }\n @case ('currency') {\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\n }\n @case ('date') {\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\n }\n @case ('datetime') {\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\n }\n @case ('boolean') {\n <i\n [class]=\"value\n ? 'pi pi-check-circle text-green-600'\n : 'pi pi-times-circle text-red-400'\"\n class=\"asc-cell-boolean\"\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\n ></i>\n }\n @case ('badge') {\n @if (resolveBadge(value, col); as badge) {\n <p-tag\n [value]=\"badge.label\"\n [severity]=\"mapSeverityToTag(badge.severity)\"\n [icon]=\"badge.icon ?? ''\"\n />\n } @else {\n <span>{{ value ?? '\u2014' }}</span>\n }\n }\n @case ('avatar') {\n <div class=\"asc-cell-avatar\">\n <p-avatar\n [label]=\"getInitials(value)\"\n shape=\"circle\"\n size=\"normal\"\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\n />\n <span>{{ value }}</span>\n </div>\n }\n @default {\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\n <span\n class=\"asc-cell-text\"\n [class.asc-cell-text-clamp]=\"textClamped\"\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\n tooltipPosition=\"right\"\n >{{ formatText(value, col?.format) }}</span>\n }\n\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);overflow:hidden}.asc-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--asc-border-color);gap:.75rem;flex-wrap:wrap;background:var(--asc-surface-0)}.asc-table-toolbar-left,.asc-table-toolbar-right{display:flex;align-items:center;gap:.5rem}.asc-table-search-input{width:18rem;font-size:.875rem}.asc-table-selection-bar{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;background:color-mix(in srgb,var(--p-primary-500) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--p-primary-500) 20%,transparent);font-size:.875rem;color:var(--p-primary-700)}.asc-table-selection-bar-actions{display:flex;align-items:center;gap:.25rem}.asc-table-selection-count{font-weight:500}.asc-column-manager{min-width:14rem;display:flex;flex-direction:column;gap:.5rem}.asc-column-manager-title{font-size:.8125rem;font-weight:600;color:var(--asc-text-secondary);text-transform:uppercase;letter-spacing:.05em;margin:0 0 .25rem}.asc-column-manager-item{display:flex;align-items:center;gap:.625rem;font-size:.875rem;cursor:pointer;padding:.25rem 0}.asc-column-manager-item label{cursor:pointer}.asc-th{font-size:var(--asc-text-xs);font-weight:500;color:var(--asc-text-primary);white-space:nowrap;-webkit-user-select:none;user-select:none}.asc-th-content{display:flex;align-items:center;gap:.25rem}.asc-th-text{flex:1}.asc-th-expand,.asc-th-select{padding:.5rem!important;text-align:center}.asc-th-actions{text-align:center!important}.asc-th-group{text-align:center;font-weight:600}.asc-col-filter{margin-left:auto;flex-shrink:0}.asc-td{font-size:12px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:.25rem .5rem!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:.875rem;font-weight:600;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums;font-weight:500}.asc-cell-boolean{font-size:1.125rem}.asc-cell-avatar{display:flex;align-items:center;gap:.5rem;font-weight:500}.asc-cell-text-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.asc-actions-wrap{display:flex;align-items:center;justify-content:center;gap:.125rem}.asc-row-expansion>td{padding:0!important;border-top:none!important}.asc-row-skeleton td{border-color:transparent!important}.asc-row-disabled .asc-td-select{opacity:.5}.asc-empty-default{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;gap:.75rem}.asc-empty-icon{font-size:2.5rem;color:var(--asc-text-muted)}.asc-empty-text{font-size:.875rem;color:var(--asc-text-secondary);margin:0}::ng-deep .asc-table-wrapper .p-datatable{border:none}::ng-deep .asc-table-wrapper .p-datatable-thead>tr>th{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-paginator{margin-top:22px;padding:unset;justify-content:end}::ng-deep .asc-table-wrapper .p-paginator .p-select-label{padding:unset}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-rpp-dropdown{order:1}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-current{order:2;font-size:12px;color:var(--asc-text-secondary)}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-first{order:3}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-prev{order:4;margin-left:24px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-pages{order:5;gap:8px;margin:0 16px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-next{order:6}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-last{order:7}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown{border:none;background:transparent;box-shadow:none;min-width:auto}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{border:1px solid var(--asc-border-color);border-radius:8px;background:var(--asc-surface-0);min-width:32px;height:32px;font-size:14px}::ng-deep .asc-table-wrapper .p-paginator-page.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-prev.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-next.p-paginator-page-selected{background:var(--p-primary-500);border-color:var(--p-primary-500);color:#fff}::ng-deep .asc-table-wrapper .p-datatable-frozen-column{background:var(--asc-surface-0);box-shadow:2px 0 6px -2px #0000001f}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n) .p-datatable-frozen-column{background:var(--asc-surface-50)}\n"] }]
|
|
6567
|
+
], providers: [DatePipe], template: "<!--\n @file asc-table.html\n AscTableComponent template\n\n Structure:\n .asc-table-wrapper\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\n \u2514\u2500\u2500 p-table\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\n-->\n\n<div class=\"asc-table-wrapper\">\n\n <!-- \u2500\u2500 Caption / Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <ng-template #defaultCaption>\n @if (showToolbar()) {\n <div class=\"asc-table-toolbar\">\n <!-- Left slot: search -->\n <div class=\"asc-table-toolbar-left\">\n @if (showSearch()) {\n <p-iconfield iconPosition=\"left\">\n <p-inputicon class=\"pi pi-search\"/>\n <input\n pInputText\n type=\"text\"\n [placeholder]=\"msg.table.searchPlaceholder\"\n [ngModel]=\"globalFilter()\"\n (ngModelChange)=\"handleGlobalFilter($event)\"\n class=\"asc-table-search-input\"\n />\n </p-iconfield>\n }\n </div>\n\n <!-- Right slot: column manager + export -->\n <div class=\"asc-table-toolbar-right\">\n @if (showColumnManager()) {\n <p-button\n #columnManagerBtn\n icon=\"pi pi-table\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\n (onClick)=\"columnManagerOverlay.toggle($event)\"\n />\n <!-- Column manager popover -->\n <p-popover #columnManagerOverlay>\n <div class=\"asc-column-manager\">\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\n @for (col of columnVisibility(); track col.field) {\n <div class=\"asc-column-manager-item\">\n <p-checkbox\n [ngModel]=\"col.visible\"\n [binary]=\"true\"\n [inputId]=\"'col-' + col.field\"\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\n />\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\n </div>\n }\n </div>\n </p-popover>\n }\n\n @if (exportable()) {\n <p-button\n icon=\"pi pi-download\"\n [label]=\"msg.table.exportCsv\"\n variant=\"outlined\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"exportCsv()\"\n />\n }\n </div>\n </div>\n }\n </ng-template>\n\n <!-- \u2500\u2500 PrimeNG Table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <p-table\n #dt\n [value]=\"data()\"\n [loading]=\"loading()\"\n [lazy]=\"lazy()\"\n [totalRecords]=\"totalRecords()\"\n [rows]=\"rows()\"\n [first]=\"first()\"\n [paginator]=\"paginator()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\n [sortMode]=\"sortMode()\"\n [defaultSortOrder]=\"1\"\n [reorderableColumns]=\"reorderableColumns()\"\n [resizableColumns]=\"resizableColumns()\"\n [columnResizeMode]=\"'expand'\"\n [showGridlines]=\"showGridlines()\"\n [stripedRows]=\"stripedRows()\"\n [scrollable]=\"resolvedScrollable()\"\n [scrollHeight]=\"scrollHeight()\"\n [virtualScroll]=\"virtualScroll()\"\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\n [selectionMode]=\"pSelectionMode()\"\n [(selection)]=\"selectedRowsModel\"\n [rowSelectable]=\"pRowSelectable\"\n [dataKey]=\"dataKey()\"\n [(contextMenuSelection)]=\"contextMenuRow\"\n [globalFilterFields]=\"globalFilterFields()\"\n [rowExpandMode]=\"'multiple'\"\n [class]=\"tableStyleClass()\"\n (onPage)=\"handlePage($event)\"\n (onSort)=\"handleSort($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onLazyLoad)=\"handleLazyLoad($event)\"\n (onRowSelect)=\"rowSelected.emit($event)\"\n (onRowUnselect)=\"rowUnselected.emit($event)\"\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\n >\n\n <!-- \u2500\u2500 Context menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n\n <!-- \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #header>\n <tr>\n <!-- Expand toggle column -->\n @if (expandable()) {\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\n }\n\n <!-- Selection column -->\n @if (selectionMode() === 'multiple') {\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\n style=\"width: 3rem\" [frozen]=\"true\">\n <p-tableHeaderCheckbox/>\n </th>\n }\n @if (selectionMode() === 'single') {\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\n }\n\n <!-- Row number column -->\n @if (showRowNumber()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-th asc-th-row-number\"\n style=\"width: 4rem; text-align: center\"\n >\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\n </th>\n }\n\n <!-- Data columns -->\n @for (cell of headerCells(); track cell.col.field) {\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\n </th>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{\n col: cell.col,\n colspan: cell.colspan,\n rowspan: hasHeaderGroups() ? 2 : 1\n }\"\n />\n }\n }\n\n <!-- Actions column header -->\n @if (hasActionsColumn()) {\n <th\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-th asc-th-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n style=\"text-align: center\"\n >\n {{ actionsHeader() ?? msg.table.actionsHeader }}\n </th>\n }\n </tr>\n\n <!-- H\u00E0ng header th\u1EE9 2 (opt-in) \u2014 ch\u1EC9 xu\u1EA5t hi\u1EC7n khi c\u00F3 \u00EDt nh\u1EA5t 1 group (headerGroup) -->\n @if (hasHeaderGroups()) {\n <tr>\n @for (col of subHeaderColumns(); track col.field) {\n <ng-container\n [ngTemplateOutlet]=\"dataHeaderCell\"\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\n />\n }\n </tr>\n }\n </ng-template>\n\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\n <th\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\n [pSortableColumnDisabled]=\"!col.sortable\"\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"col.headerClass ?? ''\"\n class=\"asc-th\"\n >\n <div class=\"asc-th-content\">\n <span class=\"asc-th-text\">{{ col.header }}</span>\n\n @if (col.sortable) {\n <p-sortIcon [field]=\"col.field\"/>\n }\n\n @if (col.filterable) {\n <p-column-filter\n [field]=\"col.field\"\n [type]=\"resolveFilterType(col)\"\n display=\"menu\"\n class=\"asc-col-filter\"\n />\n }\n </div>\n </th>\n </ng-template>\n\n <!-- \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowIndex]=\"rowIndex\"\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\n [pContextMenuRow]=\"row\"\n [class.asc-row-selected]=\"isSelected(row)\"\n [class.asc-row-expanded]=\"expanded\"\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\n (click)=\"rowClicked.emit(row)\"\n >\n <!-- Expand toggle -->\n @if (expandable()) {\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\n <p-button\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n [pRowToggler]=\"row\"\n />\n </td>\n }\n\n <!-- Selection -->\n @if (selectionMode() === 'multiple') {\n @if (!selectionGroupField()) {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\"\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\n (click)=\"$event.stopPropagation()\">\n <p-checkbox\n [binary]=\"true\"\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\n />\n </td>\n }\n }\n @if (selectionMode() === 'single') {\n <td pFrozenColumn\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\n </td>\n }\n\n <!-- Row number cell -->\n @if (showRowNumber()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"left\"\n class=\"asc-td asc-td-row-number\"\n style=\"text-align: center\"\n >{{ rowIndex + 1 }}\n </td>\n }\n\n <!-- Data cells -->\n @for (col of visibleColumns(); track col.field) {\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\n <td\n pFrozenColumn\n [frozen]=\"col.frozen ?? false\"\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\n [style.width]=\"col.width ?? 'auto'\"\n [style.min-width]=\"col.minWidth ?? '0'\"\n [style.max-width]=\"col.maxWidth ?? 'none'\"\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\n [class]=\"resolveCellClass(col, row)\"\n class=\"asc-td\"\n >\n <ng-container\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\n [ngTemplateOutletContext]=\"{\n $implicit: getCellValue(row, col.field),\n row: row,\n index: rowIndex,\n column: col\n }\"\n />\n </td>\n }\n }\n\n <!-- Actions column -->\n @if (hasActionsColumn()) {\n <td\n pFrozenColumn\n [frozen]=\"true\"\n alignFrozen=\"right\"\n class=\"asc-td asc-td-actions\"\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\n (click)=\"$event.stopPropagation()\"\n >\n @if (actionsDisplay() === 'dropdown') {\n <p-button\n icon=\"pi pi-ellipsis-v\"\n variant=\"text\"\n severity=\"secondary\"\n size=\"small\"\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\n />\n } @else {\n <div class=\"asc-actions-wrap\">\n @for (action of getVisibleActions(row); track action.label) {\n <p-button\n [icon]=\"action.iconSrc ? '' : (action.icon ?? '')\"\n [label]=\"action.label ?? ''\"\n [severity]=\"action.severity ?? 'secondary'\"\n [disabled]=\"action.disabled?.(row) ?? false\"\n [pTooltip]=\"action.tooltip ?? ''\"\n tooltipPosition=\"top\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"action.command(row, rowIndex)\"\n >\n @if (action.iconSrc) {\n <ng-template #icon>\n <asc-icon [src]=\"action.iconSrc\" />\n </ng-template>\n }\n </p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\n @if (hasFooter()) {\n <ng-template #footer>\n <tr>\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\n @if (expandable()) {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'multiple') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (selectionMode() === 'single') {\n <td class=\"asc-td-footer\"></td>\n }\n @if (showRowNumber()) {\n <td class=\"asc-td-footer\"></td>\n }\n\n @for (cell of footerCells(); track cell.col.field) {\n <td\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\n [class]=\"cell.col.headerClass ?? ''\"\n class=\"asc-td-footer\"\n >\n {{ cell.col.footer }}\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td class=\"asc-td-footer\"></td>\n }\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Row expand content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (expandable() && expandTpl()) {\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\n <tr class=\"asc-row-expansion\">\n <td [attr.colspan]=\"expandColspan()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\n />\n </td>\n </tr>\n </ng-template>\n }\n\n <!-- \u2500\u2500 Loading skeleton \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #loadingbody>\n @for (i of skeletonRows(); track i) {\n <tr class=\"asc-row-skeleton\">\n @if (expandable()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\n </td>\n }\n @if (selectionMode() === 'multiple') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (selectionMode() === 'single') {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n @if (showRowNumber()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\n </td>\n }\n\n @for (col of visibleColumns(); track col.field) {\n <td>\n <p-skeleton\n height=\"1.5rem\"\n [width]=\"getSkeletonWidth(col)\"\n />\n </td>\n }\n\n @if (hasActionsColumn()) {\n <td>\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\n </td>\n }\n </tr>\n }\n </ng-template>\n\n <!-- \u2500\u2500 Empty state \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <ng-template #emptymessage>\n <tr>\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\n @if (emptyTpl()) {\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\n } @else {\n <div class=\"asc-empty-default\">\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\n </div>\n }\n </td>\n </tr>\n </ng-template>\n\n </p-table>\n\n <!-- Shared popup menu for dropdown action mode -->\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\n <ng-template #item let-item>\n <a class=\"p-menu-item-link\" pRipple>\n @if (item.iconSrc) {\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\n } @else if (item.icon) {\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\n }\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\n </a>\n </ng-template>\n </p-menu>\n\n</div>\n\n<!-- \u2500\u2500 Default cell template (text) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n<!--\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\n-->\n<ng-template\n #defaultCell\n let-value\n let-row=\"row\"\n let-col=\"column\"\n>\n @switch (col?.type ?? 'text') {\n\n @case ('number') {\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\n }\n @case ('currency') {\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\n }\n @case ('date') {\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\n }\n @case ('datetime') {\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\n }\n @case ('boolean') {\n <i\n [class]=\"value\n ? 'pi pi-check-circle text-green-600'\n : 'pi pi-times-circle text-red-400'\"\n class=\"asc-cell-boolean\"\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\n ></i>\n }\n @case ('badge') {\n @if (resolveBadge(value, col); as badge) {\n <p-tag\n [value]=\"badge.label\"\n [severity]=\"mapSeverityToTag(badge.severity)\"\n [icon]=\"badge.icon ?? ''\"\n />\n } @else {\n <span>{{ value ?? '\u2014' }}</span>\n }\n }\n @case ('avatar') {\n <div class=\"asc-cell-avatar\">\n <p-avatar\n [label]=\"getInitials(value)\"\n shape=\"circle\"\n size=\"normal\"\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\n />\n <span>{{ value }}</span>\n </div>\n }\n @default {\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\n <span\n class=\"asc-cell-text\"\n [class.asc-cell-text-clamp]=\"textClamped\"\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\n tooltipPosition=\"right\"\n >{{ formatText(value, col?.format) }}</span>\n }\n\n }\n</ng-template>\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0)}.asc-table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid var(--asc-border-color);gap:.75rem;flex-wrap:wrap;background:var(--asc-surface-0)}.asc-table-toolbar-left,.asc-table-toolbar-right{display:flex;align-items:center;gap:.5rem}.asc-table-search-input{width:18rem;font-size:.875rem}.asc-table-selection-bar{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;background:color-mix(in srgb,var(--p-primary-500) 10%,transparent);border-bottom:1px solid color-mix(in srgb,var(--p-primary-500) 20%,transparent);font-size:.875rem;color:var(--p-primary-700)}.asc-table-selection-bar-actions{display:flex;align-items:center;gap:.25rem}.asc-table-selection-count{font-weight:500}.asc-column-manager{min-width:14rem;display:flex;flex-direction:column;gap:.5rem}.asc-column-manager-title{font-size:.8125rem;font-weight:600;color:var(--asc-text-secondary);text-transform:uppercase;letter-spacing:.05em;margin:0 0 .25rem}.asc-column-manager-item{display:flex;align-items:center;gap:.625rem;font-size:.875rem;cursor:pointer;padding:.25rem 0}.asc-column-manager-item label{cursor:pointer}.asc-th{font-size:var(--asc-text-xs);font-weight:400;color:var(--asc-table-header-color);white-space:nowrap;-webkit-user-select:none;user-select:none}.asc-th-content{display:flex;align-items:center;gap:.25rem}.asc-th-text{flex:1}.asc-th-expand,.asc-th-select{padding:.5rem!important;text-align:center}.asc-th-actions{text-align:center!important}.asc-th-group{text-align:center;font-weight:600}.asc-col-filter{margin-left:auto;flex-shrink:0}.asc-td{font-size:12px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:.25rem .5rem!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:.875rem;font-weight:600;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums;font-weight:500}.asc-cell-boolean{font-size:1.125rem}.asc-cell-avatar{display:flex;align-items:center;gap:.5rem;font-weight:500}.asc-cell-text-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.asc-actions-wrap{display:flex;align-items:center;justify-content:center;gap:.125rem}.asc-row-expansion>td{padding:0!important;border-top:none!important}.asc-row-skeleton td{border-color:transparent!important}.asc-row-disabled .asc-td-select{opacity:.5}.asc-empty-default{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:3rem 1rem;gap:.75rem}.asc-empty-icon{font-size:2.5rem;color:var(--asc-text-muted)}.asc-empty-text{font-size:.875rem;color:var(--asc-text-secondary);margin:0}::ng-deep .asc-table-wrapper .p-datatable{border:none}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th{border-top-width:0;border-left-width:1px;border-right-width:0}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:first-child{border-left-width:0}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-tbody>tr>td{border-left-width:0;border-right-width:0}::ng-deep .asc-table-wrapper .p-datatable-thead>tr>th{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n){background:var(--asc-surface-50)}::ng-deep .asc-table-wrapper .p-paginator{margin-top:22px;padding:unset;justify-content:end}::ng-deep .asc-table-wrapper .p-paginator .p-select-label{padding:unset}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-rpp-dropdown{order:1}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-current{order:2;font-size:12px;color:var(--asc-text-secondary)}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-first{order:3}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-prev{order:4}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-pages{order:5;gap:8px;margin:0 16px}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-next{order:6}::ng-deep .asc-table-wrapper .p-paginator .p-paginator-last{order:7}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown{border:none;background:transparent;box-shadow:none;min-width:auto}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{border:1px solid var(--asc-border-color);border-radius:8px;background:var(--asc-surface-0);min-width:32px;height:32px;font-size:14px}::ng-deep .asc-table-wrapper .p-paginator-page.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-prev.p-paginator-page-selected,::ng-deep .asc-table-wrapper .p-paginator-next.p-paginator-page-selected{background:var(--p-primary-500);border-color:var(--p-primary-500);color:#fff}::ng-deep .asc-table-wrapper .p-datatable-frozen-column{background:var(--asc-surface-0);box-shadow:2px 0 6px -2px #0000001f}::ng-deep .asc-table-wrapper .p-datatable-striped .p-datatable-tbody>tr:nth-child(2n) .p-datatable-frozen-column{background:var(--asc-surface-50)}\n"] }]
|
|
6547
6568
|
}], propDecorators: { cellTpls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AscTableCellDirective), { isSignal: true }] }], expandTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AscTableExpandDirective), { isSignal: true }] }], emptyTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AscTableEmptyDirective), { isSignal: true }] }], captionTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AscTableCaptionDirective), { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], actionsDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsDisplay", required: false }] }], contextMenuActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuActions", required: false }] }], selectionActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionActions", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], paginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginator", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }], first: [{ type: i0.Input, args: [{ isSignal: true, alias: "first", required: false }] }], rowsPerPageOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageOptions", required: false }] }], showFirstLastIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLastIcon", required: false }] }], showCurrentPageReport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCurrentPageReport", required: false }] }], currentPageReportTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPageReportTemplate", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], sortMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortMode", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], rowDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowDisabled", required: false }] }], selectionGroupField: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionGroupField", required: false }] }], checkedField: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedField", required: false }] }], scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], showGridlines: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGridlines", required: false }] }], stripedRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "stripedRows", required: false }] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], reorderableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderableColumns", required: false }] }], showToolbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showToolbar", required: false }] }], showSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSearch", required: false }] }], showColumnManager: [{ type: i0.Input, args: [{ isSignal: true, alias: "showColumnManager", required: false }] }], exportable: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportable", required: false }] }], expandable: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandable", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], showRowNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumber", required: false }] }], rowNumberHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowNumberHeader", required: false }] }], actionsHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsHeader", required: false }] }], actionsWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsWidth", required: false }] }], actionsMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsMinWidth", required: false }] }], actionsMaxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionsMaxWidth", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], rowSelected: [{ type: i0.Output, args: ["rowSelected"] }], rowUnselected: [{ type: i0.Output, args: ["rowUnselected"] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], rowExpanded: [{ type: i0.Output, args: ["rowExpanded"] }], rowCollapsed: [{ type: i0.Output, args: ["rowCollapsed"] }], groupCheckedChange: [{ type: i0.Output, args: ["groupCheckedChange"] }] } });
|
|
6548
6569
|
|
|
6549
6570
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
@@ -9541,10 +9562,22 @@ class AppMenuitem {
|
|
|
9541
9562
|
tabindex="0"
|
|
9542
9563
|
pRipple
|
|
9543
9564
|
>
|
|
9544
|
-
@if (item
|
|
9545
|
-
<asc-icon
|
|
9565
|
+
@if (item.iconSrc) {
|
|
9566
|
+
<asc-icon
|
|
9567
|
+
[src]="item.iconSrc"
|
|
9568
|
+
class="layout-menuitem-icon"
|
|
9569
|
+
[size]="item.iconSize || '1em'"
|
|
9570
|
+
[width]="item.iconWidth"
|
|
9571
|
+
[height]="item.iconHeight"
|
|
9572
|
+
/>
|
|
9546
9573
|
} @else {
|
|
9547
|
-
<i
|
|
9574
|
+
<i
|
|
9575
|
+
[ngClass]="item.icon"
|
|
9576
|
+
class="layout-menuitem-icon"
|
|
9577
|
+
[style.font-size]="item.iconSize"
|
|
9578
|
+
[style.width]="item.iconWidth"
|
|
9579
|
+
[style.height]="item.iconHeight"
|
|
9580
|
+
></i>
|
|
9548
9581
|
}
|
|
9549
9582
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
9550
9583
|
@if (item.items) {
|
|
@@ -9578,10 +9611,22 @@ class AppMenuitem {
|
|
|
9578
9611
|
tabindex="0"
|
|
9579
9612
|
pRipple
|
|
9580
9613
|
>
|
|
9581
|
-
@if (item
|
|
9582
|
-
<asc-icon
|
|
9614
|
+
@if (item.iconSrc) {
|
|
9615
|
+
<asc-icon
|
|
9616
|
+
[src]="item.iconSrc"
|
|
9617
|
+
class="layout-menuitem-icon"
|
|
9618
|
+
[size]="item.iconSize || '1em'"
|
|
9619
|
+
[width]="item.iconWidth"
|
|
9620
|
+
[height]="item.iconHeight"
|
|
9621
|
+
/>
|
|
9583
9622
|
} @else {
|
|
9584
|
-
<i
|
|
9623
|
+
<i
|
|
9624
|
+
[ngClass]="item.icon"
|
|
9625
|
+
class="layout-menuitem-icon"
|
|
9626
|
+
[style.font-size]="item.iconSize"
|
|
9627
|
+
[style.width]="item.iconWidth"
|
|
9628
|
+
[style.height]="item.iconHeight"
|
|
9629
|
+
></i>
|
|
9585
9630
|
}
|
|
9586
9631
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
9587
9632
|
</a>
|
|
@@ -9594,7 +9639,7 @@ class AppMenuitem {
|
|
|
9594
9639
|
</ul>
|
|
9595
9640
|
}
|
|
9596
9641
|
</ng-container>
|
|
9597
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$a.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i1$a.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i15.Ripple, selector: "[pRipple]" }, { kind: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size"], outputs: ["loadError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9642
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$a.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i1$a.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i15.Ripple, selector: "[pRipple]" }, { kind: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size", "width", "height"], outputs: ["loadError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9598
9643
|
}
|
|
9599
9644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppMenuitem, decorators: [{
|
|
9600
9645
|
type: Component,
|
|
@@ -9619,10 +9664,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
9619
9664
|
tabindex="0"
|
|
9620
9665
|
pRipple
|
|
9621
9666
|
>
|
|
9622
|
-
@if (item
|
|
9623
|
-
<asc-icon
|
|
9667
|
+
@if (item.iconSrc) {
|
|
9668
|
+
<asc-icon
|
|
9669
|
+
[src]="item.iconSrc"
|
|
9670
|
+
class="layout-menuitem-icon"
|
|
9671
|
+
[size]="item.iconSize || '1em'"
|
|
9672
|
+
[width]="item.iconWidth"
|
|
9673
|
+
[height]="item.iconHeight"
|
|
9674
|
+
/>
|
|
9624
9675
|
} @else {
|
|
9625
|
-
<i
|
|
9676
|
+
<i
|
|
9677
|
+
[ngClass]="item.icon"
|
|
9678
|
+
class="layout-menuitem-icon"
|
|
9679
|
+
[style.font-size]="item.iconSize"
|
|
9680
|
+
[style.width]="item.iconWidth"
|
|
9681
|
+
[style.height]="item.iconHeight"
|
|
9682
|
+
></i>
|
|
9626
9683
|
}
|
|
9627
9684
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
9628
9685
|
@if (item.items) {
|
|
@@ -9656,10 +9713,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
9656
9713
|
tabindex="0"
|
|
9657
9714
|
pRipple
|
|
9658
9715
|
>
|
|
9659
|
-
@if (item
|
|
9660
|
-
<asc-icon
|
|
9716
|
+
@if (item.iconSrc) {
|
|
9717
|
+
<asc-icon
|
|
9718
|
+
[src]="item.iconSrc"
|
|
9719
|
+
class="layout-menuitem-icon"
|
|
9720
|
+
[size]="item.iconSize || '1em'"
|
|
9721
|
+
[width]="item.iconWidth"
|
|
9722
|
+
[height]="item.iconHeight"
|
|
9723
|
+
/>
|
|
9661
9724
|
} @else {
|
|
9662
|
-
<i
|
|
9725
|
+
<i
|
|
9726
|
+
[ngClass]="item.icon"
|
|
9727
|
+
class="layout-menuitem-icon"
|
|
9728
|
+
[style.font-size]="item.iconSize"
|
|
9729
|
+
[style.width]="item.iconWidth"
|
|
9730
|
+
[style.height]="item.iconHeight"
|
|
9731
|
+
></i>
|
|
9663
9732
|
}
|
|
9664
9733
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
9665
9734
|
</a>
|
|
@@ -9744,10 +9813,15 @@ class AppSidebar {
|
|
|
9744
9813
|
|
|
9745
9814
|
<div class="layout-sidebar">
|
|
9746
9815
|
@if (sideBarLogo()) {
|
|
9747
|
-
<
|
|
9816
|
+
<div class="layout-sidebar-logo">
|
|
9817
|
+
<ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
|
|
9818
|
+
</div>
|
|
9748
9819
|
}
|
|
9749
|
-
|
|
9750
|
-
<
|
|
9820
|
+
<!-- Cuộn ở lớp trong để scrollbar bị clip theo border-radius của .layout-sidebar -->
|
|
9821
|
+
<div class="layout-sidebar-content">
|
|
9822
|
+
<asc-menu [model]="menuItems()"></asc-menu>
|
|
9823
|
+
<ng-content></ng-content>
|
|
9824
|
+
</div>
|
|
9751
9825
|
</div>
|
|
9752
9826
|
`, isInline: true, dependencies: [{ kind: "component", type: AppMenu, selector: "asc-menu", inputs: ["model"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9753
9827
|
}
|
|
@@ -9762,10 +9836,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
9762
9836
|
|
|
9763
9837
|
<div class="layout-sidebar">
|
|
9764
9838
|
@if (sideBarLogo()) {
|
|
9765
|
-
<
|
|
9839
|
+
<div class="layout-sidebar-logo">
|
|
9840
|
+
<ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
|
|
9841
|
+
</div>
|
|
9766
9842
|
}
|
|
9767
|
-
|
|
9768
|
-
<
|
|
9843
|
+
<!-- Cuộn ở lớp trong để scrollbar bị clip theo border-radius của .layout-sidebar -->
|
|
9844
|
+
<div class="layout-sidebar-content">
|
|
9845
|
+
<asc-menu [model]="menuItems()"></asc-menu>
|
|
9846
|
+
<ng-content></ng-content>
|
|
9847
|
+
</div>
|
|
9769
9848
|
</div>
|
|
9770
9849
|
`,
|
|
9771
9850
|
}]
|