ngwr 16.0.0 → 16.2.0

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 (295) hide show
  1. package/badge/styles/_tag.scss +8 -4
  2. package/button/styles/_index.scss +13 -7
  3. package/cascader/styles/_rules.scss +4 -2
  4. package/checkbox/styles/_index.scss +4 -2
  5. package/date-picker/styles/_index.scss +95 -3
  6. package/date-stamp/styles/_index.scss +38 -0
  7. package/dialog/styles/_index.scss +38 -0
  8. package/dropdown/styles/_index.scss +37 -1
  9. package/fesm2022/internal-CVLvP9b_.mjs +33 -0
  10. package/fesm2022/internal-CVLvP9b_.mjs.map +1 -0
  11. package/fesm2022/ngwr-alert.mjs +11 -7
  12. package/fesm2022/ngwr-alert.mjs.map +1 -1
  13. package/fesm2022/ngwr-avatar.mjs +11 -7
  14. package/fesm2022/ngwr-avatar.mjs.map +1 -1
  15. package/fesm2022/ngwr-back-top.mjs +10 -6
  16. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  17. package/fesm2022/ngwr-badge.mjs +18 -6
  18. package/fesm2022/ngwr-badge.mjs.map +1 -1
  19. package/fesm2022/ngwr-burger.mjs +9 -6
  20. package/fesm2022/ngwr-burger.mjs.map +1 -1
  21. package/fesm2022/ngwr-button.mjs +8 -4
  22. package/fesm2022/ngwr-button.mjs.map +1 -1
  23. package/fesm2022/ngwr-calendar.mjs +19 -8
  24. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  25. package/fesm2022/ngwr-card.mjs +9 -5
  26. package/fesm2022/ngwr-card.mjs.map +1 -1
  27. package/fesm2022/ngwr-cascader.mjs +11 -5
  28. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  29. package/fesm2022/ngwr-charts-calendar-heatmap.mjs +5 -2
  30. package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
  31. package/fesm2022/ngwr-checkbox.mjs +10 -6
  32. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  33. package/fesm2022/ngwr-clipboard.mjs +2 -1
  34. package/fesm2022/ngwr-clipboard.mjs.map +1 -1
  35. package/fesm2022/ngwr-collapse.mjs +9 -5
  36. package/fesm2022/ngwr-collapse.mjs.map +1 -1
  37. package/fesm2022/ngwr-color-picker.mjs +4 -2
  38. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  39. package/fesm2022/ngwr-comment.mjs +13 -7
  40. package/fesm2022/ngwr-comment.mjs.map +1 -1
  41. package/fesm2022/ngwr-compare.mjs +9 -3
  42. package/fesm2022/ngwr-compare.mjs.map +1 -1
  43. package/fesm2022/ngwr-context-menu.mjs +4 -2
  44. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  45. package/fesm2022/ngwr-copy-value.mjs +11 -6
  46. package/fesm2022/ngwr-copy-value.mjs.map +1 -1
  47. package/fesm2022/ngwr-date-picker-testing.mjs +18 -0
  48. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  49. package/fesm2022/ngwr-date-picker.mjs +238 -38
  50. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  51. package/fesm2022/ngwr-date-stamp-testing.mjs +34 -0
  52. package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -0
  53. package/fesm2022/ngwr-date-stamp.mjs +213 -0
  54. package/fesm2022/ngwr-date-stamp.mjs.map +1 -0
  55. package/fesm2022/ngwr-date.mjs +364 -54
  56. package/fesm2022/ngwr-date.mjs.map +1 -1
  57. package/fesm2022/ngwr-descriptions.mjs +9 -5
  58. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  59. package/fesm2022/ngwr-dialog-testing.mjs +23 -2
  60. package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
  61. package/fesm2022/ngwr-dialog.mjs +45 -16
  62. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  63. package/fesm2022/ngwr-directives.mjs +102 -11
  64. package/fesm2022/ngwr-directives.mjs.map +1 -1
  65. package/fesm2022/ngwr-divider.mjs +4 -2
  66. package/fesm2022/ngwr-divider.mjs.map +1 -1
  67. package/fesm2022/ngwr-drawer.mjs +29 -3
  68. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  69. package/fesm2022/ngwr-dropdown-testing.mjs +38 -3
  70. package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
  71. package/fesm2022/ngwr-dropdown.mjs +362 -26
  72. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  73. package/fesm2022/ngwr-editor.mjs +5 -2
  74. package/fesm2022/ngwr-editor.mjs.map +1 -1
  75. package/fesm2022/ngwr-event-calendar.mjs +4 -2
  76. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  77. package/fesm2022/ngwr-file-upload.mjs +9 -3
  78. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  79. package/fesm2022/ngwr-form.mjs +18 -6
  80. package/fesm2022/ngwr-form.mjs.map +1 -1
  81. package/fesm2022/ngwr-i18n-ar.mjs +9 -2
  82. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  83. package/fesm2022/ngwr-i18n-cs.mjs +9 -2
  84. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  85. package/fesm2022/ngwr-i18n-de.mjs +9 -2
  86. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  87. package/fesm2022/ngwr-i18n-en.mjs +9 -2
  88. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  89. package/fesm2022/ngwr-i18n-es.mjs +9 -2
  90. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  91. package/fesm2022/ngwr-i18n-fr.mjs +9 -2
  92. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  93. package/fesm2022/ngwr-i18n-he.mjs +9 -2
  94. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  95. package/fesm2022/ngwr-i18n-hi.mjs +9 -2
  96. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  97. package/fesm2022/ngwr-i18n-id.mjs +9 -2
  98. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  99. package/fesm2022/ngwr-i18n-it.mjs +9 -2
  100. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  101. package/fesm2022/ngwr-i18n-ja.mjs +9 -2
  102. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  103. package/fesm2022/ngwr-i18n-ko.mjs +9 -2
  104. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  105. package/fesm2022/ngwr-i18n-nl.mjs +9 -2
  106. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  107. package/fesm2022/ngwr-i18n-pl.mjs +9 -2
  108. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  109. package/fesm2022/ngwr-i18n-pt.mjs +9 -2
  110. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  111. package/fesm2022/ngwr-i18n-ru.mjs +9 -2
  112. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  113. package/fesm2022/ngwr-i18n-sv.mjs +9 -2
  114. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  115. package/fesm2022/ngwr-i18n-tr.mjs +9 -2
  116. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  117. package/fesm2022/ngwr-i18n-uk.mjs +9 -2
  118. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  119. package/fesm2022/ngwr-i18n-vi.mjs +9 -2
  120. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  121. package/fesm2022/ngwr-i18n-zh-tw.mjs +9 -2
  122. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  123. package/fesm2022/ngwr-i18n-zh.mjs +9 -2
  124. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  125. package/fesm2022/ngwr-i18n.mjs +34 -8
  126. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  127. package/fesm2022/ngwr-input-number.mjs +9 -3
  128. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  129. package/fesm2022/ngwr-input-otp.mjs +4 -2
  130. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  131. package/fesm2022/ngwr-input.mjs +20 -10
  132. package/fesm2022/ngwr-input.mjs.map +1 -1
  133. package/fesm2022/ngwr-keyboard.mjs +9 -3
  134. package/fesm2022/ngwr-keyboard.mjs.map +1 -1
  135. package/fesm2022/ngwr-knob.mjs +9 -3
  136. package/fesm2022/ngwr-knob.mjs.map +1 -1
  137. package/fesm2022/ngwr-layout.mjs +13 -5
  138. package/fesm2022/ngwr-layout.mjs.map +1 -1
  139. package/fesm2022/ngwr-lightbox-testing.mjs +26 -0
  140. package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
  141. package/fesm2022/ngwr-lightbox.mjs +255 -15
  142. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  143. package/fesm2022/ngwr-list.mjs +13 -5
  144. package/fesm2022/ngwr-list.mjs.map +1 -1
  145. package/fesm2022/ngwr-load-state.mjs +9 -5
  146. package/fesm2022/ngwr-load-state.mjs.map +1 -1
  147. package/fesm2022/ngwr-overlay.mjs +84 -1
  148. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  149. package/fesm2022/ngwr-pagination.mjs +3 -2
  150. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  151. package/fesm2022/ngwr-pipes.mjs +47 -9
  152. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  153. package/fesm2022/ngwr-popover.mjs +93 -4
  154. package/fesm2022/ngwr-popover.mjs.map +1 -1
  155. package/fesm2022/ngwr-progress.mjs +4 -2
  156. package/fesm2022/ngwr-progress.mjs.map +1 -1
  157. package/fesm2022/ngwr-radio.mjs +9 -5
  158. package/fesm2022/ngwr-radio.mjs.map +1 -1
  159. package/fesm2022/ngwr-rating.mjs +9 -3
  160. package/fesm2022/ngwr-rating.mjs.map +1 -1
  161. package/fesm2022/ngwr-resizable.mjs +503 -0
  162. package/fesm2022/ngwr-resizable.mjs.map +1 -0
  163. package/fesm2022/ngwr-result.mjs +9 -5
  164. package/fesm2022/ngwr-result.mjs.map +1 -1
  165. package/fesm2022/ngwr-schema-form.mjs +3 -0
  166. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  167. package/fesm2022/ngwr-segmented.mjs +4 -2
  168. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  169. package/fesm2022/ngwr-select.mjs +13 -5
  170. package/fesm2022/ngwr-select.mjs.map +1 -1
  171. package/fesm2022/ngwr-skeleton.mjs +4 -2
  172. package/fesm2022/ngwr-skeleton.mjs.map +1 -1
  173. package/fesm2022/ngwr-slider-testing.mjs +17 -0
  174. package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
  175. package/fesm2022/ngwr-slider.mjs +91 -13
  176. package/fesm2022/ngwr-slider.mjs.map +1 -1
  177. package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
  178. package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
  179. package/fesm2022/ngwr-sortable-list.mjs +257 -53
  180. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  181. package/fesm2022/ngwr-speed-dial.mjs +4 -2
  182. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  183. package/fesm2022/ngwr-spinner.mjs +4 -2
  184. package/fesm2022/ngwr-spinner.mjs.map +1 -1
  185. package/fesm2022/ngwr-splitter.mjs +17 -21
  186. package/fesm2022/ngwr-splitter.mjs.map +1 -1
  187. package/fesm2022/ngwr-stepper.mjs +9 -3
  188. package/fesm2022/ngwr-stepper.mjs.map +1 -1
  189. package/fesm2022/ngwr-switch.mjs +9 -5
  190. package/fesm2022/ngwr-switch.mjs.map +1 -1
  191. package/fesm2022/ngwr-table-testing.mjs +5 -1
  192. package/fesm2022/ngwr-table-testing.mjs.map +1 -1
  193. package/fesm2022/ngwr-table.mjs +167 -10
  194. package/fesm2022/ngwr-table.mjs.map +1 -1
  195. package/fesm2022/ngwr-textarea.mjs +9 -3
  196. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  197. package/fesm2022/ngwr-timeline.mjs +18 -8
  198. package/fesm2022/ngwr-timeline.mjs.map +1 -1
  199. package/fesm2022/ngwr-toast-testing.mjs +6 -1
  200. package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
  201. package/fesm2022/ngwr-toast.mjs +529 -104
  202. package/fesm2022/ngwr-toast.mjs.map +1 -1
  203. package/fesm2022/ngwr-transfer.mjs +4 -2
  204. package/fesm2022/ngwr-transfer.mjs.map +1 -1
  205. package/fesm2022/ngwr-tree.mjs +4 -2
  206. package/fesm2022/ngwr-tree.mjs.map +1 -1
  207. package/fesm2022/ngwr-typography.mjs +9 -3
  208. package/fesm2022/ngwr-typography.mjs.map +1 -1
  209. package/fesm2022/ngwr-utils-router.mjs +18 -2
  210. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  211. package/fesm2022/ngwr-utils.mjs +9 -2
  212. package/fesm2022/ngwr-utils.mjs.map +1 -1
  213. package/fesm2022/ngwr-version.mjs +1 -1
  214. package/fesm2022/ngwr-version.mjs.map +1 -1
  215. package/fesm2022/ngwr-window.mjs +7 -4
  216. package/fesm2022/ngwr-window.mjs.map +1 -1
  217. package/fesm2022/ngwr.mjs.map +1 -1
  218. package/i18n/ar.json +13 -2
  219. package/i18n/cs.json +13 -2
  220. package/i18n/de.json +13 -2
  221. package/i18n/en.json +13 -2
  222. package/i18n/es.json +13 -2
  223. package/i18n/fr.json +13 -2
  224. package/i18n/he.json +13 -2
  225. package/i18n/hi.json +13 -2
  226. package/i18n/id.json +13 -2
  227. package/i18n/it.json +13 -2
  228. package/i18n/ja.json +13 -2
  229. package/i18n/ko.json +13 -2
  230. package/i18n/nl.json +13 -2
  231. package/i18n/pl.json +13 -2
  232. package/i18n/pt.json +13 -2
  233. package/i18n/ru.json +13 -2
  234. package/i18n/sv.json +13 -2
  235. package/i18n/tr.json +13 -2
  236. package/i18n/uk.json +13 -2
  237. package/i18n/vi.json +13 -2
  238. package/i18n/zh-TW.json +13 -2
  239. package/i18n/zh.json +13 -2
  240. package/input/styles/_index.scss +10 -5
  241. package/input-number/styles/_index.scss +6 -3
  242. package/input-otp/styles/_index.scss +4 -2
  243. package/lightbox/styles/_rules.scss +96 -0
  244. package/llms-full.txt +40 -17
  245. package/llms.txt +20 -4
  246. package/package.json +19 -1
  247. package/radio/styles/_index.scss +4 -2
  248. package/resizable/styles/_index.scss +154 -0
  249. package/schematics/use/rule.js +1 -0
  250. package/schematics/use/symbol-map.json +5 -0
  251. package/select/styles/_index.scss +6 -3
  252. package/skills/ngwr/SKILL.md +1 -1
  253. package/skills/ngwr/references/catalog.md +6 -2
  254. package/skills/ngwr/references/setup.md +3 -0
  255. package/slider/styles/_index.scss +106 -0
  256. package/sortable-list/styles/_rules.scss +23 -1
  257. package/switch/styles/_index.scss +4 -2
  258. package/table/styles/_index.scss +53 -0
  259. package/textarea/styles/_index.scss +4 -2
  260. package/theme/styles/_motion.scss +6 -0
  261. package/toast/styles/_index.scss +19 -0
  262. package/types/ngwr-burger.d.ts +0 -1
  263. package/types/ngwr-calendar.d.ts +7 -0
  264. package/types/ngwr-charts-calendar-heatmap.d.ts +2 -1
  265. package/types/ngwr-clipboard.d.ts +7 -0
  266. package/types/ngwr-date-picker-testing.d.ts +17 -0
  267. package/types/ngwr-date-picker.d.ts +88 -4
  268. package/types/ngwr-date-stamp-testing.d.ts +47 -0
  269. package/types/ngwr-date-stamp.d.ts +127 -0
  270. package/types/ngwr-date.d.ts +251 -37
  271. package/types/ngwr-dialog-testing.d.ts +10 -0
  272. package/types/ngwr-dialog.d.ts +72 -4
  273. package/types/ngwr-directives.d.ts +36 -1
  274. package/types/ngwr-drawer.d.ts +21 -0
  275. package/types/ngwr-dropdown-testing.d.ts +53 -5
  276. package/types/ngwr-dropdown.d.ts +100 -0
  277. package/types/ngwr-i18n.d.ts +44 -14
  278. package/types/ngwr-lightbox-testing.d.ts +27 -0
  279. package/types/ngwr-lightbox.d.ts +71 -6
  280. package/types/ngwr-overlay.d.ts +36 -0
  281. package/types/ngwr-pipes.d.ts +48 -13
  282. package/types/ngwr-popover.d.ts +39 -1
  283. package/types/ngwr-resizable.d.ts +228 -0
  284. package/types/ngwr-slider-testing.d.ts +8 -1
  285. package/types/ngwr-slider.d.ts +89 -3
  286. package/types/ngwr-sortable-list-testing.d.ts +79 -0
  287. package/types/ngwr-sortable-list.d.ts +113 -10
  288. package/types/ngwr-table-testing.d.ts +3 -1
  289. package/types/ngwr-table.d.ts +120 -4
  290. package/types/ngwr-toast-testing.d.ts +12 -1
  291. package/types/ngwr-toast.d.ts +215 -18
  292. package/types/ngwr-utils-router.d.ts +22 -0
  293. package/types/ngwr-utils.d.ts +8 -1
  294. package/types/ngwr-version.d.ts +1 -1
  295. package/types/ngwr.d.ts +1 -0
