import * as rxjs from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs'; import * as i0 from '@angular/core'; import { OnDestroy, InjectionToken } from '@angular/core'; import * as _onecx_integration_interface from '@onecx/integration-interface'; import { GlobalErrorTopic, GlobalLoadingTopic, CurrentMfeTopic, CurrentLocationTopic, CurrentPageTopic, CurrentWorkspaceTopic, IsAuthenticatedTopic, ConfigurationTopic, Config, UserProfileTopic, PermissionsTopic, UserProfile, ParametersTopic, ParameterValue, PortalMessage, MessageTopic, CurrentThemeTopic, RemoteComponentsTopic, EndpointParameters, ShellCapability, IconTopic, IconClassType, TranslationContext, NotificationTopic } from '@onecx/integration-interface'; export { ShellCapability as Capability, MfeInfo, Theme } from '@onecx/integration-interface'; declare class AppConfigService { private http; private readonly logger; config$: BehaviorSubject<{ [key: string]: string; }>; init(baseUrl: string): Promise; getProperty(key: string): string | undefined; setProperty(key: string, val: string): void; getConfig(): { [key: string]: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class AppStateService implements OnDestroy { private _globalError$; get globalError$(): GlobalErrorTopic; set globalError$(source: GlobalErrorTopic); private _globalLoading$; get globalLoading$(): GlobalLoadingTopic; set globalLoading$(source: GlobalLoadingTopic); private _currentMfe$; get currentMfe$(): CurrentMfeTopic; set currentMfe$(source: CurrentMfeTopic); private _currentLocation$; get currentLocation$(): CurrentLocationTopic; set currentLocation$(source: CurrentLocationTopic); private _currentPage$; /** * This topic will only fire when pageInfo.path matches document.location.pathname, * if not it will fire undefined. */ get currentPage$(): CurrentPageTopic; set currentPage$(source: CurrentPageTopic); _currentWorkspace$: CurrentWorkspaceTopic | undefined; get currentWorkspace$(): CurrentWorkspaceTopic; set currentWorkspace$(source: CurrentWorkspaceTopic); /** * This Topic is initialized as soon as the authentication is done */ private _isAuthenticated$; get isAuthenticated$(): IsAuthenticatedTopic; set isAuthenticated$(source: IsAuthenticatedTopic); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare enum CONFIG_KEY { TKIT_PORTAL_DEFAULT_THEME = "TKIT_PORTAL_DEFAULT_THEME", TKIT_PORTAL_DISABLE_THEME_MANAGEMENT = "TKIT_PORTAL_DISABLE_THEME_MANAGEMENT", TKIT_PORTAL_THEME_SERVER_URL = "TKIT_PORTAL_THEME_SERVER_URL", TKIT_TOKEN_ROLE_CLAIM_NAME = "TKIT_TOKEN_ROLE_CLAIM_NAME", TKIT_PORTAL_ID = "TKIT_PORTAL_ID", TKIT_SUPPORTED_LANGUAGES = "TKIT_SUPPORTED_LANGUAGES", TKIT_SEARCH_BASE_URL = "TKIT_SEARCH_BASE_URL", APP_BASE_HREF = "APP_BASE_HREF", KEYCLOAK_REALM = "KEYCLOAK_REALM", KEYCLOAK_ENABLE_SILENT_SSO = "KEYCLOAK_ENABLE_SILENT_SSO", KEYCLOAK_URL = "KEYCLOAK_URL", KEYCLOAK_CLIENT_ID = "KEYCLOAK_CLIENT_ID", KEYCLOAK_TIME_SKEW = "KEYCLOAK_TIME_SKEW", KEYCLOAK_UPDATE_TOKEN_MIN_VALIDITY = "KEYCLOAK_UPDATE_TOKEN_MIN_VALIDITY", KEYCLOAK_ON_TOKEN_EXPIRED_ENABLED = "KEYCLOAK_ON_TOKEN_EXPIRED_ENABLED", KEYCLOAK_ON_AUTH_REFRESH_ERROR_ENABLED = "KEYCLOAK_ON_AUTH_REFRESH_ERROR_ENABLED", ONECX_PORTAL_FAVORITES_DISABLED = "ONECX_PORTAL_FAVORITES_DISABLED", ONECX_PORTAL_FEEDBACK_DISABLED = "ONECX_PORTAL_FEEDBACK_DISABLED", ONECX_PORTAL_SEARCH_DISABLED = "ONECX_PORTAL_SEARCH_DISABLED", ONECX_PORTAL_SUPPORT_TICKET_DISABLED = "ONECX_PORTAL_SUPPORT_TICKET_DISABLED", ONECX_PORTAL_ANNOUNCEMENTS_DISABLED = "ONECX_PORTAL_ANNOUNCEMENTS_DISABLED", ONECX_PORTAL_PASSWORD_CHANGE_DISABLED = "ONECX_PORTAL_PASSWORD_CHANGE_DISABLED", ONECX_PORTAL_SETTINGS_DISABLED = "ONECX_PORTAL_SETTINGS_DISABLED", ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED = "ONECX_PORTAL_MY_ROLES_PERMISSIONS_DISABLED", ONECX_PORTAL_HELP_DISABLED = "ONECX_PORTAL_HELP_DISABLED", ONECX_PORTAL_SEARCH_BUTTONS_REVERSED = "ONECX_PORTAL_SEARCH_BUTTONS_REVERSED", APP_VERSION = "APP_VERSION", IS_SHELL = "IS_SHELL", AUTH_SERVICE = "AUTH_SERVICE", AUTH_SERVICE_CUSTOM_URL = "AUTH_SERVICE_CUSTOM_URL", AUTH_SERVICE_CUSTOM_MODULE_NAME = "AUTH_SERVICE_CUSTOM_MODULE_NAME", POLYFILL_SCOPE_MODE = "POLYFILL_SCOPE_MODE", KEYBOARD_FOCUSABLE_SELECTOR = "KEYBOARD_FOCUSABLE_SELECTOR", CUSTOM_AUTH_SHARE_SCOPE = "CUSTOM_AUTH_SHARE_SCOPE" } declare enum POLYFILL_SCOPE_MODE { PERFORMANCE = "PERFORMANCE", PRECISION = "PRECISION" } declare class ConfigurationService implements OnDestroy { private http; private readonly logger; private defaultConfig; _config$: ConfigurationTopic | undefined; get config$(): ConfigurationTopic; set config$(source: ConfigurationTopic); private semaphore; ngOnDestroy(): void; init(): Promise; get isInitialized(): Promise; getProperty(key: CONFIG_KEY): Promise; setProperty(key: string, val: string): Promise; getConfig(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class UserService implements OnDestroy { profile$: UserProfileTopic; lang$: BehaviorSubject; _permissionsTopic$: PermissionsTopic | undefined; get permissionsTopic$(): PermissionsTopic; set permissionsTopic$(source: PermissionsTopic); constructor(); ngOnDestroy(): void; useOldLangSetting(profile: UserProfile): string; getPermissions(): rxjs.Observable; hasPermission(permissionKey: string | string[] | undefined): Promise; get isInitialized(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ParametersService implements OnDestroy { private readonly shellCapabilityService; private readonly appStateService; _parameters$: ParametersTopic | undefined; get parameters$(): ParametersTopic; set parameters$(source: ParametersTopic); ngOnDestroy(): void; /** * Use this method to get a parameter value in applications. * * @param key The key of the parameter to get. This is defined when the parameter is configured in parameter management. * @param defaultValue The default value that will be returned if the parameter is not found or if the shell is not yet providing the parameters because it is too old. */ get(key: string, defaultValue: T | Promise): Promise; /** * Use this method to get a parameter value in remote components. * * @param key The key of the parameter to get. This is defined when the parameter is configured in parameter management. * @param defaultValue The default value that will be returned if the parameter is not found or if the shell is not yet providing the parameters because it is too old. * @param productName The name of the product in which the parameter is defined. * @param appId The id of the application in which the parameter is defined. * @returns The value of the parameter or the default value. */ get(key: string, defaultValue: T | Promise, productName: string, appId: string): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type Message = PortalMessage; declare class PortalMessageService implements OnDestroy { private translateService; _message$: MessageTopic | undefined; get message$(): MessageTopic; set message$(source: MessageTopic); success(msg: Message): void; info(msg: Message): void; error(msg: Message): void; warning(msg: Message): void; private addTranslated; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ThemeService implements OnDestroy { _currentTheme$: CurrentThemeTopic | undefined; get currentTheme$(): CurrentThemeTopic; set currentTheme$(source: CurrentThemeTopic); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class RemoteComponentsService implements OnDestroy { _remoteComponents$: RemoteComponentsTopic | undefined; get remoteComponents$(): RemoteComponentsTopic; set remoteComponents$(source: RemoteComponentsTopic); ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class WorkspaceService { protected appStateService: AppStateService; private readonly logger; getUrl(productName: string, appId: string, endpointName?: string, endpointParameters?: EndpointParameters): Observable; doesUrlExistFor(productName: string, appId: string, endpointName?: string): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ShellCapabilityService { static setCapabilities(capabilities: ShellCapability[]): void; hasCapability(capability: ShellCapability): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class ImageRepositoryService implements OnDestroy { private readonly imageRepositoryInterface; get imageRepositoryTopic(): _onecx_integration_interface.ImageRepositoryTopic; getUrl(names: string[]): Promise; getUrl(names: string[], fallbackUrl: string): Promise; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class IconService implements OnDestroy { private readonly iconServiceInterface; get iconTopic(): IconTopic; requestIcon(name: string, type?: IconClassType): string; requestIconAsync(name: string, type?: IconClassType): Promise; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class DynamicTranslationService implements OnDestroy { private readonly dynamicTranslationInterface; get dynamicTranslationsTopic$(): _onecx_integration_interface.DynamicTranslationsTopic; getTranslations(lang: string, contexts: TranslationContext[]): Observable>>; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface LibConfig { appId: string; portalId: string; /** * If true, the tkit-module will not try to load remote env values from server(GET /assets/env.json) */ skipRemoteConfigLoad: boolean; /** * URL from which the remote config will be loaded, default: '/assets/env.json' */ remoteConfigURL: string; } declare const APP_CONFIG: InjectionToken; declare const SANITY_CHECK: InjectionToken; declare const APPLICATION_NAME: InjectionToken; declare const DYNAMIC_CONTAINER: InjectionToken<() => HTMLElement>; declare class NotificationService implements OnDestroy { private readonly notificationService; get notificationTopic(): NotificationTopic; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { APPLICATION_NAME, APP_CONFIG, AppConfigService, AppStateService, CONFIG_KEY, ConfigurationService, DYNAMIC_CONTAINER, DynamicTranslationService, IconService, ImageRepositoryService, NotificationService, POLYFILL_SCOPE_MODE, ParametersService, PortalMessageService, RemoteComponentsService, SANITY_CHECK, ShellCapabilityService, ThemeService, UserService, WorkspaceService }; export type { LibConfig, Message };