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.
- 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 +95 -3
- package/date-stamp/styles/_index.scss +38 -0
- package/dialog/styles/_index.scss +38 -0
- package/dropdown/styles/_index.scss +37 -1
- 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-testing.mjs +18 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +238 -38
- 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 +213 -0
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -0
- package/fesm2022/ngwr-date.mjs +364 -54
- 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-testing.mjs +38 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +362 -26
- 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 +9 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +9 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +9 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +9 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +9 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +9 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +9 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +9 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +9 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +9 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +9 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +9 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +9 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +9 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +9 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +9 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +9 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +9 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +9 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +9 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +9 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +9 -2
- 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-testing.mjs +26 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +255 -15
- 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 +47 -9
- 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-schema-form.mjs +3 -0
- package/fesm2022/ngwr-schema-form.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-testing.mjs +17 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +91 -13
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
- package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sortable-list.mjs +257 -53
- package/fesm2022/ngwr-sortable-list.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 +13 -2
- package/i18n/cs.json +13 -2
- package/i18n/de.json +13 -2
- package/i18n/en.json +13 -2
- package/i18n/es.json +13 -2
- package/i18n/fr.json +13 -2
- package/i18n/he.json +13 -2
- package/i18n/hi.json +13 -2
- package/i18n/id.json +13 -2
- package/i18n/it.json +13 -2
- package/i18n/ja.json +13 -2
- package/i18n/ko.json +13 -2
- package/i18n/nl.json +13 -2
- package/i18n/pl.json +13 -2
- package/i18n/pt.json +13 -2
- package/i18n/ru.json +13 -2
- package/i18n/sv.json +13 -2
- package/i18n/tr.json +13 -2
- package/i18n/uk.json +13 -2
- package/i18n/vi.json +13 -2
- package/i18n/zh-TW.json +13 -2
- package/i18n/zh.json +13 -2
- package/input/styles/_index.scss +10 -5
- package/input-number/styles/_index.scss +6 -3
- package/input-otp/styles/_index.scss +4 -2
- package/lightbox/styles/_rules.scss +96 -0
- package/llms-full.txt +40 -17
- package/llms.txt +20 -4
- package/package.json +19 -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 +5 -0
- package/select/styles/_index.scss +6 -3
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +6 -2
- package/skills/ngwr/references/setup.md +3 -0
- package/slider/styles/_index.scss +106 -0
- package/sortable-list/styles/_rules.scss +23 -1
- 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-testing.d.ts +17 -0
- package/types/ngwr-date-picker.d.ts +88 -4
- package/types/ngwr-date-stamp-testing.d.ts +47 -0
- package/types/ngwr-date-stamp.d.ts +127 -0
- package/types/ngwr-date.d.ts +251 -37
- 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-dropdown-testing.d.ts +53 -5
- package/types/ngwr-dropdown.d.ts +100 -0
- package/types/ngwr-i18n.d.ts +44 -14
- package/types/ngwr-lightbox-testing.d.ts +27 -0
- package/types/ngwr-lightbox.d.ts +71 -6
- package/types/ngwr-overlay.d.ts +36 -0
- package/types/ngwr-pipes.d.ts +48 -13
- package/types/ngwr-popover.d.ts +39 -1
- package/types/ngwr-resizable.d.ts +228 -0
- package/types/ngwr-slider-testing.d.ts +8 -1
- package/types/ngwr-slider.d.ts +89 -3
- package/types/ngwr-sortable-list-testing.d.ts +79 -0
- package/types/ngwr-sortable-list.d.ts +113 -10
- 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-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.2.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
|