@aseansc/ui 5.9.2 → 5.11.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.
@@ -15,6 +15,10 @@ import * as i1$1 from 'primeng/button';
15
15
  import { ButtonModule, Button } from 'primeng/button';
16
16
  import * as i2 from 'primeng/tooltip';
17
17
  import { TooltipModule, Tooltip } from 'primeng/tooltip';
18
+ import { switchMap, catchError, of, Subject, filter as filter$1, startWith, map as map$1 } from 'rxjs';
19
+ import { HttpClient } from '@angular/common/http';
20
+ import { DomSanitizer } from '@angular/platform-browser';
21
+ import { map, shareReplay, filter } from 'rxjs/operators';
18
22
  import * as i3 from 'primeng/floatlabel';
19
23
  import { FloatLabelModule } from 'primeng/floatlabel';
20
24
  import * as i2$1 from 'primeng/iftalabel';
@@ -61,10 +65,6 @@ import * as i13 from 'primeng/popover';
61
65
  import { PopoverModule } from 'primeng/popover';
62
66
  import * as i14 from 'primeng/menu';
63
67
  import { MenuModule } from 'primeng/menu';
64
- import { switchMap, catchError, of, Subject, filter as filter$1, startWith, map as map$1 } from 'rxjs';
65
- import { HttpClient } from '@angular/common/http';
66
- import { DomSanitizer } from '@angular/platform-browser';
67
- import { map, shareReplay, filter } from 'rxjs/operators';
68
68
  import * as i1$2 from 'primeng/picklist';
69
69
  import { PickListModule } from 'primeng/picklist';
70
70
  import { AvatarGroup } from 'primeng/avatargroup';
@@ -127,6 +127,7 @@ const ASC_UI_DEFAULT_CONFIG = {
127
127
  },
128
128
  layout: {
129
129
  showFooter: true,
130
+ sidebarCollapse: 'hidden',
130
131
  },
131
132
  button: {
132
133
  size: 'md',
@@ -758,6 +759,8 @@ const ASC_PRESET = definePreset(Aura, {
758
759
  }
759
760
  .p-menu .p-menu-item-icon {
760
761
  font-size: 20px;
762
+ width: 20px;
763
+ height: 20px;
761
764
  }
762
765
  `,
763
766
  },
@@ -2282,6 +2285,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
2282
2285
  `, styles: [":host{display:block;--p-icon-size: 20px}:host ::ng-deep .p-inputmask{width:100%;height:var(--asc-h-md);font-size:14px;font-weight:400;line-height:20px;border-radius:12px}:host ::ng-deep p-inputmask:has(.p-inputmask-clear-icon) .p-inputmask{padding-inline-end:calc((var(--p-form-field-padding-x) * 2) + var(--p-icon-size))}:host ::ng-deep .p-inputmask-clear-icon{box-sizing:border-box;padding:calc(var(--p-icon-size) / 4);margin-top:calc(var(--p-icon-size) / -2);border-radius:50%;background:var(--asc-input-clear-bg, #DEDFE0);color:var(--asc-input-clear-color, #FFFFFF)}:host ::ng-deep .p-inputmask-clear-icon:hover{background:var(--asc-input-clear-bg-hover, #C0C0C2)}:host ::ng-deep .p-inputmask:disabled{border-color:var(--asc-formfield-disabled-border-color, #F2F3F5)}\n"] }]
2283
2286
  }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], mask: [{ type: i0.Input, args: [{ isSignal: true, alias: "mask", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], slotChar: [{ type: i0.Input, args: [{ isSignal: true, alias: "slotChar", required: false }] }], autoClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoClear", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], unmask: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmask", required: false }] }], complete: [{ type: i0.Output, args: ["complete"] }] } });
2284
2287
 
