@truenas/ui-components 0.4.6 → 0.4.8
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/package.json
CHANGED
|
@@ -3196,6 +3196,15 @@ declare class TnCardComponent {
|
|
|
3196
3196
|
elevation: _angular_core.InputSignal<"none" | "low" | "medium" | "high">;
|
|
3197
3197
|
padding: _angular_core.InputSignal<"small" | "large" | "medium">;
|
|
3198
3198
|
padContent: _angular_core.InputSignal<boolean>;
|
|
3199
|
+
/**
|
|
3200
|
+
* Whether the card stretches to fill its container's height.
|
|
3201
|
+
*
|
|
3202
|
+
* Defaults to `true`, which is what an equal-height dashboard grid wants: every card in a row
|
|
3203
|
+
* matches the tallest. Set it to `false` for a card that should size to its content instead —
|
|
3204
|
+
* typically a full-page card wrapping a table, which otherwise leaves a large empty area below
|
|
3205
|
+
* the content when the page is taller than the table.
|
|
3206
|
+
*/
|
|
3207
|
+
fillHeight: _angular_core.InputSignal<boolean>;
|
|
3199
3208
|
bordered: _angular_core.InputSignal<boolean>;
|
|
3200
3209
|
background: _angular_core.InputSignal<boolean>;
|
|
3201
3210
|
headerStatus: _angular_core.InputSignal<TnCardHeaderStatus | undefined>;
|
|
@@ -3225,7 +3234,7 @@ declare class TnCardComponent {
|
|
|
3225
3234
|
onHeaderMenuItemClick(_item: TnMenuItem): void;
|
|
3226
3235
|
getStatusClass(type?: string): string;
|
|
3227
3236
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnCardComponent, never>;
|
|
3228
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCardComponent, "tn-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "titleLink": { "alias": "titleLink"; "required": false; "isSignal": true; }; "titleRouterLink": { "alias": "titleRouterLink"; "required": false; "isSignal": true; }; "titleQueryParams": { "alias": "titleQueryParams"; "required": false; "isSignal": true; }; "titleTooltip": { "alias": "titleTooltip"; "required": false; "isSignal": true; }; "elevation": { "alias": "elevation"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "padContent": { "alias": "padContent"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; "headerStatus": { "alias": "headerStatus"; "required": false; "isSignal": true; }; "headerControl": { "alias": "headerControl"; "required": false; "isSignal": true; }; "headerMenu": { "alias": "headerMenu"; "required": false; "isSignal": true; }; "headerMenuTriggerTestId": { "alias": "headerMenuTriggerTestId"; "required": false; "isSignal": true; }; "primaryAction": { "alias": "primaryAction"; "required": false; "isSignal": true; }; "secondaryAction": { "alias": "secondaryAction"; "required": false; "isSignal": true; }; "footerLink": { "alias": "footerLink"; "required": false; "isSignal": true; }; }, {}, ["projectedHeader", "headerActions", "footerActions"], ["[tnCardHeader]", "*"], true, never>;
|
|
3237
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCardComponent, "tn-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "titleLink": { "alias": "titleLink"; "required": false; "isSignal": true; }; "titleRouterLink": { "alias": "titleRouterLink"; "required": false; "isSignal": true; }; "titleQueryParams": { "alias": "titleQueryParams"; "required": false; "isSignal": true; }; "titleTooltip": { "alias": "titleTooltip"; "required": false; "isSignal": true; }; "elevation": { "alias": "elevation"; "required": false; "isSignal": true; }; "padding": { "alias": "padding"; "required": false; "isSignal": true; }; "padContent": { "alias": "padContent"; "required": false; "isSignal": true; }; "fillHeight": { "alias": "fillHeight"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; "headerStatus": { "alias": "headerStatus"; "required": false; "isSignal": true; }; "headerControl": { "alias": "headerControl"; "required": false; "isSignal": true; }; "headerMenu": { "alias": "headerMenu"; "required": false; "isSignal": true; }; "headerMenuTriggerTestId": { "alias": "headerMenuTriggerTestId"; "required": false; "isSignal": true; }; "primaryAction": { "alias": "primaryAction"; "required": false; "isSignal": true; }; "secondaryAction": { "alias": "secondaryAction"; "required": false; "isSignal": true; }; "footerLink": { "alias": "footerLink"; "required": false; "isSignal": true; }; }, {}, ["projectedHeader", "headerActions", "footerActions"], ["[tnCardHeader]", "*"], true, never>;
|
|
3229
3238
|
}
|
|
3230
3239
|
|
|
3231
3240
|
/**
|
|
@@ -3651,6 +3660,12 @@ declare class TnRadioComponent implements AfterViewInit, OnDestroy, ControlValue
|
|
|
3651
3660
|
radioEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
3652
3661
|
label: _angular_core.InputSignal<string>;
|
|
3653
3662
|
value: _angular_core.InputSignal<unknown>;
|
|
3663
|
+
/**
|
|
3664
|
+
* Native `name`, which is what binds radios into one keyboard-navigable set. Inside a
|
|
3665
|
+
* `tn-radio-group` it takes precedence over the group's own name — which means setting it there
|
|
3666
|
+
* quietly excludes this option from the group's arrow-key navigation and lets it be checked
|
|
3667
|
+
* alongside a sibling. Only set it on a standalone radio.
|
|
3668
|
+
*/
|
|
3654
3669
|
name: _angular_core.InputSignal<string | undefined>;
|
|
3655
3670
|
disabled: _angular_core.InputSignal<boolean>;
|
|
3656
3671
|
required: _angular_core.InputSignal<boolean>;
|
|
@@ -3658,11 +3673,34 @@ declare class TnRadioComponent implements AfterViewInit, OnDestroy, ControlValue
|
|
|
3658
3673
|
/** Test-id base, falling back to the bound control name when `testId` is unset. */
|
|
3659
3674
|
protected resolvedTestId: _angular_core.Signal<TnTestIdValue>;
|
|
3660
3675
|
error: _angular_core.InputSignal<string | null>;
|
|
3676
|
+
/**
|
|
3677
|
+
* Emits the picked value — only while standalone. Inside a `tn-radio-group` the group's own
|
|
3678
|
+
* `change` is the single public event, so bind it there instead.
|
|
3679
|
+
*/
|
|
3661
3680
|
change: _angular_core.OutputEmitterRef<unknown>;
|
|
3662
3681
|
id: string;
|
|
3663
|
-
|
|
3682
|
+
/**
|
|
3683
|
+
* The enclosing `tn-radio-group`, when there is one. Present for options rendered from the
|
|
3684
|
+
* group's `options` input as well as for projected ones — element injectors chain through the
|
|
3685
|
+
* template an element is *declared* in, which is the group either way. With groups nested in
|
|
3686
|
+
* projected content it resolves to the nearest one, so an option always derives its state from
|
|
3687
|
+
* the group it visually belongs to.
|
|
3688
|
+
*/
|
|
3689
|
+
private group;
|
|
3690
|
+
/**
|
|
3691
|
+
* Checked state while standalone. Ignored inside a group, where {@link checked} derives from the
|
|
3692
|
+
* group's value instead — the state that used to go stale, because Angular suppresses the
|
|
3693
|
+
* model→view write on whichever accessor originated a change.
|
|
3694
|
+
*/
|
|
3695
|
+
private standaloneChecked;
|
|
3696
|
+
/** Whether this option renders as selected. */
|
|
3697
|
+
checked: _angular_core.Signal<boolean>;
|
|
3698
|
+
/** Native `name`: the group's (binding its options into one keyboard set) unless overridden. */
|
|
3699
|
+
resolvedName: _angular_core.Signal<string | undefined>;
|
|
3664
3700
|
private formDisabled;
|
|
3665
3701
|
isDisabled: _angular_core.Signal<boolean>;
|
|
3702
|
+
/** Own `required` input, or the enclosing group's. */
|
|
3703
|
+
isRequired: _angular_core.Signal<boolean>;
|
|
3666
3704
|
private focusMonitor;
|
|
3667
3705
|
private onChange;
|
|
3668
3706
|
private onTouched;
|
|
@@ -3673,6 +3711,12 @@ declare class TnRadioComponent implements AfterViewInit, OnDestroy, ControlValue
|
|
|
3673
3711
|
registerOnTouched(fn: () => void): void;
|
|
3674
3712
|
setDisabledState(isDisabled: boolean): void;
|
|
3675
3713
|
onRadioChange(event: Event): void;
|
|
3714
|
+
/**
|
|
3715
|
+
* Writes the resolved {@link checked} state straight to the input, past Angular's binding diff.
|
|
3716
|
+
* Called by the enclosing group after a pick: the browser has already flipped two inputs by
|
|
3717
|
+
* then, and `[checked]` only rewrites an input whose bound value actually changed.
|
|
3718
|
+
*/
|
|
3719
|
+
syncNativeChecked(): void;
|
|
3676
3720
|
classes: _angular_core.Signal<string[]>;
|
|
3677
3721
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnRadioComponent, never>;
|
|
3678
3722
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnRadioComponent, "tn-radio", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, { "change": "change"; }, never, never, true, never>;
|
|
@@ -3791,6 +3835,304 @@ interface RadioHarnessFilters extends BaseHarnessFilters {
|
|
|
3791
3835
|
testId?: string;
|
|
3792
3836
|
}
|
|
3793
3837
|
|
|
3838
|
+
/**
|
|
3839
|
+
* The slice of `tn-radio-group` a child `tn-radio` needs, published over DI so the two components
|
|
3840
|
+
* can talk without importing each other (the group renders radios in its own template, so the
|
|
3841
|
+
* dependency has to be one-way).
|
|
3842
|
+
*
|
|
3843
|
+
* A radio that finds this token defers all selection state to the group: the group owns the value,
|
|
3844
|
+
* the native `name` that binds the options into one keyboard-navigable set, and the
|
|
3845
|
+
* disabled/required state. A radio that doesn't find it (used standalone) keeps its own
|
|
3846
|
+
* `ControlValueAccessor` behaviour.
|
|
3847
|
+
*/
|
|
3848
|
+
interface TnRadioGroupApi {
|
|
3849
|
+
/** Native `name` shared by every option in the group. */
|
|
3850
|
+
resolvedName: Signal<string>;
|
|
3851
|
+
/** Whether the whole group is disabled — via its input or a disabled bound form control. */
|
|
3852
|
+
isDisabled: Signal<boolean>;
|
|
3853
|
+
/** Whether the group is required, propagated to each option's native `required`. */
|
|
3854
|
+
isRequired: Signal<boolean>;
|
|
3855
|
+
/**
|
|
3856
|
+
* Whether `value` is the group's current selection. Reactive: reads the group's value signal,
|
|
3857
|
+
* so a radio can call it from inside a `computed`.
|
|
3858
|
+
*/
|
|
3859
|
+
isSelected(value: unknown): boolean;
|
|
3860
|
+
/** Records a user pick, notifying the bound form control. */
|
|
3861
|
+
select(value: unknown): void;
|
|
3862
|
+
}
|
|
3863
|
+
/** DI token under which `tn-radio-group` exposes its {@link TnRadioGroupApi} to child radios. */
|
|
3864
|
+
declare const TN_RADIO_GROUP: InjectionToken<TnRadioGroupApi>;
|
|
3865
|
+
|
|
3866
|
+
/** One selectable option of a `tn-radio-group` rendered from its `options` input. */
|
|
3867
|
+
interface TnRadioOption<T = unknown> {
|
|
3868
|
+
value: T;
|
|
3869
|
+
label: string;
|
|
3870
|
+
disabled?: boolean;
|
|
3871
|
+
}
|
|
3872
|
+
/**
|
|
3873
|
+
* A `role="radiogroup"` wrapper that owns the selection for a set of `tn-radio`s.
|
|
3874
|
+
*
|
|
3875
|
+
* `tn-radio` on its own is a per-option `ControlValueAccessor`, which makes a hand-rolled group
|
|
3876
|
+
* (one `[formControl]` bound to every option) go stale: Angular suppresses the model→view write on
|
|
3877
|
+
* the accessor that originated a change, so the previously checked option keeps rendering as
|
|
3878
|
+
* checked. The group fixes that at the source — it is the single accessor, and each child derives
|
|
3879
|
+
* its checked state from the group's value, so there is nothing to fall out of step.
|
|
3880
|
+
*
|
|
3881
|
+
* Options come from either the `options` input or projected `<tn-radio>` children; both resolve the
|
|
3882
|
+
* group through DI, so the two forms behave identically and can be mixed.
|
|
3883
|
+
*
|
|
3884
|
+
* ```html
|
|
3885
|
+
* <tn-form-field label="Encryption">
|
|
3886
|
+
* <tn-radio-group formControlName="encryption" [options]="encryptionOptions" />
|
|
3887
|
+
* </tn-form-field>
|
|
3888
|
+
*
|
|
3889
|
+
* <tn-radio-group [formControl]="control" ariaLabel="Encryption">
|
|
3890
|
+
* <tn-radio label="None" value="none" />
|
|
3891
|
+
* <tn-radio label="Passphrase" value="passphrase" />
|
|
3892
|
+
* </tn-radio-group>
|
|
3893
|
+
* ```
|
|
3894
|
+
*
|
|
3895
|
+
* Inside a `tn-form-field` the group is a normal control: the field names it via
|
|
3896
|
+
* `aria-labelledby`, infers the required indicator from its validators, and renders its validation
|
|
3897
|
+
* message — none of which a bare set of radios gets.
|
|
3898
|
+
*/
|
|
3899
|
+
declare class TnRadioGroupComponent<T = unknown> implements ControlValueAccessor, TnRadioGroupApi {
|
|
3900
|
+
/**
|
|
3901
|
+
* Options to render. Leave unset to project `<tn-radio>` children instead — the group drives
|
|
3902
|
+
* both the same way.
|
|
3903
|
+
*
|
|
3904
|
+
* Options are tracked by `value`, so object values must be referentially stable — rebuilding
|
|
3905
|
+
* them as fresh literals on every change detection pass re-creates the whole list. Same
|
|
3906
|
+
* requirement the `compareWith` case implies; hold the objects in a field.
|
|
3907
|
+
*/
|
|
3908
|
+
options: _angular_core.InputSignal<TnRadioOption<T>[]>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Lays the options out in a wrapping row instead of stacking them. Opt-in: stacked is the right
|
|
3911
|
+
* default for anything longer than a two-option yes/no, the only shape a row reads well at.
|
|
3912
|
+
*/
|
|
3913
|
+
inline: _angular_core.InputSignal<boolean>;
|
|
3914
|
+
/**
|
|
3915
|
+
* Native `name` shared by the options, which is what makes the browser treat them as one group
|
|
3916
|
+
* for arrow-key navigation. Defaults to a per-instance generated name; set it only when
|
|
3917
|
+
* something outside the group depends on the value. The scope of a native radio `name` is the
|
|
3918
|
+
* whole form (or document), so two groups sharing an explicit name fuse into one — prefer the
|
|
3919
|
+
* default when the same call site can render more than once.
|
|
3920
|
+
*
|
|
3921
|
+
* It is the group's name that binds the set, so a projected `<tn-radio name="…">` overrides it
|
|
3922
|
+
* for itself and drops out: still rendered inside the group, but outside its arrow-key
|
|
3923
|
+
* navigation and independently checkable. Leave `name` off projected children.
|
|
3924
|
+
*/
|
|
3925
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
3926
|
+
/**
|
|
3927
|
+
* Explicit accessible name for the group. Inside a `tn-form-field` with a label this is
|
|
3928
|
+
* unnecessary — the field names the group automatically — but a group with neither is announced
|
|
3929
|
+
* as an unlabeled radiogroup.
|
|
3930
|
+
*/
|
|
3931
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
3932
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
3933
|
+
/** Propagated to each option's native `required`, so an unpicked group blocks native submit. */
|
|
3934
|
+
required: _angular_core.InputSignal<boolean>;
|
|
3935
|
+
/**
|
|
3936
|
+
* Test-id base for the group and, scoped by the option label, for every option rendered from
|
|
3937
|
+
* `options`: base `encryption` yields `radio-group-encryption` on the group and
|
|
3938
|
+
* `radio-encryption-passphrase` on its options. Falls back to the bound control name.
|
|
3939
|
+
*
|
|
3940
|
+
* Projected `<tn-radio>` children keep their own test-id resolution — the group does not reach
|
|
3941
|
+
* into content it did not render — so give each one a `testId` of its own.
|
|
3942
|
+
*/
|
|
3943
|
+
testId: _angular_core.InputSignal<TnTestIdValue>;
|
|
3944
|
+
/**
|
|
3945
|
+
* Custom comparator for matching option values against the selected value. Provide it when
|
|
3946
|
+
* option values are objects — the default is identity, so a structurally-equal-but-distinct
|
|
3947
|
+
* object would leave the group rendering nothing as checked.
|
|
3948
|
+
*
|
|
3949
|
+
* Called once per option on every check, including while nothing is selected — the selected
|
|
3950
|
+
* value is `null` then, so the comparator must tolerate `null` on either side rather than
|
|
3951
|
+
* dereferencing straight into a property.
|
|
3952
|
+
*
|
|
3953
|
+
* @example
|
|
3954
|
+
* ```ts
|
|
3955
|
+
* compareWith = (a, b) => a?.id === b?.id;
|
|
3956
|
+
* ```
|
|
3957
|
+
*/
|
|
3958
|
+
compareWith: _angular_core.InputSignal<((a: T | null, b: T | null) => boolean) | undefined>;
|
|
3959
|
+
/** Emits the newly selected value on every user pick (not on programmatic writes). */
|
|
3960
|
+
change: _angular_core.OutputEmitterRef<T | null>;
|
|
3961
|
+
/**
|
|
3962
|
+
* ARIA wiring from an enclosing `tn-form-field` (label, error/hint, invalid, required).
|
|
3963
|
+
* All-null standalone, or when `ariaLabel` overrides the field's label.
|
|
3964
|
+
*/
|
|
3965
|
+
protected readonly fieldAria: _truenas_ui_components.TnFormFieldAriaBindings;
|
|
3966
|
+
/** Test-id base, falling back to the bound control name when `testId` is unset. */
|
|
3967
|
+
protected readonly resolvedTestId: _angular_core.Signal<TnTestIdValue>;
|
|
3968
|
+
/** Options rendered from `options` (view) and projected ones (content) — see {@link syncNativeChecked}. */
|
|
3969
|
+
private readonly renderedOptions;
|
|
3970
|
+
/**
|
|
3971
|
+
* `descendants: true` so a projected option wrapped in markup is still found. This over-matches
|
|
3972
|
+
* a `tn-radio-group` nested in the projected content, picking up its options too — harmless,
|
|
3973
|
+
* because {@link syncNativeChecked} has each option write its *own* resolved checked state, and
|
|
3974
|
+
* that derives from the option's nearest group rather than from this one.
|
|
3975
|
+
*/
|
|
3976
|
+
private readonly projectedOptions;
|
|
3977
|
+
private readonly uid;
|
|
3978
|
+
private readonly selectedValue;
|
|
3979
|
+
private readonly formDisabled;
|
|
3980
|
+
/** Group name handed to every child radio; generated per instance unless `name` is set. */
|
|
3981
|
+
readonly resolvedName: _angular_core.Signal<string>;
|
|
3982
|
+
/**
|
|
3983
|
+
* Combined disabled state (own input plus a disabled bound control), read by child radios and
|
|
3984
|
+
* announced on the group root. The native `disabled` on each option is what blocks interaction;
|
|
3985
|
+
* `aria-disabled` on the radiogroup is what tells a screen reader landing on the container
|
|
3986
|
+
* about it, and gives styling an `[aria-disabled]` hook for the group as a whole.
|
|
3987
|
+
*/
|
|
3988
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
3989
|
+
/**
|
|
3990
|
+
* Required state read by child radios, which render it as the native attribute. Deliberately
|
|
3991
|
+
* *not* widened to an enclosing `tn-form-field`'s inferred required state: native constraint
|
|
3992
|
+
* validation on a radio would block submission with a browser popup, which is not what attaching
|
|
3993
|
+
* `Validators.required` to a control asks for. The inferred state still reaches assistive tech —
|
|
3994
|
+
* see the group's `aria-required` binding.
|
|
3995
|
+
*/
|
|
3996
|
+
readonly isRequired: _angular_core.Signal<boolean>;
|
|
3997
|
+
/** Whether the group announces itself as required: its own input, or the field's inferred state. */
|
|
3998
|
+
protected readonly ariaRequired: _angular_core.Signal<boolean>;
|
|
3999
|
+
private onChange;
|
|
4000
|
+
private onTouched;
|
|
4001
|
+
isSelected(value: unknown): boolean;
|
|
4002
|
+
select(value: unknown): void;
|
|
4003
|
+
writeValue(value: T | null): void;
|
|
4004
|
+
registerOnChange(fn: (value: T | null) => void): void;
|
|
4005
|
+
registerOnTouched(fn: () => void): void;
|
|
4006
|
+
setDisabledState(isDisabled: boolean): void;
|
|
4007
|
+
/**
|
|
4008
|
+
* Marks the control touched when focus leaves the group. `focusout` also fires while moving
|
|
4009
|
+
* between the group's own options, which is harmless — the user has interacted either way — and
|
|
4010
|
+
* it is the only blur signal available, since a radio's blur does not bubble.
|
|
4011
|
+
*/
|
|
4012
|
+
protected onFocusOut(): void;
|
|
4013
|
+
/**
|
|
4014
|
+
* Reconciles every option's native `checked` with the group's value. A pick reaches the DOM
|
|
4015
|
+
* before Angular: the browser checks the clicked input and unchecks its sibling on its own, and
|
|
4016
|
+
* `[checked]` then only rewrites an input whose bound value actually changed. When the value
|
|
4017
|
+
* lands somewhere the bindings don't account for — a consumer reverting the pick, a comparator
|
|
4018
|
+
* that matches neither option — one or both inputs are left showing the browser's guess.
|
|
4019
|
+
*/
|
|
4020
|
+
private syncNativeChecked;
|
|
4021
|
+
/** Per-option test-id segments: the group's base scoped by the option label. */
|
|
4022
|
+
protected optionTestId(option: TnRadioOption<T>): TnTestIdValue;
|
|
4023
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnRadioGroupComponent<any>, never>;
|
|
4024
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnRadioGroupComponent<any>, "tn-radio-group", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; }, { "change": "change"; }, ["projectedOptions"], ["*"], true, never>;
|
|
4025
|
+
}
|
|
4026
|
+
|
|
4027
|
+
/**
|
|
4028
|
+
* Harness for interacting with `tn-radio-group` in tests.
|
|
4029
|
+
* Drives the group as a whole — picking an option by label, reading the current selection —
|
|
4030
|
+
* rather than reaching for each `tn-radio` individually.
|
|
4031
|
+
*
|
|
4032
|
+
* @example
|
|
4033
|
+
* ```typescript
|
|
4034
|
+
* const group = await loader.getHarness(TnRadioGroupHarness.with({ testId: 'encryption' }));
|
|
4035
|
+
* await group.select('Passphrase');
|
|
4036
|
+
* expect(await group.getCheckedLabel()).toBe('Passphrase');
|
|
4037
|
+
* ```
|
|
4038
|
+
*/
|
|
4039
|
+
declare class TnRadioGroupHarness extends ComponentHarness {
|
|
4040
|
+
/** The selector for the host element of a `TnRadioGroupComponent` instance. */
|
|
4041
|
+
static hostSelector: string;
|
|
4042
|
+
private _root;
|
|
4043
|
+
private _radios;
|
|
4044
|
+
/**
|
|
4045
|
+
* Gets a `HarnessPredicate` that can be used to search for a radio group with specific
|
|
4046
|
+
* attributes.
|
|
4047
|
+
*
|
|
4048
|
+
* @param options Options for filtering which radio group instances are considered a match.
|
|
4049
|
+
* @returns A `HarnessPredicate` configured with the given options.
|
|
4050
|
+
*
|
|
4051
|
+
* @example
|
|
4052
|
+
* ```typescript
|
|
4053
|
+
* // Find by accessible name
|
|
4054
|
+
* const group = await loader.getHarness(TnRadioGroupHarness.with({ ariaLabel: 'Encryption' }));
|
|
4055
|
+
*
|
|
4056
|
+
* // Find by testId
|
|
4057
|
+
* const group = await loader.getHarness(TnRadioGroupHarness.with({ testId: 'radio-group-encryption' }));
|
|
4058
|
+
* ```
|
|
4059
|
+
*/
|
|
4060
|
+
static with(options?: RadioGroupHarnessFilters): HarnessPredicate<TnRadioGroupHarness>;
|
|
4061
|
+
/**
|
|
4062
|
+
* Gets the harnesses for the group's options, in DOM order.
|
|
4063
|
+
*
|
|
4064
|
+
* @example
|
|
4065
|
+
* ```typescript
|
|
4066
|
+
* const options = await group.getOptions();
|
|
4067
|
+
* expect(options).toHaveLength(2);
|
|
4068
|
+
* ```
|
|
4069
|
+
*/
|
|
4070
|
+
getOptions(): Promise<TnRadioHarness[]>;
|
|
4071
|
+
/**
|
|
4072
|
+
* Gets the label text of every option, in DOM order.
|
|
4073
|
+
*
|
|
4074
|
+
* @example
|
|
4075
|
+
* ```typescript
|
|
4076
|
+
* expect(await group.getOptionLabels()).toEqual(['None', 'Passphrase']);
|
|
4077
|
+
* ```
|
|
4078
|
+
*/
|
|
4079
|
+
getOptionLabels(): Promise<string[]>;
|
|
4080
|
+
/**
|
|
4081
|
+
* Gets the label of the currently checked option, or null when nothing is selected.
|
|
4082
|
+
*
|
|
4083
|
+
* @example
|
|
4084
|
+
* ```typescript
|
|
4085
|
+
* expect(await group.getCheckedLabel()).toBe('Passphrase');
|
|
4086
|
+
* ```
|
|
4087
|
+
*/
|
|
4088
|
+
getCheckedLabel(): Promise<string | null>;
|
|
4089
|
+
/**
|
|
4090
|
+
* Selects the option with the given label. Throws when the group has no such option, so a
|
|
4091
|
+
* renamed or missing option fails loudly instead of silently leaving the selection unchanged.
|
|
4092
|
+
*
|
|
4093
|
+
* @param label Label text of the option to select.
|
|
4094
|
+
*
|
|
4095
|
+
* @example
|
|
4096
|
+
* ```typescript
|
|
4097
|
+
* await group.select('Passphrase');
|
|
4098
|
+
* ```
|
|
4099
|
+
*/
|
|
4100
|
+
select(label: string): Promise<void>;
|
|
4101
|
+
/**
|
|
4102
|
+
* Checks whether every option is disabled — the state a disabled group or a disabled bound
|
|
4103
|
+
* form control produces. Use {@link getOptions} to inspect a single per-option `disabled`.
|
|
4104
|
+
*
|
|
4105
|
+
* @example
|
|
4106
|
+
* ```typescript
|
|
4107
|
+
* expect(await group.isDisabled()).toBe(true);
|
|
4108
|
+
* ```
|
|
4109
|
+
*/
|
|
4110
|
+
isDisabled(): Promise<boolean>;
|
|
4111
|
+
/**
|
|
4112
|
+
* Gets the group's accessible name as written by the `ariaLabel` input, or null when the name
|
|
4113
|
+
* comes from an enclosing `tn-form-field` (see {@link getAriaLabelledBy}).
|
|
4114
|
+
*/
|
|
4115
|
+
getAriaLabel(): Promise<string | null>;
|
|
4116
|
+
/** Gets the id the group's accessible name is delegated to, or null. */
|
|
4117
|
+
getAriaLabelledBy(): Promise<string | null>;
|
|
4118
|
+
/**
|
|
4119
|
+
* Gets the test ID attribute value of the group root.
|
|
4120
|
+
*
|
|
4121
|
+
* @example
|
|
4122
|
+
* ```typescript
|
|
4123
|
+
* expect(await group.getTestId()).toBe('radio-group-encryption');
|
|
4124
|
+
* ```
|
|
4125
|
+
*/
|
|
4126
|
+
getTestId(): Promise<string | null>;
|
|
4127
|
+
}
|
|
4128
|
+
/** A set of criteria that can be used to filter a list of `TnRadioGroupHarness` instances. */
|
|
4129
|
+
interface RadioGroupHarnessFilters extends BaseHarnessFilters {
|
|
4130
|
+
/** Filters by the group's `aria-label`. Supports string or regex matching. */
|
|
4131
|
+
ariaLabel?: string | RegExp;
|
|
4132
|
+
/** Filters by the resolved test-id attribute on the group root. */
|
|
4133
|
+
testId?: string;
|
|
4134
|
+
}
|
|
4135
|
+
|
|
3794
4136
|
type SlideToggleColor = 'primary' | 'accent' | 'warn';
|
|
3795
4137
|
declare class TnSlideToggleComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
3796
4138
|
toggleEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
@@ -10939,5 +11281,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
|
|
|
10939
11281
|
*/
|
|
10940
11282
|
declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
|
|
10941
11283
|
|
|
10942
|
-
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, THEME_MAP, THEME_STORAGE_KEY, TN_CALENDAR_INTL, TN_CALENDAR_INTL_DEFAULTS, TN_FORM_FIELD_CONTEXT, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarCellHarness, TnCalendarComponent, TnCalendarHarness, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerHarness, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeDataSource, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeHarness, TnTreeNodeComponent, TnTreeNodeHarness, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, allowsCurrentDirectorySelection, composeTestId, controlTestId, createFlatTreeControl, createLucideLibrary, createNestedTreeControl, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, getSelectableTypes, injectTnCalendarIntl, injectTnFormFieldAria, isPathWithinRoot, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, normalizeRootPath, optionTestId, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
10943
|
-
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CalendarCellFill, CalendarCellHarnessFilters, CalendarHarnessFilters, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerCreateAction, FilePickerCreateActionEvent, FilePickerError, FilePickerHarnessFilters, FilePickerMode, FileSystemItem, FileSystemItemType, FlatTreeControlOptions, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, NestedTreeControlOptions, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCalendarIntl, TnCalendarIntlInput, TnCalendarView, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldAriaBindings, TnFormFieldContext, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnOptionTestIdSource, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeExpansion, TnTreeHarnessFilters, TnTreeNodeHarnessFilters, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|
|
11284
|
+
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, THEME_MAP, THEME_STORAGE_KEY, TN_CALENDAR_INTL, TN_CALENDAR_INTL_DEFAULTS, TN_FORM_FIELD_CONTEXT, TN_FORM_FIELD_ERRORS, TN_RADIO_GROUP, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarCellHarness, TnCalendarComponent, TnCalendarHarness, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerHarness, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeDataSource, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioGroupComponent, TnRadioGroupHarness, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeHarness, TnTreeNodeComponent, TnTreeNodeHarness, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, allowsCurrentDirectorySelection, composeTestId, controlTestId, createFlatTreeControl, createLucideLibrary, createNestedTreeControl, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, getSelectableTypes, injectTnCalendarIntl, injectTnFormFieldAria, isPathWithinRoot, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, normalizeRootPath, optionTestId, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
11285
|
+
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CalendarCellFill, CalendarCellHarnessFilters, CalendarHarnessFilters, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerCreateAction, FilePickerCreateActionEvent, FilePickerError, FilePickerHarnessFilters, FilePickerMode, FileSystemItem, FileSystemItemType, FlatTreeControlOptions, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, NestedTreeControlOptions, PathSegment, PlatformType, ProgressBarMode, RadioGroupHarnessFilters, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCalendarIntl, TnCalendarIntlInput, TnCalendarView, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldAriaBindings, TnFormFieldContext, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnOptionTestIdSource, TnRadioGroupApi, TnRadioOption, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeExpansion, TnTreeHarnessFilters, TnTreeNodeHarnessFilters, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|