mn-angular-lib 1.0.122 → 1.0.124

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.122",
3
+ "version": "1.0.124",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3"
@@ -2994,6 +2994,13 @@ type MnCollectionDataSource<T> = {
2994
2994
  /** Translation key for the empty message. When set, the component resolves it via MnLanguageService. */
2995
2995
  emptyMessageKey?: string;
2996
2996
  emptyTemplate?: TemplateRef<unknown>;
2997
+ /**
2998
+ * Icon rendered above {@link emptyMessage} in the default empty state. Pass any
2999
+ * lucide icon's static `.icon` data (e.g. `LucideSearchX.icon`). Defaults to an
3000
+ * inbox icon when omitted; set to `null` to render the message with no icon.
3001
+ * Ignored when {@link emptyTemplate} is provided.
3002
+ */
3003
+ emptyIcon?: LucideIconData | null;
2997
3004
  /**
2998
3005
  * Lifecycle state of the data, controlling loading / error / empty rendering.
2999
3006
  * Defaults to {@link MnCollectionState.RETRIEVED} when not set.
@@ -3209,6 +3216,8 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
3209
3216
  paginatedItems: T[];
3210
3217
  searchValue: string;
3211
3218
  loadingMoreRows: boolean;
3219
+ /** Fallback empty-state icon used when a data source doesn't set `emptyIcon`. */
3220
+ protected readonly defaultEmptyIcon: mn_angular_lib.LucideIconData;
3212
3221
  currentPage: number;
3213
3222
  pageSize: number;
3214
3223
  /**
@@ -5225,6 +5234,15 @@ type ListDataSource<T> = MnSelectableCollectionDataSource<T> & {
5225
5234
  skeleton?: ListSkeleton;
5226
5235
  onItemClick?: (item: T) => void;
5227
5236
  appearance?: ListAppearance;
5237
+ /** Template rendered on the left of the toolbar, before the search field. */
5238
+ toolbarLeftTemplate?: TemplateRef<unknown>;
5239
+ /** Template rendered on the right of the toolbar, after the search field. */
5240
+ toolbarRightTemplate?: TemplateRef<unknown>;
5241
+ /**
5242
+ * @deprecated Use {@link toolbarRightTemplate}, which names the slot it fills.
5243
+ * Still honoured, and still rendered on the right, so existing callers keep
5244
+ * working unchanged.
5245
+ */
5228
5246
  toolbarTemplate?: TemplateRef<unknown>;
5229
5247
  };
5230
5248
  /** @deprecated Use {@link MnCollectionLabels}. */
@@ -5236,6 +5254,11 @@ declare class MnList<T = unknown> extends MnSelectableCollectionBase<T, ListData
5236
5254
  /** Skeleton lines rendered for each placeholder item, falling back to the default two-bar layout. */
5237
5255
  get skeletonLines(): Partial<MnSkeletonProps>[];
5238
5256
  onItemClick(item: T): void;
5257
+ /**
5258
+ * The toolbar template the base class watches for identity changes. Prefers the
5259
+ * left slot, then the right, then the deprecated `toolbarTemplate`, so a list
5260
+ * using any single slot still re-renders when that template is swapped.
5261
+ */
5239
5262
  protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
5240
5263
  protected collectionBody?: ElementRef<HTMLElement>;
5241
5264
  protected applyFilter(searchForItems: boolean): void;
@@ -5295,6 +5318,15 @@ type GridDataSource<T> = MnCollectionDataSource<T> & {
5295
5318
  /** Responsive layout configuration. */
5296
5319
  layout?: GridLayout;
5297
5320
  onItemClick?: (item: T) => void;
5321
+ /** Template rendered on the left of the toolbar, before the search field. */
5322
+ toolbarLeftTemplate?: TemplateRef<unknown>;
5323
+ /** Template rendered on the right of the toolbar, after the search field. */
5324
+ toolbarRightTemplate?: TemplateRef<unknown>;
5325
+ /**
5326
+ * @deprecated Use {@link toolbarRightTemplate}, which names the slot it fills.
5327
+ * Still honoured, and still rendered on the right, so existing callers keep
5328
+ * working unchanged.
5329
+ */
5298
5330
  toolbarTemplate?: TemplateRef<unknown>;
5299
5331
  };
5300
5332
 
@@ -5312,6 +5344,11 @@ declare class MnGrid<T = unknown> extends MnCollectionBase<T, GridDataSource<T>>
5312
5344
  get isAutoLayout(): boolean;
5313
5345
  /** Skeleton lines for the default/lines placeholder; null when a custom template is used. */
5314
5346
  get skeletonLines(): Partial<MnSkeletonProps>[];
5347
+ /**
5348
+ * The toolbar template the base class watches for identity changes. Prefers the
5349
+ * left slot, then the right, then the deprecated `toolbarTemplate`, so a grid
5350
+ * using any single slot still re-renders when that template is swapped.
5351
+ */
5315
5352
  protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
5316
5353
  protected collectionBody?: ElementRef<HTMLElement>;
5317
5354
  onItemClick(item: T): void;
@@ -6247,7 +6284,7 @@ declare const MN_ICON_MAP: Record<string, string>;
6247
6284
 
6248
6285
  declare class MnIconAttributes {
6249
6286
  static ɵfac: i0.ɵɵFactoryDeclaration<MnIconAttributes, never>;
6250
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol], mn-icon[mnIconPending]", never, {}, {}, never, never, true, never>;
6287
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol]", never, {}, {}, never, never, true, never>;
6251
6288
  }
6252
6289
 
6253
6290
  /**