ngwr 10.0.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 +9 -8
- package/action-sheet/styles/_index.scss +6 -1
- package/badge/styles/_index.scss +1 -1
- package/badge/styles/_tag.scss +2 -2
- package/border-glow/styles/_index.scss +5 -0
- 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/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/styles/_animations.scss +6 -0
- package/styles.scss +3 -0
- package/table/styles/_index.scss +100 -2
- package/theme/styles/_colors.scss +43 -1
- 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 +3 -3
- package/virtual-scroll/styles/_index.scss +6 -1
- package/waves/styles/_index.scss +5 -0
|
@@ -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.1.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
|
|
|
@@ -174,13 +174,13 @@
|
|
|
174
174
|
color: var(--wr-color-primary);
|
|
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.
|