2288
+ /**
2289
+ * Fetch nội dung SVG thô qua HTTP và cache theo `src` — nhiều `<asc-icon>` cùng
2290
+ * `src` chỉ gọi HTTP đúng 1 lần (dùng `shareReplay`).
2291
+ *
2292
+ * ⚠️ Bảo mật: SVG được đánh dấu tin cậy qua `DomSanitizer.bypassSecurityTrustHtml`
2293
+ * (bỏ qua sanitize) để giữ được style/`fill="currentColor"` khi render inline.
2294
+ * `src` PHẢI trỏ tới icon do chính app kiểm soát (vd thư mục assets nội bộ),
2295
+ * KHÔNG dùng cho URL do user nhập — nếu không sẽ mở XSS.
2296
+ *
2297
+ * Lưu ý: nếu request lỗi (404, network...), lỗi đó cũng được cache — request
2298
+ * cho cùng `src` sẽ không tự retry ở lần render sau.
2299
+ */
2300
+ class AscIconService {
2301
+ constructor() {
2302
+ this.http = inject(HttpClient);
2303
+ this.sanitizer = inject(DomSanitizer);
2304
+ this.cache = new Map();
2305
+ }
2306
+ load(src) {
2307
+ let cached = this.cache.get(src);
2308
+ if (!cached) {
2309
+ cached = this.http.get(src, { responseType: 'text' }).pipe(map(svg => this.sanitizer.bypassSecurityTrustHtml(svg)), shareReplay({ bufferSize: 1, refCount: false }));
2310
+ this.cache.set(src, cached);
2311
+ }
2312
+ return cached;
2313
+ }
2314
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2315
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, providedIn: 'root' }); }
2316
+ }
2317
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, decorators: [{
2318
+ type: Injectable,
2319
+ args: [{ providedIn: 'root' }]
2320
+ }] });
2321
+
2322
+ /**
2323
+ * AscIconComponent — render icon SVG inline, fetch qua HTTP từ app consume.
2324
+ * SVG được inline (không phải `<img>`) nên có thể tuỳ chỉnh màu qua CSS `currentColor`.
2325
+ *
2326
+ * @example
2327
+ * <asc-icon src="/assets/icons/user.svg" />
2328
+ * <asc-icon src="/assets/icons/star.svg" size="24px" (loadError)="onIconError($event)" />
2329
+ * <asc-icon src="/assets/icons/logo.svg" width="96px" height="24px" />
2330
+ */
2331
+ class AscIconComponent {
2332
+ constructor() {
2333
+ this.iconService = inject(AscIconService);
2334
+ /** URL tới file .svg — fetch qua HTTP (vd: '/assets/icons/user.svg') */
2335
+ this.src = input.required(/* @ts-ignore */
2336
+ ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
2337
+ /** Kích thước CSS áp cho width/height — vd '24px', '1.5rem' */
2338
+ this.size = input('1em', /* @ts-ignore */
2339
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2340
+ /** Ghi đè riêng chiều rộng — ưu tiên hơn `size` (icon không vuông) */
2341
+ this.width = input(undefined, /* @ts-ignore */
2342
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
2343
+ /** Ghi đè riêng chiều cao — ưu tiên hơn `size` (icon không vuông) */
2344
+ this.height = input(undefined, /* @ts-ignore */
2345
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
2346
+ /** Emit khi fetch SVG lỗi (404, network...) */
2347
+ this.loadError = output();
2348
+ this.svg$ = toObservable(this.src).pipe(switchMap(src => this.iconService.load(src).pipe(catchError(err => {
2349
+ this.loadError.emit(err);
2350
+ return of(null);
2351
+ }))));
2352
+ this.svg = toSignal(this.svg$, { initialValue: null });
2353
+ }
2354
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2355
+ 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 }); }
2356
+ }
2357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, decorators: [{
2358
+ type: Component,
2359
+ args: [{ selector: 'asc-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
2360
+ class: 'asc-icon',
2361
+ '[style.display]': "'inline-flex'",
2362
+ '[style.width]': 'width() || size()',
2363
+ '[style.height]': 'height() || size()',
2364
+ }, 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"] }]
2365
+ }], 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"] }] } });
2366
+
2285
2367
  // ─────────────────────────────────────────────────────────────────────────────
2286
2368
  // AscButtonComponent
2287
2369
  //
@@ -2297,6 +2379,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
2297
2379
  // @example
2298
2380
  // <asc-button label="Lưu" (clicked)="onSave()" />
2299
2381
  // <asc-button label="Xóa" severity="danger" variant="outlined" icon="pi pi-trash" />
2382
+ // <asc-button label="Tải Excel" variant="outlined" iconSrc="/icons/file-xls.svg" />
2300
2383
  // <asc-button label="Đang xử lý" [loading]="saving()" />
2301
2384
  // <asc-button label="Toàn chiều rộng" [fullWidth]="true" />
2302
2385
  // ─────────────────────────────────────────────────────────────────────────────
@@ -2310,6 +2393,12 @@ class AscButtonComponent {
2310
2393
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
2311
2394
  this.icon = input('', /* @ts-ignore */
2312
2395
  ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
2396
+ /**
2397
+ * URL file SVG (vd icon Phosphor tải từ Figma) — render qua `asc-icon`, màu theo `currentColor`.
2398
+ * Có `iconSrc` thì bỏ qua `icon`. Cỡ icon theo size button (md/lg 20px, sm 16px).
2399
+ */
2400
+ this.iconSrc = input('', /* @ts-ignore */
2401
+ ...(ngDevMode ? [{ debugName: "iconSrc" }] : /* istanbul ignore next */ []));
2313
2402
  this.iconPos = input('left', /* @ts-ignore */
2314
2403
  ...(ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []));
2315
2404
  this.severity = input('primary', /* @ts-ignore */
@@ -2411,67 +2500,83 @@ class AscButtonComponent {
2411
2500
  this.clicked.emit(event);
2412
2501
  }
2413
2502
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2414
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AscButtonComponent, isStandalone: true, selector: "asc-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPos: { classPropertyName: "tooltipPos", publicName: "tooltipPos", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "hostCls()", "class.w-full": "fullWidth()" } }, ngImport: i0, template: `
2415
- <p-button
2416
- [label]="label()"
2417
- [icon]="icon()"
2418
- [iconPos]="iconPos()"
2419
- [severity]="pSeverity()"
2420
- [outlined]="isOutlined()"
2421
- [text]="isText()"
2422
- [link]="isLink()"
2423
- [rounded]="resolvedRounded()"
2424
- [raised]="raised()"
2425
- [loading]="loading()"
2426
- [disabled]="disabled() || loading()"
2427
- [size]="pSize()"
2428
- [class]="btnStyleClass()"
2429
- [type]="type()"
2430
- [pTooltip]="tooltip()"
2431
- [tooltipPosition]="tooltipPos()"
2432
- [tooltipOptions]="{ showDelay: 400, hideDelay: 100 }"
2433
- [attr.aria-label]="ariaLabel() || label() || undefined"
2434
- [attr.aria-busy]="loading() || undefined"
2435
- (onClick)="handleClick($event)"
2436
- >
2437
- <!-- Slot cho custom content (icon-only, badge...) -->
2438
- <ng-content></ng-content>
2439
- </p-button>
2440
- `, isInline: true, styles: [":host{display:inline-flex;vertical-align:middle}:host(.w-full){width:100%}:host(.w-full) ::ng-deep p-button{display:flex;width:100%}:host(.w-full) ::ng-deep .p-button{width:100%;justify-content:center}:host ::ng-deep .p-button{border-radius:999px}:host ::ng-deep .p-button,:host ::ng-deep .p-button .p-button-label{font-weight:400}:host ::ng-deep .p-button:disabled:not(.p-button-loading){opacity:var(--asc-button-disabled-opacity, .35)}:host(.asc-button--filled.asc-button--primary) ::ng-deep .p-button{color:var(--asc-button-solid-text, #FCFCFC)}:host(.asc-button--outlined) ::ng-deep .p-button{border-width:1.5px}:host ::ng-deep .p-button.p-button-secondary{color:#262626}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button{background:transparent;border-color:var(--asc-button-outline-border, #525252);color:var(--asc-button-outline-text, #262626)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):hover,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):hover{background:var(--asc-button-outline-bg-hover, #F2F3F5)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):active,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):active{background:var(--asc-button-outline-bg-active, #DEDFE0)}:host ::ng-deep .p-button .p-button-icon{line-height:1}:host(.asc-button--xs) ::ng-deep .p-button{min-width:56px;height:var(--asc-h-xs);padding:4px 12px;font-size:12px;line-height:16px}:host(.asc-button--xs) ::ng-deep .p-button .p-button-icon{font-size:12px}:host(.asc-button--sm) ::ng-deep .p-button{min-width:64px;height:var(--asc-h-sm);padding:6px 16px;font-size:12px;line-height:16px}:host(.asc-button--sm) ::ng-deep .p-button .p-button-icon{font-size:16px}:host(.asc-button--md) ::ng-deep .p-button{min-width:80px;height:var(--asc-h-md);padding:8px 16px;font-size:14px;line-height:20px}:host(.asc-button--md) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--lg) ::ng-deep .p-button{min-width:96px;height:var(--asc-h-lg);padding:10px 24px;font-size:16px;line-height:24px}:host(.asc-button--lg) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--xl) ::ng-deep .p-button{min-width:112px;height:var(--asc-h-xl);padding:12px 32px;font-size:18px;line-height:28px}:host(.asc-button--xl) ::ng-deep .p-button .p-button-icon{font-size:24px}\n"], dependencies: [{ 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: 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2503
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscButtonComponent, isStandalone: true, selector: "asc-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPos: { classPropertyName: "tooltipPos", publicName: "tooltipPos", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, host: { properties: { "class": "hostCls()", "class.w-full": "fullWidth()" } }, ngImport: i0, template: `
2504
+ <p-button
2505
+ [label]="label()"
2506
+ [icon]="iconSrc() ? '' : icon()"
2507
+ [iconPos]="iconPos()"
2508
+ [severity]="pSeverity()"
2509
+ [outlined]="isOutlined()"
2510
+ [text]="isText()"
2511
+ [link]="isLink()"
2512
+ [rounded]="resolvedRounded()"
2513
+ [raised]="raised()"
2514
+ [loading]="loading()"
2515
+ [disabled]="disabled() || loading()"
2516
+ [size]="pSize()"
2517
+ [class]="btnStyleClass()"
2518
+ [type]="type()"
2519
+ [pTooltip]="tooltip()"
2520
+ [tooltipPosition]="tooltipPos()"
2521
+ [tooltipOptions]="{ showDelay: 400, hideDelay: 100 }"
2522
+ [attr.aria-label]="ariaLabel() || label() || undefined"
2523
+ [attr.aria-busy]="loading() || undefined"
2524
+ (onClick)="handleClick($event)"
2525
+ >
2526
+ <!-- iconSrc: SVG từ URL (asc-icon, màu currentColor) thay cho class PrimeIcons.
2527
+ p-button chỉ dùng template #icon khi [icon] rỗng → bọc @if để không có iconSrc
2528
+ thì giữ nguyên hành vi icon class cũ. Cỡ icon = font-size .p-button-icon theo size (md 20px). -->
2529
+ @if (iconSrc(); as src) {
2530
+ <ng-template #icon let-cls="class">
2531
+ <asc-icon [src]="src" [class]="cls" class="asc-button-icon-src" />
2532
+ </ng-template>
2533
+ }
2534
+ <!-- Slot cho custom content (icon-only, badge...) -->
2535
+ <ng-content></ng-content>
2536
+ </p-button>
2537
+ `, isInline: true, styles: [":host{display:inline-flex;vertical-align:middle}:host(.w-full){width:100%}:host(.w-full) ::ng-deep p-button{display:flex;width:100%}:host(.w-full) ::ng-deep .p-button{width:100%;justify-content:center}:host ::ng-deep .p-button{border-radius:999px}:host ::ng-deep .p-button,:host ::ng-deep .p-button .p-button-label{font-weight:400}:host ::ng-deep .p-button:disabled:not(.p-button-loading){opacity:var(--asc-button-disabled-opacity, .35)}:host(.asc-button--filled.asc-button--primary) ::ng-deep .p-button{color:var(--asc-button-solid-text, #FCFCFC)}:host(.asc-button--outlined) ::ng-deep .p-button{border-width:1.5px}:host ::ng-deep .p-button.p-button-secondary{color:#262626}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button{background:transparent;border-color:var(--asc-button-outline-border, #525252);color:var(--asc-button-outline-text, #262626)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):hover,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):hover{background:var(--asc-button-outline-bg-hover, #F2F3F5)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):active,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):active{background:var(--asc-button-outline-bg-active, #DEDFE0)}:host ::ng-deep .p-button .p-button-icon{line-height:1}:host ::ng-deep .p-button .asc-button-icon-src{flex-shrink:0}:host(.asc-button--xs) ::ng-deep .p-button{min-width:56px;height:var(--asc-h-xs);padding:4px 12px;font-size:12px;line-height:16px}:host(.asc-button--xs) ::ng-deep .p-button .p-button-icon{font-size:12px}:host(.asc-button--sm) ::ng-deep .p-button{min-width:64px;height:var(--asc-h-sm);padding:6px 16px;font-size:12px;line-height:16px}:host(.asc-button--sm) ::ng-deep .p-button .p-button-icon{font-size:16px}:host(.asc-button--md) ::ng-deep .p-button{min-width:80px;height:var(--asc-h-md);padding:8px 16px;font-size:14px;line-height:20px}:host(.asc-button--md) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--lg) ::ng-deep .p-button{min-width:96px;height:var(--asc-h-lg);padding:10px 24px;font-size:16px;line-height:24px}:host(.asc-button--lg) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--xl) ::ng-deep .p-button{min-width:112px;height:var(--asc-h-xl);padding:12px 32px;font-size:18px;line-height:28px}:host(.asc-button--xl) ::ng-deep .p-button .p-button-icon{font-size:24px}\n"], dependencies: [{ 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: 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: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size", "width", "height"], outputs: ["loadError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2441
2538
  }
2442
2539
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscButtonComponent, decorators: [{
2443
2540
  type: Component,
2444
- args: [{ selector: 'asc-button', standalone: true, imports: [ButtonModule, TooltipModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
2541
+ args: [{ selector: 'asc-button', standalone: true, imports: [ButtonModule, TooltipModule, AscIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
2445
2542
  '[class]': 'hostCls()',
2446
2543
  '[class.w-full]': 'fullWidth()',
2447
- }, template: `
2448
- <p-button
2449
- [label]="label()"
2450
- [icon]="icon()"
2451
- [iconPos]="iconPos()"
2452
- [severity]="pSeverity()"
2453
- [outlined]="isOutlined()"
2454
- [text]="isText()"
2455
- [link]="isLink()"
2456
- [rounded]="resolvedRounded()"
2457
- [raised]="raised()"
2458
- [loading]="loading()"
2459
- [disabled]="disabled() || loading()"
2460
- [size]="pSize()"
2461
- [class]="btnStyleClass()"
2462
- [type]="type()"
2463
- [pTooltip]="tooltip()"
2464
- [tooltipPosition]="tooltipPos()"
2465
- [tooltipOptions]="{ showDelay: 400, hideDelay: 100 }"
2466
- [attr.aria-label]="ariaLabel() || label() || undefined"
2467
- [attr.aria-busy]="loading() || undefined"
2468
- (onClick)="handleClick($event)"
2469
- >
2470
- <!-- Slot cho custom content (icon-only, badge...) -->
2471
- <ng-content></ng-content>
2472
- </p-button>
2473
- `, styles: [":host{display:inline-flex;vertical-align:middle}:host(.w-full){width:100%}:host(.w-full) ::ng-deep p-button{display:flex;width:100%}:host(.w-full) ::ng-deep .p-button{width:100%;justify-content:center}:host ::ng-deep .p-button{border-radius:999px}:host ::ng-deep .p-button,:host ::ng-deep .p-button .p-button-label{font-weight:400}:host ::ng-deep .p-button:disabled:not(.p-button-loading){opacity:var(--asc-button-disabled-opacity, .35)}:host(.asc-button--filled.asc-button--primary) ::ng-deep .p-button{color:var(--asc-button-solid-text, #FCFCFC)}:host(.asc-button--outlined) ::ng-deep .p-button{border-width:1.5px}:host ::ng-deep .p-button.p-button-secondary{color:#262626}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button{background:transparent;border-color:var(--asc-button-outline-border, #525252);color:var(--asc-button-outline-text, #262626)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):hover,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):hover{background:var(--asc-button-outline-bg-hover, #F2F3F5)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):active,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):active{background:var(--asc-button-outline-bg-active, #DEDFE0)}:host ::ng-deep .p-button .p-button-icon{line-height:1}:host(.asc-button--xs) ::ng-deep .p-button{min-width:56px;height:var(--asc-h-xs);padding:4px 12px;font-size:12px;line-height:16px}:host(.asc-button--xs) ::ng-deep .p-button .p-button-icon{font-size:12px}:host(.asc-button--sm) ::ng-deep .p-button{min-width:64px;height:var(--asc-h-sm);padding:6px 16px;font-size:12px;line-height:16px}:host(.asc-button--sm) ::ng-deep .p-button .p-button-icon{font-size:16px}:host(.asc-button--md) ::ng-deep .p-button{min-width:80px;height:var(--asc-h-md);padding:8px 16px;font-size:14px;line-height:20px}:host(.asc-button--md) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--lg) ::ng-deep .p-button{min-width:96px;height:var(--asc-h-lg);padding:10px 24px;font-size:16px;line-height:24px}:host(.asc-button--lg) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--xl) ::ng-deep .p-button{min-width:112px;height:var(--asc-h-xl);padding:12px 32px;font-size:18px;line-height:28px}:host(.asc-button--xl) ::ng-deep .p-button .p-button-icon{font-size:24px}\n"] }]
2474
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPos", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
2544
+ }, template: `
2545
+ <p-button
2546
+ [label]="label()"
2547
+ [icon]="iconSrc() ? '' : icon()"
2548
+ [iconPos]="iconPos()"
2549
+ [severity]="pSeverity()"
2550
+ [outlined]="isOutlined()"
2551
+ [text]="isText()"
2552
+ [link]="isLink()"
2553
+ [rounded]="resolvedRounded()"
2554
+ [raised]="raised()"
2555
+ [loading]="loading()"
2556
+ [disabled]="disabled() || loading()"
2557
+ [size]="pSize()"
2558
+ [class]="btnStyleClass()"
2559
+ [type]="type()"
2560
+ [pTooltip]="tooltip()"
2561
+ [tooltipPosition]="tooltipPos()"
2562
+ [tooltipOptions]="{ showDelay: 400, hideDelay: 100 }"
2563
+ [attr.aria-label]="ariaLabel() || label() || undefined"
2564
+ [attr.aria-busy]="loading() || undefined"
2565
+ (onClick)="handleClick($event)"
2566
+ >
2567
+ <!-- iconSrc: SVG từ URL (asc-icon, màu currentColor) thay cho class PrimeIcons.
2568
+ p-button chỉ dùng template #icon khi [icon] rỗng → bọc @if để không có iconSrc
2569
+ thì giữ nguyên hành vi icon class cũ. Cỡ icon = font-size .p-button-icon theo size (md 20px). -->
2570
+ @if (iconSrc(); as src) {
2571
+ <ng-template #icon let-cls="class">
2572
+ <asc-icon [src]="src" [class]="cls" class="asc-button-icon-src" />
2573
+ </ng-template>
2574
+ }
2575
+ <!-- Slot cho custom content (icon-only, badge...) -->
2576
+ <ng-content></ng-content>
2577
+ </p-button>
2578
+ `, styles: [":host{display:inline-flex;vertical-align:middle}:host(.w-full){width:100%}:host(.w-full) ::ng-deep p-button{display:flex;width:100%}:host(.w-full) ::ng-deep .p-button{width:100%;justify-content:center}:host ::ng-deep .p-button{border-radius:999px}:host ::ng-deep .p-button,:host ::ng-deep .p-button .p-button-label{font-weight:400}:host ::ng-deep .p-button:disabled:not(.p-button-loading){opacity:var(--asc-button-disabled-opacity, .35)}:host(.asc-button--filled.asc-button--primary) ::ng-deep .p-button{color:var(--asc-button-solid-text, #FCFCFC)}:host(.asc-button--outlined) ::ng-deep .p-button{border-width:1.5px}:host ::ng-deep .p-button.p-button-secondary{color:#262626}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button{background:transparent;border-color:var(--asc-button-outline-border, #525252);color:var(--asc-button-outline-text, #262626)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):hover,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):hover{background:var(--asc-button-outline-bg-hover, #F2F3F5)}:host(.asc-button--outlined.asc-button--primary) ::ng-deep .p-button:not(:disabled):active,:host(.asc-button--outlined.asc-button--secondary) ::ng-deep .p-button:not(:disabled):active{background:var(--asc-button-outline-bg-active, #DEDFE0)}:host ::ng-deep .p-button .p-button-icon{line-height:1}:host ::ng-deep .p-button .asc-button-icon-src{flex-shrink:0}:host(.asc-button--xs) ::ng-deep .p-button{min-width:56px;height:var(--asc-h-xs);padding:4px 12px;font-size:12px;line-height:16px}:host(.asc-button--xs) ::ng-deep .p-button .p-button-icon{font-size:12px}:host(.asc-button--sm) ::ng-deep .p-button{min-width:64px;height:var(--asc-h-sm);padding:6px 16px;font-size:12px;line-height:16px}:host(.asc-button--sm) ::ng-deep .p-button .p-button-icon{font-size:16px}:host(.asc-button--md) ::ng-deep .p-button{min-width:80px;height:var(--asc-h-md);padding:8px 16px;font-size:14px;line-height:20px}:host(.asc-button--md) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--lg) ::ng-deep .p-button{min-width:96px;height:var(--asc-h-lg);padding:10px 24px;font-size:16px;line-height:24px}:host(.asc-button--lg) ::ng-deep .p-button .p-button-icon{font-size:20px}:host(.asc-button--xl) ::ng-deep .p-button{min-width:112px;height:var(--asc-h-xl);padding:12px 32px;font-size:18px;line-height:28px}:host(.asc-button--xl) ::ng-deep .p-button .p-button-icon{font-size:24px}\n"] }]
2579
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSrc", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPos", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
2475
2580
 
2476
2581
  /** Map size của control → font-size label — dùng khi consumer không tự override --asc-field-label-font-size */
2477
2582
  const ASC_FIELD_LABEL_SIZE_MAP = {
@@ -2868,15 +2973,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
2868
2973
  args: [ASC_BASE_CONTROL, { static: false }]
2869
2974
  }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], typeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeLabel", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], labelIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelIcon", required: false }] }], labelSuffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelSuffixIcon", required: false }] }], labelTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelTooltip", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideLabel", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], forId: [{ type: i0.Input, args: [{ isSignal: true, alias: "forId", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
2870
2975
 
2871
- // AUTO-GENERATED từ ./svg/*.svg (bộ icon thao tác của designer, viewBox 0 0 20 20).
2872
- // Sửa SVG rồi sinh lại file này — không sửa tay path.
2873
- /** Path data (viewBox 0 0 20 20) của từng icon — render với fill="currentColor". */
2976
+ // Path lấy từ ./svg/*.svg — sửa SVG thì chép lại path tương ứng vào đây.
2977
+ // - approve/view/edit/delete/search: bộ icon thao tác của designer, viewBox 0 0 20 20.
2978
+ // - more/caret-down/caret-right: Phosphor Regular (MIT), viewBox 0 0 256 256 — xem ASC_BUILTIN_ICON_VIEWBOX.
2979
+ /** viewBox mặc định của icon dựng sẵn. */
2980
+ const ASC_BUILTIN_ICON_DEFAULT_VIEWBOX = '0 0 20 20';
2981
+ /** viewBox riêng của icon không theo lưới 20 (icon Phosphor lưới 256). */
2982
+ const ASC_BUILTIN_ICON_VIEWBOX = {
2983
+ more: '0 0 256 256',
2984
+ 'caret-down': '0 0 256 256',
2985
+ 'caret-right': '0 0 256 256',
2986
+ };
2987
+ /** Path data của từng icon — render với fill="currentColor". viewBox: xem ASC_BUILTIN_ICON_VIEWBOX. */
2874
2988
  const ASC_BUILTIN_ICONS = {
2875
2989
  approve: 'M13.4563 7.79375C13.544 7.88164 13.5933 8.00078 13.5933 8.125C13.5933 8.24922 13.544 8.36836 13.4563 8.45625L9.08125 12.8313C8.99336 12.919 8.87422 12.9683 8.75 12.9683C8.62578 12.9683 8.50664 12.919 8.41875 12.8313L6.54375 10.9563C6.46095 10.8674 6.41588 10.7499 6.41802 10.6284C6.42016 10.507 6.46936 10.3911 6.55524 10.3052C6.64112 10.2194 6.75699 10.1702 6.87843 10.168C6.99987 10.1659 7.11739 10.2109 7.20625 10.2937L8.75 11.8367L12.7938 7.79375C12.8816 7.70597 13.0008 7.65666 13.125 7.65666C13.2492 7.65666 13.3684 7.70597 13.4563 7.79375ZM17.9688 10C17.9688 11.5761 17.5014 13.1167 16.6258 14.4272C15.7502 15.7377 14.5056 16.759 13.0495 17.3622C11.5934 17.9653 9.99116 18.1231 8.44538 17.8156C6.89959 17.5082 5.4797 16.7492 4.36525 15.6348C3.2508 14.5203 2.49185 13.1004 2.18437 11.5546C1.87689 10.0088 2.0347 8.40659 2.63784 6.95049C3.24097 5.49439 4.26235 4.24984 5.5728 3.37423C6.88326 2.49861 8.42393 2.03125 10 2.03125C12.1127 2.03373 14.1381 2.87409 15.632 4.36798C17.1259 5.86188 17.9663 7.88732 17.9688 10ZM17.0313 10C17.0313 8.60935 16.6189 7.24993 15.8463 6.09365C15.0737 4.93736 13.9755 4.03615 12.6907 3.50397C11.406 2.97179 9.9922 2.83255 8.62827 3.10385C7.26435 3.37516 6.0115 4.04482 5.02816 5.02816C4.04482 6.01149 3.37516 7.26434 3.10386 8.62827C2.83255 9.9922 2.9718 11.406 3.50398 12.6907C4.03615 13.9755 4.93737 15.0737 6.09365 15.8463C7.24993 16.6189 8.60935 17.0312 10 17.0312C11.8642 17.0292 13.6514 16.2877 14.9696 14.9696C16.2877 13.6514 17.0292 11.8642 17.0313 10Z',
2876
2990
  view: 'M19.178 9.81016C19.1514 9.74922 18.5014 8.30781 17.0499 6.85625C15.703 5.51094 13.3889 3.90625 9.99989 3.90625C6.61082 3.90625 4.29676 5.51094 2.94989 6.85625C1.49832 8.30781 0.848323 9.74687 0.821761 9.81016C0.795052 9.87016 0.78125 9.9351 0.78125 10.0008C0.78125 10.0665 0.795052 10.1314 0.821761 10.1914C0.848323 10.2516 1.49832 11.693 2.94989 13.1445C4.29676 14.4898 6.61082 16.0938 9.99989 16.0938C13.3889 16.0938 15.703 14.4898 17.0499 13.1445C18.5014 11.693 19.1514 10.2539 19.178 10.1914C19.2047 10.1314 19.2185 10.0665 19.2185 10.0008C19.2185 9.9351 19.2047 9.87016 19.178 9.81016ZM9.99989 15.1562C7.54832 15.1562 5.4077 14.2641 3.6366 12.5055C2.89416 11.7676 2.2659 10.9232 1.77254 10C2.26576 9.07697 2.89404 8.23277 3.6366 7.49531C5.4077 5.73594 7.54832 4.84375 9.99989 4.84375C12.4514 4.84375 14.5921 5.73594 16.3632 7.49531C17.1057 8.23277 17.734 9.07697 18.2272 10C17.7296 10.9539 15.2343 15.1562 9.99989 15.1562ZM9.99989 6.40625C9.28911 6.40625 8.5943 6.61702 8.00331 7.01191C7.41232 7.40679 6.9517 7.96806 6.67969 8.62473C6.40769 9.2814 6.33652 10.004 6.47519 10.7011C6.61385 11.3982 6.95613 12.0386 7.45872 12.5412C7.96132 13.0438 8.60166 13.386 9.29878 13.5247C9.9959 13.6634 10.7185 13.5922 11.3752 13.3202C12.0318 13.0482 12.5931 12.5876 12.988 11.9966C13.3829 11.4056 13.5936 10.7108 13.5936 10C13.5924 9.04726 13.2134 8.1339 12.5397 7.46021C11.866 6.78651 10.9526 6.40749 9.99989 6.40625ZM9.99989 12.6562C9.47453 12.6562 8.96097 12.5005 8.52415 12.2086C8.08733 11.9167 7.74688 11.5019 7.54583 11.0165C7.34479 10.5311 7.29218 9.99705 7.39468 9.48179C7.49717 8.96653 7.75015 8.49323 8.12163 8.12175C8.49312 7.75026 8.96642 7.49728 9.48168 7.39479C9.99694 7.2923 10.531 7.3449 11.0164 7.54595C11.5018 7.74699 11.9166 8.08745 12.2085 8.52427C12.5003 8.96108 12.6561 9.47464 12.6561 10C12.6561 10.7045 12.3763 11.3801 11.8781 11.8783C11.38 12.3764 10.7044 12.6562 9.99989 12.6562Z',
2877
2991
  edit: 'M17.6492 5.84305L14.1578 2.35164C14.0562 2.25007 13.9357 2.16949 13.803 2.11452C13.6703 2.05954 13.528 2.03125 13.3844 2.03125C13.2407 2.03125 13.0985 2.05954 12.9658 2.11452C12.8331 2.16949 12.7125 2.25007 12.6109 2.35164L2.97656 11.9852C2.87479 12.0867 2.7941 12.2072 2.73912 12.3399C2.68415 12.4727 2.65599 12.615 2.65625 12.7587V16.2501C2.65625 16.5402 2.77149 16.8184 2.9766 17.0235C3.18172 17.2286 3.45992 17.3438 3.75 17.3438H16.875C16.9993 17.3438 17.1186 17.2944 17.2065 17.2065C17.2944 17.1186 17.3438 16.9994 17.3438 16.8751C17.3438 16.7508 17.2944 16.6315 17.2065 16.5436C17.1186 16.4557 16.9993 16.4063 16.875 16.4063H8.63203L17.6492 7.38992C17.7508 7.28836 17.8314 7.16778 17.8863 7.03507C17.9413 6.90236 17.9696 6.76013 17.9696 6.61649C17.9696 6.47284 17.9413 6.33061 17.8863 6.1979C17.8314 6.06519 17.7508 5.94461 17.6492 5.84305ZM7.30625 16.4063H3.75C3.70856 16.4063 3.66882 16.3899 3.63952 16.3606C3.61021 16.3313 3.59375 16.2915 3.59375 16.2501V12.7587C3.59393 12.7173 3.6105 12.6777 3.63985 12.6485L10.625 5.66336L14.3375 9.37508L7.30625 16.4063ZM16.9859 6.72664L15 8.71258L11.2883 5.00008L13.2734 3.01492C13.288 3.0004 13.3052 2.98887 13.3242 2.98101C13.3431 2.97314 13.3635 2.9691 13.384 2.9691C13.4045 2.9691 13.4249 2.97314 13.4438 2.98101C13.4628 2.98887 13.48 3.0004 13.4945 3.01492L16.9859 6.50555C17.0005 6.52006 17.012 6.53729 17.0199 6.55626C17.0277 6.57523 17.0318 6.59556 17.0318 6.61609C17.0318 6.63663 17.0277 6.65696 17.0199 6.67593C17.012 6.6949 17.0005 6.71213 16.9859 6.72664Z',
2878
2992
  delete: 'M16.875 3.90625H13.5938V3.125C13.5938 2.66916 13.4127 2.23199 13.0903 1.90966C12.768 1.58733 12.3308 1.40625 11.875 1.40625H8.125C7.66916 1.40625 7.23199 1.58733 6.90966 1.90966C6.58733 2.23199 6.40625 2.66916 6.40625 3.125V3.90625H3.125C3.00068 3.90625 2.88145 3.95564 2.79354 4.04354C2.70564 4.13145 2.65625 4.25068 2.65625 4.375C2.65625 4.49932 2.70564 4.61855 2.79354 4.70646C2.88145 4.79436 3.00068 4.84375 3.125 4.84375H3.90625V16.25C3.90625 16.5401 4.02148 16.8183 4.2266 17.0234C4.43172 17.2285 4.70992 17.3438 5 17.3438H15C15.2901 17.3438 15.5683 17.2285 15.7734 17.0234C15.9785 16.8183 16.0938 16.5401 16.0938 16.25V4.84375H16.875C16.9993 4.84375 17.1185 4.79436 17.2065 4.70646C17.2944 4.61855 17.3438 4.49932 17.3438 4.375C17.3438 4.25068 17.2944 4.13145 17.2065 4.04354C17.1185 3.95564 16.9993 3.90625 16.875 3.90625ZM7.34375 3.125C7.34375 2.9178 7.42606 2.71909 7.57257 2.57257C7.71909 2.42606 7.9178 2.34375 8.125 2.34375H11.875C12.0822 2.34375 12.2809 2.42606 12.4274 2.57257C12.5739 2.71909 12.6562 2.9178 12.6562 3.125V3.90625H7.34375V3.125ZM15.1562 16.25C15.1562 16.2914 15.1398 16.3312 15.1105 16.3605C15.0812 16.3898 15.0414 16.4062 15 16.4062H5C4.95856 16.4062 4.91882 16.3898 4.88951 16.3605C4.86021 16.3312 4.84375 16.2914 4.84375 16.25V4.84375H15.1562V16.25ZM8.59375 8.125V13.125C8.59375 13.2493 8.54436 13.3685 8.45646 13.4565C8.36855 13.5444 8.24932 13.5938 8.125 13.5938C8.00068 13.5938 7.88145 13.5444 7.79354 13.4565C7.70564 13.3685 7.65625 13.2493 7.65625 13.125V8.125C7.65625 8.00068 7.70564 7.88145 7.79354 7.79354C7.88145 7.70564 8.00068 7.65625 8.125 7.65625C8.24932 7.65625 8.36855 7.70564 8.45646 7.79354C8.54436 7.88145 8.59375 8.00068 8.59375 8.125ZM12.3438 8.125V13.125C12.3438 13.2493 12.2944 13.3685 12.2065 13.4565C12.1185 13.5444 11.9993 13.5938 11.875 13.5938C11.7507 13.5938 11.6315 13.5444 11.5435 13.4565C11.4556 13.3685 11.4062 13.2493 11.4062 13.125V8.125C11.4062 8.00068 11.4556 7.88145 11.5435 7.79354C11.6315 7.70564 11.7507 7.65625 11.875 7.65625C11.9993 7.65625 12.1185 7.70564 12.2065 7.79354C12.2944 7.88145 12.3438 8.00068 12.3438 8.125Z',
2879
2993
  search: 'M17.8312 17.1687L13.8172 13.1547C14.9618 11.8383 15.5507 10.1289 15.4596 8.38682C15.3685 6.64474 14.6046 5.00609 13.3288 3.81628C12.0531 2.62647 10.3653 1.97846 8.62108 2.00883C6.87689 2.03921 5.21264 2.74561 3.97912 3.97912C2.74561 5.21264 2.03921 6.87689 2.00883 8.62108C1.97846 10.3653 2.62647 12.0531 3.81628 13.3288C5.00609 14.6046 6.64474 15.3685 8.38682 15.4596C10.1289 15.5507 11.8383 14.9618 13.1547 13.8172L17.1687 17.8312C17.2576 17.914 17.3751 17.9591 17.4965 17.9569C17.618 17.9548 17.7338 17.9056 17.8197 17.8197C17.9056 17.7338 17.9548 17.618 17.9569 17.4965C17.9591 17.3751 17.914 17.2576 17.8312 17.1687ZM2.96871 8.74996C2.96871 7.60654 3.30778 6.48879 3.94303 5.53807C4.57828 4.58735 5.48119 3.84635 6.53757 3.40878C7.59396 2.97122 8.75638 2.85673 9.87783 3.0798C10.9993 3.30287 12.0294 3.85348 12.8379 4.662C13.6464 5.47052 14.1971 6.50064 14.4201 7.6221C14.6432 8.74355 14.5287 9.90597 14.0911 10.9624C13.6536 12.0187 12.9126 12.9216 11.9619 13.5569C11.0111 14.1921 9.89339 14.5312 8.74996 14.5312C7.21725 14.5294 5.74785 13.9197 4.66406 12.8359C3.58027 11.7521 2.97057 10.2827 2.96871 8.74996Z',
2994
+ // Phosphor DotsThreeVertical (Regular)
2995
+ more: 'M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z',
2996
+ // Phosphor CaretDown (Regular)
2997
+ 'caret-down': 'M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z',
2998
+ // Phosphor CaretRight (Regular)
2999
+ 'caret-right': 'M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z',
2880
3000
  };
2881
3001
 
2882
3002
  /** Class PrimeIcons cũ → icon dựng sẵn tương ứng (để `icon="pi pi-trash"` tự đổi sang bộ icon mới). */
@@ -2890,9 +3010,10 @@ const PI_ALIASES = {
2890
3010
  'pi-file-edit': 'edit',
2891
3011
  'pi-trash': 'delete',
2892
3012
  'pi-search': 'search',
3013
+ 'pi-ellipsis-v': 'more',
2893
3014
  };
2894
3015
  /**
2895
- * Nhận tên icon dựng sẵn ('approve' | 'view' | 'edit' | 'delete' | 'search') hoặc class
3016
+ * Nhận tên icon dựng sẵn (xem `AscBuiltinIconName`) hoặc class
2896
3017
  * PrimeIcons tương ứng ('pi pi-trash'...) → trả về tên icon dựng sẵn, không khớp → null.
2897
3018
  */
2898
3019
  function resolveAscBuiltinIcon(icon) {
@@ -2925,12 +3046,14 @@ class AscSvgIconComponent {
2925
3046
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
2926
3047
  this.path = computed(() => ASC_BUILTIN_ICONS[this.name()] ?? '', /* @ts-ignore */
2927
3048
  ...(ngDevMode ? [{ debugName: "path" }] : /* istanbul ignore next */ []));
3049
+ this.viewBox = computed(() => ASC_BUILTIN_ICON_VIEWBOX[this.name()] ?? ASC_BUILTIN_ICON_DEFAULT_VIEWBOX, /* @ts-ignore */
3050
+ ...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
2928
3051
  }
2929
3052
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscSvgIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2930
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AscSvgIconComponent, isStandalone: true, selector: "asc-svg-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width": "size()", "style.height": "size()" }, classAttribute: "asc-svg-icon" }, ngImport: i0, template: `
2931
- <svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false">
2932
- <path [attr.d]="path()" />
2933
- </svg>
3053
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: AscSvgIconComponent, isStandalone: true, selector: "asc-svg-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.width": "size()", "style.height": "size()" }, classAttribute: "asc-svg-icon" }, ngImport: i0, template: `
3054
+ <svg [attr.viewBox]="viewBox()" fill="currentColor" aria-hidden="true" focusable="false">
3055
+ <path [attr.d]="path()" />
3056
+ </svg>
2934
3057
  `, isInline: true, styles: [":host{display:inline-flex;flex-shrink:0;line-height:0}svg{width:100%;height:100%;display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2935
3058
  }
2936
3059
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscSvgIconComponent, decorators: [{
@@ -2939,10 +3062,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
2939
3062
  class: 'asc-svg-icon',
2940
3063
  '[style.width]': 'size()',
2941
3064
  '[style.height]': 'size()',
2942
- }, template: `
2943
- <svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" focusable="false">
2944
- <path [attr.d]="path()" />
2945
- </svg>
3065
+ }, template: `
3066
+ <svg [attr.viewBox]="viewBox()" fill="currentColor" aria-hidden="true" focusable="false">
3067
+ <path [attr.d]="path()" />
3068
+ </svg>
2946
3069
  `, styles: [":host{display:inline-flex;flex-shrink:0;line-height:0}svg{width:100%;height:100%;display:block}\n"] }]
2947
3070
  }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
2948
3071
 
@@ -3104,7 +3227,7 @@ class AscInputComponent extends BaseControlAccessor {
3104
3227
  <p-iconfield [iconPosition]="iconPos()">
3105
3228
  @if (icon() && iconPos() === 'left') {
3106
3229
  @if (isSearchIcon()) {
3107
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3230
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3108
3231
  } @else {
3109
3232
  <p-inputicon [class]="icon()" aria-hidden="true" />
3110
3233
  }
@@ -3142,7 +3265,7 @@ class AscInputComponent extends BaseControlAccessor {
3142
3265
  }
3143
3266
  @if (icon() && iconPos() === 'right') {
3144
3267
  @if (isSearchIcon()) {
3145
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3268
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3146
3269
  } @else {
3147
3270
  <p-inputicon [class]="icon()" aria-hidden="true" />
3148
3271
  }
@@ -3166,7 +3289,7 @@ class AscInputComponent extends BaseControlAccessor {
3166
3289
  <p-iconfield [iconPosition]="iconPos()">
3167
3290
  @if (icon() && iconPos() === 'left') {
3168
3291
  @if (isSearchIcon()) {
3169
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3292
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3170
3293
  } @else {
3171
3294
  <p-inputicon [class]="icon()" aria-hidden="true" />
3172
3295
  }
@@ -3205,7 +3328,7 @@ class AscInputComponent extends BaseControlAccessor {
3205
3328
  }
3206
3329
  @if (icon() && iconPos() === 'right') {
3207
3330
  @if (isSearchIcon()) {
3208
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3331
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3209
3332
  } @else {
3210
3333
  <p-inputicon [class]="icon()" aria-hidden="true" />
3211
3334
  }
@@ -3240,7 +3363,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
3240
3363
  <p-iconfield [iconPosition]="iconPos()">
3241
3364
  @if (icon() && iconPos() === 'left') {
3242
3365
  @if (isSearchIcon()) {
3243
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3366
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3244
3367
  } @else {
3245
3368
  <p-inputicon [class]="icon()" aria-hidden="true" />
3246
3369
  }
@@ -3278,7 +3401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
3278
3401
  }
3279
3402
  @if (icon() && iconPos() === 'right') {
3280
3403
  @if (isSearchIcon()) {
3281
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3404
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3282
3405
  } @else {
3283
3406
  <p-inputicon [class]="icon()" aria-hidden="true" />
3284
3407
  }
@@ -3302,7 +3425,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
3302
3425
  <p-iconfield [iconPosition]="iconPos()">
3303
3426
  @if (icon() && iconPos() === 'left') {
3304
3427
  @if (isSearchIcon()) {
3305
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3428
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3306
3429
  } @else {
3307
3430
  <p-inputicon [class]="icon()" aria-hidden="true" />
3308
3431
  }
@@ -3341,7 +3464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
3341
3464
  }
3342
3465
  @if (icon() && iconPos() === 'right') {
3343
3466
  @if (isSearchIcon()) {
3344
- <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
3467
+ <p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="100%" /></p-inputicon>
3345
3468
  } @else {
3346
3469
  <p-inputicon [class]="icon()" aria-hidden="true" />
3347
3470
  }
@@ -6317,85 +6440,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
6317
6440
  ` }]
6318
6441
  }], propDecorators: { actionEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionEvents", required: false }] }], uploadMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadMode", required: false }] }], maxSizePerFile: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSizePerFile", required: false }] }], multipleUpload: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleUpload", required: false }] }], totalSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalSize", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], headerStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerStyle", required: false }] }], chooseLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseLabel", required: false }] }] } });