@@ -0,0 +1,79 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
2
+ /** Narrows which `<wr-sortable-list>` a harness query matches. */
3
+ interface WrSortableListHarnessFilters extends BaseHarnessFilters {
4
+ /** Match the list's `ariaLabel`. A string is an exact match, a RegExp is tested. */
5
+ readonly ariaLabel?: string | RegExp;
6
+ /** Match a list holding a row with this text. A string is an exact match, a RegExp is tested. */
7
+ readonly item?: string | RegExp;
8
+ }
9
+ /**
10
+ * Test harness for `<wr-sortable-list>`.
11
+ *
12
+ * Every move goes through the keyboard path: pick up, arrows, drop. There is
13
+ * no drag method, because a drag is decided by measured boxes and jsdom has
14
+ * none, so one would report success on a list that sorts nothing.
15
+ *
16
+ * The moves drive a VERTICAL list (ArrowUp / ArrowDown inside it, ArrowLeft /
17
+ * ArrowRight across its group). `orientation` is an input that never reaches
18
+ * the DOM, so the harness cannot read it; on a horizontal list a move lands
19
+ * nowhere and throws, rather than resolving on an order nobody asked for.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const todo = await loader.getHarness(WrSortableListHarness.with({ ariaLabel: 'To do' }));
24
+ * const done = await loader.getHarness(WrSortableListHarness.with({ ariaLabel: 'Done' }));
25
+ *
26
+ * await todo.moveItemTo(0, done, 0);
27
+ * expect(await done.getItems()).toEqual(['Write the spec']);
28
+ * ```
29
+ *
30
+ * @see https://ngwr.dev/guides/testing
31
+ */
32
+ export declare class WrSortableListHarness extends ComponentHarness {
33
+ static hostSelector: string;
34
+ /** Build a predicate that narrows the query: pass to `getHarness` / `getAllHarnesses`. */
35
+ static with(options?: WrSortableListHarnessFilters): HarnessPredicate<WrSortableListHarness>;
36
+ private readonly rows;
37
+ private readonly list;
38
+ private readonly status;
39
+ /** The row the keyboard is holding, in whichever list of the page has it. */
40
+ private readonly held;
41
+ private readonly allLists;
42
+ /** The text of every row, in order. The empty-state slot is not a row. */
43
+ getItems(): Promise<string[]>;
44
+ /** The list's accessible name, or `null` when it has none. */
45
+ getAriaLabel(): Promise<string | null>;
46
+ /** The host's `id`: the `id` input, or the generated one. */
47
+ getId(): Promise<string | null>;
48
+ /** Whether the list has no rows. */
49
+ isEmpty(): Promise<boolean>;
50
+ /** Whether the list belongs to a group, so it can exchange rows with other lists. */
51
+ isConnected(): Promise<boolean>;
52
+ /** The text projected into the empty-state slot, or `null` when the list has rows or projects nothing. */
53
+ getEmptyText(): Promise<string | null>;
54
+ /** What the list's live region last said. Written by keyboard moves only. */
55
+ getAnnouncement(): Promise<string>;
56
+ /** Index of the row the keyboard is holding in THIS list, or `null`. */
57
+ getHeldIndex(): Promise<number | null>;
58
+ /**
59
+ * Moves the row at `from` to `to` inside this list: pick up, arrows, drop.
60
+ * The list emits one `reorder`. Throws when the row does not land on `to`,
61
+ * which is what a disabled or horizontal list does.
62
+ */
63
+ moveItem(from: number, to: number): Promise<void>;
64
+ /**
65
+ * Moves the row at `from` into another list of the same group, at `to`.
66
+ * The target emits one `move`.
67
+ *
68
+ * It walks the group one way, then the other, so it needs no knowledge of the
69
+ * page's direction. Throws when the row never reaches `target`: another
70
+ * group, a list that is disabled, or a `canEnter` that refuses the item. The
71
+ * row is back where it started by then.
72
+ */
73
+ moveItemTo(from: number, target: WrSortableListHarness, to: number): Promise<void>;
74
+ private grab;
75
+ private walkTo;
76
+ private release;
77
+ private heldRow;
78
+ }
79
+ export type { WrSortableListHarnessFilters };
@@ -1,7 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ElementRef, Signal } from "@angular/core";
2
+ import { ElementRef, Signal, WritableSignal } from "@angular/core";
3
3
  import * as i1 from "@angular/cdk/drag-drop";
