ngwr 16.0.0 → 16.1.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.
- package/badge/styles/_tag.scss +8 -4
- package/button/styles/_index.scss +13 -7
- package/cascader/styles/_rules.scss +4 -2
- package/checkbox/styles/_index.scss +4 -2
- package/date-picker/styles/_index.scss +6 -2
- package/date-stamp/styles/_index.scss +38 -0
- package/dialog/styles/_index.scss +38 -0
- package/fesm2022/internal-CVLvP9b_.mjs +33 -0
- package/fesm2022/internal-CVLvP9b_.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +11 -7
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +11 -7
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +10 -6
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-badge.mjs +18 -6
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +9 -6
- package/fesm2022/ngwr-burger.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +8 -4
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +19 -8
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -5
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +11 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +5 -2
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +10 -6
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +2 -1
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -5
- package/fesm2022/ngwr-collapse.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +4 -2
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-comment.mjs +13 -7
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +9 -3
- package/fesm2022/ngwr-compare.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +4 -2
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +11 -6
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +86 -30
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp-testing.mjs +34 -0
- package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -0
- package/fesm2022/ngwr-date-stamp.mjs +149 -0
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -0
- package/fesm2022/ngwr-date.mjs +279 -50
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +9 -5
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog-testing.mjs +23 -2
- package/fesm2022/ngwr-dialog-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +45 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +102 -11
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +4 -2
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +29 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +4 -2
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +5 -2
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +4 -2
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +9 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +18 -6
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +2 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +2 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +2 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +2 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +2 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +2 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +2 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +2 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +2 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +2 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +2 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +2 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +2 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +2 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +2 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +2 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +2 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +2 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +2 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +2 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +2 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +34 -8
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +9 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +4 -2
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +20 -10
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +9 -3
- package/fesm2022/ngwr-keyboard.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +9 -3
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +13 -5
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +9 -5
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +13 -5
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +9 -5
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +84 -1
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +3 -2
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -5
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +93 -4
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +4 -2
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +9 -5
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +9 -3
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-resizable.mjs +503 -0
- package/fesm2022/ngwr-resizable.mjs.map +1 -0
- package/fesm2022/ngwr-result.mjs +9 -5
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +4 -2
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +13 -5
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +4 -2
- package/fesm2022/ngwr-skeleton.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +4 -2
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +4 -2
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +4 -2
- package/fesm2022/ngwr-spinner.mjs.map +1 -1
- package/fesm2022/ngwr-splitter.mjs +17 -21
- package/fesm2022/ngwr-splitter.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +9 -3
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +9 -5
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +5 -1
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +167 -10
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +9 -3
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +18 -8
- package/fesm2022/ngwr-timeline.mjs.map +1 -1
- package/fesm2022/ngwr-toast-testing.mjs +6 -1
- package/fesm2022/ngwr-toast-testing.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +529 -104
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -2
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +4 -2
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +9 -3
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils-router.mjs +18 -2
- package/fesm2022/ngwr-utils-router.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +9 -2
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +7 -4
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/fesm2022/ngwr.mjs.map +1 -1
- package/i18n/ar.json +6 -0
- package/i18n/cs.json +6 -0
- package/i18n/de.json +6 -0
- package/i18n/en.json +6 -0
- package/i18n/es.json +6 -0
- package/i18n/fr.json +6 -0
- package/i18n/he.json +6 -0
- package/i18n/hi.json +6 -0
- package/i18n/id.json +6 -0
- package/i18n/it.json +6 -0
- package/i18n/ja.json +6 -0
- package/i18n/ko.json +6 -0
- package/i18n/nl.json +6 -0
- package/i18n/pl.json +6 -0
- package/i18n/pt.json +6 -0
- package/i18n/ru.json +6 -0
- package/i18n/sv.json +6 -0
- package/i18n/tr.json +6 -0
- package/i18n/uk.json +6 -0
- package/i18n/vi.json +6 -0
- package/i18n/zh-TW.json +6 -0
- package/i18n/zh.json +6 -0
- package/input/styles/_index.scss +10 -5
- package/input-number/styles/_index.scss +6 -3
- package/input-otp/styles/_index.scss +4 -2
- package/llms-full.txt +29 -10
- package/llms.txt +8 -4
- package/package.json +15 -1
- package/radio/styles/_index.scss +4 -2
- package/resizable/styles/_index.scss +154 -0
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +4 -0
- package/select/styles/_index.scss +6 -3
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +4 -1
- package/skills/ngwr/references/setup.md +3 -0
- package/switch/styles/_index.scss +4 -2
- package/table/styles/_index.scss +53 -0
- package/textarea/styles/_index.scss +4 -2
- package/theme/styles/_motion.scss +6 -0
- package/toast/styles/_index.scss +19 -0
- package/types/ngwr-burger.d.ts +0 -1
- package/types/ngwr-calendar.d.ts +7 -0
- package/types/ngwr-charts-calendar-heatmap.d.ts +2 -1
- package/types/ngwr-clipboard.d.ts +7 -0
- package/types/ngwr-date-picker.d.ts +9 -2
- package/types/ngwr-date-stamp-testing.d.ts +47 -0
- package/types/ngwr-date-stamp.d.ts +81 -0
- package/types/ngwr-date.d.ts +135 -24
- package/types/ngwr-dialog-testing.d.ts +10 -0
- package/types/ngwr-dialog.d.ts +72 -4
- package/types/ngwr-directives.d.ts +36 -1
- package/types/ngwr-drawer.d.ts +21 -0
- package/types/ngwr-i18n.d.ts +44 -14
- package/types/ngwr-overlay.d.ts +36 -0
- package/types/ngwr-pipes.d.ts +15 -0
- package/types/ngwr-popover.d.ts +39 -1
- package/types/ngwr-resizable.d.ts +228 -0
- package/types/ngwr-table-testing.d.ts +3 -1
- package/types/ngwr-table.d.ts +120 -4
- package/types/ngwr-toast-testing.d.ts +12 -1
- package/types/ngwr-toast.d.ts +215 -18
- package/types/ngwr-utils-router.d.ts +22 -0
- package/types/ngwr-utils.d.ts +8 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr.d.ts +1 -0
package/types/ngwr-table.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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()`.
|
|
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. */
|
package/types/ngwr-toast.d.ts
CHANGED
|
@@ -58,6 +58,13 @@ interface WrToastOptions {
|
|
|
58
58
|
* screen along with this one.
|
|
59
59
|
*/
|
|
60
60
|
readonly position?: WrToastPosition;
|
|
61
|
+
/**
|
|
62
|
+
* Name of the `<wr-toast-outlet>` that renders this toast in the page, in a
|
|
63
|
+
* stack of its own. Omitted, the toast goes to the global stack in the
|
|
64
|
+
* overlay. A toast sent before its outlet is in the page waits for it, and
|
|
65
|
+
* `position` is ignored: the outlet's own input places the stack.
|
|
66
|
+
*/
|
|
67
|
+
readonly outlet?: string;
|
|
61
68
|
/** Override the progress bar visibility for this toast only. */
|
|
62
69
|
readonly showProgress?: boolean;
|
|
63
70
|
/** Override the copy button visibility for this toast only. */
|
|
@@ -148,7 +155,8 @@ export declare class WrToastRef {
|
|
|
148
155
|
dismiss(): void;
|
|
149
156
|
}
|
|
150
157
|
/**
|
|
151
|
-
* Opens toast notifications in a single shared overlay
|
|
158
|
+
* Opens toast notifications in a single shared overlay, or in the page
|
|
159
|
+
* through a `<wr-toast-outlet>` when `show()` names one.
|
|
152
160
|
*
|
|
153
161
|
* Global defaults come from {@link WR_TOAST_CONFIG}; register
|
|
154
162
|
* `provideWr(withToast(...))` once at bootstrap to customise. Each
|
|
@@ -162,12 +170,14 @@ export declare class WrToastRef {
|
|
|
162
170
|
* toast.show({ type: 'danger', message: 'Network error', duration: 0 });
|
|
163
171
|
* toast.show({ message: 'Permalink copied', position: 'bottom', showCopy: true });
|
|
164
172
|
* toast.show({ message: 'Item deleted', action: { label: 'Undo', run: () => restore() } });
|
|
173
|
+
* toast.show({ type: 'danger', message: 'Door forced', outlet: 'alarms' });
|
|
165
174
|
* ```
|
|
166
175
|
*
|
|
167
176
|
* @see https://ngwr.dev/reference/components/toast
|
|
168
177
|
*/
|
|
169
178
|
export declare class WrToast {
|
|
170
179
|
private readonly overlay;
|
|
180
|
+
private readonly order;
|
|
171
181
|
private readonly config;
|
|
172
182
|
private readonly injector;
|
|
173
183
|
private readonly dir;
|
|
@@ -178,32 +188,29 @@ export declare class WrToast {
|
|
|
178
188
|
private currentPosition;
|
|
179
189
|
private currentMode;
|
|
180
190
|
private nextId;
|
|
181
|
-
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
private queue;
|
|
186
|
-
/** The pointer or focus is inside the host: no countdown runs, a toast that
|
|
187
|
-
* arrives meanwhile included. See `WrToastHost.syncHold`. */
|
|
188
|
-
private held;
|
|
191
|
+
/** The stack in the overlay. Past `maxStack` the newest waits, so nothing is
|
|
192
|
+
* ever silently dropped. */
|
|
193
|
+
private readonly global;
|
|
194
|
+
private readonly outlets;
|
|
189
195
|
/** Open a toast. Returns a handle you can `dismiss()` early. */
|
|
190
196
|
show(options: WrToastOptions): WrToastRef;
|
|
191
|
-
/** Dismiss a single toast by id. */
|
|
197
|
+
/** Dismiss a single toast by id, in whichever stack holds it. */
|
|
192
198
|
dismiss(id: number): void;
|
|
193
199
|
/**
|
|
194
200
|
* Closes first: a second press finds no entry, so `run` cannot fire twice,
|
|
195
201
|
* and a `run` that throws still leaves the toast closed.
|
|
196
202
|
*/
|
|
197
203
|
private runAction;
|
|
198
|
-
/**
|
|
199
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Dismiss every toast of one stack: the global one, or the named outlet's.
|
|
206
|
+
* The global "Close all" button calls it with no name, so it leaves the
|
|
207
|
+
* outlets alone.
|
|
208
|
+
*/
|
|
209
|
+
dismissAll(outlet?: string): void;
|
|
200
210
|
/** Change the corner the stack opens in. Affects future toasts. */
|
|
201
211
|
setPosition(position: WrToastPosition): void;
|
|
202
212
|
/** Switch the layout mode at runtime. Persists across host re-creation. */
|
|
203
213
|
setMode(mode: 'stack' | 'list'): void;
|
|
204
|
-
private startTimer;
|
|
205
|
-
private pauseTimer;
|
|
206
|
-
private setHeld;
|
|
207
214
|
private ensureHost;
|
|
208
215
|
/**
|
|
209
216
|
* Put the host back on top of the browser's top layer.
|
|
@@ -232,6 +239,11 @@ export declare class WrToast {
|
|
|
232
239
|
* previously focused element, and a host the user is already tabbing through
|
|
233
240
|
* is by definition reachable. In practice the two never coincide — a modal
|
|
234
241
|
* traps focus, so focus inside the host means nothing is above it to escape.
|
|
242
|
+
*
|
|
243
|
+
* `WrOverlayOrder` does the move, because "on top" has an exception: an
|
|
244
|
+
* overlay opened with `toasts: 'below'` stays over the host, so it leaves the
|
|
245
|
+
* host alone where it already sits under one and promotes those overlays
|
|
246
|
+
* again where it does not.
|
|
235
247
|
*/
|
|
236
248
|
private raiseHost;
|
|
237
249
|
/**
|
|
@@ -248,14 +260,199 @@ export declare class WrToast {
|
|
|
248
260
|
* popover moves nothing in the DOM, so this cannot re-trigger itself.
|
|
249
261
|
*/
|
|
250
262
|
private watchForNewerOverlays;
|
|
251
|
-
/** Fill any free stack slots from the queue (FIFO), starting each promoted
|
|
252
|
-
* toast's auto-dismiss timer only as it becomes visible. */
|
|
253
|
-
private promoteFromQueue;
|
|
254
263
|
private pushToHost;
|
|
255
264
|
private disposeHost;
|
|
256
265
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrToast, never>;
|
|
257
266
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
258
267
|
}
|
|
268
|
+
/** A toast in a channel, with the bookkeeping its countdown needs. */
|
|
269
|
+
type WrToastEntry = WrToastOptions & {
|
|
270
|
+
readonly id: number;
|
|
271
|
+
/** Auto-dismiss duration in ms after merging with the config. */
|
|
272
|
+
readonly resolvedDuration: number;
|
|
273
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
274
|
+
/** Timestamp of the last timer (re)start, used to compute remaining on pause. */
|
|
275
|
+
startedAt?: number;
|
|
276
|
+
/** Milliseconds left when paused. */
|
|
277
|
+
remaining: number;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* One independent stack of toasts: the global one, or an outlet's.
|
|
281
|
+
*
|
|
282
|
+
* At most one pending timer per visible toast, and every operation is
|
|
283
|
+
* O(`maxStack`), however many toasts have passed through.
|
|
284
|
+
*
|
|
285
|
+
* @internal
|
|
286
|
+
*/
|
|
287
|
+
declare class WrToastChannel {
|
|
288
|
+
private readonly expire;
|
|
289
|
+
private readonly drops;
|
|
290
|
+
private live;
|
|
291
|
+
maxStack: number;
|
|
292
|
+
duration: number;
|
|
293
|
+
/** The rendered toasts, capped at `maxStack`. */
|
|
294
|
+
readonly toasts: import("@angular/core").WritableSignal<readonly WrToastEntry[]>;
|
|
295
|
+
/** How many wait behind the cap. */
|
|
296
|
+
readonly queued: import("@angular/core").WritableSignal<number>;
|
|
297
|
+
private queue;
|
|
298
|
+
/** The pointer or focus is inside the host: no countdown runs, a toast that
|
|
299
|
+
* arrives meanwhile included. See `WrToastHost.syncHold`. */
|
|
300
|
+
private held;
|
|
301
|
+
/** Outlets rendering this channel. */
|
|
302
|
+
private mounts;
|
|
303
|
+
/**
|
|
304
|
+
* @param expire called when a toast's countdown runs out
|
|
305
|
+
* @param drops past the cap the oldest toast is dropped; otherwise the newest waits in a queue
|
|
306
|
+
* @param live `false` until an outlet mounts: a toast nobody can see does not count down
|
|
307
|
+
*/
|
|
308
|
+
constructor(expire: (id: number) => void, drops: boolean, live: boolean, maxStack: number, duration: number);
|
|
309
|
+
get empty(): boolean;
|
|
310
|
+
find(id: number): WrToastEntry | undefined;
|
|
311
|
+
add(entry: WrToastEntry): void;
|
|
312
|
+
/** Whether the toast was in this channel, visible or queued. */
|
|
313
|
+
remove(id: number): boolean;
|
|
314
|
+
clear(): void;
|
|
315
|
+
pause(id: number): void;
|
|
316
|
+
resume(id: number): void;
|
|
317
|
+
setHeld(held: boolean): void;
|
|
318
|
+
/** An outlet's own cap and default duration. A lower cap drops the oldest at once. */
|
|
319
|
+
configure(maxStack: number, duration: number): void;
|
|
320
|
+
/** How many outlets render the channel after this one joined. */
|
|
321
|
+
mount(): number;
|
|
322
|
+
unmount(): void;
|
|
323
|
+
/** Let in what arrived during a hold, in arrival order, the oldest toasts making room. */
|
|
324
|
+
private release;
|
|
325
|
+
private syncTimers;
|
|
326
|
+
/** Fill free slots from the queue, FIFO; a countdown starts as its toast becomes visible. */
|
|
327
|
+
private promote;
|
|
328
|
+
private startTimer;
|
|
329
|
+
private pauseTimer;
|
|
330
|
+
private stopTimer;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Renders a toast stack inside the page instead of the browser's top layer.
|
|
334
|
+
*
|
|
335
|
+
* `WrToast.show({ outlet: 'alarms' })` sends a toast to the outlet of that
|
|
336
|
+
* name. Each name is a stack of its own: its cap, its countdown hold, its
|
|
337
|
+
* "Close all". The global stack is not affected.
|
|
338
|
+
*
|
|
339
|
+
* The outlet fills its nearest positioned ancestor, so give the container
|
|
340
|
+
* `position: relative`. It lets clicks through wherever no toast is, and it
|
|
341
|
+
* carries no `z-index`: order it against its siblings in your own CSS.
|
|
342
|
+
*
|
|
343
|
+
* Past `maxStack` the OLDEST toast is dropped, where the global stack queues
|
|
344
|
+
* the newest, so a busy stream stays at `maxStack` toasts and timers. While
|
|
345
|
+
* the pointer or focus is in the stack nothing shown is dropped: arrivals
|
|
346
|
+
* wait, at most `maxStack` of them, and enter when it leaves. A toast
|
|
347
|
+
* sent while no outlet of the name is in the page waits, without counting
|
|
348
|
+
* down, and shows when the outlet appears.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```html
|
|
352
|
+
* <div class="map" style="position: relative">
|
|
353
|
+
* <wr-toast-outlet name="alarms" position="top" [maxStack]="10" />
|
|
354
|
+
* </div>
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
357
|
+
* ```ts
|
|
358
|
+
* toast.show({ type: 'danger', message: 'Door forced', outlet: 'alarms' });
|
|
359
|
+
* toast.dismissAll('alarms');
|
|
360
|
+
* ```
|
|
361
|
+
*
|
|
362
|
+
* @see https://ngwr.dev/reference/components/toast
|
|
363
|
+
*/
|
|
364
|
+
export declare class WrToastOutlet {
|
|
365
|
+
private readonly config;
|
|
366
|
+
private readonly channels;
|
|
367
|
+
/** The channel this outlet renders: the `outlet` of `WrToast.show()`. */
|
|
368
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
369
|
+
/** Where the stack sits inside the outlet's box. @default the `withToast()` position */
|
|
370
|
+
readonly position: import("@angular/core").InputSignal<WrToastPosition>;
|
|
371
|
+
/** Layout for several toasts: a cascade or a column. @default the `withToast()` mode */
|
|
372
|
+
readonly mode: import("@angular/core").InputSignal<WrToastMode>;
|
|
373
|
+
/** Auto-dismiss in ms for a toast that sets none; `0` disables. @default the `withToast()` duration */
|
|
374
|
+
readonly duration: import("@angular/core").InputSignal<number>;
|
|
375
|
+
/** Render the countdown bar. @default the `withToast()` value */
|
|
376
|
+
readonly showProgress: import("@angular/core").InputSignal<boolean>;
|
|
377
|
+
/** Render a copy button on each toast. @default the `withToast()` value */
|
|
378
|
+
readonly showCopy: import("@angular/core").InputSignal<boolean>;
|
|
379
|
+
/** Render "Close all" once the stack reaches the threshold. @default the `withToast()` value */
|
|
380
|
+
readonly showCloseAll: import("@angular/core").InputSignal<boolean>;
|
|
381
|
+
/** Minimum stack size before "Close all" appears. @default the `withToast()` value */
|
|
382
|
+
readonly closeAllThreshold: import("@angular/core").InputSignal<number>;
|
|
383
|
+
/**
|
|
384
|
+
* Maximum toasts in the stack; `0` is unlimited. Past it the oldest toast is
|
|
385
|
+
* dropped to make room, once the pointer and focus are out of the stack.
|
|
386
|
+
*
|
|
387
|
+
* @default the `withToast()` value
|
|
388
|
+
*/
|
|
389
|
+
readonly maxStack: import("@angular/core").InputSignal<number>;
|
|
390
|
+
protected readonly channel: import("@angular/core").Signal<WrToastChannel>;
|
|
391
|
+
/** The app-wide config with this outlet's own inputs over it. */
|
|
392
|
+
protected readonly resolved: import("@angular/core").Signal<WrToastConfig>;
|
|
393
|
+
private readonly host;
|
|
394
|
+
constructor();
|
|
395
|
+
/** @internal */
|
|
396
|
+
protected onDismissed(id: number): void;
|
|
397
|
+
/** @internal Closes first, like the global stack: `run` cannot fire twice. */
|
|
398
|
+
protected onAction(id: number): void;
|
|
399
|
+
/** @internal */
|
|
400
|
+
protected onDismissAll(): void;
|
|
401
|
+
/**
|
|
402
|
+
* The host reads its list right after it asks for a removal, to decide where
|
|
403
|
+
* focus goes, so a removal it asked for is pushed at once and not on the next
|
|
404
|
+
* render.
|
|
405
|
+
*/
|
|
406
|
+
private push;
|
|
407
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrToastOutlet, never>;
|
|
408
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrToastOutlet, "wr-toast-outlet", never, {
|
|
409
|
+
"name": {
|
|
410
|
+
"alias": "name";
|
|
411
|
+
"required": true;
|
|
412
|
+
"isSignal": true;
|
|
413
|
+
};
|
|
414
|
+
"position": {
|
|
415
|
+
"alias": "position";
|
|
416
|
+
"required": false;
|
|
417
|
+
"isSignal": true;
|
|
418
|
+
};
|
|
419
|
+
"mode": {
|
|
420
|
+
"alias": "mode";
|
|
421
|
+
"required": false;
|
|
422
|
+
"isSignal": true;
|
|
423
|
+
};
|
|
424
|
+
"duration": {
|
|
425
|
+
"alias": "duration";
|
|
426
|
+
"required": false;
|
|
427
|
+
"isSignal": true;
|
|
428
|
+
};
|
|
429
|
+
"showProgress": {
|
|
430
|
+
"alias": "showProgress";
|
|
431
|
+
"required": false;
|
|
432
|
+
"isSignal": true;
|
|
433
|
+
};
|
|
434
|
+
"showCopy": {
|
|
435
|
+
"alias": "showCopy";
|
|
436
|
+
"required": false;
|
|
437
|
+
"isSignal": true;
|
|
438
|
+
};
|
|
439
|
+
"showCloseAll": {
|
|
440
|
+
"alias": "showCloseAll";
|
|
441
|
+
"required": false;
|
|
442
|
+
"isSignal": true;
|
|
443
|
+
};
|
|
444
|
+
"closeAllThreshold": {
|
|
445
|
+
"alias": "closeAllThreshold";
|
|
446
|
+
"required": false;
|
|
447
|
+
"isSignal": true;
|
|
448
|
+
};
|
|
449
|
+
"maxStack": {
|
|
450
|
+
"alias": "maxStack";
|
|
451
|
+
"required": false;
|
|
452
|
+
"isSignal": true;
|
|
453
|
+
};
|
|
454
|
+
}, {}, never, never, true, never>;
|
|
455
|
+
}
|
|
259
456
|
/**
|
|
260
457
|
* Registers a global {@link WrToastConfig} for {@link WrToast}, as a feature of
|
|
261
458
|
* `provideWr()`. Any field you omit falls back to {@link DEFAULT_WR_TOAST_CONFIG};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WritableSignal } from "@angular/core";
|
|
2
|
+
import { WrFeature } from "ngwr/utils";
|
|
2
3
|
/**
|
|
3
4
|
* @license
|
|
4
5
|
*
|
|
@@ -92,4 +93,25 @@ interface WrQueryParamOptions<T> extends Omit<WrQueryParamStringOptions, 'defaul
|
|
|
92
93
|
*/
|
|
93
94
|
export declare function wrQueryParam(name: string, options?: WrQueryParamStringOptions): WritableSignal<string>;
|
|
94
95
|
export declare function wrQueryParam<T>(name: string, options: WrQueryParamOptions<T>): WritableSignal<T>;
|
|
96
|
+
/**
|
|
97
|
+
* `provideWr()` feature: render a routed page in the task that inserted it.
|
|
98
|
+
*
|
|
99
|
+
* Zoneless, the router inserts the new page into the DOM in one task and its
|
|
100
|
+
* first change detection runs in a later one (Angular schedules it as a
|
|
101
|
+
* macrotask, by design: angular/angular#57528). A browser that styles the page
|
|
102
|
+
* in between sees elements without their bound classes and attributes, and any
|
|
103
|
+
* CSS transition on them then fades from the browser's defaults to the app's
|
|
104
|
+
* look on every page switch. Ticking right after `NavigationEnd`, before the
|
|
105
|
+
* task ends, binds the page before the browser paints it. The scheduled tick is
|
|
106
|
+
* cancelled by this one, so nothing runs twice.
|
|
107
|
+
*
|
|
108
|
+
* ngwr's own components carry their base class statically and do not depend on
|
|
109
|
+
* this; it covers the app's own bindings on a routed page.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* provideWr(withRenderOnNavigation())
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
export declare function withRenderOnNavigation(): WrFeature<'render-on-navigation'>;
|
|
95
117
|
export type { WrQueryParamOptions, WrQueryParamStringOptions };
|
package/types/ngwr-utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EnvironmentProviders, Injector, Provider, Resource, Signal } from "@angular/core";
|
|
1
|
+
import { EnvironmentProviders, InjectionToken, Injector, Provider, Resource, Signal } from "@angular/core";
|
|
2
2
|
import { FocusMonitor } from "@angular/cdk/a11y";
|
|
3
3
|
import { Observable } from "rxjs";
|
|
4
4
|
/**
|
|
@@ -985,6 +985,13 @@ interface WrInitialsOptions {
|
|
|
985
985
|
* @see https://ngwr.dev/reference/utils/wr-initials
|
|
986
986
|
*/
|
|
987
987
|
export declare function wrInitials(name: string | null | undefined, locale?: string, options?: WrInitialsOptions): string;
|
|
988
|
+
/**
|
|
989
|
+
* The interface language as a signal, for what has to follow a language switch
|
|
990
|
+
* without importing `ngwr/i18n`: `provideWrI18n()` provides it as
|
|
991
|
+
* `WrI18n.locale`, and `ngwr/date` formats in it. Not provided when the app
|
|
992
|
+
* does not call `provideWrI18n()`, so inject it as optional.
|
|
993
|
+
*/
|
|
994
|
+
export declare const WR_LIVE_LOCALE: InjectionToken<Signal<string>>;
|
|
988
995
|
/**
|
|
989
996
|
* One piece of app-wide configuration, passed to `provideWr()` from `ngwr` —
|
|
990
997
|
* the shape Angular gives `RouterFeature` for `provideRouter(routes, withX())`.
|
package/types/ngwr-version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
15
15
|
* Distinct from `Version` exported by `@angular/core`, which reports the
|
|
16
16
|
* loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
|
|
17
17
|
*/
|
|
18
|
-
export declare const NGWR_VERSION = "16.
|
|
18
|
+
export declare const NGWR_VERSION = "16.1.0";
|
|
19
19
|
/**
|
|
20
20
|
* Injection token holding the ngwr library version string.
|
|
21
21
|
*
|
package/types/ngwr.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { WrFeature } from "ngwr/utils";
|
|
|
16
16
|
* | `withMeta()` | `ngwr/meta` | `<head>` defaults for every route |
|
|
17
17
|
* | `withWindows()` | `ngwr/window` | the work area every floating window keeps inside |
|
|
18
18
|
* | `withDialog()` | `ngwr/dialog` | dialog defaults: the tab title follows the open dialog |
|
|
19
|
+
* | `withRenderOnNavigation()` | `ngwr/utils/router` | a routed page is bound before the browser paints it (zoneless) |
|
|
19
20
|
*
|
|
20
21
|
* Icons and i18n stay calls of their own (`provideWrIcons()`, `provideWrI18n()`
|
|
21
22
|
* and its loaders), because both chain: a route adds icons or catalog keys to
|