6319
6442
 
6320
- /**
6321
- * Fetch nội dung SVG thô qua HTTP và cache theo `src` — nhiều `<asc-icon>` cùng
6322
- * `src` chỉ gọi HTTP đúng 1 lần (dùng `shareReplay`).
6323
- *
6324
- * ⚠️ Bảo mật: SVG được đánh dấu tin cậy qua `DomSanitizer.bypassSecurityTrustHtml`
6325
- * (bỏ qua sanitize) để giữ được style/`fill="currentColor"` khi render inline.
6326
- * `src` PHẢI trỏ tới icon do chính app kiểm soát (vd thư mục assets nội bộ),
6327
- * KHÔNG dùng cho URL do user nhập — nếu không sẽ mở XSS.
6328
- *
6329
- * Lưu ý: nếu request lỗi (404, network...), lỗi đó cũng được cache — request
6330
- * cho cùng `src` sẽ không tự retry ở lần render sau.
6331
- */
6332
- class AscIconService {
6333
- constructor() {
6334
- this.http = inject(HttpClient);
6335
- this.sanitizer = inject(DomSanitizer);
6336
- this.cache = new Map();
6337
- }
6338
- load(src) {
6339
- let cached = this.cache.get(src);
6340
- if (!cached) {
6341
- cached = this.http.get(src, { responseType: 'text' }).pipe(map(svg => this.sanitizer.bypassSecurityTrustHtml(svg)), shareReplay({ bufferSize: 1, refCount: false }));
6342
- this.cache.set(src, cached);
6343
- }
6344
- return cached;
6345
- }
6346
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6347
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, providedIn: 'root' }); }
6348
- }
6349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconService, decorators: [{
6350
- type: Injectable,
6351
- args: [{ providedIn: 'root' }]
6352
- }] });
6353
-
6354
- /**
6355
- * AscIconComponent — render icon SVG inline, fetch qua HTTP từ app consume.
6356
- * SVG được inline (không phải `<img>`) nên có thể tuỳ chỉnh màu qua CSS `currentColor`.
6357
- *
6358
- * @example
6359
- * <asc-icon src="/assets/icons/user.svg" />
6360
- * <asc-icon src="/assets/icons/star.svg" size="24px" (loadError)="onIconError($event)" />
6361
- * <asc-icon src="/assets/icons/logo.svg" width="96px" height="24px" />
6362
- */
6363
- class AscIconComponent {
6364
- constructor() {
6365
- this.iconService = inject(AscIconService);
6366
- /** URL tới file .svg — fetch qua HTTP (vd: '/assets/icons/user.svg') */
6367
- this.src = input.required(/* @ts-ignore */
6368
- ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
6369
- /** Kích thước CSS áp cho width/height — vd '24px', '1.5rem' */
6370
- this.size = input('1em', /* @ts-ignore */
6371
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
6372
- /** Ghi đè riêng chiều rộng — ưu tiên hơn `size` (icon không vuông) */
6373
- this.width = input(undefined, /* @ts-ignore */
6374
- ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
6375
- /** Ghi đè riêng chiều cao — ưu tiên hơn `size` (icon không vuông) */
6376
- this.height = input(undefined, /* @ts-ignore */
6377
- ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
6378
- /** Emit khi fetch SVG lỗi (404, network...) */
6379
- this.loadError = output();
6380
- this.svg$ = toObservable(this.src).pipe(switchMap(src => this.iconService.load(src).pipe(catchError(err => {
6381
- this.loadError.emit(err);
6382
- return of(null);
6383
- }))));
6384
- this.svg = toSignal(this.svg$, { initialValue: null });
6385
- }
6386
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6387
- 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 }); }
6388
- }
6389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscIconComponent, decorators: [{
6390
- type: Component,
6391
- args: [{ selector: 'asc-icon', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
6392
- class: 'asc-icon',
6393
- '[style.display]': "'inline-flex'",
6394
- '[style.width]': 'width() || size()',
6395
- '[style.height]': 'height() || size()',
6396
- }, 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"] }]
6397
- }], 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"] }] } });
6398
-
6399
6443
  /**
6400
6444
  * @file asc-table.directive.ts
6401
6445
  *
@@ -7317,7 +7361,7 @@ class AscTableComponent {
7317
7361
  URL.revokeObjectURL(url);
7318
7362
  }
7319
7363
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7320
- 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: "<!--\r\n @file asc-table.html\r\n AscTableComponent template\r\n\r\n Structure:\r\n .asc-table-wrapper\r\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\r\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\r\n \u2514\u2500\u2500 p-table\r\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\r\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\r\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\r\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\r\n-->\r\n\r\n<div class=\"asc-table-wrapper\">\r\n\r\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 -->\r\n\r\n <ng-template #defaultCaption>\r\n @if (showToolbar()) {\r\n <div class=\"asc-table-toolbar\">\r\n <!-- Left slot: search -->\r\n <div class=\"asc-table-toolbar-left\">\r\n @if (showSearch()) {\r\n <p-iconfield iconPosition=\"left\">\r\n <p-inputicon class=\"asc-search-icon\">\r\n <asc-svg-icon name=\"search\" />\r\n </p-inputicon>\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [placeholder]=\"msg.table.searchPlaceholder\"\r\n [ngModel]=\"globalFilter()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"handleGlobalFilter($event)\"\r\n class=\"asc-table-search-input\"\r\n />\r\n </p-iconfield>\r\n }\r\n </div>\r\n\r\n <!-- Right slot: column manager + export -->\r\n <div class=\"asc-table-toolbar-right\">\r\n @if (showColumnManager()) {\r\n <p-button\r\n #columnManagerBtn\r\n icon=\"pi pi-table\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\r\n (onClick)=\"columnManagerOverlay.toggle($event)\"\r\n />\r\n <!-- Column manager popover -->\r\n <p-popover #columnManagerOverlay>\r\n <div class=\"asc-column-manager\">\r\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\r\n @for (col of columnVisibility(); track col.field) {\r\n <div class=\"asc-column-manager-item\">\r\n <p-checkbox\r\n [ngModel]=\"col.visible\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [binary]=\"true\"\r\n [inputId]=\"'col-' + col.field\"\r\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\r\n />\r\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\r\n </div>\r\n }\r\n </div>\r\n </p-popover>\r\n }\r\n\r\n @if (exportable()) {\r\n <p-button\r\n icon=\"pi pi-download\"\r\n [label]=\"msg.table.exportCsv\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"exportCsv()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <p-table\r\n #dt\r\n [value]=\"data()\"\r\n [loading]=\"loading()\"\r\n [lazy]=\"lazy()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [rows]=\"rows()\"\r\n [first]=\"first()\"\r\n [paginator]=\"paginator()\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\r\n [showFirstLastIcon]=\"showFirstLastIcon()\"\r\n [showCurrentPageReport]=\"showCurrentPageReport()\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\r\n [sortMode]=\"sortMode()\"\r\n [defaultSortOrder]=\"1\"\r\n [reorderableColumns]=\"reorderableColumns()\"\r\n [resizableColumns]=\"resizableColumns()\"\r\n [columnResizeMode]=\"'expand'\"\r\n [showGridlines]=\"showGridlines()\"\r\n [stripedRows]=\"stripedRows()\"\r\n [scrollable]=\"resolvedScrollable()\"\r\n [scrollHeight]=\"scrollHeight()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n [selectionMode]=\"pSelectionMode()\"\r\n [(selection)]=\"selectedRowsModel\"\r\n [rowSelectable]=\"pRowSelectable\"\r\n [dataKey]=\"dataKey()\"\r\n [(contextMenuSelection)]=\"contextMenuRow\"\r\n [globalFilterFields]=\"globalFilterFields()\"\r\n [rowExpandMode]=\"'multiple'\"\r\n [class]=\"tableStyleClass()\"\r\n (onPage)=\"handlePage($event)\"\r\n (onSort)=\"handleSort($event)\"\r\n (onFilter)=\"handleFilter($event)\"\r\n (onLazyLoad)=\"handleLazyLoad($event)\"\r\n (onRowSelect)=\"rowSelected.emit($event)\"\r\n (onRowUnselect)=\"rowUnselected.emit($event)\"\r\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\r\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\r\n >\r\n\r\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 -->\r\n\r\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 -->\r\n <ng-template #header>\r\n <tr>\r\n <!-- Expand toggle column -->\r\n @if (expandable()) {\r\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Selection column -->\r\n @if (selectionMode() === 'multiple') {\r\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\r\n style=\"width: 3rem\" [frozen]=\"true\">\r\n <p-tableHeaderCheckbox/>\r\n </th>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Row number column -->\r\n @if (showRowNumber()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-th asc-th-row-number\"\r\n style=\"width: 4rem; text-align: center\"\r\n >\r\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (cell of headerCells(); track cell.col.field) {\r\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\r\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\r\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\r\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\r\n </th>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{\r\n col: cell.col,\r\n colspan: cell.colspan,\r\n rowspan: hasHeaderGroups() ? 2 : 1\r\n }\"\r\n />\r\n }\r\n }\r\n\r\n <!-- Actions column header -->\r\n @if (hasActionsColumn()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-th asc-th-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n style=\"text-align: center\"\r\n >\r\n {{ actionsHeader() ?? msg.table.actionsHeader }}\r\n </th>\r\n }\r\n </tr>\r\n\r\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) -->\r\n @if (hasHeaderGroups()) {\r\n <tr>\r\n @for (col of subHeaderColumns(); track col.field) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\r\n />\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\r\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\r\n <th\r\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\r\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [pSortableColumnDisabled]=\"!col.sortable\"\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.headerAlign ?? 'left'\"\r\n [class]=\"col.headerClass ?? ''\"\r\n class=\"asc-th\"\r\n >\r\n <div class=\"asc-th-content\">\r\n <span class=\"asc-th-text\">{{ col.header }}</span>\r\n\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\"/>\r\n }\r\n\r\n @if (col.filterable) {\r\n <p-column-filter\r\n [field]=\"col.field\"\r\n [type]=\"resolveFilterType(col)\"\r\n display=\"menu\"\r\n class=\"asc-col-filter\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\r\n <tr\r\n [pSelectableRow]=\"row\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\r\n [pContextMenuRow]=\"row\"\r\n [class.asc-row-selected]=\"isSelected(row)\"\r\n [class.asc-row-expanded]=\"expanded\"\r\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\r\n (click)=\"rowClicked.emit(row)\"\r\n >\r\n <!-- Expand toggle -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\r\n <p-button\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pRowToggler]=\"row\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Selection -->\r\n @if (selectionMode() === 'multiple') {\r\n @if (!selectionGroupField()) {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\r\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\"\r\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\r\n (click)=\"$event.stopPropagation()\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n />\r\n </td>\r\n }\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n }\r\n\r\n <!-- Row number cell -->\r\n @if (showRowNumber()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-td asc-td-row-number\"\r\n style=\"text-align: center\"\r\n >{{ rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n <!-- Data cells -->\r\n @for (col of visibleColumns(); track col.field) {\r\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\r\n [class]=\"resolveCellClass(col, row)\"\r\n class=\"asc-td\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: getCellValue(row, col.field),\r\n row: row,\r\n index: rowIndex,\r\n column: col\r\n }\"\r\n />\r\n </td>\r\n }\r\n }\r\n\r\n <!-- Actions column -->\r\n @if (hasActionsColumn()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-td asc-td-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (actionsDisplay() === 'dropdown') {\r\n <p-button\r\n class=\"asc-action-more\"\r\n icon=\"pi pi-ellipsis-v\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\r\n />\r\n } @else {\r\n <div class=\"asc-actions-wrap\">\r\n @for (action of getVisibleActions(row); track action.label) {\r\n @let builtin = action.iconSrc ? null : builtinIcon(action.icon);\r\n <p-button\r\n class=\"asc-action-btn\"\r\n [class.asc-action-btn--danger]=\"builtin === 'delete' || action.severity === 'danger'\"\r\n [icon]=\"action.iconSrc || builtin ? '' : (action.icon ?? '')\"\r\n [label]=\"action.label ?? ''\"\r\n [severity]=\"action.severity ?? 'secondary'\"\r\n [disabled]=\"action.disabled?.(row) ?? false\"\r\n [pTooltip]=\"action.tooltip ?? ''\"\r\n tooltipPosition=\"top\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"action.command(row, rowIndex)\"\r\n >\r\n @if (action.iconSrc) {\r\n <ng-template #icon>\r\n <asc-icon [src]=\"action.iconSrc\" />\r\n </ng-template>\r\n } @else if (builtin) {\r\n <ng-template #icon>\r\n <asc-svg-icon [name]=\"builtin\" size=\"16px\" [class]=\"'asc-action-icon asc-action-icon--' + builtin\" />\r\n </ng-template>\r\n }\r\n </p-button>\r\n }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\r\n @if (hasFooter()) {\r\n <ng-template #footer>\r\n <tr>\r\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (showRowNumber()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n\r\n @for (cell of footerCells(); track cell.col.field) {\r\n <td\r\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\r\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\r\n [class]=\"cell.col.headerClass ?? ''\"\r\n class=\"asc-td-footer\"\r\n >\r\n {{ cell.col.footer }}\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n @if (expandable() && expandTpl()) {\r\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\r\n <tr class=\"asc-row-expansion\">\r\n <td [attr.colspan]=\"expandColspan()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\r\n />\r\n </td>\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n <ng-template #loadingbody>\r\n @for (i of skeletonRows(); track i) {\r\n <tr class=\"asc-row-skeleton\">\r\n @if (expandable()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (showRowNumber()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n\r\n @for (col of visibleColumns(); track col.field) {\r\n <td>\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n [width]=\"getSkeletonWidth(col)\"\r\n />\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\r\n @if (emptyTpl()) {\r\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\r\n } @else {\r\n <div class=\"asc-empty-default\">\r\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\r\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n </p-table>\r\n\r\n <!-- Shared popup menu for dropdown action mode -->\r\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template #item let-item>\r\n <a class=\"p-menu-item-link\" [class.asc-menu-item--danger]=\"item.danger\" pRipple>\r\n @let builtin = item.iconSrc ? null : builtinIcon(item.icon);\r\n @if (item.iconSrc) {\r\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\r\n } @else if (builtin) {\r\n <asc-svg-icon [name]=\"builtin\" [class]=\"'p-menu-item-icon asc-action-icon asc-action-icon--' + builtin\" />\r\n } @else if (item.icon) {\r\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n</div>\r\n\r\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 -->\r\n<!--\r\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\r\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\r\n-->\r\n<ng-template\r\n #defaultCell\r\n let-value\r\n let-row=\"row\"\r\n let-col=\"column\"\r\n>\r\n @switch (col?.type ?? 'text') {\r\n\r\n @case ('number') {\r\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\r\n }\r\n @case ('currency') {\r\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\r\n }\r\n @case ('date') {\r\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\r\n }\r\n @case ('datetime') {\r\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\r\n }\r\n @case ('boolean') {\r\n <i\r\n [class]=\"value\r\n ? 'pi pi-check-circle text-green-600'\r\n : 'pi pi-times-circle text-red-400'\"\r\n class=\"asc-cell-boolean\"\r\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\r\n ></i>\r\n }\r\n @case ('badge') {\r\n @if (resolveBadge(value, col); as badge) {\r\n <p-tag\r\n [value]=\"badge.label\"\r\n [severity]=\"mapSeverityToTag(badge.severity)\"\r\n [icon]=\"badge.icon ?? ''\"\r\n />\r\n } @else {\r\n <span>{{ value ?? '\u2014' }}</span>\r\n }\r\n }\r\n @case ('avatar') {\r\n <div class=\"asc-cell-avatar\">\r\n <p-avatar\r\n [label]=\"getInitials(value)\"\r\n shape=\"circle\"\r\n size=\"normal\"\r\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\r\n />\r\n <span>{{ value }}</span>\r\n </div>\r\n }\r\n @default {\r\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\r\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\r\n <span\r\n class=\"asc-cell-text\"\r\n [class.asc-cell-text-clamp]=\"textClamped\"\r\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\r\n tooltipPosition=\"right\"\r\n >{{ formatText(value, col?.format) }}</span>\r\n }\r\n\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);--p-datatable-row-background: var(--asc-surface-base);--p-datatable-row-hover-background: var(--asc-table-row-hover-bg);--p-datatable-footer-cell-background: var(--asc-table-row-hover-bg)}.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;line-height:18px;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;line-height:18px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:9px 8px!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:12px;font-weight:500;line-height:18px;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums}.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-action-icon{color:var(--asc-icon-primary)}.asc-action-icon--delete,.asc-menu-item--danger{color:var(--asc-icon-danger)}.p-button:disabled .asc-action-icon{color:var(--asc-icon-disabled)}.asc-search-icon{display:inline-flex;width:20px;height:20px;margin-top:-10px;color:var(--asc-icon-secondary)}.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-width:0 0 1px 0;border-bottom-color:var(--asc-table-header-divider-bottom);background-image:linear-gradient(var(--asc-table-header-divider-top),var(--asc-table-header-divider-bottom));background-size:1px 100%;background-position:right top;background-repeat:no-repeat}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:last-child{background-image:none}::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-color:var(--asc-table-header-bg)}::ng-deep .asc-table-wrapper .p-datatable-sort-icon{color:var(--asc-icon-secondary)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-table-row-hover-bg)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button,::ng-deep .asc-table-wrapper .asc-action-more .p-button{height:auto;min-width:0;padding:2px 4px;gap:4px;border-radius:4px;font-size:12px;line-height:18px;font-weight:400;color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button:not(:disabled):hover,::ng-deep .asc-table-wrapper .asc-action-more .p-button:not(:disabled):hover{background:var(--asc-surface-hover);color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button .p-button-icon,::ng-deep .asc-table-wrapper .asc-action-more .p-button .p-button-icon{font-size:16px}::ng-deep .asc-table-wrapper .asc-action-btn .p-button.p-button-icon-only{width:auto}::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button,::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button:not(:disabled):hover{color:var(--asc-icon-danger)}::ng-deep .asc-table-wrapper .asc-action-more .p-button{width:24px;height:20px}::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:16px;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;width:auto;flex:0 0 auto}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown.p-disabled{background:transparent}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{font-size:14px}::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-hoverable .p-datatable-tbody>tr:not(.p-datatable-row-selected):hover>.p-datatable-frozen-column{background:var(--asc-table-row-hover-bg)}::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"] }, { kind: "component", type: AscSvgIconComponent, selector: "asc-svg-icon", inputs: ["name", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7364
+ 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: "<!--\r\n @file asc-table.html\r\n AscTableComponent template\r\n\r\n Structure:\r\n .asc-table-wrapper\r\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\r\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\r\n \u2514\u2500\u2500 p-table\r\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\r\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\r\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\r\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\r\n-->\r\n\r\n<div class=\"asc-table-wrapper\">\r\n\r\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 -->\r\n\r\n <ng-template #defaultCaption>\r\n @if (showToolbar()) {\r\n <div class=\"asc-table-toolbar\">\r\n <!-- Left slot: search -->\r\n <div class=\"asc-table-toolbar-left\">\r\n @if (showSearch()) {\r\n <p-iconfield iconPosition=\"left\">\r\n <p-inputicon class=\"asc-search-icon\">\r\n <asc-svg-icon name=\"search\" />\r\n </p-inputicon>\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [placeholder]=\"msg.table.searchPlaceholder\"\r\n [ngModel]=\"globalFilter()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"handleGlobalFilter($event)\"\r\n class=\"asc-table-search-input\"\r\n />\r\n </p-iconfield>\r\n }\r\n </div>\r\n\r\n <!-- Right slot: column manager + export -->\r\n <div class=\"asc-table-toolbar-right\">\r\n @if (showColumnManager()) {\r\n <p-button\r\n #columnManagerBtn\r\n icon=\"pi pi-table\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\r\n (onClick)=\"columnManagerOverlay.toggle($event)\"\r\n />\r\n <!-- Column manager popover -->\r\n <p-popover #columnManagerOverlay>\r\n <div class=\"asc-column-manager\">\r\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\r\n @for (col of columnVisibility(); track col.field) {\r\n <div class=\"asc-column-manager-item\">\r\n <p-checkbox\r\n [ngModel]=\"col.visible\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [binary]=\"true\"\r\n [inputId]=\"'col-' + col.field\"\r\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\r\n />\r\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\r\n </div>\r\n }\r\n </div>\r\n </p-popover>\r\n }\r\n\r\n @if (exportable()) {\r\n <p-button\r\n icon=\"pi pi-download\"\r\n [label]=\"msg.table.exportCsv\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"exportCsv()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <p-table\r\n #dt\r\n [value]=\"data()\"\r\n [loading]=\"loading()\"\r\n [lazy]=\"lazy()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [rows]=\"rows()\"\r\n [first]=\"first()\"\r\n [paginator]=\"paginator()\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\r\n [showFirstLastIcon]=\"showFirstLastIcon()\"\r\n [showCurrentPageReport]=\"showCurrentPageReport()\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\r\n [sortMode]=\"sortMode()\"\r\n [defaultSortOrder]=\"1\"\r\n [reorderableColumns]=\"reorderableColumns()\"\r\n [resizableColumns]=\"resizableColumns()\"\r\n [columnResizeMode]=\"'expand'\"\r\n [showGridlines]=\"showGridlines()\"\r\n [stripedRows]=\"stripedRows()\"\r\n [scrollable]=\"resolvedScrollable()\"\r\n [scrollHeight]=\"scrollHeight()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n [selectionMode]=\"pSelectionMode()\"\r\n [(selection)]=\"selectedRowsModel\"\r\n [rowSelectable]=\"pRowSelectable\"\r\n [dataKey]=\"dataKey()\"\r\n [(contextMenuSelection)]=\"contextMenuRow\"\r\n [globalFilterFields]=\"globalFilterFields()\"\r\n [rowExpandMode]=\"'multiple'\"\r\n [class]=\"tableStyleClass()\"\r\n (onPage)=\"handlePage($event)\"\r\n (onSort)=\"handleSort($event)\"\r\n (onFilter)=\"handleFilter($event)\"\r\n (onLazyLoad)=\"handleLazyLoad($event)\"\r\n (onRowSelect)=\"rowSelected.emit($event)\"\r\n (onRowUnselect)=\"rowUnselected.emit($event)\"\r\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\r\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\r\n >\r\n\r\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 -->\r\n\r\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 -->\r\n <ng-template #header>\r\n <tr>\r\n <!-- Expand toggle column -->\r\n @if (expandable()) {\r\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Selection column -->\r\n @if (selectionMode() === 'multiple') {\r\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\r\n style=\"width: 3rem\" [frozen]=\"true\">\r\n <p-tableHeaderCheckbox/>\r\n </th>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Row number column -->\r\n @if (showRowNumber()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-th asc-th-row-number\"\r\n style=\"width: 4rem; text-align: center\"\r\n >\r\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (cell of headerCells(); track cell.col.field) {\r\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\r\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\r\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\r\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\r\n </th>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{\r\n col: cell.col,\r\n colspan: cell.colspan,\r\n rowspan: hasHeaderGroups() ? 2 : 1\r\n }\"\r\n />\r\n }\r\n }\r\n\r\n <!-- Actions column header -->\r\n @if (hasActionsColumn()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-th asc-th-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n style=\"text-align: center\"\r\n >\r\n {{ actionsHeader() ?? msg.table.actionsHeader }}\r\n </th>\r\n }\r\n </tr>\r\n\r\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) -->\r\n @if (hasHeaderGroups()) {\r\n <tr>\r\n @for (col of subHeaderColumns(); track col.field) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\r\n />\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\r\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\r\n <th\r\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\r\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [pSortableColumnDisabled]=\"!col.sortable\"\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.headerAlign ?? 'left'\"\r\n [class]=\"col.headerClass ?? ''\"\r\n class=\"asc-th\"\r\n >\r\n <div class=\"asc-th-content\">\r\n <span class=\"asc-th-text\">{{ col.header }}</span>\r\n\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\"/>\r\n }\r\n\r\n @if (col.filterable) {\r\n <p-column-filter\r\n [field]=\"col.field\"\r\n [type]=\"resolveFilterType(col)\"\r\n display=\"menu\"\r\n class=\"asc-col-filter\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\r\n <tr\r\n [pSelectableRow]=\"row\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\r\n [pContextMenuRow]=\"row\"\r\n [class.asc-row-selected]=\"isSelected(row)\"\r\n [class.asc-row-expanded]=\"expanded\"\r\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\r\n (click)=\"rowClicked.emit(row)\"\r\n >\r\n <!-- Expand toggle -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\r\n <p-button\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pRowToggler]=\"row\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Selection -->\r\n @if (selectionMode() === 'multiple') {\r\n @if (!selectionGroupField()) {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\r\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\"\r\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\r\n (click)=\"$event.stopPropagation()\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n />\r\n </td>\r\n }\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n }\r\n\r\n <!-- Row number cell -->\r\n @if (showRowNumber()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-td asc-td-row-number\"\r\n style=\"text-align: center\"\r\n >{{ rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n <!-- Data cells -->\r\n @for (col of visibleColumns(); track col.field) {\r\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\r\n [class]=\"resolveCellClass(col, row)\"\r\n class=\"asc-td\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: getCellValue(row, col.field),\r\n row: row,\r\n index: rowIndex,\r\n column: col\r\n }\"\r\n />\r\n </td>\r\n }\r\n }\r\n\r\n <!-- Actions column -->\r\n @if (hasActionsColumn()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-td asc-td-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (actionsDisplay() === 'dropdown') {\r\n <p-button\r\n class=\"asc-action-more\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [ariaLabel]=\"msg.table.actionsHeader\"\r\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\r\n >\r\n <asc-svg-icon name=\"more\" class=\"asc-action-more-icon\" />\r\n </p-button>\r\n } @else {\r\n <div class=\"asc-actions-wrap\">\r\n @for (action of getVisibleActions(row); track action.label) {\r\n @let builtin = action.iconSrc ? null : builtinIcon(action.icon);\r\n <p-button\r\n class=\"asc-action-btn\"\r\n [class.asc-action-btn--danger]=\"builtin === 'delete' || action.severity === 'danger'\"\r\n [icon]=\"action.iconSrc || builtin ? '' : (action.icon ?? '')\"\r\n [label]=\"action.label ?? ''\"\r\n [severity]=\"action.severity ?? 'secondary'\"\r\n [disabled]=\"action.disabled?.(row) ?? false\"\r\n [pTooltip]=\"action.tooltip ?? ''\"\r\n tooltipPosition=\"top\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"action.command(row, rowIndex)\"\r\n >\r\n @if (action.iconSrc) {\r\n <ng-template #icon>\r\n <asc-icon [src]=\"action.iconSrc\" />\r\n </ng-template>\r\n } @else if (builtin) {\r\n <ng-template #icon>\r\n <asc-svg-icon [name]=\"builtin\" size=\"16px\" [class]=\"'asc-action-icon asc-action-icon--' + builtin\" />\r\n </ng-template>\r\n }\r\n </p-button>\r\n }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\r\n @if (hasFooter()) {\r\n <ng-template #footer>\r\n <tr>\r\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (showRowNumber()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n\r\n @for (cell of footerCells(); track cell.col.field) {\r\n <td\r\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\r\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\r\n [class]=\"cell.col.headerClass ?? ''\"\r\n class=\"asc-td-footer\"\r\n >\r\n {{ cell.col.footer }}\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n @if (expandable() && expandTpl()) {\r\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\r\n <tr class=\"asc-row-expansion\">\r\n <td [attr.colspan]=\"expandColspan()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\r\n />\r\n </td>\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n <ng-template #loadingbody>\r\n @for (i of skeletonRows(); track i) {\r\n <tr class=\"asc-row-skeleton\">\r\n @if (expandable()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (showRowNumber()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n\r\n @for (col of visibleColumns(); track col.field) {\r\n <td>\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n [width]=\"getSkeletonWidth(col)\"\r\n />\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\r\n @if (emptyTpl()) {\r\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\r\n } @else {\r\n <div class=\"asc-empty-default\">\r\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\r\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n </p-table>\r\n\r\n <!-- Shared popup menu for dropdown action mode -->\r\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template #item let-item>\r\n <a class=\"p-menu-item-link\" [class.asc-menu-item--danger]=\"item.danger\" pRipple>\r\n @let builtin = item.iconSrc ? null : builtinIcon(item.icon);\r\n @if (item.iconSrc) {\r\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\r\n } @else if (builtin) {\r\n <asc-svg-icon [name]=\"builtin\" [class]=\"'p-menu-item-icon asc-action-icon asc-action-icon--' + builtin\" />\r\n } @else if (item.icon) {\r\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n</div>\r\n\r\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 -->\r\n<!--\r\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\r\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\r\n-->\r\n<ng-template\r\n #defaultCell\r\n let-value\r\n let-row=\"row\"\r\n let-col=\"column\"\r\n>\r\n @switch (col?.type ?? 'text') {\r\n\r\n @case ('number') {\r\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\r\n }\r\n @case ('currency') {\r\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\r\n }\r\n @case ('date') {\r\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\r\n }\r\n @case ('datetime') {\r\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\r\n }\r\n @case ('boolean') {\r\n <i\r\n [class]=\"value\r\n ? 'pi pi-check-circle text-green-600'\r\n : 'pi pi-times-circle text-red-400'\"\r\n class=\"asc-cell-boolean\"\r\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\r\n ></i>\r\n }\r\n @case ('badge') {\r\n @if (resolveBadge(value, col); as badge) {\r\n <p-tag\r\n [value]=\"badge.label\"\r\n [severity]=\"mapSeverityToTag(badge.severity)\"\r\n [icon]=\"badge.icon ?? ''\"\r\n />\r\n } @else {\r\n <span>{{ value ?? '\u2014' }}</span>\r\n }\r\n }\r\n @case ('avatar') {\r\n <div class=\"asc-cell-avatar\">\r\n <p-avatar\r\n [label]=\"getInitials(value)\"\r\n shape=\"circle\"\r\n size=\"normal\"\r\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\r\n />\r\n <span>{{ value }}</span>\r\n </div>\r\n }\r\n @default {\r\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\r\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\r\n <span\r\n class=\"asc-cell-text\"\r\n [class.asc-cell-text-clamp]=\"textClamped\"\r\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\r\n tooltipPosition=\"right\"\r\n >{{ formatText(value, col?.format) }}</span>\r\n }\r\n\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);--p-datatable-row-background: var(--asc-surface-base);--p-datatable-row-hover-background: var(--asc-table-row-hover-bg);--p-datatable-footer-cell-background: var(--asc-table-row-hover-bg)}.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;line-height:18px;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;line-height:18px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:9px 8px!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:12px;font-weight:500;line-height:18px;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums}.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-action-icon{color:var(--asc-icon-primary)}.asc-action-icon--delete,.asc-menu-item--danger{color:var(--asc-icon-danger)}.p-button:disabled .asc-action-icon{color:var(--asc-icon-disabled)}.asc-search-icon{display:inline-flex;width:20px;height:20px;margin-top:-10px;color:var(--asc-icon-secondary)}.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-width:0 0 1px 0;border-bottom-color:var(--asc-table-header-divider-bottom);background-image:linear-gradient(var(--asc-table-header-divider-top),var(--asc-table-header-divider-bottom));background-size:1px 100%;background-position:right top;background-repeat:no-repeat}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:last-child{background-image:none}::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-color:var(--asc-table-header-bg)}::ng-deep .asc-table-wrapper .p-datatable-sort-icon{color:var(--asc-icon-secondary)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-table-row-hover-bg)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button,::ng-deep .asc-table-wrapper .asc-action-more .p-button{height:auto;min-width:0;padding:2px 4px;gap:4px;border-radius:4px;font-size:12px;line-height:18px;font-weight:400;color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button:not(:disabled):hover,::ng-deep .asc-table-wrapper .asc-action-more .p-button:not(:disabled):hover{background:var(--asc-surface-hover);color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button .p-button-icon,::ng-deep .asc-table-wrapper .asc-action-more .p-button .p-button-icon{font-size:16px}::ng-deep .asc-table-wrapper .asc-action-btn .p-button.p-button-icon-only{width:auto}::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button,::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button:not(:disabled):hover{color:var(--asc-icon-danger)}::ng-deep .asc-table-wrapper .asc-action-more .p-button{width:auto;height:auto}::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:16px;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;width:auto;flex:0 0 auto}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown.p-disabled{background:transparent}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{font-size:14px}::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-hoverable .p-datatable-tbody>tr:not(.p-datatable-row-selected):hover>.p-datatable-frozen-column{background:var(--asc-table-row-hover-bg)}::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"] }, { kind: "component", type: AscSvgIconComponent, selector: "asc-svg-icon", inputs: ["name", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7321
7365
  }
7322
7366
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscTableComponent, decorators: [{
7323
7367
  type: Component,
@@ -7340,7 +7384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
7340
7384
  RippleModule,
7341
7385
  AscIconComponent,
7342
7386
  AscSvgIconComponent,
7343
- ], providers: [DatePipe], template: "<!--\r\n @file asc-table.html\r\n AscTableComponent template\r\n\r\n Structure:\r\n .asc-table-wrapper\r\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\r\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\r\n \u2514\u2500\u2500 p-table\r\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\r\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\r\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\r\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\r\n-->\r\n\r\n<div class=\"asc-table-wrapper\">\r\n\r\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 -->\r\n\r\n <ng-template #defaultCaption>\r\n @if (showToolbar()) {\r\n <div class=\"asc-table-toolbar\">\r\n <!-- Left slot: search -->\r\n <div class=\"asc-table-toolbar-left\">\r\n @if (showSearch()) {\r\n <p-iconfield iconPosition=\"left\">\r\n <p-inputicon class=\"asc-search-icon\">\r\n <asc-svg-icon name=\"search\" />\r\n </p-inputicon>\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [placeholder]=\"msg.table.searchPlaceholder\"\r\n [ngModel]=\"globalFilter()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"handleGlobalFilter($event)\"\r\n class=\"asc-table-search-input\"\r\n />\r\n </p-iconfield>\r\n }\r\n </div>\r\n\r\n <!-- Right slot: column manager + export -->\r\n <div class=\"asc-table-toolbar-right\">\r\n @if (showColumnManager()) {\r\n <p-button\r\n #columnManagerBtn\r\n icon=\"pi pi-table\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\r\n (onClick)=\"columnManagerOverlay.toggle($event)\"\r\n />\r\n <!-- Column manager popover -->\r\n <p-popover #columnManagerOverlay>\r\n <div class=\"asc-column-manager\">\r\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\r\n @for (col of columnVisibility(); track col.field) {\r\n <div class=\"asc-column-manager-item\">\r\n <p-checkbox\r\n [ngModel]=\"col.visible\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [binary]=\"true\"\r\n [inputId]=\"'col-' + col.field\"\r\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\r\n />\r\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\r\n </div>\r\n }\r\n </div>\r\n </p-popover>\r\n }\r\n\r\n @if (exportable()) {\r\n <p-button\r\n icon=\"pi pi-download\"\r\n [label]=\"msg.table.exportCsv\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"exportCsv()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <p-table\r\n #dt\r\n [value]=\"data()\"\r\n [loading]=\"loading()\"\r\n [lazy]=\"lazy()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [rows]=\"rows()\"\r\n [first]=\"first()\"\r\n [paginator]=\"paginator()\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\r\n [showFirstLastIcon]=\"showFirstLastIcon()\"\r\n [showCurrentPageReport]=\"showCurrentPageReport()\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\r\n [sortMode]=\"sortMode()\"\r\n [defaultSortOrder]=\"1\"\r\n [reorderableColumns]=\"reorderableColumns()\"\r\n [resizableColumns]=\"resizableColumns()\"\r\n [columnResizeMode]=\"'expand'\"\r\n [showGridlines]=\"showGridlines()\"\r\n [stripedRows]=\"stripedRows()\"\r\n [scrollable]=\"resolvedScrollable()\"\r\n [scrollHeight]=\"scrollHeight()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n [selectionMode]=\"pSelectionMode()\"\r\n [(selection)]=\"selectedRowsModel\"\r\n [rowSelectable]=\"pRowSelectable\"\r\n [dataKey]=\"dataKey()\"\r\n [(contextMenuSelection)]=\"contextMenuRow\"\r\n [globalFilterFields]=\"globalFilterFields()\"\r\n [rowExpandMode]=\"'multiple'\"\r\n [class]=\"tableStyleClass()\"\r\n (onPage)=\"handlePage($event)\"\r\n (onSort)=\"handleSort($event)\"\r\n (onFilter)=\"handleFilter($event)\"\r\n (onLazyLoad)=\"handleLazyLoad($event)\"\r\n (onRowSelect)=\"rowSelected.emit($event)\"\r\n (onRowUnselect)=\"rowUnselected.emit($event)\"\r\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\r\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\r\n >\r\n\r\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 -->\r\n\r\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 -->\r\n <ng-template #header>\r\n <tr>\r\n <!-- Expand toggle column -->\r\n @if (expandable()) {\r\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Selection column -->\r\n @if (selectionMode() === 'multiple') {\r\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\r\n style=\"width: 3rem\" [frozen]=\"true\">\r\n <p-tableHeaderCheckbox/>\r\n </th>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Row number column -->\r\n @if (showRowNumber()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-th asc-th-row-number\"\r\n style=\"width: 4rem; text-align: center\"\r\n >\r\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (cell of headerCells(); track cell.col.field) {\r\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\r\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\r\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\r\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\r\n </th>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{\r\n col: cell.col,\r\n colspan: cell.colspan,\r\n rowspan: hasHeaderGroups() ? 2 : 1\r\n }\"\r\n />\r\n }\r\n }\r\n\r\n <!-- Actions column header -->\r\n @if (hasActionsColumn()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-th asc-th-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n style=\"text-align: center\"\r\n >\r\n {{ actionsHeader() ?? msg.table.actionsHeader }}\r\n </th>\r\n }\r\n </tr>\r\n\r\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) -->\r\n @if (hasHeaderGroups()) {\r\n <tr>\r\n @for (col of subHeaderColumns(); track col.field) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\r\n />\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\r\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\r\n <th\r\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\r\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [pSortableColumnDisabled]=\"!col.sortable\"\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.headerAlign ?? 'left'\"\r\n [class]=\"col.headerClass ?? ''\"\r\n class=\"asc-th\"\r\n >\r\n <div class=\"asc-th-content\">\r\n <span class=\"asc-th-text\">{{ col.header }}</span>\r\n\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\"/>\r\n }\r\n\r\n @if (col.filterable) {\r\n <p-column-filter\r\n [field]=\"col.field\"\r\n [type]=\"resolveFilterType(col)\"\r\n display=\"menu\"\r\n class=\"asc-col-filter\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\r\n <tr\r\n [pSelectableRow]=\"row\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\r\n [pContextMenuRow]=\"row\"\r\n [class.asc-row-selected]=\"isSelected(row)\"\r\n [class.asc-row-expanded]=\"expanded\"\r\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\r\n (click)=\"rowClicked.emit(row)\"\r\n >\r\n <!-- Expand toggle -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\r\n <p-button\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pRowToggler]=\"row\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Selection -->\r\n @if (selectionMode() === 'multiple') {\r\n @if (!selectionGroupField()) {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\r\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\"\r\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\r\n (click)=\"$event.stopPropagation()\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n />\r\n </td>\r\n }\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n }\r\n\r\n <!-- Row number cell -->\r\n @if (showRowNumber()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-td asc-td-row-number\"\r\n style=\"text-align: center\"\r\n >{{ rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n <!-- Data cells -->\r\n @for (col of visibleColumns(); track col.field) {\r\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\r\n [class]=\"resolveCellClass(col, row)\"\r\n class=\"asc-td\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: getCellValue(row, col.field),\r\n row: row,\r\n index: rowIndex,\r\n column: col\r\n }\"\r\n />\r\n </td>\r\n }\r\n }\r\n\r\n <!-- Actions column -->\r\n @if (hasActionsColumn()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-td asc-td-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (actionsDisplay() === 'dropdown') {\r\n <p-button\r\n class=\"asc-action-more\"\r\n icon=\"pi pi-ellipsis-v\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\r\n />\r\n } @else {\r\n <div class=\"asc-actions-wrap\">\r\n @for (action of getVisibleActions(row); track action.label) {\r\n @let builtin = action.iconSrc ? null : builtinIcon(action.icon);\r\n <p-button\r\n class=\"asc-action-btn\"\r\n [class.asc-action-btn--danger]=\"builtin === 'delete' || action.severity === 'danger'\"\r\n [icon]=\"action.iconSrc || builtin ? '' : (action.icon ?? '')\"\r\n [label]=\"action.label ?? ''\"\r\n [severity]=\"action.severity ?? 'secondary'\"\r\n [disabled]=\"action.disabled?.(row) ?? false\"\r\n [pTooltip]=\"action.tooltip ?? ''\"\r\n tooltipPosition=\"top\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"action.command(row, rowIndex)\"\r\n >\r\n @if (action.iconSrc) {\r\n <ng-template #icon>\r\n <asc-icon [src]=\"action.iconSrc\" />\r\n </ng-template>\r\n } @else if (builtin) {\r\n <ng-template #icon>\r\n <asc-svg-icon [name]=\"builtin\" size=\"16px\" [class]=\"'asc-action-icon asc-action-icon--' + builtin\" />\r\n </ng-template>\r\n }\r\n </p-button>\r\n }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\r\n @if (hasFooter()) {\r\n <ng-template #footer>\r\n <tr>\r\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (showRowNumber()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n\r\n @for (cell of footerCells(); track cell.col.field) {\r\n <td\r\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\r\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\r\n [class]=\"cell.col.headerClass ?? ''\"\r\n class=\"asc-td-footer\"\r\n >\r\n {{ cell.col.footer }}\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n @if (expandable() && expandTpl()) {\r\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\r\n <tr class=\"asc-row-expansion\">\r\n <td [attr.colspan]=\"expandColspan()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\r\n />\r\n </td>\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n <ng-template #loadingbody>\r\n @for (i of skeletonRows(); track i) {\r\n <tr class=\"asc-row-skeleton\">\r\n @if (expandable()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (showRowNumber()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n\r\n @for (col of visibleColumns(); track col.field) {\r\n <td>\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n [width]=\"getSkeletonWidth(col)\"\r\n />\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\r\n @if (emptyTpl()) {\r\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\r\n } @else {\r\n <div class=\"asc-empty-default\">\r\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\r\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n </p-table>\r\n\r\n <!-- Shared popup menu for dropdown action mode -->\r\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template #item let-item>\r\n <a class=\"p-menu-item-link\" [class.asc-menu-item--danger]=\"item.danger\" pRipple>\r\n @let builtin = item.iconSrc ? null : builtinIcon(item.icon);\r\n @if (item.iconSrc) {\r\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\r\n } @else if (builtin) {\r\n <asc-svg-icon [name]=\"builtin\" [class]=\"'p-menu-item-icon asc-action-icon asc-action-icon--' + builtin\" />\r\n } @else if (item.icon) {\r\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n</div>\r\n\r\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 -->\r\n<!--\r\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\r\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\r\n-->\r\n<ng-template\r\n #defaultCell\r\n let-value\r\n let-row=\"row\"\r\n let-col=\"column\"\r\n>\r\n @switch (col?.type ?? 'text') {\r\n\r\n @case ('number') {\r\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\r\n }\r\n @case ('currency') {\r\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\r\n }\r\n @case ('date') {\r\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\r\n }\r\n @case ('datetime') {\r\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\r\n }\r\n @case ('boolean') {\r\n <i\r\n [class]=\"value\r\n ? 'pi pi-check-circle text-green-600'\r\n : 'pi pi-times-circle text-red-400'\"\r\n class=\"asc-cell-boolean\"\r\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\r\n ></i>\r\n }\r\n @case ('badge') {\r\n @if (resolveBadge(value, col); as badge) {\r\n <p-tag\r\n [value]=\"badge.label\"\r\n [severity]=\"mapSeverityToTag(badge.severity)\"\r\n [icon]=\"badge.icon ?? ''\"\r\n />\r\n } @else {\r\n <span>{{ value ?? '\u2014' }}</span>\r\n }\r\n }\r\n @case ('avatar') {\r\n <div class=\"asc-cell-avatar\">\r\n <p-avatar\r\n [label]=\"getInitials(value)\"\r\n shape=\"circle\"\r\n size=\"normal\"\r\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\r\n />\r\n <span>{{ value }}</span>\r\n </div>\r\n }\r\n @default {\r\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\r\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\r\n <span\r\n class=\"asc-cell-text\"\r\n [class.asc-cell-text-clamp]=\"textClamped\"\r\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\r\n tooltipPosition=\"right\"\r\n >{{ formatText(value, col?.format) }}</span>\r\n }\r\n\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);--p-datatable-row-background: var(--asc-surface-base);--p-datatable-row-hover-background: var(--asc-table-row-hover-bg);--p-datatable-footer-cell-background: var(--asc-table-row-hover-bg)}.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;line-height:18px;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;line-height:18px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:9px 8px!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:12px;font-weight:500;line-height:18px;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums}.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-action-icon{color:var(--asc-icon-primary)}.asc-action-icon--delete,.asc-menu-item--danger{color:var(--asc-icon-danger)}.p-button:disabled .asc-action-icon{color:var(--asc-icon-disabled)}.asc-search-icon{display:inline-flex;width:20px;height:20px;margin-top:-10px;color:var(--asc-icon-secondary)}.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-width:0 0 1px 0;border-bottom-color:var(--asc-table-header-divider-bottom);background-image:linear-gradient(var(--asc-table-header-divider-top),var(--asc-table-header-divider-bottom));background-size:1px 100%;background-position:right top;background-repeat:no-repeat}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:last-child{background-image:none}::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-color:var(--asc-table-header-bg)}::ng-deep .asc-table-wrapper .p-datatable-sort-icon{color:var(--asc-icon-secondary)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-table-row-hover-bg)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button,::ng-deep .asc-table-wrapper .asc-action-more .p-button{height:auto;min-width:0;padding:2px 4px;gap:4px;border-radius:4px;font-size:12px;line-height:18px;font-weight:400;color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button:not(:disabled):hover,::ng-deep .asc-table-wrapper .asc-action-more .p-button:not(:disabled):hover{background:var(--asc-surface-hover);color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button .p-button-icon,::ng-deep .asc-table-wrapper .asc-action-more .p-button .p-button-icon{font-size:16px}::ng-deep .asc-table-wrapper .asc-action-btn .p-button.p-button-icon-only{width:auto}::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button,::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button:not(:disabled):hover{color:var(--asc-icon-danger)}::ng-deep .asc-table-wrapper .asc-action-more .p-button{width:24px;height:20px}::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:16px;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;width:auto;flex:0 0 auto}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown.p-disabled{background:transparent}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{font-size:14px}::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-hoverable .p-datatable-tbody>tr:not(.p-datatable-row-selected):hover>.p-datatable-frozen-column{background:var(--asc-table-row-hover-bg)}::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"] }]
7387
+ ], providers: [DatePipe], template: "<!--\r\n @file asc-table.html\r\n AscTableComponent template\r\n\r\n Structure:\r\n .asc-table-wrapper\r\n \u251C\u2500\u2500 [Caption] \u2014 toolbar (default search bar ho\u1EB7c custom template)\r\n \u251C\u2500\u2500 [Selection bar] \u2014 hi\u1EC7n khi c\u00F3 rows \u0111\u01B0\u1EE3c ch\u1ECDn\r\n \u2514\u2500\u2500 p-table\r\n \u251C\u2500\u2500 [Header] \u2014 column headers v\u1EDBi sort icons + filter\r\n \u251C\u2500\u2500 [Body] \u2014 rows v\u1EDBi cell renderers theo type\r\n \u251C\u2500\u2500 [Loading skeleton] \u2014 #loadingbody\r\n \u2514\u2500\u2500 [Empty] \u2014 #emptymessage\r\n-->\r\n\r\n<div class=\"asc-table-wrapper\">\r\n\r\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 -->\r\n\r\n <ng-template #defaultCaption>\r\n @if (showToolbar()) {\r\n <div class=\"asc-table-toolbar\">\r\n <!-- Left slot: search -->\r\n <div class=\"asc-table-toolbar-left\">\r\n @if (showSearch()) {\r\n <p-iconfield iconPosition=\"left\">\r\n <p-inputicon class=\"asc-search-icon\">\r\n <asc-svg-icon name=\"search\" />\r\n </p-inputicon>\r\n <input\r\n pInputText\r\n type=\"text\"\r\n [placeholder]=\"msg.table.searchPlaceholder\"\r\n [ngModel]=\"globalFilter()\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (ngModelChange)=\"handleGlobalFilter($event)\"\r\n class=\"asc-table-search-input\"\r\n />\r\n </p-iconfield>\r\n }\r\n </div>\r\n\r\n <!-- Right slot: column manager + export -->\r\n <div class=\"asc-table-toolbar-right\">\r\n @if (showColumnManager()) {\r\n <p-button\r\n #columnManagerBtn\r\n icon=\"pi pi-table\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pTooltip]=\"'Hi\u1EC3n th\u1ECB c\u1ED9t'\"\r\n (onClick)=\"columnManagerOverlay.toggle($event)\"\r\n />\r\n <!-- Column manager popover -->\r\n <p-popover #columnManagerOverlay>\r\n <div class=\"asc-column-manager\">\r\n <p class=\"asc-column-manager-title\">Ch\u1ECDn c\u1ED9t hi\u1EC3n th\u1ECB</p>\r\n @for (col of columnVisibility(); track col.field) {\r\n <div class=\"asc-column-manager-item\">\r\n <p-checkbox\r\n [ngModel]=\"col.visible\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [binary]=\"true\"\r\n [inputId]=\"'col-' + col.field\"\r\n (ngModelChange)=\"toggleColumn(col.field, $event)\"\r\n />\r\n <label [for]=\"'col-' + col.field\">{{ col.header }}</label>\r\n </div>\r\n }\r\n </div>\r\n </p-popover>\r\n }\r\n\r\n @if (exportable()) {\r\n <p-button\r\n icon=\"pi pi-download\"\r\n [label]=\"msg.table.exportCsv\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"exportCsv()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <p-table\r\n #dt\r\n [value]=\"data()\"\r\n [loading]=\"loading()\"\r\n [lazy]=\"lazy()\"\r\n [totalRecords]=\"totalRecords()\"\r\n [rows]=\"rows()\"\r\n [first]=\"first()\"\r\n [paginator]=\"paginator()\"\r\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\r\n [showFirstLastIcon]=\"showFirstLastIcon()\"\r\n [showCurrentPageReport]=\"showCurrentPageReport()\"\r\n [currentPageReportTemplate]=\"currentPageReportTemplate() || msg.table.totalRecords\"\r\n [sortMode]=\"sortMode()\"\r\n [defaultSortOrder]=\"1\"\r\n [reorderableColumns]=\"reorderableColumns()\"\r\n [resizableColumns]=\"resizableColumns()\"\r\n [columnResizeMode]=\"'expand'\"\r\n [showGridlines]=\"showGridlines()\"\r\n [stripedRows]=\"stripedRows()\"\r\n [scrollable]=\"resolvedScrollable()\"\r\n [scrollHeight]=\"scrollHeight()\"\r\n [virtualScroll]=\"virtualScroll()\"\r\n [virtualScrollItemSize]=\"virtualScrollItemSize()\"\r\n [selectionMode]=\"pSelectionMode()\"\r\n [(selection)]=\"selectedRowsModel\"\r\n [rowSelectable]=\"pRowSelectable\"\r\n [dataKey]=\"dataKey()\"\r\n [(contextMenuSelection)]=\"contextMenuRow\"\r\n [globalFilterFields]=\"globalFilterFields()\"\r\n [rowExpandMode]=\"'multiple'\"\r\n [class]=\"tableStyleClass()\"\r\n (onPage)=\"handlePage($event)\"\r\n (onSort)=\"handleSort($event)\"\r\n (onFilter)=\"handleFilter($event)\"\r\n (onLazyLoad)=\"handleLazyLoad($event)\"\r\n (onRowSelect)=\"rowSelected.emit($event)\"\r\n (onRowUnselect)=\"rowUnselected.emit($event)\"\r\n (onRowExpand)=\"rowExpanded.emit($event.data)\"\r\n (onRowCollapse)=\"rowCollapsed.emit($event.data)\"\r\n >\r\n\r\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 -->\r\n\r\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 -->\r\n <ng-template #header>\r\n <tr>\r\n <!-- Expand toggle column -->\r\n @if (expandable()) {\r\n <th [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-expand\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Selection column -->\r\n @if (selectionMode() === 'multiple') {\r\n <th pFrozenColumn [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\" class=\"asc-th-select\"\r\n style=\"width: 3rem\" [frozen]=\"true\">\r\n <p-tableHeaderCheckbox/>\r\n </th>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <th pFrozenColumn [frozen]=\"true\" [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n class=\"asc-th-select\" style=\"width: 3rem\"></th>\r\n }\r\n\r\n <!-- Row number column -->\r\n @if (showRowNumber()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-th asc-th-row-number\"\r\n style=\"width: 4rem; text-align: center\"\r\n >\r\n {{ rowNumberHeader() ?? msg.table.rowNumber }}\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (cell of headerCells(); track cell.col.field) {\r\n @if (cell.colspan > 1 && cell.col.headerGroup != null) {\r\n <!-- Group label \u2014 h\u00E0ng con c\u1EE7a nh\u00F3m n\u00E0y render ri\u00EAng \u1EDF h\u00E0ng header th\u1EE9 2 -->\r\n <th [attr.colspan]=\"cell.colspan\" class=\"asc-th asc-th-group\">\r\n <span class=\"asc-th-text\">{{ cell.col.headerGroup }}</span>\r\n </th>\r\n } @else {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{\r\n col: cell.col,\r\n colspan: cell.colspan,\r\n rowspan: hasHeaderGroups() ? 2 : 1\r\n }\"\r\n />\r\n }\r\n }\r\n\r\n <!-- Actions column header -->\r\n @if (hasActionsColumn()) {\r\n <th\r\n [attr.rowspan]=\"hasHeaderGroups() ? 2 : null\"\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-th asc-th-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n style=\"text-align: center\"\r\n >\r\n {{ actionsHeader() ?? msg.table.actionsHeader }}\r\n </th>\r\n }\r\n </tr>\r\n\r\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) -->\r\n @if (hasHeaderGroups()) {\r\n <tr>\r\n @for (col of subHeaderColumns(); track col.field) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"dataHeaderCell\"\r\n [ngTemplateOutletContext]=\"{ col: col, colspan: 1, rowspan: 1 }\"\r\n />\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\n <!-- Header cell d\u00F9ng chung cho column kh\u00F4ng thu\u1ED9c group V\u00C0 sub-header c\u1EE7a group -->\r\n <ng-template #dataHeaderCell let-col=\"col\" let-colspan=\"colspan\" let-rowspan=\"rowspan\">\r\n <th\r\n [attr.colspan]=\"colspan > 1 ? colspan : null\"\r\n [attr.rowspan]=\"rowspan > 1 ? rowspan : null\"\r\n [pSortableColumn]=\"col.sortable ? col.field : ''\"\r\n [pSortableColumnDisabled]=\"!col.sortable\"\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.headerAlign ?? 'left'\"\r\n [class]=\"col.headerClass ?? ''\"\r\n class=\"asc-th\"\r\n >\r\n <div class=\"asc-th-content\">\r\n <span class=\"asc-th-text\">{{ col.header }}</span>\r\n\r\n @if (col.sortable) {\r\n <p-sortIcon [field]=\"col.field\"/>\r\n }\r\n\r\n @if (col.filterable) {\r\n <p-column-filter\r\n [field]=\"col.field\"\r\n [type]=\"resolveFilterType(col)\"\r\n display=\"menu\"\r\n class=\"asc-col-filter\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #body let-row let-rowIndex=\"rowIndex\" let-expanded=\"expanded\">\r\n <tr\r\n [pSelectableRow]=\"row\"\r\n [pSelectableRowIndex]=\"rowIndex\"\r\n [pSelectableRowDisabled]=\"isRowDisabled(row)\"\r\n [pContextMenuRow]=\"row\"\r\n [class.asc-row-selected]=\"isSelected(row)\"\r\n [class.asc-row-expanded]=\"expanded\"\r\n [class.asc-row-disabled]=\"isRowDisabled(row)\"\r\n (click)=\"rowClicked.emit(row)\"\r\n >\r\n <!-- Expand toggle -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-expand\" (click)=\"$event.stopPropagation()\">\r\n <p-button\r\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [pRowToggler]=\"row\"\r\n />\r\n </td>\r\n }\r\n\r\n <!-- Selection -->\r\n @if (selectionMode() === 'multiple') {\r\n @if (!selectionGroupField()) {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableCheckbox [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n } @else if (getSelectionGroupSpan(rowIndex) > 0) {\r\n <!-- Group selection \u2014 1 checkbox tri-state span theo rowspan c\u1EE7a nh\u00F3m -->\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\"\r\n [attr.rowspan]=\"getSelectionGroupSpan(rowIndex) > 1 ? getSelectionGroupSpan(rowIndex) : null\"\r\n (click)=\"$event.stopPropagation()\">\r\n <p-checkbox\r\n [binary]=\"true\"\r\n [ngModel]=\"isGroupChecked(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n [indeterminate]=\"isGroupIndeterminate(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n (onChange)=\"toggleGroupSelection(rowIndex, getSelectionGroupSpan(rowIndex))\"\r\n />\r\n </td>\r\n }\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td pFrozenColumn\r\n [frozen]=\"true\" class=\"asc-td-select\" (click)=\"$event.stopPropagation()\">\r\n <p-tableRadioButton [value]=\"row\" [disabled]=\"isRowDisabled(row)\"/>\r\n </td>\r\n }\r\n\r\n <!-- Row number cell -->\r\n @if (showRowNumber()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"left\"\r\n class=\"asc-td asc-td-row-number\"\r\n style=\"text-align: center\"\r\n >{{ rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n <!-- Data cells -->\r\n @for (col of visibleColumns(); track col.field) {\r\n @if (!col.rowspan || getRowSpan(col, rowIndex) > 0) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"col.frozen ?? false\"\r\n [alignFrozen]=\"col.alignFrozen ?? 'left'\"\r\n [attr.rowspan]=\"col.rowspan && getRowSpan(col, rowIndex) > 1 ? getRowSpan(col, rowIndex) : null\"\r\n [style.width]=\"col.width ?? 'auto'\"\r\n [style.min-width]=\"col.minWidth ?? '0'\"\r\n [style.max-width]=\"col.maxWidth ?? 'none'\"\r\n [style.text-align]=\"col.align ?? resolveDefaultAlign(col)\"\r\n [class]=\"resolveCellClass(col, row)\"\r\n class=\"asc-td\"\r\n >\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCellTemplate(col) ?? defaultCell\"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: getCellValue(row, col.field),\r\n row: row,\r\n index: rowIndex,\r\n column: col\r\n }\"\r\n />\r\n </td>\r\n }\r\n }\r\n\r\n <!-- Actions column -->\r\n @if (hasActionsColumn()) {\r\n <td\r\n pFrozenColumn\r\n [frozen]=\"true\"\r\n alignFrozen=\"right\"\r\n class=\"asc-td asc-td-actions\"\r\n [style.width]=\"actionsDisplay() === 'full' ? (actionsWidth() ?? '8rem') : '4rem'\"\r\n [style.min-width]=\"actionsDisplay() === 'full' ? (actionsMinWidth() ?? '0') : null\"\r\n [style.max-width]=\"actionsDisplay() === 'full' ? (actionsMaxWidth() ?? 'none') : null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n @if (actionsDisplay() === 'dropdown') {\r\n <p-button\r\n class=\"asc-action-more\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [ariaLabel]=\"msg.table.actionsHeader\"\r\n (onClick)=\"openActionMenu($event, row, rowIndex, actionMenu)\"\r\n >\r\n <asc-svg-icon name=\"more\" class=\"asc-action-more-icon\" />\r\n </p-button>\r\n } @else {\r\n <div class=\"asc-actions-wrap\">\r\n @for (action of getVisibleActions(row); track action.label) {\r\n @let builtin = action.iconSrc ? null : builtinIcon(action.icon);\r\n <p-button\r\n class=\"asc-action-btn\"\r\n [class.asc-action-btn--danger]=\"builtin === 'delete' || action.severity === 'danger'\"\r\n [icon]=\"action.iconSrc || builtin ? '' : (action.icon ?? '')\"\r\n [label]=\"action.label ?? ''\"\r\n [severity]=\"action.severity ?? 'secondary'\"\r\n [disabled]=\"action.disabled?.(row) ?? false\"\r\n [pTooltip]=\"action.tooltip ?? ''\"\r\n tooltipPosition=\"top\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"action.command(row, rowIndex)\"\r\n >\r\n @if (action.iconSrc) {\r\n <ng-template #icon>\r\n <asc-icon [src]=\"action.iconSrc\" />\r\n </ng-template>\r\n } @else if (builtin) {\r\n <ng-template #icon>\r\n <asc-svg-icon [name]=\"builtin\" size=\"16px\" [class]=\"'asc-action-icon asc-action-icon--' + builtin\" />\r\n </ng-template>\r\n }\r\n </p-button>\r\n }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- \u2500\u2500 Footer (opt-in \u2014 ch\u1EC9 render khi c\u00F3 \u00EDt nh\u1EA5t 1 column khai b\u00E1o `footer`) \u2500\u2500 -->\r\n @if (hasFooter()) {\r\n <ng-template #footer>\r\n <tr>\r\n <!-- C\u00E1c c\u1ED9t ph\u1EE5 (expand/select/STT) \u2014 kh\u00F4ng c\u00F3 n\u1ED9i dung footer -->\r\n @if (expandable()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n @if (showRowNumber()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n\r\n @for (cell of footerCells(); track cell.col.field) {\r\n <td\r\n [attr.colspan]=\"cell.colspan > 1 ? cell.colspan : null\"\r\n [style.text-align]=\"cell.col.align ?? resolveDefaultAlign(cell.col)\"\r\n [class]=\"cell.col.headerClass ?? ''\"\r\n class=\"asc-td-footer\"\r\n >\r\n {{ cell.col.footer }}\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td class=\"asc-td-footer\"></td>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n @if (expandable() && expandTpl()) {\r\n <ng-template #expandedrow let-row let-rowIndex=\"rowIndex\">\r\n <tr class=\"asc-row-expansion\">\r\n <td [attr.colspan]=\"expandColspan()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"expandTpl()!['templateRef']\"\r\n [ngTemplateOutletContext]=\"{ $implicit: row, index: rowIndex }\"\r\n />\r\n </td>\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\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 -->\r\n <ng-template #loadingbody>\r\n @for (i of skeletonRows(); track i) {\r\n <tr class=\"asc-row-skeleton\">\r\n @if (expandable()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"2rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'multiple') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (selectionMode() === 'single') {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n @if (showRowNumber()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"1.5rem\"/>\r\n </td>\r\n }\r\n\r\n @for (col of visibleColumns(); track col.field) {\r\n <td>\r\n <p-skeleton\r\n height=\"1.5rem\"\r\n [width]=\"getSkeletonWidth(col)\"\r\n />\r\n </td>\r\n }\r\n\r\n @if (hasActionsColumn()) {\r\n <td>\r\n <p-skeleton height=\"1.5rem\" width=\"5rem\"/>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </ng-template>\r\n\r\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 -->\r\n <ng-template #emptymessage>\r\n <tr>\r\n <td [attr.colspan]=\"emptyColspan()\" class=\"asc-td-empty\">\r\n @if (emptyTpl()) {\r\n <ng-container [ngTemplateOutlet]=\"emptyTpl()!.templateRef\"/>\r\n } @else {\r\n <div class=\"asc-empty-default\">\r\n <i class=\"pi pi-inbox asc-empty-icon\"></i>\r\n <p class=\"asc-empty-text\">{{ emptyMessage() || msg.table.empty }}</p>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n </ng-template>\r\n\r\n </p-table>\r\n\r\n <!-- Shared popup menu for dropdown action mode -->\r\n <p-menu #actionMenu [model]=\"dropdownMenuItems()\" [popup]=\"true\" appendTo=\"body\">\r\n <ng-template #item let-item>\r\n <a class=\"p-menu-item-link\" [class.asc-menu-item--danger]=\"item.danger\" pRipple>\r\n @let builtin = item.iconSrc ? null : builtinIcon(item.icon);\r\n @if (item.iconSrc) {\r\n <asc-icon [src]=\"item.iconSrc\" class=\"p-menu-item-icon\" />\r\n } @else if (builtin) {\r\n <asc-svg-icon [name]=\"builtin\" [class]=\"'p-menu-item-icon asc-action-icon asc-action-icon--' + builtin\" />\r\n } @else if (item.icon) {\r\n <span class=\"p-menu-item-icon\" [class]=\"item.icon\"></span>\r\n }\r\n <span class=\"p-menu-item-label\">{{ item.label }}</span>\r\n </a>\r\n </ng-template>\r\n </p-menu>\r\n\r\n</div>\r\n\r\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 -->\r\n<!--\r\n C\u00E1c type renderers \u0111\u01B0\u1EE3c x\u1EED l\u00FD trong @switch b\u00EAn d\u01B0\u1EDBi.\r\n Template n\u00E0y l\u00E0 fallback cho type='text' v\u00E0 m\u1ECDi type kh\u00F4ng nh\u1EADn ra.\r\n-->\r\n<ng-template\r\n #defaultCell\r\n let-value\r\n let-row=\"row\"\r\n let-col=\"column\"\r\n>\r\n @switch (col?.type ?? 'text') {\r\n\r\n @case ('number') {\r\n <span class=\"asc-cell-number\">{{ formatNumber(value, col?.format) }}</span>\r\n }\r\n @case ('currency') {\r\n <span class=\"asc-cell-currency\">{{ formatCurrency(value, col?.format) }}</span>\r\n }\r\n @case ('date') {\r\n <span class=\"asc-cell-date\">{{ formatDate(value, col?.format) }}</span>\r\n }\r\n @case ('datetime') {\r\n <span class=\"asc-cell-datetime\">{{ formatDatetime(value, col?.format) }}</span>\r\n }\r\n @case ('boolean') {\r\n <i\r\n [class]=\"value\r\n ? 'pi pi-check-circle text-green-600'\r\n : 'pi pi-times-circle text-red-400'\"\r\n class=\"asc-cell-boolean\"\r\n [attr.aria-label]=\"value ? 'C\u00F3' : 'Kh\u00F4ng'\"\r\n ></i>\r\n }\r\n @case ('badge') {\r\n @if (resolveBadge(value, col); as badge) {\r\n <p-tag\r\n [value]=\"badge.label\"\r\n [severity]=\"mapSeverityToTag(badge.severity)\"\r\n [icon]=\"badge.icon ?? ''\"\r\n />\r\n } @else {\r\n <span>{{ value ?? '\u2014' }}</span>\r\n }\r\n }\r\n @case ('avatar') {\r\n <div class=\"asc-cell-avatar\">\r\n <p-avatar\r\n [label]=\"getInitials(value)\"\r\n shape=\"circle\"\r\n size=\"normal\"\r\n [style]=\"{ background: getAvatarColor(value), color: '#fff' }\"\r\n />\r\n <span>{{ value }}</span>\r\n </div>\r\n }\r\n @default {\r\n <!-- text + custom (custom handled via getCellTemplate returning non-null) -->\r\n @let textClamped = (col?.type ?? 'text') === 'text' && isLongText(value);\r\n <span\r\n class=\"asc-cell-text\"\r\n [class.asc-cell-text-clamp]=\"textClamped\"\r\n [pTooltip]=\"textClamped ? formatText(value, col?.format) : ''\"\r\n tooltipPosition=\"right\"\r\n >{{ formatText(value, col?.format) }}</span>\r\n }\r\n\r\n }\r\n</ng-template>\r\n", styles: [":host{display:block;width:100%}.asc-table-wrapper{border-radius:var(--asc-radius-lg);background:var(--asc-surface-0);--p-datatable-row-background: var(--asc-surface-base);--p-datatable-row-hover-background: var(--asc-table-row-hover-bg);--p-datatable-footer-cell-background: var(--asc-table-row-hover-bg)}.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;line-height:18px;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;line-height:18px;color:var(--asc-text-primary)}.asc-td-expand,.asc-td-select{padding:.25rem!important;text-align:center}.asc-td-actions{padding:9px 8px!important;text-align:center}.asc-td-empty{text-align:center;padding:0!important}.asc-td-footer{font-size:12px;font-weight:500;line-height:18px;color:var(--asc-text-primary);white-space:nowrap}.asc-cell-number,.asc-cell-currency{font-variant-numeric:tabular-nums}.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-action-icon{color:var(--asc-icon-primary)}.asc-action-icon--delete,.asc-menu-item--danger{color:var(--asc-icon-danger)}.p-button:disabled .asc-action-icon{color:var(--asc-icon-disabled)}.asc-search-icon{display:inline-flex;width:20px;height:20px;margin-top:-10px;color:var(--asc-icon-secondary)}.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-width:0 0 1px 0;border-bottom-color:var(--asc-table-header-divider-bottom);background-image:linear-gradient(var(--asc-table-header-divider-top),var(--asc-table-header-divider-bottom));background-size:1px 100%;background-position:right top;background-repeat:no-repeat}::ng-deep .asc-table-wrapper .p-datatable.p-datatable-gridlines .p-datatable-table-container .p-datatable-table>.p-datatable-thead>tr>th:last-child{background-image:none}::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-color:var(--asc-table-header-bg)}::ng-deep .asc-table-wrapper .p-datatable-sort-icon{color:var(--asc-icon-secondary)}::ng-deep .asc-table-wrapper .p-datatable-tfoot>tr>td{background:var(--asc-table-row-hover-bg)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button,::ng-deep .asc-table-wrapper .asc-action-more .p-button{height:auto;min-width:0;padding:2px 4px;gap:4px;border-radius:4px;font-size:12px;line-height:18px;font-weight:400;color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button:not(:disabled):hover,::ng-deep .asc-table-wrapper .asc-action-more .p-button:not(:disabled):hover{background:var(--asc-surface-hover);color:var(--asc-text-primary)}::ng-deep .asc-table-wrapper .asc-action-btn .p-button .p-button-icon,::ng-deep .asc-table-wrapper .asc-action-more .p-button .p-button-icon{font-size:16px}::ng-deep .asc-table-wrapper .asc-action-btn .p-button.p-button-icon-only{width:auto}::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button,::ng-deep .asc-table-wrapper .asc-action-btn--danger .p-button:not(:disabled):hover{color:var(--asc-icon-danger)}::ng-deep .asc-table-wrapper .asc-action-more .p-button{width:auto;height:auto}::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:16px;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;width:auto;flex:0 0 auto}::ng-deep .asc-table-wrapper .p-paginator-rpp-dropdown.p-disabled{background:transparent}::ng-deep .asc-table-wrapper .p-paginator-page,::ng-deep .asc-table-wrapper .p-paginator-prev,::ng-deep .asc-table-wrapper .p-paginator-next{font-size:14px}::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-hoverable .p-datatable-tbody>tr:not(.p-datatable-row-selected):hover>.p-datatable-frozen-column{background:var(--asc-table-row-hover-bg)}::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"] }]
7344
7388
  }], 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"] }] } });
7345
7389
 
7346
7390
  // ─────────────────────────────────────────────────────────────────────────────
@@ -7941,7 +7985,7 @@ class AscDialogComponent {
7941
7985
  this.showed.emit();
7942
7986
  }
7943
7987
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7944
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscDialogComponent, isStandalone: true, selector: "asc-dialog", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmSeverity: { classPropertyName: "confirmSeverity", publicName: "confirmSeverity", isSignal: true, isRequired: false, transformFunction: null }, confirmIcon: { classPropertyName: "confirmIcon", publicName: "confirmIcon", isSignal: true, isRequired: false, transformFunction: null }, confirmLoading: { classPropertyName: "confirmLoading", publicName: "confirmLoading", isSignal: true, isRequired: false, transformFunction: null }, confirmDisabled: { classPropertyName: "confirmDisabled", publicName: "confirmDisabled", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", confirmed: "confirmed", cancelled: "cancelled", showed: "showed", hidden: "hidden" }, queries: [{ propertyName: "headerTpl", first: true, predicate: AscDialogHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerTpl", first: true, predicate: AscDialogFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- @file asc-dialog.html -->\n<p-dialog\n [(visible)]=\"visible\"\n [modal]=\"modal()\"\n [closable]=\"closable()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [dismissableMask]=\"dismissableMask()\"\n [maximizable]=\"maximizable()\"\n [draggable]=\"draggable()\"\n [resizable]=\"resizable()\"\n [position]=\"position()\"\n [style]=\"{ width: dialogWidth() }\"\n [styleClass]=\"dialogStyleClass()\"\n [contentStyleClass]=\"'asc-dialog-content'\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\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\u2500 -->\n <ng-template #header>\n @if (headerTpl()) {\n <ng-container [ngTemplateOutlet]=\"headerTpl()!.templateRef\" />\n } @else {\n <div class=\"asc-dialog-header-default\">\n @if (headerIcon()) {\n <i [class]=\"headerIcon() + ' asc-dialog-header-icon'\" aria-hidden=\"true\"></i>\n }\n <span class=\"asc-dialog-title\">{{ headerLabel() }}</span>\n </div>\n }\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\u2500 -->\n <ng-content />\n\n <!-- \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 #footer>\n @if (footerTpl()) {\n <ng-container [ngTemplateOutlet]=\"footerTpl()!.templateRef\" />\n } @else if (showFooter()) {\n <div class=\"asc-dialog-footer-default\">\n <!-- H\u1EE7y: Outline thu\u1EA7n (kh\u00F4ng secondary) \u2014 Figma Button/Outline -->\n <asc-button\n [label]=\"resolvedCancelLabel()\"\n variant=\"outlined\"\n [disabled]=\"confirmLoading()\"\n (clicked)=\"onCancel()\"\n />\n <asc-button\n [label]=\"resolvedConfirmLabel()\"\n [severity]=\"confirmSeverity()\"\n [icon]=\"confirmIcon()\"\n [loading]=\"confirmLoading()\"\n [disabled]=\"confirmDisabled()\"\n (clicked)=\"onConfirm()\"\n />\n </div>\n }\n </ng-template>\n</p-dialog>\n", styles: [":host{display:contents}::ng-deep .asc-dialog.p-dialog{background:var(--asc-dialog-bg, color-mix(in srgb, var(--asc-surface-overlay, #FFFFFF) 95%, transparent));border:none;border-radius:var(--asc-dialog-radius, 16px)}::ng-deep .asc-dialog .p-dialog-header{margin:0 var(--asc-dialog-padding-x, 16px);padding:var(--asc-dialog-header-padding-y, 12px) 0;border-bottom:1px solid var(--asc-dialog-divider-color, var(--asc-border-color, #DEDFE0))}::ng-deep .asc-dialog .p-dialog-title{font-family:var(--asc-font-family, \"Inter\", sans-serif);font-size:14px;font-weight:600;line-height:20px;color:var(--asc-dialog-title-color, var(--asc-text-primary, #0F0F0F))}::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button{width:20px;height:20px;min-width:20px;padding:0;color:var(--asc-dialog-close-color, var(--asc-icon-disabled, #C0C0C2))}::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button .p-icon,::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button .p-button-icon{width:20px;height:20px;font-size:20px}::ng-deep .asc-dialog.p-dialog .p-dialog-content{padding:var(--p-dialog-content-padding, 16px)}::ng-deep .asc-dialog .p-dialog-footer{margin-top:12px;padding:0 var(--asc-dialog-padding-x, 16px) 16px;border-top:none;display:flex;align-items:center;justify-content:flex-end;gap:.625rem}.asc-dialog-header-default{display:flex;align-items:center;gap:.625rem}.asc-dialog-header-icon{font-size:1.125rem;color:var(--p-primary-500)}.asc-dialog-title{font-family:var(--asc-font-family, \"Inter\", sans-serif);font-size:14px;font-weight:600;line-height:20px;color:var(--asc-dialog-title-color, var(--asc-text-primary, #0F0F0F))}.asc-dialog-footer-default{display:flex;align-items:center;justify-content:flex-end;gap:.625rem}\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: AscButtonComponent, selector: "asc-button", inputs: ["label", "icon", "iconPos", "severity", "variant", "size", "loading", "disabled", "raised", "fullWidth", "type", "tooltip", "tooltipPos", "ariaLabel", "styleClass", "rounded"], outputs: ["clicked"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7988
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscDialogComponent, isStandalone: true, selector: "asc-dialog", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, maximizable: { classPropertyName: "maximizable", publicName: "maximizable", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmSeverity: { classPropertyName: "confirmSeverity", publicName: "confirmSeverity", isSignal: true, isRequired: false, transformFunction: null }, confirmIcon: { classPropertyName: "confirmIcon", publicName: "confirmIcon", isSignal: true, isRequired: false, transformFunction: null }, confirmLoading: { classPropertyName: "confirmLoading", publicName: "confirmLoading", isSignal: true, isRequired: false, transformFunction: null }, confirmDisabled: { classPropertyName: "confirmDisabled", publicName: "confirmDisabled", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", confirmed: "confirmed", cancelled: "cancelled", showed: "showed", hidden: "hidden" }, queries: [{ propertyName: "headerTpl", first: true, predicate: AscDialogHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerTpl", first: true, predicate: AscDialogFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- @file asc-dialog.html -->\n<p-dialog\n [(visible)]=\"visible\"\n [modal]=\"modal()\"\n [closable]=\"closable()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [dismissableMask]=\"dismissableMask()\"\n [maximizable]=\"maximizable()\"\n [draggable]=\"draggable()\"\n [resizable]=\"resizable()\"\n [position]=\"position()\"\n [style]=\"{ width: dialogWidth() }\"\n [styleClass]=\"dialogStyleClass()\"\n [contentStyleClass]=\"'asc-dialog-content'\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\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\u2500 -->\n <ng-template #header>\n @if (headerTpl()) {\n <ng-container [ngTemplateOutlet]=\"headerTpl()!.templateRef\" />\n } @else {\n <div class=\"asc-dialog-header-default\">\n @if (headerIcon()) {\n <i [class]=\"headerIcon() + ' asc-dialog-header-icon'\" aria-hidden=\"true\"></i>\n }\n <span class=\"asc-dialog-title\">{{ headerLabel() }}</span>\n </div>\n }\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\u2500 -->\n <ng-content />\n\n <!-- \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 #footer>\n @if (footerTpl()) {\n <ng-container [ngTemplateOutlet]=\"footerTpl()!.templateRef\" />\n } @else if (showFooter()) {\n <div class=\"asc-dialog-footer-default\">\n <!-- H\u1EE7y: Outline thu\u1EA7n (kh\u00F4ng secondary) \u2014 Figma Button/Outline -->\n <asc-button\n [label]=\"resolvedCancelLabel()\"\n variant=\"outlined\"\n [disabled]=\"confirmLoading()\"\n (clicked)=\"onCancel()\"\n />\n <asc-button\n [label]=\"resolvedConfirmLabel()\"\n [severity]=\"confirmSeverity()\"\n [icon]=\"confirmIcon()\"\n [loading]=\"confirmLoading()\"\n [disabled]=\"confirmDisabled()\"\n (clicked)=\"onConfirm()\"\n />\n </div>\n }\n </ng-template>\n</p-dialog>\n", styles: [":host{display:contents}::ng-deep .asc-dialog.p-dialog{background:var(--asc-dialog-bg, color-mix(in srgb, var(--asc-surface-overlay, #FFFFFF) 95%, transparent));border:none;border-radius:var(--asc-dialog-radius, 16px)}::ng-deep .asc-dialog .p-dialog-header{margin:0 var(--asc-dialog-padding-x, 16px);padding:var(--asc-dialog-header-padding-y, 12px) 0;border-bottom:1px solid var(--asc-dialog-divider-color, var(--asc-border-color, #DEDFE0))}::ng-deep .asc-dialog .p-dialog-title{font-family:var(--asc-font-family, \"Inter\", sans-serif);font-size:14px;font-weight:600;line-height:20px;color:var(--asc-dialog-title-color, var(--asc-text-primary, #0F0F0F))}::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button{width:20px;height:20px;min-width:20px;padding:0;color:var(--asc-dialog-close-color, var(--asc-icon-disabled, #C0C0C2))}::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button .p-icon,::ng-deep .asc-dialog .p-dialog-header .p-dialog-close-button .p-button-icon{width:20px;height:20px;font-size:20px}::ng-deep .asc-dialog.p-dialog .p-dialog-content{padding:var(--p-dialog-content-padding, 16px)}::ng-deep .asc-dialog .p-dialog-footer{margin-top:12px;padding:0 var(--asc-dialog-padding-x, 16px) 16px;border-top:none;display:flex;align-items:center;justify-content:flex-end;gap:.625rem}.asc-dialog-header-default{display:flex;align-items:center;gap:.625rem}.asc-dialog-header-icon{font-size:1.125rem;color:var(--p-primary-500)}.asc-dialog-title{font-family:var(--asc-font-family, \"Inter\", sans-serif);font-size:14px;font-weight:600;line-height:20px;color:var(--asc-dialog-title-color, var(--asc-text-primary, #0F0F0F))}.asc-dialog-footer-default{display:flex;align-items:center;justify-content:flex-end;gap:.625rem}\n"], dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1$3.Dialog, selector: "p-dialog", inputs: ["hostName", "header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "maskMotionOptions", "motionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: AscButtonComponent, selector: "asc-button", inputs: ["label", "icon", "iconSrc", "iconPos", "severity", "variant", "size", "loading", "disabled", "raised", "fullWidth", "type", "tooltip", "tooltipPos", "ariaLabel", "styleClass", "rounded"], outputs: ["clicked"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7945
7989
  }
7946
7990
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscDialogComponent, decorators: [{
7947
7991
  type: Component,
@@ -8254,7 +8298,7 @@ class AscSidebarComponent {
8254
8298
  this.secondaryClicked.emit();
8255
8299
  }
8256
8300
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8257
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscSidebarComponent, isStandalone: true, selector: "asc-sidebar", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseIcon: { classPropertyName: "showCloseIcon", publicName: "showCloseIcon", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, secondaryLabel: { classPropertyName: "secondaryLabel", publicName: "secondaryLabel", isSignal: true, isRequired: false, transformFunction: null }, primaryLabel: { classPropertyName: "primaryLabel", publicName: "primaryLabel", isSignal: true, isRequired: false, transformFunction: null }, showSecondary: { classPropertyName: "showSecondary", publicName: "showSecondary", isSignal: true, isRequired: false, transformFunction: null }, showPrimary: { classPropertyName: "showPrimary", publicName: "showPrimary", isSignal: true, isRequired: false, transformFunction: null }, buttonSize: { classPropertyName: "buttonSize", publicName: "buttonSize", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", showed: "showed", hidden: "hidden", secondaryClicked: "secondaryClicked", primaryClicked: "primaryClicked" }, queries: [{ propertyName: "headerTpl", first: true, predicate: AscSidebarHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerTpl", first: true, predicate: AscSidebarFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- @file asc-sidebar.html -->\n<p-drawer\n [(visible)]=\"visible\"\n [modal]=\"modal()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [dismissible]=\"dismissible()\"\n [showCloseIcon]=\"showCloseIcon()\"\n [position]=\"position()\"\n [style]=\"drawerStyle()\"\n [class]=\"drawerStyleClass()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\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\u2500 -->\n <ng-template #header>\n @if (headerTpl()) {\n <ng-container [ngTemplateOutlet]=\"headerTpl()!.templateRef\" />\n } @else {\n <div class=\"asc-sidebar-header-default\">\n <div class=\"asc-sidebar-header-left\">\n @if (headerIcon()) {\n <i [class]=\"headerIcon() + ' asc-sidebar-header-icon'\" aria-hidden=\"true\"></i>\n }\n <span class=\"asc-sidebar-title\">{{ headerLabel() }}</span>\n </div>\n\n @if (showSecondary() || showPrimary()) {\n <div class=\"asc-sidebar-header-actions\">\n @if (showSecondary()) {\n <asc-button\n [label]=\"secondaryLabel()\"\n variant=\"outlined\"\n [size]=\"buttonSize()\"\n (clicked)=\"onSecondary()\"\n />\n }\n @if (showPrimary()) {\n <asc-button\n [label]=\"primaryLabel()\"\n variant=\"filled\"\n [size]=\"buttonSize()\"\n (clicked)=\"primaryClicked.emit()\"\n />\n }\n </div>\n }\n </div>\n }\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\u2500 -->\n <div class=\"asc-sidebar-body\">\n <ng-content />\n </div>\n\n <!-- \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 (footerTpl()) {\n <ng-template #footer>\n <div class=\"asc-sidebar-footer\">\n <ng-container [ngTemplateOutlet]=\"footerTpl()!.templateRef\" />\n </div>\n </ng-template>\n }\n</p-drawer>\n", styles: [":host{display:contents}::ng-deep .asc-sidebar .p-drawer-header{display:flex;align-items:center;gap:.5rem;flex-direction:row-reverse;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--asc-border-color)}::ng-deep .asc-sidebar .p-drawer-content{padding:0;display:flex;flex-direction:column;overflow:hidden}::ng-deep .asc-sidebar .p-drawer-footer{padding:.75rem 1.5rem 1.25rem;border-top:1px solid var(--asc-border-color)}.asc-sidebar-header-default{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;gap:.75rem}.asc-sidebar-header-left{display:flex;align-items:center;gap:.625rem;min-width:0}.asc-sidebar-header-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.asc-sidebar-header-icon{font-size:1rem;color:var(--p-primary-500)}.asc-sidebar-title{font-size:1rem;font-weight:600;color:var(--asc-text-primary)}.asc-sidebar-body{flex:1;overflow-y:auto;padding:24px}.asc-sidebar-footer{display:flex;align-items:center;justify-content:flex-end;gap:.625rem}\n"], dependencies: [{ kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1$5.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AscButtonComponent, selector: "asc-button", inputs: ["label", "icon", "iconPos", "severity", "variant", "size", "loading", "disabled", "raised", "fullWidth", "type", "tooltip", "tooltipPos", "ariaLabel", "styleClass", "rounded"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8301
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscSidebarComponent, isStandalone: true, selector: "asc-sidebar", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, headerIcon: { classPropertyName: "headerIcon", publicName: "headerIcon", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, customSize: { classPropertyName: "customSize", publicName: "customSize", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseIcon: { classPropertyName: "showCloseIcon", publicName: "showCloseIcon", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, secondaryLabel: { classPropertyName: "secondaryLabel", publicName: "secondaryLabel", isSignal: true, isRequired: false, transformFunction: null }, primaryLabel: { classPropertyName: "primaryLabel", publicName: "primaryLabel", isSignal: true, isRequired: false, transformFunction: null }, showSecondary: { classPropertyName: "showSecondary", publicName: "showSecondary", isSignal: true, isRequired: false, transformFunction: null }, showPrimary: { classPropertyName: "showPrimary", publicName: "showPrimary", isSignal: true, isRequired: false, transformFunction: null }, buttonSize: { classPropertyName: "buttonSize", publicName: "buttonSize", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", showed: "showed", hidden: "hidden", secondaryClicked: "secondaryClicked", primaryClicked: "primaryClicked" }, queries: [{ propertyName: "headerTpl", first: true, predicate: AscSidebarHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerTpl", first: true, predicate: AscSidebarFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- @file asc-sidebar.html -->\n<p-drawer\n [(visible)]=\"visible\"\n [modal]=\"modal()\"\n [closeOnEscape]=\"closeOnEscape()\"\n [dismissible]=\"dismissible()\"\n [showCloseIcon]=\"showCloseIcon()\"\n [position]=\"position()\"\n [style]=\"drawerStyle()\"\n [class]=\"drawerStyleClass()\"\n (onShow)=\"onShow()\"\n (onHide)=\"onHide()\"\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\u2500 -->\n <ng-template #header>\n @if (headerTpl()) {\n <ng-container [ngTemplateOutlet]=\"headerTpl()!.templateRef\" />\n } @else {\n <div class=\"asc-sidebar-header-default\">\n <div class=\"asc-sidebar-header-left\">\n @if (headerIcon()) {\n <i [class]=\"headerIcon() + ' asc-sidebar-header-icon'\" aria-hidden=\"true\"></i>\n }\n <span class=\"asc-sidebar-title\">{{ headerLabel() }}</span>\n </div>\n\n @if (showSecondary() || showPrimary()) {\n <div class=\"asc-sidebar-header-actions\">\n @if (showSecondary()) {\n <asc-button\n [label]=\"secondaryLabel()\"\n variant=\"outlined\"\n [size]=\"buttonSize()\"\n (clicked)=\"onSecondary()\"\n />\n }\n @if (showPrimary()) {\n <asc-button\n [label]=\"primaryLabel()\"\n variant=\"filled\"\n [size]=\"buttonSize()\"\n (clicked)=\"primaryClicked.emit()\"\n />\n }\n </div>\n }\n </div>\n }\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\u2500 -->\n <div class=\"asc-sidebar-body\">\n <ng-content />\n </div>\n\n <!-- \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 (footerTpl()) {\n <ng-template #footer>\n <div class=\"asc-sidebar-footer\">\n <ng-container [ngTemplateOutlet]=\"footerTpl()!.templateRef\" />\n </div>\n </ng-template>\n }\n</p-drawer>\n", styles: [":host{display:contents}::ng-deep .asc-sidebar .p-drawer-header{display:flex;align-items:center;gap:.5rem;flex-direction:row-reverse;padding:1.25rem 1.5rem 1rem;border-bottom:1px solid var(--asc-border-color)}::ng-deep .asc-sidebar .p-drawer-content{padding:0;display:flex;flex-direction:column;overflow:hidden}::ng-deep .asc-sidebar .p-drawer-footer{padding:.75rem 1.5rem 1.25rem;border-top:1px solid var(--asc-border-color)}.asc-sidebar-header-default{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;gap:.75rem}.asc-sidebar-header-left{display:flex;align-items:center;gap:.625rem;min-width:0}.asc-sidebar-header-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.asc-sidebar-header-icon{font-size:1rem;color:var(--p-primary-500)}.asc-sidebar-title{font-size:1rem;font-weight:600;color:var(--asc-text-primary)}.asc-sidebar-body{flex:1;overflow-y:auto;padding:24px}.asc-sidebar-footer{display:flex;align-items:center;justify-content:flex-end;gap:.625rem}\n"], dependencies: [{ kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1$5.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AscButtonComponent, selector: "asc-button", inputs: ["label", "icon", "iconSrc", "iconPos", "severity", "variant", "size", "loading", "disabled", "raised", "fullWidth", "type", "tooltip", "tooltipPos", "ariaLabel", "styleClass", "rounded"], outputs: ["clicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8258
8302
  }
8259
8303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscSidebarComponent, decorators: [{
8260
8304
  type: Component,
@@ -10270,6 +10314,17 @@ class LayoutService {
10270
10314
  ...(ngDevMode ? [{ debugName: "getSurface" }] : /* istanbul ignore next */ []));