4
- import { CdkDragDrop } from "@angular/cdk/drag-drop";
5
4
  /**
6
5
  * Contract a `<wr-sortable-item>` uses to talk to its parent list.
7
6
  *
@@ -59,6 +58,27 @@ interface WrSortableReorderEvent<T> {
59
58
  /** Convenience handle for the dropped item. */
60
59
  readonly item: T;
61
60
  }
61
+ /** One end of a move between connected lists: the list and the index in it. */
62
+ interface WrSortableMoveEnd<T> {
63
+ /** The list. Tell it apart by its `id` input, or by comparing the instance. */
64
+ readonly list: WrSortableList<T>;
65
+ /** Index in that list's `items`. */
66
+ readonly index: number;
67
+ }
68
+ /** Payload emitted by the TARGET list when an item arrives from another list of its group. */
69
+ interface WrSortableMoveEvent<T> {
70
+ /** The item that moved. */
71
+ readonly item: T;
72
+ /** Where it left. */
73
+ readonly from: WrSortableMoveEnd<T>;
74
+ /** Where it landed. */
75
+ readonly to: WrSortableMoveEnd<T>;
76
+ }
77
+ /**
78
+ * Decides whether a list takes an item from another list of its group.
79
+ * `from` is the list the gesture started in.
80
+ */
81
+ type WrSortableCanEnter<T> = (item: T, from: WrSortableList<T>) => boolean;
62
82
  /**
63
83
  * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a
64
84
  * signal-based items binding — the source array is updated in place and
@@ -87,6 +107,13 @@ interface WrSortableReorderEvent<T> {
87
107
  * click would be picking itself straight back up. A visible move-up /
88
108
  * move-down affordance is the remaining answer, and that is a design change.
89
109
  *
110
+ * Lists that share a `group` exchange items, by drag and by keyboard. The
111
+ * target list emits `move` once, and both lists write `[(items)]`; `reorder`
112
+ * stays for a move inside one list. Lists find each other through a root
113
+ * registry and are handed to `cdkDropListConnectedTo`, not through
114
+ * `cdkDropListGroup`, which needs a common ancestor directive and so cannot
115
+ * join lists that live in separate components.
116
+ *
90
117
  * @example
91
118
  * ```html
92
119
  * <wr-sortable-list [(items)]="rows" (reorder)="onReorder($event)">
@@ -122,11 +149,42 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
122
149
  touch: number;
123
150
  mouse: number;
124
151
  }>;
125
- /** Fired after a successful reorder with the new array + indices. */
152
+ /**
153
+ * Name of the group this list belongs to. Lists with the same group exchange
154
+ * items, wherever they sit in the page. @default null
155
+ */
156
+ readonly group: import("@angular/core").InputSignal<string | null>;
157
+ /**
158
+ * Refuses an item coming from another list of the group, by drag and by
159
+ * keyboard alike. An item can always return to the list it left.
160
+ * @default null
161
+ */
162
+ readonly canEnter: import("@angular/core").InputSignal<WrSortableCanEnter<T> | null>;
163
+ /**
164
+ * Accessible name of the list. A keyboard move into this list announces it;
165
+ * without one the announcement falls back to the list's position in the group.
166
+ * @default null
167
+ */
168
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
169
+ /** The host's `id`, and what tells the lists of a `move` apart. Generated when omitted. */
170
+ readonly id: import("@angular/core").InputSignal<string | undefined>;
171
+ /** Fired after a successful reorder with the new array + indices. Not fired for a move between lists. */
126
172
  readonly reorder: import("@angular/core").OutputEmitterRef<WrSortableReorderEvent<T>>;
