@mintplayer/ng-bootstrap 21.30.0 → 21.31.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/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +455 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
- package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
- package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
- package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
- package/package.json +14 -2
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
- package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
- package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
- package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
- package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
- package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
- package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
- package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
- package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, inject, forwardRef, ElementRef, input, signal, computed, afterNextRender, Directive, contentChildren, DestroyRef, effect } from '@angular/core';
|
|
3
|
+
import { ConfigurableFocusTrapFactory, InteractivityChecker, LiveAnnouncer } from '@angular/cdk/a11y';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* App-wide unique ID generator for ARIA wiring (`aria-controls`,
|
|
7
|
+
* `aria-labelledby`, `aria-activedescendant`, etc.).
|
|
8
|
+
*
|
|
9
|
+
* Why a service instead of `crypto.randomUUID()` or per-component counters:
|
|
10
|
+
* IDs need to stay short and human-readable in DevTools, and per-component
|
|
11
|
+
* counters collide when the same component is instantiated more than once on
|
|
12
|
+
* a page (two `bs-dropdown`s would each assign `bs-dropdown-1`). The shared
|
|
13
|
+
* counter guarantees uniqueness across the whole app without UUID noise.
|
|
14
|
+
*/
|
|
15
|
+
class BsIdService {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.counter = 0;
|
|
18
|
+
}
|
|
19
|
+
/** Returns `${prefix}-N` where N monotonically increases for the lifetime of the app. */
|
|
20
|
+
next(prefix) {
|
|
21
|
+
return `${prefix}-${++this.counter}`;
|
|
22
|
+
}
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsIdService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsIdService, providedIn: 'root' }); }
|
|
25
|
+
}
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsIdService, decorators: [{
|
|
27
|
+
type: Injectable,
|
|
28
|
+
args: [{ providedIn: 'root' }]
|
|
29
|
+
}] });
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* One marker per focusable child of a `bsRovingFocus` container.
|
|
33
|
+
*
|
|
34
|
+
* - Mirrors the parent's mode into the host `tabindex` (0 if active in
|
|
35
|
+
* `tabindex` mode, -1 otherwise).
|
|
36
|
+
* - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a focused-
|
|
37
|
+
* look highlight on the active item — important in `activedescendant`
|
|
38
|
+
* mode, where the item never receives `:focus` and the browser's focus
|
|
39
|
+
* ring never paints.
|
|
40
|
+
* - Auto-generates an `id` if the host doesn't already have one, so combobox
|
|
41
|
+
* `aria-activedescendant` always has a stable target. Honours an
|
|
42
|
+
* externally-supplied id when present.
|
|
43
|
+
*
|
|
44
|
+
* Consumers normally don't interact with this directive directly — they
|
|
45
|
+
* just stamp it on each list/menu/option element inside `bsRovingFocus`.
|
|
46
|
+
*/
|
|
47
|
+
class BsRovingFocusItemDirective {
|
|
48
|
+
get itemId() {
|
|
49
|
+
return this._itemId();
|
|
50
|
+
}
|
|
51
|
+
constructor() {
|
|
52
|
+
this.parent = inject(forwardRef(() => BsRovingFocusDirective));
|
|
53
|
+
this.elementRef = inject(ElementRef);
|
|
54
|
+
this.ids = inject(BsIdService);
|
|
55
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
56
|
+
/**
|
|
57
|
+
* The host element's id. Honoured if set externally (e.g. by a sibling
|
|
58
|
+
* component's [attr.id] host binding); otherwise generated in afterNextRender
|
|
59
|
+
* so combobox-style aria-activedescendant has a stable target.
|
|
60
|
+
*
|
|
61
|
+
* Backed by a signal so parent computeds (like BsRovingFocusDirective's
|
|
62
|
+
* activeDescendantId) re-run when the id is resolved post-mount. A plain
|
|
63
|
+
* `nativeElement.id` getter would be silently cached during the first
|
|
64
|
+
* computation and never re-read — leading to aria-activedescendant="" on
|
|
65
|
+
* combobox inputs even after the items got real ids.
|
|
66
|
+
*/
|
|
67
|
+
this._itemId = signal('', ...(ngDevMode ? [{ debugName: "_itemId" }] : /* istanbul ignore next */ []));
|
|
68
|
+
this.index = computed(() => this.parent.items().indexOf(this), ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.isActive = computed(() => this.index() === this.parent.activeIndex(), ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
70
|
+
this.tabindex = computed(() => {
|
|
71
|
+
if (this.parent.mode() === 'activedescendant')
|
|
72
|
+
return -1;
|
|
73
|
+
return this.isActive() ? 0 : -1;
|
|
74
|
+
}, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
75
|
+
// After the first render, all sibling host bindings on this element have applied.
|
|
76
|
+
// If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one
|
|
77
|
+
// so the parent's activeDescendantId() has a stable target. Then publish the
|
|
78
|
+
// resolved id to the signal so reactive consumers see it.
|
|
79
|
+
afterNextRender(() => {
|
|
80
|
+
if (!this.elementRef.nativeElement.id) {
|
|
81
|
+
this.elementRef.nativeElement.id = this.ids.next('bs-rovingitem');
|
|
82
|
+
}
|
|
83
|
+
this._itemId.set(this.elementRef.nativeElement.id);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
onFocus() {
|
|
87
|
+
this.parent.setActiveItem(this);
|
|
88
|
+
}
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRovingFocusItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
90
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: BsRovingFocusItemDirective, isStandalone: true, selector: "[bsRovingFocusItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()" }, properties: { "attr.tabindex": "tabindex()", "class.bs-rovingfocus-active": "isActive()" } }, exportAs: ["bsRovingFocusItem"], ngImport: i0 }); }
|
|
91
|
+
}
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRovingFocusItemDirective, decorators: [{
|
|
93
|
+
type: Directive,
|
|
94
|
+
args: [{
|
|
95
|
+
selector: '[bsRovingFocusItem]',
|
|
96
|
+
exportAs: 'bsRovingFocusItem',
|
|
97
|
+
host: {
|
|
98
|
+
'[attr.tabindex]': 'tabindex()',
|
|
99
|
+
'[class.bs-rovingfocus-active]': 'isActive()',
|
|
100
|
+
'(focus)': 'onFocus()',
|
|
101
|
+
},
|
|
102
|
+
}]
|
|
103
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* APG roving-tabindex / active-descendant container.
|
|
107
|
+
*
|
|
108
|
+
* Place on a list/menu/listbox; mark each focusable child with
|
|
109
|
+
* `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the
|
|
110
|
+
* directive auto-handles disabled items, wrap-around, and orientation.
|
|
111
|
+
*
|
|
112
|
+
* Two modes:
|
|
113
|
+
* - **`tabindex`** (default) — only the active item has `tabindex="0"`; real
|
|
114
|
+
* DOM focus moves. Right for menus, treeviews, tablists.
|
|
115
|
+
* - **`activedescendant`** — items keep `tabindex="-1"`; DOM focus stays on
|
|
116
|
+
* an external owner (e.g. a combobox `<input>`) which mirrors the active
|
|
117
|
+
* item's id via `aria-activedescendant`. Right for comboboxes/listboxes
|
|
118
|
+
* where the user is also typing.
|
|
119
|
+
*
|
|
120
|
+
* Consumers that need to react to the active item externally read
|
|
121
|
+
* `activeIndex()` (signal) or `activeDescendantId()` (computed).
|
|
122
|
+
*/
|
|
123
|
+
class BsRovingFocusDirective {
|
|
124
|
+
constructor() {
|
|
125
|
+
this.elementRef = inject(ElementRef);
|
|
126
|
+
this.orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
127
|
+
this.mode = input('tabindex', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
128
|
+
this.wrap = input(true, ...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
129
|
+
this.items = contentChildren(BsRovingFocusItemDirective, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
130
|
+
this.activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
131
|
+
this.activeDescendantId = computed(() => {
|
|
132
|
+
if (this.mode() !== 'activedescendant')
|
|
133
|
+
return null;
|
|
134
|
+
return this.items()[this.activeIndex()]?.itemId ?? null;
|
|
135
|
+
}, ...(ngDevMode ? [{ debugName: "activeDescendantId" }] : /* istanbul ignore next */ []));
|
|
136
|
+
}
|
|
137
|
+
focusFirst() {
|
|
138
|
+
this.moveTo(this.firstEnabledIndex());
|
|
139
|
+
}
|
|
140
|
+
focusLast() {
|
|
141
|
+
this.moveTo(this.lastEnabledIndex());
|
|
142
|
+
}
|
|
143
|
+
next() {
|
|
144
|
+
this.step(+1);
|
|
145
|
+
}
|
|
146
|
+
prev() {
|
|
147
|
+
this.step(-1);
|
|
148
|
+
}
|
|
149
|
+
setActiveItem(item) {
|
|
150
|
+
const idx = this.items().indexOf(item);
|
|
151
|
+
if (idx < 0)
|
|
152
|
+
return;
|
|
153
|
+
if (item.disabled())
|
|
154
|
+
return;
|
|
155
|
+
this.activeIndex.set(idx);
|
|
156
|
+
}
|
|
157
|
+
onKeydown(event) {
|
|
158
|
+
// Don't intercept browser/OS chords (Alt+Arrow=back, Ctrl+Home=top of doc, Cmd+Arrow=word jump on macOS).
|
|
159
|
+
if (event.altKey || event.ctrlKey || event.metaKey)
|
|
160
|
+
return;
|
|
161
|
+
const orient = this.orientation();
|
|
162
|
+
let consumed = true;
|
|
163
|
+
switch (event.key) {
|
|
164
|
+
case 'ArrowDown':
|
|
165
|
+
if (orient === 'horizontal') {
|
|
166
|
+
consumed = false;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
this.next();
|
|
170
|
+
break;
|
|
171
|
+
case 'ArrowUp':
|
|
172
|
+
if (orient === 'horizontal') {
|
|
173
|
+
consumed = false;
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
this.prev();
|
|
177
|
+
break;
|
|
178
|
+
case 'ArrowRight':
|
|
179
|
+
if (orient === 'vertical') {
|
|
180
|
+
consumed = false;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
this.next();
|
|
184
|
+
break;
|
|
185
|
+
case 'ArrowLeft':
|
|
186
|
+
if (orient === 'vertical') {
|
|
187
|
+
consumed = false;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
this.prev();
|
|
191
|
+
break;
|
|
192
|
+
case 'Home':
|
|
193
|
+
this.focusFirst();
|
|
194
|
+
break;
|
|
195
|
+
case 'End':
|
|
196
|
+
this.focusLast();
|
|
197
|
+
break;
|
|
198
|
+
default:
|
|
199
|
+
consumed = false;
|
|
200
|
+
}
|
|
201
|
+
if (consumed)
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
}
|
|
204
|
+
/** Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect edges without re-implementing the disabled-aware scan. */
|
|
205
|
+
firstEnabledIndex() {
|
|
206
|
+
const items = this.items();
|
|
207
|
+
return items.findIndex(it => !it.disabled());
|
|
208
|
+
}
|
|
209
|
+
lastEnabledIndex() {
|
|
210
|
+
const items = this.items();
|
|
211
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
212
|
+
if (!items[i].disabled())
|
|
213
|
+
return i;
|
|
214
|
+
}
|
|
215
|
+
return -1;
|
|
216
|
+
}
|
|
217
|
+
step(delta) {
|
|
218
|
+
const items = this.items();
|
|
219
|
+
const total = items.length;
|
|
220
|
+
if (total === 0)
|
|
221
|
+
return;
|
|
222
|
+
const wrap = this.wrap();
|
|
223
|
+
let cursor = this.activeIndex();
|
|
224
|
+
for (let i = 0; i < total; i++) {
|
|
225
|
+
cursor = cursor + delta;
|
|
226
|
+
if (cursor < 0) {
|
|
227
|
+
if (!wrap)
|
|
228
|
+
return;
|
|
229
|
+
cursor = total - 1;
|
|
230
|
+
}
|
|
231
|
+
else if (cursor >= total) {
|
|
232
|
+
if (!wrap)
|
|
233
|
+
return;
|
|
234
|
+
cursor = 0;
|
|
235
|
+
}
|
|
236
|
+
if (!items[cursor].disabled()) {
|
|
237
|
+
this.moveTo(cursor);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
moveTo(index) {
|
|
243
|
+
if (index < 0)
|
|
244
|
+
return;
|
|
245
|
+
this.activeIndex.set(index);
|
|
246
|
+
if (this.mode() === 'tabindex' && this.elementRef.nativeElement.contains(document.activeElement)) {
|
|
247
|
+
this.items()[index]?.elementRef.nativeElement.focus();
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRovingFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
251
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.11", type: BsRovingFocusDirective, isStandalone: true, selector: "[bsRovingFocus]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" } }, queries: [{ propertyName: "items", predicate: BsRovingFocusItemDirective, isSignal: true }], exportAs: ["bsRovingFocus"], ngImport: i0 }); }
|
|
252
|
+
}
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsRovingFocusDirective, decorators: [{
|
|
254
|
+
type: Directive,
|
|
255
|
+
args: [{
|
|
256
|
+
selector: '[bsRovingFocus]',
|
|
257
|
+
exportAs: 'bsRovingFocus',
|
|
258
|
+
host: {
|
|
259
|
+
'(keydown)': 'onKeydown($event)',
|
|
260
|
+
},
|
|
261
|
+
}]
|
|
262
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsRovingFocusItemDirective), { isSignal: true }] }] } });
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,
|
|
266
|
+
* captures the trigger before activation, and returns focus to it on deactivation.
|
|
267
|
+
*
|
|
268
|
+
* Initial focus inside the trap defaults to the first tabbable descendant; pass
|
|
269
|
+
* an explicit HTMLElement, 'self' (focus the host), or 'none' to opt out.
|
|
270
|
+
*
|
|
271
|
+
* Background `inert` / `aria-hidden` is intentionally not handled here — it is
|
|
272
|
+
* the consuming component's job (a modal hides app-root, a popover does not).
|
|
273
|
+
*/
|
|
274
|
+
class BsOverlayFocusDirective {
|
|
275
|
+
constructor() {
|
|
276
|
+
this.elementRef = inject(ElementRef);
|
|
277
|
+
this.trapFactory = inject(ConfigurableFocusTrapFactory);
|
|
278
|
+
this.interactivityChecker = inject(InteractivityChecker);
|
|
279
|
+
this.destroyRef = inject(DestroyRef);
|
|
280
|
+
this.active = input(true, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), alias: 'bsOverlayFocus' });
|
|
281
|
+
this.initialFocus = input('first', ...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
282
|
+
this.returnFocus = input(true, ...(ngDevMode ? [{ debugName: "returnFocus" }] : /* istanbul ignore next */ []));
|
|
283
|
+
this.trap = null;
|
|
284
|
+
this.restoreTo = null;
|
|
285
|
+
effect(() => {
|
|
286
|
+
if (this.active())
|
|
287
|
+
this.engage();
|
|
288
|
+
else
|
|
289
|
+
this.disengage();
|
|
290
|
+
});
|
|
291
|
+
this.destroyRef.onDestroy(() => this.disengage());
|
|
292
|
+
}
|
|
293
|
+
engage() {
|
|
294
|
+
if (this.trap)
|
|
295
|
+
return;
|
|
296
|
+
this.restoreTo = (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement)
|
|
297
|
+
? document.activeElement
|
|
298
|
+
: null;
|
|
299
|
+
this.trap = this.trapFactory.create(this.elementRef.nativeElement);
|
|
300
|
+
const target = this.initialFocus();
|
|
301
|
+
if (target instanceof HTMLElement) {
|
|
302
|
+
target.focus();
|
|
303
|
+
}
|
|
304
|
+
else if (target === 'self') {
|
|
305
|
+
this.elementRef.nativeElement.focus();
|
|
306
|
+
}
|
|
307
|
+
else if (target === 'first') {
|
|
308
|
+
this.focusFirstTabbable();
|
|
309
|
+
}
|
|
310
|
+
// 'none' — caller manages focus
|
|
311
|
+
}
|
|
312
|
+
focusFirstTabbable() {
|
|
313
|
+
// Walk the host's subtree and let CDK decide what's focusable — handles
|
|
314
|
+
// disabled fieldsets, inert ancestors, and the long tail of edge cases
|
|
315
|
+
// the inline selector would have to re-implement.
|
|
316
|
+
//
|
|
317
|
+
// `isFocusable({ ignoreVisibility: true })` because jsdom doesn't lay
|
|
318
|
+
// elements out, so CDK's default visibility check (`getClientRects()`)
|
|
319
|
+
// would reject everything in tests; in real browsers visible elements
|
|
320
|
+
// pass either way. Tabindex < 0 is filtered manually so the host (which
|
|
321
|
+
// we set `tabindex="-1"` on for the focus trap) doesn't get selected.
|
|
322
|
+
const root = this.elementRef.nativeElement;
|
|
323
|
+
const walker = (root.ownerDocument ?? document).createTreeWalker(root, NodeFilter.SHOW_ELEMENT);
|
|
324
|
+
let node = walker.currentNode;
|
|
325
|
+
while (node) {
|
|
326
|
+
if (node instanceof HTMLElement
|
|
327
|
+
&& node.tabIndex >= 0
|
|
328
|
+
// `:disabled` catches both own `disabled` and the inherited form of
|
|
329
|
+
// it from an ancestor `<fieldset disabled>` — CDK's isFocusable only
|
|
330
|
+
// looks at own attributes.
|
|
331
|
+
&& !node.matches(':disabled')
|
|
332
|
+
&& this.interactivityChecker.isFocusable(node, { ignoreVisibility: true })) {
|
|
333
|
+
node.focus();
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
node = walker.nextNode();
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
disengage() {
|
|
340
|
+
if (!this.trap)
|
|
341
|
+
return;
|
|
342
|
+
this.trap.destroy();
|
|
343
|
+
this.trap = null;
|
|
344
|
+
if (this.returnFocus() && this.restoreTo && typeof document !== 'undefined' && document.contains(this.restoreTo)) {
|
|
345
|
+
this.restoreTo.focus();
|
|
346
|
+
}
|
|
347
|
+
this.restoreTo = null;
|
|
348
|
+
}
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsOverlayFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
350
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: BsOverlayFocusDirective, isStandalone: true, selector: "[bsOverlayFocus]", inputs: { active: { classPropertyName: "active", publicName: "bsOverlayFocus", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, returnFocus: { classPropertyName: "returnFocus", publicName: "returnFocus", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["bsOverlayFocus"], ngImport: i0 }); }
|
|
351
|
+
}
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsOverlayFocusDirective, decorators: [{
|
|
353
|
+
type: Directive,
|
|
354
|
+
args: [{
|
|
355
|
+
selector: '[bsOverlayFocus]',
|
|
356
|
+
exportAs: 'bsOverlayFocus',
|
|
357
|
+
}]
|
|
358
|
+
}], ctorParameters: () => [], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsOverlayFocus", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], returnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "returnFocus", required: false }] }] } });
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Thin wrapper over CDK's LiveAnnouncer that dedupes consecutive identical
|
|
362
|
+
* messages — typeahead-style "5 results" announcements often re-fire with the
|
|
363
|
+
* same content and screen readers re-read them, which is noise.
|
|
364
|
+
*/
|
|
365
|
+
class BsLiveAnnouncerService {
|
|
366
|
+
constructor() {
|
|
367
|
+
this.cdk = inject(LiveAnnouncer);
|
|
368
|
+
this.last = null;
|
|
369
|
+
}
|
|
370
|
+
announce(message, politeness = 'polite', durationMs) {
|
|
371
|
+
if (this.last && this.last.message === message && this.last.politeness === politeness) {
|
|
372
|
+
return Promise.resolve();
|
|
373
|
+
}
|
|
374
|
+
this.last = { message, politeness };
|
|
375
|
+
return this.cdk.announce(message, politeness, durationMs);
|
|
376
|
+
}
|
|
377
|
+
clear() {
|
|
378
|
+
this.last = null;
|
|
379
|
+
this.cdk.clear();
|
|
380
|
+
}
|
|
381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsLiveAnnouncerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
382
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsLiveAnnouncerService, providedIn: 'root' }); }
|
|
383
|
+
}
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsLiveAnnouncerService, decorators: [{
|
|
385
|
+
type: Injectable,
|
|
386
|
+
args: [{ providedIn: 'root' }]
|
|
387
|
+
}] });
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* LIFO registry that tracks open overlays so each overlay can decide whether
|
|
391
|
+
* its global Escape listener should fire.
|
|
392
|
+
*
|
|
393
|
+
* The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each
|
|
394
|
+
* bind a `(document:keydown.escape)` (or equivalent host listener) that closes
|
|
395
|
+
* the overlay unconditionally. With nesting (popover-under-modal,
|
|
396
|
+
* tooltip-under-popover), a single Escape closes both because both handlers
|
|
397
|
+
* fire on the same event.
|
|
398
|
+
*
|
|
399
|
+
* The fix: every overlay calls `push()` when it opens and `release(token)`
|
|
400
|
+
* when it closes; its Escape handler runs only when `isTop(token)` returns
|
|
401
|
+
* true. The top-most overlay consumes Escape; lower frames stay open.
|
|
402
|
+
*
|
|
403
|
+
* Identity is a per-call `symbol` token rather than a string, so two opens of
|
|
404
|
+
* the same directive don't collide and a stale token can't accidentally match
|
|
405
|
+
* a future frame.
|
|
406
|
+
*
|
|
407
|
+
* **What this does NOT promise:**
|
|
408
|
+
* - **Visual z-order.** The stack tracks logical open-order (the sequence of
|
|
409
|
+
* `push()` calls). A consumer that manually reorders overlays in the DOM
|
|
410
|
+
* could see Escape close a logically-deeper overlay. We don't support that.
|
|
411
|
+
* - **Coordination with non-overlay listeners.** A consumer's own
|
|
412
|
+
* `keydown.escape` listener that doesn't ask the stack will still fire.
|
|
413
|
+
*/
|
|
414
|
+
class BsOverlayStackService {
|
|
415
|
+
constructor() {
|
|
416
|
+
this.stack = [];
|
|
417
|
+
}
|
|
418
|
+
/** Allocate a new frame on top of the stack and return its token. */
|
|
419
|
+
push() {
|
|
420
|
+
const token = Symbol('bs-overlay-frame');
|
|
421
|
+
this.stack.push(token);
|
|
422
|
+
return token;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Remove `token` from the stack. Releasing a non-top token is allowed —
|
|
426
|
+
* it's how an inner overlay closes itself programmatically without an
|
|
427
|
+
* Escape press (e.g. a popover closed by clicking its trigger again).
|
|
428
|
+
*/
|
|
429
|
+
release(token) {
|
|
430
|
+
const idx = this.stack.lastIndexOf(token);
|
|
431
|
+
if (idx >= 0)
|
|
432
|
+
this.stack.splice(idx, 1);
|
|
433
|
+
}
|
|
434
|
+
/** True if `token` is the top of the stack. */
|
|
435
|
+
isTop(token) {
|
|
436
|
+
return this.stack.length > 0 && this.stack[this.stack.length - 1] === token;
|
|
437
|
+
}
|
|
438
|
+
/** Token at the top of the stack, or null if empty. */
|
|
439
|
+
peek() {
|
|
440
|
+
return this.stack.length > 0 ? this.stack[this.stack.length - 1] : null;
|
|
441
|
+
}
|
|
442
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsOverlayStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
443
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsOverlayStackService, providedIn: 'root' }); }
|
|
444
|
+
}
|
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsOverlayStackService, decorators: [{
|
|
446
|
+
type: Injectable,
|
|
447
|
+
args: [{ providedIn: 'root' }]
|
|
448
|
+
}] });
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Generated bundle index. Do not edit.
|
|
452
|
+
*/
|
|
453
|
+
|
|
454
|
+
export { BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective };
|
|
455
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-a11y.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-a11y.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/a11y/src/service/id.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-focus/overlay-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/live-announcer/live-announcer.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-stack/overlay-stack.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/mintplayer-ng-bootstrap-a11y.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n/**\n * App-wide unique ID generator for ARIA wiring (`aria-controls`,\n * `aria-labelledby`, `aria-activedescendant`, etc.).\n *\n * Why a service instead of `crypto.randomUUID()` or per-component counters:\n * IDs need to stay short and human-readable in DevTools, and per-component\n * counters collide when the same component is instantiated more than once on\n * a page (two `bs-dropdown`s would each assign `bs-dropdown-1`). The shared\n * counter guarantees uniqueness across the whole app without UUID noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsIdService {\n private counter = 0;\n\n /** Returns `${prefix}-N` where N monotonically increases for the lifetime of the app. */\n next(prefix: string): string {\n return `${prefix}-${++this.counter}`;\n }\n}\n","import { afterNextRender, computed, Directive, ElementRef, forwardRef, inject, input, signal } from '@angular/core';\nimport { BsIdService } from '../service/id.service';\nimport { BsRovingFocusDirective } from './roving-focus.directive';\n\n/**\n * One marker per focusable child of a `bsRovingFocus` container.\n *\n * - Mirrors the parent's mode into the host `tabindex` (0 if active in\n * `tabindex` mode, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a focused-\n * look highlight on the active item — important in `activedescendant`\n * mode, where the item never receives `:focus` and the browser's focus\n * ring never paints.\n * - Auto-generates an `id` if the host doesn't already have one, so combobox\n * `aria-activedescendant` always has a stable target. Honours an\n * externally-supplied id when present.\n *\n * Consumers normally don't interact with this directive directly — they\n * just stamp it on each list/menu/option element inside `bsRovingFocus`.\n */\n@Directive({\n selector: '[bsRovingFocusItem]',\n exportAs: 'bsRovingFocusItem',\n host: {\n '[attr.tabindex]': 'tabindex()',\n '[class.bs-rovingfocus-active]': 'isActive()',\n '(focus)': 'onFocus()',\n },\n})\nexport class BsRovingFocusItemDirective {\n private parent = inject(forwardRef(() => BsRovingFocusDirective));\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n\n readonly disabled = input(false);\n\n /**\n * The host element's id. Honoured if set externally (e.g. by a sibling\n * component's [attr.id] host binding); otherwise generated in afterNextRender\n * so combobox-style aria-activedescendant has a stable target.\n *\n * Backed by a signal so parent computeds (like BsRovingFocusDirective's\n * activeDescendantId) re-run when the id is resolved post-mount. A plain\n * `nativeElement.id` getter would be silently cached during the first\n * computation and never re-read — leading to aria-activedescendant=\"\" on\n * combobox inputs even after the items got real ids.\n */\n private readonly _itemId = signal<string>('');\n get itemId(): string {\n return this._itemId();\n }\n\n readonly index = computed(() => this.parent.items().indexOf(this));\n readonly isActive = computed(() => this.index() === this.parent.activeIndex());\n\n readonly tabindex = computed(() => {\n if (this.parent.mode() === 'activedescendant') return -1;\n return this.isActive() ? 0 : -1;\n });\n\n constructor() {\n // After the first render, all sibling host bindings on this element have applied.\n // If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one\n // so the parent's activeDescendantId() has a stable target. Then publish the\n // resolved id to the signal so reactive consumers see it.\n afterNextRender(() => {\n if (!this.elementRef.nativeElement.id) {\n this.elementRef.nativeElement.id = this.ids.next('bs-rovingitem');\n }\n this._itemId.set(this.elementRef.nativeElement.id);\n });\n }\n\n onFocus(): void {\n this.parent.setActiveItem(this);\n }\n}\n","import { computed, contentChildren, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\nexport type BsRovingFocusMode = 'tabindex' | 'activedescendant';\n\n/**\n * APG roving-tabindex / active-descendant container.\n *\n * Place on a list/menu/listbox; mark each focusable child with\n * `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the\n * directive auto-handles disabled items, wrap-around, and orientation.\n *\n * Two modes:\n * - **`tabindex`** (default) — only the active item has `tabindex=\"0\"`; real\n * DOM focus moves. Right for menus, treeviews, tablists.\n * - **`activedescendant`** — items keep `tabindex=\"-1\"`; DOM focus stays on\n * an external owner (e.g. a combobox `<input>`) which mirrors the active\n * item's id via `aria-activedescendant`. Right for comboboxes/listboxes\n * where the user is also typing.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal) or `activeDescendantId()` (computed).\n */\n@Directive({\n selector: '[bsRovingFocus]',\n exportAs: 'bsRovingFocus',\n host: {\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsRovingFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly orientation = input<BsRovingFocusOrientation>('vertical');\n readonly mode = input<BsRovingFocusMode>('tabindex');\n readonly wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\n\n readonly activeDescendantId = computed(() => {\n if (this.mode() !== 'activedescendant') return null;\n return this.items()[this.activeIndex()]?.itemId ?? null;\n });\n\n focusFirst(): void {\n this.moveTo(this.firstEnabledIndex());\n }\n\n focusLast(): void {\n this.moveTo(this.lastEnabledIndex());\n }\n\n next(): void {\n this.step(+1);\n }\n\n prev(): void {\n this.step(-1);\n }\n\n setActiveItem(item: BsRovingFocusItemDirective): void {\n const idx = this.items().indexOf(item);\n if (idx < 0) return;\n if (item.disabled()) return;\n this.activeIndex.set(idx);\n }\n\n onKeydown(event: KeyboardEvent): void {\n // Don't intercept browser/OS chords (Alt+Arrow=back, Ctrl+Home=top of doc, Cmd+Arrow=word jump on macOS).\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n const orient = this.orientation();\n let consumed = true;\n switch (event.key) {\n case 'ArrowDown':\n if (orient === 'horizontal') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowUp':\n if (orient === 'horizontal') { consumed = false; break; }\n this.prev();\n break;\n case 'ArrowRight':\n if (orient === 'vertical') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowLeft':\n if (orient === 'vertical') { consumed = false; break; }\n this.prev();\n break;\n case 'Home':\n this.focusFirst();\n break;\n case 'End':\n this.focusLast();\n break;\n default:\n consumed = false;\n }\n if (consumed) event.preventDefault();\n }\n\n /** Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect edges without re-implementing the disabled-aware scan. */\n firstEnabledIndex(): number {\n const items = this.items();\n return items.findIndex(it => !it.disabled());\n }\n\n lastEnabledIndex(): number {\n const items = this.items();\n for (let i = items.length - 1; i >= 0; i--) {\n if (!items[i].disabled()) return i;\n }\n return -1;\n }\n\n private step(delta: 1 | -1): void {\n const items = this.items();\n const total = items.length;\n if (total === 0) return;\n\n const wrap = this.wrap();\n let cursor = this.activeIndex();\n for (let i = 0; i < total; i++) {\n cursor = cursor + delta;\n if (cursor < 0) {\n if (!wrap) return;\n cursor = total - 1;\n } else if (cursor >= total) {\n if (!wrap) return;\n cursor = 0;\n }\n if (!items[cursor].disabled()) {\n this.moveTo(cursor);\n return;\n }\n }\n }\n\n private moveTo(index: number): void {\n if (index < 0) return;\n this.activeIndex.set(index);\n if (this.mode() === 'tabindex' && this.elementRef.nativeElement.contains(document.activeElement)) {\n this.items()[index]?.elementRef.nativeElement.focus();\n }\n }\n}\n","import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { DestroyRef, Directive, effect, ElementRef, inject, input } from '@angular/core';\n\nexport type BsOverlayInitialFocus = HTMLElement | 'first' | 'self' | 'none';\n\n/**\n * Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,\n * captures the trigger before activation, and returns focus to it on deactivation.\n *\n * Initial focus inside the trap defaults to the first tabbable descendant; pass\n * an explicit HTMLElement, 'self' (focus the host), or 'none' to opt out.\n *\n * Background `inert` / `aria-hidden` is intentionally not handled here — it is\n * the consuming component's job (a modal hides app-root, a popover does not).\n */\n@Directive({\n selector: '[bsOverlayFocus]',\n exportAs: 'bsOverlayFocus',\n})\nexport class BsOverlayFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private trapFactory = inject(ConfigurableFocusTrapFactory);\n private interactivityChecker = inject(InteractivityChecker);\n private destroyRef = inject(DestroyRef);\n\n readonly active = input(true, { alias: 'bsOverlayFocus' });\n readonly initialFocus = input<BsOverlayInitialFocus>('first');\n readonly returnFocus = input(true);\n\n private trap: ConfigurableFocusTrap | null = null;\n private restoreTo: HTMLElement | null = null;\n\n constructor() {\n effect(() => {\n if (this.active()) this.engage();\n else this.disengage();\n });\n\n this.destroyRef.onDestroy(() => this.disengage());\n }\n\n private engage(): void {\n if (this.trap) return;\n\n this.restoreTo = (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement)\n ? document.activeElement\n : null;\n\n this.trap = this.trapFactory.create(this.elementRef.nativeElement);\n\n const target = this.initialFocus();\n if (target instanceof HTMLElement) {\n target.focus();\n } else if (target === 'self') {\n this.elementRef.nativeElement.focus();\n } else if (target === 'first') {\n this.focusFirstTabbable();\n }\n // 'none' — caller manages focus\n }\n\n private focusFirstTabbable(): void {\n // Walk the host's subtree and let CDK decide what's focusable — handles\n // disabled fieldsets, inert ancestors, and the long tail of edge cases\n // the inline selector would have to re-implement.\n //\n // `isFocusable({ ignoreVisibility: true })` because jsdom doesn't lay\n // elements out, so CDK's default visibility check (`getClientRects()`)\n // would reject everything in tests; in real browsers visible elements\n // pass either way. Tabindex < 0 is filtered manually so the host (which\n // we set `tabindex=\"-1\"` on for the focus trap) doesn't get selected.\n const root = this.elementRef.nativeElement;\n const walker = (root.ownerDocument ?? document).createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n let node: Node | null = walker.currentNode;\n while (node) {\n if (\n node instanceof HTMLElement\n && node.tabIndex >= 0\n // `:disabled` catches both own `disabled` and the inherited form of\n // it from an ancestor `<fieldset disabled>` — CDK's isFocusable only\n // looks at own attributes.\n && !node.matches(':disabled')\n && this.interactivityChecker.isFocusable(node, { ignoreVisibility: true })\n ) {\n node.focus();\n return;\n }\n node = walker.nextNode();\n }\n }\n\n private disengage(): void {\n if (!this.trap) return;\n\n this.trap.destroy();\n this.trap = null;\n\n if (this.returnFocus() && this.restoreTo && typeof document !== 'undefined' && document.contains(this.restoreTo)) {\n this.restoreTo.focus();\n }\n this.restoreTo = null;\n }\n}\n","import { LiveAnnouncer, AriaLivePoliteness } from '@angular/cdk/a11y';\nimport { inject, Injectable } from '@angular/core';\n\n/**\n * Thin wrapper over CDK's LiveAnnouncer that dedupes consecutive identical\n * messages — typeahead-style \"5 results\" announcements often re-fire with the\n * same content and screen readers re-read them, which is noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsLiveAnnouncerService {\n private cdk = inject(LiveAnnouncer);\n private last: { message: string; politeness: AriaLivePoliteness } | null = null;\n\n announce(message: string, politeness: AriaLivePoliteness = 'polite', durationMs?: number): Promise<void> {\n if (this.last && this.last.message === message && this.last.politeness === politeness) {\n return Promise.resolve();\n }\n this.last = { message, politeness };\n return this.cdk.announce(message, politeness, durationMs);\n }\n\n clear(): void {\n this.last = null;\n this.cdk.clear();\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * LIFO registry that tracks open overlays so each overlay can decide whether\n * its global Escape listener should fire.\n *\n * The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each\n * bind a `(document:keydown.escape)` (or equivalent host listener) that closes\n * the overlay unconditionally. With nesting (popover-under-modal,\n * tooltip-under-popover), a single Escape closes both because both handlers\n * fire on the same event.\n *\n * The fix: every overlay calls `push()` when it opens and `release(token)`\n * when it closes; its Escape handler runs only when `isTop(token)` returns\n * true. The top-most overlay consumes Escape; lower frames stay open.\n *\n * Identity is a per-call `symbol` token rather than a string, so two opens of\n * the same directive don't collide and a stale token can't accidentally match\n * a future frame.\n *\n * **What this does NOT promise:**\n * - **Visual z-order.** The stack tracks logical open-order (the sequence of\n * `push()` calls). A consumer that manually reorders overlays in the DOM\n * could see Escape close a logically-deeper overlay. We don't support that.\n * - **Coordination with non-overlay listeners.** A consumer's own\n * `keydown.escape` listener that doesn't ask the stack will still fire.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsOverlayStackService {\n private stack: symbol[] = [];\n\n /** Allocate a new frame on top of the stack and return its token. */\n push(): symbol {\n const token = Symbol('bs-overlay-frame');\n this.stack.push(token);\n return token;\n }\n\n /**\n * Remove `token` from the stack. Releasing a non-top token is allowed —\n * it's how an inner overlay closes itself programmatically without an\n * Escape press (e.g. a popover closed by clicking its trigger again).\n */\n release(token: symbol): void {\n const idx = this.stack.lastIndexOf(token);\n if (idx >= 0) this.stack.splice(idx, 1);\n }\n\n /** True if `token` is the top of the stack. */\n isTop(token: symbol): boolean {\n return this.stack.length > 0 && this.stack[this.stack.length - 1] === token;\n }\n\n /** Token at the top of the stack, or null if empty. */\n peek(): symbol | null {\n return this.stack.length > 0 ? this.stack[this.stack.length - 1] : null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;AASG;MAEU,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAEU,IAAA,CAAA,OAAO,GAAG,CAAC;AAMpB,IAAA;;AAHC,IAAA,IAAI,CAAC,MAAc,EAAA;QACjB,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACtC;+GANW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cADE,MAAM,EAAA,CAAA,CAAA;;4FACnB,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACRlC;;;;;;;;;;;;;;;AAeG;MAUU,0BAA0B,CAAA;AAmBrC,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;IACvB;AAUA,IAAA,WAAA,GAAA;QA9BQ,IAAA,CAAA,MAAM,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