10271
10315
  this.isOverlay = computed(() => this.layoutConfig().menuMode === 'overlay', /* @ts-ignore */
10272
10316
  ...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
10317
+ /** Kiểu thu gọn sidebar desktop — AscLayout đặt theo input / config `layout.sidebarCollapse`. */
10318
+ this.sidebarCollapse = signal('hidden', /* @ts-ignore */
10319
+ ...(ngDevMode ? [{ debugName: "sidebarCollapse" }] : /* istanbul ignore next */ []));
10320
+ /**
10321
+ * Sidebar đang thu gọn dạng dải icon (menu static + đã bấm thu gọn + kiểu 'rail').
10322
+ * Chỉ có hiệu lực giao diện ở desktop (CSS trong media ≥ 992px) — logic click dùng kèm `isDesktop()`.
10323
+ */
10324
+ this.isRail = computed(() => this.sidebarCollapse() === 'rail' &&
10325
+ this.layoutConfig().menuMode === 'static' &&
10326
+ !!this.layoutState().staticMenuDesktopInactive, /* @ts-ignore */
10327
+ ...(ngDevMode ? [{ debugName: "isRail" }] : /* istanbul ignore next */ []));
10273
10328
  this.transitionComplete = signal(false, /* @ts-ignore */
10274
10329
  ...(ngDevMode ? [{ debugName: "transitionComplete" }] : /* istanbul ignore next */ []));
10275
10330
  effect(() => {
@@ -10487,6 +10542,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10487
10542
  }]
10488
10543
  }], ctorParameters: () => [{ type: LayoutService }], propDecorators: { dropdownTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownTpl", required: false }] }], topBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "topBarLogo", required: false }] }], breadCrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadCrumb", required: false }] }], iconToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconToggle", required: false }] }] } });