173
+ /**
174
+ * Fired once on the list an item ARRIVED in from another list of the group,
175
+ * after both lists have written `items`. The list it left emits nothing but
176
+ * `itemsChange`.
177
+ */
178
+ readonly move: import("@angular/core").OutputEmitterRef<WrSortableMoveEvent<T>>;
127
179
  private readonly injector;
180
+ private readonly host;
181
+ private readonly dropList;
182
+ private readonly lists;
183
+ private readonly listEl;
184
+ /** The other lists of this list's group. */
185
+ private readonly peers;
128
186
  /**
129
- * Ambient reading direction, for the horizontal keyboard path only.
187
+ * Ambient reading direction, for the keyboard path.
130
188
  *
131
189
  * Optional so a bare `TestBed` — or any consumer that never set a direction —
132
190
  * needs no provider; `Directionality` is root-provided, so `null` only ever
@@ -152,21 +210,28 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
152
210
  */
153
211
  private readonly rows;
154
212
  /** Index of the row the keyboard is holding, or `null` when nothing is held. */
155
- readonly grabbedIndex: import("@angular/core").WritableSignal<number | null>;
213
+ readonly grabbedIndex: WritableSignal<number | null>;
156
214
  /** Live-region text. Written by the keyboard path only. */
157
- protected readonly announcement: import("@angular/core").WritableSignal<string>;
215
+ protected readonly announcement: WritableSignal<string>;
216
+ private readonly uid;
158
217
  /** Links every row to the key model via `aria-describedby`. */
