import { UrlTree } from '@angular/router'; /** 取得 router 保留字(一律轉小寫比對) */ export declare enum UofxRouterRootName { /** 前台-管理者端 */ Admin = "admin", /** 前台-使用者端 */ User = "user", /** 狀態 */ Status = "status", /** 登入 */ Auth = "auth", Base = "base", Bpm = "bpm", Eip = "eip", Dms = "dms", /** 通用連結 */ UniversalLink = "UniversalLink", /** 後台 */ Mgmt = "mgmt", /** 外掛模組 */ Plugin = "plugin" } export declare class UofxRouterHelper { private static slashSymbol; /** 動態路由公司別識別碼 Param Name */ static pathCodeParamName: string; static pathCodes: any[]; /** 取得所有的公司別識別碼 */ static get PathCodes(): Array; static set PathCodes(pathCodes: Array); /** @internal 路由公司別登入識別碼 */ static routerPathCode: string; /** 路由公司別登入識別碼 */ static get CurrentPathCode(): string; static set CurrentPathCode(routerPathCode: string); /** 如果 path code 對應的 公司別 id 和 自己重新輸入的 id 不一樣,重設資料 */ static resetUserInfoAfterPathCodeChanged(): void; /** * 轉換回沒有公司識別碼的 URL * @param routerUrl /ede/admin * @returns /admin */ static convertToNoPathCodeUrl(routerUrl: string): string; /** * 轉換成另外一間公司別識別碼的 URL * @param routerUrl 要轉換的原始 URL ex. /ede/login * @param newPathCode 新的公司識別碼 ex. ede2 * @returns /ede2/login */ static convertToNewPathCodeUrl(routerUrl: string, newPathCode: string): string; /** * 移除重複 Url 斜線處理 * @param url 未處理前的 URL ex. /abc////123//456 * @returns /abc/123/456 */ static replaceDoubleSlashToSingle(url: string): string; /** UofxRouter NavigateByUrl 處理 */ static overrideNavigateByUrl(url: string | UrlTree): string; /** * @internal 是否為例外(保留字)不檢查的路由 * @param routerUrl /ede/admin */ static _isExcludeRouter(routerUrl: string): boolean; /** * @internal Url 是否需要附加 PathCode * @param routerUrl /ede/admin * @returns 如果不包含則回傳 true,包含則回傳 false */ static _needToInsertPathCode(routerUrl: string): boolean; /** * @internal 移除 Url 開頭的斜線 * @param url 未處理前的 URL ex. /abc/123 * @returns abc/123 */ static _removeStartSlash(url: string): string; /** * @internal 移除 URL 最後的斜線 * @param url 未處理前的 URL ex. /abc/123/ * @returns /abc/123 */ static _trimLastSlash(url: string): string; /** * @internal 正規化 URL * @param url 未處理前的 URL ex. //abc/123//456/ * @param hasStartSlash 回傳 URL 第一位是否需包含, default : true * @returns /abc/123/456 或 abc/123/456 */ static _normalizationUrl(url: string, hasStartSlash?: boolean): string; }