import { AppContextStore } from './app-context-store'; import { UIStateService } from './ui-state-service'; import { AppEvent } from '../../events/app-event'; /** * 历史记录项 * * @export * @interface HistoryItem */ export interface HistoryItem { /** * 路由信息 * * @type {*} * @memberof HistoryItem */ to?: any; /** * 参数信息 * * @type {*} * @memberof HistoryItem */ meta?: any; /** * 视图标识 * * @type {string} * @memberof HistoryItem */ tag?: string; /** * 上下文 * * @type {*} * @memberof HistoryItem */ context?: any; /** * 标题 * * @type {string} * @memberof HistoryItem */ caption?: string; /** * 子标题 * * @type {string} * @memberof HistoryItem */ info?: string; } /** * 应用导航记录基类 * * @export * @class AppNavHistory */ export declare class AppNavHistory { /** * 应用事件 * * @memberof AppNavHistory */ readonly appEvent: AppEvent<"navHistoryItemChange">; /** * 应用上下文仓库 * * @type {AppContextStore} * @memberof AppNavHistory */ readonly contextStore: AppContextStore; /** * 界面UI状态服务 * * @type {UIStateService} * @memberof AppNavHistory */ readonly uiStateService: UIStateService; /** * 国际化 * * @memberof AppNavHistory */ i18n: any; /** * 路由记录缓存 * * @type {HistoryItem[]} * @memberof AppNavHistory */ readonly historyList: HistoryItem[]; /** * 导航缓存,忽略判断的导航参数正则 * * @type {RegExp} * @memberof AppNavHistory */ readonly navIgnoreParameters: RegExp; /** * 首页mate信息 * * @type {*} * @memberof AppNavHistory */ indexMeta: any; /** * 分页切换历史记录排序值(最大值表示离当前最近的路由) * * @type {*} * @memberof AppNavHistory */ static sortIndex: number; /** * Creates an instance of AppNavHistory. * * @memberof AppNavHistory */ constructor(); /** * 根据url计算路由参数 * * @protected * @param {string} url * @returns {*} * @memberof AppNavHistory */ protected calcRouteParam(url: string): any; /** * 根据视图标识查找记录 * * @param {string} tag * @returns {*} * @memberof AppNavHistory */ findHistoryByTag(tag: string): any; /** * 查找路由缓存 * * @param {*} page * @param {any[]} [list=this.historyList] * @returns {number} * @memberof AppNavHistory */ findHistoryIndex(page: any, list?: any[]): number; /** * 新旧路由是否相同 * * @param {*} newRoute * @param {*} oldRoute * @returns {boolean} * @memberof AppNavHistory */ isRouteSame(newRoute: any, oldRoute: any): boolean; /** * 判断查询参数是否相同,会排除预定义的忽略参数 * * @param {*} newQuery 新查询参数 * @param {*} oldQuery 旧查询参数 * @returns {boolean} * @memberof AppNavHistory */ isQuerySame(newQuery: any, oldQuery: any): boolean; /** * 添加视图缓存 * * @param {*} to 当前路由信息 * @memberof AppNavHistory */ add(to: any): void; /** * 修改当前项排序值(记录上一分页项) * * @param item */ updateSortIndex(item: any): void; /** * 删除视图缓存 * * @param {HistoryItem} item * @memberof AppNavHistory */ remove(item: HistoryItem): void; /** * 重置路由缓存 * * @param {number} [num=0] * @memberof AppNavHistory */ reset(num?: number): void; /** * 设置指定缓存视图标题 * * @param {({ tag: string, caption: string | null, info: string | null })} { tag, caption, info } * @returns {boolean} * @memberof AppNavHistory */ setCaption({ tag, caption, info }: { tag: string; caption?: string; info?: string; }): boolean; /** * 设置路由视图标识 * * @param {string} tag * @param {*} route * @returns {boolean} * @memberof AppNavHistory */ setViewTag(tag: string, route: any): boolean; /** * 设置路由视图上下文 * * @param {*} context * @param {*} tag * @returns {boolean} * @memberof AppNavHistory */ setViewContext(context: any, tag: any): boolean; /** * 删除其他缓存 * * @param {HistoryItem} item * @memberof AppNavHistory */ removeOther(item: HistoryItem): void; /** * 缓存后退 * * @memberof AppNavHistory */ pop(): void; } //# sourceMappingURL=app-nav-history.d.ts.map