159
218
  readonly keyHelpId: string;
219
+ protected readonly fallbackId: string;
220
+ private readonly keyHelp;
221
+ private readonly groupKeyHelp;
160
222
  protected readonly resolvedKeyHelp: import("@angular/core").Signal<string>;
161
223
  private readonly grabbedText;
162
224
  private readonly movedText;
163
225
  private readonly droppedText;
164
226
  private readonly cancelledText;
165
- /** Where the held row started. Escape puts it back there. */
227
+ private readonly movedToText;
228
+ private readonly listPositionText;
229
+ /** Where the held row started, which can be another list. Escape puts it back there. */
166
230
  private grabOrigin;
167
231
  /** True while a keyboard move is handing focus back — see `onRowFocusout`. */
168
232
  private restoringFocus;
169
- protected onDrop(event: CdkDragDrop<T[]>): void;
233
+ constructor();
234
+ private onDrop;
170
235
  /**
171
236
  * The keyboard reorder path: pick up, move, drop — deliberately a two-step
172
237
  * grab rather than "an arrow moves the focused row", so that arrowing through
@@ -213,9 +278,22 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
213
278
  onRowFocusout(): void;
214
279
  private grab;
215
280
  private moveGrabbed;
281
+ /**
282
+ * Hands the held row to the nearest list of the group, in document order,
283
+ * that takes it. A list that refuses is stepped over, since a drag can reach
284
+ * any list of the group and the keyboard must not reach fewer.
285
+ */
286
+ private moveToList;
216
287
  private drop;
