mn-angular-lib 1.0.94 → 1.0.96
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
|
@@ -2609,10 +2609,9 @@ type OffsetPaginationStrategy = {
|
|
|
2609
2609
|
* renders: skeleton placeholders ({@link LOADING}), the rows or empty state
|
|
2610
2610
|
* ({@link RETRIEVED}), or an error placeholder ({@link ERROR}).
|
|
2611
2611
|
*
|
|
2612
|
-
*
|
|
2613
|
-
*
|
|
2614
|
-
*
|
|
2615
|
-
* component runs change detection and re-reads the new state.
|
|
2612
|
+
* Because the components are zoneless and OnPush, a consumer that flips `state`
|
|
2613
|
+
* to `ERROR` (or `RETRIEVED`) must also emit on `dataRows` (e.g. `dataRows.next([])`)
|
|
2614
|
+
* so the component runs change detection and re-reads the new state.
|
|
2616
2615
|
*/
|
|
2617
2616
|
declare enum MnCollectionState {
|
|
2618
2617
|
/** Data is being (re)loaded; skeleton placeholders are shown. */
|
|
@@ -2647,16 +2646,10 @@ type MnCollectionDataSource<T> = {
|
|
|
2647
2646
|
emptyMessageKey?: string;
|
|
2648
2647
|
emptyTemplate?: TemplateRef<unknown>;
|
|
2649
2648
|
/**
|
|
2650
|
-
* Lifecycle state of the data
|
|
2651
|
-
*
|
|
2652
|
-
* neither `state` nor `isDataLoading` is provided.
|
|
2649
|
+
* Lifecycle state of the data, controlling loading / error / empty rendering.
|
|
2650
|
+
* Defaults to {@link MnCollectionState.RETRIEVED} when not set.
|
|
2653
2651
|
*/
|
|
2654
2652
|
state?: MnCollectionState;
|
|
2655
|
-
/**
|
|
2656
|
-
* @deprecated Use {@link state} instead. Legacy boolean loading flag, still
|
|
2657
|
-
* honoured when {@link state} is not set (`true` ⇒ LOADING, `false` ⇒ RETRIEVED).
|
|
2658
|
-
*/
|
|
2659
|
-
isDataLoading?: boolean;
|
|
2660
2653
|
/** Number of placeholder rows rendered while data is loading. Defaults to 5. */
|
|
2661
2654
|
skeletonRowCount?: number;
|
|
2662
2655
|
/** Message shown in the error placeholder when {@link state} is ERROR. */
|
|
@@ -2873,7 +2866,7 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
|
|
|
2873
2866
|
* Measured pixel height of the body container, applied as a `min-height` floor
|
|
2874
2867
|
* while a server reload is in flight so the container can't collapse when the
|
|
2875
2868
|
* data rows are swapped for skeletons. Released in {@link ngDoCheck} the moment
|
|
2876
|
-
*
|
|
2869
|
+
* the loading state clears. `0` means no lock.
|
|
2877
2870
|
*/
|
|
2878
2871
|
lockedMinHeight: number;
|
|
2879
2872
|
/**
|
|
@@ -2900,9 +2893,8 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
|
|
|
2900
2893
|
constructor();
|
|
2901
2894
|
/**
|
|
2902
2895
|
* Single source of truth for the data lifecycle: the explicit
|
|
2903
|
-
* {@link MnCollectionDataSource.state}
|
|
2904
|
-
*
|
|
2905
|
-
* loading check routes through this so both APIs stay in lockstep.
|
|
2896
|
+
* {@link MnCollectionDataSource.state}, defaulting to RETRIEVED when unset.
|
|
2897
|
+
* Every internal loading check routes through this.
|
|
2906
2898
|
*/
|
|
2907
2899
|
get collectionState(): MnCollectionState;
|
|
2908
2900
|
/** Whether the collection is currently loading (skeleton placeholders shown). */
|
|
@@ -5494,10 +5486,13 @@ type MnTabDataSource = {
|
|
|
5494
5486
|
items: MnTabItem[];
|
|
5495
5487
|
/** Index of the tab that should be active by default. */
|
|
5496
5488
|
defaultActive: number;
|
|
5497
|
-
/** When true, the tab bar renders a loading skeleton instead of the real tabs. */
|
|
5498
|
-
isDataLoading?: boolean;
|
|
5499
5489
|
/**
|
|
5500
|
-
*
|
|
5490
|
+
* Lifecycle state of the tab set. When {@link MnCollectionState.LOADING} the tab
|
|
5491
|
+
* bar renders a loading skeleton; any other state renders the real tabs.
|
|
5492
|
+
*/
|
|
5493
|
+
state?: MnCollectionState;
|
|
5494
|
+
/**
|
|
5495
|
+
* Number of placeholder tabs to render while {@link state} is LOADING.
|
|
5501
5496
|
* Defaults to the number of known `items`, falling back to 3 when no items are
|
|
5502
5497
|
* known yet. Set this only when the real tabs are not yet known at load time
|
|
5503
5498
|
* (e.g. tabs that depend on data being fetched) to predict the final count.
|
|
@@ -5526,6 +5521,11 @@ declare class MnTabComponent implements DoCheck {
|
|
|
5526
5521
|
activeChange: EventEmitter<MnTabItem>;
|
|
5527
5522
|
/** The currently active tab item. */
|
|
5528
5523
|
currentActive?: MnTabItem;
|
|
5524
|
+
/**
|
|
5525
|
+
* Whether the tab bar is loading and should render skeleton tabs, from
|
|
5526
|
+
* {@link MnTabDataSource.state}.
|
|
5527
|
+
*/
|
|
5528
|
+
get isLoadingState(): boolean;
|
|
5529
5529
|
/**
|
|
5530
5530
|
* Index array sizing the loading skeleton: `skeletonCount` when provided,
|
|
5531
5531
|
* otherwise the number of known items, falling back to a default when none.
|