angular2
Version:
Angular 2 - a web framework for modern web apps
1 lines • 4.75 kB
Source Map (JSON)
{"version":3,"sources":["compile_control.js"],"names":[],"mappings":"AAAA;AAAA,KAAO,EAAC,OAAM,CAAC,KAAO,2BAAyB,CAAC;AAChD,KAAO,EAAC,IAAG;AAAG,YAAU,CAAC,KAAO,iCAA+B,CAAC;AAChE,KAAO,EAAC,cAAa,CAAC,KAAO,oBAAkB,CAAC;AAChD,KAAO,EAAC,WAAU,CAAC,KAAO,iBAAe,CAAC;AAM1C,KAAO,MAAM,eAAa;AAQxB,YAAU,CAAE,KAAI,CAAG;AACjB,OAAG,OAAO,EAAI,MAAI,CAAC;AACnB,OAAG,kBAAkB,EAAI,EAAA,CAAC;AAC1B,OAAG,QAAQ,EAAI,KAAG,CAAC;AACnB,OAAG,SAAS,EAAI,KAAG,CAAC;AACpB,OAAG,oBAAoB,EAAI,KAAG,CAAC;EACjC;AAAA,AAGA,gBAAc,CAAE,OAAM,CAAG,CAAA,cAAa,CAAG,CAAA,MAAK,AAAe,CAAG,CAAA,OAAM,AAAe,CAAG;AA1B1F,SAAK,cAAc,SAAnB,CAAA,MAAK,KAAK,IAAI,iBAAd,CAAA,MAAK,KAAK,IAAI,SA0BoC,eAAa,UAAW,eAAa,CA1BjD,CAAA;AA2BlC,OAAG,SAAS,EAAI,QAAM,CAAC;AACvB,AAAI,MAAA,CAAA,iBAAgB,EAAI,CAAA,IAAG,kBAAkB,CAAC;AAC9C,AAAI,MAAA,CAAA,cAAa,EAAI,CAAA,IAAG,QAAQ,CAAC;AAEjC,OAAG,sBAAsB,EAAI,MAAI,CAAC;AAElC,QAAS,GAAA,CAAA,CAAA,EAAI,eAAa,CACrB,CAAA,CAAA,EAAI,CAAA,IAAG,OAAO,OAAO,CAAA,EAAK,EAAC,IAAG,sBAAsB,CACpD,CAAA,CAAA,EAAE,CAAG;AACR,AAAI,QAAA,CAAA,IAAG,EAAI,CAAA,IAAG,OAAO,CAAE,CAAA,CAAC,CAAC;AACzB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C,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,oBAyBwB,cAAa,IAAW,cAAa,GAzBtC;EAAC,CAAC,CAAC,CAAC;AADrD,KAAK,eAAe,AAAC,kDACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YAsDH,cAAa,GAtDa;EAAC,CAAC,CAAC,CAAC;AADrD,KAAK,eAAe,AAAC,iDACb,EAAC,GAAE,CAAG,UAAS,AAAD,CAAG;AAAC,YA2DP,cAAa,GA3DiB;EAAC,CAAC,CAAC,CAAC;AA4ErD","file":"angular2/src/render/dom/compiler/compile_control.es6","sourcesContent":["import {isBlank} from 'angular2/src/facade/lang';\nimport {List, ListWrapper} from 'angular2/src/facade/collection';\nimport {CompileElement} from './compile_element';\nimport {CompileStep} from './compile_step';\n\n/**\n * Controls the processing order of elements.\n * Right now it only allows to add a parent element.\n */\nexport class CompileControl {\n _steps:List<CompileStep>;\n _currentStepIndex:number;\n _parent:CompileElement;\n _results;\n _additionalChildren;\n _ignoreCurrentElement: boolean;\n\n constructor(steps) {\n this._steps = steps;\n this._currentStepIndex = 0;\n this._parent = null;\n this._results = null;\n this._additionalChildren = null;\n }\n\n // only public so that it can be used by compile_pipeline\n internalProcess(results, startStepIndex, parent:CompileElement, current:CompileElement) {\n this._results = results;\n var previousStepIndex = this._currentStepIndex;\n var previousParent = this._parent;\n\n this._ignoreCurrentElement = false;\n\n for (var i = startStepIndex;\n i < this._steps.length && !this._ignoreCurrentElement;\n i++) {\n var step = this._steps[i];\n this._parent = parent;\n this._currentStepIndex = i;\n step.process(parent, current, this);\n parent = this._parent;\n }\n\n if (!this._ignoreCurrentElement) {\n ListWrapper.push(results, current);\n }\n\n this._currentStepIndex = previousStepIndex;\n this._parent = previousParent;\n\n var localAdditionalChildren = this._additionalChildren;\n this._additionalChildren = null;\n return localAdditionalChildren;\n }\n\n addParent(newElement:CompileElement) {\n this.internalProcess(this._results, this._currentStepIndex+1, this._parent, newElement);\n this._parent = newElement;\n }\n\n addChild(element:CompileElement) {\n if (isBlank(this._additionalChildren)) {\n this._additionalChildren = ListWrapper.create();\n }\n ListWrapper.push(this._additionalChildren, element);\n }\n\n /**\n * Ignores the current element.\n *\n * When a step calls `ignoreCurrentElement`, no further steps are executed on the current\n * element and no `CompileElement` is added to the result list.\n */\n ignoreCurrentElement() {\n this._ignoreCurrentElement = true;\n }\n}\n"]}