217
288
  private cancelGrab;
289
+ /** Whether this list takes `item` from another list of the group. */
290
+ private accepts;
291
+ /** This list and its peers, in document order. */
292
+ private groupLists;
293
+ private removeAt;
294
+ private insertAt;
218
295
  private relocate;
296
+ private focusRow;
219
297
  private position;
220
298
  static ɵfac: i0.ɵɵFactoryDeclaration<WrSortableList<any>, never>;
221
299
  static ɵcmp: i0.ɵɵComponentDeclaration<WrSortableList<any>, "wr-sortable-list", never, {
@@ -244,10 +322,35 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
244
322
  "required": false;
245
323
  "isSignal": true;
246
324
  };
325
+ "group": {
326
+ "alias": "group";
327
+ "required": false;
328
+ "isSignal": true;
329
+ };
330
+ "canEnter": {
331
+ "alias": "canEnter";
332
+ "required": false;
333
+ "isSignal": true;
334
+ };
335
+ "ariaLabel": {
336
+ "alias": "ariaLabel";
337
+ "required": false;
338
+ "isSignal": true;
339
+ };
340
+ "id": {
341
+ "alias": "id";
342
+ "required": false;
343
+ "isSignal": true;
344
+ };
247
345
  }, {
248
346
  "items": "itemsChange";
249
347
  "reorder": "reorder";
250
- }, never, ["*"], true, never>;
348
+ "move": "move";
349
+ }, never, ["*", "[wrSortableListEmpty]"], true, [{
350
+ directive: typeof i1.CdkDropList;
351
+ inputs: {};
352
+ outputs: {};
353
+ }]>;
251
354
  }
252
355
  /**
253
356
  * One row of a {@link WrSortableList}. Write the loop yourself and put whatever
@@ -340,4 +443,4 @@ export declare class WrDragHandle {
340
443
  outputs: {};
341
444
  }]>;
342
445
  }
343
- export type { WrSortableReorderEvent };
446
+ export type { WrSortableCanEnter, WrSortableMoveEnd, WrSortableMoveEvent, WrSortableReorderEvent };
@@ -290,8 +290,10 @@ export declare class WrTableHarness extends ComponentHarness {
290
290
  * actually happened.
291
291
  */
292
292
  isVirtual(): Promise<boolean>;
293
- /** Whether the loading spinner is covering the table. */
293
+ /** Whether the table is loading, as the overlay or as the bar: the host's `aria-busy`. */
294
294
  isLoading(): Promise<boolean>;
295
+ /** Which form `loading` takes: the overlay with the spinner, the bar, or `null` while idle. */
296
+ getLoadingForm(): Promise<'overlay' | 'bar' | null>;
295
297
  /** The column headers, in render order — which `columnOrder` and a drag can change. */
296
298
  getHeaderCells(filters?: WrTableHeaderCellHarnessFilters): Promise<WrTableHeaderCellHarness[]>;
297
299
  /**
@@ -71,6 +71,19 @@ type WrTableRow = object;
71
71
  * a named function wants its own cast.
72
72
  */
73
73
  type WrTableRowClass = (row: Record<string, unknown>, index: number) => WrClassInput;
74
+ /** Payload emitted by `<wr-table>` when a body row is clicked. */
75
+ interface WrTableRowClick<T extends WrTableRow = WrTableRow> {
76
+ /** The row's own object, as it sits in `items` (or in a parent's children in tree mode). */
77
+ readonly row: T;
78
+ /**
79
+ * Position of the row in `items`, whatever the page, sort, group or scroll
80
+ * window on screen. `-1` for a child row in tree mode, which `items` does
81
+ * not hold.
82
+ */
83
+ readonly index: number;
84
+ /** The click itself, for its modifier keys. */
85
+ readonly event: MouseEvent;
86
+ }
74
87
  /**
75
88
  * @license
76
89
  *
@@ -205,6 +218,12 @@ type WrTableSummary = 'sum' | 'avg' | 'count' | 'min' | 'max' | ((rows: readonly
205
218
  * table: `end` is the right edge in LTR and the left one under `dir="rtl"`.
206
219
  */
207
220
  type WrTableColumnAlign = 'start' | 'center' | 'end';
221
+ /**
222
+ * What a cell does with text wider than its column. `'tooltip'` keeps the
223
+ * cell on one line behind an ellipsis and shows the full text in a tooltip on
224
+ * hover and focus, only while the text is cut.
225
+ */
226
+ type WrTableTruncate = 'tooltip';
208
227
  /**
209
228
  * A single column definition.
210
229
  *
@@ -215,6 +234,12 @@ type WrTableColumnAlign = 'start' | 'center' | 'end';
215
234
  interface WrTableColumn<T extends WrTableRow = WrTableRow> {
216
235
  /** Heading shown in the column's header. */
217
236
  readonly title: string;
237
+ /**
238
+ * A longer explanation of the column, shown as a tooltip on its header and
239
+ * added to the names of its sort button and filter trigger. With an empty
240
+ * `title` (an icon column) it is the column's name.
241
+ */
242
+ readonly headerHint?: string;
218
243
  /** Show a clickable sort indicator in the header. */
219
244
  readonly sortable?: boolean;
220
245
  /** When non-empty, shows a filter dropdown in the header. */
