@aaamb/ngx-design-system 1.5.3 → 1.5.5

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.
@@ -290,7 +290,9 @@ class CheckboxComponent {
290
290
  label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
291
291
  labelPosition = input('right', ...(ngDevMode ? [{ debugName: "labelPosition" }] : /* istanbul ignore next */ []));
292
292
  labelColor = input('green', ...(ngDevMode ? [{ debugName: "labelColor" }] : /* istanbul ignore next */ []));
293
+ controlColor = input('green', ...(ngDevMode ? [{ debugName: "controlColor" }] : /* istanbul ignore next */ []));
293
294
  checked = input(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
295
+ indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
294
296
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
295
297
  checkedChange = output();
296
298
  cvaMode = false;
@@ -323,6 +325,7 @@ class CheckboxComponent {
323
325
  }
324
326
  controlClasses() {
325
327
  const base = 'inline-flex shrink-0 items-center justify-center border border-solid cursor-pointer transition-colors duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-aqua-2 disabled:pointer-events-none disabled:cursor-not-allowed';
328
+ const isWhite = this.controlColor() === 'white';
326
329
  if (this.appearance() === 'toggle') {
327
330
  const toggleBase = `${base} relative justify-start h-7 w-13 rounded-full p-0.5`;
328
331
  if (this.isDisabled()) {
@@ -332,9 +335,13 @@ class CheckboxComponent {
332
335
  return `${toggleBase} border-[#01474480] bg-transparent`;
333
336
  }
334
337
  if (this.currentChecked()) {
335
- return `${toggleBase} border-green-base bg-aqua-5`;
338
+ return isWhite
339
+ ? `${toggleBase} border-white bg-white`
340
+ : `${toggleBase} border-green-base bg-aqua-5`;
336
341
  }
337
- return `${toggleBase} border-green-base bg-transparent`;
342
+ return isWhite
343
+ ? `${toggleBase} border-white bg-transparent`
344
+ : `${toggleBase} border-green-base bg-transparent`;
338
345
  }
339
346
  if (this.appearance() === 'radio') {
340
347
  const radioBase = `${base} h-6 w-6 rounded-full`;
@@ -345,9 +352,13 @@ class CheckboxComponent {
345
352
  return `${radioBase} border-[#01474480] bg-transparent`;
346
353
  }
347
354
  if (this.currentChecked()) {
348
- return `${radioBase} border-green-base bg-green-base`;
355
+ return isWhite
356
+ ? `${radioBase} border-white bg-white`
357
+ : `${radioBase} border-green-base bg-green-base`;
349
358
  }
350
- return `${radioBase} border-green-base bg-transparent`;
359
+ return isWhite
360
+ ? `${radioBase} border-white bg-transparent`
361
+ : `${radioBase} border-green-base bg-transparent`;
351
362
  }
352
363
  const squareBase = `${base} h-6 w-6 rounded-[5px] p-1`;
353
364
  if (this.isDisabled()) {
@@ -356,10 +367,19 @@ class CheckboxComponent {
356
367
  }
357
368
  return `${squareBase} border-[#01474480] bg-transparent`;
358
369
  }
370
+ if (this.indeterminate()) {
371
+ return isWhite
372
+ ? `${squareBase} border-white bg-white text-green-base`
373
+ : `${squareBase} border-green-base bg-green-base text-white-base`;
374
+ }
359
375
  if (this.currentChecked()) {
360
- return `${squareBase} border-green-base bg-green-base text-white-base`;
376
+ return isWhite
377
+ ? `${squareBase} border-white bg-white text-green-base`
378
+ : `${squareBase} border-green-base bg-green-base text-white-base`;
361
379
  }
362
- return `${squareBase} border-green-base bg-transparent`;
380
+ return isWhite
381
+ ? `${squareBase} border-white bg-transparent`
382
+ : `${squareBase} border-green-base bg-transparent`;
363
383
  }
364
384
  toggleThumbClasses() {
365
385
  const base = 'h-5 w-5 rounded-full transition-transform duration-150';
@@ -394,7 +414,9 @@ class CheckboxComponent {
394
414
  if (this.isDisabled()) {
395
415
  return;
396
416
  }
397
- const nextChecked = this.appearance() === 'radio' ? true : !this.currentChecked();
417
+ const nextChecked = this.indeterminate() || this.appearance() === 'radio'
418
+ ? true
419
+ : !this.currentChecked();
398
420
  if (nextChecked === this.currentChecked()) {
399
421
  this.onTouched();
400
422
  return;
@@ -418,13 +440,13 @@ class CheckboxComponent {
418
440
  this.cvaDisabled = isDisabled;
419
441
  }
420
442
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
421
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: CheckboxComponent, isStandalone: true, selector: "ads-checkbox", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelColor: { classPropertyName: "labelColor", publicName: "labelColor", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, host: { classAttribute: "inline-block align-middle" }, providers: [
443
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: CheckboxComponent, isStandalone: true, selector: "ads-checkbox", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelColor: { classPropertyName: "labelColor", publicName: "labelColor", isSignal: true, isRequired: false, transformFunction: null }, controlColor: { classPropertyName: "controlColor", publicName: "controlColor", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, host: { classAttribute: "inline-block align-middle" }, providers: [
422
444
  {
423
445
  provide: NG_VALUE_ACCESSOR,
424
446
  useExisting: forwardRef(() => CheckboxComponent),
425
447
  multi: true,
426
448
  },
427
- ], ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label() && labelPosition() === 'left') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"controlRole()\"\n [attr.aria-checked]=\"currentChecked()\"\n [class]=\"controlClasses()\"\n (click)=\"onControlClick()\"\n >\n @if (appearance() === 'square' && currentChecked()) {\n <ads-icon iconName=\"check\" [size]=\"30\" />\n }\n\n @if (appearance() === 'toggle') {\n <span [class]=\"toggleThumbClasses()\"></span>\n }\n\n @if (appearance() === 'radio' && currentChecked()) {\n <span [class]=\"radioDotClasses()\"></span>\n }\n </button>\n\n @if (label() && labelPosition() === 'right') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }] });
449
+ ], ngImport: i0, template: "<div [class]=\"wrapperClasses()\">\n @if (label() && labelPosition() === 'left') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"controlRole()\"\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : currentChecked()\"\n [class]=\"controlClasses()\"\n (click)=\"onControlClick()\"\n >\n @if (appearance() === 'square' && indeterminate()) {\n <span class=\"block h-0.5 w-3 bg-current\" aria-hidden=\"true\"></span>\n } @else if (appearance() === 'square' && currentChecked()) {\n <ads-icon iconName=\"check\" [size]=\"30\" />\n }\n\n @if (appearance() === 'toggle') {\n <span [class]=\"toggleThumbClasses()\"></span>\n }\n\n @if (appearance() === 'radio' && currentChecked()) {\n <span [class]=\"radioDotClasses()\"></span>\n }\n </button>\n\n @if (label() && labelPosition() === 'right') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n</div>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }] });
428
450
  }
429
451
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: CheckboxComponent, decorators: [{
430
452
  type: Component,
@@ -436,8 +458,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
436
458
  useExisting: forwardRef(() => CheckboxComponent),
437
459
  multi: true,
438
460
  },
439
- ], template: "<div [class]=\"wrapperClasses()\">\n @if (label() && labelPosition() === 'left') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"controlRole()\"\n [attr.aria-checked]=\"currentChecked()\"\n [class]=\"controlClasses()\"\n (click)=\"onControlClick()\"\n >\n @if (appearance() === 'square' && currentChecked()) {\n <ads-icon iconName=\"check\" [size]=\"30\" />\n }\n\n @if (appearance() === 'toggle') {\n <span [class]=\"toggleThumbClasses()\"></span>\n }\n\n @if (appearance() === 'radio' && currentChecked()) {\n <span [class]=\"radioDotClasses()\"></span>\n }\n </button>\n\n @if (label() && labelPosition() === 'right') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n</div>\n" }]
440
- }], ctorParameters: () => [], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelColor", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
461
+ ], template: "<div [class]=\"wrapperClasses()\">\n @if (label() && labelPosition() === 'left') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n [attr.role]=\"controlRole()\"\n [attr.aria-checked]=\"indeterminate() ? 'mixed' : currentChecked()\"\n [class]=\"controlClasses()\"\n (click)=\"onControlClick()\"\n >\n @if (appearance() === 'square' && indeterminate()) {\n <span class=\"block h-0.5 w-3 bg-current\" aria-hidden=\"true\"></span>\n } @else if (appearance() === 'square' && currentChecked()) {\n <ads-icon iconName=\"check\" [size]=\"30\" />\n }\n\n @if (appearance() === 'toggle') {\n <span [class]=\"toggleThumbClasses()\"></span>\n }\n\n @if (appearance() === 'radio' && currentChecked()) {\n <span [class]=\"radioDotClasses()\"></span>\n }\n </button>\n\n @if (label() && labelPosition() === 'right') {\n <span [class]=\"labelClasses()\">{{ label() }}</span>\n }\n</div>\n" }]
462
+ }], ctorParameters: () => [], propDecorators: { appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelColor", required: false }] }], controlColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlColor", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }] } });
441
463
 
