ngwr 14.4.0 → 14.5.1

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.
Files changed (163) hide show
  1. package/README.md +12 -6
  2. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  3. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  4. package/fesm2022/ngwr-cascader.mjs +15 -3
  5. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  6. package/fesm2022/ngwr-color-picker.mjs +18 -2
  7. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  8. package/fesm2022/ngwr-context-menu.mjs +35 -3
  9. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  10. package/fesm2022/ngwr-date-picker.mjs +30 -2
  11. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  12. package/fesm2022/ngwr-dialog.mjs +12 -1
  13. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  14. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  15. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  16. package/fesm2022/ngwr-drawer.mjs +48 -2
  17. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  18. package/fesm2022/ngwr-dropdown.mjs +22 -2
  19. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  20. package/fesm2022/ngwr-graph-testing.mjs +243 -0
  21. package/fesm2022/ngwr-graph-testing.mjs.map +1 -0
  22. package/fesm2022/ngwr-graph.mjs +1112 -0
  23. package/fesm2022/ngwr-graph.mjs.map +1 -0
  24. package/fesm2022/ngwr-i18n-ar.mjs +5 -0
  25. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  26. package/fesm2022/ngwr-i18n-cs.mjs +5 -0
  27. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  28. package/fesm2022/ngwr-i18n-de.mjs +5 -0
  29. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  30. package/fesm2022/ngwr-i18n-en.mjs +25 -5
  31. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  32. package/fesm2022/ngwr-i18n-es.mjs +5 -0
  33. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  34. package/fesm2022/ngwr-i18n-fr.mjs +5 -0
  35. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  36. package/fesm2022/ngwr-i18n-he.mjs +5 -0
  37. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  38. package/fesm2022/ngwr-i18n-hi.mjs +5 -0
  39. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  40. package/fesm2022/ngwr-i18n-id.mjs +5 -0
  41. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  42. package/fesm2022/ngwr-i18n-it.mjs +5 -0
  43. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  44. package/fesm2022/ngwr-i18n-ja.mjs +5 -0
  45. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  46. package/fesm2022/ngwr-i18n-ko.mjs +5 -0
  47. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  48. package/fesm2022/ngwr-i18n-nl.mjs +5 -0
  49. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  50. package/fesm2022/ngwr-i18n-pl.mjs +5 -0
  51. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  52. package/fesm2022/ngwr-i18n-pt.mjs +5 -0
  53. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  54. package/fesm2022/ngwr-i18n-ru.mjs +5 -0
  55. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  56. package/fesm2022/ngwr-i18n-sv.mjs +5 -0
  57. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  58. package/fesm2022/ngwr-i18n-tr.mjs +5 -0
  59. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  60. package/fesm2022/ngwr-i18n-uk.mjs +5 -0
  61. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  62. package/fesm2022/ngwr-i18n-vi.mjs +5 -0
  63. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  64. package/fesm2022/ngwr-i18n-zh-TW.mjs +5 -0
  65. package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
  66. package/fesm2022/ngwr-i18n-zh.mjs +5 -0
  67. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  68. package/fesm2022/ngwr-i18n.mjs +13 -0
  69. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  70. package/fesm2022/ngwr-lightbox.mjs +25 -4
  71. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  72. package/fesm2022/ngwr-list.mjs +2 -2
  73. package/fesm2022/ngwr-list.mjs.map +1 -1
  74. package/fesm2022/ngwr-mention.mjs +18 -2
  75. package/fesm2022/ngwr-mention.mjs.map +1 -1
  76. package/fesm2022/ngwr-overlay.mjs +119 -4
  77. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  78. package/fesm2022/ngwr-popconfirm.mjs +19 -3
  79. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  80. package/fesm2022/ngwr-popover-testing.mjs +22 -5
  81. package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
  82. package/fesm2022/ngwr-popover.mjs +215 -27
  83. package/fesm2022/ngwr-popover.mjs.map +1 -1
  84. package/fesm2022/ngwr-segmented.mjs +34 -1
  85. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  86. package/fesm2022/ngwr-select.mjs +15 -1
  87. package/fesm2022/ngwr-select.mjs.map +1 -1
  88. package/fesm2022/ngwr-table.mjs +10 -2
  89. package/fesm2022/ngwr-table.mjs.map +1 -1
  90. package/fesm2022/ngwr-toast.mjs +19 -2
  91. package/fesm2022/ngwr-toast.mjs.map +1 -1
  92. package/fesm2022/ngwr-tour.mjs +20 -6
  93. package/fesm2022/ngwr-tour.mjs.map +1 -1
  94. package/fesm2022/ngwr-tree.mjs +9 -2
  95. package/fesm2022/ngwr-tree.mjs.map +1 -1
  96. package/fesm2022/ngwr-version.mjs +1 -1
  97. package/fesm2022/ngwr-version.mjs.map +1 -1
  98. package/fesm2022/ngwr-window.mjs +18 -1
  99. package/fesm2022/ngwr-window.mjs.map +1 -1
  100. package/graph/styles/_index.scss +113 -0
  101. package/i18n/ar.json +5 -0
  102. package/i18n/cs.json +5 -0
  103. package/i18n/de.json +5 -0
  104. package/i18n/en.json +5 -0
  105. package/i18n/es.json +5 -0
  106. package/i18n/fr.json +5 -0
  107. package/i18n/he.json +5 -0
  108. package/i18n/hi.json +5 -0
  109. package/i18n/id.json +5 -0
  110. package/i18n/it.json +5 -0
  111. package/i18n/ja.json +5 -0
  112. package/i18n/ko.json +5 -0
  113. package/i18n/nl.json +5 -0
  114. package/i18n/pl.json +5 -0
  115. package/i18n/pt.json +5 -0
  116. package/i18n/ru.json +5 -0
  117. package/i18n/sv.json +5 -0
  118. package/i18n/tr.json +5 -0
  119. package/i18n/uk.json +5 -0
  120. package/i18n/vi.json +5 -0
  121. package/i18n/zh-TW.json +5 -0
  122. package/i18n/zh.json +5 -0
  123. package/llms-full.txt +13 -3
  124. package/llms.txt +20 -9
  125. package/mcp/providers.js +8 -2
  126. package/package.json +10 -1
  127. package/schematics/migrations/v14/index.js +90 -34
  128. package/schematics/migrations/v7/index.js +15 -4
  129. package/schematics/migrations/v8/index.js +13 -2
  130. package/schematics/migrations/v9/index.js +19 -10
  131. package/schematics/use/symbol-map.json +2 -0
  132. package/segmented/styles/_index.scss +8 -0
  133. package/skills/ngwr/SKILL.md +10 -5
  134. package/skills/ngwr/references/catalog.md +2 -0
  135. package/skills/ngwr/references/setup.md +2 -2
  136. package/styles.scss +1 -0
  137. package/table/styles/_index.scss +39 -12
  138. package/theme/styles/_focus.scss +7 -0
  139. package/types/ngwr-cascader.d.ts +7 -0
  140. package/types/ngwr-color-picker.d.ts +8 -0
  141. package/types/ngwr-context-menu.d.ts +10 -0
  142. package/types/ngwr-date-picker.d.ts +16 -0
  143. package/types/ngwr-dialog.d.ts +1 -0
  144. package/types/ngwr-drawer.d.ts +28 -0
  145. package/types/ngwr-dropdown.d.ts +9 -0
  146. package/types/ngwr-graph-testing.d.ts +190 -0
  147. package/types/ngwr-graph.d.ts +203 -0
  148. package/types/ngwr-i18n-en.d.ts +16 -5
  149. package/types/ngwr-i18n.d.ts +13 -0
  150. package/types/ngwr-lightbox.d.ts +15 -0
  151. package/types/ngwr-mention.d.ts +7 -0
  152. package/types/ngwr-overlay.d.ts +62 -4
  153. package/types/ngwr-popconfirm.d.ts +1 -0
  154. package/types/ngwr-popover-testing.d.ts +22 -5
  155. package/types/ngwr-popover.d.ts +28 -8
  156. package/types/ngwr-segmented.d.ts +16 -0
  157. package/types/ngwr-select.d.ts +7 -0
  158. package/types/ngwr-table.d.ts +8 -0
  159. package/types/ngwr-toast.d.ts +2 -0
  160. package/types/ngwr-tour.d.ts +6 -0
  161. package/types/ngwr-tree.d.ts +2 -1
  162. package/types/ngwr-version.d.ts +1 -1
  163. package/types/ngwr-window.d.ts +1 -0