@@ -257,6 +282,13 @@ interface WrTableColumn<T extends WrTableRow = WrTableRow> {
257
282
  * writes the placeholder for a no-value cell.
258
283
  */
259
284
  readonly empty?: string;
285
+ /**
286
+ * `'tooltip'` cuts this column's cells to one line with an ellipsis and shows
287
+ * a cut cell's full text in a tooltip. `null` turns the table's own
288
+ * `truncate` off for this column; unset follows it. A cell is cut only where
289
+ * the column cannot grow: give it a `width`.
290
+ */
291
+ readonly truncate?: WrTableTruncate | null;
260
292
  /**
261
293
  * Extra CSS classes for this column's header cell AND every body cell under
262
294
  * it - the one place to set a monospace face or any other treatment of your
@@ -336,6 +368,20 @@ interface WrTableExpandContext {
336
368
  /** The expanded row (alias of `$implicit`). */
337
369
  readonly row: Record<string, unknown>;
338
370
  }
371
+ /**
372
+ * @license
373
+ *
374
+ * Use of this source code is governed by an MIT-style license that can be
375
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
376
+ */
377
+ /**
378
+ * How `<wr-table>` shows `[loading]`.
379
+ *
380
+ * - `'auto'` — the overlay while no row is shown, the bar once rows are
381
+ * - `'overlay'` — a veil with a spinner over the whole table
382
+ * - `'bar'` — a thin progress bar along the top edge, rows left as they are
383
+ */
384
+ type WrTableLoadingMode = 'auto' | 'overlay' | 'bar';
339
385
  /** One `<tbody>` row descriptor. Not exported — same precedent as the tree's flat node. */