442
464
  class LabelComponent {
443
465
  text = input('', ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
@@ -3575,7 +3597,7 @@ class HelpModalComponent {
3575
3597
  this.checkedChange.emit(value);
3576
3598
  }
3577
3599
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HelpModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3578
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: HelpModalComponent, isStandalone: true, selector: "ads-help-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, buttonsFullWidth: { classPropertyName: "buttonsFullWidth", publicName: "buttonsFullWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, continueText: { classPropertyName: "continueText", publicName: "continueText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, checkboxLabel: { classPropertyName: "checkboxLabel", publicName: "checkboxLabel", isSignal: true, isRequired: false, transformFunction: null }, checkboxChecked: { classPropertyName: "checkboxChecked", publicName: "checkboxChecked", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEsc: { classPropertyName: "closeOnEsc", publicName: "closeOnEsc", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", checkedChange: "checkedChange", continue: "continue" }, ngImport: i0, template: "<ads-main-modal\n [open]=\"open()\"\n width=\"35rem\"\n [actions]=\"actions()\"\n [closeOnBackdrop]=\"closeOnBackdrop()\"\n [closeOnEsc]=\"closeOnEsc()\"\n (closed)=\"closed.emit()\"\n [buttonsFullWidth]=\"buttonsFullWidth()\"\n [actionsAlign]=\"actionsAlign()\"\n>\n <div ads-main-modal-header-extra class=\"flex items-center h-10 w-full\">\n <h2 class=\"m-0 text-[1.12rem] font-semibold leading-tight text-aqua-0\">\n {{ title() }}\n </h2>\n </div>\n\n <p\n class=\"m-0 whitespace-pre-line text-[1.03rem] leading-[1.45] text-green-base pt-6 pb-5\"\n >\n {{ description() }}\n </p>\n\n <div class=\"pb-8\">\n <ads-checkbox\n [checked]=\"checkedState()\"\n [label]=\"checkboxLabel()\"\n labelPosition=\"right\"\n labelColor=\"green\"\n (checkedChange)=\"onCheckboxChange($event)\"\n ></ads-checkbox>\n </div>\n</ads-main-modal>\n", dependencies: [{ kind: "component", type: MainModalComponent, selector: "ads-main-modal", inputs: ["open", "title", "subtitle", "width", "buttonsFullWidth", "closeOnBackdrop", "closeOnEsc", "showCloseButton", "actions", "actionsAlign"], outputs: ["closed"] }, { kind: "component", type: CheckboxComponent, selector: "ads-checkbox", inputs: ["appearance", "label", "labelPosition", "labelColor", "checked", "disabled"], outputs: ["checkedChange"] }] });
3600
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.11", type: HelpModalComponent, isStandalone: true, selector: "ads-help-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, buttonsFullWidth: { classPropertyName: "buttonsFullWidth", publicName: "buttonsFullWidth", isSignal: true, isRequired: false, transformFunction: null }, actionsAlign: { classPropertyName: "actionsAlign", publicName: "actionsAlign", isSignal: true, isRequired: false, transformFunction: null }, continueText: { classPropertyName: "continueText", publicName: "continueText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, checkboxLabel: { classPropertyName: "checkboxLabel", publicName: "checkboxLabel", isSignal: true, isRequired: false, transformFunction: null }, checkboxChecked: { classPropertyName: "checkboxChecked", publicName: "checkboxChecked", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeOnEsc: { classPropertyName: "closeOnEsc", publicName: "closeOnEsc", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", checkedChange: "checkedChange", continue: "continue" }, ngImport: i0, template: "<ads-main-modal\n [open]=\"open()\"\n width=\"35rem\"\n [actions]=\"actions()\"\n [closeOnBackdrop]=\"closeOnBackdrop()\"\n [closeOnEsc]=\"closeOnEsc()\"\n (closed)=\"closed.emit()\"\n [buttonsFullWidth]=\"buttonsFullWidth()\"\n [actionsAlign]=\"actionsAlign()\"\n>\n <div ads-main-modal-header-extra class=\"flex items-center h-10 w-full\">\n <h2 class=\"m-0 text-[1.12rem] font-semibold leading-tight text-aqua-0\">\n {{ title() }}\n </h2>\n </div>\n\n <p\n class=\"m-0 whitespace-pre-line text-[1.03rem] leading-[1.45] text-green-base pt-6 pb-5\"\n >\n {{ description() }}\n </p>\n\n <div class=\"pb-8\">\n <ads-checkbox\n [checked]=\"checkedState()\"\n [label]=\"checkboxLabel()\"\n labelPosition=\"right\"\n labelColor=\"green\"\n (checkedChange)=\"onCheckboxChange($event)\"\n ></ads-checkbox>\n </div>\n</ads-main-modal>\n", dependencies: [{ kind: "component", type: MainModalComponent, selector: "ads-main-modal", inputs: ["open", "title", "subtitle", "width", "buttonsFullWidth", "closeOnBackdrop", "closeOnEsc", "showCloseButton", "actions", "actionsAlign"], outputs: ["closed"] }, { kind: "component", type: CheckboxComponent, selector: "ads-checkbox", inputs: ["appearance", "label", "labelPosition", "labelColor", "controlColor", "checked", "indeterminate", "disabled"], outputs: ["checkedChange"] }] });
3579
3601
  }
