mn-angular-lib 2.0.12 → 2.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.1.7",
6
6
  "@angular/core": "^22.1.7",
@@ -714,6 +714,14 @@ type MnTableRowAction<T> = {
714
714
  * actions, row 2 doesn't", or per-permission actions (e.g. only admins can delete).
715
715
  */
716
716
  hidden?: (row: T) => boolean;
717
+ /**
718
+ * When the action is {@link hidden} for a row, keep its place among the inline buttons as
719
+ * an invisible slot instead of dropping it, so the actions after it stay in the same column
720
+ * on every row (a delete never slides under another row's icon). It is still not shown,
721
+ * not focusable, not announced and not in the ⋯ menu. Leave it off for actions that stand
722
+ * in for each other (activate/deactivate), where a reserved slot would be a permanent gap.
723
+ */
724
+ keepSlot?: boolean;
717
725
  /** Predicate deciding whether the action is disabled (shown but non-interactive) for a row. */
718
726
  disabled?: (row: T) => boolean;
719
727
  /**
@@ -1137,6 +1145,15 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
1137
1145
  getCellSmValue(column: ColumnDefinition<T>, row: T): string;
1138
1146
  /** The actions visible for a given row — those whose `hidden(row)` is not true. */
1139
1147
  visibleRowActions(column: ColumnDefinition<T>, row: T): MnTableRowAction<T>[];
1148
+ /**
1149
+ * The inline buttons for a row, in column order: every visible action, plus a placeholder
1150
+ * where a hidden action has {@link MnTableRowAction.keepSlot} so the buttons after it keep
1151
+ * their column. The ⋯ menu and the collapse rule still read {@link visibleRowActions}.
1152
+ */
1153
+ inlineRowActions(column: ColumnDefinition<T>, row: T): {
1154
+ action: MnTableRowAction<T>;
1155
+ placeholder: boolean;
1156
+ }[];
1140
1157
  /** Whether a row has any visible actions at all; when false its cell is left empty. */
1141
1158
  hasRowActions(column: ColumnDefinition<T>, row: T): boolean;
1142
1159
  /**