ngwr 16.5.0 → 16.6.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/back-top/styles/_index.scss +6 -0
- package/breadcrumbs/styles/_rules.scss +34 -0
- package/cascader/styles/_rules.scss +7 -0
- package/charts/chart-legend/styles/_index.scss +1 -9
- package/counter/styles/_index.scss +1 -8
- package/date-picker/styles/_index.scss +15 -9
- package/dialog/styles/_index.scss +37 -0
- package/editor/styles/_index.scss +1 -8
- package/event-calendar/styles/_index.scss +2 -6
- package/fesm2022/ngwr-affix.mjs +1 -1
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +9 -2
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
- package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
- package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
- package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
- package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
- package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
- package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
- package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
- package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-tilt.mjs +20 -13
- package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
- package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +40 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-button.mjs +12 -3
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +8 -2
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +24 -4
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +12 -5
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +4 -2
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +3 -2
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +21 -1
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +4 -5
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +49 -1
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +16 -6
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +9 -6
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-event-calendar.mjs +20 -9
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +170 -3
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +15 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +15 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +15 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +15 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +15 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +15 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +15 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +15 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +15 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +15 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +15 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +15 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +15 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +15 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +15 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +15 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +15 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +15 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +15 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +15 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +15 -0
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +15 -0
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +82 -11
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +24 -1
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +2 -2
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +10 -2
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +1 -1
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +2 -2
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +8 -0
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +9 -6
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +21 -0
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +2 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +8 -1
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +2 -1
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +47 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-qr.mjs +6 -2
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +71 -5
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +10 -1
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +1 -3
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +20 -0
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +80 -9
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +16 -4
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +1 -1
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +2 -2
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +41 -7
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +2 -2
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-toast.mjs +28 -0
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +2 -2
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +20 -0
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils-router.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +46 -4
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +33 -1
- package/fesm2022/ngwr-validators.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/form/styles/_index.scss +37 -0
- package/graph/styles/_index.scss +1 -9
- package/i18n/ar.json +15 -0
- package/i18n/cs.json +15 -0
- package/i18n/de.json +15 -0
- package/i18n/en.json +15 -0
- package/i18n/es.json +15 -0
- package/i18n/fr.json +15 -0
- package/i18n/he.json +15 -0
- package/i18n/hi.json +15 -0
- package/i18n/id.json +15 -0
- package/i18n/it.json +15 -0
- package/i18n/ja.json +15 -0
- package/i18n/ko.json +15 -0
- package/i18n/nl.json +15 -0
- package/i18n/pl.json +15 -0
- package/i18n/pt.json +15 -0
- package/i18n/ru.json +15 -0
- package/i18n/sv.json +15 -0
- package/i18n/tr.json +15 -0
- package/i18n/uk.json +15 -0
- package/i18n/vi.json +15 -0
- package/i18n/zh-TW.json +15 -0
- package/i18n/zh.json +15 -0
- package/image-cropper/styles/_index.scss +1 -9
- package/input-number/styles/_index.scss +7 -0
- package/layout/styles/_index.scss +13 -1
- package/llms-full.txt +10 -10
- package/loading-bar/styles/_rules.scss +6 -0
- package/package.json +2 -2
- package/page-header/styles/_index.scss +18 -0
- package/popover/styles/_index.scss +7 -0
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +7 -0
- package/sidebar/styles/_index.scss +6 -0
- package/skills/ngwr/references/catalog.md +1 -1
- package/sortable-list/styles/_rules.scss +1 -9
- package/speed-dial/styles/_index.scss +6 -0
- package/stepper/styles/_index.scss +1 -9
- package/table/styles/_index.scss +49 -0
- package/theme/_index.scss +12 -1
- package/theme/styles/_colors.scss +11 -0
- package/theme/styles/_contrast.scss +6 -0
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +45 -0
- package/theme/styles/_print.scss +17 -0
- package/toast/styles/_index.scss +7 -0
- package/tour/styles/_index.scss +8 -0
- package/tree/styles/_index.scss +1 -9
- package/types/ngwr-anchor.d.ts +3 -0
- package/types/ngwr-animations-aurora.d.ts +6 -0
- package/types/ngwr-animations-blur-reveal.d.ts +6 -0
- package/types/ngwr-animations-click-sparks.d.ts +6 -0
- package/types/ngwr-animations-confetti.d.ts +6 -0
- package/types/ngwr-animations-decode.d.ts +6 -0
- package/types/ngwr-animations-destruct.d.ts +6 -0
- package/types/ngwr-animations-dot-grid.d.ts +6 -0
- package/types/ngwr-animations-falling-letters.d.ts +6 -0
- package/types/ngwr-animations-flow-lines.d.ts +6 -0
- package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
- package/types/ngwr-animations-glitch.d.ts +6 -0
- package/types/ngwr-animations-glow-border.d.ts +6 -0
- package/types/ngwr-animations-gradient-flow.d.ts +6 -0
- package/types/ngwr-animations-marquee.d.ts +6 -0
- package/types/ngwr-animations-orbit.d.ts +6 -0
- package/types/ngwr-animations-reveal.d.ts +6 -0
- package/types/ngwr-animations-ripple-grid.d.ts +6 -0
- package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
- package/types/ngwr-animations-shimmer.d.ts +6 -0
- package/types/ngwr-animations-spotlight.d.ts +6 -0
- package/types/ngwr-animations-thread-lines.d.ts +6 -0
- package/types/ngwr-animations-tilt.d.ts +10 -0
- package/types/ngwr-animations-typewriter.d.ts +6 -0
- package/types/ngwr-breadcrumbs.d.ts +25 -0
- package/types/ngwr-button.d.ts +23 -3
- package/types/ngwr-carousel.d.ts +2 -0
- package/types/ngwr-cascader.d.ts +7 -0
- package/types/ngwr-charts-core.d.ts +16 -0
- package/types/ngwr-charts-meter-group.d.ts +2 -0
- package/types/ngwr-checkbox.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-picker.d.ts +19 -0
- package/types/ngwr-dialog.d.ts +39 -8
- package/types/ngwr-directives.d.ts +12 -4
- package/types/ngwr-drawer.d.ts +1 -1
- package/types/ngwr-dropdown.d.ts +1 -1
- package/types/ngwr-event-calendar.d.ts +4 -0
- package/types/ngwr-form.d.ts +85 -1
- package/types/ngwr-i18n.d.ts +65 -5
- package/types/ngwr-input-number.d.ts +8 -0
- package/types/ngwr-input.d.ts +7 -0
- package/types/ngwr-layout.d.ts +1 -1
- package/types/ngwr-loading-bar-router.d.ts +6 -0
- package/types/ngwr-page-header.d.ts +23 -1
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +28 -4
- package/types/ngwr-radio.d.ts +47 -5
- package/types/ngwr-segmented.d.ts +7 -0
- package/types/ngwr-select.d.ts +57 -13
- package/types/ngwr-sortable-list.d.ts +20 -7
- package/types/ngwr-table.d.ts +58 -5
- package/types/ngwr-tabs-router.d.ts +6 -0
- package/types/ngwr-toast.d.ts +11 -0
- package/types/ngwr-tour.d.ts +0 -1
- package/types/ngwr-typography.d.ts +7 -0
- package/types/ngwr-utils-router.d.ts +6 -0
- package/types/ngwr-utils.d.ts +56 -2
- package/types/ngwr-validators.d.ts +49 -1
- package/types/ngwr-version.d.ts +1 -1
- package/typography/styles/_index.scss +4 -0
- package/window/styles/_index.scss +1 -9
package/types/ngwr-radio.d.ts
CHANGED
|
@@ -118,11 +118,14 @@ interface WrRadioGroupContext {
|
|
|
118
118
|
/**
|
|
119
119
|
* Hosts a group of `<wr-radio>` children as a single-value selection.
|
|
120
120
|
*
|
|
121
|
-
* A signal-forms native control: it implements `FormValueControl
|
|
121
|
+
* A signal-forms native control: it implements `FormValueControl`, so
|
|
122
122
|
* `[formField]` binds to its `value` model — the currently selected radio's
|
|
123
123
|
* `value`. `[(value)]` works standalone. Classic `[(ngModel)]` / reactive forms
|
|
124
124
|
* keep working through Angular's bridge.
|
|
125
125
|
*
|
|
126
|
+
* `T` is an item of `[options]` and `V` is a radio's value: the return type of
|
|
127
|
+
* `[valueWith]`, or else the type of the value binding.
|
|
128
|
+
*
|
|
126
129
|
* @example
|
|
127
130
|
* ```html
|
|
128
131
|
* <wr-radio-group [formField]="form.size">
|
|
@@ -130,17 +133,41 @@ interface WrRadioGroupContext {
|
|
|
130
133
|
* <wr-radio value="md">Medium</wr-radio>
|
|
131
134
|
* <wr-radio value="lg">Large</wr-radio>
|
|
132
135
|
* </wr-radio-group>
|
|
136
|
+
*
|
|
137
|
+
* <!-- One radio per item, the id in the model -->
|
|
138
|
+
* <wr-radio-group [options]="plans" [displayWith]="planName" [valueWith]="planId" [(value)]="planId" />
|
|
133
139
|
* ```
|
|
134
140
|
*
|
|
135
141
|
* @see https://ngwr.dev/reference/components/radio
|
|
136
142
|
*/
|
|
137
|
-
export declare class WrRadioGroup implements FormValueControl<
|
|
143
|
+
export declare class WrRadioGroup<T = unknown, V = T> implements FormValueControl<V | null>, WrRadioGroupContext {
|
|
138
144
|
constructor();
|
|
139
145
|
/**
|
|
140
146
|
* Shared `name` attribute. Defaults to a random id so multiple groups
|
|
141
147
|
* on the same page don't collide. (Also the `FormUiControl.name` slot.)
|
|
142
148
|
*/
|
|
143
149
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
150
|
+
/**
|
|
151
|
+
* Option array. Each item is rendered as a `<wr-radio>` whose value is the
|
|
152
|
+
* item, or `[valueWith]` of it, and whose label comes from `[displayWith]`,
|
|
153
|
+
* before any projected `<wr-radio>` children.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```html
|
|
157
|
+
* <wr-radio-group [options]="plans" [displayWith]="planName" [valueWith]="planId" [(value)]="planId" />
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
readonly options: import("@angular/core").InputSignal<readonly T[]>;
|
|
161
|
+
/** Maps an `[options]` item to its label. @default String */
|
|
162
|
+
readonly displayWith: import("@angular/core").InputSignal<(item: T) => string>;
|
|
163
|
+
/**
|
|
164
|
+
* Maps an `[options]` item to the value the model holds, so a list of objects
|
|
165
|
+
* can bind an id. Values are compared with `===`. Without it an item is its
|
|
166
|
+
* own value.
|
|
167
|
+
*/
|
|
168
|
+
readonly valueWith: import("@angular/core").InputSignal<((item: T) => V) | null>;
|
|
169
|
+
/** An item's value: `valueWith` of it, or the item itself. */
|
|
170
|
+
protected valueOf(item: T): V;
|
|
144
171
|
/**
|
|
145
172
|
* Disable the whole group. Bound automatically from the field's disabled
|
|
146
173
|
* state when used with `[formField]`.
|
|
@@ -172,7 +199,7 @@ export declare class WrRadioGroup implements FormValueControl<unknown>, WrRadioG
|
|
|
172
199
|
protected readonly fieldAria: import("ngwr/form").WrFormFieldAria;
|
|
173
200
|
protected readonly labelledBy: import("@angular/core").Signal<string | null>;
|
|
174
201
|
/** The selected radio's value. Bound by `[formField]`, or two-way via `[(value)]`. */
|
|
175
|
-
readonly value: import("@angular/core").ModelSignal<
|
|
202
|
+
readonly value: import("@angular/core").ModelSignal<V | null>;
|
|
176
203
|
/** Emitted on blur from any child so a bound field can mark itself touched. */
|
|
177
204
|
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
178
205
|
/** Effective disabled state (WrRadioGroupContext). */
|
|
@@ -190,13 +217,28 @@ export declare class WrRadioGroup implements FormValueControl<unknown>, WrRadioG
|
|
|
190
217
|
focus(options?: FocusOptions): void;
|
|
191
218
|
select(value: unknown): void;
|
|
192
219
|
markTouched(): void;
|
|
193
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WrRadioGroup, never>;
|
|
194
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WrRadioGroup, "wr-radio-group", never, {
|
|
220
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrRadioGroup<any, any>, never>;
|
|
221
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrRadioGroup<any, any>, "wr-radio-group", never, {
|
|
195
222
|
"name": {
|
|
196
223
|
"alias": "name";
|
|
197
224
|
"required": false;
|
|
198
225
|
"isSignal": true;
|
|
199
226
|
};
|
|
227
|
+
"options": {
|
|
228
|
+
"alias": "options";
|
|
229
|
+
"required": false;
|
|
230
|
+
"isSignal": true;
|
|
231
|
+
};
|
|
232
|
+
"displayWith": {
|
|
233
|
+
"alias": "displayWith";
|
|
234
|
+
"required": false;
|
|
235
|
+
"isSignal": true;
|
|
236
|
+
};
|
|
237
|
+
"valueWith": {
|
|
238
|
+
"alias": "valueWith";
|
|
239
|
+
"required": false;
|
|
240
|
+
"isSignal": true;
|
|
241
|
+
};
|
|
200
242
|
"disabled": {
|
|
201
243
|
"alias": "disabled";
|
|
202
244
|
"required": false;
|
|
@@ -91,6 +91,8 @@ export declare class WrSegmented<T = unknown> implements FormValueControl<T | nu
|
|
|
91
91
|
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
92
92
|
/** Control size — shares the `--wr-control-*` contract. @default 'md' */
|
|
93
93
|
readonly size: import("@angular/core").InputSignal<WrSegmentedSize>;
|
|
94
|
+
/** Stretch the strip to fill its parent's width, shared equally by the segments. @default false */
|
|
95
|
+
readonly block: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
94
96
|
private readonly host;
|
|
95
97
|
private readonly field;
|
|
96
98
|
/**
|
|
@@ -240,6 +242,11 @@ export declare class WrSegmented<T = unknown> implements FormValueControl<T | nu
|
|
|
240
242
|
"required": false;
|
|
241
243
|
"isSignal": true;
|
|
242
244
|
};
|
|
245
|
+
"block": {
|
|
246
|
+
"alias": "block";
|
|
247
|
+
"required": false;
|
|
248
|
+
"isSignal": true;
|
|
249
|
+
};
|
|
243
250
|
}, {
|
|
244
251
|
"value": "valueChange";
|
|
245
252
|
"touch": "touch";
|
package/types/ngwr-select.d.ts
CHANGED
|
@@ -242,11 +242,12 @@ interface SelectedChip {
|
|
|
242
242
|
* `ControlValueAccessor` in between. `[(value)]` works standalone, and classic
|
|
243
243
|
* `[(ngModel)]` / reactive forms keep working through Angular's bridge.
|
|
244
244
|
*
|
|
245
|
-
* `T` is an
|
|
246
|
-
* value
|
|
245
|
+
* `T` is an item of `[options]` or of what `[loader]` returns, and `V` is an
|
|
246
|
+
* option's value: the return type of `[valueWith]`, or else the type of the
|
|
247
|
+
* value binding. `value` is `V | readonly V[] | null`: one `V` in single and
|
|
247
248
|
* search mode, an array of them in multi and tag mode. The mode is a runtime
|
|
248
|
-
* input, so the type cannot pick one shape; narrow in the handler, or leave
|
|
249
|
-
* at
|
|
249
|
+
* input, so the type cannot pick one shape; narrow in the handler, or leave
|
|
250
|
+
* both at their default `unknown`.
|
|
250
251
|
*
|
|
251
252
|
* @example
|
|
252
253
|
* ```html
|
|
@@ -272,12 +273,15 @@ interface SelectedChip {
|
|
|
272
273
|
* [(value)]="categories"
|
|
273
274
|
* (searchChange)="store.search($event)"
|
|
274
275
|
* />
|
|
276
|
+
*
|
|
277
|
+
* <!-- Options of objects, the id in the model -->
|
|
278
|
+
* <wr-select [options]="people()" [displayWith]="personName" [valueWith]="personId" [(value)]="assigneeId" />
|
|
275
279
|
* ```
|
|
276
280
|
*
|
|
277
281
|
*
|
|
278
282
|
* @see https://ngwr.dev/reference/components/select
|
|
279
283
|
*/
|
|
280
|
-
export declare class WrSelect<T = unknown> implements FormValueControl<
|
|
284
|
+
export declare class WrSelect<T = unknown, V = T> implements FormValueControl<V | readonly V[] | null>, WrSelectContext {
|
|
281
285
|
/** Placeholder shown when no option is selected. Falls back to `select.placeholder`. */
|
|
282
286
|
readonly placeholder: import("@angular/core").InputSignal<string | null>;
|
|
283
287
|
/** Clear-selection (×) button aria-label. Falls back to `select.clearSelection`. */
|
|
@@ -352,6 +356,7 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
352
356
|
private readonly fieldAria;
|
|
353
357
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
354
358
|
protected readonly ariaInvalid: import("@angular/core").Signal<"true" | null>;
|
|
359
|
+
protected readonly ariaRequired: import("@angular/core").Signal<"true" | null>;
|
|
355
360
|
/**
|
|
356
361
|
* Disable the select. Bound automatically from the field's disabled state
|
|
357
362
|
* when used with `[formField]`.
|
|
@@ -373,6 +378,8 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
373
378
|
* @default false
|
|
374
379
|
*/
|
|
375
380
|
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
381
|
+
/** Stretch the select to fill its parent's width. @default false */
|
|
382
|
+
readonly block: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
376
383
|
/** Pill-shaped corners on the trigger. @default false */
|
|
377
384
|
readonly rounded: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
378
385
|
/**
|
|
@@ -440,13 +447,15 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
440
447
|
readonly searchQuery: import("@angular/core").ModelSignal<string>;
|
|
441
448
|
/**
|
|
442
449
|
* Option array, in every mode with a panel. Each item is rendered as a
|
|
443
|
-
* `<wr-option>` whose value is the item
|
|
444
|
-
* `[displayWith]`, before any projected `<wr-option>`
|
|
445
|
-
* query filters both lists alike. Ignored in `tag` mode,
|
|
450
|
+
* `<wr-option>` whose value is the item, or `[valueWith]` of it, and whose
|
|
451
|
+
* label comes from `[displayWith]`, before any projected `<wr-option>`
|
|
452
|
+
* children; a search query filters both lists alike. Ignored in `tag` mode,
|
|
453
|
+
* which has no panel.
|
|
446
454
|
*
|
|
447
455
|
* @example
|
|
448
456
|
* ```html
|
|
449
457
|
* <wr-select [options]="countries" [displayWith]="countryName" [(value)]="country" />
|
|
458
|
+
* <wr-select [options]="countries" [displayWith]="countryName" [valueWith]="countryCode" [(value)]="code" />
|
|
450
459
|
* <wr-select mode="multi" [options]="tags" [(value)]="picked" />
|
|
451
460
|
* ```
|
|
452
461
|
*/
|
|
@@ -456,6 +465,19 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
456
465
|
* selected, on its chip in multi mode. @default String
|
|
457
466
|
*/
|
|
458
467
|
readonly displayWith: import("@angular/core").InputSignal<(item: T) => string>;
|
|
468
|
+
/**
|
|
469
|
+
* Maps an `[options]` item, or a `[loader]` result, to the value the model
|
|
470
|
+
* holds, so a list of objects can bind an id. The trigger and the chips show
|
|
471
|
+
* the label of the item whose value matches. Values are compared with `===`.
|
|
472
|
+
* Without it an item is its own value. Not read by `freeText`, which commits
|
|
473
|
+
* the typed string, or by `tag` mode, which has no options.
|
|
474
|
+
*
|
|
475
|
+
* @example
|
|
476
|
+
* ```html
|
|
477
|
+
* <wr-select [options]="people()" [displayWith]="personName" [valueWith]="personId" [(value)]="assigneeId" />
|
|
478
|
+
* ```
|
|
479
|
+
*/
|
|
480
|
+
readonly valueWith: import("@angular/core").InputSignal<((item: T) => V) | null>;
|
|
459
481
|
/**
|
|
460
482
|
* Search mode: async loader. When set, the loader is called on every
|
|
461
483
|
* (debounced) keystroke and its result replaces `[options]`. Supports
|
|
@@ -671,10 +693,10 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
671
693
|
readonly maxTagCount: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
672
694
|
/**
|
|
673
695
|
* Unified value. Single mode holds a scalar (or `null`); multi / tag
|
|
674
|
-
* mode holds `readonly
|
|
696
|
+
* mode holds `readonly V[]`. Bound by `[formField]`, or two-way
|
|
675
697
|
* via `[(value)]`.
|
|
676
698
|
*/
|
|
677
|
-
readonly value: import("@angular/core").ModelSignal<
|
|
699
|
+
readonly value: import("@angular/core").ModelSignal<V | readonly V[] | null>;
|
|
678
700
|
/** Emitted on blur / commit so a bound field can mark itself touched. */
|
|
679
701
|
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
680
702
|
/** Fires after the panel opens. */
|
|
@@ -817,7 +839,18 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
817
839
|
* `<wr-option>` in the panel, in every mode that has one.
|
|
818
840
|
*/
|
|
819
841
|
protected readonly dynamicOptions: import("@angular/core").Signal<readonly T[]>;
|
|
820
|
-
|
|
842
|
+
/** An item's value: `valueWith` of it, or the item itself. */
|
|
843
|
+
protected valueOf(item: T): V;
|
|
844
|
+
/** The first of `dynamicOptions()` carrying each value. */
|
|
845
|
+
private readonly itemsByValue;
|
|
846
|
+
/**
|
|
847
|
+
* Under `valueWith`, the item behind each selected value. An item stays here
|
|
848
|
+
* after a loader or a server search has dropped its row, so the label of an
|
|
849
|
+
* id outlives the query it was picked under.
|
|
850
|
+
*/
|
|
851
|
+
private readonly selectedItems;
|
|
852
|
+
/** A chip's label under `valueWith`: its item's, or the value as text while no item carries it. */
|
|
853
|
+
private itemLabel;
|
|
821
854
|
/** Lowercased labels of `dynamicOptions()`, by index: a query reads them, and never `displayWith`. */
|
|
822
855
|
private readonly dynamicSearchLabels;
|
|
823
856
|
private static readonly FALLBACK_ROW_PX;
|
|
@@ -874,6 +907,7 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
874
907
|
/** The windowed slice of options, each carrying its absolute index. */
|
|
875
908
|
protected readonly windowOptions: import("@angular/core").Signal<readonly {
|
|
876
909
|
item: T;
|
|
910
|
+
value: V;
|
|
877
911
|
index: number;
|
|
878
912
|
}[]>;
|
|
879
913
|
/** Stable id for a virtual option row at filtered index `i`. */
|
|
@@ -1197,8 +1231,8 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
1197
1231
|
private panelPositions;
|
|
1198
1232
|
/** `notify: false` is the destroy path: an output cannot emit from a destroyed view. */
|
|
1199
1233
|
private closeOverlay;
|
|
1200
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WrSelect<any>, never>;
|
|
1201
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WrSelect<any>, "wr-select", never, {
|
|
1234
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrSelect<any, any>, never>;
|
|
1235
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrSelect<any, any>, "wr-select", never, {
|
|
1202
1236
|
"placeholder": {
|
|
1203
1237
|
"alias": "placeholder";
|
|
1204
1238
|
"required": false;
|
|
@@ -1224,6 +1258,11 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
1224
1258
|
"required": false;
|
|
1225
1259
|
"isSignal": true;
|
|
1226
1260
|
};
|
|
1261
|
+
"block": {
|
|
1262
|
+
"alias": "block";
|
|
1263
|
+
"required": false;
|
|
1264
|
+
"isSignal": true;
|
|
1265
|
+
};
|
|
1227
1266
|
"rounded": {
|
|
1228
1267
|
"alias": "rounded";
|
|
1229
1268
|
"required": false;
|
|
@@ -1259,6 +1298,11 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
1259
1298
|
"required": false;
|
|
1260
1299
|
"isSignal": true;
|
|
1261
1300
|
};
|
|
1301
|
+
"valueWith": {
|
|
1302
|
+
"alias": "valueWith";
|
|
1303
|
+
"required": false;
|
|
1304
|
+
"isSignal": true;
|
|
1305
|
+
};
|
|
1262
1306
|
"loader": {
|
|
1263
1307
|
"alias": "loader";
|
|
1264
1308
|
"required": false;
|
|
@@ -44,6 +44,10 @@ interface WrSortableListContext {
|
|
|
44
44
|
indexOf(item: {
|
|
45
45
|
readonly host: ElementRef<HTMLElement>;
|
|
46
46
|
}): number;
|
|
47
|
+
/** Same as `indexOf`, cached per `items` array and row count; reads `items`. */
|
|
48
|
+
positionOf(item: {
|
|
49
|
+
readonly host: ElementRef<HTMLElement>;
|
|
50
|
+
}): number;
|
|
47
51
|
/** Key handling for a row — pick up, move, drop, cancel. */
|
|
48
52
|
onRowKeydown(event: KeyboardEvent, index: number): void;
|
|
49
53
|
/** A held row losing focus ends the gesture as a drop. */
|
|
@@ -211,6 +215,8 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
211
215
|
* the DOM, so `indexOf` cannot find it and the stale entry is swept then.
|
|
212
216
|
*/
|
|
213
217
|
private readonly rows;
|
|
218
|
+
/** Row positions for one `items` array and row count, so a change sorts once however many rows ask. */
|
|
219
|
+
private positions;
|
|
214
220
|
/** Index of the row the keyboard is holding, or `null` when nothing is held. */
|
|
215
221
|
readonly grabbedIndex: WritableSignal<number | null>;
|
|
216
222
|
/** Live-region text. Written by the keyboard path only. */
|
|
@@ -262,6 +268,14 @@ export declare class WrSortableList<T = unknown> implements WrSortableListContex
|
|
|
262
268
|
indexOf(item: {
|
|
263
269
|
readonly host: ElementRef<HTMLElement>;
|
|
264
270
|
}): number;
|
|
271
|
+
/**
|
|
272
|
+
* @internal The same answer as `indexOf`, served from a map that is rebuilt
|
|
273
|
+
* only when `items` or the number of rows changes. Reads `items`, so a
|
|
274
|
+
* `computed` that calls it follows every reorder.
|
|
275
|
+
*/
|
|
276
|
+
positionOf(item: {
|
|
277
|
+
readonly host: ElementRef<HTMLElement>;
|
|
278
|
+
}): number;
|
|
265
279
|
/**
|
|
266
280
|
* Drops rows whose element has left the document and puts the rest into
|
|
267
281
|
* document order.
|
|
@@ -399,13 +413,12 @@ export declare class WrSortableItem {
|
|
|
399
413
|
* Position among the list's rows, which IS the index into `items()`: the
|
|
400
414
|
* consumer's own loop renders them in that order.
|
|
401
415
|
*
|
|
402
|
-
* `
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
* has moved the nodes, so the recomputation reads the new order.
|
|
416
|
+
* `positionOf` resolves by DOCUMENT ORDER and is keyed on the `items` ARRAY,
|
|
417
|
+
* not its length: a reorder keeps the count, so a length-keyed index stayed
|
|
418
|
+
* on the slot the row had left, the highlight stayed behind with it, and a
|
|
419
|
+
* second pick-up of the same row moved its old neighbour instead. Host
|
|
420
|
+
* bindings run after the consumer's `@for` has moved the nodes, so the
|
|
421
|
+
* recomputation reads the new order.
|
|
409
422
|
*/
|
|
410
423
|
protected readonly index: import("@angular/core").Signal<number>;
|
|
411
424
|
protected readonly grabbed: import("@angular/core").Signal<boolean>;
|
package/types/ngwr-table.d.ts
CHANGED
|
@@ -299,6 +299,14 @@ interface WrTableColumn<T extends WrTableRow = WrTableRow> {
|
|
|
299
299
|
* the column cannot grow: give it a `width`.
|
|
300
300
|
*/
|
|
301
301
|
readonly truncate?: WrTableTruncate | null;
|
|
302
|
+
/**
|
|
303
|
+
* A column of row actions. Its `[wrTableCell]` template renders inside
|
|
304
|
+
* `.wr-table__actions`, a single row with a gap at the end of the cell, for
|
|
305
|
+
* icon-only `wr-btn`s. The column shrinks to its buttons
|
|
306
|
+
* (`.wr-table__th--actions`, `.wr-table__td--actions`); under
|
|
307
|
+
* `layout="fixed"` give it a `width`. `toCsv()` leaves it out.
|
|
308
|
+
*/
|
|
309
|
+
readonly actions?: boolean;
|
|
302
310
|
/**
|
|
303
311
|
* Extra CSS classes for this column's header cell AND every body cell under
|
|
304
312
|
* it - the one place to set a monospace face or any other treatment of your
|
|
@@ -448,6 +456,19 @@ interface WrTableExpandContext {
|
|
|
448
456
|
/** The expanded row (alias of `$implicit`). */
|
|
449
457
|
readonly row: Record<string, unknown>;
|
|
450
458
|
}
|
|
459
|
+
/**
|
|
460
|
+
* @license
|
|
461
|
+
*
|
|
462
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
463
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
464
|
+
*/
|
|
465
|
+
/**
|
|
466
|
+
* How `<wr-table>` sizes its columns.
|
|
467
|
+
*
|
|
468
|
+
* - `'auto'` - the browser sizes each column to its content
|
|
469
|
+
* - `'fixed'` - a column keeps its `width`, the rest share what is left, and text wraps
|
|
470
|
+
*/
|
|
471
|
+
type WrTableLayout = 'auto' | 'fixed';
|
|
451
472
|
/**
|
|
452
473
|
* @license
|
|
453
474
|
*
|
|
@@ -552,6 +573,8 @@ interface CellColumn<T extends WrTableRow> {
|
|
|
552
573
|
readonly width: number | null;
|
|
553
574
|
/** The `width` a truncated column's cells are capped at. */
|
|
554
575
|
readonly maxWidth: number | null;
|
|
576
|
+
/** Whether its template renders inside `.wr-table__actions`. */
|
|
577
|
+
readonly actions: boolean;
|
|
555
578
|
/** Whether its cell names the row (see `labelColumnKey`). */
|
|
556
579
|
readonly label: boolean;
|
|
557
580
|
/** Whether its cell carries the tree indent and toggle. */
|
|
@@ -1028,6 +1051,14 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1028
1051
|
readonly overscan: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
1029
1052
|
/** Total row count derived for the pager (server-mode wins). */
|
|
1030
1053
|
protected readonly resolvedTotal: import("@angular/core").Signal<number>;
|
|
1054
|
+
/**
|
|
1055
|
+
* The page the table shows. Clamped at BOTH ends, because `page` is a model the
|
|
1056
|
+
* host owns (a `model()` takes no transform) and the data can shrink under it,
|
|
1057
|
+
* which used to leave an empty slice with no way back except paging by hand.
|
|
1058
|
+
* Below 1 the offset goes negative and `Array.slice` reads a negative start
|
|
1059
|
+
* from the END; `|| 1` folds `0` and `NaN` in.
|
|
1060
|
+
*/
|
|
1061
|
+
protected readonly shownPage: import("@angular/core").Signal<number>;
|
|
1031
1062
|
/** Items visible on the current page (client mode slices; server mode passes through). */
|
|
1032
1063
|
protected readonly visibleItems: import("@angular/core").Signal<readonly Record<string, unknown>[] | null | undefined>;
|
|
1033
1064
|
/** Show the pager footer only when paging is enabled and rows overflow. */
|
|
@@ -1151,11 +1182,21 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1151
1182
|
* cut cell's full text in a tooltip on hover and focus; a cell that fits
|
|
1152
1183
|
* shows none. A column's own `truncate` wins, and `null` there turns it off
|
|
1153
1184
|
* for that column. A cell is cut only where its column cannot grow: give the
|
|
1154
|
-
* column a `width`, or the table a fixed layout (
|
|
1155
|
-
* one has it).
|
|
1185
|
+
* column a `width`, or the table a fixed layout (`layout="fixed"`, and a
|
|
1186
|
+
* resized or virtualized one has it).
|
|
1156
1187
|
* @default null
|
|
1157
1188
|
*/
|
|
1158
1189
|
readonly truncate: import("@angular/core").InputSignal<"tooltip" | null>;
|
|
1190
|
+
/**
|
|
1191
|
+
* How the columns are sized. `'auto'` lets the browser size each column to
|
|
1192
|
+
* its content. `'fixed'` keeps every column at its `width`, shares what is
|
|
1193
|
+
* left between the columns without one, and wraps the text of the header and
|
|
1194
|
+
* body cells: sorting or paging never moves a column. A column's
|
|
1195
|
+
* `truncate` still cuts its cells to one line. Resizing works in both; a
|
|
1196
|
+
* virtualized table keeps its one-line rows.
|
|
1197
|
+
* @default 'auto'
|
|
1198
|
+
*/
|
|
1199
|
+
readonly layout: import("@angular/core").InputSignal<WrTableLayout>;
|
|
1159
1200
|
/**
|
|
1160
1201
|
* A column's name for its controls: the title, the hint after it, or the hint
|
|
1161
1202
|
* alone under an empty title.
|
|
@@ -1252,8 +1293,14 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1252
1293
|
protected readonly windowStart: import("@angular/core").Signal<number>;
|
|
1253
1294
|
/** Rows placed in `<tbody>`. SAME array instance as `renderRows()` when off → byte-identical DOM. */
|
|
1254
1295
|
protected readonly windowRows: import("@angular/core").Signal<readonly RenderRow[]>;
|
|
1255
|
-
/**
|
|
1296
|
+
/** Whether the columns hold their widths: `layout="fixed"`, a resize latch, virtualization or an edit hold. */
|
|
1256
1297
|
protected readonly fixedLayoutActive: import("@angular/core").Signal<boolean>;
|
|
1298
|
+
/**
|
|
1299
|
+
* The fixed layout that also cuts every cell to one line, `.wr-table__table--fixed`.
|
|
1300
|
+
* A virtualized body needs it for its row height. A resize or an edit hold
|
|
1301
|
+
* takes it only over `layout="auto"`, where the cells did not wrap before.
|
|
1302
|
+
*/
|
|
1303
|
+
protected readonly clippedLayout: import("@angular/core").Signal<boolean>;
|
|
1257
1304
|
/** Scroll a flat row index to the top of the virtual viewport. No-op on the server / when not virtual. */
|
|
1258
1305
|
scrollToRow(index: number, behavior?: ScrollBehavior): void;
|
|
1259
1306
|
protected onColumnDrop(event: CdkDragDrop<unknown>): void;
|
|
@@ -1522,7 +1569,8 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1522
1569
|
* titles, then one row per item in the current column order. A cell is what
|
|
1523
1570
|
* the plain cell shows: the column's `empty` for a missing value, its
|
|
1524
1571
|
* `format` over the value, else the raw value. A `[wrTableCell]` template is
|
|
1525
|
-
* not run, so a column drawn by one exports its `format` or its data.
|
|
1572
|
+
* not run, so a column drawn by one exports its `format` or its data. An
|
|
1573
|
+
* `actions` column has no data and is left out.
|
|
1526
1574
|
*
|
|
1527
1575
|
* Covers the current `items`, so in server-side mode (`total` set) it
|
|
1528
1576
|
* exports the current page, while client-side pagination exports every page.
|
|
@@ -1808,6 +1856,11 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1808
1856
|
"required": false;
|
|
1809
1857
|
"isSignal": true;
|
|
1810
1858
|
};
|
|
1859
|
+
"layout": {
|
|
1860
|
+
"alias": "layout";
|
|
1861
|
+
"required": false;
|
|
1862
|
+
"isSignal": true;
|
|
1863
|
+
};
|
|
1811
1864
|
"editable": {
|
|
1812
1865
|
"alias": "editable";
|
|
1813
1866
|
"required": false;
|
|
@@ -2245,4 +2298,4 @@ export declare function wrReadField<T>(item: T, key: string): string | number;
|
|
|
2245
2298
|
* @param accessor Reads the value of a key; defaults to `wrReadField`.
|
|
2246
2299
|
*/
|
|
2247
2300
|
export declare function wrSortRows<T>(rows: readonly T[], sort: readonly WrTableSortState[], accessor?: WrTableSortAccessor<T>): readonly T[];
|
|
2248
|
-
export type { WrTableCellContext, WrTableCellEdit, WrTableChooserColumn, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
2301
|
+
export type { WrTableCellContext, WrTableCellEdit, WrTableChooserColumn, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLayout, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
1
7
|
import * as i0 from "@angular/core";
|
|
2
8
|
import { WrTabsRoutingAdapter } from "ngwr/tabs";
|
|
3
9
|
/**
|
package/types/ngwr-toast.d.ts
CHANGED
|
@@ -161,6 +161,8 @@ export declare class WrToastRef {
|
|
|
161
161
|
* Global defaults come from {@link WR_TOAST_CONFIG}; register
|
|
162
162
|
* `provideWr(withToast(...))` once at bootstrap to customise. Each
|
|
163
163
|
* `show()` call accepts per-toast overrides via {@link WrToastOptions}.
|
|
164
|
+
* `info()`, `success()`, `warning()` and `danger()` are `show()` with the
|
|
165
|
+
* type set and the message first.
|
|
164
166
|
*
|
|
165
167
|
* @example
|
|
166
168
|
* ```ts
|
|
@@ -171,6 +173,7 @@ export declare class WrToastRef {
|
|
|
171
173
|
* toast.show({ message: 'Permalink copied', position: 'bottom', showCopy: true });
|
|
172
174
|
* toast.show({ message: 'Item deleted', action: { label: 'Undo', run: () => restore() } });
|
|
173
175
|
* toast.show({ type: 'danger', message: 'Door forced', outlet: 'alarms' });
|
|
176
|
+
* toast.success('Profile updated.', { title: 'Saved' });
|
|
174
177
|
* ```
|
|
175
178
|
*
|
|
176
179
|
* @see https://ngwr.dev/reference/components/toast
|
|
@@ -197,6 +200,14 @@ export declare class WrToast {
|
|
|
197
200
|
private readonly outlets;
|
|
198
201
|
/** Open a toast. Returns a handle you can `dismiss()` early. */
|
|
199
202
|
show(options: WrToastOptions): WrToastRef;
|
|
203
|
+
/** An `info` toast: `show({ ...options, message, type: 'info' })`. */
|
|
204
|
+
info(message: string, options?: Omit<WrToastOptions, 'message' | 'type'>): WrToastRef;
|
|
205
|
+
/** A `success` toast: `show({ ...options, message, type: 'success' })`. */
|
|
206
|
+
success(message: string, options?: Omit<WrToastOptions, 'message' | 'type'>): WrToastRef;
|
|
207
|
+
/** A `warning` toast: `show({ ...options, message, type: 'warning' })`. */
|
|
208
|
+
warning(message: string, options?: Omit<WrToastOptions, 'message' | 'type'>): WrToastRef;
|
|
209
|
+
/** A `danger` toast: `show({ ...options, message, type: 'danger' })`. */
|
|
210
|
+
danger(message: string, options?: Omit<WrToastOptions, 'message' | 'type'>): WrToastRef;
|
|
200
211
|
/** Dismiss a single toast by id, in whichever stack holds it. */
|
|
201
212
|
dismiss(id: number): void;
|
|
202
213
|
/**
|
package/types/ngwr-tour.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ export declare class WrTypography {
|
|
|
66
66
|
readonly truncate: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
67
67
|
/** Render with monospace font. @default false (auto-true for `code`) */
|
|
68
68
|
readonly mono: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
69
|
+
/** Tabular digits: every digit takes the same width, so amounts line up in a column. @default false */
|
|
70
|
+
readonly numeric: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
69
71
|
protected readonly classes: import("@angular/core").Signal<string>;
|
|
70
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrTypography, never>;
|
|
71
73
|
static ɵdir: i0.ɵɵDirectiveDeclaration<WrTypography, "[wrTypography]", never, {
|
|
@@ -94,6 +96,11 @@ export declare class WrTypography {
|
|
|
94
96
|
"required": false;
|
|
95
97
|
"isSignal": true;
|
|
96
98
|
};
|
|
99
|
+
"numeric": {
|
|
100
|
+
"alias": "numeric";
|
|
101
|
+
"required": false;
|
|
102
|
+
"isSignal": true;
|
|
103
|
+
};
|
|
97
104
|
}, {}, never, never, true, never>;
|
|
98
105
|
}
|
|
99
106
|
export type { WrTypographyAlign, WrTypographyTone, WrTypographyVariant };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
6
|
+
*/
|
|
1
7
|
import { WritableSignal } from "@angular/core";
|
|
2
8
|
import { WrFeature } from "ngwr/utils";
|
|
3
9
|
/**
|
package/types/ngwr-utils.d.ts
CHANGED
|
@@ -211,7 +211,7 @@ type WrDecimalLike = string | number | bigint | null | undefined;
|
|
|
211
211
|
* The `Number.EPSILON` nudge only bites while `|value| < 2`: it is an absolute
|
|
212
212
|
* 2^-52, which is one ulp in `[1, 2)` and a fraction of one above it, so
|
|
213
213
|
* `value + Number.EPSILON === value` for anything larger and the result is
|
|
214
|
-
* plain `Math.round`. Correct for what this is used for — step maths and
|
|
214
|
+
* plain `Math.round`. Halves round away from zero, so `-2.5` is `-3`. Correct for what this is used for — step maths and
|
|
215
215
|
* fraction digits on human-sized numbers — and not a general fixed-point
|
|
216
216
|
* rounder.
|
|
217
217
|
*
|
|
@@ -220,6 +220,7 @@ type WrDecimalLike = string | number | bigint | null | undefined;
|
|
|
220
220
|
* wrRound(0.1 + 0.2, 2); // 0.3
|
|
221
221
|
* wrRound(1.005, 2); // 1.01
|
|
222
222
|
* wrRound(7.4); // 7
|
|
223
|
+
* wrRound(-2.5); // -3
|
|
223
224
|
* ```
|
|
224
225
|
*/
|
|
225
226
|
export declare function wrRound(value: number, decimals?: number): number;
|
|
@@ -499,6 +500,13 @@ export declare function wrGetFocusableElements(root: HTMLElement): readonly HTML
|
|
|
499
500
|
* Returns `true` when focus was redirected (event was handled).
|
|
500
501
|
*/
|
|
501
502
|
export declare function wrTrapFocus(root: HTMLElement, event: KeyboardEvent): boolean;
|
|
503
|
+
/**
|
|
504
|
+
* Record `el` as the element a closing transient overlay (a menu, a popconfirm)
|
|
505
|
+
* gives focus back to, for an overlay it opened that closes later. Called by
|
|
506
|
+
* `wrRestoreFocus` itself, and by an overlay that closed without restoring
|
|
507
|
+
* because focus had already moved on.
|
|
508
|
+
*/
|
|
509
|
+
export declare function wrNoteFocusReturn(el: HTMLElement): void;
|
|
502
510
|
/**
|
|
503
511
|
* Hand focus back to `el` after something closed, as a PROGRAMMATIC focus.
|
|
504
512
|
*
|
|
@@ -507,8 +515,54 @@ export declare function wrTrapFocus(root: HTMLElement, event: KeyboardEvent): bo
|
|
|
507
515
|
* origin (a tooltip on the trigger) then treats the restore as the user tabbing
|
|
508
516
|
* there. `focusVia(el, 'program')` reports the truth. Without a monitor it is a
|
|
509
517
|
* plain `focus()`.
|
|
518
|
+
*
|
|
519
|
+
* An `el` that left the document (a menu item or a confirm button that opened a
|
|
520
|
+
* dialog and was torn down first) is replaced by the element the previous
|
|
521
|
+
* restore handed focus to: the trigger of the transient overlay that held `el`.
|
|
510
522
|
*/
|
|
511
523
|
export declare function wrRestoreFocus(el: HTMLElement, monitor?: FocusMonitor | null): void;
|
|
524
|
+
/** Options of {@link wrFocusFirstInvalid}. */
|
|
525
|
+
interface WrFocusFirstInvalidOptions {
|
|
526
|
+
/**
|
|
527
|
+
* Wait for the next render before looking. Pass it when the call follows
|
|
528
|
+
* `submit()` or `markAllAsTouched()` in the same handler: the marks are drawn
|
|
529
|
+
* by the render that comes after.
|
|
530
|
+
*/
|
|
531
|
+
readonly injector?: Injector;
|
|
532
|
+
/**
|
|
533
|
+
* Passed to `scrollIntoView`, over `{ block: 'center', behavior: 'smooth' }`.
|
|
534
|
+
* `false` leaves the scroll to the browser's own focus behaviour.
|
|
535
|
+
*/
|
|
536
|
+
readonly scroll?: ScrollIntoViewOptions | false;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Focus the first invalid control inside `root` and scroll its field into view,
|
|
540
|
+
* for a submit that was refused. Resolves to whether there was one.
|
|
541
|
+
*
|
|
542
|
+
* Invalid is what ngwr draws: an element with `aria-invalid="true"`, or a
|
|
543
|
+
* `<wr-form-field>` showing an error. A mark on a group (`wr-radio-group`,
|
|
544
|
+
* `wr-segmented`) leads to the first control inside it. Disabled and hidden
|
|
545
|
+
* controls are skipped.
|
|
546
|
+
*
|
|
547
|
+
* The marks exist only once the fields are touched and rendered, so the order
|
|
548
|
+
* is: `submit()` or `markAllAsTouched()`, then this call with an `injector`,
|
|
549
|
+
* which waits for the next render. Without one it looks at once.
|
|
550
|
+
*
|
|
551
|
+
* Scrolling is smooth unless the user asked for reduced motion. On the server
|
|
552
|
+
* it does nothing and resolves to `false`.
|
|
553
|
+
*
|
|
554
|
+
* @example
|
|
555
|
+
* ```ts
|
|
556
|
+
* private readonly injector = inject(Injector);
|
|
557
|
+
* private readonly formEl = viewChild.required<ElementRef<HTMLElement>>('formEl');
|
|
558
|
+
*
|
|
559
|
+
* protected async save(): Promise<void> {
|
|
560
|
+
* const sent = await submit(this.form, async () => this.api.save(this.model()));
|
|
561
|
+
* if (!sent) void wrFocusFirstInvalid(this.formEl().nativeElement, { injector: this.injector });
|
|
562
|
+
* }
|
|
563
|
+
* ```
|
|
564
|
+
*/
|
|
565
|
+
export declare function wrFocusFirstInvalid(root: HTMLElement, options?: WrFocusFirstInvalidOptions): Promise<boolean>;
|
|
512
566
|
/**
|
|
513
567
|
* @license
|
|
514
568
|
*
|
|
@@ -1246,4 +1300,4 @@ export declare function wrKeyedAction<K, A = void, R = void>(fn: (key: K, arg: A
|
|
|
1246
1300
|
* @returns A read-only signal of the value.
|
|
1247
1301
|
*/
|
|
1248
1302
|
export declare function wrResourceValue<T>(resource: Resource<T | undefined>, fallback: NoInfer<T>): Signal<T>;
|
|
1249
|
-
export type { WrAction, WrActionStatus, WrClassInput, WrColorScheme, WrDebouncedFn, WrDecimalLike, WrFeature, WrInitialsOptions, WrInitialsOrder, WrInitialsStyle, WrKey, WrKeyedAction, WrMaybe, WrResolveCssSizeOptions, WrResolvedCssSize, WrSafeAny, WrThrottledFn, WrTypeahead, WrTypeaheadItem, WrTypeaheadOptions, WrWatchColorSchemeOptions };
|
|
1303
|
+
export type { WrAction, WrActionStatus, WrClassInput, WrColorScheme, WrDebouncedFn, WrDecimalLike, WrFeature, WrFocusFirstInvalidOptions, WrInitialsOptions, WrInitialsOrder, WrInitialsStyle, WrKey, WrKeyedAction, WrMaybe, WrResolveCssSizeOptions, WrResolvedCssSize, WrSafeAny, WrThrottledFn, WrTypeahead, WrTypeaheadItem, WrTypeaheadOptions, WrWatchColorSchemeOptions };
|