mn-angular-lib 1.0.121 → 1.0.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6106,12 +6106,21 @@ type MnTabDataSource = {
|
|
|
6106
6106
|
* Tab component that renders a horizontal tab bar.
|
|
6107
6107
|
* Supports translation keys for labels via MnTranslatePipe.
|
|
6108
6108
|
*/
|
|
6109
|
-
declare class MnTabComponent implements DoCheck {
|
|
6109
|
+
declare class MnTabComponent implements DoCheck, AfterViewInit, OnDestroy {
|
|
6110
|
+
/** The horizontally-scrolling wrapper the edge fade is painted onto. */
|
|
6111
|
+
private scrollContainer?;
|
|
6112
|
+
/** How far the fade reaches in from each overflowing edge. */
|
|
6113
|
+
private static readonly FADE;
|
|
6110
6114
|
/** Data source containing tab items and default active index. */
|
|
6111
6115
|
dataSource: MnTabDataSource;
|
|
6112
6116
|
/**
|
|
6113
6117
|
* Whether to enable horizontal scrolling when items overflow.
|
|
6114
|
-
*
|
|
6118
|
+
* When true, tabs scroll horizontally instead of overflowing their container.
|
|
6119
|
+
*
|
|
6120
|
+
* Defaults to `true`: the tab bar never wraps (`flex-nowrap`), so without
|
|
6121
|
+
* scrolling an overflowing bar would clip its last tabs or push the page width
|
|
6122
|
+
* on narrow screens. When the tabs already fit, `overflow-x-auto` is a no-op,
|
|
6123
|
+
* so this default only ever changes behaviour for the overflow case it fixes.
|
|
6115
6124
|
*/
|
|
6116
6125
|
scrollable: boolean;
|
|
6117
6126
|
/**
|
|
@@ -6123,6 +6132,8 @@ declare class MnTabComponent implements DoCheck {
|
|
|
6123
6132
|
activeChange: EventEmitter<MnTabItem>;
|
|
6124
6133
|
/** The currently active tab item. */
|
|
6125
6134
|
currentActive?: MnTabItem;
|
|
6135
|
+
/** Watches the wrapper and the tab row so the fade re-evaluates on width or content changes. */
|
|
6136
|
+
private resizeObserver?;
|
|
6126
6137
|
/**
|
|
6127
6138
|
* Whether the tab bar is loading and should render skeleton tabs, from
|
|
6128
6139
|
* {@link MnTabDataSource.state}.
|
|
@@ -6143,6 +6154,21 @@ declare class MnTabComponent implements DoCheck {
|
|
|
6143
6154
|
* selection is kept in sync with whatever the data source currently holds.
|
|
6144
6155
|
*/
|
|
6145
6156
|
ngDoCheck(): void;
|
|
6157
|
+
/**
|
|
6158
|
+
* Starts watching the scroll wrapper so the edge fade stays honest. A scroll
|
|
6159
|
+
* moves the fade to whichever side now hides tabs; a resize (viewport change)
|
|
6160
|
+
* or a change to the tab row's width (tabs added, relabelled, skeleton →
|
|
6161
|
+
* loaded) re-checks whether either edge overflows at all.
|
|
6162
|
+
*/
|
|
6163
|
+
ngAfterViewInit(): void;
|
|
6164
|
+
ngOnDestroy(): void;
|
|
6165
|
+
/**
|
|
6166
|
+
* Paints a fade over whichever edge has tabs scrolled out of view — a soft
|
|
6167
|
+
* dissolve that reads as "more this way", the affordance a hidden scrollbar
|
|
6168
|
+
* otherwise costs us. Uses a mask (content → transparent) rather than a
|
|
6169
|
+
* background-coloured overlay, so it needs no knowledge of the theme.
|
|
6170
|
+
*/
|
|
6171
|
+
updateEdgeFades(): void;
|
|
6146
6172
|
/**
|
|
6147
6173
|
* Sets the given tab item as active, invoking deactivate/activate callbacks.
|
|
6148
6174
|
* @param item - The tab item to activate.
|