@mintplayer/ng-bootstrap 22.5.1 → 22.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +128 -74
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +82 -246
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-observe-size.mjs +48 -0
- package/fesm2022/mintplayer-ng-bootstrap-observe-size.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +106 -0
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/observe-size/package.json +4 -0
- package/package.json +9 -2
- package/splitter/package.json +4 -0
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +88 -27
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +57 -109
- package/types/mintplayer-ng-bootstrap-observe-size.d.ts +24 -0
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +66 -0
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +1 -1
|
@@ -1,121 +1,69 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BsSwipeContainerDirective } from '@mintplayer/ng-swiper/swiper';
|
|
5
|
-
import * as i1 from '@mintplayer/ng-bootstrap/reduced-motion';
|
|
6
|
-
|
|
7
|
-
declare class BsCarouselImageDirective {
|
|
8
|
-
private templateRef;
|
|
9
|
-
private carousel;
|
|
10
|
-
private element;
|
|
11
|
-
itemTemplate: TemplateRef<any>;
|
|
12
|
-
id: number;
|
|
13
|
-
isFirst: boolean;
|
|
14
|
-
constructor();
|
|
15
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCarouselImageDirective, never>;
|
|
16
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsCarouselImageDirective, "*[bsCarouselImage]", never, {}, {}, never, never, true, never>;
|
|
17
|
-
}
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { CarouselAnimation, CarouselOrientation, MpCarousel } from '@mintplayer/web-components/carousel';
|
|
18
4
|
|
|
19
5
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
6
|
+
* `<bs-carousel>` — Angular wrapper around the `<mp-carousel>` web component.
|
|
7
|
+
*
|
|
8
|
+
* Slides are plain content children (no structural directive):
|
|
9
|
+
*
|
|
10
|
+
* <bs-carousel animation="fade" [indicators]="true" [interval]="4000" ariaLabel="Photos">
|
|
11
|
+
* <img src="a.png" alt="…">
|
|
12
|
+
* <img src="b.png" alt="…">
|
|
13
|
+
* </bs-carousel>
|
|
22
14
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
15
|
+
* Track layout, gestures, keyboard, ARIA, the radio-driven no-JS tier and the
|
|
16
|
+
* height contract all live in the WC (single source of UI truth); this wrapper
|
|
17
|
+
* only bridges inputs to attributes and re-emits the WC's typed events. A
|
|
18
|
+
* custom play/pause control can be projected with `slot="play-pause"` — wire
|
|
19
|
+
* it to `togglePaused()` (or listen to `pausedChange`).
|
|
20
|
+
*
|
|
21
|
+
* The WC is registered **client-side only** (`afterNextRender`); on the server
|
|
22
|
+
* Angular emits a bare `<mp-carousel>` tag and the SSR layer injects its
|
|
23
|
+
* Declarative Shadow DOM (see `injectMpCarouselDsd`), so the carousel renders
|
|
24
|
+
* — and navigates — with JS off.
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
readonly
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
readonly
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
indicators: _angular_core.InputSignal<boolean>;
|
|
58
|
-
keyboardEvents: _angular_core.InputSignal<boolean>;
|
|
59
|
-
orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
60
|
-
animation: _angular_core.InputSignal<"fade" | "slide" | "none">;
|
|
61
|
-
interval: _angular_core.InputSignal<number | null>;
|
|
62
|
-
wrap: _angular_core.InputSignal<boolean>;
|
|
63
|
-
ariaLabel: _angular_core.InputSignal<string | null>;
|
|
64
|
-
paused: _angular_core.ModelSignal<boolean>;
|
|
65
|
-
/**
|
|
66
|
-
* Template projected via `*bsCarouselPlayPause`. When set, the carousel
|
|
67
|
-
* renders it in a control row above the slides. Per APG, auto-advancing
|
|
68
|
-
* carousels must expose a play/pause control — this is how consumers
|
|
69
|
-
* provide one without us imposing a button style.
|
|
70
|
-
*/
|
|
71
|
-
readonly playPauseTemplate: _angular_core.WritableSignal<TemplateRef<BsCarouselPlayPauseContext> | null>;
|
|
72
|
-
slideChange: _angular_core.OutputEmitterRef<number>;
|
|
73
|
-
animationStart: _angular_core.OutputEmitterRef<void>;
|
|
74
|
-
animationEnd: _angular_core.OutputEmitterRef<void>;
|
|
75
|
-
imageCount: _angular_core.Signal<number>;
|
|
76
|
-
readonly innerElement: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
|
|
77
|
-
readonly swipeContainer: _angular_core.Signal<BsSwipeContainerDirective | undefined>;
|
|
78
|
-
slideHeight: _angular_core.Signal<number>;
|
|
79
|
-
firstImageTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
80
|
-
lastImageTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
81
|
-
readonly animationsDisabled: _angular_core.WritableSignal<boolean>;
|
|
82
|
-
/**
|
|
83
|
-
* `aria-live` value for the slide viewport. Stays `off` while
|
|
84
|
-
* auto-advance is actually rotating — otherwise the SR would re-read the
|
|
85
|
-
* active slide every interval — and switches to `polite` whenever the
|
|
86
|
-
* rotation is paused (by `paused`, missing/zero `interval`, or
|
|
87
|
-
* `prefers-reduced-motion`), so manual prev/next/indicator clicks get
|
|
88
|
-
* announced.
|
|
89
|
-
*/
|
|
90
|
-
readonly slideAriaLive: _angular_core.Signal<"off" | "polite">;
|
|
26
|
+
declare class BsCarouselComponent {
|
|
27
|
+
/** Slide transition: `slide` (default), `fade`, or `none`. */
|
|
28
|
+
readonly animation: _angular_core.InputSignal<CarouselAnimation>;
|
|
29
|
+
/** Slide axis; vertical also pins every slide to the tallest one. */
|
|
30
|
+
readonly orientation: _angular_core.InputSignal<CarouselOrientation>;
|
|
31
|
+
/** Show the indicator dots. */
|
|
32
|
+
readonly indicators: _angular_core.InputSignal<boolean>;
|
|
33
|
+
/** Auto-advance interval in ms; `null`/`0` disables autoplay. */
|
|
34
|
+
readonly interval: _angular_core.InputSignal<number | null>;
|
|
35
|
+
/** Wrap around at the ends (buttons, keyboard AND swipe). */
|
|
36
|
+
readonly wrap: _angular_core.InputSignal<boolean>;
|
|
37
|
+
/** Arrow/Home/End navigation on the focused viewport. */
|
|
38
|
+
readonly keyboardEvents: _angular_core.InputSignal<boolean>;
|
|
39
|
+
/** Accessible label for the carousel region. */
|
|
40
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
41
|
+
/** Two-way: whether autoplay is paused. */
|
|
42
|
+
readonly paused: _angular_core.ModelSignal<boolean>;
|
|
43
|
+
/** The committed slide index changed. */
|
|
44
|
+
readonly slideChange: _angular_core.OutputEmitterRef<number>;
|
|
45
|
+
readonly animationStart: _angular_core.OutputEmitterRef<void>;
|
|
46
|
+
readonly animationEnd: _angular_core.OutputEmitterRef<void>;
|
|
47
|
+
protected readonly element: _angular_core.Signal<ElementRef<MpCarousel> | undefined>;
|
|
48
|
+
/** Presence/string-or-absent attributes derived once via signals. */
|
|
49
|
+
protected readonly indicatorsAttr: _angular_core.Signal<"" | null>;
|
|
50
|
+
protected readonly intervalAttr: _angular_core.Signal<string | null>;
|
|
51
|
+
protected readonly wrapAttr: _angular_core.Signal<"false" | null>;
|
|
52
|
+
protected readonly keyboardEventsAttr: _angular_core.Signal<"false" | null>;
|
|
53
|
+
protected readonly pausedAttr: _angular_core.Signal<"" | null>;
|
|
91
54
|
constructor();
|
|
92
|
-
/** Resume auto-advance. No-op if `interval` is unset or reduce-motion is on. */
|
|
93
|
-
play(): void;
|
|
94
|
-
/** Pause auto-advance. Manual prev/next/goto still work. */
|
|
95
|
-
pause(): void;
|
|
96
|
-
/** Toggle the paused state. Used as the `toggle` callback in `BsCarouselPlayPauseContext`. */
|
|
97
|
-
togglePaused: () => void;
|
|
98
|
-
private clearAutoAdvance;
|
|
99
55
|
previous(): void;
|
|
100
56
|
next(): void;
|
|
101
57
|
goto(index: number): void;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
58
|
+
play(): void;
|
|
59
|
+
pause(): void;
|
|
60
|
+
togglePaused: () => void;
|
|
61
|
+
protected onSlideChange(event: Event): void;
|
|
62
|
+
protected onPausedChange(event: Event): void;
|
|
63
|
+
protected onAnimationStart(event: Event): void;
|
|
64
|
+
protected onAnimationEnd(event: Event): void;
|
|
108
65
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCarouselComponent, never>;
|
|
109
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCarouselComponent, "bs-carousel", never, { "
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
declare class BsCarouselImgDirective {
|
|
113
|
-
private image;
|
|
114
|
-
fetchPriority: 'high' | 'low' | 'auto';
|
|
115
|
-
constructor();
|
|
116
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCarouselImgDirective, never>;
|
|
117
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsCarouselImgDirective, "img", never, {}, {}, never, never, true, never>;
|
|
66
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCarouselComponent, "bs-carousel", never, { "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "indicators": { "alias": "indicators"; "required": false; "isSignal": true; }; "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "keyboardEvents": { "alias": "keyboardEvents"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "paused": { "alias": "paused"; "required": false; "isSignal": true; }; }, { "paused": "pausedChange"; "slideChange": "slideChange"; "animationStart": "animationStart"; "animationEnd": "animationEnd"; }, never, ["*"], true, never>;
|
|
118
67
|
}
|
|
119
68
|
|
|
120
|
-
export { BsCarouselComponent
|
|
121
|
-
export type { BsCarouselPlayPauseContext };
|
|
69
|
+
export { BsCarouselComponent };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface Size {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class BsObserveSizeDirective implements AfterViewInit, OnDestroy {
|
|
10
|
+
private element;
|
|
11
|
+
private platformId;
|
|
12
|
+
private observer?;
|
|
13
|
+
constructor();
|
|
14
|
+
size: _angular_core.WritableSignal<Size | undefined>;
|
|
15
|
+
width: _angular_core.Signal<number | undefined>;
|
|
16
|
+
height: _angular_core.Signal<number | undefined>;
|
|
17
|
+
ngAfterViewInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsObserveSizeDirective, never>;
|
|
20
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsObserveSizeDirective, "[bsObserveSize]", ["bsObserveSize"], {}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { BsObserveSizeDirective };
|
|
24
|
+
export type { Size };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
3
|
import { Breakpoint } from '@mintplayer/ng-bootstrap';
|
|
4
|
-
import { BsObserveSizeDirective } from '@mintplayer/ng-
|
|
4
|
+
import { BsObserveSizeDirective } from '@mintplayer/ng-bootstrap/observe-size';
|
|
5
5
|
|
|
6
6
|
declare class BsPriorityNavItemDirective {
|
|
7
7
|
templateRef: TemplateRef<any>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { Direction, SplitterResizeEventDetail, MpSplitter, ResizeKey } from '@mintplayer/web-components/splitter';
|
|
4
|
+
export * from '@mintplayer/web-components/splitter';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `<bs-splitter>` — Angular wrapper around the `<mp-splitter>` web component.
|
|
8
|
+
*
|
|
9
|
+
* Panes are plain content children; the WC slots each direct child into its
|
|
10
|
+
* own resizable panel and inserts draggable/keyboard-operable dividers
|
|
11
|
+
* between them. Nest splitters to build dock-style layouts:
|
|
12
|
+
*
|
|
13
|
+
* <bs-splitter>
|
|
14
|
+
* <div>Left</div>
|
|
15
|
+
* <bs-splitter orientation="vertical" [minPanelSize]="80">
|
|
16
|
+
* <div>Top</div>
|
|
17
|
+
* <div>Bottom</div>
|
|
18
|
+
* </bs-splitter>
|
|
19
|
+
* </bs-splitter>
|
|
20
|
+
*
|
|
21
|
+
* Each wrapper claims exactly the events of its own `<mp-splitter>`: the
|
|
22
|
+
* target guard keeps a nested splitter's bubbled events from being re-emitted
|
|
23
|
+
* by the outer wrapper, and `stopPropagation()` *after* the guard ensures a
|
|
24
|
+
* claimed event is delivered once, as a typed output only. The stop is
|
|
25
|
+
* required: Angular registers BOTH a DOM listener and the output subscription
|
|
26
|
+
* for an element event binding, so a consumer's `(resizing)` handler would
|
|
27
|
+
* otherwise also receive the identically-named bubbling CustomEvent raw.
|
|
28
|
+
* Unclaimed events (from a nested raw `<mp-splitter>`) bubble on untouched.
|
|
29
|
+
*
|
|
30
|
+
* Before the custom element upgrades (or with JS off), a `:not(:defined)`
|
|
31
|
+
* fallback stylesheet renders the panes as a static flex layout with visible
|
|
32
|
+
* divider chrome, so server-rendered pages don't flash unstyled content.
|
|
33
|
+
*/
|
|
34
|
+
declare class BsSplitterComponent {
|
|
35
|
+
/** Axis along which the panes are laid out (and resized). */
|
|
36
|
+
readonly orientation: _angular_core.InputSignal<Direction>;
|
|
37
|
+
/** Minimum pane size in px a divider can shrink a pane to (WC default 50). */
|
|
38
|
+
readonly minPanelSize: _angular_core.InputSignal<number | null>;
|
|
39
|
+
/** Widen the invisible divider hit area for touch use. */
|
|
40
|
+
readonly touchMode: _angular_core.InputSignal<boolean>;
|
|
41
|
+
/** A divider drag started. Detail: current `{ sizes, orientation }`. */
|
|
42
|
+
readonly resizeStart: _angular_core.OutputEmitterRef<SplitterResizeEventDetail>;
|
|
43
|
+
/** Fires on every drag-preview frame with the in-flight sizes. */
|
|
44
|
+
readonly resizing: _angular_core.OutputEmitterRef<SplitterResizeEventDetail>;
|
|
45
|
+
/** Drag or keyboard resize committed. Detail: final `{ sizes, orientation }`. */
|
|
46
|
+
readonly resizeEnd: _angular_core.OutputEmitterRef<SplitterResizeEventDetail>;
|
|
47
|
+
protected readonly element: _angular_core.Signal<ElementRef<MpSplitter> | undefined>;
|
|
48
|
+
protected readonly minPanelSizeAttr: _angular_core.Signal<string | null>;
|
|
49
|
+
protected readonly touchModeAttr: _angular_core.Signal<"" | null>;
|
|
50
|
+
/** Current pane sizes in px, in document order. */
|
|
51
|
+
getPanelSizes(): number[];
|
|
52
|
+
/** Programmatically distribute pane sizes (px, one entry per pane). */
|
|
53
|
+
setPanelSizes(sizes: number[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Drive a keyboard-style resize on divider `dividerIndex` (arrows ±10%,
|
|
56
|
+
* `fine` = ±1%, Home/End to the limits).
|
|
57
|
+
*/
|
|
58
|
+
resizeDividerBy(dividerIndex: number, key: ResizeKey, fine?: boolean): void;
|
|
59
|
+
protected onResizeStart(event: Event): void;
|
|
60
|
+
protected onResizing(event: Event): void;
|
|
61
|
+
protected onResizeEnd(event: Event): void;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSplitterComponent, never>;
|
|
63
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSplitterComponent, "bs-splitter", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "minPanelSize": { "alias": "minPanelSize"; "required": false; "isSignal": true; }; "touchMode": { "alias": "touchMode"; "required": false; "isSignal": true; }; }, { "resizeStart": "resizeStart"; "resizing": "resizing"; "resizeEnd": "resizeEnd"; }, never, ["*"], true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { BsSplitterComponent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { AfterViewInit, Injector } from '@angular/core';
|
|
3
|
-
import { BsObserveSizeDirective } from '@mintplayer/ng-
|
|
3
|
+
import { BsObserveSizeDirective } from '@mintplayer/ng-bootstrap/observe-size';
|
|
4
4
|
|
|
5
5
|
declare class BsStickyFooterParentDirective {
|
|
6
6
|
marginBottom?: number;
|