import { SxcRoot, SxcInstance } from '@2sic.com/2sxc-typings'; import { ElementRef } from '@angular/core'; import { ContextInfo } from './context-info'; import { ContextInfoPreconfigure } from './context-info-preconfigure'; /** * The Context gives you things from DNN and 2sxc which matches the current runtime context. * So it auto-detects what's going on in the page and initializes / provides everything. * * Note: some properties like moduleId are probably not actually in use any more and will probably be empty * * @export * @class Context * @implements {ContextInfo} */ export declare class Context implements ContextInfo { /** The global $2sxc object */ $2sxc: SxcRoot; /** The current module-instance 2sxc-controller */ sxc: SxcInstance; /** Setting if it should add HTTP headers. Default is true. You may want to change this if you have an own interceptor. */ addHttpHeaders: boolean; /** The current app name - used in API calls */ appNameInPath: string; /** The current edition to use for the application. */ edition: string; /** The API edition to use - if you use API-editions (recommended). Will usually be the same as the edition. */ apiEdition: string; /** The Module ID if it was custom-configured. Will be 'unknown' if not manually set, as then the auto-configure will be used */ moduleId: number; /** The Content Block ID if it was custom-configured. Will be 'unknown' if not manually set, as then the auto-configure will be used */ contentBlockId: number; /** * The path angular is running in - it's important for lazy-loading to work properly. * * New in v11.01 */ angularPath?: string; private appTagService; private preConfiguration; constructor(); private check2sxcVersion; /** * Pre-Configure this context - can be used to configure values in a subclass * @param preConfig Pre-Configuration values for this context */ preConfigure(preConfig: Partial): this; /** * Configure 2sxc in the context of a HTMLNode. * @param htmlNode the HTMLNode */ autoConfigure(htmlNode: ElementRef): void; /** * Get an attribute value from the app-tag * @param name attribute name */ getAppAttribute(name: string): string; /** * Get context information like module-id from the app-root tag * new in Dnn-Sxc-Angular 8 */ private getContextFromAppTag; }