3580
3602
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: HelpModalComponent, decorators: [{
3581
3603
  type: Component,
@@ -3785,6 +3807,7 @@ class TableComponent {
3785
3807
  columnSizingChange = new EventEmitter();
3786
3808
  pageSizeChange = new EventEmitter();
3787
3809
  multiSortEvent = new EventEmitter();
3810
+ selectionChange = new EventEmitter();
3788
3811
  table = null;
3789
3812
  isLoading = false;
3790
3813
  selectedSortingHeader = '';
@@ -3802,6 +3825,7 @@ class TableComponent {
3802
3825
  actionButtons = [];
3803
3826
  statusStateStyles = this.defaultStatusStateStyles;
3804
3827
  activeStateStyles = this.defaultActiveStateStyles;
3828
+ selectable = false;
3805
3829
  headerRenderVersion = 0;
3806
3830
  constructor(hostTestId) {
3807
3831
  this.hostTestId = hostTestId;
@@ -4073,16 +4097,37 @@ class TableComponent {
4073
4097
  return stateTextColors.TEXT_AQUA6;
4074
4098
  }
4075
4099
  getEmptyColspan() {
4076
- return this.getHeaderCells().length + (this.showButtons ? 1 : 0);
4100
+ return this.getHeaderCells().length + (this.showButtons ? 1 : 0) + (this.selectable ? 1 : 0);
4101
+ }
4102
+ isRowSelected(row) {
4103
+ return !!row.getIsSelected?.();
4104
+ }
4105
+ isAllSelected() {
4106
+ return !!this.table?.getIsAllPageRowsSelected?.();
4107
+ }
4108
+ isSomeSelected() {
4109
+ return !!this.table?.getIsSomePageRowsSelected?.();
4110
+ }
4111
+ toggleRowSelection(row) {
4112
+ row.toggleSelected?.();
4113
+ this.emitSelection();
4114
+ }
4115
+ toggleSelectAll() {
4116
+ this.table?.toggleAllPageRowsSelected?.(!this.isAllSelected());
4117
+ this.emitSelection();
4118
+ }
4119
+ emitSelection() {
4120
+ this.selectionChange.emit(this.table?.getSelectedRowModel?.()?.rows.map((row) => row.original) ?? []);
4077
4121
  }
4078
4122
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TableComponent, deps: [{ token: 'data-testid', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
4079
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TableComponent, isStandalone: true, selector: "ads-table", inputs: { table: "table", isLoading: "isLoading", selectedSortingHeader: "selectedSortingHeader", sortDirection: "sortDirection", showButtons: "showButtons", allContentLeft: "allContentLeft", totalRegisters: "totalRegisters", minH: ["min-h", "minH"], areColumnsDraggable: "areColumnsDraggable", currentPage: "currentPage", totalPages: "totalPages", pageSize: "pageSize", enableMultiSort: "enableMultiSort", multiSortCriteria: "multiSortCriteria", actionButtons: "actionButtons", statusStateStyles: "statusStateStyles", activeStateStyles: "activeStateStyles" }, outputs: { sortEvent: "sortEvent", columnOrderChange: "columnOrderChange", pageChange: "pageChange", columnSizingChange: "columnSizingChange", pageSizeChange: "pageSizeChange", multiSortEvent: "multiSortEvent" }, ngImport: i0, template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div\n class=\"flex w-full flex-col justify-between gap-4\"\n [ngClass]=\"{ 'min-h-[60vh]': minH }\"\n >\n <div class=\"relative min-h-40 w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"relative\">\n @if (isLoading && getRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"p-0\">\n <div\n class=\"flex min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"\n getStateStyle(cell).shape ?? statusShape\n \"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"text\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n\n @if (isLoading && getRows().length > 0) {\n <tr class=\"absolute inset-0 z-10 block\">\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"block h-full p-0\">\n <div\n class=\"flex h-full min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: FlexRenderDirective, selector: "[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: StateComponent, selector: "ads-state", inputs: ["boldText", "fullWidth", "shape", "text", "borderColor", "bgColor", "textColor", "containerShapes"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$2.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] });
4123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: TableComponent, isStandalone: true, selector: "ads-table", inputs: { table: "table", isLoading: "isLoading", selectedSortingHeader: "selectedSortingHeader", sortDirection: "sortDirection", showButtons: "showButtons", allContentLeft: "allContentLeft", totalRegisters: "totalRegisters", minH: ["min-h", "minH"], areColumnsDraggable: "areColumnsDraggable", currentPage: "currentPage", totalPages: "totalPages", pageSize: "pageSize", enableMultiSort: "enableMultiSort", multiSortCriteria: "multiSortCriteria", actionButtons: "actionButtons", statusStateStyles: "statusStateStyles", activeStateStyles: "activeStateStyles", selectable: "selectable" }, outputs: { sortEvent: "sortEvent", columnOrderChange: "columnOrderChange", pageChange: "pageChange", columnSizingChange: "columnSizingChange", pageSizeChange: "pageSizeChange", multiSortEvent: "multiSortEvent", selectionChange: "selectionChange" }, ngImport: i0, template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div\n class=\"flex w-full flex-col justify-between gap-4\"\n [ngClass]=\"{ 'min-h-[60vh]': minH }\"\n >\n <div class=\"relative min-h-40 w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @if (selectable) {\n <!-- Checkbox selection column header: select all rows -->\n <th\n class=\"relative h-10 min-h-10 max-h-11.25 w-10 px-3 text-center align-middle border-r border-white/20 first:rounded-l-2xl\"\n [attr.data-testid]=\"contentTestId + '-header-select-all'\"\n >\n <div class=\"flex h-full w-full items-center justify-center\">\n <ads-checkbox\n controlColor=\"white\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isSomeSelected() && !isAllSelected()\"\n (checkedChange)=\"toggleSelectAll()\"\n ></ads-checkbox>\n </div>\n </th>\n }\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"relative\">\n @if (isLoading && getRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"p-0\">\n <div\n class=\"flex min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @if (selectable) {\n <!-- Optional row selection checkbox -->\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 align-middle text-center\"\n >\n <div class=\"flex h-full w-full items-center justify-center\">\n <ads-checkbox\n [checked]=\"isRowSelected(row)\"\n (checkedChange)=\"toggleRowSelection(row)\"\n ></ads-checkbox>\n </div>\n </td>\n }\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"\n getStateStyle(cell).shape ?? statusShape\n \"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"text\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n\n @if (isLoading && getRows().length > 0) {\n <tr class=\"absolute inset-0 z-10 block\">\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"block h-full p-0\">\n <div\n class=\"flex h-full min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @if (selectable) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 w-10 px-3 text-center first:rounded-l-2xl\"\n ></th>\n }\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$3.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: FlexRenderDirective, selector: "[flexRender]", inputs: ["flexRender", "flexRenderProps", "flexRenderInjector"] }, { kind: "component", type: CheckboxComponent, selector: "ads-checkbox", inputs: ["appearance", "label", "labelPosition", "labelColor", "controlColor", "checked", "indeterminate", "disabled"], outputs: ["checkedChange"] }, { kind: "component", type: IconComponent, selector: "ads-icon", inputs: ["iconName", "size", "title", "color"] }, { kind: "component", type: ButtonComponent, selector: "button[ads-button]", inputs: ["variant", "color", "buttonType", "disabled", "fullWidth", "iconButton", "onlyIconButton", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: StateComponent, selector: "ads-state", inputs: ["boldText", "fullWidth", "shape", "text", "borderColor", "bgColor", "textColor", "containerShapes"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: NzTooltipModule }, { kind: "directive", type: i1$2.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "cdkConnectedOverlayPush", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }] });
4080
4124
  }
4081
4125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: TableComponent, decorators: [{
4082
4126
  type: Component,
4083
4127
  args: [{ selector: 'ads-table', standalone: true, imports: [
4084
4128
  DragDropModule,
4085
4129
  FlexRenderDirective,
4130
+ CheckboxComponent,
4086
4131
  IconComponent,
4087
4132
  ButtonComponent,
4088
4133
  StateComponent,
@@ -4091,7 +4136,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4091
4136
  CdkDrag,
4092
4137
  CdkDropList,
4093
4138
  NzTooltipModule
4094
- ], template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div\n class=\"flex w-full flex-col justify-between gap-4\"\n [ngClass]=\"{ 'min-h-[60vh]': minH }\"\n >\n <div class=\"relative min-h-40 w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"relative\">\n @if (isLoading && getRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"p-0\">\n <div\n class=\"flex min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"\n getStateStyle(cell).shape ?? statusShape\n \"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"text\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n\n @if (isLoading && getRows().length > 0) {\n <tr class=\"absolute inset-0 z-10 block\">\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"block h-full p-0\">\n <div\n class=\"flex h-full min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"] }]
4139
+ ], template: "@if (getRows().length > 0 || isLoading) {\n <!-- Main table layout: data grid + footer pagination area -->\n <div\n class=\"flex w-full flex-col justify-between gap-4\"\n [ngClass]=\"{ 'min-h-[60vh]': minH }\"\n >\n <div class=\"relative min-h-40 w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <!-- Interactive header row: sorting, drag-and-drop, and column resizing -->\n <thead class=\"bg-green-1 text-white-base\">\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n class=\"h-10 min-h-10 max-h-11.25\"\n (cdkDropListDropped)=\"drop($event)\"\n [ngStyle]=\"allContentLeft ? { 'text-align': 'left' } : null\"\n >\n @if (selectable) {\n <!-- Checkbox selection column header: select all rows -->\n <th\n class=\"relative h-10 min-h-10 max-h-11.25 w-10 px-3 text-center align-middle border-r border-white/20 first:rounded-l-2xl\"\n [attr.data-testid]=\"contentTestId + '-header-select-all'\"\n >\n <div class=\"flex h-full w-full items-center justify-center\">\n <ads-checkbox\n controlColor=\"white\"\n [checked]=\"isAllSelected()\"\n [indeterminate]=\"isSomeSelected() && !isAllSelected()\"\n (checkedChange)=\"toggleSelectAll()\"\n ></ads-checkbox>\n </div>\n </th>\n }\n @for (\n column of getHeaderCells();\n track column.id + \"-\" + headerRenderVersion\n ) {\n @if (isColumnSortable(column)) {\n @if (areColumnsDraggable) {\n <!-- Sortable + draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0 overflow-hidden cursor-grab active:cursor-grabbing\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n cdkDragHandle\n class=\"group flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 border-none outline-0 bg-transparent hover:bg-white/10\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n <!-- When right-aligned, the sort indicator is shown before the header text -->\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n <!-- For left/center aligned headers, the sort indicator is shown after the text -->\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold text-white-base leading-px\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Sortable header cell without drag-and-drop -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <button\n type=\"button\"\n class=\"flex h-full w-full cursor-pointer items-center gap-3 px-3 transition-colors duration-200 hover:bg-white/10 bg-green-base\"\n [ngClass]=\"headerAlignmentClass(column)\"\n (click)=\"sort(column, $event)\"\n [title]=\"\n enableMultiSort ? 'Shift+click to add to sort' : null\n \"\n >\n @if (getSortEntry(column); as entry) {\n @if (isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n @if (getSortEntry(column); as entry) {\n @if (!isSortIconLeading(column)) {\n @if (multiSortCriteria.length > 1) {\n <span\n class=\"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white/25 px-1 text-[0.65rem] font-bold leading-none text-white-base\"\n >\n {{ entry.index + 1 }}\n </span>\n }\n <ads-icon\n class=\"text-current transition-transform duration-200 -rotate-90\"\n [class.rotate-90]=\"entry.direction === 'ASC'\"\n [iconName]=\"'arrow_right'\"\n [size]=\"16\"\n ></ads-icon>\n }\n }\n </button>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n } @else {\n @if (areColumnsDraggable) {\n <!-- Non-sortable but draggable header cell -->\n <th\n cdkDrag\n cdkDragLockAxis=\"x\"\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n cdkDragHandle\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n } @else {\n <!-- Plain header cell (no sort, no drag) -->\n <th\n [ngStyle]=\"getColumnHeaderStyles(column)\"\n class=\"relative h-10 min-h-10 max-h-11.25 select-none border-r border-white/20 font-medium first:rounded-l-2xl last:rounded-r-2xl last:border-r-0\"\n [attr.data-testid]=\"getHeaderTestId(column)\"\n >\n <div\n class=\"flex h-full w-full items-center px-3\"\n [ngClass]=\"headerAlignmentClass(column)\"\n >\n <span class=\"truncate\">{{\n column.column.columnDef.header\n }}</span>\n </div>\n <div\n class=\"absolute right-0 top-0 bottom-0 z-3 w-1 cursor-col-resize select-none bg-green-1 transition-colors hover:bg-green-1\"\n (mousedown)=\"startResize($event, column)\"\n (touchstart)=\"startResize($event, column)\"\n ></div>\n </th>\n }\n }\n }\n\n @if (showButtons) {\n <!-- Optional actions column header -->\n <th\n [attr.data-testid]=\"contentTestId + '-header-actions'\"\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium whitespace-nowrap rounded-r-2xl\"\n [ngStyle]=\"{ width: '1%' }\"\n >\n Actions\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"relative\">\n @if (isLoading && getRows().length === 0) {\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"p-0\">\n <div\n class=\"flex min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n\n <!-- Data rows -->\n @for (row of getRows(); track trackByFn($index, row)) {\n <tr\n [attr.data-testid]=\"getRowTestId(row, $index)\"\n class=\"h-10 min-h-10 max-h-11.25\"\n >\n @if (selectable) {\n <!-- Optional row selection checkbox -->\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 align-middle text-center\"\n >\n <div class=\"flex h-full w-full items-center justify-center\">\n <ads-checkbox\n [checked]=\"isRowSelected(row)\"\n (checkedChange)=\"toggleRowSelection(row)\"\n ></ads-checkbox>\n </div>\n </td>\n }\n @for (cell of row.getVisibleCells(); track cell.id) {\n <td\n class=\"border-b border-[#aedad8] px-3 py-0 text-sm whitespace-pre-line wrap-break-word text-black-base\"\n [ngClass]=\"cellAlignmentClass(cell)\"\n [ngStyle]=\"allContentLeft ? { padding: '0' } : null\"\n >\n @if (isStateCell(cell)) {\n <!-- State-like values (status/active) are rendered with ads-state for a consistent visual token -->\n <ads-state\n [shape]=\"getStateStyle(cell).shape ?? statusShape\"\n [containerShapes]=\"\n getStateStyle(cell).shape ?? statusShape\n \"\n [borderColor]=\"getStateStyle(cell).borderColor\"\n [bgColor]=\"getStateStyle(cell).bgColor\"\n [textColor]=\"getStateStyle(cell).textColor\"\n [text]=\"getStateText(cell)\"\n [fullWidth]=\"getStateStyle(cell).fullWidth ?? false\"\n [boldText]=\"getStateStyle(cell).boldText ?? true\"\n ></ads-state>\n } @else {\n <!-- Generic cell rendering for non-state columns via TanStack flexRender output -->\n <ng-container\n *flexRender=\"\n cell.column.columnDef.cell;\n props: cell.getContext();\n let renderedCell\n \"\n >\n <div\n [innerHTML]=\"renderedCell\"\n [ngStyle]=\"\n allContentLeft ? { 'text-align': 'left' } : null\n \"\n ></div>\n </ng-container>\n }\n </td>\n }\n\n @if (showButtons && actionButtons.length > 0) {\n <!-- Optional row action buttons -->\n <td\n class=\"border-b border-[#aedad8] px-1 py-1 align-middle text-center whitespace-nowrap\"\n >\n <div\n class=\"flex w-full items-center justify-center gap-1 p-0\"\n >\n @for (button of actionButtons; track $index) {\n @if (\n !button.condition || button.condition(row.original)\n ) {\n <button\n nz-tooltip\n [nzTooltipTitle]=\"\n getTooltipText(button, row.original)\n \"\n ads-button\n type=\"button\"\n [onlyIconButton]=\"true\"\n color=\"text\"\n [attr.data-testid]=\"\n getActionButtonTestId(row, button, $index)\n \"\n [title]=\"getTooltipText(button, row.original)\"\n [disabled]=\"\n isActionButtonDisabled(button, row.original)\n \"\n (click)=\"button.callback(row.original)\"\n >\n <ads-icon\n [ngClass]=\"\n isActionButtonDisabled(button, row.original)\n ? 'text-neutral-disabled-text'\n : 'text-green-1'\n \"\n [iconName]=\"iconNameFor(button.icon)\"\n [size]=\"16\"\n ></ads-icon>\n </button>\n }\n }\n </div>\n </td>\n }\n </tr>\n }\n\n @if (isLoading && getRows().length > 0) {\n <tr class=\"absolute inset-0 z-10 block\">\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"block h-full p-0\">\n <div\n class=\"flex h-full min-h-40 items-center justify-center rounded-b-2xl bg-white-base/45 backdrop-blur-sm\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n >\n <span\n class=\"h-10 w-10 animate-spin rounded-full border-4 border-green-1/20 border-t-green-1\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"sr-only\">Loading table data</span>\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Footer controls: page size selector, page navigation, and total record counter -->\n <div class=\"flex w-full flex-wrap items-center justify-end gap-4 py-2\">\n <div class=\"mr-auto flex items-center gap-2 text-sm text-green-1\">\n <span class=\"whitespace-nowrap font-medium\">Rows per page</span>\n <select\n class=\"h-8 cursor-pointer rounded border border-aqua-1 bg-white-base px-2 text-sm text-green-1 outline-none transition hover:border-green-1 focus:border-green-1 focus:ring-2 focus:ring-green-1/20\"\n [value]=\"pageSize\"\n (change)=\"onPageSizeChange($event)\"\n [attr.data-testid]=\"contentTestId + '-page-size-select'\"\n >\n <option value=\"10\">10</option>\n <option value=\"25\">25</option>\n <option value=\"50\">50</option>\n <option value=\"100\">100</option>\n </select>\n </div>\n\n <div class=\"flex w-fit items-center justify-center gap-1\">\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === 1\"\n (click)=\"previousPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-previous'\"\n >\n <span class=\"text-lg leading-none\">\u2039</span>\n Previous\n </button>\n\n <div class=\"flex items-center justify-center gap-1\">\n @for (page of getPageNumbers(); track $index) {\n @if (page === null) {\n <span\n class=\"inline-flex h-8 min-w-8 select-none items-center justify-center px-2 font-medium text-neutral-disabled-text\"\n >...</span\n >\n } @else {\n <button\n type=\"button\"\n class=\"inline-flex h-8 min-w-8 items-center justify-center rounded px-2 font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 outline-0 border-none\"\n [ngClass]=\"{\n 'bg-green-1 text-white-base hover:text-white-base':\n currentPage === page,\n 'bg-transparent': currentPage !== page,\n }\"\n [disabled]=\"false\"\n (click)=\"goToPage(page)\"\n [attr.data-testid]=\"contentTestId + '-pagination-page-' + page\"\n >\n {{ page }}\n </button>\n }\n }\n </div>\n\n <button\n type=\"button\"\n class=\"inline-flex h-8 items-center justify-center gap-1 rounded px-3 text-sm font-medium text-neutral-disabled-text transition hover:text-green-1 disabled:cursor-default disabled:opacity-50 border-none outline-0 bg-transparent\"\n [disabled]=\"currentPage === totalPages\"\n (click)=\"nextPage()\"\n [attr.data-testid]=\"contentTestId + '-pagination-next'\"\n >\n Next\n <span class=\"text-lg leading-none\">\u203A</span>\n </button>\n </div>\n\n @if (totalRegisters) {\n <div\n class=\"w-fit min-w-20 text-sm font-medium text-neutral-disabled-text\"\n [attr.data-testid]=\"contentTestId + '-pagination-info'\"\n >\n Total Records: {{ totalRegisters }}\n </div>\n }\n </div>\n </div>\n} @else {\n <!-- Empty state layout when there are no rows to display -->\n <div class=\"w-full overflow-x-auto\">\n <table\n [attr.data-testid]=\"contentTestId\"\n class=\"min-w-full table-fixed border-separate border-spacing-0\"\n >\n <thead class=\"bg-green-1 text-white-base\">\n <tr class=\"h-10 min-h-10 max-h-11.25\">\n @if (selectable) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 w-10 px-3 text-center first:rounded-l-2xl\"\n ></th>\n }\n @for (column of getHeaderCells(); track column.id) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-left font-medium first:rounded-l-2xl\"\n >\n {{ column.column.columnDef.header }}\n </th>\n }\n @if (showButtons) {\n <th\n class=\"h-10 min-h-10 max-h-11.25 px-3 text-center font-medium rounded-r-2xl\"\n >\n Options\n </th>\n }\n </tr>\n </thead>\n <tbody>\n <tr>\n <td [attr.colspan]=\"getEmptyColspan()\" class=\"py-2\">\n <div\n class=\"flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-aqua-2 bg-aqua-5/40 px-6 py-5 text-center\"\n >\n <span class=\"text-base font-semibold text-green-1\"\n >No available data</span\n >\n <span class=\"text-sm text-neutral-disabled-text\"\n >No data to display right now.</span\n >\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n}\n", styles: [":host ::ng-deep .cdk-drag-preview{background-color:#014744!important;color:#fff!important;border-radius:1rem!important;border-right:1px solid rgba(255,255,255,.2)!important;box-shadow:0 12px 28px #01474447!important;overflow:hidden!important}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging th.cdk-drag:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(.2,0,0,1)}:host ::ng-deep th.cdk-drag-animating{transition:transform .22s cubic-bezier(.2,0,0,1)}::ng-deep .cdk-drag-preview{background:#014743a9!important;color:#fff!important;box-shadow:none!important;border:none!important;border-radius:10rem!important}\n"] }]
4095
4140
  }], ctorParameters: () => [{ type: undefined, decorators: [{
4096
4141
  type: Attribute,
4097
4142
  args: ['data-testid']
@@ -4107,6 +4152,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4107
4152
  type: Output
4108
4153
  }], multiSortEvent: [{
4109
4154
  type: Output
4155
+ }], selectionChange: [{
4156
+ type: Output
4110
4157
  }], table: [{
4111
4158
  type: Input
4112
4159
  }], isLoading: [{
@@ -4142,6 +4189,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
4142
4189
  type: Input
4143
4190
  }], activeStateStyles: [{
4144
4191
  type: Input
4192
+ }], selectable: [{
4193
+ type: Input
4145
4194
  }] } });
4146
4195
 
4147
4196
  /**