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AD,CAAG;AAAC,YAD1B,eAAc,KAAO,WAArB,eAAc,KAAO,WAArB,eAAc,YAAc,AA6RsB,CAAA,GAAE,CA7RpD,CAAA,eAAc,KAAO,QAArB,CAAA,eAAc,KAAO,KA6R4C,AA7RlB,GACE;EAAC,CAAC,CAAC,CAAC;AA+RrD","file":"angular2/src/render/api.js","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"]}