@mintplayer/ng-bootstrap 22.32.0 → 22.34.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 +3 -166
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -9
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +12 -14
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +8 -8
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +15 -27
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -10
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +201 -18
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +13 -15
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +8 -16
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +49 -65
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -24
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +7 -7
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +10 -12
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +2 -22
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
- package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
- package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
- package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
- package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
- package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
- package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
- package/types/mintplayer-ng-bootstrap-machine.d.ts +101 -4
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
- package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
- package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
- package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
- package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
- package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
- package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
- package/calendar-month/package.json +0 -4
- package/dropdown-divider/package.json +0 -4
- package/dropdown-menu/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
- package/has-overlay/package.json +0 -4
- package/no-noscript/package.json +0 -4
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, ElementRef, PLATFORM_ID, DestroyRef, afterNextRender, Directive, forwardRef, input, signal, computed, contentChildren
|
|
2
|
+
import { Injectable, inject, ElementRef, PLATFORM_ID, DestroyRef, afterNextRender, Directive, forwardRef, input, signal, computed, contentChildren } from '@angular/core';
|
|
3
3
|
import { isPlatformServer } from '@angular/common';
|
|
4
4
|
import { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex } from '@mintplayer/ui-core/roving';
|
|
5
|
-
import {
|
|
6
|
-
import { dismissStack } from '@mintplayer/ui-core/overlay';
|
|
5
|
+
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* App-wide unique ID generator for ARIA wiring (`aria-controls`,
|
|
@@ -369,106 +368,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
369
368
|
}]
|
|
370
369
|
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsRovingFocusItemDirective), { isSignal: true }] }] } });
|
|
371
370
|
|
|
372
|
-
/**
|
|
373
|
-
* Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,
|
|
374
|
-
* captures the trigger before activation, and returns focus to it on deactivation.
|
|
375
|
-
*
|
|
376
|
-
* Initial focus inside the trap defaults to the first tabbable descendant; pass
|
|
377
|
-
* an explicit HTMLElement, 'self' (focus the host), or 'none' to opt out.
|
|
378
|
-
*
|
|
379
|
-
* Background `inert` / `aria-hidden` is intentionally not handled here — it is
|
|
380
|
-
* the consuming component's job (a modal hides app-root, a popover does not).
|
|
381
|
-
*/
|
|
382
|
-
class BsOverlayFocusDirective {
|
|
383
|
-
constructor() {
|
|
384
|
-
this.elementRef = inject(ElementRef);
|
|
385
|
-
this.trapFactory = inject(ConfigurableFocusTrapFactory);
|
|
386
|
-
this.interactivityChecker = inject(InteractivityChecker);
|
|
387
|
-
this.destroyRef = inject(DestroyRef);
|
|
388
|
-
this.active = input(true, { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), alias: 'bsOverlayFocus' });
|
|
389
|
-
this.initialFocus = input('first', /* @ts-ignore */
|
|
390
|
-
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
391
|
-
this.returnFocus = input(true, /* @ts-ignore */
|
|
392
|
-
...(ngDevMode ? [{ debugName: "returnFocus" }] : /* istanbul ignore next */ []));
|
|
393
|
-
this.trap = null;
|
|
394
|
-
this.restoreTo = null;
|
|
395
|
-
effect(() => {
|
|
396
|
-
if (this.active())
|
|
397
|
-
this.engage();
|
|
398
|
-
else
|
|
399
|
-
this.disengage();
|
|
400
|
-
});
|
|
401
|
-
this.destroyRef.onDestroy(() => this.disengage());
|
|
402
|
-
}
|
|
403
|
-
engage() {
|
|
404
|
-
if (this.trap)
|
|
405
|
-
return;
|
|
406
|
-
this.restoreTo = (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement)
|
|
407
|
-
? document.activeElement
|
|
408
|
-
: null;
|
|
409
|
-
this.trap = this.trapFactory.create(this.elementRef.nativeElement);
|
|
410
|
-
const target = this.initialFocus();
|
|
411
|
-
if (target instanceof HTMLElement) {
|
|
412
|
-
target.focus({ preventScroll: true });
|
|
413
|
-
}
|
|
414
|
-
else if (target === 'self') {
|
|
415
|
-
this.elementRef.nativeElement.focus({ preventScroll: true });
|
|
416
|
-
}
|
|
417
|
-
else if (target === 'first') {
|
|
418
|
-
this.focusFirstTabbable();
|
|
419
|
-
}
|
|
420
|
-
// 'none' — caller manages focus
|
|
421
|
-
}
|
|
422
|
-
focusFirstTabbable() {
|
|
423
|
-
// Walk the host's subtree and let CDK decide what's focusable — handles
|
|
424
|
-
// disabled fieldsets, inert ancestors, and the long tail of edge cases
|
|
425
|
-
// the inline selector would have to re-implement.
|
|
426
|
-
//
|
|
427
|
-
// `isFocusable({ ignoreVisibility: true })` because jsdom doesn't lay
|
|
428
|
-
// elements out, so CDK's default visibility check (`getClientRects()`)
|
|
429
|
-
// would reject everything in tests; in real browsers visible elements
|
|
430
|
-
// pass either way. Tabindex < 0 is filtered manually so the host (which
|
|
431
|
-
// we set `tabindex="-1"` on for the focus trap) doesn't get selected.
|
|
432
|
-
const root = this.elementRef.nativeElement;
|
|
433
|
-
const walker = (root.ownerDocument ?? document).createTreeWalker(root, NodeFilter.SHOW_ELEMENT);
|
|
434
|
-
let node = walker.currentNode;
|
|
435
|
-
while (node) {
|
|
436
|
-
if (node instanceof HTMLElement
|
|
437
|
-
&& node.tabIndex >= 0
|
|
438
|
-
// `:disabled` catches both own `disabled` and the inherited form of
|
|
439
|
-
// it from an ancestor `<fieldset disabled>` — CDK's isFocusable only
|
|
440
|
-
// looks at own attributes.
|
|
441
|
-
&& !node.matches(':disabled')
|
|
442
|
-
&& this.interactivityChecker.isFocusable(node, { ignoreVisibility: true })) {
|
|
443
|
-
node.focus({ preventScroll: true });
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
node = walker.nextNode();
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
disengage() {
|
|
450
|
-
if (!this.trap)
|
|
451
|
-
return;
|
|
452
|
-
this.trap.destroy();
|
|
453
|
-
this.trap = null;
|
|
454
|
-
if (this.returnFocus() && this.restoreTo && typeof document !== 'undefined' && document.contains(this.restoreTo)) {
|
|
455
|
-
// preventScroll so closing an overlay never yanks the page back to the
|
|
456
|
-
// trigger's position — the user's scroll position is their choice.
|
|
457
|
-
this.restoreTo.focus({ preventScroll: true });
|
|
458
|
-
}
|
|
459
|
-
this.restoreTo = null;
|
|
460
|
-
}
|
|
461
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsOverlayFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
462
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", 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 }); }
|
|
463
|
-
}
|
|
464
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsOverlayFocusDirective, decorators: [{
|
|
465
|
-
type: Directive,
|
|
466
|
-
args: [{
|
|
467
|
-
selector: '[bsOverlayFocus]',
|
|
468
|
-
exportAs: 'bsOverlayFocus',
|
|
469
|
-
}]
|
|
470
|
-
}], 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 }] }] } });
|
|
471
|
-
|
|
472
371
|
/**
|
|
473
372
|
* Thin wrapper over CDK's LiveAnnouncer that dedupes consecutive identical
|
|
474
373
|
* messages — typeahead-style "5 results" announcements often re-fire with the
|
|
@@ -498,68 +397,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
498
397
|
args: [{ providedIn: 'root' }]
|
|
499
398
|
}] });
|
|
500
399
|
|
|
501
|
-
/**
|
|
502
|
-
* Angular facade over the document's single dismiss stack, so each overlay can
|
|
503
|
-
* decide whether its global Escape listener should fire.
|
|
504
|
-
*
|
|
505
|
-
* The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each
|
|
506
|
-
* bind a `(document:keydown.escape)` (or equivalent host listener) that closes
|
|
507
|
-
* the overlay unconditionally. With nesting (popover-under-modal,
|
|
508
|
-
* tooltip-under-popover), a single Escape closes both because both handlers
|
|
509
|
-
* fire on the same event.
|
|
510
|
-
*
|
|
511
|
-
* The fix: every overlay calls `push()` when it opens and `release(token)`
|
|
512
|
-
* when it closes; its Escape handler runs only when `isTop(token)` returns
|
|
513
|
-
* true. The top-most overlay consumes Escape; lower frames stay open.
|
|
514
|
-
*
|
|
515
|
-
* **This is now a facade, and that matters.** The state lives in
|
|
516
|
-
* `@mintplayer/ui-core/overlay`'s `dismissStack`, shared with
|
|
517
|
-
* `OverlayController`. It used to be a private array here, and the web
|
|
518
|
-
* components had their own — so an Angular overlay wrapping a web-component
|
|
519
|
-
* overlay (`bs-tree-select` inside `bs-modal`, the ordinary case) had one frame
|
|
520
|
-
* on each stack, both believed they were top-most, and one Escape closed both.
|
|
521
|
-
* Angular keeps the DI ergonomics; there is exactly one array.
|
|
522
|
-
*
|
|
523
|
-
* Identity is a per-call `symbol` token rather than a string, so two opens of
|
|
524
|
-
* the same directive don't collide and a stale token can't accidentally match
|
|
525
|
-
* a future frame.
|
|
526
|
-
*
|
|
527
|
-
* **What this does NOT promise:**
|
|
528
|
-
* - **Visual z-order.** The stack tracks logical open-order (the sequence of
|
|
529
|
-
* `push()` calls). A consumer that manually reorders overlays in the DOM
|
|
530
|
-
* could see Escape close a logically-deeper overlay. We don't support that.
|
|
531
|
-
* - **Coordination with non-overlay listeners.** A consumer's own
|
|
532
|
-
* `keydown.escape` listener that doesn't ask the stack will still fire.
|
|
533
|
-
*/
|
|
534
|
-
class BsOverlayStackService {
|
|
535
|
-
/** Allocate a new frame on top of the stack and return its token. */
|
|
536
|
-
push() {
|
|
537
|
-
return dismissStack.push('bs-overlay-frame');
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* Remove `token` from the stack. Releasing a non-top token is allowed —
|
|
541
|
-
* it's how an inner overlay closes itself programmatically without an
|
|
542
|
-
* Escape press (e.g. a popover closed by clicking its trigger again).
|
|
543
|
-
*/
|
|
544
|
-
release(token) {
|
|
545
|
-
dismissStack.release(token);
|
|
546
|
-
}
|
|
547
|
-
/** True if `token` is the top of the stack. */
|
|
548
|
-
isTop(token) {
|
|
549
|
-
return dismissStack.isTop(token);
|
|
550
|
-
}
|
|
551
|
-
/** Token at the top of the stack, or null if empty. */
|
|
552
|
-
peek() {
|
|
553
|
-
return dismissStack.peek();
|
|
554
|
-
}
|
|
555
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsOverlayStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
556
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsOverlayStackService, providedIn: 'root' }); }
|
|
557
|
-
}
|
|
558
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsOverlayStackService, decorators: [{
|
|
559
|
-
type: Injectable,
|
|
560
|
-
args: [{ providedIn: 'root' }]
|
|
561
|
-
}] });
|
|
562
|
-
|
|
563
400
|
/**
|
|
564
401
|
* Collects a front's host attributes that belong on its role-bearing inner
|
|
565
402
|
* node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`
|
|
@@ -581,5 +418,5 @@ function takeHostAria(host) {
|
|
|
581
418
|
* Generated bundle index. Do not edit.
|
|
582
419
|
*/
|
|
583
420
|
|
|
584
|
-
export { BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService,
|
|
421
|
+
export { BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsRovingFocusDirective, BsRovingFocusItemDirective, takeHostAria };
|
|
585
422
|
//# sourceMappingURL=mintplayer-ng-bootstrap-a11y.mjs.map
|
|
@@ -1 +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/forward-aria/forward-aria.directive.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/src/host-aria/take-host-aria.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 {\n afterNextRender,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n OnInit,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n/**\n * Makes a nested-host wrapper **transparent to ARIA**: a consumer's `aria-*`,\n * `role`, `id` and `tabindex` written on the `bs-*` element reach the `mp-*`\n * custom element inside it.\n *\n * Apply to the wrapper's inner custom element, which is its template root:\n *\n * ```html\n * <mp-checkbox #checkbox bsForwardAria (change)=\"onChange($event)\">\n * ```\n *\n * **The problem it solves.** Every `bs-*` wrapper renders the real control as a\n * *child*, so a consumer's `aria-label` lands on an element with no role, where\n * ARIA prohibits naming — nothing reaches the control and it stays nameless.\n * `tabindex` is worse than useless: it makes the wrapper focusable, putting a\n * dead tab stop in front of the real control. This replaces three ad-hoc idioms\n * that had grown up around the problem (`bs-checkbox`/`bs-radio`'s\n * `MutationObserver`, `bs-carousel`/`bs-navbar`'s bespoke `[ariaLabel]` input,\n * `bs-select`'s `Renderer2` call) with one directive, so the next wrapper does\n * not invent a fourth.\n *\n * **Copy versus move, and why they differ.** `aria-*` attributes are *copied* and\n * kept live — they carry state (`aria-expanded`, `aria-invalid`) that must be\n * correct at every moment, and duplicating them on an unexposed host is harmless.\n * `role`, `id` and `tabindex` are **moved**, because leaving them would be\n * actively wrong: two elements with one `id` is invalid and breaks every IDREF\n * pointing at it, and a duplicated `tabindex` is the dead-tab-stop defect itself.\n * The host then takes `role=\"presentation\"` so it contributes no extra generic\n * node of its own.\n *\n * **Known limit, stated because it is a real gap and not a rounding error.**\n * Adding any of the three moved attributes later *is* tracked — an addition is an\n * observable mutation. **Removing one after it has been moved is not**, because\n * the attribute is no longer on the host for its removal to be observed. In\n * practice `role`/`id`/`tabindex` are structural and set once, while the\n * attributes that genuinely change at runtime are `aria-*`, which are copied and\n * fully live. If a component ever needs a removable forwarded `tabindex`, give it\n * an explicit input rather than widening this directive.\n */\n@Directive({\n selector: '[bsForwardAria]',\n})\nexport class BsForwardAriaDirective implements OnInit {\n private readonly target = inject(ElementRef).nativeElement as HTMLElement;\n /**\n * The wrapper host. `skipSelf` walks from this element's node injector to its\n * parent's, which for a component's template root is the component host — no\n * DOM walking and no assumption about nesting depth.\n */\n private readonly host = inject(ElementRef, { skipSelf: true }).nativeElement as HTMLElement;\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Moved rather than copied — see the class comment. */\n private static readonly MOVED = ['role', 'id', 'tabindex'] as const;\n\n /**\n * The role this directive writes on the host itself, which must therefore never\n * be treated as a *consumer's* role and moved inward.\n *\n * Checked by **value** rather than tracked in an instance flag, and that\n * distinction is the whole fix for an SSR defect: the server pass runs this\n * directive and serialises `role=\"presentation\"` into the HTML, so the client\n * gets a **fresh instance** whose flag is `false` staring at a host that already\n * carries the marker. It moved the marker onto the custom element — making the\n * real component presentational and discarding the name just forwarded to it.\n * A flag cannot survive rehydration; a value check needs nothing to survive.\n *\n * Only `presentation` is claimed, not `none`. They are synonyms to ARIA, but a\n * consumer writing `role=\"none\"` is making a deliberate statement about the\n * *inner* element and it is still forwarded; `presentation` on a wrapper asks for\n * exactly what this directive already does, so there is nothing to forward.\n */\n private static readonly HOST_ROLE = 'presentation';\n\n constructor() {\n // Attribute *bindings* from the consumer's template are written during the\n // consumer's change detection, which is not guaranteed to have run by\n // ngOnInit. A second pass after render catches those. Both passes are\n // idempotent, so running both costs nothing.\n afterNextRender(() => {\n this.forward();\n this.observe();\n });\n }\n\n /**\n * Runs on the server too, unlike the `MutationObserver`. That matters: the\n * no-JS and SSR tiers are part of this library's contract, and an\n * accessible name that only appears after hydration is absent exactly when a\n * screen reader first reads the page.\n */\n ngOnInit(): void {\n this.forward();\n }\n\n private forward(): void {\n for (const { name, value } of Array.from(this.host.attributes)) {\n if (name.startsWith('aria-')) {\n this.target.setAttribute(name, value);\n }\n }\n\n for (const name of BsForwardAriaDirective.MOVED) {\n const value = this.host.getAttribute(name);\n if (value === null) continue;\n // Our own marker, whether this instance wrote it or a server pass did.\n if (name === 'role' && value === BsForwardAriaDirective.HOST_ROLE) continue;\n this.target.setAttribute(name, value);\n this.host.removeAttribute(name);\n }\n\n // Only after any consumer role has been moved off it, so this never wins\n // over what the consumer asked for. Idempotent: a second pass — including the\n // first client pass after SSR — finds the marker already present.\n if (!this.host.hasAttribute('role')) {\n this.host.setAttribute('role', BsForwardAriaDirective.HOST_ROLE);\n }\n }\n\n private observe(): void {\n if (isPlatformServer(this.platformId)) return;\n\n const observer = new MutationObserver(() => this.forward());\n observer.observe(this.host, { attributes: true });\n this.destroyRef.onDestroy(() => observer.disconnect());\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 * - Sets the host `tabindex` (0 if active, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight\n * on the active item.\n * - Auto-generates an `id` if the host doesn't already have one, so other\n * ARIA references always have 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 an ARIA reference to the item has a stable target.\n *\n * Backed by a signal so a consumer computed that reads it re-runs when the id\n * is resolved post-mount. A plain `nativeElement.id` getter would be silently\n * cached during the first computation and never re-read.\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(() => (this.isActive() ? 0 : -1));\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 // Then publish the 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 { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex } from '@mintplayer/ui-core/roving';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\n\n/**\n * APG roving-tabindex container.\n *\n * Place on a list/menu/tablist; 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. Only\n * the active item has `tabindex=\"0\"`; real DOM focus moves.\n *\n * The former `activedescendant` mode (focus parked on a combobox input) was\n * removed with the typeahead's move to its headless core (#436 D10): the\n * typeahead core owns that keyboard model, and nothing else used the mode.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal).\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 wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\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 /**\n * Index math delegates to the shared pure functions in\n * @mintplayer/ui-core/roving — this directive and the WC RovingFocus\n * controller had independently identical copies that had ALREADY drifted\n * (wrap-vs-clamp default). One implementation, two adapters. The directive\n * keeps its own signals and discovery: those are Angular/light-DOM concerns\n * the WC controller rightly lacks.\n *\n * Public so consumers can detect edges without re-implementing the\n * disabled-aware scan.\n */\n firstEnabledIndex(): number {\n const items = this.items();\n return firstEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n lastEnabledIndex(): number {\n const items = this.items();\n return lastEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n private step(delta: 1 | -1): void {\n const items = this.items();\n const next = nextEnabledIndex(\n items.length,\n this.activeIndex(),\n delta,\n this.wrap(),\n (i) => items[i].disabled(),\n );\n if (next >= 0) this.moveTo(next);\n }\n\n private moveTo(index: number): void {\n if (index < 0) return;\n this.activeIndex.set(index);\n if (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({ preventScroll: true });\n } else if (target === 'self') {\n this.elementRef.nativeElement.focus({ preventScroll: true });\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({ preventScroll: true });\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 // preventScroll so closing an overlay never yanks the page back to the\n // trigger's position — the user's scroll position is their choice.\n this.restoreTo.focus({ preventScroll: true });\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';\nimport { dismissStack } from '@mintplayer/ui-core/overlay';\n\n/**\n * Angular facade over the document's single dismiss stack, so each overlay can\n * decide whether 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 * **This is now a facade, and that matters.** The state lives in\n * `@mintplayer/ui-core/overlay`'s `dismissStack`, shared with\n * `OverlayController`. It used to be a private array here, and the web\n * components had their own — so an Angular overlay wrapping a web-component\n * overlay (`bs-tree-select` inside `bs-modal`, the ordinary case) had one frame\n * on each stack, both believed they were top-most, and one Escape closed both.\n * Angular keeps the DI ergonomics; there is exactly one array.\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 /** Allocate a new frame on top of the stack and return its token. */\n push(): symbol {\n return dismissStack.push('bs-overlay-frame');\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 dismissStack.release(token);\n }\n\n /** True if `token` is the top of the stack. */\n isTop(token: symbol): boolean {\n return dismissStack.isTop(token);\n }\n\n /** Token at the top of the stack, or null if empty. */\n peek(): symbol | null {\n return dismissStack.peek();\n }\n}\n","/**\n * Collects a front's host attributes that belong on its role-bearing inner\n * node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`\n * are moved, so the id is not duplicated and the host is not a second tab stop.\n *\n * Call it in the constructor: host attributes are present by then on both the\n * server and the client, so the SSR output already carries them where AT reads\n * them, and hydration sees identical DOM.\n */\nexport function takeHostAria(host: HTMLElement): Record<string, string> {\n const bag: Record<string, string> = Object.fromEntries(\n Array.from(host.attributes)\n .filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')\n .map(({ name, value }) => [name, value]),\n );\n ['id', 'tabindex'].filter((name) => name in bag).map((name) => host.removeAttribute(name));\n return bag;\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;8GANW,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,QAAA,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AI,EAAE;IAC5B;8GAvBW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpClC;;;;;;;;AAQG;AACG,SAAU,YAAY,CAAC,IAAiB,EAAA;AAC5C,IAAA,MAAM,GAAG,GAA2B,MAAM,CAAC,WAAW,CACpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;SACvB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,UAAU;AACrF,SAAA,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAC3C;AACD,IAAA,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1F,IAAA,OAAO,GAAG;AACZ;;ACjBA;;AAEG;;;;"}
|
|
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/forward-aria/forward-aria.directive.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/live-announcer/live-announcer.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/host-aria/take-host-aria.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 {\n afterNextRender,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n OnInit,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n/**\n * Makes a nested-host wrapper **transparent to ARIA**: a consumer's `aria-*`,\n * `role`, `id` and `tabindex` written on the `bs-*` element reach the `mp-*`\n * custom element inside it.\n *\n * Apply to the wrapper's inner custom element, which is its template root:\n *\n * ```html\n * <mp-checkbox #checkbox bsForwardAria (change)=\"onChange($event)\">\n * ```\n *\n * **The problem it solves.** Every `bs-*` wrapper renders the real control as a\n * *child*, so a consumer's `aria-label` lands on an element with no role, where\n * ARIA prohibits naming — nothing reaches the control and it stays nameless.\n * `tabindex` is worse than useless: it makes the wrapper focusable, putting a\n * dead tab stop in front of the real control. This replaces three ad-hoc idioms\n * that had grown up around the problem (`bs-checkbox`/`bs-radio`'s\n * `MutationObserver`, `bs-carousel`/`bs-navbar`'s bespoke `[ariaLabel]` input,\n * `bs-select`'s `Renderer2` call) with one directive, so the next wrapper does\n * not invent a fourth.\n *\n * **Copy versus move, and why they differ.** `aria-*` attributes are *copied* and\n * kept live — they carry state (`aria-expanded`, `aria-invalid`) that must be\n * correct at every moment, and duplicating them on an unexposed host is harmless.\n * `role`, `id` and `tabindex` are **moved**, because leaving them would be\n * actively wrong: two elements with one `id` is invalid and breaks every IDREF\n * pointing at it, and a duplicated `tabindex` is the dead-tab-stop defect itself.\n * The host then takes `role=\"presentation\"` so it contributes no extra generic\n * node of its own.\n *\n * **Known limit, stated because it is a real gap and not a rounding error.**\n * Adding any of the three moved attributes later *is* tracked — an addition is an\n * observable mutation. **Removing one after it has been moved is not**, because\n * the attribute is no longer on the host for its removal to be observed. In\n * practice `role`/`id`/`tabindex` are structural and set once, while the\n * attributes that genuinely change at runtime are `aria-*`, which are copied and\n * fully live. If a component ever needs a removable forwarded `tabindex`, give it\n * an explicit input rather than widening this directive.\n */\n@Directive({\n selector: '[bsForwardAria]',\n})\nexport class BsForwardAriaDirective implements OnInit {\n private readonly target = inject(ElementRef).nativeElement as HTMLElement;\n /**\n * The wrapper host. `skipSelf` walks from this element's node injector to its\n * parent's, which for a component's template root is the component host — no\n * DOM walking and no assumption about nesting depth.\n */\n private readonly host = inject(ElementRef, { skipSelf: true }).nativeElement as HTMLElement;\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Moved rather than copied — see the class comment. */\n private static readonly MOVED = ['role', 'id', 'tabindex'] as const;\n\n /**\n * The role this directive writes on the host itself, which must therefore never\n * be treated as a *consumer's* role and moved inward.\n *\n * Checked by **value** rather than tracked in an instance flag, and that\n * distinction is the whole fix for an SSR defect: the server pass runs this\n * directive and serialises `role=\"presentation\"` into the HTML, so the client\n * gets a **fresh instance** whose flag is `false` staring at a host that already\n * carries the marker. It moved the marker onto the custom element — making the\n * real component presentational and discarding the name just forwarded to it.\n * A flag cannot survive rehydration; a value check needs nothing to survive.\n *\n * Only `presentation` is claimed, not `none`. They are synonyms to ARIA, but a\n * consumer writing `role=\"none\"` is making a deliberate statement about the\n * *inner* element and it is still forwarded; `presentation` on a wrapper asks for\n * exactly what this directive already does, so there is nothing to forward.\n */\n private static readonly HOST_ROLE = 'presentation';\n\n constructor() {\n // Attribute *bindings* from the consumer's template are written during the\n // consumer's change detection, which is not guaranteed to have run by\n // ngOnInit. A second pass after render catches those. Both passes are\n // idempotent, so running both costs nothing.\n afterNextRender(() => {\n this.forward();\n this.observe();\n });\n }\n\n /**\n * Runs on the server too, unlike the `MutationObserver`. That matters: the\n * no-JS and SSR tiers are part of this library's contract, and an\n * accessible name that only appears after hydration is absent exactly when a\n * screen reader first reads the page.\n */\n ngOnInit(): void {\n this.forward();\n }\n\n private forward(): void {\n for (const { name, value } of Array.from(this.host.attributes)) {\n if (name.startsWith('aria-')) {\n this.target.setAttribute(name, value);\n }\n }\n\n for (const name of BsForwardAriaDirective.MOVED) {\n const value = this.host.getAttribute(name);\n if (value === null) continue;\n // Our own marker, whether this instance wrote it or a server pass did.\n if (name === 'role' && value === BsForwardAriaDirective.HOST_ROLE) continue;\n this.target.setAttribute(name, value);\n this.host.removeAttribute(name);\n }\n\n // Only after any consumer role has been moved off it, so this never wins\n // over what the consumer asked for. Idempotent: a second pass — including the\n // first client pass after SSR — finds the marker already present.\n if (!this.host.hasAttribute('role')) {\n this.host.setAttribute('role', BsForwardAriaDirective.HOST_ROLE);\n }\n }\n\n private observe(): void {\n if (isPlatformServer(this.platformId)) return;\n\n const observer = new MutationObserver(() => this.forward());\n observer.observe(this.host, { attributes: true });\n this.destroyRef.onDestroy(() => observer.disconnect());\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 * - Sets the host `tabindex` (0 if active, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight\n * on the active item.\n * - Auto-generates an `id` if the host doesn't already have one, so other\n * ARIA references always have 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 an ARIA reference to the item has a stable target.\n *\n * Backed by a signal so a consumer computed that reads it re-runs when the id\n * is resolved post-mount. A plain `nativeElement.id` getter would be silently\n * cached during the first computation and never re-read.\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(() => (this.isActive() ? 0 : -1));\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 // Then publish the 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 { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex } from '@mintplayer/ui-core/roving';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\n\n/**\n * APG roving-tabindex container.\n *\n * Place on a list/menu/tablist; 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. Only\n * the active item has `tabindex=\"0\"`; real DOM focus moves.\n *\n * The former `activedescendant` mode (focus parked on a combobox input) was\n * removed with the typeahead's move to its headless core (#436 D10): the\n * typeahead core owns that keyboard model, and nothing else used the mode.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal).\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 wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\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 /**\n * Index math delegates to the shared pure functions in\n * @mintplayer/ui-core/roving — this directive and the WC RovingFocus\n * controller had independently identical copies that had ALREADY drifted\n * (wrap-vs-clamp default). One implementation, two adapters. The directive\n * keeps its own signals and discovery: those are Angular/light-DOM concerns\n * the WC controller rightly lacks.\n *\n * Public so consumers can detect edges without re-implementing the\n * disabled-aware scan.\n */\n firstEnabledIndex(): number {\n const items = this.items();\n return firstEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n lastEnabledIndex(): number {\n const items = this.items();\n return lastEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n private step(delta: 1 | -1): void {\n const items = this.items();\n const next = nextEnabledIndex(\n items.length,\n this.activeIndex(),\n delta,\n this.wrap(),\n (i) => items[i].disabled(),\n );\n if (next >= 0) this.moveTo(next);\n }\n\n private moveTo(index: number): void {\n if (index < 0) return;\n this.activeIndex.set(index);\n if (this.elementRef.nativeElement.contains(document.activeElement)) {\n this.items()[index]?.elementRef.nativeElement.focus();\n }\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","/**\n * Collects a front's host attributes that belong on its role-bearing inner\n * node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`\n * are moved, so the id is not duplicated and the host is not a second tab stop.\n *\n * Call it in the constructor: host attributes are present by then on both the\n * server and the client, so the SSR output already carries them where AT reads\n * them, and hydration sees identical DOM.\n */\nexport function takeHostAria(host: HTMLElement): Record<string, string> {\n const bag: Record<string, string> = Object.fromEntries(\n Array.from(host.attributes)\n .filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')\n .map(({ name, value }) => [name, value]),\n );\n ['id', 'tabindex'].filter((name) => name in bag).map((name) => host.removeAttribute(name));\n return bag;\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;8GANW,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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cADE,MAAM,EAAA,CAAA,CAAA;;2FACnB,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACDlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;MAIU,sBAAsB,CAAA;;aAYT,IAAA,CAAA,KAAK,GAAG,CAAC,MAAM,EAAE,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,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1F,IAAA,OAAO,GAAG;AACZ;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,168 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, booleanAttribute, output, ChangeDetectionStrategy, Component, TemplateRef, Directive, model, contentChild, computed } from '@angular/core';
|
|
3
|
+
import { useCore, useScopedStyles, provideCoreContext, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { accordionCore, accordionScopedStyles, ACCORDION, accordionTabCore } from '@mintplayer/ui-core/accordion';
|
|
1
5
|
import { bootstrapAccordion } from '@mintplayer/ui-core/bootstrap/accordion';
|
|
2
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, TemplateRef, Directive, model, input, contentChild, viewChild, computed, ChangeDetectionStrategy, Component, contentChildren, forwardRef, ElementRef, DestroyRef } from '@angular/core';
|
|
5
|
-
import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
6
|
-
import { useBootstrap, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
7
|
-
import { connectAccordion, connectAccordionTab, ACCORDION_SCOPE, accordionScopedStyles, accordionToggled, closeAccordion, accordionRows, accordionSummaryClick, accordionKeydown } from '@mintplayer/ui-core/accordion';
|
|
8
7
|
|
|
8
|
+
// GENERATED from the accordion manifest (accordion) by @mintplayer/nx-component-compiler. Do not edit.
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* It is a template rather than projected content because the header lands in
|
|
14
|
-
* the row's `<summary>` while the rest of the tab's content lands in the
|
|
15
|
-
* collapsible region, and one `<ng-content>` cannot feed two places. The tab
|
|
16
|
-
* renders the captured template into its summary.
|
|
17
|
-
*
|
|
18
|
-
* Mirrors `*bsTabPageHeader` on `bs-tab-control`. Replaces the former
|
|
19
|
-
* `<bs-accordion-tab-header>` component.
|
|
20
|
-
*
|
|
21
|
-
* <bs-accordion>
|
|
22
|
-
* <bs-accordion-tab>
|
|
23
|
-
* <ng-container *bsAccordionTabHeader>Profile</ng-container>
|
|
24
|
-
* Body content here
|
|
25
|
-
* </bs-accordion-tab>
|
|
26
|
-
* </bs-accordion>
|
|
10
|
+
* A Bootstrap accordion on native `<details name>` (#458): every tab opens and closes with
|
|
11
|
+
* JavaScript off, and single-open is the platform's exclusivity. Declare `accordion-tab`s as
|
|
12
|
+
* content. Up/Down/Home/End move between headers.
|
|
27
13
|
*/
|
|
14
|
+
class BsAccordionComponent {
|
|
15
|
+
#core;
|
|
16
|
+
constructor() {
|
|
17
|
+
/** The host element. */
|
|
18
|
+
this.elementRef = inject(ElementRef);
|
|
19
|
+
/** Allow several tabs open at once. */
|
|
20
|
+
this.multi = input(false, { ...(ngDevMode ? { debugName: "multi" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
21
|
+
/** Paint the open header with the Bootstrap active background. */
|
|
22
|
+
this.highlightActiveTab = input(false, { ...(ngDevMode ? { debugName: "highlightActiveTab" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
23
|
+
/** A tab of this accordion (never a nested one's) opened or closed. */
|
|
24
|
+
this.tabToggle = output();
|
|
25
|
+
this.#core = useCore(accordionCore, { inputs: () => ({ multi: this.multi(), highlightActiveTab: this.highlightActiveTab() }), idPrefix: 'bs-accordion', outputs: { tabToggle: this.tabToggle }, hostBag: (props) => ({ ...props.root, 'data-mps': 'accordion' }) });
|
|
26
|
+
/** What this component hands its content. */
|
|
27
|
+
this.provided = this.#core.provided;
|
|
28
|
+
/** The template's props. */
|
|
29
|
+
this.props = this.#core.props;
|
|
30
|
+
useScopedStyles(bootstrapAccordion.key, bootstrapAccordion.css, { order: bootstrapAccordion.order });
|
|
31
|
+
useScopedStyles('accordion', accordionScopedStyles);
|
|
32
|
+
}
|
|
33
|
+
/** Close every open tab, and every accordion nested inside them. */
|
|
34
|
+
closeAll(...args) {
|
|
35
|
+
return this.#core.call('closeAll', args);
|
|
36
|
+
}
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsAccordionComponent, isStandalone: true, selector: "bs-accordion", inputs: { multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, highlightActiveTab: { classPropertyName: "highlightActiveTab", publicName: "highlightActiveTab", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabToggle: "tabToggle" }, providers: [provideCoreContext(ACCORDION, BsAccordionComponent)], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/accordion/src/templates/accordion.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'bs-accordion', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideCoreContext(ACCORDION, BsAccordionComponent)], template: "<!-- GENERATED from libs/mintplayer-ui-core/accordion/src/templates/accordion.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
|
|
43
|
+
}], ctorParameters: () => [], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], highlightActiveTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightActiveTab", required: false }] }], tabToggle: [{ type: i0.Output, args: ["tabToggle"] }] } });
|
|
44
|
+
|
|
45
|
+
// GENERATED from the accordion manifest (accordion-tab) by @mintplayer/nx-component-compiler. Do not edit.
|
|
46
|
+
/** The `header` slot of `<bs-accordion-tab>`: `<ng-template bsAccordionTabHeader>` or `*bsAccordionTabHeader`. */
|
|
28
47
|
class BsAccordionTabHeaderDirective {
|
|
29
48
|
constructor() {
|
|
30
|
-
this.
|
|
49
|
+
this.templateRef = inject(TemplateRef);
|
|
31
50
|
}
|
|
32
51
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionTabHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33
52
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsAccordionTabHeaderDirective, isStandalone: true, selector: "[bsAccordionTabHeader]", ngImport: i0 }); }
|
|
34
53
|
}
|
|
35
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionTabHeaderDirective, decorators: [{
|
|
36
55
|
type: Directive,
|
|
37
|
-
args: [{
|
|
38
|
-
selector: '[bsAccordionTabHeader]',
|
|
39
|
-
}]
|
|
56
|
+
args: [{ selector: '[bsAccordionTabHeader]' }]
|
|
40
57
|
}] });
|
|
41
|
-
|
|
42
58
|
/**
|
|
43
|
-
* `<
|
|
44
|
-
*
|
|
45
|
-
* It renders nothing in place: its projected children become a template
|
|
46
|
-
* (`body`) that the parent accordion renders inside the tab's `<details>`,
|
|
47
|
-
* together with the `*bsAccordionTabHeader` template. The parent renders
|
|
48
|
-
* every row so the rows are siblings (see `BsAccordionComponent`).
|
|
59
|
+
* One tab of an accordion: a `<details>` whose `header` slot is the summary and whose content is
|
|
60
|
+
* the body. `open` is two-way.
|
|
49
61
|
*/
|
|
50
62
|
class BsAccordionTabComponent {
|
|
63
|
+
#core;
|
|
51
64
|
constructor() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
...(ngDevMode ? [{ debugName: "
|
|
56
|
-
this.disabled = input(false, /*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
this.
|
|
65
|
-
|
|
65
|
+
/** The host element. */
|
|
66
|
+
this.elementRef = inject(ElementRef);
|
|
67
|
+
this.open = model(false, /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
70
|
+
this.headerSlot = contentChild(BsAccordionTabHeaderDirective, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
|
|
72
|
+
/** The template's named slots. */
|
|
73
|
+
this.slots = computed(() => ({ header: this.headerSlot()?.templateRef }), /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
|
|
75
|
+
this.#core = useCore(accordionTabCore, { inputs: () => ({ open: this.open(), disabled: this.disabled() }), idPrefix: 'bs-accordion-tab', hostScope: 'accordion', models: { open: this.open } });
|
|
76
|
+
/** The template's props. */
|
|
77
|
+
this.props = this.#core.props;
|
|
78
|
+
useScopedStyles(bootstrapAccordion.key, bootstrapAccordion.css, { order: bootstrapAccordion.order });
|
|
79
|
+
useScopedStyles('accordion', accordionScopedStyles);
|
|
66
80
|
}
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
* writing `isActive` directly.
|
|
71
|
-
*/
|
|
72
|
-
setActive(value) {
|
|
73
|
-
this.accordion.setActive(this.index(), value);
|
|
81
|
+
/** Open or close the tab through its `<details>`, so exclusivity and the nested collapse apply. */
|
|
82
|
+
setOpen(...args) {
|
|
83
|
+
return this.#core.call('setOpen', args);
|
|
74
84
|
}
|
|
75
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
76
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
86
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsAccordionTabComponent, isStandalone: true, selector: "bs-accordion-tab", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange" }, queries: [{ propertyName: "headerSlot", first: true, predicate: BsAccordionTabHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/accordion/src/templates/accordion-tab.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<details data-mps=\"accordion\" [mpProps]=\"p_view.item\" #root>\n <summary data-mps=\"accordion\" [mpProps]=\"p_view.summary\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </summary>\n <div data-mps=\"accordion\" [mpProps]=\"p_view.content\">\n <ng-content />\n </div>\n</details>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
77
87
|
}
|
|
78
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
|
|
79
89
|
type: Component,
|
|
80
|
-
args: [{ selector: 'bs-accordion-tab', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
81
|
-
}], propDecorators: {
|
|
90
|
+
args: [{ selector: 'bs-accordion-tab', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/accordion/src/templates/accordion-tab.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<details data-mps=\"accordion\" [mpProps]=\"p_view.item\" #root>\n <summary data-mps=\"accordion\" [mpProps]=\"p_view.summary\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </summary>\n <div data-mps=\"accordion\" [mpProps]=\"p_view.content\">\n <ng-content />\n </div>\n</details>\n" }]
|
|
91
|
+
}], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsAccordionTabHeaderDirective), { isSignal: true }] }] } });
|
|
82
92
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
* <bs-accordion-tab [(isActive)]="open">
|
|
88
|
-
* <ng-container *bsAccordionTabHeader>Profile</ng-container>
|
|
89
|
-
* Body content
|
|
90
|
-
* </bs-accordion-tab>
|
|
91
|
-
* </bs-accordion>
|
|
92
|
-
*
|
|
93
|
-
* Renders the markup of `@mintplayer/ui-core/accordion` in its own template,
|
|
94
|
-
* so the server-rendered page is the working accordion: each tab is a
|
|
95
|
-
* `<details>`, which opens and closes with JavaScript off, and single-open is
|
|
96
|
-
* the platform's `name` exclusivity. The host is the `.accordion` root.
|
|
97
|
-
*
|
|
98
|
-
* The rows are rendered here, as siblings, rather than by each tab: Bootstrap
|
|
99
|
-
* draws the borders between items with `:first-of-type`, which a per-tab host
|
|
100
|
-
* element would break. Each tab hands over its header and body as templates.
|
|
101
|
-
*/
|
|
102
|
-
class BsAccordionComponent {
|
|
103
|
-
constructor() {
|
|
104
|
-
/** Allow several tabs to stay open at once. */
|
|
105
|
-
this.multi = input(false, /* @ts-ignore */
|
|
106
|
-
...(ngDevMode ? [{ debugName: "multi" }] : /* istanbul ignore next */ []));
|
|
107
|
-
/** Paint the open header with the Bootstrap active background. */
|
|
108
|
-
this.highlightActiveTab = input(false, /* @ts-ignore */
|
|
109
|
-
...(ngDevMode ? [{ debugName: "highlightActiveTab" }] : /* istanbul ignore next */ []));
|
|
110
|
-
this.tabPages = contentChildren(forwardRef(() => BsAccordionTabComponent), /* @ts-ignore */
|
|
111
|
-
...(ngDevMode ? [{ debugName: "tabPages" }] : /* istanbul ignore next */ []));
|
|
112
|
-
this.host = inject(ElementRef).nativeElement;
|
|
113
|
-
this.id = inject(BsIdService).next('bs-accordion');
|
|
114
|
-
this.options = computed(() => ({
|
|
115
|
-
id: this.id,
|
|
116
|
-
multi: this.multi(),
|
|
117
|
-
highlightActiveTab: this.highlightActiveTab(),
|
|
118
|
-
}), /* @ts-ignore */
|
|
119
|
-
...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
120
|
-
this.root = computed(() => connectAccordion(this.options()), /* @ts-ignore */
|
|
121
|
-
...(ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []));
|
|
122
|
-
this.views = computed(() => this.tabPages().map((tab, index) => connectAccordionTab(this.options(), index, { disabled: tab.disabled() })), /* @ts-ignore */
|
|
123
|
-
...(ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []));
|
|
124
|
-
useBootstrap(bootstrapAccordion);
|
|
125
|
-
useScopedStyles(ACCORDION_SCOPE, accordionScopedStyles);
|
|
126
|
-
// `toggle` does not bubble, so a host listener never hears it: one
|
|
127
|
-
// capture-phase listener on the root hears every row.
|
|
128
|
-
const onToggle = (event) => {
|
|
129
|
-
const change = accordionToggled(this.host, event, this.multi());
|
|
130
|
-
if (change)
|
|
131
|
-
this.tabPages()[change.index]?.isActive.set(change.active);
|
|
132
|
-
};
|
|
133
|
-
this.host.addEventListener('toggle', onToggle, { capture: true });
|
|
134
|
-
inject(DestroyRef).onDestroy(() => this.host.removeEventListener('toggle', onToggle, { capture: true }));
|
|
135
|
-
}
|
|
136
|
-
/** Close every open tab, and every accordion nested inside them. */
|
|
137
|
-
closeAll() {
|
|
138
|
-
closeAccordion(this.host);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Open or close a tab through its `<details>`, so single-open exclusivity
|
|
142
|
-
* and the nested-accordion collapse both apply.
|
|
143
|
-
*/
|
|
144
|
-
setActive(index, active) {
|
|
145
|
-
const row = accordionRows(this.host)[index];
|
|
146
|
-
if (row)
|
|
147
|
-
row.open = active;
|
|
148
|
-
}
|
|
149
|
-
onSummaryClick(event, tab) {
|
|
150
|
-
accordionSummaryClick(event, tab.disabled());
|
|
151
|
-
}
|
|
152
|
-
onSummaryKeydown(event, index, tab) {
|
|
153
|
-
accordionKeydown(this.host, event, index, tab.disabled());
|
|
154
|
-
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsAccordionComponent, isStandalone: true, selector: "bs-accordion", inputs: { multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, highlightActiveTab: { classPropertyName: "highlightActiveTab", publicName: "highlightActiveTab", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-mps": "root()[\"data-mps\"]", "class.accordion": "true", "attr.data-highlight-active": "root()[\"data-highlight-active\"]" } }, queries: [{ propertyName: "tabPages", predicate: i0.forwardRef(() => BsAccordionTabComponent), isSignal: true }], ngImport: i0, template: "@for (tab of tabPages(); track tab; let i = $index) {\n @let view = views()[i];\n <details [mpProps]=\"view.item\" [attr.open]=\"tab.isActive() ? '' : null\">\n <summary [mpProps]=\"view.summary\" (click)=\"onSummaryClick($event, tab)\" (keydown)=\"onSummaryKeydown($event, i, tab)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </summary>\n <div [mpProps]=\"view.content\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n </details>\n}\n<ng-content />\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
157
|
-
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
159
|
-
type: Component,
|
|
160
|
-
args: [{ selector: 'bs-accordion', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MpPropsDirective, NgTemplateOutlet], host: {
|
|
161
|
-
'[attr.data-mps]': 'root()["data-mps"]',
|
|
162
|
-
'[class.accordion]': 'true',
|
|
163
|
-
'[attr.data-highlight-active]': 'root()["data-highlight-active"]',
|
|
164
|
-
}, template: "@for (tab of tabPages(); track tab; let i = $index) {\n @let view = views()[i];\n <details [mpProps]=\"view.item\" [attr.open]=\"tab.isActive() ? '' : null\">\n <summary [mpProps]=\"view.summary\" (click)=\"onSummaryClick($event, tab)\" (keydown)=\"onSummaryKeydown($event, i, tab)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </summary>\n <div [mpProps]=\"view.content\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n </details>\n}\n<ng-content />\n" }]
|
|
165
|
-
}], ctorParameters: () => [], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], highlightActiveTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightActiveTab", required: false }] }], tabPages: [{ type: i0.ContentChildren, args: [forwardRef(() => BsAccordionTabComponent), { isSignal: true }] }] } });
|
|
93
|
+
// GENERATED from the accordion manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
94
|
+
|
|
95
|
+
// Generated from @mintplayer/ui-core/accordion (#458 M4, D10): bs-accordion, bs-accordion-tab and
|
|
96
|
+
// the *bsAccordionTabHeader slot.
|
|
166
97
|
|
|
167
98
|
/**
|
|
168
99
|
* Generated bundle index. Do not edit.
|