10489
10544
 
10545
+ /** Khoảng cách popup dạng dải ↔ mép sidebar / mép màn hình */
10546
+ const RAIL_POPUP_GAP = 8;
10547
+ /** Menu con → model cho popup dạng dải: giữ điều hướng, bỏ icon; mục ẩn (`visible: false`) bị loại. */
10548
+ function toRailMenuModel(items) {
10549
+ return items
10550
+ .filter((it) => it.visible !== false)
10551
+ .map((it) => {
10552
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10553
+ const { icon, iconSrc, iconSize, iconWidth, iconHeight, items: children, ...rest } = it;
10554
+ return children?.length ? { ...rest, items: toRailMenuModel(children) } : rest;
10555
+ });
10556
+ }
10490
10557
  class AppMenuitem {
10491
10558
  get submenuExpanded() {
10492
10559
  return this.root || this.active;
@@ -10494,11 +10561,25 @@ class AppMenuitem {
10494
10561
  get activeClass() {
10495
10562
  return this.active && !this.root;
10496
10563
  }
10564
+ /** Chữ cái đầu của label — thay icon khi mục không có icon ở dạng dải */
10565
+ get initial() {
10566
+ return (this.item.label ?? '').trim().charAt(0).toUpperCase();
10567
+ }
10568
+ /** Tooltip tên mục chỉ hiện ở dạng dải (chữ bị ẩn), cho các mục hiển thị trên dải (không phải root) */
10569
+ get showRailTooltip() {
10570
+ return !this.root && this.layoutService.isRail();
10571
+ }
10497
10572
  constructor(router, layoutService) {
10498
10573
  this.router = router;
10499
10574
  this.layoutService = layoutService;
10500
10575
  this.active = false;
10501
10576
  this.key = '';
10577
+ /** Popup menu con khi sidebar dạng dải ('rail') */
10578
+ this.railMenu = viewChild('railMenu', /* @ts-ignore */
10579
+ ...(ngDevMode ? [{ debugName: "railMenu" }] : /* istanbul ignore next */ []));
10580
+ /** Mục menu con hiển thị trong popup — bỏ icon (Figma popup chỉ có chữ) */
10581
+ this.railModel = [];
10582
+ this.railAnchor = null;
10502
10583
  this.menuSourceSubscription = this.layoutService.menuSource$.subscribe((value) => {
10503
10584
  Promise.resolve(null).then(() => {
10504
10585
  if (value.routeEvent) {
@@ -10547,12 +10628,38 @@ class AppMenuitem {
10547
10628
  if (this.item.command) {
10548
10629
  this.item.command({ originalEvent: event, item: this.item });
10549
10630
  }
10631
+ // Dạng dải (desktop): nhóm có menu con → mở popup cạnh dải thay vì xổ xuống
10632
+ if (this.item.items && !this.root && this.layoutService.isRail() && this.layoutService.isDesktop()) {
10633
+ event.preventDefault();
10634
+ this.railModel = toRailMenuModel(this.item.items);
10635
+ this.railAnchor = event.currentTarget;
10636
+ this.railMenu()?.toggle(event);
10637
+ return;
10638
+ }
10550
10639
  // toggle active state
10551
10640
  if (this.item.items) {
10552
10641
  this.active = !this.active;
10553
10642
  }
10554
10643
  this.layoutService.onMenuStateChange({ key: this.key });
10555
10644
  }
10645
+ /**
10646
+ * p-menu popup tự đặt dưới mục được bấm — dời sang cạnh phải dải sidebar, ngang hàng với mục
10647
+ * (Figma "Trạng thái Thu gọn": popup nằm cạnh dải).
10648
+ */
10649
+ positionRailMenu() {
10650
+ const container = this.railMenu()?.container;
10651
+ const anchor = this.railAnchor;
10652
+ if (!container || !anchor)
10653
+ return;
10654
+ const sidebar = anchor.closest('.layout-sidebar');
10655
+ const anchorRect = anchor.getBoundingClientRect();
10656
+ const left = (sidebar?.getBoundingClientRect().right ?? anchorRect.right) + RAIL_POPUP_GAP;
10657
+ // Không để popup tràn đáy màn hình
10658
+ const maxTop = window.innerHeight - container.offsetHeight - RAIL_POPUP_GAP;
10659
+ const top = Math.max(RAIL_POPUP_GAP, Math.min(anchorRect.top, maxTop));
10660
+ container.style.left = `${left + window.scrollX}px`;
10661
+ container.style.top = `${top + window.scrollY}px`;
10662
+ }
10556
10663
  ngOnDestroy() {
10557
10664
  if (this.menuSourceSubscription) {
10558
10665
  this.menuSourceSubscription.unsubscribe();
@@ -10562,7 +10669,7 @@ class AppMenuitem {
10562
10669
  }
10563
10670
  }
10564
10671
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppMenuitem, deps: [{ token: i1$a.Router }, { token: LayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
10565
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppMenuitem, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, ngImport: i0, template: `
10672
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppMenuitem, isStandalone: true, selector: "[app-menuitem]", inputs: { item: "item", index: "index", root: "root", parentKey: "parentKey" }, host: { properties: { "class.layout-root-menuitem": "this.root", "class.active-menuitem": "this.activeClass" } }, viewQueries: [{ propertyName: "railMenu", first: true, predicate: ["railMenu"], descendants: true, isSignal: true }], ngImport: i0, template: `
10566
10673
  <ng-container>
10567
10674
  @if (root && item.visible !== false) {
10568
10675
  <div class="layout-menuitem-root-text">
@@ -10578,27 +10685,15 @@ class AppMenuitem {
10578
10685
  [attr.target]="item.target"
10579
10686
  tabindex="0"
10580
10687
  pRipple
10688
+ [pTooltip]="item.label"
10689
+ tooltipPosition="right"
10690
+ [tooltipDisabled]="!showRailTooltip"
10581
10691
  >
10582
- @if (item.iconSrc) {
10583
- <asc-icon
10584
- [src]="item.iconSrc"
10585
- class="layout-menuitem-icon"
10586
- [size]="item.iconSize || '1em'"
10587
- [width]="item.iconWidth"
10588
- [height]="item.iconHeight"
10589
- />
10590
- } @else {
10591
- <i
10592
- [ngClass]="item.icon"
10593
- class="layout-menuitem-icon"
10594
- [style.font-size]="item.iconSize"
10595
- [style.width]="item.iconWidth"
10596
- [style.height]="item.iconHeight"
10597
- ></i>
10598
- }
10692
+ <ng-container [ngTemplateOutlet]="iconTpl"></ng-container>
10599
10693
  <span class="layout-menuitem-text">{{ item.label }}</span>
10600
10694
  @if (item.items) {
10601
- <i class="pi pi-fw pi-angle-down layout-submenu-toggler"></i>
10695
+ <!-- Figma: CaretRight khi đóng, CaretDown khi mở (xoay 90° qua CSS) -->
10696
+ <asc-svg-icon name="caret-right" size="18px" class="layout-submenu-toggler" />
10602
10697
  }
10603
10698
  </a>
10604
10699
  }
@@ -10627,24 +10722,11 @@ class AppMenuitem {
10627
10722
  [attr.target]="item.target"
10628
10723
  tabindex="0"
10629
10724
  pRipple
10725
+ [pTooltip]="item.label"
10726
+ tooltipPosition="right"
10727
+ [tooltipDisabled]="!showRailTooltip"
10630
10728
  >
10631
- @if (item.iconSrc) {
10632
- <asc-icon
10633
- [src]="item.iconSrc"
10634
- class="layout-menuitem-icon"
10635
- [size]="item.iconSize || '1em'"
10636
- [width]="item.iconWidth"
10637
- [height]="item.iconHeight"
10638
- />
10639
- } @else {
10640
- <i
10641
- [ngClass]="item.icon"
10642
- class="layout-menuitem-icon"
10643
- [style.font-size]="item.iconSize"
10644
- [style.width]="item.iconWidth"
10645
- [style.height]="item.iconHeight"
10646
- ></i>
10647
- }
10729
+ <ng-container [ngTemplateOutlet]="iconTpl"></ng-container>
10648
10730
  <span class="layout-menuitem-text">{{ item.label }}</span>
10649
10731
  </a>
10650
10732
  }
@@ -10655,15 +10737,52 @@ class AppMenuitem {
10655
10737
  }
10656
10738
  </ul>
10657
10739
  }
10740
+
10741
+ <!-- Sidebar dạng dải ('rail'): nhóm có menu con mở popup cạnh dải, gắn vào body để không bị
10742
+ overflow:hidden của .layout-sidebar cắt -->
10743
+ @if (item.items && !root && layoutService.isRail()) {
10744
+ <p-menu
10745
+ #railMenu
10746
+ [model]="railModel"
10747
+ [popup]="true"
10748
+ appendTo="body"
10749
+ styleClass="asc-sidebar-rail-popup"
10750
+ [ariaLabel]="item.label"
10751
+ (onShow)="positionRailMenu()"
10752
+ />
10753
+ }
10658
10754
  </ng-container>
10659
- `, 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 }); }
10755
+
10756
+ <ng-template #iconTpl>
10757
+ @if (item.iconSrc) {
10758
+ <asc-icon
10759
+ [src]="item.iconSrc"
10760
+ class="layout-menuitem-icon"
10761
+ [size]="item.iconSize || '1em'"
10762
+ [width]="item.iconWidth"
10763
+ [height]="item.iconHeight"
10764
+ />
10765
+ } @else if (item.icon) {
10766
+ <i
10767
+ [ngClass]="item.icon"
10768
+ class="layout-menuitem-icon"
10769
+ [style.font-size]="item.iconSize"
10770
+ [style.width]="item.iconWidth"
10771
+ [style.height]="item.iconHeight"
10772
+ ></i>
10773
+ } @else {
10774
+ <!-- Không có icon: dạng dải hiện chữ cái đầu (dạng đầy đủ ẩn qua CSS) -->
10775
+ <span class="layout-menuitem-icon layout-menuitem-initial" aria-hidden="true">{{ initial }}</span>
10776
+ }
10777
+ </ng-template>
10778
+ `, 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: "directive", type: i3$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "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: 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: "component", type: AscIconComponent, selector: "asc-icon", inputs: ["src", "size", "width", "height"], outputs: ["loadError"] }, { kind: "component", type: AscSvgIconComponent, selector: "asc-svg-icon", inputs: ["name", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10660
10779
  }
10661
10780
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppMenuitem, decorators: [{
10662
10781
  type: Component,
10663
10782
  args: [{
10664
10783
  // eslint-disable-next-line @angular-eslint/component-selector
10665
10784
  selector: '[app-menuitem]',
10666
- imports: [CommonModule, RouterModule, RippleModule, AscIconComponent],
10785
+ imports: [CommonModule, RouterModule, RippleModule, MenuModule, TooltipModule, AscIconComponent, AscSvgIconComponent],
10667
10786
  template: `
10668
10787
  <ng-container>
10669
10788
  @if (root && item.visible !== false) {
@@ -10680,27 +10799,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10680
10799
  [attr.target]="item.target"
10681
10800
  tabindex="0"
10682
10801
  pRipple
10802
+ [pTooltip]="item.label"
10803
+ tooltipPosition="right"
10804
+ [tooltipDisabled]="!showRailTooltip"
10683
10805
  >
10684
- @if (item.iconSrc) {
10685
- <asc-icon
10686
- [src]="item.iconSrc"
10687
- class="layout-menuitem-icon"
10688
- [size]="item.iconSize || '1em'"
10689
- [width]="item.iconWidth"
10690
- [height]="item.iconHeight"
10691
- />
10692
- } @else {
10693
- <i
10694
- [ngClass]="item.icon"
10695
- class="layout-menuitem-icon"
10696
- [style.font-size]="item.iconSize"
10697
- [style.width]="item.iconWidth"
10698
- [style.height]="item.iconHeight"
10699
- ></i>
10700
- }
10806
+ <ng-container [ngTemplateOutlet]="iconTpl"></ng-container>
10701
10807
  <span class="layout-menuitem-text">{{ item.label }}</span>
10702
10808
  @if (item.items) {
10703
- <i class="pi pi-fw pi-angle-down layout-submenu-toggler"></i>
10809
+ <!-- Figma: CaretRight khi đóng, CaretDown khi mở (xoay 90° qua CSS) -->
10810
+ <asc-svg-icon name="caret-right" size="18px" class="layout-submenu-toggler" />
10704
10811
  }
10705
10812
  </a>
10706
10813
  }
@@ -10729,24 +10836,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10729
10836
  [attr.target]="item.target"
10730
10837
  tabindex="0"
10731
10838
  pRipple
10839
+ [pTooltip]="item.label"
10840
+ tooltipPosition="right"
10841
+ [tooltipDisabled]="!showRailTooltip"
10732
10842
  >
10733
- @if (item.iconSrc) {
10734
- <asc-icon
10735
- [src]="item.iconSrc"
10736
- class="layout-menuitem-icon"
10737
- [size]="item.iconSize || '1em'"
10738
- [width]="item.iconWidth"
10739
- [height]="item.iconHeight"
10740
- />
10741
- } @else {
10742
- <i
10743
- [ngClass]="item.icon"
10744
- class="layout-menuitem-icon"
10745
- [style.font-size]="item.iconSize"
10746
- [style.width]="item.iconWidth"
10747
- [style.height]="item.iconHeight"
10748
- ></i>
10749
- }
10843
+ <ng-container [ngTemplateOutlet]="iconTpl"></ng-container>
10750
10844
  <span class="layout-menuitem-text">{{ item.label }}</span>
10751
10845
  </a>
10752
10846
  }
@@ -10757,7 +10851,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10757
10851
  }
10758
10852
  </ul>
10759
10853
  }
10854
+
10855
+ <!-- Sidebar dạng dải ('rail'): nhóm có menu con mở popup cạnh dải, gắn vào body để không bị
10856
+ overflow:hidden của .layout-sidebar cắt -->
10857
+ @if (item.items && !root && layoutService.isRail()) {
10858
+ <p-menu
10859
+ #railMenu
10860
+ [model]="railModel"
10861
+ [popup]="true"
10862
+ appendTo="body"
10863
+ styleClass="asc-sidebar-rail-popup"
10864
+ [ariaLabel]="item.label"
10865
+ (onShow)="positionRailMenu()"
10866
+ />
10867
+ }
10760
10868
  </ng-container>
10869
+
10870
+ <ng-template #iconTpl>
10871
+ @if (item.iconSrc) {
10872
+ <asc-icon
10873
+ [src]="item.iconSrc"
10874
+ class="layout-menuitem-icon"
10875
+ [size]="item.iconSize || '1em'"
10876
+ [width]="item.iconWidth"
10877
+ [height]="item.iconHeight"
10878
+ />
10879
+ } @else if (item.icon) {
10880
+ <i
10881
+ [ngClass]="item.icon"
10882
+ class="layout-menuitem-icon"
10883
+ [style.font-size]="item.iconSize"
10884
+ [style.width]="item.iconWidth"
10885
+ [style.height]="item.iconHeight"
10886
+ ></i>
10887
+ } @else {
10888
+ <!-- Không có icon: dạng dải hiện chữ cái đầu (dạng đầy đủ ẩn qua CSS) -->
10889
+ <span class="layout-menuitem-icon layout-menuitem-initial" aria-hidden="true">{{ initial }}</span>
10890
+ }
10891
+ </ng-template>
10761
10892
  `,
10762
10893
  standalone: true,
10763
10894
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -10776,7 +10907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10776
10907
  }], activeClass: [{
10777
10908
  type: HostBinding,
10778
10909
  args: ['class.active-menuitem']
10779
- }] } });
10910
+ }], railMenu: [{ type: i0.ViewChild, args: ['railMenu', { isSignal: true }] }] } });
10780
10911
 
10781
10912
  class AppMenu {
10782
10913
  constructor() {
@@ -10824,14 +10955,27 @@ class AppSidebar {
10824
10955
  ...(ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []));
10825
10956
  this.sideBarLogo = input(/* @ts-ignore */
10826
10957
  ...(ngDevMode ? [undefined, { debugName: "sideBarLogo" }] : /* istanbul ignore next */ []));
10958
+ /** Logo nhỏ khi sidebar thu gọn dạng dải ('rail') */
10959
+ this.sideBarLogoCollapsed = input(/* @ts-ignore */
10960
+ ...(ngDevMode ? [undefined, { debugName: "sideBarLogoCollapsed" }] : /* istanbul ignore next */ []));
10827
10961
  }
10828
10962
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppSidebar, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
10829
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppSidebar, isStandalone: true, selector: "asc-sidebar", inputs: { menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, sideBarLogo: { classPropertyName: "sideBarLogo", publicName: "sideBarLogo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
10963
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AppSidebar, isStandalone: true, selector: "asc-sidebar", inputs: { menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, sideBarLogo: { classPropertyName: "sideBarLogo", publicName: "sideBarLogo", isSignal: true, isRequired: false, transformFunction: null }, sideBarLogoCollapsed: { classPropertyName: "sideBarLogoCollapsed", publicName: "sideBarLogoCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
10830
10964
 
10831
10965
  <div class="layout-sidebar">
10832
- @if (sideBarLogo()) {
10833
- <div class="layout-sidebar-logo">
10834
- <ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
10966
+ @if (sideBarLogo() || sideBarLogoCollapsed()) {
10967
+ <div class="layout-sidebar-logo" [class.layout-sidebar-logo--has-collapsed]="!!sideBarLogoCollapsed()">
10968
+ <!-- Có logo thu gọn thì 2 bản cùng render, CSS đổi bản hiện khi sidebar dạng dải ('rail') -->
10969
+ @if (sideBarLogo()) {
10970
+ <div class="layout-sidebar-logo-full">
10971
+ <ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
10972
+ </div>
10973
+ }
10974
+ @if (sideBarLogoCollapsed()) {
10975
+ <div class="layout-sidebar-logo-collapsed">
10976
+ <ng-template [ngTemplateOutlet]="sideBarLogoCollapsed()"></ng-template>
10977
+ </div>
10978
+ }
10835
10979
  </div>
10836
10980
  }
10837
10981
  <!-- Cuộn ở lớp trong để scrollbar bị clip theo border-radius của .layout-sidebar -->
@@ -10852,9 +10996,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10852
10996
  template: `
10853
10997
 
10854
10998
  <div class="layout-sidebar">
10855
- @if (sideBarLogo()) {
10856
- <div class="layout-sidebar-logo">
10857
- <ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
10999
+ @if (sideBarLogo() || sideBarLogoCollapsed()) {
11000
+ <div class="layout-sidebar-logo" [class.layout-sidebar-logo--has-collapsed]="!!sideBarLogoCollapsed()">
11001
+ <!-- Có logo thu gọn thì 2 bản cùng render, CSS đổi bản hiện khi sidebar dạng dải ('rail') -->
11002
+ @if (sideBarLogo()) {
11003
+ <div class="layout-sidebar-logo-full">
11004
+ <ng-template [ngTemplateOutlet]="sideBarLogo()"></ng-template>
11005
+ </div>
11006
+ }
11007
+ @if (sideBarLogoCollapsed()) {
11008
+ <div class="layout-sidebar-logo-collapsed">
11009
+ <ng-template [ngTemplateOutlet]="sideBarLogoCollapsed()"></ng-template>
11010
+ </div>
11011
+ }
10858
11012
  </div>
10859
11013
  }
10860
11014
  <!-- Cuộn ở lớp trong để scrollbar bị clip theo border-radius của .layout-sidebar -->
@@ -10865,7 +11019,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10865
11019
  </div>
10866
11020
  `,
10867
11021
  }]
10868
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: true }] }], sideBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogo", required: false }] }] } });
11022
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: true }] }], sideBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogo", required: false }] }], sideBarLogoCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogoCollapsed", required: false }] }] } });
10869
11023
 
