angular2
Version:
Angular 2 - a web framework for modern web apps
1 lines • 18.1 kB
Source Map (JSON)
{"version":3,"sources":["api.js"],"names":[],"mappings":"AAAA;AAAA,KAAO,EAAC,SAAQ,CAAC,KAAO,2BAAyB,CAAC;AAClD,KAAO,EAAC,OAAM,CAAC,KAAO,4BAA0B,CAAC;AACjD,KAAO,EAAC,IAAG;AAAG,IAAE,CAAC,KAAO,iCAA+B,CAAC;AACxD,KAAO,EAAC,aAAY,CAAC,KAAO,4BAA0B,CAAC;AAkBvD,KAAO,MAAM,aAAW;AAItB,YAAU,CAAE,QAAO,AAAQ,CAAG,CAAA,MAAK,AAAe,CAAG;AAzBvD,SAAK,cAAc,UAAnB,CAAA,MAAK,KAAgB,gBAyBmB,cAAY,CAzBd,CAAA;AA0BlC,OAAG,SAAS,EAAI,SAAO,CAAC;AACxB,OAAG,OAAO,EAAI,OAAK,CAAC;EACtB;AAAA,AACF;AAAA,AA7BA,KAAK,eAAe,AAAC,4BACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAD1B,MAAK,KAAgB,WAyBmB,aAAY,GAxBH;EAAC,CAAC,CAAC,CAAC;AA8BrD,KAAO,MAAM,cAAY;AAevB,YAAU,CAAE,CACV,KAAI;AAAG,cAAU;AAAG,mBAAe;AACnC,aAAS;AAAG,kBAAc;AAC1B,mBAAe;AAAG,mBAAe;AACjC,gBAAY;AAAG,eAAW;AAC1B,iBAAa,CACf,CAAG;AACD,OAAG,MAAM,EAAI,MAAI,CAAC;AAClB,OAAG,YAAY,EAAI,YAAU,CAAC;AAC9B,OAAG,iBAAiB,EAAI,iBAAe,CAAC;AACxC,OAAG,WAAW,EAAI,WAAS,CAAC;AAC5B,OAAG,gBAAgB,EAAI,gBAAc,CAAC;AACtC,OAAG,iBAAiB,EAAI,iBAAe,CAAC;AACxC,OAAG,iBAAiB,EAAI,iBAAe,CAAC;AACxC,OAAG,cAAc,EAAI,cAAY,CAAC;AAClC,OAAG,aAAa,EAAI,aAAW,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DACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAyQG,OAAM,IA1QnC,MAAK,KAAgB,OAC4B;EAAC,CAAC,CAAC,CAAC;AAqRrD,KAAO,MAAM,gBAAc;AAMzB,cAAY,CACV,YAAW,AAAO,CAAG,CAAA,SAAQ,AAAO,CAAG,CAAA,MAAK,AAAiB,CACxD;AA9RT,SAAK,cAAc,cAAnB,CAAA,MAAK,KAAgB,mBAArB,CAAA,MAAK,KAAgB,gBAArB,CAAA,MAAK,YAAuB,AA6RsB,CAAA,GAAE,CA7RpD,CAAA,MAAK,KAAgB,QAArB,CAAA,MAAK,KAAgB,KA6R4C,AA7RlB,CAAT,CAAA;EA8R5B;AAAA,AACV;AAAA,AA/RA,KAAK,eAAe,AAAC,uDACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAD1B,MAAK,KAAgB,WAArB,MAAK,KAAgB,WAArB,MAAK,YAAuB,AA6RsB,CAAA,GAAE,CA7RpD,CAAA,MAAK,KAAgB,QAArB,CAAA,MAAK,KAAgB,KA6R4C,AA7RlB,GACE;EAAC,CAAC,CAAC,CAAC;AA+RrD","file":"angular2/src/render/api.es6","sourcesContent":["import {isPresent} from 'angular2/src/facade/lang';\nimport {Promise} from 'angular2/src/facade/async';\nimport {List, Map} from 'angular2/src/facade/collection';\nimport {ASTWithSource} from 'angular2/change_detection';\n\n/**\n * General notes:\n *\n * The methods for creating / destroying views in this API are used in the AppViewHydrator\n * and RenderViewHydrator as well.\n *\n * We are already parsing expressions on the render side:\n * - this makes the ElementBinders more compact\n * (e.g. no need to distinguish interpolations from regular expressions from literals)\n * - allows to retrieve which properties should be accessed from the event\n * by looking at the expression\n * - we need the parse at least for the `template` attribute to match\n * directives in it\n * - render compiler is not on the critical path as\n * its output will be stored in precompiled templates.\n */\nexport class EventBinding {\n fullName: string; // name/target:name, e.g \"click\", \"window:resize\"\n source: ASTWithSource;\n\n constructor(fullName :string, source: ASTWithSource) {\n this.fullName = fullName;\n this.source = source;\n }\n}\n\nexport class ElementBinder {\n index:number;\n parentIndex:number;\n distanceToParent:number;\n directives:List<DirectiveBinder>;\n nestedProtoView:ProtoViewDto;\n propertyBindings: Map<string, ASTWithSource>;\n variableBindings: Map<string, ASTWithSource>;\n // Note: this contains a preprocessed AST\n // that replaced the values that should be extracted from the element\n // with a local name\n eventBindings: List<EventBinding>;\n textBindings: List<ASTWithSource>;\n readAttributes: Map<string, string>;\n\n constructor({\n index, parentIndex, distanceToParent,\n directives, nestedProtoView,\n propertyBindings, variableBindings,\n eventBindings, textBindings,\n readAttributes\n }) {\n this.index = index;\n this.parentIndex = parentIndex;\n this.distanceToParent = distanceToParent;\n this.directives = directives;\n this.nestedProtoView = nestedProtoView;\n this.propertyBindings = propertyBindings;\n this.variableBindings = variableBindings;\n this.eventBindings = eventBindings;\n this.textBindings = textBindings;\n this.readAttributes = readAttributes;\n }\n}\n\nexport class DirectiveBinder {\n // Index into the array of directives in the View instance\n directiveIndex:any;\n propertyBindings: Map<string, ASTWithSource>;\n // Note: this contains a preprocessed AST\n // that replaced the values that should be extracted from the element\n // with a local name\n eventBindings: List<EventBinding>;\n constructor({\n directiveIndex, propertyBindings, eventBindings\n }) {\n this.directiveIndex = directiveIndex;\n this.propertyBindings = propertyBindings;\n this.eventBindings = eventBindings;\n }\n}\n\nexport class ProtoViewDto {\n // A view that contains the host element with bound\n // component directive.\n // Contains a view of type #COMPONENT_VIEW_TYPE.\n static get HOST_VIEW_TYPE() { return 0; }\n // The view of the component\n // Can contain 0 to n views of type #EMBEDDED_VIEW_TYPE\n static get COMPONENT_VIEW_TYPE() { return 1; }\n // A view that is included via a Viewport directive\n // inside of a component view\n static get EMBEDDED_VIEW_TYPE() { return 1; }\n\n render: ProtoViewRef;\n elementBinders:List<ElementBinder>;\n variableBindings: Map<string, string>;\n type: number;\n\n constructor({render, elementBinders, variableBindings, type}={}) {\n this.render = render;\n this.elementBinders = elementBinders;\n this.variableBindings = variableBindings;\n this.type = type;\n }\n}\n\nexport class DirectiveMetadata {\n static get DECORATOR_TYPE() { return 0; }\n static get COMPONENT_TYPE() { return 1; }\n static get VIEWPORT_TYPE() { return 2; }\n id:any;\n selector:string;\n compileChildren:boolean;\n hostListeners:Map<string, string>;\n properties:Map<string, string>;\n setters:List<string>;\n readAttributes:List<string>;\n type:number;\n constructor({id, selector, compileChildren, hostListeners, properties, setters, readAttributes, type}) {\n this.id = id;\n this.selector = selector;\n this.compileChildren = isPresent(compileChildren) ? compileChildren : true;\n this.hostListeners = hostListeners;\n this.properties = properties;\n this.setters = setters;\n this.readAttributes = readAttributes;\n this.type = type;\n }\n}\n\n// An opaque reference to a RenderProtoView\nexport class ProtoViewRef {}\n\n// An opaque reference to a RenderView\nexport class ViewRef {}\n\nexport class ViewContainerRef {\n view:ViewRef;\n elementIndex:number;\n constructor(view:ViewRef, elementIndex: number) {\n this.view = view;\n this.elementIndex = elementIndex;\n }\n}\n\nexport class ViewDefinition {\n componentId: string;\n absUrl: string;\n template: string;\n directives: List<DirectiveMetadata>;\n\n constructor({componentId, absUrl, template, directives}) {\n this.componentId = componentId;\n this.absUrl = absUrl;\n this.template = template;\n this.directives = directives;\n }\n}\n\nexport class Renderer {\n /**\n * Creats a ProtoViewDto that contains a single nested component with the given componentId.\n */\n createHostProtoView(componentId):Promise<ProtoViewDto> { return null; }\n\n /**\n * Creats a ProtoViewDto for a component that will use an imperative View using the given\n * renderer.\n * Note: Rigth now, the renderer argument is ignored, but will be used in the future to define\n * a custom handler.\n */\n createImperativeComponentProtoView(rendererId):Promise<ProtoViewDto> { return null; }\n\n /**\n * Compiles a single RenderProtoView. Non recursive so that\n * we don't need to serialize all possible components over the wire,\n * but only the needed ones based on previous calls.\n */\n compile(template:ViewDefinition):Promise<ProtoViewDto> { return null; }\n\n /**\n * Sets the preset nested components,\n * which will be instantiated when this protoView is instantiated.\n * Note: We can't create new ProtoViewRefs here as we need to support cycles / recursive components.\n * @param {List<ProtoViewRef>} protoViewRefs\n * RenderProtoView for every element with a component in this protoView or in a view container's protoView\n */\n mergeChildComponentProtoViews(protoViewRef:ProtoViewRef, componentProtoViewRefs:List<ProtoViewRef>) { return null; }\n\n /**\n * Creates a view and inserts it into a ViewContainer.\n * @param {ViewContainerRef} viewContainerRef\n * @param {ProtoViewRef} protoViewRef A ProtoViewRef of type ProtoViewDto.HOST_VIEW_TYPE or ProtoViewDto.EMBEDDED_VIEW_TYPE\n * @param {number} atIndex\n * @return {List<ViewRef>} the view and all of its nested child component views\n */\n createViewInContainer(vcRef:ViewContainerRef, atIndex:number, protoViewRef:ProtoViewRef):List<ViewRef> { return null; }\n\n /**\n * Destroys the view in the given ViewContainer\n */\n destroyViewInContainer(vcRef:ViewContainerRef, atIndex:number):void {}\n\n /**\n * Inserts a detached view into a viewContainer.\n */\n insertViewIntoContainer(vcRef:ViewContainerRef, atIndex:number, view:ViewRef):void {}\n\n /**\n * Detaches a view from a container so that it can be inserted later on\n */\n detachViewFromContainer(vcRef:ViewContainerRef, atIndex:number):void {}\n\n /**\n * Creates a view and\n * installs it as a shadow view for an element.\n *\n * Note: only allowed if there is a dynamic component directive at this place.\n * @param {ViewRef} hostView\n * @param {number} elementIndex\n * @param {ProtoViewRef} componentProtoViewRef A ProtoViewRef of type ProtoViewDto.COMPONENT_VIEW_TYPE\n * @return {List<ViewRef>} the view and all of its nested child component views\n */\n createDynamicComponentView(hostViewRef:ViewRef, elementIndex:number, componentProtoViewRef:ProtoViewRef):List<ViewRef> { return null; }\n\n /**\n * Destroys the component view at the given index\n *\n * Note: only allowed if there is a dynamic component directive at this place.\n */\n destroyDynamicComponentView(hostViewRef:ViewRef, elementIndex:number):void {}\n\n /**\n * Creates a host view that includes the given element.\n * @param {ViewRef} parentViewRef (might be null)\n * @param {any} hostElementSelector element or css selector for the host element\n * @param {ProtoViewRef} hostProtoView a ProtoViewRef of type ProtoViewDto.HOST_VIEW_TYPE\n * @return {List<ViewRef>} the view and all of its nested child component views\n */\n createInPlaceHostView(parentViewRef:ViewRef, hostElementSelector, hostProtoViewRef:ProtoViewRef):List<ViewRef> { return null; }\n\n /**\n * Destroys the given host view in the given parent view.\n */\n destroyInPlaceHostView(parentViewRef:ViewRef, hostViewRef:ViewRef):void {}\n\n /**\n * Sets a property on an element.\n * Note: This will fail if the property was not mentioned previously as a propertySetter\n * in the View.\n */\n setElementProperty(view:ViewRef, elementIndex:number, propertyName:string, propertyValue:any):void {}\n\n /**\n * This will set the value for a text node.\n * Note: This needs to be separate from setElementProperty as we don't have ElementBinders\n * for text nodes in the RenderProtoView either.\n */\n setText(view:ViewRef, textNodeIndex:number, text:string):void {}\n\n /**\n * Sets the dispatcher for all events that have been defined in the template or in directives\n * in the given view.\n */\n setEventDispatcher(viewRef:ViewRef, dispatcher:any/*EventDispatcher*/):void {}\n\n /**\n * To be called at the end of the VmTurn so the API can buffer calls\n */\n flush():void {}\n}\n\n\n/**\n * A dispatcher for all events happening in a view.\n */\nexport class EventDispatcher {\n /**\n * Called when an event was triggered for a on-* attribute on an element.\n * @param {Map<string, any>} locals Locals to be used to evaluate the\n * event expressions\n */\n dispatchEvent(\n elementIndex:number, eventName:string, locals:Map<string, any>\n ):void {}\n}\n"]}