mn-angular-lib 1.0.91 → 1.0.93

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.91",
3
+ "version": "1.0.93",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3"
@@ -3,3 +3,22 @@
3
3
  background-repeat: no-repeat;
4
4
  background-position: right 0.75rem center;
5
5
  }
6
+
7
+ .mn-form-row {
8
+ grid-template-columns: repeat(var(--mn-form-cols, 1), minmax(0, 1fr));
9
+ }
10
+
11
+ .mn-form-cell {
12
+ grid-column: span var(--mn-form-span, 1);
13
+ }
14
+
15
+ /* Collapse to a single column when the modal becomes a mobile bottom sheet */
16
+ @media (max-width: 639.98px) {
17
+ .mn-form-row {
18
+ grid-template-columns: 1fr;
19
+ }
20
+
21
+ .mn-form-cell {
22
+ grid-column: auto;
23
+ }
24
+ }
@@ -4462,8 +4462,6 @@ declare class MnFormBodyComponent<TModel = unknown, TResult = TModel> implements
4462
4462
  private subscribeToValueChanges;
4463
4463
  private previousFormValue;
4464
4464
  private reloadDependentDataSources;
4465
- getGridColumns(row: FormRow<TModel>): string;
4466
- getGridSpan(rowField: FormRowField<TModel>): string;
4467
4465
  /**
4468
4466
  * Invokes a FILE field's `onClear` callback when its existing image is removed.
4469
4467
  * FILE fields render {@link MnFileInput}, which owns selection/validation and
@@ -5466,7 +5464,7 @@ type MnTabDataSource = {
5466
5464
  * Tab component that renders a horizontal tab bar.
5467
5465
  * Supports translation keys for labels via MnTranslatePipe.
5468
5466
  */
5469
- declare class MnTabComponent implements OnInit {
5467
+ declare class MnTabComponent implements DoCheck {
5470
5468
  /** Data source containing tab items and default active index. */
5471
5469
  dataSource: MnTabDataSource;
5472
5470
  /**
@@ -5488,18 +5486,32 @@ declare class MnTabComponent implements OnInit {
5488
5486
  * otherwise the number of known items, falling back to a default when none.
5489
5487
  */
5490
5488
  get skeletonTabs(): number[];
5491
- /** Initializes the default active tab based on the data source configuration. */
5492
- ngOnInit(): void;
5493
5489
  /**
5494
- * Returns the resolved badge value for a tab item, supporting both plain numbers and Signal<number>.
5495
- * @param item - The tab item whose badge to resolve.
5490
+ * Re-resolves the active tab on every change-detection pass.
5491
+ *
5492
+ * The data source is often populated or rebuilt asynchronously (tabs that
5493
+ * depend on fetched data or permissions). Resolving the active tab only once
5494
+ * at init would leave {@link currentActive} pointing at a stale item — the
5495
+ * tab bar would then highlight nothing and swallow the first click — so the
5496
+ * selection is kept in sync with whatever the data source currently holds.
5496
5497
  */
5497
- getBadge(item: MnTabItem): number | undefined;
5498
+ ngDoCheck(): void;
5498
5499
  /**
5499
5500
  * Sets the given tab item as active, invoking deactivate/activate callbacks.
5500
5501
  * @param item - The tab item to activate.
5501
5502
  */
5502
5503
  setActive(item: MnTabItem): void;
5504
+ /**
5505
+ * Returns the resolved badge value for a tab item, supporting both plain numbers and Signal<number>.
5506
+ * @param item - The tab item whose badge to resolve.
5507
+ */
5508
+ getBadge(item: MnTabItem): number | undefined;
5509
+ /**
5510
+ * Ensures {@link currentActive} references a tab that still exists in the data
5511
+ * source, falling back to the configured default tab when the current
5512
+ * selection is missing or stale (e.g. after the items array is replaced).
5513
+ */
5514
+ private syncActiveTab;
5503
5515
  static ɵfac: i0.ɵɵFactoryDeclaration<MnTabComponent, never>;
5504
5516
  static ɵcmp: i0.ɵɵComponentDeclaration<MnTabComponent, "mn-tab", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "justified": { "alias": "justified"; "required": false; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
5505
5517
  }