ngwr 10.0.0 → 10.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/README.md +9 -8
- package/action-sheet/styles/_index.scss +6 -1
- package/alert/styles/_index.scss +7 -3
- package/badge/styles/_index.scss +1 -1
- package/badge/styles/_tag.scss +2 -2
- package/border-glow/styles/_index.scss +5 -0
- package/breadcrumbs/styles/_index.scss +1 -1
- package/button/styles/_index.scss +6 -6
- 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 +1 -2
- package/drag-drop/styles/_index.scss +20 -7
- package/event-calendar/styles/_index.scss +284 -0
- package/falling-text/styles/_index.scss +5 -0
- 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 +31 -4
- 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-command-palette.mjs +7 -3
- package/fesm2022/ngwr-command-palette.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 +23 -6
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-descriptions.mjs +5 -4
- package/fesm2022/ngwr-descriptions.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +4 -0
- 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 +73 -5
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +73 -5
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +20 -2
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +5 -0
- 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-meter-group.mjs +14 -3
- package/fesm2022/ngwr-meter-group.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 +1 -1
- package/fesm2022/ngwr-pagination.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 +28 -8
- 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-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 +23 -6
- 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 +2 -2
- 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 +74 -6
- package/i18n/ru.json +74 -6
- package/icon/styles/_index.scss +5 -0
- package/keyboard/styles/_index.scss +5 -0
- package/llms-full.txt +123 -62
- package/llms.txt +29 -8
- package/loading-bar/styles/_index.scss +5 -0
- package/marquee/styles/_index.scss +7 -2
- package/overlay/styles/_index.scss +5 -0
- package/package.json +13 -1
- package/popover/styles/_index.scss +48 -12
- 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 +5 -2
- 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 +6 -177
- package/segmented/styles/_index.scss +1 -1
- package/select/styles/_index.scss +7 -3
- package/shiny-text/styles/_index.scss +5 -0
- package/sidebar/styles/_index.scss +3 -3
- package/speed-dial/styles/_index.scss +12 -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/stepper/styles/_index.scss +3 -3
- package/styles/_animations.scss +6 -0
- package/styles.scss +3 -0
- package/table/styles/_index.scss +100 -2
- package/tabs/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +65 -2
- package/theme/styles/_dark.scss +18 -6
- package/theme/styles/_focus.scss +2 -8
- 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 +12 -1
- package/types/ngwr-checkbox.d.ts +9 -1
- package/types/ngwr-command-palette.d.ts +4 -1
- package/types/ngwr-date-picker.d.ts +9 -1
- package/types/ngwr-density.d.ts +1 -1
- package/types/ngwr-divider.d.ts +1 -1
- 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 +15 -0
- 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-meter-group.d.ts +9 -1
- package/types/ngwr-page-header.d.ts +2 -2
- package/types/ngwr-pagination.d.ts +1 -1
- 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 +13 -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-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 +10 -2
- package/types/ngwr-validators.d.ts +62 -2
- package/types/ngwr-version.d.ts +2 -2
- package/typewriter/styles/_index.scss +5 -0
- package/typography/styles/_index.scss +5 -5
- package/virtual-scroll/styles/_index.scss +6 -1
- package/waves/styles/_index.scss +5 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as ngwr_i18n from 'ngwr/i18n';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
*
|
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
9
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
/** One row in either pane of a `<wr-transfer>`. */
|
|
12
|
+
interface WrTransferItem<TValue = unknown> {
|
|
13
|
+
/** Identity — what `[(value)]` carries, compared with SameValueZero. */
|
|
14
|
+
readonly value: TValue;
|
|
15
|
+
/** Text shown in the pane and matched by the search box. */
|
|
16
|
+
readonly label: string;
|
|
17
|
+
/** Greyed out and never moved by the bulk buttons. */
|
|
18
|
+
readonly disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** A pane's rows plus the header state derived from them. */
|
|
22
|
+
interface PaneState {
|
|
23
|
+
readonly rows: readonly WrTransferItem[];
|
|
24
|
+
readonly checkedCount: number;
|
|
25
|
+
readonly allChecked: boolean;
|
|
26
|
+
readonly someChecked: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Dual-listbox picker: two panes and the buttons that move rows between them.
|
|
30
|
+
*
|
|
31
|
+
* The full item set is `[items]` and the RIGHT pane is the value — `[(value)]`
|
|
32
|
+
* holds the chosen `WrTransferItem['value']`s, everything else stays left. The
|
|
33
|
+
* checked state inside each pane is transient staging, deliberately not part of
|
|
34
|
+
* the value: what a form cares about is which rows ended up on the right.
|
|
35
|
+
*
|
|
36
|
+
* A signal-forms native control (`FormValueControl<readonly unknown[]>`), so
|
|
37
|
+
* `[formField]` binds straight to `value`; `[(ngModel)]` and reactive forms keep
|
|
38
|
+
* working through Angular's bridge, and `[(value)]` is the standalone shape.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```html
|
|
42
|
+
* <!-- Standalone -->
|
|
43
|
+
* <wr-transfer [items]="permissions" [(value)]="granted" />
|
|
44
|
+
*
|
|
45
|
+
* <!-- Searchable, with pane titles -->
|
|
46
|
+
* <wr-transfer
|
|
47
|
+
* searchable
|
|
48
|
+
* sourceTitle="Available"
|
|
49
|
+
* targetTitle="Granted"
|
|
50
|
+
* [items]="permissions"
|
|
51
|
+
* [formField]="form.granted"
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @see https://ngwr.dev/reference/components/transfer
|
|
56
|
+
*/
|
|
57
|
+
declare class WrTransfer implements FormValueControl<readonly unknown[]> {
|
|
58
|
+
/** Every row, in either pane. Membership of the right pane is `value`. */
|
|
59
|
+
readonly items: _angular_core.InputSignal<readonly WrTransferItem<unknown>[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Values currently in the RIGHT pane. Two-way bindable; bound automatically
|
|
62
|
+
* by `[formField]` / `[(ngModel)]`.
|
|
63
|
+
*/
|
|
64
|
+
readonly value: _angular_core.ModelSignal<readonly unknown[]>;
|
|
65
|
+
/** Emitted on blur / commit so a bound field marks itself touched. */
|
|
66
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
67
|
+
/** Disable the whole control. @default false */
|
|
68
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
69
|
+
/** Show a filter box above each pane. @default false */
|
|
70
|
+
readonly searchable: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
71
|
+
/** Heading above the left pane. Falls back to `transfer.source`. */
|
|
72
|
+
readonly sourceTitle: _angular_core.InputSignal<string | null>;
|
|
73
|
+
/** Heading above the right pane. Falls back to `transfer.target`. */
|
|
74
|
+
readonly targetTitle: _angular_core.InputSignal<string | null>;
|
|
75
|
+
/** Placeholder in both filter boxes. Falls back to `transfer.search`. */
|
|
76
|
+
readonly searchPlaceholder: _angular_core.InputSignal<string | null>;
|
|
77
|
+
/** Shown in a pane with no rows. Falls back to `transfer.empty`. */
|
|
78
|
+
readonly emptyText: _angular_core.InputSignal<string | null>;
|
|
79
|
+
/** Accessible name of the move-right button. Falls back to `transfer.toTarget`. */
|
|
80
|
+
readonly toTargetLabel: _angular_core.InputSignal<string | null>;
|
|
81
|
+
/** Accessible name of the move-left button. Falls back to `transfer.toSource`. */
|
|
82
|
+
readonly toSourceLabel: _angular_core.InputSignal<string | null>;
|
|
83
|
+
protected readonly resolvedSourceTitle: _angular_core.Signal<string>;
|
|
84
|
+
protected readonly resolvedTargetTitle: _angular_core.Signal<string>;
|
|
85
|
+
protected readonly resolvedSearch: _angular_core.Signal<string>;
|
|
86
|
+
protected readonly resolvedEmpty: _angular_core.Signal<string>;
|
|
87
|
+
protected readonly resolvedToTarget: _angular_core.Signal<string>;
|
|
88
|
+
protected readonly resolvedToSource: _angular_core.Signal<string>;
|
|
89
|
+
/** `{{checked}} / {{total}}` under each heading. @internal */
|
|
90
|
+
protected readonly countLabel: (params?: ngwr_i18n.WrI18nParams) => string;
|
|
91
|
+
/** Pane order — the template iterates it so both panes share one block. */
|
|
92
|
+
protected readonly panes: readonly ["source", "target"];
|
|
93
|
+
private readonly sourceQuery;
|
|
94
|
+
private readonly targetQuery;
|
|
95
|
+
/** Staged rows, per pane. Cleared as soon as a move commits them. */
|
|
96
|
+
private readonly sourceChecked;
|
|
97
|
+
private readonly targetChecked;
|
|
98
|
+
private readonly valueSet;
|
|
99
|
+
protected readonly source: _angular_core.Signal<PaneState>;
|
|
100
|
+
protected readonly target: _angular_core.Signal<PaneState>;
|
|
101
|
+
protected readonly canMoveRight: _angular_core.Signal<boolean>;
|
|
102
|
+
protected readonly canMoveLeft: _angular_core.Signal<boolean>;
|
|
103
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
104
|
+
protected isChecked(pane: 'source' | 'target', item: WrTransferItem): boolean;
|
|
105
|
+
protected toggle(pane: 'source' | 'target', item: WrTransferItem, checked: boolean): void;
|
|
106
|
+
/** Header checkbox — stages or clears every enabled row the filter shows. */
|
|
107
|
+
protected toggleAll(pane: 'source' | 'target', checked: boolean): void;
|
|
108
|
+
protected onSearch(pane: 'source' | 'target', event: Event): void;
|
|
109
|
+
protected moveRight(): void;
|
|
110
|
+
protected moveLeft(): void;
|
|
111
|
+
/** Filter, then derive the header state from what survived. */
|
|
112
|
+
private pane;
|
|
113
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTransfer, never>;
|
|
114
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTransfer, "wr-transfer", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "sourceTitle": { "alias": "sourceTitle"; "required": false; "isSignal": true; }; "targetTitle": { "alias": "targetTitle"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "toTargetLabel": { "alias": "toTargetLabel"; "required": false; "isSignal": true; }; "toSourceLabel": { "alias": "toSourceLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { WrTransfer };
|
|
118
|
+
export type { WrTransferItem };
|
package/types/ngwr-tree.d.ts
CHANGED
|
@@ -93,6 +93,14 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
93
93
|
readonly openOn: _angular_core.InputSignal<"inline" | "overlay">;
|
|
94
94
|
/** Placeholder shown on the trigger when no node is selected. */
|
|
95
95
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Accessible name of the overlay trigger. Falls back to the placeholder, then
|
|
98
|
+
* to `select.label` — a `role="combobox"` with nothing selected and no
|
|
99
|
+
* placeholder otherwise has no name at all.
|
|
100
|
+
*/
|
|
101
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
102
|
+
private readonly labelText;
|
|
103
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
96
104
|
/** Show a clear-all (×) button on the trigger when at least one node is selected. @default true */
|
|
97
105
|
readonly clearable: _angular_core.InputSignalWithTransform<boolean, any>;
|
|
98
106
|
/**
|
|
@@ -145,7 +153,7 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
145
153
|
private readonly platformId;
|
|
146
154
|
/** Currently focused row's index in the flattened visible list. */
|
|
147
155
|
protected readonly focusedIndex: _angular_core.WritableSignal<number>;
|
|
148
|
-
/** Resolved ARIA labels —
|
|
156
|
+
/** Resolved ARIA labels — resolved once at construction, so a runtime locale switch needs a re-create. */
|
|
149
157
|
protected readonly clearLabel: string;
|
|
150
158
|
protected readonly expandLabel: string;
|
|
151
159
|
protected readonly collapseLabel: string;
|
|
@@ -225,7 +233,7 @@ declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
225
233
|
private openOverlay;
|
|
226
234
|
private closeOverlay;
|
|
227
235
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WrTree<any>, never>;
|
|
228
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTree<any>, "wr-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openOn": { "alias": "openOn"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxTagCount": { "alias": "maxTagCount"; "required": false; "isSignal": true; }; "defaultExpandAll": { "alias": "defaultExpandAll"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "expanded": "expandedChange"; "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
236
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WrTree<any>, "wr-tree", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "openOn": { "alias": "openOn"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxTagCount": { "alias": "maxTagCount"; "required": false; "isSignal": true; }; "defaultExpandAll": { "alias": "defaultExpandAll"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; "expanded": "expandedChange"; "value": "valueChange"; "touch": "touch"; }, never, never, true, never>;
|
|
229
237
|
}
|
|
230
238
|
|
|
231
239
|
export { WrTree };
|
|
@@ -8,8 +8,11 @@ import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Bundled `ValidatorFn`s — pure functions, no DOM, no DI.
|
|
12
|
-
*
|
|
11
|
+
* Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps
|
|
12
|
+
* one bit of per-instance state, a latch so its dev-mode misconfiguration
|
|
13
|
+
* warning fires once rather than on every validation run; it is never read as
|
|
14
|
+
* part of the result.) Mirrors the API shape of Angular's built-in
|
|
15
|
+
* `Validators` so it composes cleanly:
|
|
13
16
|
*
|
|
14
17
|
* ```ts
|
|
15
18
|
* import { Validators } from '@angular/forms';
|
|
@@ -59,8 +62,65 @@ declare const WrValidators: {
|
|
|
59
62
|
* Value must equal a sibling control's value (e.g. confirm-password).
|
|
60
63
|
* The target lookup uses `control.parent.get(name)`, so it works
|
|
61
64
|
* inside `FormGroup` and nested groups.
|
|
65
|
+
*
|
|
66
|
+
* **It cannot report a mismatch until something revalidates the control.**
|
|
67
|
+
* Angular runs a control's validators inside the control's own constructor,
|
|
68
|
+
* before the control has a parent — so the lookup finds nothing and this
|
|
69
|
+
* returns `null`, and attaching the control to a group does not re-run it.
|
|
70
|
+
*
|
|
71
|
+
* `formControlName` revalidates when it binds, so a group rendered through
|
|
72
|
+
* the reactive-forms directives corrects itself on its first change
|
|
73
|
+
* detection. The window is open for everything that reads validity BEFORE
|
|
74
|
+
* that: a route guard or resolver checking `form.valid`, a form built and
|
|
75
|
+
* submitted from a service, a unit test. Such a group reports itself valid
|
|
76
|
+
* with two values that plainly disagree.
|
|
77
|
+
*
|
|
78
|
+
* Put {@link WrValidators.matchFields} on the group to close it, and keep
|
|
79
|
+
* this one on the child for the per-field message. They do not conflict —
|
|
80
|
+
* different error keys, different hosts.
|
|
81
|
+
*
|
|
82
|
+
* @see WrValidators.matchFields
|
|
62
83
|
*/
|
|
63
84
|
match: (targetName: string) => ValidatorFn;
|
|
85
|
+
/**
|
|
86
|
+
* Every named control must hold the same value — the group-level counterpart
|
|
87
|
+
* to {@link WrValidators.match}. Attach it to the group that OWNS the fields,
|
|
88
|
+
* not to one of its children.
|
|
89
|
+
*
|
|
90
|
+
* Unlike `match` this has no ordering hole: Angular attaches the children and
|
|
91
|
+
* aggregates their values BEFORE it runs the group's own validators, so a
|
|
92
|
+
* group built from a record whose fields already disagree is invalid the
|
|
93
|
+
* moment it exists — no revalidation step, and nothing that depends on the
|
|
94
|
+
* form having been rendered.
|
|
95
|
+
*
|
|
96
|
+
* Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a
|
|
97
|
+
* nested group. `null`, `undefined` and `''` all count as the same empty
|
|
98
|
+
* value; everything else is compared with `===`, so two equal `Date`s are NOT
|
|
99
|
+
* equal — compare a derived primitive instead. **Disabled controls are
|
|
100
|
+
* skipped**, which makes the rule compare exactly what `group.value`
|
|
101
|
+
* contains, and the error names only the controls it actually compared.
|
|
102
|
+
*
|
|
103
|
+
* A name that resolves to nothing, or to a group or an array rather than a
|
|
104
|
+
* leaf control, turns the whole check off and warns once per validator
|
|
105
|
+
* instance in dev — never a partial comparison of the names that did
|
|
106
|
+
* resolve, and never an error the user has no way to satisfy.
|
|
107
|
+
*
|
|
108
|
+
* The error lands on the GROUP, and `<wr-form-field>` only reads the one
|
|
109
|
+
* control projected into it — so pair this with `match` for a per-field
|
|
110
|
+
* message, or render it yourself from `form.hasError('matchFields')`.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* new FormGroup(
|
|
115
|
+
* {
|
|
116
|
+
* password: new FormControl(''),
|
|
117
|
+
* confirm: new FormControl('', [WrValidators.match('password')]),
|
|
118
|
+
* },
|
|
119
|
+
* { validators: [WrValidators.matchFields('password', 'confirm')] },
|
|
120
|
+
* );
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
matchFields: (first: string, second: string, ...rest: readonly string[]) => ValidatorFn;
|
|
64
124
|
/** Value must be one of the allowed entries (strict equality). */
|
|
65
125
|
oneOf: <T>(allowed: readonly T[]) => ValidatorFn;
|
|
66
126
|
/** Value (Date | parseable) must be ≥ `min`. */
|
package/types/ngwr-version.d.ts
CHANGED
|
@@ -14,9 +14,9 @@ import { InjectionToken } from '@angular/core';
|
|
|
14
14
|
* import or `require`, neither of which tree-shakes well in Angular builds.
|
|
15
15
|
*
|
|
16
16
|
* Distinct from `Version` exported by `@angular/core`, which reports the
|
|
17
|
-
* loaded Angular runtime version (e.g. `'
|
|
17
|
+
* loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
|
|
18
18
|
*/
|
|
19
|
-
declare const NGWR_VERSION = "10.
|
|
19
|
+
declare const NGWR_VERSION = "10.2.0";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @license
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
.wr-typewriter {
|
|
2
7
|
--wr-typewriter-cursor-blink: 0.5s;
|
|
3
8
|
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
// hover. Add your own `underline` class for the always-underlined look.
|
|
154
154
|
&--link {
|
|
155
155
|
font-weight: var(--wr-font-weight-medium);
|
|
156
|
-
color: var(--wr-color-primary);
|
|
156
|
+
color: var(--wr-color-primary-ink);
|
|
157
157
|
text-decoration: none;
|
|
158
158
|
text-underline-offset: 2px;
|
|
159
159
|
cursor: pointer;
|
|
@@ -171,16 +171,16 @@
|
|
|
171
171
|
color: var(--wr-color-on-surface-muted);
|
|
172
172
|
}
|
|
173
173
|
&--tone-primary {
|
|
174
|
-
color: var(--wr-color-primary);
|
|
174
|
+
color: var(--wr-color-primary-ink);
|
|
175
175
|
}
|
|
176
176
|
&--tone-success {
|
|
177
|
-
color: var(--wr-color-success);
|
|
177
|
+
color: var(--wr-color-success-ink);
|
|
178
178
|
}
|
|
179
179
|
&--tone-warning {
|
|
180
|
-
color: var(--wr-color-warning);
|
|
180
|
+
color: var(--wr-color-warning-ink);
|
|
181
181
|
}
|
|
182
182
|
&--tone-danger {
|
|
183
|
-
color: var(--wr-color-danger);
|
|
183
|
+
color: var(--wr-color-danger-ink);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// Modifiers
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
// Fixed-size virtual scroll wrapper. Most of the layout work is done by
|
|
2
7
|
// CDK's `<cdk-virtual-scroll-viewport>`; this stylesheet just makes the
|
|
3
8
|
// host a block-level container and tames default overflow behaviour.
|
|
@@ -11,7 +16,7 @@
|
|
|
11
16
|
width: 100%;
|
|
12
17
|
height: 100%;
|
|
13
18
|
// CDK already sets `overflow: auto`; just add a discreet scrollbar
|
|
14
|
-
// skin via the platform defaults —
|
|
19
|
+
// skin via the platform defaults — a discreet custom thumb that still matches the
|
|
15
20
|
// host application's chrome.
|
|
16
21
|
scrollbar-width: thin;
|
|
17
22
|
|
package/waves/styles/_index.scss
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
// Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
|
|
2
|
+
// design token this stylesheet references. Sass deduplicates `@use` per
|
|
3
|
+
// compilation, so the umbrella sheet still emits the theme only once.
|
|
4
|
+
@use '../../theme/styles' as theme;
|
|
5
|
+
|
|
1
6
|
// Wave-field background (reactbits port). The host fills its nearest
|
|
2
7
|
// positioned ancestor; the line colour is theme-aware via
|
|
3
8
|
// `--wr-waves-line-color` unless `[lineColor]` overrides it.
|