type JsonObject = Record; type LooseStringUnion = T | (string & {}); import type { OakIconLibraryConfig } from '../types/Icon'; export type { OakIconLibraryConfig } from '../types/Icon'; export type PageAccessCheckerType = 'row' | 'data' | 'logical' | 'logicalData' | 'relation'; export type PageAccessRelationRule = { entity: Entity; actions: Action[]; path: string; }; export type PageAccessOperationRule = { entity: Entity; action: Action; data?: JsonObject; checkerTypes?: PageAccessCheckerType[]; }; export type PageRouteAccessItem = { type: 'public'; } | { type: 'deny'; } | { type: 'root'; } | { type: 'login'; } | { type: 'ref'; refs: string[]; } | { type: 'relation'; anyOf: Array>; } | { type: 'operation'; target: PageAccessOperationRule; } | { type: 'anyOf'; items: Array>; } | { type: 'allOf'; items: Array>; }; export type PageRouteAccess = PageRouteAccessItem | Array>; export type PageRouteConfig = { path?: string; title?: string; titleI18nKey?: string; enablePullDownRefresh?: boolean; access?: PageRouteAccess; }; export type NamespaceMenuGroup = { name: string; icon?: string; order?: number; }; export type NamespaceMenuConfig = { groups?: NamespaceMenuGroup[]; }; export type NamespaceRouteConfig = { path?: string; first?: string; notFound?: string; params?: Record; }; export type NamespaceAccessConfig = { unconfiguredAccess?: 'allow' | 'deny' | 'login'; }; export type NamespaceFeatureConfig = Record; export type NamespaceConfig = { route?: NamespaceRouteConfig; menu?: NamespaceMenuConfig; access?: NamespaceAccessConfig; features?: NamespaceFeatureConfig; iconLibraries?: OakIconLibraryConfig[]; }; export type PageMenuConfig = { name: string; icon?: string; group?: string; order?: number; path?: string; }; export type WechatMpNavigationBarTextStyle = 'black' | 'white'; export type WechatMpBackgroundTextStyle = 'dark' | 'light'; export type WechatMpNavigationStyle = 'default' | 'custom'; export type WechatMpPageOrientation = LooseStringUnion<'portrait' | 'landscape' | 'auto'>; export type WechatMpStyleIsolation = LooseStringUnion<'isolated' | 'apply-shared' | 'shared' | 'page-isolated' | 'page-apply-shared' | 'page-shared'>; export type WechatMpWindowConfig = { backgroundColor?: string; backgroundColorBottom?: string; backgroundColorTop?: string; backgroundTextStyle?: WechatMpBackgroundTextStyle; disableScroll?: boolean; disableSwipeBack?: boolean; enablePullDownRefresh?: boolean; homeButton?: boolean; navigationBarBackgroundColor?: string; navigationBarTextStyle?: WechatMpNavigationBarTextStyle; navigationBarTitleText?: string; navigationStyle?: WechatMpNavigationStyle; onReachBottomDistance?: number; pageOrientation?: WechatMpPageOrientation; }; export type WechatMpComponentGenericConfig = true | ({ default?: string; } & JsonObject); export type WechatMpComponentPlaceholderConfig = Record; export type WechatMpPageConfig = WechatMpWindowConfig & { usingComponents?: Record; componentGenerics?: Record; componentPlaceholder?: WechatMpComponentPlaceholderConfig; styleIsolation?: WechatMpStyleIsolation; component?: boolean; } & JsonObject; export type WechatMpComponentConfig = { usingComponents?: Record; componentGenerics?: Record; componentPlaceholder?: WechatMpComponentPlaceholderConfig; styleIsolation?: WechatMpStyleIsolation; component?: boolean; } & JsonObject; export type PageConfig = { enablePullDownRefresh?: boolean; route?: PageRouteConfig; menu?: PageMenuConfig; mp?: WechatMpPageConfig; }; export type ComponentConfig = { mp?: WechatMpComponentConfig; }; export declare function CreatePageConfig(raw: PageConfig): PageConfig; export declare function CreateComponentConfig(raw: ComponentConfig): ComponentConfig; export declare function CreateNamespaceConfig(raw: NamespaceConfig): NamespaceConfig;