10870
11024
  class AppFooter {
10871
11025
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -10885,6 +11039,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
10885
11039
  }]
10886
11040
  }] });
10887
11041
 
11042
+ /** Khóa localStorage lưu trạng thái thu gọn sidebar (chỉ dùng ở kiểu 'rail'). */
11043
+ const ASC_SIDEBAR_COLLAPSED_STORAGE_KEY = 'asc-layout.sidebar-collapsed';
10888
11044
  class AscLayout {
10889
11045
  constructor(layoutService, renderer, router) {
10890
11046
  this.layoutService = layoutService;
@@ -10894,6 +11050,9 @@ class AscLayout {
10894
11050
  ...(ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []));
10895
11051
  this.sideBarLogo = input(/* @ts-ignore */
10896
11052
  ...(ngDevMode ? [undefined, { debugName: "sideBarLogo" }] : /* istanbul ignore next */ []));
11053
+ /** Logo nhỏ hiện khi sidebar thu gọn dạng dải ('rail'). Không truyền → vẫn dùng `sideBarLogo`. */
11054
+ this.sideBarLogoCollapsed = input(/* @ts-ignore */
11055
+ ...(ngDevMode ? [undefined, { debugName: "sideBarLogoCollapsed" }] : /* istanbul ignore next */ []));
10897
11056
  this.topBarLogo = input(/* @ts-ignore */
10898
11057
  ...(ngDevMode ? [undefined, { debugName: "topBarLogo" }] : /* istanbul ignore next */ []));
10899
11058
  this.iconToggle = input(/* @ts-ignore */
@@ -10910,6 +11069,15 @@ class AscLayout {
10910
11069
  this.config = inject(ASC_UI_CONFIG, { optional: true }) ?? ASC_UI_DEFAULT_CONFIG;
10911
11070
  this.resolvedShowFooter = computed(() => this.showFooter() ?? this.config.layout?.showFooter ?? true, /* @ts-ignore */
10912
11071
  ...(ngDevMode ? [{ debugName: "resolvedShowFooter" }] : /* istanbul ignore next */ []));
11072
+ /**
11073
+ * Kiểu thu gọn sidebar desktop: 'hidden' (ẩn hẳn) | 'rail' (dải icon 84px).
11074
+ * Không truyền thì fallback về config.layout.sidebarCollapse → 'hidden'.
11075
+ */
11076
+ this.sidebarCollapse = input(undefined, /* @ts-ignore */
11077
+ ...(ngDevMode ? [{ debugName: "sidebarCollapse" }] : /* istanbul ignore next */ []));
11078
+ this.resolvedSidebarCollapse = computed(() => this.sidebarCollapse() ?? this.config.layout?.sidebarCollapse ?? 'hidden', /* @ts-ignore */
11079
+ ...(ngDevMode ? [{ debugName: "resolvedSidebarCollapse" }] : /* istanbul ignore next */ []));
11080
+ this.collapsedRestored = false;
10913
11081
  this.menuOutsideClickListener = null;
10914
11082
  this.overlayMenuOpenSubscription = this.layoutService.overlayOpen$.subscribe(() => {
10915
11083
  if (!this.menuOutsideClickListener) {
@@ -10926,13 +11094,34 @@ class AscLayout {
10926
11094
  this.router.events.pipe(filter$1((event) => event instanceof NavigationEnd)).subscribe(() => {
10927
11095
  this.hideMenu();
10928
11096
  });
11097
+ // Đồng bộ kiểu thu gọn vào LayoutService; ở kiểu 'rail' khôi phục / lưu trạng thái thu gọn qua localStorage
11098
+ effect(() => {
11099
+ const mode = this.resolvedSidebarCollapse();
11100
+ const collapsed = !!this.layoutService.layoutState().staticMenuDesktopInactive;
11101
+ untracked(() => {
11102
+ this.layoutService.sidebarCollapse.set(mode);
11103
+ if (mode !== 'rail')
11104
+ return;
11105
+ if (!this.collapsedRestored) {
11106
+ this.collapsedRestored = true;
11107
+ if (readStoredCollapsed() && !collapsed) {
11108
+ this.layoutService.layoutState.update((prev) => ({ ...prev, staticMenuDesktopInactive: true }));
11109
+ return;
11110
+ }
11111
+ }
11112
+ writeStoredCollapsed(collapsed);
11113
+ });
11114
+ });
10929
11115
  }
10930
11116
  get containerClass() {
11117
+ const isStatic = this.layoutService.layoutConfig().menuMode === 'static';
11118
+ const collapsed = !!this.layoutService.layoutState().staticMenuDesktopInactive;
11119
+ const rail = this.layoutService.sidebarCollapse() === 'rail';
10931
11120
  return {
10932
11121
  'layout-overlay': this.layoutService.layoutConfig().menuMode === 'overlay',
10933
- 'layout-static': this.layoutService.layoutConfig().menuMode === 'static',
10934
- 'layout-static-inactive': this.layoutService.layoutState().staticMenuDesktopInactive &&
10935
- this.layoutService.layoutConfig().menuMode === 'static',
11122
+ 'layout-static': isStatic,
11123
+ 'layout-static-inactive': isStatic && collapsed && !rail,
11124
+ 'layout-sidebar-rail': isStatic && collapsed && rail,
10936
11125
  'layout-overlay-active': this.layoutService.layoutState().overlayMenuActive,
10937
11126
  'layout-mobile-active': this.layoutService.layoutState().staticMenuMobileActive,
10938
11127
  };
@@ -10984,7 +11173,7 @@ class AscLayout {
10984
11173
  }
10985
11174
  }
10986
11175
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscLayout, deps: [{ token: LayoutService }, { token: i0.Renderer2 }, { token: i1$a.Router }], target: i0.ɵɵFactoryTarget.Component }); }
10987
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscLayout, isStandalone: true, selector: "asc-layout", inputs: { menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, sideBarLogo: { classPropertyName: "sideBarLogo", publicName: "sideBarLogo", isSignal: true, isRequired: false, transformFunction: null }, topBarLogo: { classPropertyName: "topBarLogo", publicName: "topBarLogo", isSignal: true, isRequired: false, transformFunction: null }, iconToggle: { classPropertyName: "iconToggle", publicName: "iconToggle", isSignal: true, isRequired: false, transformFunction: null }, breadCrumb: { classPropertyName: "breadCrumb", publicName: "breadCrumb", isSignal: true, isRequired: false, transformFunction: null }, dropdownTpl: { classPropertyName: "dropdownTpl", publicName: "dropdownTpl", isSignal: true, isRequired: false, transformFunction: null }, footerSidebarTpl: { classPropertyName: "footerSidebarTpl", publicName: "footerSidebarTpl", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
11176
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscLayout, isStandalone: true, selector: "asc-layout", inputs: { menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, sideBarLogo: { classPropertyName: "sideBarLogo", publicName: "sideBarLogo", isSignal: true, isRequired: false, transformFunction: null }, sideBarLogoCollapsed: { classPropertyName: "sideBarLogoCollapsed", publicName: "sideBarLogoCollapsed", isSignal: true, isRequired: false, transformFunction: null }, topBarLogo: { classPropertyName: "topBarLogo", publicName: "topBarLogo", isSignal: true, isRequired: false, transformFunction: null }, iconToggle: { classPropertyName: "iconToggle", publicName: "iconToggle", isSignal: true, isRequired: false, transformFunction: null }, breadCrumb: { classPropertyName: "breadCrumb", publicName: "breadCrumb", isSignal: true, isRequired: false, transformFunction: null }, dropdownTpl: { classPropertyName: "dropdownTpl", publicName: "dropdownTpl", isSignal: true, isRequired: false, transformFunction: null }, footerSidebarTpl: { classPropertyName: "footerSidebarTpl", publicName: "footerSidebarTpl", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, sidebarCollapse: { classPropertyName: "sidebarCollapse", publicName: "sidebarCollapse", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
10988
11177
  <div class="layout-wrapper" [ngClass]="containerClass">
10989
11178
  <asc-topbar
10990
11179
  [iconToggle]="iconToggle()"
@@ -10992,7 +11181,11 @@ class AscLayout {
10992
11181
  [topBarLogo]="topBarLogo()"
10993
11182
  [dropdownTpl]="dropdownTpl()"
10994
11183
  ></asc-topbar>
10995
- <asc-sidebar [sideBarLogo]="sideBarLogo()" [menuItems]="menuItems()">
11184
+ <asc-sidebar
11185
+ [sideBarLogo]="sideBarLogo()"
11186
+ [sideBarLogoCollapsed]="sideBarLogoCollapsed()"
11187
+ [menuItems]="menuItems()"
11188
+ >
10996
11189
  <ng-container [ngTemplateOutlet]="footerSidebarTpl()"></ng-container>
10997
11190
  </asc-sidebar>
10998
11191
  <div class="layout-main-container">
@@ -11005,7 +11198,7 @@ class AscLayout {
11005
11198
  </div>
11006
11199
  <div class="layout-mask animate-fadein"></div>
11007
11200
  </div>
11008
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AppTopbar, selector: "asc-topbar", inputs: ["dropdownTpl", "topBarLogo", "breadCrumb", "iconToggle"] }, { kind: "component", type: AppSidebar, selector: "asc-sidebar", inputs: ["menuItems", "sideBarLogo"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: AppFooter, selector: "asc-footer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11201
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AppTopbar, selector: "asc-topbar", inputs: ["dropdownTpl", "topBarLogo", "breadCrumb", "iconToggle"] }, { kind: "component", type: AppSidebar, selector: "asc-sidebar", inputs: ["menuItems", "sideBarLogo", "sideBarLogoCollapsed"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: AppFooter, selector: "asc-footer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11009
11202
  }
11010
11203
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscLayout, decorators: [{
11011
11204
  type: Component,
@@ -11022,7 +11215,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
11022
11215
  [topBarLogo]="topBarLogo()"
11023
11216
  [dropdownTpl]="dropdownTpl()"
11024
11217
  ></asc-topbar>
11025
- <asc-sidebar [sideBarLogo]="sideBarLogo()" [menuItems]="menuItems()">
11218
+ <asc-sidebar
11219
+ [sideBarLogo]="sideBarLogo()"
11220
+ [sideBarLogoCollapsed]="sideBarLogoCollapsed()"
11221
+ [menuItems]="menuItems()"
11222
+ >
11026
11223
  <ng-container [ngTemplateOutlet]="footerSidebarTpl()"></ng-container>
11027
11224
  </asc-sidebar>
11028
11225
  <div class="layout-main-container">
@@ -11037,7 +11234,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
11037
11234
  </div>
11038
11235
  `,
11039
11236
  }]
11040
- }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i1$a.Router }], propDecorators: { menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: true }] }], sideBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogo", required: false }] }], topBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "topBarLogo", required: false }] }], iconToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconToggle", required: false }] }], breadCrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadCrumb", required: false }] }], dropdownTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownTpl", required: false }] }], footerSidebarTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerSidebarTpl", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }] } });
11237
+ }], ctorParameters: () => [{ type: LayoutService }, { type: i0.Renderer2 }, { type: i1$a.Router }], propDecorators: { menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: true }] }], sideBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogo", required: false }] }], sideBarLogoCollapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideBarLogoCollapsed", required: false }] }], topBarLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "topBarLogo", required: false }] }], iconToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconToggle", required: false }] }], breadCrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadCrumb", required: false }] }], dropdownTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownTpl", required: false }] }], footerSidebarTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerSidebarTpl", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], sidebarCollapse: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarCollapse", required: false }] }] } });
11238
+ // localStorage có thể ném lỗi (chế độ riêng tư, chặn dữ liệu trang) — lỗi thì coi như không lưu
11239
+ function readStoredCollapsed() {
11240
+ try {
11241
+ return localStorage.getItem(ASC_SIDEBAR_COLLAPSED_STORAGE_KEY) === '1';
11242
+ }
11243
+ catch {
11244
+ return false;
11245
+ }
11246
+ }
11247
+ function writeStoredCollapsed(collapsed) {
11248
+ try {
11249
+ localStorage.setItem(ASC_SIDEBAR_COLLAPSED_STORAGE_KEY, collapsed ? '1' : '0');
11250
+ }
11251
+ catch {
11252
+ /* bỏ qua */
11253
+ }
11254
+ }
11041
11255
 
11042
11256
  class AscBreadcrumb {
11043
11257
  constructor() {
@@ -11629,5 +11843,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
11629
11843
  * Generated bundle index. Do not edit.
11630
11844
  */
11631
11845
 
11632
- export { ASC_BASE_CONTROL, ASC_BUILTIN_ICONS, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscSvgIconComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI, resolveAscBuiltinIcon };
11846
+ export { ASC_BASE_CONTROL, ASC_BUILTIN_ICONS, ASC_BUILTIN_ICON_DEFAULT_VIEWBOX, ASC_BUILTIN_ICON_VIEWBOX, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscSvgIconComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI, resolveAscBuiltinIcon };
11633
11847
  //# sourceMappingURL=aseansc-ui.mjs.map