import type { Editor } from 'mem-fs-editor'; import type { ManifestNamespace } from '@sap-ux/project-access'; import type { CustomPage, FCL, FpmPage, InternalCustomPage, InternalObjectPage, ObjectPage, ListReport, Navigation, InternalListReport, Libraries } from './types.js'; import { PageType } from './types.js'; import type { Manifest } from '../common/types.js'; type EnhancePageConfigFunction = (data: ObjectPage | ListReport, manifest: Manifest) => InternalObjectPage | InternalListReport; /** * Suffix for patterns to support arbitrary paramters */ export declare const PATTERN_SUFFIX = ":?query:"; /** * List of special page templates that differs from the standard 'sap.fe.templates'. */ export declare const SPECIAL_PAGE_TEMPLATES: string[]; /** * Generates the pattern for a new route based on the input. * * @param routes existing routes * @param targetEntity entity of the target * @param nav navigation object * @returns the generated pattern as string */ export declare function generateRoutePattern(routes: ManifestNamespace.Route[], targetEntity: string, nav?: Navigation): string; /** * Generates the target property for a route based on exiting routes, configurations and the target's name. * * @param routes existing routes * @param name name of the target page * @param fcl optional flag if FCL is enabled * @param nav navigation object * @returns the target property of a route */ export declare function generateRouteTarget(routes: ManifestNamespace.Route[], name: string, fcl?: boolean, nav?: Navigation): string | [string] | [ManifestNamespace.RouteTargetObject]; /** * Create a function that can be used as JsonReplace when calling extendJson. * * @param config page configuration * @returns a JsonReplacer function for the usage in ejs */ export declare function getManifestJsonExtensionHelper(config: InternalCustomPage | InternalObjectPage | InternalListReport): (key: string, value: any) => any; /** * Get the configuration parameters for the flexible column layout based on the given manifest and navigation config. * * @param manifest existing manifest * @param navigation navigation configuration that is to be added * @returns fcl configuration */ export declare function getFclConfig(manifest: Manifest, navigation?: Navigation): FCL; /** * Get the library dependencies for a given page type. * * @param pageType - Page type for which the dependencies are to be added * @returns Library dependencies */ export declare function getLibraryDependencies(pageType: PageType): Libraries; /** * Create target settings for a Fiori elements page. * * @param data - incoming configuration * @param addSettings - optional arbitrary settings * @returns version aware settings object */ export declare function initializeTargetSettings(data: FpmPage, addSettings?: Record): Record; /** * Validate the input parameters for the generation of a custom or an object page. * * @param basePath - the base path * @param config - the custom page configuration * @param fs - the memfs editor instance * @param dependencies - expected dependencies * @returns the updated memfs editor instance */ export declare function validatePageConfig(basePath: string, config: CustomPage | ObjectPage, fs: Editor, dependencies?: never[]): Promise; /** * Add an generic page to an existing UI5 application. * Supported pages - ListReport or ObjectPage. * * @param basePath - the base path * @param data - the page configuration * @param enhanceDataFn - Callback function for data enhancement * @param templatePath - path to 'manifest.json' template * @param fs - the memfs editor instance * @returns the updated memfs editor instance */ export declare function extendPageJSON(basePath: string, data: ObjectPage, enhanceDataFn: EnhancePageConfigFunction, templatePath: string, fs?: Editor): Promise; /** * Returns the template name prefix based on the provided manifest. * If the dependencies in manifest matches any of the special page templates, that template is returned. * Otherwise, it defaults to 'sap.fe.templates'. * * @param manifest The application manifest to check against special templates. * @returns The matched template prefix or the default 'sap.fe.templates'. */ export declare function getTemplateNamePrefix(manifest: Manifest): string; export {}; //# sourceMappingURL=common.d.ts.map