@firestitch/list 18.0.90 → 18.0.92

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.
@@ -12,6 +12,7 @@ import { FsMenuComponent, FsMenuModule } from '@firestitch/menu';
12
12
  import { FsPrompt } from '@firestitch/prompt';
13
13
  import { RouterLink, ActivatedRoute } from '@angular/router';
14
14
  import { MatIconButton, MatIconAnchor, MatAnchor, MatButton, MatFabButton, MatFabAnchor, MatMiniFabButton, MatMiniFabAnchor } from '@angular/material/button';
15
+ import { MatTooltip } from '@angular/material/tooltip';
15
16
  import * as i1 from '@firestitch/file';
16
17
  import { FsFileModule } from '@firestitch/file';
17
18
  import { CdkScrollable } from '@angular/cdk/scrolling';
@@ -19,7 +20,6 @@ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDia
19
20
  import * as i1$2 from '@firestitch/common';
20
21
  import { getNormalizedPath, FsCommonModule } from '@firestitch/common';
21
22
  import { FsStore } from '@firestitch/store';
22
- import { MatTooltip } from '@angular/material/tooltip';
23
23
  import { DrawerRef } from '@firestitch/drawer';
24
24
  import { ItemType, FilterComponent, FilterStatusBarDirective, FilterHeadingDirective } from '@firestitch/filter';
25
25
  import * as i1$3 from '@firestitch/message';
