mn-angular-lib 1.0.121 → 1.0.123

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "1.0.121",
3
+ "version": "1.0.123",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3"
@@ -5225,6 +5225,15 @@ type ListDataSource<T> = MnSelectableCollectionDataSource<T> & {
5225
5225
  skeleton?: ListSkeleton;
5226
5226
  onItemClick?: (item: T) => void;
5227
5227
  appearance?: ListAppearance;
5228
+ /** Template rendered on the left of the toolbar, before the search field. */
5229
+ toolbarLeftTemplate?: TemplateRef<unknown>;
5230
+ /** Template rendered on the right of the toolbar, after the search field. */
5231
+ toolbarRightTemplate?: TemplateRef<unknown>;
5232
+ /**
5233
+ * @deprecated Use {@link toolbarRightTemplate}, which names the slot it fills.
5234
+ * Still honoured, and still rendered on the right, so existing callers keep
5235
+ * working unchanged.
5236
+ */
5228
5237
  toolbarTemplate?: TemplateRef<unknown>;
5229
5238
  };
5230
5239
  /** @deprecated Use {@link MnCollectionLabels}. */
@@ -5236,6 +5245,11 @@ declare class MnList<T = unknown> extends MnSelectableCollectionBase<T, ListData
5236
5245
  /** Skeleton lines rendered for each placeholder item, falling back to the default two-bar layout. */
5237
5246
  get skeletonLines(): Partial<MnSkeletonProps>[];
5238
5247
  onItemClick(item: T): void;
5248
+ /**
5249
+ * The toolbar template the base class watches for identity changes. Prefers the
5250
+ * left slot, then the right, then the deprecated `toolbarTemplate`, so a list
5251
+ * using any single slot still re-renders when that template is swapped.
5252
+ */
5239
5253
  protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
5240
5254
  protected collectionBody?: ElementRef<HTMLElement>;
5241
5255
  protected applyFilter(searchForItems: boolean): void;
@@ -5295,6 +5309,15 @@ type GridDataSource<T> = MnCollectionDataSource<T> & {
5295
5309
  /** Responsive layout configuration. */
5296
5310
  layout?: GridLayout;
5297
5311
  onItemClick?: (item: T) => void;
5312
+ /** Template rendered on the left of the toolbar, before the search field. */
5313
+ toolbarLeftTemplate?: TemplateRef<unknown>;
5314
+ /** Template rendered on the right of the toolbar, after the search field. */
5315
+ toolbarRightTemplate?: TemplateRef<unknown>;
5316
+ /**
5317
+ * @deprecated Use {@link toolbarRightTemplate}, which names the slot it fills.
5318
+ * Still honoured, and still rendered on the right, so existing callers keep
5319
+ * working unchanged.
5320
+ */
5298
5321
  toolbarTemplate?: TemplateRef<unknown>;
5299
5322
  };
5300
5323
 
@@ -5312,6 +5335,11 @@ declare class MnGrid<T = unknown> extends MnCollectionBase<T, GridDataSource<T>>
5312
5335
  get isAutoLayout(): boolean;
5313
5336
  /** Skeleton lines for the default/lines placeholder; null when a custom template is used. */
5314
5337
  get skeletonLines(): Partial<MnSkeletonProps>[];
5338
+ /**
5339
+ * The toolbar template the base class watches for identity changes. Prefers the
5340
+ * left slot, then the right, then the deprecated `toolbarTemplate`, so a grid
5341
+ * using any single slot still re-renders when that template is swapped.
5342
+ */
5315
5343
  protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
5316
5344
  protected collectionBody?: ElementRef<HTMLElement>;
5317
5345
  onItemClick(item: T): void;
@@ -6106,12 +6134,21 @@ type MnTabDataSource = {
6106
6134
  * Tab component that renders a horizontal tab bar.
6107
6135
  * Supports translation keys for labels via MnTranslatePipe.
6108
6136
  */
6109
- declare class MnTabComponent implements DoCheck {
6137
+ declare class MnTabComponent implements DoCheck, AfterViewInit, OnDestroy {
6138
+ /** The horizontally-scrolling wrapper the edge fade is painted onto. */
6139
+ private scrollContainer?;
6140
+ /** How far the fade reaches in from each overflowing edge. */
6141
+ private static readonly FADE;
6110
6142
  /** Data source containing tab items and default active index. */
6111
6143
  dataSource: MnTabDataSource;
6112
6144
  /**
6113
6145
  * Whether to enable horizontal scrolling when items overflow.
6114
- * If true, tabs will scroll horizontally instead of shrinking too much.
6146
+ * When true, tabs scroll horizontally instead of overflowing their container.
6147
+ *
6148
+ * Defaults to `true`: the tab bar never wraps (`flex-nowrap`), so without
6149
+ * scrolling an overflowing bar would clip its last tabs or push the page width
6150
+ * on narrow screens. When the tabs already fit, `overflow-x-auto` is a no-op,
6151
+ * so this default only ever changes behaviour for the overflow case it fixes.
6115
6152
  */
6116
6153
  scrollable: boolean;
6117
6154
  /**
@@ -6123,6 +6160,8 @@ declare class MnTabComponent implements DoCheck {
6123
6160
  activeChange: EventEmitter<MnTabItem>;
6124
6161
  /** The currently active tab item. */
6125
6162
  currentActive?: MnTabItem;
6163
+ /** Watches the wrapper and the tab row so the fade re-evaluates on width or content changes. */
6164
+ private resizeObserver?;
6126
6165
  /**
6127
6166
  * Whether the tab bar is loading and should render skeleton tabs, from
6128
6167
  * {@link MnTabDataSource.state}.
@@ -6143,6 +6182,21 @@ declare class MnTabComponent implements DoCheck {
6143
6182
  * selection is kept in sync with whatever the data source currently holds.
6144
6183
  */
6145
6184
  ngDoCheck(): void;
6185
+ /**
6186
+ * Starts watching the scroll wrapper so the edge fade stays honest. A scroll
6187
+ * moves the fade to whichever side now hides tabs; a resize (viewport change)
6188
+ * or a change to the tab row's width (tabs added, relabelled, skeleton →
6189
+ * loaded) re-checks whether either edge overflows at all.
6190
+ */
6191
+ ngAfterViewInit(): void;
6192
+ ngOnDestroy(): void;
6193
+ /**
6194
+ * Paints a fade over whichever edge has tabs scrolled out of view — a soft
6195
+ * dissolve that reads as "more this way", the affordance a hidden scrollbar
6196
+ * otherwise costs us. Uses a mask (content → transparent) rather than a
6197
+ * background-coloured overlay, so it needs no knowledge of the theme.
6198
+ */
6199
+ updateEdgeFades(): void;
6146
6200
  /**
6147
6201
  * Sets the given tab item as active, invoking deactivate/activate callbacks.
6148
6202
  * @param item - The tab item to activate.
@@ -6221,7 +6275,7 @@ declare const MN_ICON_MAP: Record<string, string>;
6221
6275
 
6222
6276
  declare class MnIconAttributes {
6223
6277
  static ɵfac: i0.ɵɵFactoryDeclaration<MnIconAttributes, never>;
6224
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol], mn-icon[mnIconPending]", never, {}, {}, never, never, true, never>;
6278
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol]", never, {}, {}, never, never, true, never>;
6225
6279
  }
6226
6280
 
6227
6281
  /**