ngwr 9.1.0 → 10.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/README.md +23 -8
- package/action-sheet/styles/_index.scss +6 -1
- package/badge/styles/_index.scss +17 -7
- package/badge/styles/_tag.scss +12 -3
- package/border-glow/styles/_index.scss +5 -0
- package/button/styles/_index.scss +48 -1
- package/calendar/styles/_index.scss +9 -1
- package/circular-text/styles/_index.scss +6 -1
- package/density/styles/_index.scss +3 -1
- package/dialog/styles/_index.scss +66 -2
- package/drag-drop/styles/_index.scss +20 -7
- package/drawer/styles/_index.scss +61 -1
- package/event-calendar/styles/_index.scss +284 -0
- package/falling-text/styles/_index.scss +5 -0
- package/fesm2022/ngwr-action-sheet.mjs +1 -1
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +8 -3
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +6 -4
- package/fesm2022/ngwr-back-top.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow.mjs +12 -9
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +5 -3
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +17 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +35 -7
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +12 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +2 -2
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +6 -5
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +7 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +7 -7
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-counter.mjs +9 -1
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +37 -15
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +10 -2
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +5 -4
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +10 -1
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +37 -16
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +8 -3
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +723 -0
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +2 -2
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +2 -2
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +258 -42
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +8 -3
- package/fesm2022/ngwr-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-glitch-text.mjs +2 -2
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text.mjs +2 -2
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +89 -5
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +90 -5
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +94 -3
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +79 -35
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +19 -3
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +48 -6
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +8 -3
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +32 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +3 -3
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-marquee.mjs +2 -2
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -0
- package/fesm2022/ngwr-media.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +166 -10
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meter-group.mjs +14 -3
- package/fesm2022/ngwr-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +173 -3
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +2 -2
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +17 -4
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +4 -3
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +10 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +8 -2
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +6 -4
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +19 -12
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +2 -2
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +40 -13
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +4 -6
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +11 -3
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spotlight-card.mjs +2 -2
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +1 -1
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +2 -2
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +10 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +233 -19
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +21 -4
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +20 -4
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +13 -3
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card.mjs +2 -2
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +2 -2
- package/fesm2022/ngwr-toolbar.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +264 -0
- package/fesm2022/ngwr-tour.mjs.map +1 -0
- package/fesm2022/ngwr-transfer.mjs +184 -0
- package/fesm2022/ngwr-transfer.mjs.map +1 -0
- package/fesm2022/ngwr-tree.mjs +27 -9
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +2 -2
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +118 -2
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +2 -2
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +25 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/form/styles/_index.scss +8 -4
- package/glitch-text/styles/_index.scss +5 -0
- package/gradient-text/styles/_index.scss +5 -0
- package/i18n/en.json +233 -0
- package/i18n/ru.json +233 -0
- package/icon/styles/_index.scss +15 -1
- package/input/styles/_index.scss +16 -0
- package/input-number/styles/_index.scss +8 -1
- package/keyboard/styles/_index.scss +15 -3
- package/llms-full.txt +124 -63
- package/llms.txt +29 -8
- package/loading-bar/styles/_index.scss +5 -0
- package/marquee/styles/_index.scss +7 -2
- package/mention/styles/_index.scss +23 -0
- package/overlay/styles/_index.scss +5 -0
- package/package.json +15 -1
- package/pagination/styles/_index.scss +12 -0
- package/popover/styles/_index.scss +165 -45
- package/pull-to-refresh/styles/_index.scss +5 -0
- package/result/styles/_index.scss +3 -3
- package/schematics/icon-set/index.js +80 -34
- package/schematics/icon-set/schema.json +8 -3
- package/schematics/ng-add/index.js +23 -6
- package/schematics/package.json +3 -0
- package/schematics/page/templates.js +17 -21
- package/schematics/provider/index.js +31 -13
- package/schematics/provider/schema.json +40 -24
- package/schematics/use/index.js +5 -1
- package/schematics/use/schema.json +8 -3
- package/schematics/use/symbol-map.json +7 -176
- package/segmented/styles/_index.scss +1 -1
- package/select/styles/_index.scss +20 -3
- package/shiny-text/styles/_index.scss +5 -0
- package/speed-dial/styles/_index.scss +12 -1
- package/splitter/styles/_index.scss +7 -1
- package/spotlight-card/styles/_index.scss +5 -0
- package/squircle/styles/_index.scss +5 -0
- package/star-border/styles/_index.scss +5 -0
- package/statistic/styles/_index.scss +2 -2
- package/styles/_animations.scss +6 -0
- package/styles.scss +3 -0
- package/table/styles/_index.scss +128 -12
- package/theme/styles/_box-model.scss +29 -0
- package/theme/styles/_colors.scss +116 -15
- package/theme/styles/_dark.scss +65 -7
- package/theme/styles/_focus.scss +2 -8
- package/theme/styles/_index.scss +1 -0
- package/tilt-card/styles/_index.scss +5 -0
- package/toast/styles/_index.scss +6 -3
- package/tour/styles/_index.scss +63 -0
- package/transfer/styles/_index.scss +105 -0
- package/types/ngwr-alert.d.ts +4 -1
- package/types/ngwr-avatar.d.ts +1 -1
- package/types/ngwr-back-top.d.ts +3 -2
- package/types/ngwr-badge.d.ts +1 -1
- package/types/ngwr-border-glow.d.ts +0 -1
- package/types/ngwr-carousel.d.ts +10 -1
- package/types/ngwr-cascader.d.ts +13 -1
- package/types/ngwr-checkbox.d.ts +9 -1
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-command-palette.d.ts +4 -1
- package/types/ngwr-context-menu.d.ts +1 -0
- package/types/ngwr-date-picker.d.ts +14 -4
- package/types/ngwr-density.d.ts +9 -2
- package/types/ngwr-dialog.d.ts +9 -0
- package/types/ngwr-divider.d.ts +1 -1
- package/types/ngwr-drawer.d.ts +20 -4
- package/types/ngwr-dropdown.d.ts +1 -0
- package/types/ngwr-event-calendar.d.ts +358 -0
- package/types/ngwr-form.d.ts +177 -20
- package/types/ngwr-fuzzy-text.d.ts +8 -0
- package/types/ngwr-gauge.d.ts +4 -1
- package/types/ngwr-i18n.d.ts +80 -2
- package/types/ngwr-icon.d.ts +11 -19
- package/types/ngwr-input-number.d.ts +8 -1
- package/types/ngwr-input.d.ts +50 -20
- package/types/ngwr-knob.d.ts +4 -1
- package/types/ngwr-lightbox.d.ts +7 -1
- package/types/ngwr-line-chart.d.ts +1 -1
- package/types/ngwr-media.d.ts +1 -1
- package/types/ngwr-mention.d.ts +45 -1
- package/types/ngwr-meter-group.d.ts +9 -1
- package/types/ngwr-overlay.d.ts +80 -2
- package/types/ngwr-page-header.d.ts +2 -2
- package/types/ngwr-pagination.d.ts +15 -2
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-progress.d.ts +4 -1
- package/types/ngwr-rating.d.ts +3 -2
- package/types/ngwr-result.d.ts +12 -6
- package/types/ngwr-segmented.d.ts +6 -0
- package/types/ngwr-select.d.ts +19 -7
- package/types/ngwr-shiny-text.d.ts +2 -4
- package/types/ngwr-speed-dial.d.ts +7 -1
- package/types/ngwr-squircle.d.ts +1 -1
- package/types/ngwr-switch.d.ts +7 -1
- package/types/ngwr-table.d.ts +126 -6
- package/types/ngwr-tabs.d.ts +1 -4
- package/types/ngwr-textarea.d.ts +8 -1
- package/types/ngwr-theme.d.ts +8 -1
- package/types/ngwr-toolbar.d.ts +2 -2
- package/types/ngwr-tour.d.ts +132 -0
- package/types/ngwr-transfer.d.ts +118 -0
- package/types/ngwr-tree.d.ts +11 -2
- package/types/ngwr-validators.d.ts +62 -2
- package/types/ngwr-version.d.ts +2 -2
- package/types/ngwr-waves.d.ts +10 -0
- package/typewriter/styles/_index.scss +5 -0
- package/typography/styles/_index.scss +3 -3
- package/virtual-scroll/styles/_index.scss +6 -1
- package/waves/styles/_index.scss +26 -0
package/types/ngwr-i18n.d.ts
CHANGED
|
@@ -76,6 +76,12 @@ declare class WrI18n {
|
|
|
76
76
|
private readonly config;
|
|
77
77
|
private readonly loader;
|
|
78
78
|
private readonly storage;
|
|
79
|
+
/**
|
|
80
|
+
* Catalogs registered via `provideWrI18nBaseCatalogs()` — the floor under the
|
|
81
|
+
* loader's own catalogs, so ngwr's built-in strings survive an app that only
|
|
82
|
+
* ships its own keys. @internal
|
|
83
|
+
*/
|
|
84
|
+
private readonly baseCatalogs;
|
|
79
85
|
/** Per-(locale,scope) catalogs, populated by `loadCatalog`. @internal */
|
|
80
86
|
private readonly catalogs;
|
|
81
87
|
/** Bumped after each catalog write so reactive translates recompute. @internal */
|
|
@@ -106,6 +112,11 @@ declare class WrI18n {
|
|
|
106
112
|
t(key: string, params?: WrI18nParams, scope?: string): string;
|
|
107
113
|
/** Reactive translate — re-evaluates on locale or catalog updates. */
|
|
108
114
|
translate(key: string, params?: WrI18nParams, scope?: string): Signal<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Look a key up in the registered base catalogs, later contributions first so
|
|
117
|
+
* a feature can shadow an earlier one.
|
|
118
|
+
*/
|
|
119
|
+
private walkBase;
|
|
109
120
|
private initialLocale;
|
|
110
121
|
private loadCatalog;
|
|
111
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrI18n, never>;
|
|
@@ -179,8 +190,52 @@ declare class WrTDirective {
|
|
|
179
190
|
interface WrI18nLoader {
|
|
180
191
|
load(locale: string, scope: string | null): Observable<WrI18nCatalog>;
|
|
181
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* The active loader.
|
|
195
|
+
*
|
|
196
|
+
* Defaults to one that serves an empty catalog, which is what makes
|
|
197
|
+
* `provideWrI18n()` genuinely optional: every ngwr component routes its
|
|
198
|
+
* built-in strings through `useI18nText` / `readI18nText`, those inject
|
|
199
|
+
* `WrI18n` optionally — and because `WrI18n` is `providedIn: 'root'`, an
|
|
200
|
+
* optional inject still CONSTRUCTS it. Without a default here that construction
|
|
201
|
+
* threw `NG0201: No provider found for WR_I18N_LOADER`, so an app that had
|
|
202
|
+
* simply not configured i18n could not render `<wr-alert>` at all.
|
|
203
|
+
*
|
|
204
|
+
* With the empty catalog, every lookup misses, `t()` hands back the key, and
|
|
205
|
+
* the helpers fall through to the component's own English default — the
|
|
206
|
+
* documented no-i18n behaviour.
|
|
207
|
+
*/
|
|
182
208
|
declare const WR_I18N_LOADER: InjectionToken<WrI18nLoader>;
|
|
183
209
|
|
|
210
|
+
/**
|
|
211
|
+
* @license
|
|
212
|
+
*
|
|
213
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
214
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/** Base catalogs keyed by locale, contributed by {@link provideWrI18nBaseCatalogs}. */
|
|
218
|
+
type WrI18nBaseCatalogs = Readonly<Record<string, WrI18nCatalog>>;
|
|
219
|
+
/**
|
|
220
|
+
* Catalogs consulted *underneath* whatever the loader returned — the place for
|
|
221
|
+
* ngwr's own built-in strings.
|
|
222
|
+
*
|
|
223
|
+
* A loader **replaces** the catalog for a locale rather than extending it, so an
|
|
224
|
+
* app whose JSON holds only its own keys used to lose every built-in label to
|
|
225
|
+
* its hardcoded English fallback, silently. Registering `wrRu` / `wrEn` here
|
|
226
|
+
* puts them back without the app having to merge anything itself.
|
|
227
|
+
*
|
|
228
|
+
* `multi`, so several features can each contribute; later contributions win on
|
|
229
|
+
* a key collision, and anything the loader returned still wins over all of them.
|
|
230
|
+
*
|
|
231
|
+
* It has to be handed in by the consumer rather than wired up inside
|
|
232
|
+
* `provideWrI18n()`: the catalogs are their own entry points (`ngwr/i18n/ru`)
|
|
233
|
+
* and they already import from `ngwr/i18n`, so importing them back here is a
|
|
234
|
+
* circular entry-point dependency that ng-packagr rejects outright. Passing
|
|
235
|
+
* them in also keeps the locales you don't ship out of your bundle.
|
|
236
|
+
*/
|
|
237
|
+
declare const WR_I18N_BASE_CATALOGS: InjectionToken<readonly Readonly<Record<string, WrI18nCatalog>>[]>;
|
|
238
|
+
|
|
184
239
|
/**
|
|
185
240
|
* @license
|
|
186
241
|
*
|
|
@@ -270,6 +325,29 @@ declare function provideWrI18n(options?: ProvideWrI18nOptions): EnvironmentProvi
|
|
|
270
325
|
* @param scopes Optional per-scope catalogs served to `registerScope(name)`.
|
|
271
326
|
*/
|
|
272
327
|
declare function provideWrI18nStaticLoader(catalogs: WrI18nStaticCatalogs, scopes?: WrI18nStaticScopedCatalogs): Provider;
|
|
328
|
+
/**
|
|
329
|
+
* Register catalogs consulted *underneath* the loader — this is how ngwr's own
|
|
330
|
+
* built-in strings survive when you supply your own catalogs.
|
|
331
|
+
*
|
|
332
|
+
* A loader replaces the catalog for a locale instead of extending it, so a JSON
|
|
333
|
+
* file holding only your keys leaves every built-in label on its hardcoded
|
|
334
|
+
* English fallback, with nothing logged. One line fixes it, on either loader:
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* import { wrRu } from 'ngwr/i18n/ru';
|
|
339
|
+
*
|
|
340
|
+
* providers: [
|
|
341
|
+
* provideWrI18n({ defaultLocale: 'ru', availableLocales: ['ru'] }),
|
|
342
|
+
* provideWrI18nBaseCatalogs({ ru: wrRu }),
|
|
343
|
+
* provideWrI18nHttpLoader({ path: '/assets/i18n/{locale}.json' }),
|
|
344
|
+
* ]
|
|
345
|
+
* ```
|
|
346
|
+
*
|
|
347
|
+
* Pass only the locales you ship — the ones you leave out stay out of the
|
|
348
|
+
* bundle. Your own keys always win; this is a floor, not an override.
|
|
349
|
+
*/
|
|
350
|
+
declare function provideWrI18nBaseCatalogs(catalogs: WrI18nBaseCatalogs): Provider;
|
|
273
351
|
/** Provide an HTTP loader — catalogs fetched from URLs. Requires `provideHttpClient`. */
|
|
274
352
|
declare function provideWrI18nHttpLoader(config: WrI18nHttpLoaderConfig): Provider;
|
|
275
353
|
|
|
@@ -332,5 +410,5 @@ declare function readI18nText(key: string, fallback: string): string;
|
|
|
332
410
|
*/
|
|
333
411
|
declare function useI18nFormatter(key: string, fallback: string): (params?: WrI18nParams) => string;
|
|
334
412
|
|
|
335
|
-
export { DEFAULT_WR_I18N_CONFIG, WR_I18N_CONFIG, WR_I18N_LOADER, WrI18n, WrI18nHttpLoader, WrI18nStaticLoader, WrTDirective, WrTPipe, provideWrI18n, provideWrI18nHttpLoader, provideWrI18nStaticLoader, readI18nText, useI18nFormatter, useI18nText };
|
|
336
|
-
export type { ProvideWrI18nOptions, WrI18nCatalog, WrI18nConfig, WrI18nConfigResolved, WrI18nHttpLoaderConfig, WrI18nLoader, WrI18nMissingHandler, WrI18nParams, WrI18nStaticCatalogs, WrI18nStaticScopedCatalogs };
|
|
413
|
+
export { DEFAULT_WR_I18N_CONFIG, WR_I18N_BASE_CATALOGS, WR_I18N_CONFIG, WR_I18N_LOADER, WrI18n, WrI18nHttpLoader, WrI18nStaticLoader, WrTDirective, WrTPipe, provideWrI18n, provideWrI18nBaseCatalogs, provideWrI18nHttpLoader, provideWrI18nStaticLoader, readI18nText, useI18nFormatter, useI18nText };
|
|
414
|
+
export type { ProvideWrI18nOptions, WrI18nBaseCatalogs, WrI18nCatalog, WrI18nConfig, WrI18nConfigResolved, WrI18nHttpLoaderConfig, WrI18nLoader, WrI18nMissingHandler, WrI18nParams, WrI18nStaticCatalogs, WrI18nStaticScopedCatalogs };
|
package/types/ngwr-icon.d.ts
CHANGED
|
@@ -18,28 +18,20 @@ declare class WrIcon {
|
|
|
18
18
|
readonly name: i0.InputSignal<string>;
|
|
19
19
|
private readonly host;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* injector
|
|
23
|
-
* (app/lazy-route bootstrap) as the base.
|
|
21
|
+
* Every icon visible from this position, walked up the whole chain of
|
|
22
|
+
* registering injector levels.
|
|
24
23
|
*
|
|
25
|
-
* Angular's
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
24
|
+
* Angular's `inject(WR_ICONS)` returns only the **closest** injector's
|
|
25
|
+
* contribution — `multi` providers are not merged across levels — so a
|
|
26
|
+
* component that registers its own icons used to shadow, not extend, what an
|
|
27
|
+
* ancestor registered. {@link WrIconRegistry} is provided once per
|
|
28
|
+
* registering level and links to its parent, so nesting any number of levels
|
|
29
|
+
* now adds up, with the nearest registration winning a name collision.
|
|
31
30
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* provider exists both calls return the same array reference and we
|
|
35
|
-
* skip the redundant pass. Otherwise we lay element on top of env so
|
|
36
|
-
* a page's local icons can override a root-registered name.
|
|
37
|
-
*
|
|
38
|
-
* One known limitation: multiple element-injector levels in between
|
|
39
|
-
* still shadow each other — but the showcase doesn't nest providers
|
|
40
|
-
* that deep, and the env+local merge fixes the dominant case.
|
|
31
|
+
* Optional: with no `provideWrIcons()` anywhere the map is simply empty and
|
|
32
|
+
* every name reports as unregistered.
|
|
41
33
|
*/
|
|
42
|
-
private readonly
|
|
34
|
+
private readonly iconRegistry;
|
|
43
35
|
private readonly registry;
|
|
44
36
|
private readonly icon;
|
|
45
37
|
constructor();
|
|
@@ -44,6 +44,13 @@ declare class WrInputNumber implements FormValueControl<number | null> {
|
|
|
44
44
|
readonly suffix: _angular_core.InputSignal<string>;
|
|
45
45
|
/** Placeholder shown when the input is empty. */
|
|
46
46
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Accessible name for the field. Falls back to the placeholder — inside a
|
|
49
|
+
* `<wr-form-field>` the projected `wrInput` picks up the label's id and needs
|
|
50
|
+
* neither, but standalone the text field has no name at all.
|
|
51
|
+
*/
|
|
52
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
53
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string | null>;
|
|
47
54
|
/** Disable interaction. @default false */
|
|
48
55
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
49
56
|
/** Read-only — values cannot be changed (steppers + typing disabled). @default false */
|
|
@@ -77,7 +84,7 @@ declare class WrInputNumber implements FormValueControl<number | null> {
|
|
|
77
84
|
/** Format a value using `Intl.NumberFormat` for the active locale. */
|
|
78
85
|
private format;
|
|
79
86
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputNumber, never>;
|
|
80
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputNumber, "wr-input-number", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "showSteppers": { "alias": "showSteppers"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
87
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputNumber, "wr-input-number", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "showSteppers": { "alias": "showSteppers"; "required": false; "isSignal": true; }; "prefix": { "alias": "prefix"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
export { WrInputNumber };
|
package/types/ngwr-input.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -7,7 +7,7 @@ import * as i0 from '@angular/core';
|
|
|
7
7
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
* Native input `type` values supported by
|
|
10
|
+
* Native input `type` values supported by ``input[wrInput]``.
|
|
11
11
|
*/
|
|
12
12
|
type WrInputType = 'text' | 'number' | 'password' | 'email' | 'search' | 'tel' | 'url';
|
|
13
13
|
|
|
@@ -42,16 +42,40 @@ type WrInputSize = 'sm' | 'md' | 'lg';
|
|
|
42
42
|
* @see https://ngwr.dev/reference/components/input
|
|
43
43
|
*/
|
|
44
44
|
declare class WrInput {
|
|
45
|
+
private readonly host;
|
|
46
|
+
private readonly field;
|
|
47
|
+
/**
|
|
48
|
+
* Read once, at construction: a static `id=""` in the template is already on
|
|
49
|
+
* the element by the time a directive is instantiated, and it must win over
|
|
50
|
+
* the field's generated one.
|
|
51
|
+
*/
|
|
52
|
+
private readonly ownId;
|
|
53
|
+
/**
|
|
54
|
+
* Adopts the surrounding `<wr-form-field>`'s `controlId`, so the label it
|
|
55
|
+
* already rendered actually points at this element. Without this the `for`
|
|
56
|
+
* referenced an id that existed nowhere and the input had no label at all.
|
|
57
|
+
*/
|
|
58
|
+
protected readonly resolvedId: _angular_core.Signal<string | null>;
|
|
59
|
+
/**
|
|
60
|
+
* Announced state, taken from the surrounding `<wr-form-field>`.
|
|
61
|
+
*
|
|
62
|
+
* The field renders the message but cannot reach the projected control, so
|
|
63
|
+
* the control reads back: without this the error is visible on screen and
|
|
64
|
+
* invisible to a screen reader, which never learns the field is invalid or
|
|
65
|
+
* what the message says.
|
|
66
|
+
*/
|
|
67
|
+
protected readonly ariaInvalid: _angular_core.Signal<"true" | null>;
|
|
68
|
+
protected readonly describedBy: _angular_core.Signal<string | null>;
|
|
45
69
|
/**
|
|
46
70
|
* Control size. Named `wrSize` (not `size`) so it never clashes with the
|
|
47
71
|
* native `<input size>` attribute. @default 'md'
|
|
48
72
|
*/
|
|
49
|
-
readonly wrSize:
|
|
73
|
+
readonly wrSize: _angular_core.InputSignal<WrInputSize>;
|
|
50
74
|
/** Pill-shaped corners. @default false */
|
|
51
|
-
readonly rounded:
|
|
52
|
-
protected readonly classes:
|
|
53
|
-
static ɵfac:
|
|
54
|
-
static ɵdir:
|
|
75
|
+
readonly rounded: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
76
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
77
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInput, never>;
|
|
78
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrInput, "input[wrInput], textarea[wrInput]", never, { "wrSize": { "alias": "wrSize"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
55
79
|
}
|
|
56
80
|
|
|
57
81
|
/**
|
|
@@ -68,8 +92,8 @@ declare class WrInput {
|
|
|
68
92
|
* ```
|
|
69
93
|
*/
|
|
70
94
|
declare class WrInputPrefix {
|
|
71
|
-
static ɵfac:
|
|
72
|
-
static ɵdir:
|
|
95
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputPrefix, never>;
|
|
96
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrInputPrefix, "[wrInputPrefix]", never, {}, {}, never, never, true, never>;
|
|
73
97
|
}
|
|
74
98
|
|
|
75
99
|
/**
|
|
@@ -86,8 +110,8 @@ declare class WrInputPrefix {
|
|
|
86
110
|
* ```
|
|
87
111
|
*/
|
|
88
112
|
declare class WrInputSuffix {
|
|
89
|
-
static ɵfac:
|
|
90
|
-
static ɵdir:
|
|
113
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputSuffix, never>;
|
|
114
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<WrInputSuffix, "[wrInputSuffix]", never, {}, {}, never, never, true, never>;
|
|
91
115
|
}
|
|
92
116
|
|
|
93
117
|
/**
|
|
@@ -112,10 +136,10 @@ declare class WrInputSuffix {
|
|
|
112
136
|
*/
|
|
113
137
|
declare class WrInputGroup {
|
|
114
138
|
/** Pill-shaped corners. @default false */
|
|
115
|
-
readonly rounded:
|
|
116
|
-
protected readonly classes:
|
|
117
|
-
static ɵfac:
|
|
118
|
-
static ɵcmp:
|
|
139
|
+
readonly rounded: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
140
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrInputGroup, never>;
|
|
142
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrInputGroup, "wr-input-group", never, { "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
119
143
|
}
|
|
120
144
|
|
|
121
145
|
/**
|
|
@@ -133,12 +157,18 @@ declare class WrInputGroup {
|
|
|
133
157
|
*/
|
|
134
158
|
declare class WrPasswordToggle {
|
|
135
159
|
/** Reference to the linked password input. */
|
|
136
|
-
readonly for:
|
|
137
|
-
protected readonly revealed:
|
|
138
|
-
|
|
160
|
+
readonly for: _angular_core.InputSignal<HTMLInputElement>;
|
|
161
|
+
protected readonly revealed: _angular_core.WritableSignal<boolean>;
|
|
162
|
+
/** Accessible name while the password is hidden. Falls back to `input.showPassword`. */
|
|
163
|
+
readonly showLabel: _angular_core.InputSignal<string | null>;
|
|
164
|
+
/** Accessible name while the password is revealed. Falls back to `input.hidePassword`. */
|
|
165
|
+
readonly hideLabel: _angular_core.InputSignal<string | null>;
|
|
166
|
+
private readonly resolvedShowLabel;
|
|
167
|
+
private readonly resolvedHideLabel;
|
|
168
|
+
protected readonly ariaLabel: _angular_core.Signal<string>;
|
|
139
169
|
protected toggle(): void;
|
|
140
|
-
static ɵfac:
|
|
141
|
-
static ɵcmp:
|
|
170
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrPasswordToggle, never>;
|
|
171
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrPasswordToggle, "wr-password-toggle", never, { "for": { "alias": "for"; "required": true; "isSignal": true; }; "showLabel": { "alias": "showLabel"; "required": false; "isSignal": true; }; "hideLabel": { "alias": "hideLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
142
172
|
}
|
|
143
173
|
|
|
144
174
|
export { WrInput, WrInputGroup, WrInputPrefix, WrInputSuffix, WrPasswordToggle };
|
package/types/ngwr-knob.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ import { FormValueControl } from '@angular/forms/signals';
|
|
|
21
21
|
* @see https://ngwr.dev/reference/components/knob
|
|
22
22
|
*/
|
|
23
23
|
declare class WrKnob implements FormValueControl<number> {
|
|
24
|
+
/** Accessible name — the role needs one. Falls back to `knob.label`. */
|
|
25
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
26
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
24
27
|
/** Minimum allowed value. @default 0 */
|
|
25
28
|
readonly min: _angular_core.InputSignalWithTransform<number | undefined, unknown>;
|
|
26
29
|
/** Maximum allowed value. @default 100 */
|
|
@@ -76,7 +79,7 @@ declare class WrKnob implements FormValueControl<number> {
|
|
|
76
79
|
private commit;
|
|
77
80
|
private arcPath;
|
|
78
81
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrKnob, never>;
|
|
79
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrKnob, "wr-knob", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "trackColor": { "alias": "trackColor"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
82
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrKnob, "wr-knob", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "trackColor": { "alias": "trackColor"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
export { WrKnob };
|
package/types/ngwr-lightbox.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ import { TemplateRef } from '@angular/core';
|
|
|
19
19
|
* @see https://ngwr.dev/reference/components/lightbox
|
|
20
20
|
*/
|
|
21
21
|
declare class WrLightbox {
|
|
22
|
+
/** Accessible name. Falls back to `image.close`, then `'Close preview'`. */
|
|
23
|
+
readonly closeLabel: _angular_core.InputSignal<string | null>;
|
|
24
|
+
protected readonly resolvedCloseLabel: _angular_core.Signal<string>;
|
|
22
25
|
/** Image source. */
|
|
23
26
|
readonly src: _angular_core.InputSignal<string>;
|
|
24
27
|
/** Alt text. Required for a11y; falls back to an empty string. @default '' */
|
|
@@ -44,6 +47,9 @@ declare class WrLightbox {
|
|
|
44
47
|
private readonly overlay;
|
|
45
48
|
private readonly vcr;
|
|
46
49
|
private readonly destroyRef;
|
|
50
|
+
private readonly focusTrapFactory;
|
|
51
|
+
private focusTrap;
|
|
52
|
+
private previouslyFocused;
|
|
47
53
|
private overlayRef;
|
|
48
54
|
constructor();
|
|
49
55
|
protected onClick(): void;
|
|
@@ -57,7 +63,7 @@ declare class WrLightbox {
|
|
|
57
63
|
private openOverlay;
|
|
58
64
|
private closeOverlay;
|
|
59
65
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrLightbox, never>;
|
|
60
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrLightbox, "wr-lightbox", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; "disablePreview": { "alias": "disablePreview"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
66
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrLightbox, "wr-lightbox", never, { "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": true; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "preview": { "alias": "preview"; "required": false; "isSignal": true; }; "disablePreview": { "alias": "disablePreview"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "aspectRatio": { "alias": "aspectRatio"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
export { WrLightbox };
|
|
@@ -12,7 +12,7 @@ interface WrLineSeries {
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```html
|
|
15
|
-
* <wr-
|
|
15
|
+
* <wr-line-chart
|
|
16
16
|
* [series]="[
|
|
17
17
|
* { label: 'Visits', data: [12, 18, 9, 22, 30, 27, 35] },
|
|
18
18
|
* { label: 'Signups', data: [3, 5, 4, 8, 11, 9, 14], color: 'var(--wr-color-success)' }
|
package/types/ngwr-media.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { InjectionToken, Signal, EnvironmentProviders } from '@angular/core';
|
|
|
3
3
|
import * as ngwr_media from 'ngwr/media';
|
|
4
4
|
|
|
5
5
|
/** Named breakpoint identifiers — match the SCSS `_breakpoints.scss` keys. */
|
|
6
|
-
type WrBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
6
|
+
type WrBreakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xga' | 'fhd' | 'rt';
|
|
7
7
|
/** Map of breakpoint → minimum viewport width in pixels. */
|
|
8
8
|
type WrBreakpointMap = Readonly<Record<WrBreakpoint, number>>;
|
|
9
9
|
|
package/types/ngwr-mention.d.ts
CHANGED
|
@@ -62,12 +62,43 @@ declare class WrMention<T extends WrMentionItem = WrMentionItem> {
|
|
|
62
62
|
private readonly overlay;
|
|
63
63
|
private readonly scrollStrategies;
|
|
64
64
|
private readonly destroyRef;
|
|
65
|
+
private readonly isBrowser;
|
|
65
66
|
private overlayRef;
|
|
66
67
|
private panelRef;
|
|
67
68
|
private state;
|
|
68
69
|
private readonly activeIndex;
|
|
69
70
|
private readonly filteredItems;
|
|
71
|
+
private readonly isOpen;
|
|
72
|
+
/** @internal — read by the `aria-controls` host binding. */
|
|
73
|
+
protected readonly listboxId: string;
|
|
74
|
+
private readonly listLabel;
|
|
75
|
+
private readonly availableText;
|
|
76
|
+
private readonly insertedText;
|
|
77
|
+
/**
|
|
78
|
+
* `aria-activedescendant`, or `null`.
|
|
79
|
+
*
|
|
80
|
+
* Gated hard on `isOpen()`, which is only set once the panel's options are
|
|
81
|
+
* actually in the DOM. An id that resolves to nothing is an author error, and
|
|
82
|
+
* the failure mode is silent: the browser does not complain, it simply stops
|
|
83
|
+
* firing the event that makes a screen reader speak the option. Same
|
|
84
|
+
* discipline `tree.ts` uses for its virtualized rows.
|
|
85
|
+
*/
|
|
86
|
+
protected readonly activeOptionId: _angular_core.Signal<string | null>;
|
|
87
|
+
/**
|
|
88
|
+
* Polite live region, parked on `<body>`.
|
|
89
|
+
*
|
|
90
|
+
* Not inside the panel: `close()` disposes the overlay on every keystroke that
|
|
91
|
+
* leaves a mention, so a region living there would be recreated constantly —
|
|
92
|
+
* and a live region has to be in the DOM *before* its text changes to be
|
|
93
|
+
* announced at all. It also could not announce the two cases that matter most,
|
|
94
|
+
* since in both the panel is already gone: "nothing matched" and "inserted X".
|
|
95
|
+
*
|
|
96
|
+
* Not a sibling of the host either — that would land inside the consumer's
|
|
97
|
+
* markup and start matching their `+`, `~` and `:nth-child()` selectors.
|
|
98
|
+
*/
|
|
99
|
+
private liveRegion;
|
|
70
100
|
constructor();
|
|
101
|
+
private announce;
|
|
71
102
|
/** @internal */
|
|
72
103
|
protected onInput(): void;
|
|
73
104
|
/** @internal */
|
|
@@ -97,13 +128,26 @@ declare class WrMentionPanel {
|
|
|
97
128
|
readonly items: _angular_core.InputSignal<readonly WrMentionItem[]>;
|
|
98
129
|
readonly activeIndex: _angular_core.InputSignal<number>;
|
|
99
130
|
readonly displayWith: _angular_core.InputSignal<(item: WrMentionItem) => string>;
|
|
131
|
+
/**
|
|
132
|
+
* Id of the `<ul role="listbox">`, minted by the directive and pointed at by
|
|
133
|
+
* its `aria-controls`. Owned there rather than here because the panel is
|
|
134
|
+
* disposed and rebuilt whenever the caret leaves a mention, while the
|
|
135
|
+
* attribute on the host has to stay put.
|
|
136
|
+
*
|
|
137
|
+
* Plain `input('')`, never `input.required` — a ComponentPortal-created
|
|
138
|
+
* component throws on the first change detection if a required input is unset.
|
|
139
|
+
*/
|
|
140
|
+
readonly listboxId: _angular_core.InputSignal<string>;
|
|
141
|
+
/** Accessible name for the listbox. ARIA requires one; the directive supplies it from the catalog. */
|
|
142
|
+
readonly listLabel: _angular_core.InputSignal<string>;
|
|
143
|
+
protected optionId(index: number): string;
|
|
100
144
|
/** Emitted when the user picks an item (click). */
|
|
101
145
|
readonly picked: _angular_core.OutputEmitterRef<WrMentionItem>;
|
|
102
146
|
/** Emitted on mouseenter — used by the directive to track hover. */
|
|
103
147
|
readonly hovered: _angular_core.OutputEmitterRef<number>;
|
|
104
148
|
protected onPick(item: WrMentionItem, event: MouseEvent): void;
|
|
105
149
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrMentionPanel, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMentionPanel, "wr-mention-panel", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; }, { "picked": "picked"; "hovered": "hovered"; }, never, never, true, never>;
|
|
150
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMentionPanel, "wr-mention-panel", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; "listboxId": { "alias": "listboxId"; "required": false; "isSignal": true; }; "listLabel": { "alias": "listLabel"; "required": false; "isSignal": true; }; }, { "picked": "picked"; "hovered": "hovered"; }, never, never, true, never>;
|
|
107
151
|
}
|
|
108
152
|
|
|
109
153
|
export { WrMention, WrMentionPanel };
|
|
@@ -35,6 +35,9 @@ interface WrMeterSegment {
|
|
|
35
35
|
* @see https://ngwr.dev/reference/components/meter-group
|
|
36
36
|
*/
|
|
37
37
|
declare class WrMeterGroup {
|
|
38
|
+
/** Accessible name — the role needs one. Falls back to `meterGroup.label`. */
|
|
39
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
40
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
38
41
|
readonly segments: _angular_core.InputSignal<readonly WrMeterSegment[]>;
|
|
39
42
|
/** Explicit total. When `0` (default), `max = sum(values)`. @default 0 */
|
|
40
43
|
readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
@@ -43,6 +46,11 @@ declare class WrMeterGroup {
|
|
|
43
46
|
/** Show each segment's percent value in the legend. @default true */
|
|
44
47
|
readonly showValues: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
45
48
|
protected readonly resolvedMax: _angular_core.Signal<number>;
|
|
49
|
+
/**
|
|
50
|
+
* Sum of the segments, for `aria-valuenow`. `role="progressbar"` without it
|
|
51
|
+
* announces no value at all, so the bar was invisible to assistive tech.
|
|
52
|
+
*/
|
|
53
|
+
protected readonly totalValue: _angular_core.Signal<number>;
|
|
46
54
|
protected readonly slices: _angular_core.Signal<{
|
|
47
55
|
label: string;
|
|
48
56
|
value: number;
|
|
@@ -50,7 +58,7 @@ declare class WrMeterGroup {
|
|
|
50
58
|
percent: number;
|
|
51
59
|
}[]>;
|
|
52
60
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrMeterGroup, never>;
|
|
53
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMeterGroup, "wr-meter-group", never, { "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
61
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrMeterGroup, "wr-meter-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "showValues": { "alias": "showValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
export { WrMeterGroup };
|
package/types/ngwr-overlay.d.ts
CHANGED
|
@@ -1,7 +1,85 @@
|
|
|
1
|
-
import { OverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
1
|
+
import { OverlayRef, OverlayContainer, Overlay } from '@angular/cdk/overlay';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import * as i0 from '@angular/core';
|
|
3
4
|
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
*
|
|
9
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Appends a dismiss (✕) button to a service-opened overlay panel.
|
|
14
|
+
*
|
|
15
|
+
* `WrDialog` and `WrDrawerManager` build their panel around a component the
|
|
16
|
+
* consumer supplies, so there is no template of their own to put a corner button
|
|
17
|
+
* in — they call this instead. Component-driven overlays (`<wr-drawer>`) render
|
|
18
|
+
* the same markup in their template.
|
|
19
|
+
*
|
|
20
|
+
* Uses `host.ownerDocument` rather than the global `document`, so it carries no
|
|
21
|
+
* hidden browser-only assumption; callers still gate on the platform because
|
|
22
|
+
* they have nothing to append to on the server.
|
|
23
|
+
*
|
|
24
|
+
* @param host Panel element the button is appended to (and positioned against).
|
|
25
|
+
* @param className BEM class for the button, e.g. `wr-dialog__close`.
|
|
26
|
+
* @param label Accessible name — already localized by the caller.
|
|
27
|
+
* @param onClose Invoked on click.
|
|
28
|
+
*/
|
|
29
|
+
declare function wrAppendOverlayClose(host: HTMLElement, className: string, label: string, onClose: () => void): HTMLButtonElement;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
*
|
|
34
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
35
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Outside-click source for overlays — a drop-in replacement for
|
|
40
|
+
* `OverlayRef.outsidePointerEvents()`.
|
|
41
|
+
*
|
|
42
|
+
* **Why this exists.** CDK's `OverlayOutsideClickDispatcher` binds its
|
|
43
|
+
* listeners to `document.body`. When page content is shorter than the viewport,
|
|
44
|
+
* a click in the empty space below it targets `<html>` — and `<html>` is
|
|
45
|
+
* `body`'s *parent*, so the event bubbles straight to the document and `body`
|
|
46
|
+
* never sees it. The overlay silently stays open. Listening on the document
|
|
47
|
+
* itself catches both cases, and costs nothing else.
|
|
48
|
+
*
|
|
49
|
+
* Semantics are otherwise identical to the CDK's, deliberately:
|
|
50
|
+
*
|
|
51
|
+
* - Emits on `click` / `auxclick` / `contextmenu`, in the capture phase, and
|
|
52
|
+
* tracks `pointerdown` so a `click` is judged by where the press *started*
|
|
53
|
+
* (a drag that ends outside the pane doesn't count as an outside click).
|
|
54
|
+
* - Walks watchers top-most first and stops at the first one that contains the
|
|
55
|
+
* event, so clicking inside a stacked overlay can't close the ones beneath
|
|
56
|
+
* it (a `wr-select` opened inside a `wr-popover`, say).
|
|
57
|
+
* - Fires for the very click that opened the overlay, which is why every caller
|
|
58
|
+
* also ignores events landing on its own trigger.
|
|
59
|
+
*
|
|
60
|
+
* Registration is per subscription: the document listeners go up with the first
|
|
61
|
+
* watcher and come down with the last, so an app with no open overlay has none.
|
|
62
|
+
*/
|
|
63
|
+
declare class WrOutsideClick {
|
|
64
|
+
private readonly doc;
|
|
65
|
+
private readonly isBrowser;
|
|
66
|
+
/** In attach order — last is top-most. */
|
|
67
|
+
private readonly watchers;
|
|
68
|
+
private cleanup;
|
|
69
|
+
private pressOrigin;
|
|
70
|
+
/**
|
|
71
|
+
* Emits every `click` / `auxclick` / `contextmenu` that lands outside the
|
|
72
|
+
* given overlay's pane, for as long as the returned observable is subscribed.
|
|
73
|
+
*/
|
|
74
|
+
outsidePointerEvents(overlayRef: OverlayRef): Observable<MouseEvent>;
|
|
75
|
+
private readonly onPointerDown;
|
|
76
|
+
private readonly onClick;
|
|
77
|
+
private listen;
|
|
78
|
+
private unlisten;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrOutsideClick, never>;
|
|
80
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WrOutsideClick>;
|
|
81
|
+
}
|
|
82
|
+
|
|
5
83
|
/**
|
|
6
84
|
* @license
|
|
7
85
|
*
|
|
@@ -175,4 +253,4 @@ declare const WR_OVERLAY: InjectionToken<Overlay>;
|
|
|
175
253
|
*/
|
|
176
254
|
declare const WR_OVERLAY_CONTAINER: InjectionToken<OverlayContainer>;
|
|
177
255
|
|
|
178
|
-
export { WR_OVERLAY, WR_OVERLAY_CONTAINER, WR_RESPONSIVE_OVERLAYS, WrOverlayContainer, provideWrOverlay, provideWrResponsiveOverlays, wrPresentAsSheet };
|
|
256
|
+
export { WR_OVERLAY, WR_OVERLAY_CONTAINER, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, WrOverlayContainer, provideWrOverlay, provideWrResponsiveOverlays, wrAppendOverlayClose, wrPresentAsSheet };
|
|
@@ -11,8 +11,8 @@ import * as _angular_core from '@angular/core';
|
|
|
11
11
|
* <wr-page-header title="Settings" subtitle="Manage your workspace">
|
|
12
12
|
* <nav wrPageHeaderBreadcrumbs>…</nav>
|
|
13
13
|
* <div wrPageHeaderActions>
|
|
14
|
-
* <button
|
|
15
|
-
* <button
|
|
14
|
+
* <button wr-btn>Invite</button>
|
|
15
|
+
* <button wr-btn color="primary">Save</button>
|
|
16
16
|
* </div>
|
|
17
17
|
* <div wrPageHeaderExtra>
|
|
18
18
|
* <wr-tag>v2.4</wr-tag>
|