@@ -1594,6 +1594,8 @@ class RowAction {
1594
1594
  className;
1595
1595
  type;
1596
1596
  show;
1597
+ disabled;
1598
+ disabledTooltip;
1597
1599
  restore;
1598
1600
  rowActions;
1599
1601
  label = '';
@@ -1604,6 +1606,14 @@ class RowAction {
1604
1606
  _linkFn;
1605
1607
  _isGroup = false;
1606
1608
  _visible = new BehaviorSubject(true);
1609
+ _isDisabled = new BehaviorSubject(false);
1610
+ _disabledTooltipText = null;
1611
+ /**
1612
+ * Handed to fs-menu as its tooltip. fs-menu only overwrites its stored tooltip when given a
1613
+ * string or a function, so passing null after a row turns enabled would leave the old text
1614
+ * showing. A function is always re-read, and returns nothing while the action is enabled.
1615
+ */
1616
+ menuTooltip = () => this._disabledTooltipText;
1607
1617
  constructor(config = {}) {
1608
1618
  this._init(config);
1609
1619
  if (Array.isArray(this.rowActions)) {
@@ -1626,6 +1636,15 @@ class RowAction {
1626
1636
  get visible() {
1627
1637
  return this._visible.getValue();
1628
1638
  }
1639
+ get isDisabled$() {
1640
+ return this._isDisabled.asObservable();
1641
+ }
1642
+ get isDisabled() {
1643
+ return this._isDisabled.getValue();
1644
+ }
1645
+ get disabledTooltipText() {
1646
+ return this._disabledTooltipText;
1647
+ }
1629
1648
  _init(value) {
1630
1649
  this.icon = value.icon;
1631
1650
  this.menu = value.menu ?? true;
@@ -1638,6 +1657,8 @@ class RowAction {
1638
1657
  // template's @switch and blanking the action.
1639
1658
  this.type = value.type ?? (this.icon && !this.label ? ActionType.Icon : ActionType.Basic);
1640
1659
  this.show = value.show;
1660
+ this.disabled = value.disabled;
1661
+ this.disabledTooltip = value.disabledTooltip;
1641
1662
  this.restore = value.restore;
1642
1663
  this.rowActions = value.rowActions
1643
1664
  ?.map((action) => new RowAction(action));
@@ -1676,10 +1697,32 @@ class RowAction {
1676
1697
  this._visible.next(this.show(row, index));
1677
1698
  }
1678
1699
  }
1700
+ checkDisabledStatus(row, index) {
1701
+ if (this.isGroup) {
1702
+ this.rowActions.forEach((action) => {
1703
+ action.checkDisabledStatus(row, index);
1704
+ });
1705
+ return;
1706
+ }
1707
+ const disabled = typeof this.disabled === 'function'
1708
+ ? !!this.disabled(row, index)
1709
+ : !!this.disabled;
1710
+ this._disabledTooltipText = disabled
1711
+ ? (typeof this.disabledTooltip === 'function'
1712
+ ? this.disabledTooltip(row, index)
1713
+ : this.disabledTooltip) || null
1714
+ : null;
1715
+ this._isDisabled.next(disabled);
1716
+ }
1679
1717
  updateLink(row) {
1680
1718
  if (!this.visible) {
1681
1719
  return;
1682
1720
  }
1721
+ // A disabled action must not navigate: greying out a menu item does not stop its router link.
1722
+ if (this.isDisabled) {
1723
+ this.routerLink = null;
1724
+ return;
1725
+ }
1683
1726
  if (this.isGroup) {
1684
1727
  this.rowActions.forEach((action) => {
1685
1728
  action.updateLink(row);
@@ -1695,6 +1738,9 @@ class RowAction {
1695
1738
  _clickEvent(row, event, index, rowActionsRef, clickFn) {
1696
1739
  // Stop event propagation for parent
1697
1740
  event.stopPropagation();
1741
+ if (this.isDisabled) {
1742
+ return;
1743
+ }
1698
1744
  // Close menu
1699
1745
  if (rowActionsRef) {
1700
1746
  rowActionsRef.closeMenu();
@@ -1757,6 +1803,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1757
1803
  class FsRowInlineIconButtonComponent {
1758
1804
  rowAction;
1759
1805
  row;
1806
+ disabled = false;
1760
1807
  clicked = new EventEmitter();
1761
1808
  fileSelect = new EventEmitter();
1762
1809
  actionClick(event) {
@@ -1766,7 +1813,7 @@ class FsRowInlineIconButtonComponent {
1766
1813
  this.fileSelect.emit(event);
1767
1814
  }
1768
1815
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1769
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowInlineIconButtonComponent, isStandalone: true, selector: "fs-list-row-inline-icon-button", inputs: { rowAction: "rowAction", row: "row" }, outputs: { clicked: "clicked", fileSelect: "fileSelect" }, ngImport: i0, template: "<button\n type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n</button>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: FsRowInlineButtonContentComponent, selector: "fs-list-row-inline-button-content", inputs: ["rowAction", "row"], outputs: ["fileSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1816
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsRowInlineIconButtonComponent, isStandalone: true, selector: "fs-list-row-inline-icon-button", inputs: { rowAction: "rowAction", row: "row", disabled: "disabled" }, outputs: { clicked: "clicked", fileSelect: "fileSelect" }, ngImport: i0, template: "<button\n type=\"button\"\n mat-icon-button\n [disabled]=\"disabled\"\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n</button>", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: FsRowInlineButtonContentComponent, selector: "fs-list-row-inline-button-content", inputs: ["rowAction", "row"], outputs: ["fileSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1770
1817
  }
1771
1818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineIconButtonComponent, decorators: [{
1772
1819
  type: Component,
@@ -1774,11 +1821,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1774
1821
  NgClass,
1775
1822
  MatIconButton,
1776
1823
  FsRowInlineButtonContentComponent,
1777
- ], template: "<button\n type=\"button\"\n mat-icon-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n</button>" }]
1824
+ ], template: "<button\n type=\"button\"\n mat-icon-button\n [disabled]=\"disabled\"\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n</button>" }]
1778
1825
  }], propDecorators: { rowAction: [{
1779
1826
  type: Input
1780
1827
  }], row: [{
1781
1828
  type: Input
1829
+ }], disabled: [{
1830
+ type: Input
1782
1831
  }], clicked: [{
1783
1832
  type: Output
1784
1833
  }], fileSelect: [{
@@ -1816,7 +1865,7 @@ class FsRowInlineActionComponent {
1816
1865
  this.fileSelect.emit(event);
1817
1866
  }
1818
1867
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1819
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsRowInlineActionComponent, isStandalone: true, selector: "fs-list-row-inline-action", inputs: { rowAction: "rowAction", row: "row" }, outputs: { clicked: "clicked", fileSelect: "fileSelect" }, ngImport: i0, template: "@if (rowAction?.visible$ | async) {\n @switch (rowAction.type) {\n <!-- Basic button -->\n @case ('basic') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Raised button -->\n @case ('raised') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Icon button -->\n @case ('icon') {\n @if (!rowAction.routerLink) {\n <fs-list-row-inline-icon-button\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (clicked)=\"actionClick($event)\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-icon-button>\n } @else {\n <fs-list-row-inline-icon-link\n [rowAction]=\"rowAction\"\n [row]=\"row\">\n </fs-list-row-inline-icon-link>\n }\n }\n <!-- Fab button -->\n @case ('fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Mini Fab button -->\n @case ('mini-fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n }\n}", styles: ["mat-icon{display:flex}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: MatFabAnchor, selector: "a[mat-fab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: FsRowInlineButtonContentComponent, selector: "fs-list-row-inline-button-content", inputs: ["rowAction", "row"], outputs: ["fileSelect"] }, { kind: "component", type: FsRowInlineIconButtonComponent, selector: "fs-list-row-inline-icon-button", inputs: ["rowAction", "row"], outputs: ["clicked", "fileSelect"] }, { kind: "component", type: FsRowInlineIconLinkComponent, selector: "fs-list-row-inline-icon-link", inputs: ["rowAction", "row"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1868
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsRowInlineActionComponent, isStandalone: true, selector: "fs-list-row-inline-action", inputs: { rowAction: "rowAction", row: "row" }, outputs: { clicked: "clicked", fileSelect: "fileSelect" }, ngImport: i0, template: "@if (rowAction?.visible$ | async) {\n @let disabled = rowAction.isDisabled$ | async;\n <!-- The tooltip sits on a wrapper: a disabled button fires no hover events of its own -->\n <span\n class=\"row-inline-action-tooltip\"\n [matTooltip]=\"rowAction.disabledTooltipText\"\n [matTooltipDisabled]=\"!disabled || !rowAction.disabledTooltipText\">\n @switch (rowAction.type) {\n <!-- Basic button -->\n @case ('basic') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Raised button -->\n @case ('raised') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Icon button -->\n @case ('icon') {\n @if (!rowAction.routerLink) {\n <fs-list-row-inline-icon-button\n [rowAction]=\"rowAction\"\n [disabled]=\"disabled\"\n [row]=\"row\"\n (clicked)=\"actionClick($event)\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-icon-button>\n } @else {\n <fs-list-row-inline-icon-link\n [rowAction]=\"rowAction\"\n [row]=\"row\">\n </fs-list-row-inline-icon-link>\n }\n }\n <!-- Fab button -->\n @case ('fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Mini Fab button -->\n @case ('mini-fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n }\n </span>\n}\n", styles: ["mat-icon{display:flex}.row-inline-action-tooltip{display:inline-flex}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: MatFabAnchor, selector: "a[mat-fab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: MatMiniFabAnchor, selector: "a[mat-mini-fab]", exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FsRowInlineButtonContentComponent, selector: "fs-list-row-inline-button-content", inputs: ["rowAction", "row"], outputs: ["fileSelect"] }, { kind: "component", type: FsRowInlineIconButtonComponent, selector: "fs-list-row-inline-icon-button", inputs: ["rowAction", "row", "disabled"], outputs: ["clicked", "fileSelect"] }, { kind: "component", type: FsRowInlineIconLinkComponent, selector: "fs-list-row-inline-icon-link", inputs: ["rowAction", "row"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1820
1869
  }
1821
1870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowInlineActionComponent, decorators: [{
1822
1871
  type: Component,
@@ -1830,10 +1879,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1830
1879
  MatMiniFabButton,
1831
1880
  MatMiniFabAnchor,
1832
1881
  AsyncPipe,
1882
+ MatTooltip,
1833
1883
  FsRowInlineButtonContentComponent,
1834
1884
  FsRowInlineIconButtonComponent,
1835
1885
  FsRowInlineIconLinkComponent,
1836
- ], template: "@if (rowAction?.visible$ | async) {\n @switch (rowAction.type) {\n <!-- Basic button -->\n @case ('basic') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Raised button -->\n @case ('raised') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Icon button -->\n @case ('icon') {\n @if (!rowAction.routerLink) {\n <fs-list-row-inline-icon-button\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (clicked)=\"actionClick($event)\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-icon-button>\n } @else {\n <fs-list-row-inline-icon-link\n [rowAction]=\"rowAction\"\n [row]=\"row\">\n </fs-list-row-inline-icon-link>\n }\n }\n <!-- Fab button -->\n @case ('fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Mini Fab button -->\n @case ('mini-fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n }\n}", styles: ["mat-icon{display:flex}\n"] }]
1886
+ ], template: "@if (rowAction?.visible$ | async) {\n @let disabled = rowAction.isDisabled$ | async;\n <!-- The tooltip sits on a wrapper: a disabled button fires no hover events of its own -->\n <span\n class=\"row-inline-action-tooltip\"\n [matTooltip]=\"rowAction.disabledTooltipText\"\n [matTooltipDisabled]=\"!disabled || !rowAction.disabledTooltipText\">\n @switch (rowAction.type) {\n <!-- Basic button -->\n @case ('basic') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Raised button -->\n @case ('raised') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-raised-button\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-raised-button\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Icon button -->\n @case ('icon') {\n @if (!rowAction.routerLink) {\n <fs-list-row-inline-icon-button\n [rowAction]=\"rowAction\"\n [disabled]=\"disabled\"\n [row]=\"row\"\n (clicked)=\"actionClick($event)\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-icon-button>\n } @else {\n <fs-list-row-inline-icon-link\n [rowAction]=\"rowAction\"\n [row]=\"row\">\n </fs-list-row-inline-icon-link>\n }\n }\n <!-- Fab button -->\n @case ('fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n <!-- Mini Fab button -->\n @case ('mini-fab') {\n @if (!rowAction.routerLink) {\n <button\n type=\"button\"\n [disabled]=\"disabled\"\n mat-mini-fab\n (click)=\"actionClick($event)\"\n [ngClass]=\"rowAction.classArray\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </button>\n } @else {\n <a\n mat-mini-fab\n [routerLink]=\"rowAction.routerLink.link\"\n [queryParams]=\"rowAction.routerLink.queryParams\">\n <fs-list-row-inline-button-content\n [rowAction]=\"rowAction\"\n [row]=\"row\"\n (fileSelect)=\"fileSelected($event)\">\n </fs-list-row-inline-button-content>\n </a>\n }\n }\n }\n </span>\n}\n", styles: ["mat-icon{display:flex}.row-inline-action-tooltip{display:inline-flex}\n"] }]
1837
1887
  }], propDecorators: { rowAction: [{
1838
1888
  type: Input
1839
1889
  }], row: [{
@@ -1906,6 +1956,10 @@ class FsRowActionsComponent {
1906
1956
  _destroy$ = new Subject();
1907
1957
  _prompt = inject(FsPrompt);
1908
1958
  actionClick(action, row, event, menuRef) {
1959
+ if (action.isDisabled) {
1960
+ event?.stopPropagation();
1961
+ return;
1962
+ }
1909
1963
  if (action.remove) {
1910
1964
  if (action.remove instanceof Object) {
1911
1965
  this._prompt.confirm({
@@ -1956,7 +2010,7 @@ class FsRowActionsComponent {
1956
2010
  }
1957
2011
  }
1958
2012
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1959
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsRowActionsComponent, isStandalone: true, selector: "fs-list-row-actions", inputs: { row: "row", index: "index", restoreMode: "restoreMode", rowActions: "rowActions", rowRemoved: "rowRemoved", menuRowActions: "menuRowActions", inlineRowActions: "inlineRowActions", restoreAction: "restoreAction" }, ngImport: i0, template: "@if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n }\n}\n<!-- Menu -->\n@if (menuRowActions.length || (restoreMode && restoreAction)) {\n <fs-menu\n class=\"row-menu-action\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n @if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && (action.hidden$ | async)\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n @for (action of menuRowActions; track trackByFn($index)) {\n @if (action.isGroup) {\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n @for (subAction of action.rowActions; track subAction) {\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"subAction.hidden$ | async\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n </fs-menu-group>\n } @else {\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.hidden$ | async\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n }\n }\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n @if (restoreMode && restoreAction) {\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n @if (restoreAction.icon) {\n <mat-icon>\n {{ restoreAction.icon }}\n </mat-icon>\n }\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n }\n </fs-menu>\n}", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"], dependencies: [{ kind: "component", type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: ["rowAction", "row"], outputs: ["clicked", "fileSelect"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FsMenuModule }, { kind: "component", type: i1$1.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { kind: "directive", type: i1$1.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { kind: "component", type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: ["row", "rowAction", "file"], outputs: ["fileSelect", "fileError"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: ActionLabelPipe, name: "actionLabel" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2013
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsRowActionsComponent, isStandalone: true, selector: "fs-list-row-actions", inputs: { row: "row", index: "index", restoreMode: "restoreMode", rowActions: "rowActions", rowRemoved: "rowRemoved", menuRowActions: "menuRowActions", inlineRowActions: "inlineRowActions", restoreAction: "restoreAction" }, ngImport: i0, template: "@if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n }\n}\n<!-- Menu -->\n@if (menuRowActions.length || (restoreMode && restoreAction)) {\n <fs-menu\n class=\"row-menu-action\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n @if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && (action.hidden$ | async)\"\n [disabled]=\"action.isDisabled$ | async\"\n [tooltip]=\"action.menuTooltip\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n @for (action of menuRowActions; track trackByFn($index)) {\n @if (action.isGroup) {\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n @for (subAction of action.rowActions; track subAction) {\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"subAction.hidden$ | async\"\n [disabled]=\"subAction.isDisabled$ | async\"\n [tooltip]=\"subAction.menuTooltip\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n </fs-menu-group>\n } @else {\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.hidden$ | async\"\n [disabled]=\"action.isDisabled$ | async\"\n [tooltip]=\"action.menuTooltip\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n }\n }\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n @if (restoreMode && restoreAction) {\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n @if (restoreAction.icon) {\n <mat-icon>\n {{ restoreAction.icon }}\n </mat-icon>\n }\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n }\n </fs-menu>\n}", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"], dependencies: [{ kind: "component", type: FsRowInlineActionComponent, selector: "fs-list-row-inline-action", inputs: ["rowAction", "row"], outputs: ["clicked", "fileSelect"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FsMenuModule }, { kind: "component", type: i1$1.FsMenuComponent, selector: "fs-menu", inputs: ["class", "buttonClass", "buttonType", "buttonColor"], outputs: ["opened", "closed"] }, { kind: "directive", type: i1$1.FsMenuItemDirective, selector: "fs-menu-group,[fs-menu-item]" }, { kind: "component", type: FsRowMenuActionComponent, selector: "fs-list-row-menu-action", inputs: ["row", "rowAction", "file"], outputs: ["fileSelect", "fileError"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: ActionLabelPipe, name: "actionLabel" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1960
2014
  }
1961
2015
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsRowActionsComponent, decorators: [{
1962
2016
  type: Component,
@@ -1968,7 +2022,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1968
2022
  MatIcon,
1969
2023
  ActionLabelPipe,
1970
2024
  AsyncPipe,
1971
- ], template: "@if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n }\n}\n<!-- Menu -->\n@if (menuRowActions.length || (restoreMode && restoreAction)) {\n <fs-menu\n class=\"row-menu-action\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n @if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && (action.hidden$ | async)\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n @for (action of menuRowActions; track trackByFn($index)) {\n @if (action.isGroup) {\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n @for (subAction of action.rowActions; track subAction) {\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"subAction.hidden$ | async\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n </fs-menu-group>\n } @else {\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.hidden$ | async\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n }\n }\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n @if (restoreMode && restoreAction) {\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n @if (restoreAction.icon) {\n <mat-icon>\n {{ restoreAction.icon }}\n </mat-icon>\n }\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n }\n </fs-menu>\n}", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"] }]
2025
+ ], template: "@if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <fs-list-row-inline-action\n class=\"row-inline-action row-inline-action-{{action.type}}\"\n [rowAction]=\"action\"\n [row]=\"row\"\n [ngClass]=\"{ 'mobile-hide': action.menu === undefined }\"\n (clicked)=\"actionClick(action, row, $event)\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\">\n </fs-list-row-inline-action>\n }\n}\n<!-- Menu -->\n@if (menuRowActions.length || (restoreMode && restoreAction)) {\n <fs-menu\n class=\"row-menu-action\"\n #menuRef>\n <!-- Case when we have usual menu actions -->\n @if (!restoreMode || (restoreMode && !restoreAction)) {\n @for (action of inlineRowActions; track trackByFn($index)) {\n <ng-template\n class=\"hidden-mobile-menu-action\"\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.menu !== undefined && (action.hidden$ | async)\"\n [disabled]=\"action.isDisabled$ | async\"\n [tooltip]=\"action.menuTooltip\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n @for (action of menuRowActions; track trackByFn($index)) {\n @if (action.isGroup) {\n <fs-menu-group [label]=\"action.label | actionLabel:row\">\n @for (subAction of action.rowActions; track subAction) {\n <ng-template\n fs-menu-item\n [link]=\"subAction.routerLink?.link\"\n [queryParams]=\"subAction.routerLink?.queryParams\"\n [target]=\"subAction.routerLink?.target\"\n [hidden]=\"subAction.hidden$ | async\"\n [disabled]=\"subAction.isDisabled$ | async\"\n [tooltip]=\"subAction.menuTooltip\"\n [class]=\"subAction.className\"\n (click)=\"actionClick(subAction, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"subAction\"\n [row]=\"row\"\n [file]=\"subAction.fileConfig\"\n (fileSelect)=\"subAction.fileConfig.select($event, row, index)\"\n (fileError)=\"subAction.fileConfig.error && subAction.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n </fs-menu-group>\n } @else {\n <ng-template\n fs-menu-item\n [link]=\"action.routerLink?.link\"\n [queryParams]=\"action.routerLink?.queryParams\"\n [target]=\"action.routerLink?.target\"\n [hidden]=\"action.hidden$ | async\"\n [disabled]=\"action.isDisabled$ | async\"\n [tooltip]=\"action.menuTooltip\"\n [class]=\"action.className\"\n (click)=\"actionClick(action, row, $event, menuRef);\">\n <fs-list-row-menu-action\n [rowAction]=\"action\"\n [row]=\"row\"\n [file]=\"action.fileConfig\"\n (fileSelect)=\"action.fileConfig.select($event, row, index)\"\n (fileError)=\"action.fileConfig.error && action.fileConfig.error($event)\">\n </fs-list-row-menu-action>\n </ng-template>\n }\n }\n }\n <!-- Case when we have restore mode enabled and must hide menu actions -->\n @if (restoreMode && restoreAction) {\n <ng-template\n fs-menu-item\n (click)=\"actionClick(restoreAction, row, $event, menuRef)\">\n @if (restoreAction.icon) {\n <mat-icon>\n {{ restoreAction.icon }}\n </mat-icon>\n }\n {{ restoreAction.label | actionLabel:row }}\n </ng-template>\n }\n </fs-menu>\n}", styles: [":host{display:flex;align-items:center;justify-content:flex-end}:host ::ng-deep fs-list-row-inline-action{margin-left:5px}:host ::ng-deep fs-list-row-inline-action:first-child{margin-left:0}::ng-deep .hidden-mobile-menu-action{display:none!important}\n"] }]
1972
2026
  }], propDecorators: { row: [{
1973
2027
  type: Input
1974
2028
  }], index: [{
@@ -2841,6 +2895,7 @@ class FsRowComponent {
2841
2895
  this.rowActions
2842
2896
  .forEach((action) => {
2843
2897
  action.checkShowStatus(this.row().data, this.rowIndex);
2898
+ action.checkDisabledStatus(this.row().data, this.rowIndex);
2844
2899
  action.updateLink(this.row().data);
2845
2900
  });
2846
2901
  this._filterActionsByCategories();
@@ -3070,27 +3125,36 @@ class FsBodyComponent {
3070
3125
  /**
3071
3126
  * Track rows by their underlying record id so that a reload (which creates
3072
3127
  * fresh Row wrapper objects) reuses the existing DOM instead of destroying
3073
- * and recreating every row. Only a genuine, non-empty id counts as a stable
3074
- * identity: empty string / null / undefined (group & footer rows, id-less
3075
- * records) fall back to the row index, namespaced so it can never collide
3076
- * with a real id. Without the fallback every id-less row keys to the same
3077
- * value and Angular throws NG0955 (duplicate track keys) -> scrambled rows.
3078
- */
3079
- trackByFn(index, row) {
3128
+ * and recreating every row. A reused DOM row keeps the cell templates and
3129
+ * actions it was first built with, so only a row that renders the same way
3130
+ * may take it over:
3131
+ * - Group headers and group footers are tracked by their wrapper, never by
3132
+ * id. Their data can be a child's own record (a groupBy that returns the
3133
+ * row), so the id would collide with that child's, and they render with
3134
+ * different templates and actions than a record row.
3135
+ * - A record row without a genuine, non-empty id (empty string / null /
3136
+ * undefined) is tracked by its wrapper too. Tracking it by its position
3137
+ * handed each DOM row to whatever row landed there after the reload, so a
3138
+ * group header drew a record's cells and a record drew a group header.
3139
+ */
3140
+ trackByFn(row) {
3141
+ if (isGroupRow(row) || isGroupFooterRow(row)) {
3142
+ return row;
3143
+ }
3080
3144
  const id = row?.data?.id;
3081
3145
  return id === undefined || id === null || id === ''
3082
- ? `__row_index_${index}`
3146
+ ? row
3083
3147
  : id;
3084
3148
  }
3085
3149
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3086
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsBodyComponent, isStandalone: true, selector: "[fs-list-body]", inputs: { rows: "rows", columns: "columns", hasFooter: "hasFooter", rowActionsRaw: "rowActionsRaw", groupActionsRaw: "groupActionsRaw", rowEvents: "rowEvents", rowClass: "rowClass", hasRowActions: "hasRowActions", selection: "selection", restoreMode: "restoreMode", rowRemoved: "rowRemoved", activeFiltersCount: "activeFiltersCount", reorderEnabled: "reorderEnabled", reorderPosition: "reorderPosition", reorderStrategy: "reorderStrategy", reorderMultiple: "reorderMultiple" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: FsRowComponent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "rowsContainer", first: true, predicate: ["rowsContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "@for (row of rows; track trackByFn(i, row); let i = $index) {\n <tr\n fs-list-row\n fsListDraggableRow\n [row]=\"row\"\n [rowIndex]=\"i\"\n [columns]=\"columns\"\n [rowActionsRaw]=\"rowActionsRaw\"\n [groupActionsRaw]=\"groupActionsRaw\"\n [hasRowActions]=\"hasRowActions\"\n [rowEvents]=\"rowEvents\"\n [rowClass]=\"rowClass\"\n [selection]=\"selection\"\n [restoreMode]=\"restoreMode\"\n [rowRemoved]=\"rowRemoved\"\n [activeFiltersCount]=\"activeFiltersCount\"\n [reorderEnabled]=\"reorderEnabled\"\n [reorderPosition]=\"reorderPosition\"\n [reorderStrategy]=\"reorderStrategy\"\n [reorderMultiple]=\"reorderMultiple\">\n </tr>\n}", styles: [":host.drag-hidden .drag-col{opacity:0!important;cursor:default}:host.disabled{opacity:.4;pointer-events:none}\n"], dependencies: [{ kind: "component", type: FsRowComponent, selector: "[fs-list-row]", inputs: ["row", "rowActionsRaw", "groupActionsRaw", "hasRowActions", "rowEvents", "rowClass", "restoreMode", "rowIndex", "columns", "selection", "rowRemoved", "activeFiltersCount", "reorderEnabled", "reorderPosition", "reorderStrategy", "reorderMultiple"] }, { kind: "directive", type: FsListDraggableRowDirective, selector: "[fsListDraggableRow]", inputs: ["row"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3150
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsBodyComponent, isStandalone: true, selector: "[fs-list-body]", inputs: { rows: "rows", columns: "columns", hasFooter: "hasFooter", rowActionsRaw: "rowActionsRaw", groupActionsRaw: "groupActionsRaw", rowEvents: "rowEvents", rowClass: "rowClass", hasRowActions: "hasRowActions", selection: "selection", restoreMode: "restoreMode", rowRemoved: "rowRemoved", activeFiltersCount: "activeFiltersCount", reorderEnabled: "reorderEnabled", reorderPosition: "reorderPosition", reorderStrategy: "reorderStrategy", reorderMultiple: "reorderMultiple" }, queries: [{ propertyName: "headerTemplate", first: true, predicate: FsRowComponent, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "rowsContainer", first: true, predicate: ["rowsContainer"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "@for (row of rows; track trackByFn(row); let i = $index) {\n <tr\n fs-list-row\n fsListDraggableRow\n [row]=\"row\"\n [rowIndex]=\"i\"\n [columns]=\"columns\"\n [rowActionsRaw]=\"rowActionsRaw\"\n [groupActionsRaw]=\"groupActionsRaw\"\n [hasRowActions]=\"hasRowActions\"\n [rowEvents]=\"rowEvents\"\n [rowClass]=\"rowClass\"\n [selection]=\"selection\"\n [restoreMode]=\"restoreMode\"\n [rowRemoved]=\"rowRemoved\"\n [activeFiltersCount]=\"activeFiltersCount\"\n [reorderEnabled]=\"reorderEnabled\"\n [reorderPosition]=\"reorderPosition\"\n [reorderStrategy]=\"reorderStrategy\"\n [reorderMultiple]=\"reorderMultiple\">\n </tr>\n}", styles: [":host.drag-hidden .drag-col{opacity:0!important;cursor:default}:host.disabled{opacity:.4;pointer-events:none}\n"], dependencies: [{ kind: "component", type: FsRowComponent, selector: "[fs-list-row]", inputs: ["row", "rowActionsRaw", "groupActionsRaw", "hasRowActions", "rowEvents", "rowClass", "restoreMode", "rowIndex", "columns", "selection", "rowRemoved", "activeFiltersCount", "reorderEnabled", "reorderPosition", "reorderStrategy", "reorderMultiple"] }, { kind: "directive", type: FsListDraggableRowDirective, selector: "[fsListDraggableRow]", inputs: ["row"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3087
3151
  }
3088
3152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsBodyComponent, decorators: [{
3089
3153
  type: Component,
3090
3154
  args: [{ selector: '[fs-list-body]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
3091
3155
  FsRowComponent,
3092
3156
  FsListDraggableRowDirective,
3093
- ], template: "@for (row of rows; track trackByFn(i, row); let i = $index) {\n <tr\n fs-list-row\n fsListDraggableRow\n [row]=\"row\"\n [rowIndex]=\"i\"\n [columns]=\"columns\"\n [rowActionsRaw]=\"rowActionsRaw\"\n [groupActionsRaw]=\"groupActionsRaw\"\n [hasRowActions]=\"hasRowActions\"\n [rowEvents]=\"rowEvents\"\n [rowClass]=\"rowClass\"\n [selection]=\"selection\"\n [restoreMode]=\"restoreMode\"\n [rowRemoved]=\"rowRemoved\"\n [activeFiltersCount]=\"activeFiltersCount\"\n [reorderEnabled]=\"reorderEnabled\"\n [reorderPosition]=\"reorderPosition\"\n [reorderStrategy]=\"reorderStrategy\"\n [reorderMultiple]=\"reorderMultiple\">\n </tr>\n}", styles: [":host.drag-hidden .drag-col{opacity:0!important;cursor:default}:host.disabled{opacity:.4;pointer-events:none}\n"] }]
3157
+ ], template: "@for (row of rows; track trackByFn(row); let i = $index) {\n <tr\n fs-list-row\n fsListDraggableRow\n [row]=\"row\"\n [rowIndex]=\"i\"\n [columns]=\"columns\"\n [rowActionsRaw]=\"rowActionsRaw\"\n [groupActionsRaw]=\"groupActionsRaw\"\n [hasRowActions]=\"hasRowActions\"\n [rowEvents]=\"rowEvents\"\n [rowClass]=\"rowClass\"\n [selection]=\"selection\"\n [restoreMode]=\"restoreMode\"\n [rowRemoved]=\"rowRemoved\"\n [activeFiltersCount]=\"activeFiltersCount\"\n [reorderEnabled]=\"reorderEnabled\"\n [reorderPosition]=\"reorderPosition\"\n [reorderStrategy]=\"reorderStrategy\"\n [reorderMultiple]=\"reorderMultiple\">\n </tr>\n}", styles: [":host.drag-hidden .drag-col{opacity:0!important;cursor:default}:host.disabled{opacity:.4;pointer-events:none}\n"] }]
3094
3158
  }], propDecorators: { rows: [{
3095
3159
  type: Input
3096
3160
  }], columns: [{