mn-angular-lib 1.0.93 → 1.0.95
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
|
@@ -2604,6 +2604,23 @@ type OffsetPaginationStrategy = {
|
|
|
2604
2604
|
pageSize: number;
|
|
2605
2605
|
totalItems?: number;
|
|
2606
2606
|
} & PaginationStrategy;
|
|
2607
|
+
/**
|
|
2608
|
+
* Lifecycle state of a collection's data, driving which chrome the component
|
|
2609
|
+
* renders: skeleton placeholders ({@link LOADING}), the rows or empty state
|
|
2610
|
+
* ({@link RETRIEVED}), or an error placeholder ({@link ERROR}).
|
|
2611
|
+
*
|
|
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.
|
|
2615
|
+
*/
|
|
2616
|
+
declare enum MnCollectionState {
|
|
2617
|
+
/** Data is being (re)loaded; skeleton placeholders are shown. */
|
|
2618
|
+
LOADING = "LOADING",
|
|
2619
|
+
/** Data has loaded (possibly empty); rows or the empty state are shown. */
|
|
2620
|
+
RETRIEVED = "RETRIEVED",
|
|
2621
|
+
/** Loading failed; the error placeholder is shown. */
|
|
2622
|
+
ERROR = "ERROR"
|
|
2623
|
+
}
|
|
2607
2624
|
type PaginationMode = 'none' | 'load-more' | 'paginated' | 'client-side-pagination' | 'infinite-scroll';
|
|
2608
2625
|
type MnCollectionLabels = {
|
|
2609
2626
|
loadMore?: string;
|
|
@@ -2628,9 +2645,19 @@ type MnCollectionDataSource<T> = {
|
|
|
2628
2645
|
/** Translation key for the empty message. When set, the component resolves it via MnLanguageService. */
|
|
2629
2646
|
emptyMessageKey?: string;
|
|
2630
2647
|
emptyTemplate?: TemplateRef<unknown>;
|
|
2631
|
-
|
|
2648
|
+
/**
|
|
2649
|
+
* Lifecycle state of the data, controlling loading / error / empty rendering.
|
|
2650
|
+
* Defaults to {@link MnCollectionState.RETRIEVED} when not set.
|
|
2651
|
+
*/
|
|
2652
|
+
state?: MnCollectionState;
|
|
2632
2653
|
/** Number of placeholder rows rendered while data is loading. Defaults to 5. */
|
|
2633
2654
|
skeletonRowCount?: number;
|
|
2655
|
+
/** Message shown in the error placeholder when {@link state} is ERROR. */
|
|
2656
|
+
errorMessage?: string;
|
|
2657
|
+
/** Translation key for {@link errorMessage}; resolved via MnLanguageService. */
|
|
2658
|
+
errorMessageKey?: string;
|
|
2659
|
+
/** Custom template rendered in place of the default error placeholder. */
|
|
2660
|
+
errorTemplate?: TemplateRef<unknown>;
|
|
2634
2661
|
canSearch: boolean;
|
|
2635
2662
|
searchPlaceholder?: string;
|
|
2636
2663
|
/** Translation key for the search placeholder. When set, the component resolves it via MnLanguageService. */
|
|
@@ -2839,7 +2866,7 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
|
|
|
2839
2866
|
* Measured pixel height of the body container, applied as a `min-height` floor
|
|
2840
2867
|
* while a server reload is in flight so the container can't collapse when the
|
|
2841
2868
|
* data rows are swapped for skeletons. Released in {@link ngDoCheck} the moment
|
|
2842
|
-
*
|
|
2869
|
+
* the loading state clears. `0` means no lock.
|
|
2843
2870
|
*/
|
|
2844
2871
|
lockedMinHeight: number;
|
|
2845
2872
|
/**
|
|
@@ -2864,6 +2891,16 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
|
|
|
2864
2891
|
/** Tracks the previous toolbar template reference for change detection. */
|
|
2865
2892
|
private previousToolbarTemplate?;
|
|
2866
2893
|
constructor();
|
|
2894
|
+
/**
|
|
2895
|
+
* Single source of truth for the data lifecycle: the explicit
|
|
2896
|
+
* {@link MnCollectionDataSource.state}, defaulting to RETRIEVED when unset.
|
|
2897
|
+
* Every internal loading check routes through this.
|
|
2898
|
+
*/
|
|
2899
|
+
get collectionState(): MnCollectionState;
|
|
2900
|
+
/** Whether the collection is currently loading (skeleton placeholders shown). */
|
|
2901
|
+
get isLoadingState(): boolean;
|
|
2902
|
+
/** Whether loading failed (the error placeholder is shown instead of rows/empty). */
|
|
2903
|
+
get isErrorState(): boolean;
|
|
2867
2904
|
/** Whether the component delegates search to the consumer (server-side). */
|
|
2868
2905
|
get isServerSearched(): boolean;
|
|
2869
2906
|
get isPaginated(): boolean;
|
|
@@ -5449,10 +5486,13 @@ type MnTabDataSource = {
|
|
|
5449
5486
|
items: MnTabItem[];
|
|
5450
5487
|
/** Index of the tab that should be active by default. */
|
|
5451
5488
|
defaultActive: number;
|
|
5452
|
-
/** When true, the tab bar renders a loading skeleton instead of the real tabs. */
|
|
5453
|
-
isDataLoading?: boolean;
|
|
5454
5489
|
/**
|
|
5455
|
-
*
|
|
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.
|
|
5456
5496
|
* Defaults to the number of known `items`, falling back to 3 when no items are
|
|
5457
5497
|
* known yet. Set this only when the real tabs are not yet known at load time
|
|
5458
5498
|
* (e.g. tabs that depend on data being fetched) to predict the final count.
|
|
@@ -5481,6 +5521,11 @@ declare class MnTabComponent implements DoCheck {
|
|
|
5481
5521
|
activeChange: EventEmitter<MnTabItem>;
|
|
5482
5522
|
/** The currently active tab item. */
|
|
5483
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;
|
|
5484
5529
|
/**
|
|
5485
5530
|
* Index array sizing the loading skeleton: `skeletonCount` when provided,
|
|
5486
5531
|
* otherwise the number of known items, falling back to a default when none.
|
|
@@ -6070,5 +6115,5 @@ type MnPreviewMessage = {
|
|
|
6070
6115
|
*/
|
|
6071
6116
|
declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
|
|
6072
6117
|
|
|
6073
|
-
export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
|
|
6118
|
+
export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
|
|
6074
6119
|
export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, GridDataSource, GridLayout, GridSkeleton, HourRow, ListAppearance, ListDataSource, ListLabels, ListSkeleton, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnFileDisplayItem, MnFileInputDisplayMode, MnFileInputErrorMessageData, MnFileInputErrorMessagesData, MnFileInputProps, MnFileInputUIConfig, MnFileInputVariants, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPreviewMessage, MnQueryParams, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationMode, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };
|