mn-angular-lib 2.0.8 → 2.0.10

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.8",
3
+ "version": "2.0.10",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.1.7",
6
6
  "@angular/core": "^22.1.7",
@@ -569,9 +569,10 @@ declare class MnCollectionPagination {
569
569
  * width — the same strip is wide on a page and cramped in a modal.
570
570
  *
571
571
  * The first/last anchors and their gaps drop below 640px, where « and » already
572
- * jump to either end. Below 380px every number except the current one drops too:
572
+ * jump to either end. Below 380px every number drops, the current one included:
573
573
  * the strip would otherwise wrap onto a second line and push the footer over the
574
574
  * table, and the "Page 3 of 9" readout beside it already says where the user is.
575
+ * A lone current number would read as a page count ("1" beside "Page 1 of 2").
575
576
  * The arrows survive both steps, so navigation never depends on a number.
576
577
  */
577
578
  slotVisibility(slot: MnPageSlot): string;
@@ -677,6 +677,10 @@ type BaseModalConfig<TResult = unknown> = {
677
677
  closeMode?: CloseMode;
678
678
  closeGuard?: () => Promise<boolean> | boolean;
679
679
  backdrop?: BackdropMode;
680
+ /**
681
+ * Whether Escape closes the modal. Closes by default (unset or `ENABLED`); `DISABLED` opts out.
682
+ * Only the top modal of a stack reacts, and the close goes through `closeMode`/`closeGuard`.
683
+ */
680
684
  keyboard?: KeyboardMode;
681
685
  intent?: ModalIntent;
682
686
  resultType?: TResult;
@@ -86,7 +86,22 @@ declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterV
86
86
  */
87
87
  startClosing(): Promise<void>;
88
88
  private prefersReducedMotion;
89
+ /**
90
+ * Closes the modal on Escape, through the same close guard as every other way out, so a
91
+ * modal that may not close (`CloseMode.DISABLED`) stays open and a guarded one asks first.
92
+ * @param event The keydown.
93
+ */
89
94
  onEscapeKey(event: Event): void;
95
+ /**
96
+ * Whether this Escape is this modal's to act on. On unless the modal opted out with
97
+ * `KeyboardMode.DISABLED`; it used to be off unless every builder opted in, which no app did,
98
+ * so no modal anywhere closed on Escape. Every open shell hears the same document keydown, so
99
+ * only the top one acts (one press closes one modal), and an Escape something inside the modal
100
+ * already took, or an open dropdown in it is about to take, is left to that.
101
+ * @param event The keydown.
102
+ * @returns True when the modal should close.
103
+ */
104
+ private closesOnEscape;
90
105
  onBackdropClick(): void;
91
106
  onCloseButtonClick(): void;
92
107
  /**