340
386
  type RenderRow = {
341
387
  readonly kind: 'group';
@@ -408,8 +454,19 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
408
454
  * the body keeps indexing rows the way it always has.
409
455
  */
410
456
  private readonly rows;
411
- /** Show the loading spinner overlay. @default false */
457
+ /** Mark the table as loading; `loadingMode` picks how it shows. @default false */
412
458
  readonly loading: import("@angular/core").InputSignalWithTransform<boolean, any>;
459
+ /**
460
+ * How `loading` shows. `'overlay'` veils the table under a spinner. `'bar'`
461
+ * runs a thin progress bar along the top edge and leaves the rows as they
462
+ * are, for a table that refreshes while it is being read. `'auto'` is the
463
+ * overlay while no row is shown and the bar once rows are. The host carries
464
+ * `aria-busy` in every form.
465
+ * @default 'auto'
466
+ */
467
+ readonly loadingMode: import("@angular/core").InputSignal<WrTableLoadingMode>;
468
+ /** The form `loading` takes right now, `null` while nothing loads. */
469
+ protected readonly loadingForm: import("@angular/core").Signal<"overlay" | "bar" | null>;
413
470
  /**
414
471
  * Collapse each row to a labelled card when the table's own box is too narrow
415
472
  * for columns (a container query on its own width, not the viewport). Every
@@ -583,7 +640,7 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
583
640
  * group's label like `selectGroupLabel`. Falls back to `table.toggleGroup`.
584
641
  */
585
642
  readonly toggleGroupLabel: import("@angular/core").InputSignal<string | null>;
586
- /** Accessible name of the loading overlay. Falls back to `table.loading`. */
643
+ /** Accessible name of the loading overlay or bar. Falls back to `table.loading`. */
587
644
  readonly loadingLabel: import("@angular/core").InputSignal<string | null>;
588
645
  protected readonly resolvedEmptyLabel: import("@angular/core").Signal<string>;
589
646
  /**
@@ -644,6 +701,23 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
644
701
  protected groupControlLabelledby(action: 'select-group' | 'toggle-group', groupId: string): string;
645
702
  /** Fires whenever a column's filter selection changes. */
646
703
  readonly filterChange: import("@angular/core").OutputEmitterRef<WrTableFilterChange>;
704
+ /**
705
+ * Fires when a body row is clicked, with the row, its index in `items` and the
706
+ * click. Group bands, summary rows and detail rows do not fire it.
707
+ *
708
+ * A click on an interactive element inside the row is that element's own and
709
+ * does not fire: a button, a link, a form field, a label, `[role=button]`,
710
+ * editable content, the table's own toggles and its selection and expand
711
+ * cells. Mark anything else with the `wrTableIgnoreRowClick` attribute,
712
+ * which needs no import: `<app-menu wrTableIgnoreRowClick />`.
713
+ *
714
+ * Pointer only: a row takes no focus and no key for it, so give the same
715
+ * action a control of its own in the row (a link or a button in a cell) for
716
+ * keyboard and screen reader users. The table adds no cursor either: style
717
+ * `.wr-table__tr` when the rows are clickable.
718
+ */
719
+ readonly rowClick: import("@angular/core").OutputEmitterRef<WrTableRowClick<T>>;
720
+ protected onBodyClick(event: MouseEvent): void;
647
721
  /**
648
722
  * Rows per page. Set to `0` (default) to disable client-side pagination
649
723
  * and render every row at once.
@@ -791,6 +865,7 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
791
865
  */
792
866
  private readonly projectedTemplates;
793
867
  private readonly hostEl;
868
+ private readonly injector;
794
869
  constructor();
795
870
  private setOverflow;
796
871
  private measurePins;
@@ -829,8 +904,38 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
829
904
  * cell.
830
905
  */
831
906
  protected thClasses(column: WrTableColumn<T>): string;
832
- /** Body-cell half of {@link thClasses}. */
907
+ /** Body-cell half of {@link thClasses}, with the `truncate` modifier. */
833
908
  protected tdClasses(column: WrTableColumn<T>): string;
909
+ /**
910
+ * `'tooltip'` cuts every body cell to one line with an ellipsis and shows a
911
+ * cut cell's full text in a tooltip on hover and focus; a cell that fits
912
+ * shows none. A column's own `truncate` wins, and `null` there turns it off
913
+ * for that column. A cell is cut only where its column cannot grow: give the
914
+ * column a `width`, or the table a fixed layout (a resized or virtualized
915
+ * one has it).
916
+ * @default null
917
+ */
918
+ readonly truncate: import("@angular/core").InputSignal<"tooltip" | null>;
919
+ /** Whether a column's cells are cut to one line. */
920
+ protected truncates(column: WrTableColumn<T>): boolean;
921
+ /**
922
+ * A column's name for its controls: the title, the hint after it, or the hint
923
+ * alone under an empty title.
924
+ */
925
+ protected headerName(column: WrTableColumn<T>): string;
926
+ /** Whether any column has something a tooltip could show. */
927
+ private readonly hasTips;
928
+ /**
929
+ * The element the table's one tooltip is for, and its text. One `WrPopover`
930
+ * for the whole table, created on the first hint or cut cell the pointer or
931
+ * the focus reaches: a table of thousands of cells holds none before that.
932
+ */
933
+ protected readonly tip: import("@angular/core").WritableSignal<{
934
+ readonly el: HTMLElement;
935
+ readonly text: string;
936
+ } | null>;
937
+ private readonly modality;
938
+ private onTipTarget;
834
939
  /**
835
940
  * Summary and group-footer half of {@link thClasses}: `align` only, on the
836
941
  * body cell's modifier, the way those cells already wear `__td--pin-*`.
@@ -1147,6 +1252,11 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
1147
1252
  "required": false;
1148
1253
  "isSignal": true;
1149
1254
  };
1255
+ "loadingMode": {
1256
+ "alias": "loadingMode";
1257
+ "required": false;
1258
+ "isSignal": true;
1259
+ };
1150
1260
  "responsive": {
1151
1261
  "alias": "responsive";
1152
1262
  "required": false;
@@ -1322,6 +1432,11 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
1322
1432
  "required": false;
1323
1433
  "isSignal": true;
1324
1434
  };
1435
+ "truncate": {
1436
+ "alias": "truncate";
1437
+ "required": false;
1438
+ "isSignal": true;
1439
+ };
1325
1440
  }, {
1326
1441
  "columnOrder": "columnOrderChange";
1327
1442
  "selection": "selectionChange";
@@ -1329,6 +1444,7 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
1329
1444
  "collapsedGroups": "collapsedGroupsChange";
1330
1445
  "sort": "sortChange";
1331
1446
  "filterChange": "filterChange";
1447
+ "rowClick": "rowClick";
1332
1448
  "pageSizeChange": "pageSizeChange";
1333
1449
  "page": "pageChange";
1334
1450
  }, ["cellTemplates", "projectedTemplates", "expandTpl", "groupTpl"], never, true, never>;
@@ -1607,4 +1723,4 @@ export declare function wrReadField<T>(item: T, key: string): string | number;
1607
1723
  * @param accessor Reads the value of a key; defaults to `wrReadField`.
1608
1724
  */
1609
1725
  export declare function wrSortRows<T>(rows: readonly T[], sort: readonly WrTableSortState[], accessor?: WrTableSortAccessor<T>): readonly T[];
1610
- export type { WrTableCellContext, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableRow, WrTableRowClass, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableSummary, WrTableSummaryContext };
1726
+ export type { WrTableCellContext, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
@@ -8,12 +8,18 @@ interface WrToastHarnessFilters extends BaseHarnessFilters {
8
8
  readonly title?: string | RegExp;
9
9
  /** Match the intent: `info`, `success`, `warning` or `danger`. */
10
10
  readonly type?: WrToastType;
11
+ /**
12
+ * Match the toasts of one `<wr-toast-outlet>`, by its name. `null` matches
13
+ * the global stack only, the toasts in no outlet.
14
+ */
15
+ readonly outlet?: string | null;
11
16
  }
12
17
  /**
13
18
  * Test harness for a toast shown with `WrToast.show()`.
14
19
  *
15
20
  * Toasts live in the overlay, so load this from
16
- * `TestbedHarnessEnvironment.documentRootLoader()`. What is worth asserting on a
21
+ * `TestbedHarnessEnvironment.documentRootLoader()`. That finds the toasts of a
22
+ * `<wr-toast-outlet>` too, and `with({ outlet })` tells the stacks apart. What is worth asserting on a
17
23
  * toast is mostly what it ANNOUNCES: `getRole()` and `getLiveLevel()` are how a
18
24
  * screen-reader user learns something happened, and they escalate with the
19
25
  * intent — a `danger` toast interrupts, an `info` toast waits its turn.
@@ -45,6 +51,11 @@ export declare class WrToastHarness extends ComponentHarness {
45
51
  getTitle(): Promise<string | null>;
46
52
  /** The intent, read from the `wr-toast--*` modifier. */
47
53
  getType(): Promise<WrToastType | null>;
54
+ /**
55
+ * Whether the toast is in the `<wr-toast-outlet>` of that name. `null` asks
56
+ * for the global stack: a toast in no outlet.
57
+ */
58
+ isInOutlet(name: string | null): Promise<boolean>;
48
59
  /** `'alert'` for a danger toast, `'status'` otherwise — how urgently it interrupts. */
49
60
  getRole(): Promise<string | null>;
50
61
  /** `'assertive'` for danger and warning, `'polite'` otherwise. */