import { Injector, Type } from '@angular/core'; import { ActivatedRouteSnapshot, Route } from '@angular/router'; import { Controller } from './controller'; import { FramingNgModule } from './framing-ng-module'; /** * @description This is a description */ export declare abstract class Framer { private static _nextId; private framingDevTools; /** * The name of this framer. */ readonly abstract framerName: string; /** * Model accessor. */ readonly theModel: Model; /** * View accessor. */ readonly theView: View; /** * Controller accessor. */ readonly theController: Type>; /** * When true, framing will create a frame for this framer. */ readonly createFrame: boolean; /** * When true, framing will use multi on all providers so multiple framers of the same type can be setup on the same module. */ readonly multiFramer: boolean; /** * When true, framing will setup the controller as a provider by its type. */ readonly provideControllerByType: boolean; /** * When true, framing will add the model to the route data. */ readonly addModelToRouteData: boolean; /** * When true, framing will add the view to the route data. */ readonly addViewToRouteData: boolean; /** * When true, framing will add the frame to the route data. */ readonly addFrameToRouteData: boolean; /** * The default model. */ readonly defaultModel: Model; /** * The default view. */ readonly defaultView: View; /** * The default controller. */ readonly defaultController: Type>; /** * 'require': framing will attach the default route, creating it if it doesn't yet exist, if not route is attached to this framer (default behavior) * 'auto': framing will attach the default route if available if not route is attached to this framer * 'none': framing will not attach a route to this framer */ readonly routeRule: ('require' | 'auto' | 'none'); /** * A unique framer id for this framer. */ readonly framerId: number; /** * A unique identifier string for this framer instance. */ readonly framerIdent: string; /** * True if framing() has been called. */ readonly framed: boolean; /** * The injector (available on and after framerOnResolveRoute or framerOnControllerInit, whichever comes first) */ readonly injector: Injector; /** * The framer's route, if attached to a route, otherwise undefined * Valid ONLY during the runFraming() and framing() functions */ readonly route: Route; /** * A unique framer id for this framer. */ private _framerId; /** * True if framing() has been called. */ private _framed; /** * The model. */ private _model; /** * The view. */ private _view; /** * The controller. */ private _controller; /** * The frame. */ private _frame; /** * The framer's injector. */ private _injector; /** * The framer's route, if attached to a route, otherwise undefined * Valid ONLY during the runFraming() and framing() functions */ private _route; /** * Reference to the framer's FramingNgModule. * Valid ONLY during the framing() function */ private _framing; /** * Helper function to build the URL of an ActivatedRouteSnapshot */ static buildUrlLink(route: ActivatedRouteSnapshot): string; /** * Model chaining function. */ model(model?: Model): Framer; /** * View chaining function. */ view(view?: View): Framer; /** * Controller chaining function. */ controller(controller?: Type>): Framer; /** * The frame function. */ abstract frame(framing: FramingNgModule): void; /** * Framer on resolve route function called when framer's route is resolved. * Injector is set before during this call. * Not called if framer is not attached to a route. * To be overwritten if needed. */ framerOnResolveRoute(): void; /** * Framer on controller init function is called when the controller is first injected. * To be overwritten if needed. */ framerOnControllerInit(controller: Controller): void; /** * Calls derived framing() */ runFraming(framing: FramingNgModule, routeParam?: Route): void; /** * Contructor. */ constructor(model?: Model, view?: View, controller?: Type>); /** * Protected construct function for derived construction help. */ protected construct(model?: Model, view?: View, controller?: Type>): void; /** * Protected construct function for derived construction help. */ private findActivateRouteSnapshot(route); /** * FUTURE */ /** * FUTURE */ /** * FUTURE */ private addRouteData(framing, name, value); }