mn-angular-lib 1.0.173 → 1.0.175
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
|
@@ -684,6 +684,11 @@ type MnInputBaseProps = {
|
|
|
684
684
|
* Use it to give an accessible name to an input rendered without a visible label.
|
|
685
685
|
*/
|
|
686
686
|
ariaLabel?: string;
|
|
687
|
+
/**
|
|
688
|
+
* Id of the option a surrounding listbox has highlighted, set as `aria-activedescendant`. Used by
|
|
689
|
+
* the select's search box, which keeps focus while the arrow keys move through the options.
|
|
690
|
+
*/
|
|
691
|
+
ariaActiveDescendant?: string | null;
|
|
687
692
|
/** Input mask (e.g., '(000) 000-0000') */
|
|
688
693
|
mask?: string;
|
|
689
694
|
/** Autocomplete attribute */
|
|
@@ -2858,6 +2863,8 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2858
2863
|
private readonly destroyRef;
|
|
2859
2864
|
private readonly renderer;
|
|
2860
2865
|
private readonly cdr;
|
|
2866
|
+
/** Injector for the after-render scroll of the highlighted option. */
|
|
2867
|
+
private readonly injector;
|
|
2861
2868
|
/** Reference to the trigger element for positioning the dropdown */
|
|
2862
2869
|
triggerRef: ElementRef<HTMLElement>;
|
|
2863
2870
|
/** Layout classes for the anchored popover panel. The mobile sheet is rendered by
|
|
@@ -2926,6 +2933,11 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2926
2933
|
isOpen: boolean;
|
|
2927
2934
|
isDisabled: boolean;
|
|
2928
2935
|
searchTerm: string;
|
|
2936
|
+
/**
|
|
2937
|
+
* Position in `filteredOptions` of the option the keyboard is on, or -1 for none. Reset when the
|
|
2938
|
+
* list it indexes changes (a search) or goes away (close), so it never points at a stale row.
|
|
2939
|
+
*/
|
|
2940
|
+
activeIndex: number;
|
|
2929
2941
|
/** Dropdown position calculated from trigger bounding rect */
|
|
2930
2942
|
/** Inline placement of the anchored panel; `maxHeight` only binds when the viewport is the tighter cap. */
|
|
2931
2943
|
dropdownStyle: {
|
|
@@ -3041,7 +3053,53 @@ declare class MnMultiSelect implements OnInit {
|
|
|
3041
3053
|
removeOption(option: MnMultiSelectOption, event: Event): void;
|
|
3042
3054
|
isSelected(option: MnMultiSelectOption): boolean;
|
|
3043
3055
|
isMaxReached(option: MnMultiSelectOption): boolean;
|
|
3056
|
+
/** Filters the options; the first match is highlighted so Enter toggles it, none once the box is cleared. */
|
|
3044
3057
|
onSearch(term: string): void;
|
|
3058
|
+
/**
|
|
3059
|
+
* Whether the keyboard may highlight an option: not disabled, and not blocked by `maxSelections`.
|
|
3060
|
+
* An arrow function so it can be handed to `stepEnabledIndex` as it is.
|
|
3061
|
+
*/
|
|
3062
|
+
private readonly isChoosable;
|
|
3063
|
+
/** Id of the keyboard-highlighted option, for `aria-activedescendant`; null when none is. */
|
|
3064
|
+
get activeOptionId(): string | null;
|
|
3065
|
+
/**
|
|
3066
|
+
* The DOM id of the option rendered at a position in `filteredOptions`.
|
|
3067
|
+
* @param index - The option's position.
|
|
3068
|
+
* @returns The id, unique per multi-select.
|
|
3069
|
+
*/
|
|
3070
|
+
optionId(index: number): string;
|
|
3071
|
+
/**
|
|
3072
|
+
* Keyboard handling for the trigger and the search box, the WAI-ARIA combobox pattern. While
|
|
3073
|
+
* closed, ArrowDown, ArrowUp, Enter and Space open the list with an option highlighted. While
|
|
3074
|
+
* open, the arrows move the highlight past disabled options without wrapping, Home and End jump
|
|
3075
|
+
* to the ends, Enter (and Space outside the search box) toggles the highlighted option and keeps the list open for the next one, Escape closes and Tab closes and lets focus move on. Enter and Space
|
|
3076
|
+
* stop here, so they can never submit a surrounding form or close a surrounding modal.
|
|
3077
|
+
* @param event - The keydown.
|
|
3078
|
+
* @param fromSearch - True when it came from the search box, where Space, Home and End edit text.
|
|
3079
|
+
*/
|
|
3080
|
+
onKeydown(event: KeyboardEvent, fromSearch?: boolean): void;
|
|
3081
|
+
/**
|
|
3082
|
+
* Moves the highlight one enabled option from `from` and scrolls it into view.
|
|
3083
|
+
* @param from - Where to step from; -1 to start at an end.
|
|
3084
|
+
* @param step - 1 for down, -1 for up.
|
|
3085
|
+
*/
|
|
3086
|
+
private moveActive;
|
|
3087
|
+
/**
|
|
3088
|
+
* Toggles the highlighted option. The list stays open, as it does for a click, so several options
|
|
3089
|
+
* can be picked in a row.
|
|
3090
|
+
* @param event - The Enter or Space keydown, claimed so a form around the field is not submitted.
|
|
3091
|
+
*/
|
|
3092
|
+
private toggleActive;
|
|
3093
|
+
/**
|
|
3094
|
+
* Takes a key for the field: no default action (no scroll, no form submit) and no bubbling to a
|
|
3095
|
+
* surrounding modal's own Enter or Escape handling.
|
|
3096
|
+
* @param event - The keydown to claim.
|
|
3097
|
+
*/
|
|
3098
|
+
private claim;
|
|
3099
|
+
/** Scrolls the highlighted option into view once the render that paints its ring has run. */
|
|
3100
|
+
private revealActiveOption;
|
|
3101
|
+
/** Puts focus back on the trigger. */
|
|
3102
|
+
private focusTrigger;
|
|
3045
3103
|
get filteredOptions(): MnMultiSelectOption[];
|
|
3046
3104
|
get selectedOptions(): MnMultiSelectOption[];
|
|
3047
3105
|
/**
|
|
@@ -4047,6 +4105,11 @@ declare class MnSelect implements OnInit {
|
|
|
4047
4105
|
isOpen: boolean;
|
|
4048
4106
|
isDisabled: boolean;
|
|
4049
4107
|
searchTerm: string;
|
|
4108
|
+
/**
|
|
4109
|
+
* Position in `filteredOptions` of the option the keyboard is on, or -1 for none. Reset when the
|
|
4110
|
+
* list it indexes changes (a search) or goes away (close), so it never points at a stale row.
|
|
4111
|
+
*/
|
|
4112
|
+
activeIndex: number;
|
|
4050
4113
|
protected uiConfig: MnSelectUIConfig;
|
|
4051
4114
|
private readonly configService;
|
|
4052
4115
|
private readonly sectionPath;
|
|
@@ -4056,6 +4119,7 @@ declare class MnSelect implements OnInit {
|
|
|
4056
4119
|
private readonly destroyRef;
|
|
4057
4120
|
private readonly renderer;
|
|
4058
4121
|
private readonly cdr;
|
|
4122
|
+
private readonly injector;
|
|
4059
4123
|
/** Lucide data for the trailing check shown on the selected row. */
|
|
4060
4124
|
protected readonly checkIcon: mn_angular_lib.LucideIconData;
|
|
4061
4125
|
/** Reference to the trigger element for positioning the dropdown. */
|
|
@@ -4189,7 +4253,42 @@ declare class MnSelect implements OnInit {
|
|
|
4189
4253
|
/** Selects an option, notifies the form and closes — a single choice ends the interaction. */
|
|
4190
4254
|
selectOption(option: MnSelectOption): void;
|
|
4191
4255
|
isSelected(option: MnSelectOption): boolean;
|
|
4256
|
+
/** Filters the options; the first match is highlighted so Enter picks it, none once the box is cleared. */
|
|
4192
4257
|
onSearch(term: string | null): void;
|
|
4258
|
+
/** Id of the keyboard-highlighted option, for `aria-activedescendant`; null when none is. */
|
|
4259
|
+
get activeOptionId(): string | null;
|
|
4260
|
+
/**
|
|
4261
|
+
* The DOM id of the option rendered at a position in `filteredOptions`.
|
|
4262
|
+
* @param index - The option's position.
|
|
4263
|
+
* @returns The id, unique per select.
|
|
4264
|
+
*/
|
|
4265
|
+
optionId(index: number): string;
|
|
4266
|
+
/**
|
|
4267
|
+
* Keyboard handling for the trigger and the search box, the WAI-ARIA combobox pattern. While
|
|
4268
|
+
* closed, ArrowDown, ArrowUp, Enter and Space open the list with an option highlighted. While
|
|
4269
|
+
* open, the arrows move the highlight past disabled options without wrapping, Home and End jump
|
|
4270
|
+
* to the ends, Enter (and Space outside the search box) chooses the highlighted option and returns focus to the trigger, Escape closes and Tab closes and lets focus move on. Enter and Space
|
|
4271
|
+
* stop here, so they can never submit a surrounding form or close a surrounding modal.
|
|
4272
|
+
* @param event - The keydown.
|
|
4273
|
+
* @param fromSearch - True when it came from the search box, where Space, Home and End edit text.
|
|
4274
|
+
*/
|
|
4275
|
+
onKeydown(event: KeyboardEvent, fromSearch?: boolean): void;
|
|
4276
|
+
/**
|
|
4277
|
+
* Moves the highlight one enabled option from `from` and scrolls it into view.
|
|
4278
|
+
* @param from - Where to step from; -1 to start at an end.
|
|
4279
|
+
* @param step - 1 for down, -1 for up.
|
|
4280
|
+
*/
|
|
4281
|
+
private moveActive;
|
|
4282
|
+
/**
|
|
4283
|
+
* Chooses the highlighted option (or just closes when none is) and hands focus back to the trigger,
|
|
4284
|
+
* because the search box that may hold it is removed with the panel.
|
|
4285
|
+
* @param event - The Enter or Space keydown, claimed so a form around the select is not submitted.
|
|
4286
|
+
*/
|
|
4287
|
+
private chooseActive;
|
|
4288
|
+
/** Scrolls the highlighted option into view once the render that paints its ring has run. */
|
|
4289
|
+
private revealActiveOption;
|
|
4290
|
+
/** Puts focus back on the trigger. */
|
|
4291
|
+
private focusTrigger;
|
|
4193
4292
|
/**
|
|
4194
4293
|
* The single close path. Every trigger (outside click, Escape, scroll, resize, the trigger
|
|
4195
4294
|
* being hidden, a choice) funnels through here so the open-only listeners are always torn
|
|
@@ -8602,6 +8701,29 @@ declare class MnTabComponent implements DoCheck, AfterViewInit, AfterViewChecked
|
|
|
8602
8701
|
* @param item - The tab item to activate.
|
|
8603
8702
|
*/
|
|
8604
8703
|
setActive(item: MnTabItem): void;
|
|
8704
|
+
/**
|
|
8705
|
+
* Whether a tab is the bar's single Tab stop: the active tab, or the first tab while none is
|
|
8706
|
+
* active yet. Every other tab is reached with the arrow keys, so Tab leaves the bar in one press.
|
|
8707
|
+
* @param item - The tab to check.
|
|
8708
|
+
* @returns True for the one tab that keeps `tabindex="0"`.
|
|
8709
|
+
*/
|
|
8710
|
+
isTabStop(item: MnTabItem): boolean;
|
|
8711
|
+
/**
|
|
8712
|
+
* Keyboard handling on a tab. Left and Right move to the previous or next tab and wrap at the
|
|
8713
|
+
* ends, Home and End jump to the first and last; the tab moved to is activated at once
|
|
8714
|
+
* (automatic activation) and receives focus. Enter and Space activate the focused tab, handled
|
|
8715
|
+
* on keydown so Space does not scroll the page first. Other keys are left alone.
|
|
8716
|
+
* @param event - The keydown on a tab.
|
|
8717
|
+
* @param item - The tab the key was pressed on.
|
|
8718
|
+
*/
|
|
8719
|
+
onTabKeydown(event: KeyboardEvent, item: MnTabItem): void;
|
|
8720
|
+
/**
|
|
8721
|
+
* Moves focus to the tab at `index` and scrolls it into view inside a scrollable bar. Focusing
|
|
8722
|
+
* works before change detection has moved `tabindex="0"` onto it, because a script may focus an
|
|
8723
|
+
* element with `tabindex="-1"`.
|
|
8724
|
+
* @param index - Position of the tab in the data source's items.
|
|
8725
|
+
*/
|
|
8726
|
+
private focusTab;
|
|
8605
8727
|
/**
|
|
8606
8728
|
* Moves the selection to `item` and tells the consumer about it: the
|
|
8607
8729
|
* deactivate/activate/emit sequence a click produces, shared by the click
|