@@ -34,9 +34,9 @@ interface WrPopoverHarnessFilters extends BaseHarnessFilters {
34
34
  *
35
35
  * - **popover** — template content, opens on click (or hover), announces
36
36
  * `role="dialog"` and is what the trigger's `aria-expanded` describes;
37
- * - **tooltip** — string content, opens on hover AND focus after a delay,
38
- * announces `role="tooltip"` and DESCRIBES its trigger instead of being
39
- * owned by it.
37
+ * - **tooltip** — string content, opens after a delay on hover or on KEYBOARD
38
+ * focus (never on a `.focus()` call — see {@link focus}), announces
39
+ * `role="tooltip"` and DESCRIBES its trigger instead of being owned by it.
40
40
  *
41
41
  * The panel is never inside the trigger: it is a portal in the overlay
42
42
  * container, a sibling of the whole app. It is reached through the document
@@ -112,7 +112,9 @@ declare class WrPopoverHarness extends ContentContainerComponentHarness {
112
112
  * Hover leads because a click is an outside pointer event for every OTHER open
113
113
  * panel, so leading with it would dismiss someone else's popover on the way to
114
114
  * opening this one; a click-driven popover ignores the hover outright. A
115
- * tooltip is never clicked at all — hover and focus are its only gestures.
115
+ * tooltip is never clicked at all, and hover is the only one of its two
116
+ * gestures a harness can perform — the other is a keyboard focus, which is
117
+ * `FocusMonitor`'s to grant (see {@link focus}).
116
118
  *
117
119
  * Throws when nothing appears: a tooltip with an empty string never opens, and
118
120
  * a spec on fake timers has to advance the clock itself.
@@ -133,7 +135,22 @@ declare class WrPopoverHarness extends ContentContainerComponentHarness {
133
135
  hover(): Promise<void>;
134
136
  /** Move the pointer off the trigger. The panel goes after the grace period, not instantly. */
135
137
  mouseAway(): Promise<void>;
136
- /** Focus the trigger — a tooltip's other opening gesture, so keyboard users get the hint too. */
138
+ /**
139
+ * Focus the trigger PROGRAMMATICALLY — and note that this does not open a
140
+ * tooltip.
141
+ *
142
+ * `TestElement.focus()` is a `.focus()` call, which is the one kind of focus a
143
+ * tooltip deliberately ignores: it shows for a KEYBOARD focus only, because
144
+ * every overlay in the catalog hands focus back to the trigger it was opened
145
+ * from, and a tooltip that answered those appeared with no pointer to leave and
146
+ * no focus to lose. So this method is the way to assert that NOTHING happens.
147
+ *
148
+ * There is no keyboard-origin twin, and it cannot be written honestly here:
149
+ * origin is `FocusMonitor`'s answer, this class has no injector, and the Tab
150
+ * that would earn it moves focus in a browser and not in jsdom. A spec that
151
+ * needs the opening gesture drives `FocusMonitor.focusVia(el, 'keyboard')`
152
+ * itself, the way `popover.spec.ts` does — or uses `hover()`.
153
+ */
137
154
  focus(): Promise<void>;
138
155
  /** Blur the trigger, which hides a tooltip after `hideDelay`. */
139
156
  blur(): Promise<void>;
@@ -23,13 +23,13 @@ declare class WrPopover {
23
23
  *
24
24
  * - `'popover'` (default) — template content, click trigger, dialog
25
25
  * semantics.
26
- * - `'tooltip'` — text content, hover+focus trigger, `role="tooltip"`,
27
- * `aria-describedby` on the host.
26
+ * - `'tooltip'` — text content, hover / keyboard-focus trigger,
27
+ * `role="tooltip"`, `aria-describedby` on the host.
28
28
  */
29
29
  readonly mode: _angular_core.InputSignal<"popover" | "tooltip">;
30
30
  /**
31
- * How the popover opens. Ignored in tooltip mode — tooltips are always
32
- * hover+focus. @default 'click'
31
+ * How the popover opens. Ignored in tooltip mode — a tooltip is always hover
32
+ * plus keyboard focus. @default 'click'
33
33
  */
34
34
  readonly trigger: _angular_core.InputSignal<"click" | "hover">;
35
35
  /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */
@@ -57,6 +57,8 @@ declare class WrPopover {
57
57
  /** Fires after the panel closes. */
58
58
  readonly closed: _angular_core.OutputEmitterRef<void>;
59
59
  private readonly host;
60
+ private readonly focusMonitor;
61
+ private readonly keystroke;
60
62
  private readonly overlay;
61
63
  private readonly dir;
62
64
  private readonly outsideClick;
@@ -64,6 +66,7 @@ declare class WrPopover {
64
66
  private readonly vcr;
65
67
  private readonly scrollStrategies;
66
68
  private readonly destroyRef;
69
+ private readonly injector;
67
70
  /** @internal */
68
71
  readonly isOpen: _angular_core.WritableSignal<boolean>;
69
72
  /** @internal */
@@ -74,6 +77,8 @@ declare class WrPopover {
74
77
  private readonly resolvedPosition;
75
78
  private overlayRef;
76
79
  private textPanelRef;
80
+ /** Whether the HOST itself holds focus — not a descendant of it. */
81
+ private hostFocused;
77
82
  private hoverCloseTimer;
78
83
  private showTimer;
79
84
  private hideTimer;
@@ -88,11 +93,26 @@ declare class WrPopover {
88
93
  /** @internal */
89
94
  protected onMouseLeave(event: MouseEvent): void;
90
95
  /** @internal */
91
- protected onFocus(): void;
92
- /** @internal */
93
- protected onBlur(): void;
94
- /** @internal */
95
96
  protected onEscape(): void;
97
+ /**
98
+ * Whether the keystroke in flight is one the user moves focus with.
99
+ *
100
+ * Asked only of a `keyboard` origin, which the CDK grants to any focus landing
101
+ * within a millisecond of a keydown — including the hand-back a drawer
102
+ * performs while Escape is still being handled. That is the reported bug's
103
+ * keyboard half, and the origin cannot see it.
104
+ *
105
+ * NO key on record answers `true`, and that polarity is chosen rather than
106
+ * inherited: a keyboard modality with no keystroke behind it is a screen
107
+ * reader's virtual cursor (the CDK reads its synthetic mousedown as
108
+ * `keyboard`) or a deliberate `focusVia(el, 'keyboard')`, and both are the
109
+ * user. Refusing wants positive evidence of a key that does something other
110
+ * than navigate — silence must not cost an AT user the hint. The two windows
111
+ * are aligned so that "keyboard origin, no key" cannot mean "the key just
112
+ * expired"; what it does still admit is a `FocusMonitorDetectionMode.EVENTUAL`
113
+ * app, where the CDK never expires an origin at all.
114
+ */
115
+ private fromNavigationKey;
96
116
  private scheduleShow;
97
117
  private scheduleHide;
98
118
  private clearTimers;
@@ -148,6 +148,22 @@ declare class WrSegmented<T = unknown> implements FormValueControl<T | null> {
148
148
  protected readonly selectedIndex: _angular_core.Signal<number>;
149
149
  /** Flips true after the first paint so the thumb only animates user-driven changes, not the initial snap. */
150
150
  private readonly mounted;
151
+ /**
152
+ * True for the tick in which the reading direction changed.
153
+ *
154
+ * Mirroring moves the thumb's SLOT by the whole width of the strip (see
155
+ * `thumbStyle`), and animating that is a quarter-second of the pill travelling
156
+ * across options it does not mark — caught under the wrong label every time the
157
+ * docs site's LTR / RTL switch was used, which is a strip inside an overlay that
158
+ * mirrors underneath it. The selection did not move, so neither should the pill:
159
+ * the stylesheet drops its transition while this is set, and the new slot lands
160
+ * in the same pass that removes it.
161
+ *
162
+ * Cleared from a task rather than `afterNextRender`, which runs inside the very
163
+ * change detection that set this and would put the transition back before the
164
+ * new position is painted.
165
+ */
166
+ private readonly flipping;
151
167
  constructor();
152
168
  protected readonly classes: _angular_core.Signal<string>;
153
169
  private readonly dir;
@@ -710,6 +710,13 @@ declare class WrSelect implements FormValueControl<unknown>, WrSelectContext {
710
710
  private readonly destroyRef;
711
711
  private readonly platformId;
712
712
  private readonly injector;
713
+ /**
714
+ * Ambient reading direction, for the open panel alone — nothing in this
715
+ * component reads it directly. Optional so a bare `TestBed` needs no
716
+ * provider; `Directionality` is root-provided anyway, and a missing one
717
+ * simply reads as `ltr`.
718
+ */
719
+ private readonly dir;
713
720
  private overlayRef;
714
721
  constructor();
715
722
  isSelected(value: unknown): boolean;
@@ -861,6 +861,14 @@ declare class WrTableGroupHeader {
861
861
  /**
862
862
  * Sort indicator rendered in a sortable column's header.
863
863
  *
864
+ * Draws an ARROW for a sorted column — up for `asc`, the same arrow turned by
865
+ * the stylesheet for `desc` — and a flat LINE for a column that sorts but is
866
+ * not sorted. A different shape rather than a fainter arrow, on purpose: a
867
+ * dimmed up-arrow reads as "sorted ascending", which is the one thing an
868
+ * unsorted column must not say, and a state told apart by opacity and colour
869
+ * alone is lost to anyone who cannot see that difference. A line also has no
870
+ * direction to mirror under RTL.
871
+ *
864
872
  * @internal — used internally by `<wr-table>`. Parent listens for clicks
865
873
  * on the indicator to cycle direction.
866
874
  */
@@ -164,6 +164,8 @@ declare class WrToastRef {
164
164
  declare class WrToast {
165
165
  private readonly overlay;
166
166
  private readonly config;
167
+ private readonly injector;
168
+ private readonly dir;
167
169
  private overlayRef;
168
170
  private hostRef;
169
171
  /** Watches the overlay container for overlays opened after the host. */
@@ -115,6 +115,12 @@ declare class WrTour {
115
115
  private anyResolvableBefore;
116
116
  private resolve;
117
117
  private openStep;
118
+ /**
119
+ * The card's fallback table for one placement, with its inline offsets already
120
+ * mirrored. Built per call rather than per step: the direction can change while
121
+ * the step is on screen, and a table is what has to be rebuilt when it does.
122
+ */
123
+ private stepPositions;
118
124
  private placeSpotlight;
119
125
  private teardownStep;
120
126
  /**
@@ -186,7 +186,8 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
186
186
  * anyway, and a missing one simply reads as `ltr`.
187
187
  *
188
188
  * Read at keystroke time rather than cached, so a runtime `dir` flip needs no
189
- * subscription to `change`.
189
+ * subscription to `change` — the overlay is the half that does, and
190
+ * `wrFollowDirection` in `openOverlay()` is where that lives.
190
191
  */
191
192
  private readonly dir;
192
193
  /** Currently focused row's index in the flattened visible list. */
@@ -16,7 +16,7 @@ import { InjectionToken } from '@angular/core';
16
16
  * Distinct from `Version` exported by `@angular/core`, which reports the
17
17
  * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
18
18
  */
19
- declare const NGWR_VERSION = "14.4.0";
19
+ declare const NGWR_VERSION = "14.5.1";
20
20
 
21
21
  /**
22
22
  * @license
@@ -376,6 +376,7 @@ declare class WrWindowManager {
376
376
  private readonly parentInjector;
377
377
  private readonly storage;
378
378
  private readonly isBrowser;
379
+ private readonly dir;
379
380
  private readonly baseZ;
380
381
  private topZ;
381
382
  private openCount;