UNPKG

@indice/ng-components

Version:

Indice common components for Angular v12

189 lines (188 loc) 5.42 kB
import { Observable } from 'rxjs'; import { Params } from '@angular/router'; export interface IAppNotifications { messages: Observable<IResultSet<NavLink>>; getMessage?: (predicate: (value: any, index: number, obj: any[]) => any) => any | undefined; markMessageRead?: (predicate: (value: any, index: number, obj: any[]) => any) => any | undefined; refresh?: () => void | undefined; inboxAction?: () => void | undefined; } export interface IAppLanguagesService { options: Observable<MenuOption[]> | undefined; selected?: string; default?: string; setSelected?: (lang: string) => void | undefined; } export interface IAppLinks { public: Observable<NavLink[]>; main: Observable<NavLink[]>; profile: Observable<NavLink[]>; profileActions: Observable<NavLink[]>; legal: Observable<NavLink[]>; brand: Observable<NavLink[]>; notifications?: Observable<NavLink>; } export declare class NavLink { constructor(text: string, path: string, exact?: boolean, external?: boolean, icon?: string, data?: any, queryParams?: Params); text: string; path: string; exact: boolean; external: boolean; icon: string | undefined; type: string; data: any | undefined; queryParams: Params | undefined; } export declare class ExternalNavLink extends NavLink { constructor(text: string, path: string, openInNewTab?: boolean, icon?: string); type: string; } export declare class FragmentNavLink extends NavLink { constructor(text: string, path: string, icon?: string); type: string; } export declare class NotificationNavLink extends NavLink { isRead: boolean; creationDate?: Date | undefined; constructor(text: string, path: string, isRead: boolean, creationDate?: Date | undefined); } export declare class NavLinkSeparator extends NavLink { isRead: boolean; creationDate?: Date | undefined; constructor(text: string, path: string, isRead: boolean, creationDate?: Date | undefined); type: string; } export declare class ViewAction { type: string; key: string | null; param: any; icon: string; tooltip: string | null; text?: string; constructor(type: string, key: string | null, param: any, icon: string, tooltip: string | null, text?: string); } export declare class ListViewType { static Tiles: string; static Table: string; static Map: string; static Gallery: string; } export declare class RouterViewAction extends ViewAction { outlet: string | null; link: string | null; constructor(icon: string, link: string, outlet: string | null, tooltip: string | null, text?: string); } export declare class SwitchViewAction extends ViewAction { constructor(view: string, icon: string, tooltip: string | null); } export interface IResultSet<T> { count: number; items: T[]; } export declare class HeaderMetaItem { key: string | null; icon: string | null; text: string | null; } export declare class MenuOption { constructor(text: string, value: any, description?: string, data?: any, icon?: string); text: string; value: any; description: string | undefined; data: any | undefined; icon: string | undefined; } export declare enum PagerPosition { Top = "top", Bottom = "bottom", Both = "both" } export interface IAddress { id?: string; street?: string | null; streetNumber?: string | null; city?: string | null; region?: string | null; postalCode?: string | null; country?: string | null; } export interface IShellConfig { appLogo: string; appLogoAlt: string; breadcrumb: boolean; customFooterComponent?: any; customHeaderComponent?: any; fluid: boolean; layout?: ShellLayoutType; showAlertsOnHeader?: boolean; showFooter: boolean; showHeader: boolean; showLangsOnHeader?: boolean; showUserNameOnHeader?: boolean; showPictureOnHeader?: boolean; } export declare enum ShellLayoutType { Stacked = "Stacked", Sidebar = "Sidebar" } export declare class DefaultShellConfig implements IShellConfig { appLogo: string; appLogoAlt: string; breadcrumb: boolean; fluid: boolean; layout: ShellLayoutType; showAlertsOnHeader: boolean; showFooter: boolean; showHeader: boolean; showUserNameOnHeader: boolean; showPictureOnHeader: boolean; } export declare enum SCREEN_SIZE { XS = 0, SM = 1, MD = 2, LG = 3, XL = 4 } export interface IScreenSize { id: SCREEN_SIZE; name: string; css: string; } export declare enum ToastType { Info = "info", Success = "success", Error = "error", Warning = "warning" } export declare const NULL_TOAST: Toast; export interface Toast { type: ToastType; title: string; body: string; delay: number; } export declare enum SidePaneSize { Default = "", Small25 = "25%", Medium50 = "50%", Large75 = "75%", Fullscreen = "100%" } export declare enum SidePaneOverlayType { Default = "", None = "-opacity-0", Light = "", Dark = "-opacity-50" } export interface IValidationProblemDetails { type?: string | undefined; title?: string | undefined; status?: number | undefined; detail?: string | undefined; instance?: string | undefined; errors?: { [key: string]: string[]; } | undefined; } export type UserSettingKey = 'MobileSideBar';