Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Makes a type or an injection token public to the DI system by adding it to an injector's bloom filter.
function diPublicInInjector(injectorIndex,view,token){bloomAdd(injectorIndex,view[TVIEW],token);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}", "function diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView...
[ "0.7081439", "0.7081439", "0.7081439", "0.7081439", "0.7081439", "0.7081439", "0.7034055", "0.70086724", "0.68748456", "0.68386346", "0.68386346", "0.68386346", "0.68386346", "0.68386346", "0.6774338", "0.67499655", "0.67218065", "0.65624756", "0.6518868", "0.6518868", "0.651...
0.664483
17
Returns the value associated to the given token from the NodeInjectors => ModuleInjector. Look for the injector providing the token by walking up the node injector tree and then the module injector tree.
function getOrCreateInjectable(tNode,lView,token,flags,notFoundValue){if(flags===void 0){flags=InjectFlags.Default;}if(tNode){var bloomHash=bloomHashBitOrFactory(token);// If the ID stored here is a function, this is a special object like ElementRef or TemplateRef // so just call the factory function to create it. if(t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n\n if ((flags & (InjectFlags....
[ "0.6550304", "0.63845825", "0.6306316", "0.6306316", "0.6306316", "0.6306316", "0.6306316", "0.62820584", "0.60401285", "0.5999503", "0.5893086", "0.5893086", "0.5893086", "0.5893086", "0.5893086", "0.5879395", "0.5833662", "0.5833662", "0.5833662", "0.5833662", "0.5833662", ...
0.55166703
27
Searches for the given token among the node's directives and providers.
function locateDirectiveOrProvider(tNode,lView,token,canAccessViewProviders,isHostSpecialCase){var tView=lView[TVIEW];var nodeProviderIndexes=tNode.providerIndexes;var tInjectables=tView.data;var injectablesStart=nodeProviderIndexes&65535/* ProvidersStartIndexMask */;var directivesStart=tNode.directiveStart;var directi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n var nodeProviderIndexes = tNode.providerIndexes;\n var tInjectables = tView.data;\n var injectablesStart = nodeProviderIndexes & 1048575\n /* ProvidersStartIndexMask */\n ;\n var directivesStart = tNode.dir...
[ "0.60202056", "0.6009959", "0.5986673", "0.59765285", "0.59765285", "0.59765285", "0.59765285", "0.59765285", "0.59765285", "0.5914736", "0.5914736", "0.5229572", "0.5206615", "0.51336247", "0.50922155", "0.50475967", "0.50475967", "0.50475967", "0.50475967", "0.50475967", "0...
0.57561177
11
Retrieve or instantiate the injectable from the `lData` at particular `index`. This function checks to see if the value has already been instantiated and if so returns the cached `injectable`. Otherwise if it detects that the value is still a factory it instantiates the `injectable` and caches the value.
function getNodeInjectable(tData,lData,index,tNode){var value=lData[index];if(isFactory(value)){var factory=value;if(factory.resolving){throw new Error("Circular dep for "+stringify$1(tData[index]));}var previousIncludeViewProviders=setIncludeViewProviders(factory.canSeeViewProviders);factory.resolving=true;var previou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateInjectable(tNode, lView, token) {\n var flags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : InjectFlags.Default;\n var notFoundValue = arguments.length > 4 ? arguments[4] : undefined;\n\n if (tNode !== null) {\n var bloomHash = bloomHashBitO...
[ "0.63517034", "0.62454605", "0.6240995", "0.6240389", "0.6240389", "0.6240389", "0.6240389", "0.6240389", "0.6161029", "0.61311173", "0.61311173", "0.6040866", "0.58362234", "0.5824369", "0.5823093", "0.5823093", "0.5707344", "0.56259984", "0.56259984", "0.56259984", "0.56259...
0.5393894
23
Returns the bit in an injector's bloom filter that should be used to determine whether or not the directive might be provided by the injector. When a directive is public, it is added to the bloom filter and given a unique ID that can be retrieved on the Type. When the directive isn't public or the token is not a direct...
function bloomHashBitOrFactory(token){ngDevMode&&assertDefined(token,'token must be defined');if(typeof token==='string'){return token.charCodeAt(0)||0;}var tokenId=token[NG_ELEMENT_ID];return typeof tokenId==='number'?tokenId&BLOOM_MASK:tokenId;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n\n var tokenId = // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? t...
[ "0.5944488", "0.59322125", "0.5859092", "0.5859092", "0.5859092", "0.5859092", "0.5859092", "0.5859092", "0.58461297", "0.5837639", "0.5778053", "0.57509255", "0.57509255", "0.5735623", "0.5635539", "0.5514808", "0.53893846", "0.5379112", "0.53476703", "0.53476703", "0.534767...
0.5872621
2
Returns true if flags prevent parent injector from being searched for tokens
function shouldSearchParent(flags,isFirstHostTNode){return!(flags&InjectFlags.Self)&&!(flags&InjectFlags.Host&&isFirstHostTNode);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dontWantToken () {\n\t\treturn true;\n\t}", "function shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}", "function shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & Injec...
[ "0.64752966", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60048026", "0.60005367", "0.5941839", "0.5642456", "0.5642456", "0.5642456", "0.5642456", "0.5642456", "0.5642456", "0.5642456", "0.5642456", "0.56...
0.5806898
12
Creates an empty instance of a `LContext` context
function createLContext(lView,nodeIndex,_native2){return{lView:lView,nodeIndex:nodeIndex,"native":_native2,component:undefined,directives:undefined,localRefs:undefined};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function LContext(){}", "function LContext() {}", "function LContext() {}", "function LContext() {}", "function createEmptyContext() {\n return {\n startTime: Number.MAX_SAFE_INTEGER,\n endTime: 0,\n browserName: '',\n options: {\n deviceScaleFactor: 1,\n isMobile: false,\n view...
[ "0.7345877", "0.7012299", "0.7012299", "0.7012299", "0.7009764", "0.6957807", "0.6957807", "0.6822814", "0.65461755", "0.65461755", "0.65461755", "0.65461755", "0.65461755", "0.65461755", "0.6475729", "0.63956094", "0.63956094", "0.63956094", "0.6347624", "0.61549234", "0.615...
0.63144773
19
Takes a component instance and returns the view for that component.
function getComponentViewByInstance(componentInstance){var lView=readPatchedData(componentInstance);var view;if(Array.isArray(lView)){var nodeIndex=findViaComponent(lView,componentInstance);view=getComponentViewByIndex(nodeIndex,lView);var context=createLContext(lView,nodeIndex,view[HOST]);context.component=componentIn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getComponentViewByInstance(componentInstance) {\n var lViewData = readPatchedData(componentInstance);\n var view;\n if (Array.isArray(lViewData)) {\n var nodeIndex = findViaComponent(lViewData, componentInstance);\n view = getComponentViewByIndex(nodeIndex, lViewData);\n var ...
[ "0.71878207", "0.7102767", "0.70443046", "0.70443046", "0.70443046", "0.69775623", "0.69775623", "0.69775623", "0.69775623", "0.69775623", "0.69775623", "0.6953743", "0.6869094", "0.6450016", "0.636854", "0.63154966", "0.63154966", "0.6229156", "0.61339444", "0.6130843", "0.6...
0.7135576
1
Assigns the given data to the given target (which could be a component, directive or DOM node instance) using monkeypatching.
function attachPatchData(target,data){target[MONKEY_PATCH_KEY_NAME]=data;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAM...
[ "0.67836237", "0.66884786", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.6668597", "0.662172", "0.61054575", "0.6093559", "0.6090099", "0.60049045", "0.59607816", "0.58548635", "0.5843837", "0.58377695", "0.5744744...
0.62069666
12
Locates the element within the given LView and returns the matching index
function findViaNativeElement(lView,target){var tNode=lView[TVIEW].firstChild;while(tNode){var _native3=getNativeByTNode(tNode,lView);if(_native3===target){return tNode.index;}tNode=traverseNextElement(tNode);}return-1;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findViaNativeElement(lView, target) {\n var tNode = lView[TVIEW].firstChild;\n while (tNode) {\n var native = getNativeByTNode(tNode, lView);\n if (native === target) {\n return tNode.index;\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}", ...
[ "0.77218163", "0.77218163", "0.77218163", "0.75891054", "0.7559275", "0.75147283", "0.75147283", "0.75147283", "0.75147283", "0.75147283", "0.75147283", "0.7465591", "0.70083016", "0.70083016", "0.70083016", "0.70083016", "0.70083016", "0.70083016", "0.69830585", "0.69830585", ...
0.7783317
0
Locates the next tNode (child, sibling or parent).
function traverseNextElement(tNode){if(tNode.child){return tNode.child;}else if(tNode.next){return tNode.next;}else{// Let's take the following template: <div><span>text</span></div><component/> // After checking the text node, we need to find the next parent that has a "next" TNode, // in this case the parent `div`, s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n }\n else if (tNode.next) {\n return tNode.next;\n }\n else if (tNode.parent) {\n return tNode.parent.next || null;\n }\n return null;\n}", "function traverseNextElement(tNode) {\n i...
[ "0.70557064", "0.68625134", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6805021", "0.6765126", "0.65654653", "0.6551556", "0.6541631", "0.64387715", "0.6400999", "0.6344146", "0.63129526", "0.63129526", "0.6293141...
0.69605845
1
Locates the component within the given LView and returns the matching index
function findViaComponent(lView,componentInstance){var componentIndices=lView[TVIEW].components;if(componentIndices){for(var i=0;i<componentIndices.length;i++){var elementComponentIndex=componentIndices[i];var componentView=getComponentViewByIndex(elementComponentIndex,lView);if(componentView[CONTEXT]===componentInstan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLView...
[ "0.7603493", "0.7603493", "0.7603493", "0.7603493", "0.7603493", "0.7603493", "0.7569643", "0.7565394", "0.7565394", "0.7565394", "0.75606656", "0.7214066", "0.694944", "0.6930487", "0.6930487", "0.6930487", "0.6927687", "0.69184965", "0.69184965", "0.69184965", "0.69184965",...
0.7315872
11
Locates the directive within the given LView and returns the matching index
function findViaDirective(lView,directiveInstance){// if a directive is monkey patched then it will (by default) // have a reference to the LView of the current view. The // element bound to the directive being search lives somewhere // in the view data. We loop through the nodes and check their // list of directives f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check t...
[ "0.73725504", "0.73725504", "0.73725504", "0.73725504", "0.73725504", "0.73725504", "0.7341599", "0.7334381", "0.7334381", "0.7334381", "0.720884", "0.71770346", "0.68515074", "0.68088305", "0.68023753", "0.67601055", "0.67601055", "0.67601055", "0.67601055", "0.67601055", "0...
0.68421423
13
Returns a list of directives extracted from the given view based on the provided list of directive index values.
function getDirectivesAtNodeIndex(nodeIndex,lView,includeComponents){var tNode=lView[TVIEW].data[nodeIndex];var directiveStartIndex=tNode.directiveStart;if(directiveStartIndex==0)return EMPTY_ARRAY;var directiveEndIndex=tNode.directiveEnd;if(!includeComponents&&tNode.flags&1/* isComponent */)directiveStartIndex++;retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0)\n return EMPTY_ARRAY;\n var directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents &...
[ "0.71618766", "0.71618766", "0.7128941", "0.7089328", "0.7083448", "0.7083448", "0.7076859", "0.70656186", "0.70656186", "0.70656186", "0.70656186", "0.6442265", "0.57006955", "0.5622528", "0.55817443", "0.55814564", "0.5560746", "0.5560746", "0.5560112", "0.5560112", "0.5560...
0.7406785
0
Returns a map of local references (local reference name => element or directive instance) that exist on a given element.
function discoverLocalRefs(lView,nodeIndex){var tNode=lView[TVIEW].data[nodeIndex];if(tNode&&tNode.localNames){var result={};for(var i=0;i<tNode.localNames.length;i+=2){var localRefName=tNode.localNames[i];var directiveIndex=tNode.localNames[i+1];result[localRefName]=directiveIndex===-1?getNativeByTNode(tNode,lView):lV...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_cacheChildrenWithExternalReferences(element) {\n const elementsWithFuncIri = element.querySelectorAll(funcIriAttributeSelector);\n const elements = this._elementsWithExternalReferences =\n this._elementsWithExternalReferences || new Map();\n for (let i = 0; i < elementsWithFuncIri....
[ "0.6464683", "0.6464683", "0.63939005", "0.63939005", "0.63533545", "0.5956824", "0.59499866", "0.5923382", "0.5923382", "0.5923382", "0.5923382", "0.5923382", "0.5923382", "0.59014326", "0.5761262", "0.5730791", "0.57283604", "0.5684479", "0.5588597", "0.55656713", "0.555269...
0.624326
5
Returns the component instance associated with a given DOM host element. Elements which don't represent components return `null`.
function getContext(element){var context=loadLContextFromNode(element);return context.lView[CONTEXT];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent$1(nativeElement) || getOwningComponent(nativeElement));\n }", "function getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective)[\"native\"];\n ...
[ "0.72913665", "0.7186783", "0.7129403", "0.7129403", "0.7129403", "0.7129403", "0.7129403", "0.7129403", "0.7096324", "0.68357724", "0.68357724", "0.68357724", "0.68357724", "0.68357724", "0.68357724", "0.68357724", "0.6654134", "0.6630358", "0.6630358", "0.6630358", "0.66283...
0.0
-1
Returns the component instance associated with view which owns the DOM element (`null` otherwise).
function getViewComponent(element){var context=loadLContext(element);var lView=context.lView;while(lView[PARENT]&&lView[HOST]===null){// As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf` lView=lView[PARENT];}return lView[FLAGS]&128/* IsRoot */?null:lView[CONTEXT];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get componentInstance() {\n const nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent$1(nativeElement) || getOwningComponent(nativeElement));\n }", "function getOwningComponent(elementOrDir) {\n var context = loadLContext(elementOrDir, false);\n if...
[ "0.7499226", "0.6815107", "0.6808461", "0.6808461", "0.6785703", "0.6741352", "0.6741352", "0.6741352", "0.6741352", "0.6741352", "0.67344", "0.67324024", "0.65808433", "0.65808433", "0.65808433", "0.65808433", "0.65808433", "0.6574213", "0.6571796", "0.655186", "0.655186", ...
0.688889
1
Returns the `RootContext` instance that is associated with the application where the target is situated.
function getRootContext$1(target){var lViewData=Array.isArray(target)?target:loadLContext(target).lView;var rootLView=getRootView$1(lViewData);return rootLView[CONTEXT];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRootContext$1(target) {\n var lViewData = Array.isArray(target) ? target : loadLContext(target).lView;\n var rootLView = getRootView$1(lViewData);\n return rootLView[CONTEXT];\n}", "function getRootContext$1(target) {\n var lViewData = Array.isArray(target) ? target : loadLContext(target)...
[ "0.71372044", "0.71372044", "0.7058876", "0.630266", "0.62404704", "0.62404704", "0.62404704", "0.62404704", "0.62404704", "0.62404704", "0.6207162", "0.6199392", "0.6165179", "0.606589", "0.5983853", "0.5929568", "0.5918919", "0.59188396", "0.59188396", "0.5772178", "0.57261...
0.6913821
3
Retrieve all root components. Root components are those which have been bootstrapped by Angular.
function getRootComponents(target){return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(getRootContext$1(target).components);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRootComponents(elementOrDir) {\n return [...getRootContext(elementOrDir).components];\n}", "function getRootComponents(elementOrDir) {\n return [...getRootContext(elementOrDir).components];\n}", "function getRootComponents(elementOrDir) {\n return [...getRootContext(elementOrDir).component...
[ "0.67033195", "0.67033195", "0.67033195", "0.67033195", "0.67033195", "0.67033195", "0.6523834", "0.637072", "0.637072", "0.637072", "0.637072", "0.637072", "0.637072", "0.6366792", "0.6264009", "0.6264009", "0.6232221", "0.6195472", "0.6193742", "0.5821407", "0.57957006", ...
0.6564584
6
Retrieves an `Injector` associated with the element, component or directive.
function getInjector(target){var context=loadLContext(target);var tNode=context.lView[TVIEW].data[context.nodeIndex];return new NodeInjector(tNode,context.lView);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInjector(elementOrDir) {\n const context = getLContext(elementOrDir);\n if (context === null)\n return Injector.NULL;\n const tNode = context.lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, context.lView);\n}", "function getInjector(elementOrDir) {\n const...
[ "0.7708526", "0.7557245", "0.7557245", "0.7557245", "0.7557245", "0.7557245", "0.7490293", "0.74901414", "0.6875667", "0.64657676", "0.64620453", "0.63996774", "0.63996774", "0.63996774", "0.6293829", "0.628816", "0.6268321", "0.6268321", "0.6268321", "0.6268321", "0.6268321"...
0.59551966
23
Retrieve a set of injection tokens at a given DOM node.
function getInjectionTokens(element){var context=loadLContext(element,false);if(!context)return[];var lView=context.lView;var tView=lView[TVIEW];var tNode=tView.data[context.nodeIndex];var providerTokens=[];var startIndex=tNode.providerIndexes&65535/* ProvidersStartIndexMask */;var endIndex=tNode.directiveEnd;for(var i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInjectionTokens(element) {\n var context = loadLContext(element, false);\n if (context === null) return [];\n var lView = context.lView;\n var tView = lView[TVIEW];\n var tNode = tView.data[context.nodeIndex];\n var providerTokens = [];\n var startIndex ...
[ "0.64812535", "0.64789855", "0.64789855", "0.64789855", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6449902", "0.64494175", "0.57884604", "0.5321933", "0.53216237", "0.530202", "0.5065975", "0.5057938", "0.49698466", "0.48695007", "0.48666567", "0.4866...
0.64970595
0
Retrieves directives associated with a given DOM host element.
function getDirectives(target){var context=loadLContext(target);if(context.directives===undefined){context.directives=getDirectivesAtNodeIndex(context.nodeIndex,context.lView,false);}return context.directives||[];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDirectives(element) {\n var context = loadLContext(element);\n\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n } // The `directives` in this case are a named array called `LComponentView`...
[ "0.66678613", "0.6582734", "0.6582734", "0.6582734", "0.6582734", "0.6582734", "0.6267973", "0.61933136", "0.61933136", "0.61933136", "0.6079427", "0.5735324", "0.5724282", "0.5724282", "0.5724282", "0.5724282", "0.5724282", "0.5724282", "0.57137764", "0.5660641", "0.5459357"...
0.5514322
20
Retrieve the root view from any component by walking the parent `LView` until reaching the root `LView`.
function getRootView$1(componentOrView){var lView;if(Array.isArray(componentOrView)){ngDevMode&&assertDefined(componentOrView,'lView');lView=componentOrView;}else{ngDevMode&&assertDefined(componentOrView,'component');lView=readPatchedLView(componentOrView);}while(lView&&!(lView[FLAGS]&128/* IsRoot */)){lView=lView[PARE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n\n while (lView && !(lView[FLAGS] & 512\n /* IsRoot */\n )) {\n lView =...
[ "0.7645294", "0.7528471", "0.7488389", "0.7446533", "0.7446533", "0.7446533", "0.7446533", "0.7446533", "0.7446533", "0.7318781", "0.7318781", "0.72580826", "0.7159356", "0.7159356", "0.68346536", "0.6832384", "0.66105187", "0.6500697", "0.6313899", "0.62967867", "0.62799925"...
0.7508962
2
Retrieve map of local references. The references are retrieved as a map of local reference name to element or directive instance.
function getLocalRefs(target){var context=loadLContext(target);if(context.localRefs===undefined){context.localRefs=discoverLocalRefs(context.lView,context.nodeIndex);}return context.localRefs||{};}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function discoverLocalRefs(lViewData, nodeIndex) {\n var tNode = lViewData[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n var result = {};\n for (var i = 0; i < tNode.localNames.length; i += 2) {\n var localRefName = tNode.localNames[i];\n var directiveIndex ...
[ "0.69937795", "0.6936566", "0.6936566", "0.6901824", "0.6761721", "0.6709291", "0.6695139", "0.6695139", "0.6695139", "0.6695139", "0.6695139", "0.6689717", "0.6680493", "0.6680493", "0.6680493", "0.66434693", "0.65839994", "0.6564448", "0.65366584", "0.650875", "0.6465832", ...
0.69621694
1
Retrieve the host element of the component. Use this function to retrieve the host element of the component. The host element is the element which the component is associated with.
function getHostElement(directive){return getLContext(directive)["native"];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get hostElement() {\n return this._host;\n }", "_getHostElement() {\n return this._elementRef.nativeElement;\n }", "_getHostElement() {\n return this._elementRef.nativeElement;\n }", "_getHostElement() {\n return this._element.nativeElement;\n }", "_getHostElement() ...
[ "0.81510276", "0.76151896", "0.76151896", "0.74661946", "0.74661946", "0.74661946", "0.74661946", "0.74661946", "0.74661946", "0.74661946", "0.74661946", "0.74287534", "0.7172544", "0.7172544", "0.7172544", "0.7172544", "0.7172544", "0.7172544", "0.7152542", "0.67396677", "0....
0.6434093
26
This function should not exist because it is megamorphic and only mostly correct. See call site for more info.
function isDirectiveDefHack(obj){return obj.type!==undefined&&obj.template!==undefined&&obj.declaredInputs!==undefined;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "static private internal function m121() {}", "protected internal function m252() {}", "private public function m246() {}", "transient protected internal function m189() {}", "static final private internal function m106() {}", "static private protected internal fun...
[ "0.69304514", "0.6817973", "0.6665569", "0.66058075", "0.65296847", "0.63780016", "0.63695085", "0.63352674", "0.63196313", "0.62817514", "0.6232", "0.6193172", "0.61641645", "0.61008173", "0.60635036", "0.6052037", "0.60141295", "0.59531397", "0.5945406", "0.59451085", "0.59...
0.0
-1
Called when directives inject each other (creating a circular dependency) Called when there are multiple component selectors that match a given node
function throwMultipleComponentError(tNode){throw new Error("Multiple components match node with tagname "+tNode.tagName);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findDirectiveMatches(tView,viewData,tNode){ngDevMode&&assertEqual(getFirstTemplatePass(),true,'should run on first template pass only');var registry=tView.directiveRegistry;var matches=null;if(registry){for(var i=0;i<registry.length;i++){var def=registry[i];if(isNodeMatchingSelectorList(tNode,def.selector...
[ "0.5667596", "0.54436225", "0.5312725", "0.52633023", "0.5242117", "0.52313423", "0.5219653", "0.5139417", "0.5139417", "0.5139417", "0.5139417", "0.5139417", "0.5139417", "0.5110322", "0.5090524", "0.5090524", "0.5019603", "0.50130504", "0.5009633", "0.49949998", "0.49769226...
0.48160836
35
Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on.
function throwErrorIfNoChangesMode(creationMode,oldValue,currValue){var msg="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+oldValue+"'. Current value: '"+currValue+"'.";if(creationMode){msg+=" It seems like the view has been created after its parent and its...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {\n if (checkNoChangesMode) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n ...
[ "0.78833604", "0.77690834", "0.76029634", "0.76029634", "0.76029634", "0.7553267", "0.7532669", "0.7532669", "0.7532669", "0.7532669", "0.7532669", "0.7462583", "0.6944377", "0.60977983", "0.6018795", "0.5993892", "0.58986527", "0.58986527", "0.5896359", "0.5889543", "0.58895...
0.7754472
2
Gets the current binding value.
function getBinding(lView,bindingIndex){ngDevMode&&assertDataInRange(lView,lView[bindingIndex]);ngDevMode&&assertNotEqual(lView[bindingIndex],NO_CHANGE,'Stored value should never be NO_CHANGE.');return lView[bindingIndex];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBinding(binding) {\n if (!data.bindings[binding]) return undefined;\n return data.bindings[binding].value;\n }", "function getBinding(binding) {\n if (!data.bindings[binding]) return undefined;\n return data.bindings[binding].value;\n}", "get value() {\n return this._model ? this._g...
[ "0.72410274", "0.7127255", "0.6529721", "0.6529721", "0.6398717", "0.6388006", "0.6328419", "0.6236454", "0.6228308", "0.62272096", "0.61998963", "0.61998963", "0.61998963", "0.61998963", "0.61715734", "0.614832", "0.614261", "0.6121435", "0.6106545", "0.6099548", "0.6096954"...
0.5928999
55
Updates binding if changed, then returns whether it was updated.
function bindingUpdated(lView,bindingIndex,value){ngDevMode&&assertNotEqual(value,NO_CHANGE,'Incoming value should never be NO_CHANGE.');ngDevMode&&assertLessThan(bindingIndex,lView.length,"Slot should have been initialized to NO_CHANGE");if(lView[bindingIndex]===NO_CHANGE){// initial pass lView[bindingIndex]=value;}el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindingUpdated(lView, bindingIndex, value) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode && assertLessThan(bindingIndex, lView.length, \"Slot should have been initialized to NO_CHANGE\");\n var oldValue = lView[bindingIndex]...
[ "0.70293015", "0.6976405", "0.6976405", "0.6976405", "0.6976405", "0.6976405", "0.6976405", "0.69466597", "0.6919909", "0.6907773", "0.6799467", "0.6799467", "0.6495974", "0.63566035", "0.62900484", "0.62900484", "0.6187228", "0.6080829", "0.59846306", "0.5908877", "0.5899091...
0.6160985
17
Updates 2 bindings if changed, then returns whether either was updated.
function bindingUpdated2(lView,bindingIndex,exp1,exp2){var different=bindingUpdated(lView,bindingIndex,exp1);return bindingUpdated(lView,bindingIndex+1,exp2)||different;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n const different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}", "function bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n const different = bindingUpdated(lView, bind...
[ "0.65282565", "0.65282565", "0.65282565", "0.65282565", "0.65282565", "0.65282565", "0.64664567", "0.64664567", "0.64664567", "0.6449157", "0.6446036", "0.6401626", "0.6331426", "0.63150513", "0.62986857", "0.62986857", "0.62986857", "0.62986857", "0.62986857", "0.62986857", ...
0.65157914
6
Updates 3 bindings if changed, then returns whether any was updated.
function bindingUpdated3(lView,bindingIndex,exp1,exp2,exp3){var different=bindingUpdated2(lView,bindingIndex,exp1,exp2);return bindingUpdated(lView,bindingIndex+2,exp3)||different;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}", "function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n const different = binding...
[ "0.68735516", "0.68735516", "0.68735516", "0.68735516", "0.68735516", "0.68735516", "0.6823232", "0.6819399", "0.6804555", "0.6804555", "0.6804555", "0.67802846", "0.63554883", "0.63554883", "0.63554883", "0.63554883", "0.63554883", "0.63554883", "0.63400316", "0.63388175", "...
0.6645562
12
Updates 4 bindings if changed, then returns whether any was updated.
function bindingUpdated4(lView,bindingIndex,exp1,exp2,exp3,exp4){var different=bindingUpdated2(lView,bindingIndex,exp1,exp2);return bindingUpdated2(lView,bindingIndex+2,exp3,exp4)||different;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}", "function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n const ...
[ "0.6857585", "0.6857585", "0.6857585", "0.6857585", "0.6857585", "0.6857585", "0.67900795", "0.6786002", "0.6786002", "0.6786002", "0.67522323", "0.67466044", "0.6530483", "0.6530483", "0.6530483", "0.6530483", "0.6530483", "0.6530483", "0.65211624", "0.65198874", "0.6518717"...
0.66216564
12
Returns whether the `renderer` is a `ProceduralRenderer3`
function isProceduralRenderer(renderer){return!!renderer.listen;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n}", "function isProceduralRenderer(renderer) {\n return !!(renderer....
[ "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.70536023", "0.7019289", "0.7014597", "0.57978785", "0.57978785", "0.57978785", "0.5748475", "0.5748475", "0.5726107", "0.5715648", "0.56863064", "0...
0.69432074
12
Get the first parent of a node that isn't an IcuContainer TNode
function getFirstParentNative(tNode){var parent=tNode.parent;while(parent&&parent.type===5/* IcuContainer */){parent=parent.parent;}return parent;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFirstParentNative(tNode) {\n var parent = tNode.parent;\n while (parent && parent.type === 5 /* IcuContainer */) {\n parent = parent.parent;\n }\n return parent;\n}", "function getFirstParentNative(tNode) {\n var parent = tNode.parent;\n while (parent && parent.type === 5 /* ...
[ "0.8131028", "0.8131028", "0.7355707", "0.7173911", "0.71692985", "0.707799", "0.707799", "0.707799", "0.707799", "0.707799", "0.707799", "0.7076824", "0.7071808", "0.7020456", "0.69962245", "0.6908056", "0.69034725", "0.68841875", "0.6868244", "0.6868244", "0.68659174", "0...
0.8302958
0
Gets the host element given a view. Will return null if the current view is an embedded view, which does not have a host element.
function getHostNative(currentView){var hostTNode=currentView[HOST_NODE];return hostTNode&&hostTNode.type!==2/* View */?getNativeByTNode(hostTNode,currentView[PARENT]):null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHostNative(currentView) {\n ngDevMode && assertLView(currentView);\n var hostTNode = currentView[T_HOST];\n return hostTNode && hostTNode.type === 3 /* Element */ ?\n getNativeByTNode(hostTNode, getLViewParent(currentView)) :\n null;\n}", "function getHostNative(currentView) {\...
[ "0.7228365", "0.67659", "0.67659", "0.67659", "0.65016645", "0.62079567", "0.62079567", "0.62079567", "0.62079567", "0.62079567", "0.61912817", "0.6182899", "0.61672294", "0.6161126", "0.6161126", "0.6161126", "0.6161126", "0.6161126", "0.61300194", "0.61300194", "0.6116301",...
0.6729733
4
Retrieves render parent for a given view. Might be null if a view is not yet attached to any container.
function getContainerRenderParent(tViewNode,view){var container=getLContainer(tViewNode,view);return container?container[RENDER_PARENT]:null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContainerRenderParent(tViewNode, view) {\n var container = getLContainer(tViewNode, view);\n return container ? container[RENDER_PARENT] : null;\n}", "function getContainerRenderParent(tViewNode, view) {\n var container = getLContainer(tViewNode, view);\n return container ? container[REND...
[ "0.87062037", "0.87062037", "0.87062037", "0.8561595", "0.8486193", "0.84406483", "0.8419802", "0.8419802", "0.8419802", "0.8419802", "0.8419802", "0.83940953", "0.83940953", "0.83940953", "0.83940953", "0.8114002", "0.73980236", "0.64746225", "0.64518833", "0.64518833", "0.6...
0.8535924
4
Walks a tree of TNodes, applying a transformation on the element nodes, either only on the first one found, or on all of them.
function walkTNodeTree(viewToWalk,action,renderer,renderParent,beforeNode){var rootTNode=viewToWalk[TVIEW].node;var projectionNodeIndex=-1;var currentView=viewToWalk;var tNode=rootTNode.child;while(tNode){var nextTNode=null;if(tNode.type===3/* Element */){executeNodeAction(action,renderer,renderParent,getNativeByTNode(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _transform(node, callback) {\n return node.map(function (child, path, parent) {\n var replacement = callback(child, path, parent);\n return _transform(replacement, callback);\n });\n }", "function _transform (node, callback) {\n return node.map(function(child, path, paren...
[ "0.6082336", "0.6058421", "0.6058421", "0.5802928", "0.5799857", "0.5573425", "0.55099666", "0.55031717", "0.5501397", "0.5501397", "0.5501397", "0.5501397", "0.54818493", "0.54250985", "0.53814316", "0.5292473", "0.5292473", "0.5281346", "0.5281346", "0.5272345", "0.5247041"...
0.48123744
94
NOTE: for performance reasons, the possible actions are inlined within the function instead of being passed as an argument.
function executeNodeAction(action,renderer,parent,node,beforeNode){if(action===0/* Insert */){isProceduralRenderer(renderer)?renderer.insertBefore(parent,node,beforeNode):parent.insertBefore(node,beforeNode,true);}else if(action===1/* Detach */){isProceduralRenderer(renderer)?renderer.removeChild(parent,node):parent.re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ACTION() {}", "action() {}", "function multiPurposeFunction(action) {\n if (action) {\n console.log(action(3));\n }\n}", "function multiPurposeFunction(action) {\n if (action) {\n console.log(action('John', 'Smith'));\n console.log(action('', 'Bond'));\n }\n}", "function Action() { }"...
[ "0.6979388", "0.6871984", "0.67825145", "0.6289244", "0.61909175", "0.6160016", "0.61260754", "0.607045", "0.598238", "0.5979962", "0.5970591", "0.59641916", "0.5924586", "0.5913366", "0.5882917", "0.5837542", "0.580642", "0.5777669", "0.57481664", "0.57262", "0.57203096", ...
0.0
-1
Traverses down and up the tree of views and containers to remove listeners and call onDestroy callbacks. Notes: Because it's used for onDestroy calls, it needs to be bottomup. Must process containers instead of their views to avoid splicing when views are destroyed and readded. Using a while loop because it's faster th...
function destroyViewTree(rootView){// If the view has no children, we can clean it up and return early. if(rootView[TVIEW].childIndex===-1){return cleanUpView(rootView);}var viewOrContainer=getLViewChild(rootView);while(viewOrContainer){var next=null;if(viewOrContainer.length>=HEADER_OFFSET){// If LView, traverse down ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "destroyChildren() {\n while(this.children.length)\n this.children.shift().destroy();\n }", "function destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n var lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n ...
[ "0.6639284", "0.64315766", "0.6429666", "0.6403537", "0.6403537", "0.6403537", "0.6403537", "0.6403537", "0.6403537", "0.63936275", "0.63927436", "0.637295", "0.63652897", "0.63652897", "0.6341025", "0.624211", "0.62244314", "0.62133616", "0.61720353", "0.6119936", "0.6119936...
0.6525448
1
Inserts a view into a container. This adds the view to the container's array of active views in the correct position. It also adds the view's elements to the DOM if the container isn't a root node of another view (in that case, the view's elements will be added when the container's parent view is added later).
function insertView(lView,lContainer,parentView,index,containerIndex){var views=lContainer[VIEWS];if(index>0){// This is a new view, we need to add it to the children. views[index-1][NEXT]=lView;}if(index<views.length){lView[NEXT]=views[index];views.splice(index,0,lView);}else{views.push(lView);lView[NEXT]=null;}// Dyn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertView(lView, lContainer, parentView, index, containerIndex) {\n var views = lContainer[VIEWS];\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n views[index - 1][NEXT] = lView;\n }\n if (index < views.length) {\n lView[NEXT] = views[inde...
[ "0.73024243", "0.73024243", "0.72960275", "0.7201532", "0.71882236", "0.7151441", "0.7151441", "0.7151441", "0.7151441", "0.7151441", "0.7151441", "0.6967233", "0.6857642", "0.68538624", "0.68519795", "0.671101", "0.671101", "0.671101", "0.671101", "0.671101", "0.671101", "...
0.76457554
0
Detaches a view from a container. This method splices the view from the container's array of active views. It also removes the view's elements from the DOM.
function detachView(lContainer,removeIndex,detached){var views=lContainer[VIEWS];var viewToDetach=views[removeIndex];if(removeIndex>0){views[removeIndex-1][NEXT]=viewToDetach[NEXT];}views.splice(removeIndex,1);if(!detached){addRemoveViewFromContainer(viewToDetach,false);}if(viewToDetach[QUERIES]){viewToDetach[QUERIES]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function detachView(lContainer, removeIndex, detached) {\n var views = lContainer[VIEWS];\n var viewToDetach = views[removeIndex];\n if (removeIndex > 0) {\n views[removeIndex - 1][NEXT] = viewToDetach[NEXT];\n }\n views.splice(removeIndex, 1);\n if (!detached) {\n addRemoveViewFrom...
[ "0.69872063", "0.6958428", "0.6958428", "0.69452214", "0.69452214", "0.6505612", "0.646113", "0.6444745", "0.64105064", "0.637145", "0.63225865", "0.63188654", "0.627225", "0.627225", "0.627225", "0.627225", "0.627225", "0.627225", "0.62420726", "0.62420726", "0.62420726", ...
0.72025895
0
Removes a view from a container, i.e. detaches it and then destroys the underlying LView.
function removeView(lContainer,containerHost,removeIndex){var view=lContainer[VIEWS][removeIndex];detachView(lContainer,removeIndex,!!containerHost.detached);destroyLView(view);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeViewFromContainer(tView, lView) {\n var renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2\n /* Detach */\n , null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}", "function removeViewFromContainer(tView, lView) {\n var renderer = lView[RENDERER];\n app...
[ "0.8279141", "0.8232448", "0.8178003", "0.8178003", "0.8178003", "0.8178003", "0.8178003", "0.8178003", "0.79063237", "0.7666368", "0.7666368", "0.7666368", "0.75461274", "0.7386018", "0.73532873", "0.73532873", "0.73532873", "0.73532873", "0.73532873", "0.73532873", "0.73307...
0.80754477
8
Gets the child of the given LView
function getLViewChild(lView){var childIndex=lView[TVIEW].childIndex;return childIndex===-1?null:lView[childIndex];}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLViewChild(lView) {\n var childIndex = lView[TVIEW].childIndex;\n return childIndex === -1 ? null : lView[childIndex];\n}", "function getLViewChild(lView) {\n var childIndex = lView[TVIEW].childIndex;\n return childIndex === -1 ? null : lView[childIndex];\n}", "function getLViewChild(vi...
[ "0.8406708", "0.8406708", "0.7602381", "0.651532", "0.64511293", "0.64511293", "0.64511293", "0.64511293", "0.64511293", "0.64511293", "0.64306295", "0.64062274", "0.6358936", "0.6350675", "0.6350675", "0.6350675", "0.6350675", "0.6350675", "0.6350675", "0.6333361", "0.629084...
0.8332027
2
A standalone function which destroys an LView, conducting cleanup (e.g. removing listeners, calling onDestroys).
function destroyLView(view){var renderer=view[RENDERER];if(isProceduralRenderer(renderer)&&renderer.destroyNode){walkTNodeTree(view,2/* Destroy */,renderer,null);}destroyViewTree(view);// Sets the destroyed flag view[FLAGS]|=64/* Destroyed */;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256\n /* Destroyed */\n )) {\n var renderer = lView[RENDERER];\n\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n applyView(tView, lView, renderer, 3\n /* Destroy */\n ...
[ "0.81724674", "0.80899495", "0.8079794", "0.801707", "0.801707", "0.801707", "0.801707", "0.801707", "0.801707", "0.79876566", "0.7973531", "0.7973531", "0.7973531", "0.7973531", "0.7973531", "0.7973531", "0.79175955", "0.7788573", "0.77756613", "0.77756613", "0.77731085", ...
0.78435355
17
Determines which LViewOrLContainer to jump to when traversing back up the tree in destroyViewTree. Normally, the view's parent LView should be checked, but in the case of embedded views, the container (which is the view node's parent, but not the LView's parent) needs to be checked for a possible next property.
function getParentState(state,rootView){var tNode;if(state.length>=HEADER_OFFSET&&(tNode=state[HOST_NODE])&&tNode.type===2/* View */){// if it's an embedded view, the state needs to go up to the container, in case the // container has a next return getLContainer(tNode,state);}else{// otherwise, use parent view for cont...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentState(lViewOrLContainer, rootView) {\n var tNode;\n if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n tNode.type === 2 /* View */) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\...
[ "0.67374265", "0.61500484", "0.61500484", "0.61500484", "0.60475296", "0.59022385", "0.58611405", "0.5732213", "0.568616", "0.568616", "0.568616", "0.568616", "0.5666451", "0.56573445", "0.56573445", "0.56573445", "0.56573445", "0.56573445", "0.56083417", "0.55028343", "0.550...
0.66040087
1
Calls onDestroys hooks for all directives and pipes in a given view and then removes all listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks
function cleanUpView(viewOrContainer){if(viewOrContainer.length>=HEADER_OFFSET){var view=viewOrContainer;executeOnDestroys(view);executePipeOnDestroys(view);removeListeners(view);var hostTNode=view[HOST_NODE];// For component views only, the local renderer is destroyed as clean up time. if(hostTNode&&hostTNode.type===3...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executePipeOnDestroys(lView){var pipeDestroyHooks=lView[TVIEW]&&lView[TVIEW].pipeDestroyHooks;if(pipeDestroyHooks){callHooks(lView,pipeDestroyHooks);}}", "function executePipeOnDestroys(lView) {\n var pipeDestroyHooks = lView[TVIEW] && lView[TVIEW].pipeDestroyHooks;\n if (pipeDestroyHooks) {\n ...
[ "0.7634146", "0.74223125", "0.74223125", "0.7284529", "0.7278362", "0.72271156", "0.72222674", "0.7127365", "0.7065683", "0.7006953", "0.7006953", "0.70032305", "0.70032305", "0.70032305", "0.6963578", "0.6952764", "0.69307995", "0.69105524", "0.69034755", "0.6897996", "0.689...
0.69556755
15
Removes listeners and unsubscribes from output subscriptions
function removeListeners(lView){var tCleanup=lView[TVIEW].cleanup;if(tCleanup!=null){var lCleanup=lView[CLEANUP];for(var i=0;i<tCleanup.length-1;i+=2){if(typeof tCleanup[i]==='string'){// This is a listener with the native renderer var idx=tCleanup[i+1];var listener=lCleanup[tCleanup[i+2]];var _native4=readElementValue...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "unsubscribe() {\n mainLog.info('Unsubscribing from Lightning gRPC streams')\n this.mainWindow = null\n Object.keys(this.subscriptions).forEach(subscription => {\n if (this.subscriptions[subscription]) {\n this.subscriptions[subscription].cancel()\n this.subscriptions[subscription] = nul...
[ "0.7419719", "0.7388591", "0.7388591", "0.7388591", "0.7304784", "0.72890556", "0.725096", "0.7222646", "0.7185418", "0.71790475", "0.71377647", "0.70209324", "0.7014612", "0.6958171", "0.6954906", "0.6948519", "0.6934594", "0.6913694", "0.6900833", "0.6876304", "0.68472004",...
0.0
-1
Calls onDestroy hooks for this view
function executeOnDestroys(view){var tView=view[TVIEW];var destroyHooks;if(tView!=null&&(destroyHooks=tView.destroyHooks)!=null){callHooks(view,destroyHooks);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "willDestroy() { }", "willDestroy() {}", "willDestroy() {}", "destroy () {\n this.emit('destroyed', [true]);\n super.destroy();\n }", "destroy () {\n this.emit('destroyed', [true]);\n super.destroy();\n }", "doDestroy() {\n this.trigger('destroy');\n this.removeAllListeners...
[ "0.7477229", "0.7472656", "0.7472656", "0.7380623", "0.7380623", "0.7360731", "0.73120433", "0.72945225", "0.72945225", "0.7276085", "0.72657746", "0.7224457", "0.72138166", "0.72069615", "0.71936846", "0.7184934", "0.7173888", "0.7165822", "0.7165822", "0.7165822", "0.716548...
0.76621884
0
Calls pipe destroy hooks for this view
function executePipeOnDestroys(lView){var pipeDestroyHooks=lView[TVIEW]&&lView[TVIEW].pipeDestroyHooks;if(pipeDestroyHooks){callHooks(lView,pipeDestroyHooks);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executePipeOnDestroys(lView) {\n var pipeDestroyHooks = lView[TVIEW] && lView[TVIEW].pipeDestroyHooks;\n if (pipeDestroyHooks) {\n callHooks(lView, pipeDestroyHooks);\n }\n}", "function executePipeOnDestroys(lView) {\n var pipeDestroyHooks = lView[TVIEW] && lView[TVIEW].pipeDestroyHoo...
[ "0.7621783", "0.7621783", "0.7474604", "0.6853289", "0.68498456", "0.67533684", "0.66522145", "0.6601389", "0.648683", "0.64729875", "0.6458414", "0.64286834", "0.6406807", "0.6404747", "0.63867134", "0.63867134", "0.63867134", "0.63867134", "0.63867134", "0.63867134", "0.637...
0.797871
0
We might delay insertion of children for a given view if it is disconnected. This might happen for 2 main reasons: view is not inserted into any container (view was created but not inserted yet) view is inserted into a container but the container itself is not inserted into the DOM (container might be part of projectio...
function canInsertNativeChildOfView(viewTNode,view){// Because we are inserting into a `View` the `View` may be disconnected. var container=getLContainer(viewTNode,view);if(container==null||container[RENDER_PARENT]==null){// The `View` is not inserted into a `Container` or the parent `Container` // itself is disconnect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertView(lView,lContainer,parentView,index,containerIndex){var views=lContainer[VIEWS];if(index>0){// This is a new view, we need to add it to the children.\nviews[index-1][NEXT]=lView;}if(index<views.length){lView[NEXT]=views[index];views.splice(index,0,lView);}else{views.push(lView);lView[NEXT]=null;}...
[ "0.732397", "0.70040536", "0.70040536", "0.70040536", "0.68213904", "0.6791618", "0.6791618", "0.6776713", "0.65744096", "0.64344376", "0.64260036", "0.64260036", "0.64260036", "0.64260036", "0.64260036", "0.64260036", "0.64252985", "0.63893986", "0.63860214", "0.6378837", "0...
0.72970533
1
Returns whether a native element can be inserted into the given parent. There are two reasons why we may not be able to insert a element immediately. Projection: When creating a child content element of a component, we have to skip the insertion because the content of a component will be projected. `delayed due to proj...
function canInsertNativeNode(tNode,currentView){var currentNode=tNode;var parent=tNode.parent;if(tNode.parent){if(tNode.parent.type===4/* ElementContainer */){currentNode=getHighestElementContainer(tNode);parent=currentNode.parent;}else if(tNode.parent.type===5/* IcuContainer */){currentNode=getFirstParentNative(curren...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canInsertNativeChildOfView(viewTNode,view){// Because we are inserting into a `View` the `View` may be disconnected.\nvar container=getLContainer(viewTNode,view);if(container==null||container[RENDER_PARENT]==null){// The `View` is not inserted into a `Container` or the parent `Container`\n// itself is dis...
[ "0.7061656", "0.7051429", "0.7051429", "0.69515896", "0.6792368", "0.6792368", "0.6792368", "0.6018835", "0.57158387", "0.5628869", "0.5590011", "0.5590011", "0.5582445", "0.5569973", "0.5566224", "0.5495852", "0.5488216", "0.5471373", "0.5449208", "0.5370806", "0.5369229", ...
0.7108881
0
Returns a native parent of a given native node.
function nativeParentNode(renderer,node){return isProceduralRenderer(renderer)?renderer.parentNode(node):node.parentNode;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parent(node) {\r\n var parent_node;\r\n\r\n assert(isElement(node), 'pklib.dom.parent: @node is not HTMLElement');\r\n\r\n while (true) {\r\n parent_node = node.parentNode;\r\n if (parent_node !== undefined && parent_node !== null && parent_node.nodeType !== node...
[ "0.7572368", "0.74532163", "0.73911965", "0.73911965", "0.7309259", "0.716001", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.7095344", "0.70351785", "0.70009255", "0.68582946", "0.6779668", "0.669851", "0.66900706"...
0.69324505
17
Returns a native sibling of a given native node.
function nativeNextSibling(renderer,node){return isProceduralRenderer(renderer)?renderer.nextSibling(node):node.nextSibling;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get sibling() {\n const { parent } = this;\n if (!parent) return null;\n return parent.right === this ? parent.left : parent.right;\n }", "function nativeNextSibling(renderer, node) {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}", "function nativeNextSi...
[ "0.7266568", "0.71661097", "0.7153071", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7132569", "0.7007026", "0.6686022", "0.66820526", "0.66039073", "0.64745843", "0.6468827", "0.64543283", "0.63741666", "0.6295244...
0.6975252
13
Gets the toplevel ngcontainer if ngcontainers are nested.
function getHighestElementContainer(ngContainer){while(ngContainer.parent!=null&&ngContainer.parent.type===4/* ElementContainer */){ngContainer=ngContainer.parent;}return ngContainer;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getOuterContainerOrSelf(node) {\n\t var view = node.view;\n\t while (_isNgContainer(node.parent, view)) {\n\t node = node.parent;\n\t }\n\t return node;\n\t}", "function _getOuterContainerOrSelf(node) {\n var view = node.view;\n while (_isNgContainer(node.parent, view)) {\n ...
[ "0.75588816", "0.7427253", "0.72183734", "0.7060519", "0.66482663", "0.66373706", "0.66373706", "0.64236706", "0.64109343", "0.64109343", "0.6237313", "0.6237313", "0.6237313", "0.6182568", "0.6165176", "0.6165176", "0.6165176", "0.615272", "0.615272", "0.615272", "0.6131446"...
0.6656922
4
Removes the `child` element from the DOM if not in view and not projected.
function removeChild(childTNode,childEl,currentView){// We only remove the element if not in View or not projected. if(childEl!==null&&canInsertNativeNode(childTNode,currentView)){var parentNative=getParentNative(childTNode,currentView);var renderer=currentView[RENDERER];isProceduralRenderer(renderer)?renderer.removeCh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeChild(childTNode, childEl, currentView) {\n // We only remove the element if not in View or not projected.\n if (childEl !== null && canInsertNativeNode(childTNode, currentView)) {\n var parentNative = getParentNative(childTNode, currentView);\n var renderer = currentView[RENDERE...
[ "0.74580723", "0.74580723", "0.74580723", "0.68672067", "0.6766018", "0.6736814", "0.6563144", "0.644509", "0.61837727", "0.6179958", "0.6129564", "0.61179775", "0.6075894", "0.6063411", "0.6052138", "0.6037333", "0.60129714", "0.59877616", "0.59135634", "0.58818716", "0.5865...
0.76008636
0
Appends a projected node to the DOM, or in the case of a projected container, appends the nodes from all of the container's active views to the DOM.
function appendProjectedNode(projectedTNode,tProjectionNode,currentView,projectionView){var _native5=getNativeByTNode(projectedTNode,projectionView);appendChild(_native5,tProjectionNode,currentView);// the projected contents are processed while in the shadow view (which is the currentView) // therefore we need to extra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function appendProjectedNode(projectedTNode, tProjectionNode, currentView, projectionView) {\n var native = getNativeByTNode(projectedTNode, projectionView);\n appendChild(native, tProjectionNode, currentView);\n // the projected contents are processed while in the shadow view (which is the currentView)\n...
[ "0.7611273", "0.75674695", "0.75674695", "0.75674695", "0.70022666", "0.69484556", "0.572848", "0.57134295", "0.5678527", "0.56778055", "0.56778055", "0.56778055", "0.56778055", "0.56778055", "0.56778055", "0.5633747", "0.5530848", "0.5491229", "0.54306835", "0.54299057", "0....
0.76270276
0
Function that checks whether a given tNode matches tagbased selector and has a valid type. Matching can be perfomed in 2 modes: projection mode (when we project nodes) and regular directive matching mode. In "projection" mode, we do not need to check types, so if tag name matches selector, we declare a match. In "direc...
function hasTagAndTypeMatch(tNode,currentSelector,isProjectionMode){return currentSelector===tNode.tagName&&(isProjectionMode||tNode.type===3/* Element */||tNode.type===4/* ElementContainer */||tNode.type===0/* Container */&&currentSelector===NG_TEMPLATE_SELECTOR);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n return currentSelector === tNode.tagName &&\n (isProjectionMode ||\n (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) ||\n (tNode.type === 0 /* Container */ && currentSelector === NG...
[ "0.7592281", "0.7592281", "0.7488411", "0.74824816", "0.74824816", "0.74824816", "0.74824816", "0.74824816", "0.74824816", "0.7412746", "0.7355267", "0.71281123", "0.6956881", "0.6956881", "0.6956881", "0.6956881", "0.6956881", "0.6956881", "0.68537986", "0.6816382", "0.67749...
0.7576073
2
A utility function to match an Ivy node static data against a simple CSS selector
function isNodeMatchingSelector(tNode,selector,isProjectionMode){ngDevMode&&assertDefined(selector[0],'Selector should have a tag name');var mode=4/* ELEMENT */;var nodeAttrs=tNode.attrs;var selectOnlyMarkerIdx=nodeAttrs?nodeAttrs.indexOf(3/* SelectOnly */):-1;// When processing ":not" selectors, we skip to the next ":...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qwerySelector (cssQuery, context) {}", "async scanSelector() {\n // <tag\n // \t id=\"a'\n // \t class=\"a\"\n // \t class=\"a b\"\n // >\n let match = this.match(/<\\w+\\s*([\\s\\S]*?)>/g, /\\b(?<type>id|class|className)\\s*=\\s*['\"`](.*?)['\"`]/g, /([\\w-]...
[ "0.62007076", "0.5889366", "0.5758365", "0.57456607", "0.56296957", "0.56289446", "0.55042905", "0.5432817", "0.54117954", "0.54117954", "0.54117954", "0.54117954", "0.5296619", "0.52817553", "0.52687025", "0.526609", "0.52489144", "0.5240606", "0.5236667", "0.52350324", "0.5...
0.5062672
33
Examines an attributes definition array from a node to find the index of the attribute with the specified name. NOTE: Will not find namespaced attributes.
function findAttrIndexInNode(name,attrs){if(attrs===null)return-1;var selectOnlyMode=false;var i=0;while(i<attrs.length){var maybeAttrName=attrs[i];if(maybeAttrName===name){return i;}else if(maybeAttrName===0/* NamespaceURI */){// NOTE(benlesh): will not find namespaced attributes. This is by design. i+=4;}else{if(mayb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findAttrIndexInNode(name, attrs) {\n if (attrs === null)\n return -1;\n var selectOnlyMode = false;\n var i = 0;\n while (i < attrs.length) {\n var maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName =...
[ "0.7612455", "0.760748", "0.760748", "0.7014457", "0.69903237", "0.690428", "0.6870068", "0.68339705", "0.68339705", "0.68339705", "0.68339705", "0.68339705", "0.68339705", "0.6581715", "0.6579167", "0.63383645", "0.6272934", "0.6236771", "0.61882854", "0.6097494", "0.6006713...
0.76823735
0
Checks a given node against matching selectors and returns selector index (or 0 if none matched). This function takes into account the ngProjectAs attribute: if present its value will be compared to the raw (unparsed) CSS selector instead of using standard selector matching logic.
function matchingSelectorIndex(tNode,selectors,textSelectors){var ngProjectAsAttrVal=getProjectAsAttrValue(tNode);for(var i=0;i<selectors.length;i++){// if a node has the ngProjectAs attribute match it against unparsed selector // match a node against a parsed selector only if ngProjectAs attribute is not present if(ng...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchingSelectorIndex(tNode, selectors, textSelectors) {\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < selectors.length; i++) {\n // if a node has the ngProjectAs attribute match it against unparsed selector\n // match a node against a parsed selector o...
[ "0.724149", "0.71428025", "0.71428025", "0.6799323", "0.6403502", "0.6403502", "0.6403502", "0.6403502", "0.6390339", "0.6388974", "0.6388974", "0.6388974", "0.6388974", "0.6388974", "0.6388974", "0.6376427", "0.58704436", "0.5750879", "0.5732221", "0.57052016", "0.56317973",...
0.7682272
0
Combines the binding value and a factory for an animation player. Used to bind a player to an element template binding (currently only `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings supported). The provided `factoryFn` function will be run once all the associated bindings have been evaluated on the el...
function bindPlayerFactory(factoryFn,value){return new BoundPlayerFactory(factoryFn,value);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bindPlayerFactory(factoryFn, value) {\n return new BoundPlayerFactory(factoryFn, value);\n}", "function bindPlayerFactory(factoryFn, value) {\n return new BoundPlayerFactory(factoryFn, value);\n}", "function bindPlayerFactory(factoryFn, value) {\n return new BoundPlayerFactory(factoryFn, valu...
[ "0.7146306", "0.7146306", "0.7146306", "0.7146306", "0.52820235", "0.4676497", "0.45911962", "0.45777455", "0.44150013", "0.42719972", "0.4245748", "0.4219075", "0.41648695", "0.41383475", "0.41383475", "0.41383475", "0.4107038", "0.41059855", "0.4090235", "0.40855178", "0.40...
0.6867362
4
Used clone a copy of a precomputed template of a styling context. A precomputed template is designed to be computed once for a given element (instructions.ts has logic for caching this).
function allocStylingContext(element,templateStyleContext){// each instance gets a copy var context=templateStyleContext.slice();context[5/* ElementPosition */]=element;// this will prevent any other directives from extending the context context[0/* MasterFlagPosition */]|=32/* BindingAllocationLocked */;return context...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_clone(options) {\n var _a2;\n const { el: { content }, parts } = this._$template;\n const fragment = ((_a2 = options === null || options === void 0 ? void 0 : options.creationScope) !== null && _a2 !== void 0 ? _a2 : d).importNode(content, true);\n walker.currentNode = fragment;\n let node = walker...
[ "0.6401723", "0.6083132", "0.60499376", "0.58261746", "0.5614647", "0.55650526", "0.5543498", "0.5543498", "0.5455293", "0.54410565", "0.5258994", "0.52119297", "0.5192998", "0.5188245", "0.51085037", "0.5085808", "0.5084771", "0.5059897", "0.5042227", "0.50342315", "0.502163...
0.5791306
4
Retrieve the `StylingContext` at a given index. This method lazily creates the `StylingContext`. This is because in most cases we have styling without any bindings. Creating `StylingContext` eagerly would mean that every style declaration such as `` would result `StyleContext` which would create unnecessary memory pres...
function getStylingContext(index,viewData){var storageIndex=index;var slotValue=viewData[storageIndex];var wrapper=viewData;while(Array.isArray(slotValue)){wrapper=slotValue;slotValue=slotValue[HOST];}if(isStylingContext(wrapper)){return wrapper;}else{// This is an LView or an LContainer var stylingTemplate=getTNode(in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStylingContext(index, viewData) {\n var storageIndex = index;\n var slotValue = viewData[storageIndex];\n var wrapper = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST];\n }\n if (isStylingContext(wrapper)) {\n re...
[ "0.6753551", "0.6753551", "0.6643019", "0.62549925", "0.60289955", "0.57332057", "0.5726027", "0.5618992", "0.53487587", "0.53487587", "0.5205589", "0.51975644", "0.51837945", "0.51565534", "0.50808585", "0.5046053", "0.5041161", "0.5035216", "0.5025013", "0.49715218", "0.495...
0.6164417
4
This file includes the code to power all stylingbinding operations in Angular. These include: [style]="myStyleObj" [class]="myClassObj" [style.prop]="myPropValue" [class.name]="myClassValue" There are many different ways in which these functions below are called. Please see `interfaces/styles.ts` to get a better idea o...
function initializeStaticContext(attrs){var context=createEmptyStylingContext();var initialClasses=context[3/* InitialClassValuesPosition */]=[null];var initialStyles=context[2/* InitialStyleValuesPosition */]=[null];// The attributes array has marker values (numbers) indicating what the subsequent // values represent....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Styles() {\n\n var defaultTraits = {\n\n 'no-fill': {\n fill: 'none'\n },\n 'no-border': {\n strokeOpacity: 0.0\n },\n 'no-events': {\n pointerEvents: 'none'\n }\n };\n\n var self = this;\n\n /**\n * Builds a style definition from a className, a list of traits and an...
[ "0.6769731", "0.673669", "0.6676015", "0.6408095", "0.63998586", "0.63565344", "0.6183702", "0.615201", "0.6118675", "0.6084981", "0.60673773", "0.6059652", "0.6036583", "0.6036583", "0.60321015", "0.60321015", "0.6009139", "0.59854925", "0.59381187", "0.5886409", "0.5886409"...
0.6291802
6
Designed to update an existing styling context with new static styling data (classes and styles).
function patchContextWithStaticAttrs(context,attrs,directive){// If the styling context has already been patched with the given directive's bindings, // then there is no point in doing it again. The reason why this may happen (the directive // styling being patched twice) is because the `stylingBinding` function is cal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateStyle() {\n this._styling(this._elRef, this);\n }", "function setCachedStylingContext(context) {\n stylingContext = context;\n}", "refreshStyles() {\n\t\tthis.styleElement.replaceChildren( document.createTextNode( this.getStyles() ) );\n\t}", "_updateStyles() {\n if (this.$element) {\n ...
[ "0.69647866", "0.67220724", "0.6435268", "0.64026123", "0.63681203", "0.63554347", "0.6340209", "0.633517", "0.6334269", "0.6334269", "0.6318465", "0.6313826", "0.6312296", "0.6310886", "0.6300456", "0.6300456", "0.6300456", "0.6300456", "0.6277165", "0.62375826", "0.6236801"...
0.6647376
2
Designed to add a style or class value into the existing set of initial styles. The function will search and figure out if a style/class value is already present within the provided initial styling array. If and when a style/class value is not present (or if it's value is falsy) then it will be inserted/updated in the ...
function patchInitialStylingValue(initialStyling,prop,value){// Even values are keys; Odd numbers are values; Search keys only for(var i=1/* KeyValueStartPosition */;i<initialStyling.length;){var key=initialStyling[i];if(key===prop){var existingValue=initialStyling[i+1/* ValueOffset */];// If there is no previous style...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function patchInitialStylingValue(initialStyling, prop, value) {\n // Even values are keys; Odd numbers are values; Search keys only\n for (var i = 1 /* KeyValueStartPosition */; i < initialStyling.length;) {\n var key = initialStyling[i];\n if (key === prop) {\n var existingValue = ...
[ "0.6639561", "0.6639561", "0.60573554", "0.58291894", "0.58291894", "0.5789891", "0.5762926", "0.5762926", "0.5762926", "0.5762926", "0.55671", "0.54894596", "0.540318", "0.53486395", "0.53486395", "0.5307206", "0.53007346", "0.52947825", "0.5256963", "0.5227086", "0.5209833"...
0.6633911
2
Runs through the initial styling data present in the context and renders them via the renderer on the element.
function renderInitialStylesAndClasses(element,context,renderer){var initialClasses=context[3/* InitialClassValuesPosition */];renderInitialStylingValues(element,renderer,initialClasses,true);var initialStyles=context[2/* InitialStyleValuesPosition */];renderInitialStylingValues(element,renderer,initialStyles,false);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderInitialStylingValues(element,renderer,initialStylingValues,isEntryClassBased){for(var i=1/* KeyValueStartPosition */;i<initialStylingValues.length;i+=2/* Size */){var value=initialStylingValues[i+1/* ValueOffset */];if(value){if(isEntryClassBased){setClass(element,initialStylingValues[i+0/* PropOffs...
[ "0.6699019", "0.6669222", "0.6669222", "0.6133626", "0.6106062", "0.6071684", "0.6071684", "0.5933388", "0.5901725", "0.586695", "0.5840307", "0.5827479", "0.579599", "0.5772251", "0.56812894", "0.5681063", "0.5679831", "0.5664968", "0.5648623", "0.5628541", "0.55981725", "...
0.6711836
0
This is a helper function designed to render each entry present within the provided list of initialStylingValues.
function renderInitialStylingValues(element,renderer,initialStylingValues,isEntryClassBased){for(var i=1/* KeyValueStartPosition */;i<initialStylingValues.length;i+=2/* Size */){var value=initialStylingValues[i+1/* ValueOffset */];if(value){if(isEntryClassBased){setClass(element,initialStylingValues[i+0/* PropOffset */...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderInitialStylingValues(element, renderer, initialStylingValues, isEntryClassBased) {\n for (var i = 1 /* KeyValueStartPosition */; i < initialStylingValues.length; i += 2 /* Size */) {\n var value = initialStylingValues[i + 1 /* ValueOffset */];\n if (value) {\n if (isEntry...
[ "0.74832815", "0.74832815", "0.63641304", "0.63641304", "0.63641304", "0.63641304", "0.6103835", "0.5863138", "0.5863138", "0.57122415", "0.5636393", "0.53508025", "0.53508025", "0.5277341", "0.51827717", "0.5101982", "0.50450873", "0.48988837", "0.4874911", "0.48657358", "0....
0.72440296
2
Adds in new binding values to a styling context. If a directive value is provided then all provided class/style binding names will reference the provided directive.
function updateContextWithBindings(context,directiveRef,classBindingNames,styleBindingNames,styleSanitizer,onlyProcessSingleClasses){if(context[0/* MasterFlagPosition */]&32/* BindingAllocationLocked */)return;// this means the context has already been patched with the directive's bindings var directiveIndex=findOrPatc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateContextWithBindings(context, directiveIndex, classBindingNames, styleBindingNames, styleSanitizer) {\n if (context[1 /* MasterFlagPosition */] & 16 /* BindingAllocationLocked */)\n return;\n // this means the context has already been patched with the directive's bindings\n var isNewD...
[ "0.73230755", "0.7106056", "0.7106056", "0.6692312", "0.6100237", "0.60677165", "0.60677165", "0.5832952", "0.5832952", "0.5832062", "0.58168966", "0.58035874", "0.58007795", "0.56599337", "0.56599337", "0.5640118", "0.5640118", "0.5600372", "0.5600372", "0.5600372", "0.55801...
0.71928
1
Searches through the existing registry of directives
function findOrPatchDirectiveIntoRegistry(context,directiveRef,styleSanitizer){var directiveRefs=context[1/* DirectiveRegistryPosition */];var nextOffsetInsertionIndex=context[4/* SinglePropOffsetPositions */].length;var directiveIndex;var detectedIndex=getDirectiveRegistryValuesIndexOf(directiveRefs,directiveRef);if(d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UniqueDirectivesPerLocationRule(context) {\n var uniqueDirectiveMap = Object.create(null);\n var schema = context.getSchema();\n var definedDirectives = schema ? schema.getDirectives() : _directives.specifiedDirectives;\n\n for (var _i2 = 0; _i2 < definedDirectives.length; _i2++) {\n var directive ...
[ "0.5792537", "0.5792537", "0.57769185", "0.57769185", "0.5753171", "0.5600353", "0.553529", "0.55294234", "0.55140024", "0.53915524", "0.5384859", "0.5318885", "0.5318885", "0.5318885", "0.5318885", "0.5318885", "0.5311445", "0.53101313", "0.5301265", "0.5281618", "0.5241007"...
0.5183331
26
Sets and resolves all `multi` styling on an `StylingContext` so that they can be applied to the element once `renderStyling` is called. All missing styles/class (any values that are not provided in the new `styles` or `classes` params) will resolve to `null` within their respective positions in the context.
function updateStylingMap(context,classesInput,stylesInput,directiveRef){stylesInput=stylesInput||null;var directiveIndex=getDirectiveIndexFromRegistry(context,directiveRef||null);var element=context[5/* ElementPosition */];var classesPlayerBuilder=classesInput instanceof BoundPlayerFactory?new ClassAndStylePlayerBuild...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStyling(context,renderer,rootOrView,isFirstRender,classesStore,stylesStore,directiveRef){var totalPlayersQueued=0;var targetDirectiveIndex=getDirectiveIndexFromRegistry(context,directiveRef||null);if(isContextDirty(context)&&isDirectiveDirty(context,targetDirectiveIndex)){var flushPlayerBuilders=con...
[ "0.5440718", "0.5403899", "0.52708584", "0.5268662", "0.52582175", "0.5255439", "0.5255439", "0.52531606", "0.5252424", "0.5252424", "0.5113483", "0.5103858", "0.5103858", "0.5070097", "0.5032098", "0.5029744", "0.50153893", "0.50153893", "0.5011094", "0.5011094", "0.5009292"...
0.0
-1
This method will toggle the referenced CSS class (by the provided index) within the given context.
function updateClassProp(context,offset,addOrRemove,directiveRef){_updateSingleStylingValue(context,offset,addOrRemove,true,directiveRef);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "toggleClass(index) {\n this.setState({ activeIndex: index });\n this.props.onCallBack(index);\n }", "function switchclasses(index1, index2) {\n button[index1].classList.add(\"is-hidden\");\n button[index2].classList.remove(\"is-hidden\");\n }", "function toggleCurrentArrayElementClass(i...
[ "0.67356354", "0.6353227", "0.6345698", "0.6056551", "0.58759916", "0.58396816", "0.5828906", "0.5806071", "0.5738934", "0.5736956", "0.57350147", "0.57087564", "0.57064563", "0.5706292", "0.56725675", "0.5604286", "0.5602195", "0.5567112", "0.5559034", "0.554949", "0.5511573...
0.0
-1
Sets and resolves a single style value on the provided `StylingContext` so that they can be applied to the element once `renderStyling` is called. Note that proplevel styling values are considered higher priority than any styling that has been applied using `updateStylingMap`, therefore, when styling values are rendere...
function updateStyleProp(context,offset,input,directiveRef){_updateSingleStylingValue(context,offset,input,false,directiveRef);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function apply(context, styleId) {\n var style = styles[styleId] ? styles[styleId] : styles.basic,\n previousStyle;\n \n // if we have a context and context canvas, then update the previous style info\n if (context && context.canvas) {\n previousStyle = previou...
[ "0.5918942", "0.58295196", "0.5547501", "0.5547501", "0.5546094", "0.54902035", "0.5453673", "0.5411095", "0.5409212", "0.5409212", "0.5409212", "0.5409212", "0.5409212", "0.5409212", "0.539117", "0.53780633", "0.5311848", "0.5262276", "0.5224663", "0.5217797", "0.5145048", ...
0.5200387
20
Renders all queued styling using a renderer onto the given element. This function works by rendering any styles (that have been applied using `updateStylingMap`) and any classes (that have been applied using `updateStyleProp`) onto the provided element using the provided renderer. Just before the styles/classes are ren...
function renderStyling(context,renderer,rootOrView,isFirstRender,classesStore,stylesStore,directiveRef){var totalPlayersQueued=0;var targetDirectiveIndex=getDirectiveIndexFromRegistry(context,directiveRef||null);if(isContextDirty(context)&&isDirectiveDirty(context,targetDirectiveIndex)){var flushPlayerBuilders=context[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStyling(context, renderer, rootOrView, isFirstRender, classesStore, stylesStore, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n var totalPlayersQueued = 0;\n ngDevMode && ngDevMode.stylingApply++;\n // this prevents multiple attempts to render style/class va...
[ "0.59531003", "0.5422199", "0.5422199", "0.54000497", "0.51362526", "0.5118637", "0.50448775", "0.49455354", "0.49068815", "0.4903364", "0.48823214", "0.4856528", "0.48505348", "0.48502815", "0.48502815", "0.48323327", "0.48323327", "0.48323327", "0.48323327", "0.48323327", "...
0.5315574
4
This function renders a given CSS prop/value entry using the provided renderer. If a `store` value is provided then that will be used a render context instead of the provided renderer.
function setStyle(_native7,prop,value,renderer,sanitizer,store,playerBuilder){value=sanitizer&&value?sanitizer(prop,value):value;if(store||playerBuilder){if(store){store.setValue(prop,value);}if(playerBuilder){playerBuilder.setValue(prop,value);}}else if(value){value=value.toString();// opacity, z-index and flexbox all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderStyling(context, renderer, rootOrView, isFirstRender, classesStore, stylesStore, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n var totalPlayersQueued = 0;\n ngDevMode && ngDevMode.stylingApply++;\n // this prevents multiple attempts to render style/class va...
[ "0.51232064", "0.5112602", "0.5112602", "0.5051488", "0.5010276", "0.5010276", "0.49872732", "0.49439785", "0.49237838", "0.49139154", "0.49139154", "0.49139154", "0.49139154", "0.49139154", "0.49139154", "0.4893359", "0.48455966", "0.4843725", "0.48210037", "0.4807288", "0.4...
0.44089764
43
This function renders a given CSS class value using the provided renderer (by adding or removing it from the provided element). If a `store` value is provided then that will be used a render context instead of the provided renderer.
function setClass(_native8,className,add,renderer,store,playerBuilder){if(store||playerBuilder){if(store){store.setValue(className,add);}if(playerBuilder){playerBuilder.setValue(className,add);}}else if(add){ngDevMode&&ngDevMode.rendererAddClass++;isProceduralRenderer(renderer)?renderer.addClass(_native8,className):_na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setClass(native, className, add, renderer, store, playerBuilder) {\n if (store || playerBuilder) {\n if (store) {\n store.setValue(className, add);\n }\n if (playerBuilder) {\n playerBuilder.setValue(className, add);\n }\n // DOMTokenList will th...
[ "0.58881456", "0.5840187", "0.5840187", "0.5840187", "0.56239355", "0.561321", "0.561321", "0.561321", "0.561321", "0.561321", "0.561321", "0.56105274", "0.52782214", "0.52782214", "0.52623135", "0.52623135", "0.5252562", "0.5252562", "0.5250436", "0.52235466", "0.5171167", ...
0.548358
12
This function is only designed to be called for `[class]` bindings when `[ngClass]` (or something that uses `class` as an input) is present. Once directive host bindings fully work for `[class]` and `[style]` inputs then this can be deleted.
function getInitialClassNameValue(context){var className=context[6/* CachedClassValueOrInitialClassString */];if(className==null){className='';var initialClassValues=context[3/* InitialClassValuesPosition */];for(var i=1/* KeyValueStartPosition */;i<initialClassValues.length;i+=2/* Size */){var isPresent=initialClassVa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function classDirective(name,selector){name='ngClass'+name;var indexWatchExpression;return['$parse',function($parse){return{restrict:'AC',link:function link(scope,element,attr){var classCounts=element.data('$classCounts');var oldModulo=true;var oldClassString;if(!classCounts){// Use createMap() to prevent class as...
[ "0.709124", "0.66058177", "0.66058177", "0.6382433", "0.63779914", "0.6348155", "0.6346979", "0.63392776", "0.6322803", "0.6315847", "0.6315847", "0.6315847", "0.6315847", "0.6315847", "0.6315847", "0.6302307", "0.6293154", "0.6293154", "0.6290243", "0.6212475", "0.6205005", ...
0.0
-1
Refreshes the view, executing the following steps in that order: triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host bindings, refreshes child components. Note: view hooks are triggered later when leaving the view.
function refreshDescendantViews(lView){var tView=lView[TVIEW];// This needs to be set before children are processed to support recursive components tView.firstTemplatePass=false;setFirstTemplatePass(false);// If this is a creation pass, we should not call lifecycle hooks or evaluate bindings. // This will be done in th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function triggerDOMRefresh() {\n if (view._isShown && view._isRendered && Marionette.isNodeAttached(view.el)) {\n Marionette.triggerMethodOn(view, 'dom:refresh', view);\n }\n }", "function triggerDOMRefresh() {\n if (view._isShown && view._isRendered && Marionette.isNodeAttached(view.el)...
[ "0.70392156", "0.70392156", "0.6928559", "0.6886408", "0.6762327", "0.6735745", "0.6694218", "0.6562057", "0.6539043", "0.6504225", "0.6468207", "0.6468207", "0.6372872", "0.6360098", "0.63427085", "0.63416094", "0.6336597", "0.63319147", "0.63142484", "0.63130325", "0.629391...
0.65921867
7
Sets the host bindings for the current view.
function setHostBindings(tView,viewData){if(tView.expandoInstructions){var bindingRootIndex=viewData[BINDING_INDEX]=tView.expandoStartIndex;setBindingRoot(bindingRootIndex);var currentDirectiveIndex=-1;var currentElementIndex=-1;for(var i=0;i<tView.expandoInstructions.length;i++){var instruction=tView.expandoInstructio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHostBindings() {\n if (tView.expandoInstructions) {\n bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;\n var currentDirectiveIndex = -1;\n var currentElementIndex = -1;\n for (var i = 0; i < tView.expandoInstructions.length; i++) {\n var in...
[ "0.7369542", "0.70003027", "0.6926287", "0.6926287", "0.5926165", "0.5703361", "0.5703361", "0.5675562", "0.55022514", "0.5468874", "0.5372205", "0.5372178", "0.53313607", "0.5326693", "0.5326693", "0.5312132", "0.52928", "0.52819765", "0.5278905", "0.5278905", "0.5278905", ...
0.71689683
1
Refreshes content queries for all directives in the given view.
function refreshContentQueries(tView){if(tView.contentQueries!=null){for(var i=0;i<tView.contentQueries.length;i+=2){var directiveDefIdx=tView.contentQueries[i];var directiveDef=tView.data[directiveDefIdx];directiveDef.contentQueriesRefresh(directiveDefIdx-HEADER_OFFSET,tView.contentQueries[i+1]);}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshContentQueries(tView) {\n if (tView.contentQueries != null) {\n for (var i = 0; i < tView.contentQueries.length; i += 2) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n directiveDef.contentQueriesRefre...
[ "0.7928387", "0.7928387", "0.7928387", "0.76480466", "0.7617065", "0.76157534", "0.76157534", "0.76157534", "0.76157534", "0.76157534", "0.76157534", "0.7596415", "0.60653514", "0.59683764", "0.59027034", "0.5876089", "0.5874695", "0.58369607", "0.58369607", "0.58369607", "0....
0.7874322
3
Refreshes child components in the current view.
function refreshChildComponents(components){if(components!=null){for(var i=0;i<components.length;i++){componentRefresh(components[i]);}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refreshChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n refreshComponent(hostLView, components[i]);\n }\n }", "function refreshChildComponents(hostLView, components) {\n for (var i = 0; i < components.length; i++) {\n refreshCompo...
[ "0.7228448", "0.7136545", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.684184", "0.6815524", "0.6815524", "0.6815524", "0.67556494", "0.6695775", "0.66597444", "0.65713", "0.64623964", "0.64522827", "0.63934803", "0.63836825", "0.6306...
0.7203375
1
When elements are created dynamically after a view blueprint is created (e.g. through i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future template passes.
function allocExpando(view){var tView=view[TVIEW];if(tView.firstTemplatePass){tView.expandoStartIndex++;tView.blueprint.push(null);tView.data.push(null);view.push(null);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function adjustBlueprintForNewNode(view) {\n var tView = view[TVIEW];\n if (tView.firstTemplatePass) {\n tView.expandoStartIndex++;\n tView.blueprint.push(null);\n view.push(null);\n }\n}", "function elementStart(index,name,attrs,localRefs){var lView=getLView();var tView=lView[TVIEW...
[ "0.6466182", "0.56462735", "0.5630289", "0.5590248", "0.5565773", "0.5493627", "0.5476831", "0.5470983", "0.5463009", "0.5445663", "0.5402036", "0.5402036", "0.53775936", "0.5372355", "0.5368526", "0.53511935", "0.53061837", "0.5301807", "0.52955747", "0.5269664", "0.5268049"...
0.5239806
25
Used for creating the LViewNode of a dynamic embedded view, either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView(). Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).
function createEmbeddedViewAndNode(tView,context,declarationView,renderer,queries,injectorIndex){var _isParent=getIsParent();var _previousOrParentTNode=getPreviousOrParentTNode();setIsParent(true);setPreviousOrParentTNode(null);var lView=createLView(declarationView,tView,context,4/* CheckAlways */);lView[DECLARATION_VI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEmbeddedViewAndNode(tView, context, declarationView, renderer, queries, injectorIndex) {\n var _isParent = getIsParent();\n var _previousOrParentTNode = getPreviousOrParentTNode();\n setIsParent(true);\n setPreviousOrParentTNode(null);\n var lView = createLView(declarationView, tView,...
[ "0.7281134", "0.7281134", "0.72780025", "0.70503783", "0.6503668", "0.6503668", "0.6503668", "0.6503668", "0.6503668", "0.6503668", "0.6474889", "0.64597344", "0.645418", "0.6436073", "0.63834983", "0.63512284", "0.6338913", "0.6324901", "0.6324901", "0.6324901", "0.6324901",...
0.77520835
0
Used for rendering embedded views (e.g. dynamically created views) Dynamically created views must store/retrieve their TViews differently from component views because their template functions are nested in the template functions of their hosts, creating closures. If their host template happens to be an embedded templat...
function renderEmbeddedTemplate(viewToRender,tView,context){var _isParent=getIsParent();var _previousOrParentTNode=getPreviousOrParentTNode();setIsParent(true);setPreviousOrParentTNode(null);var oldView;if(viewToRender[FLAGS]&128/* IsRoot */){// This is a root view inside the view tree tickRootContext(getRootContext(vi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateTView(templateFn,consts,vars,directives,pipes,viewQuery){// TODO(misko): reading `ngPrivateData` here is problematic for two reasons\n// 1. It is a megamorphic call on each invocation.\n// 2. For nested embedded views (ngFor inside ngFor) the template instance is per\n// outer template invoc...
[ "0.7508124", "0.7235686", "0.7235686", "0.7235686", "0.70835185", "0.70265347", "0.6930427", "0.6930427", "0.6930427", "0.6930427", "0.6930427", "0.6930427", "0.6911437", "0.6856655", "0.6808276", "0.68073034", "0.6796066", "0.6796066", "0.6795564", "0.6750742", "0.6750696", ...
0.6548215
36
Retrieves a context at the level specified and saves it as the global, contextViewData. Will get the next level up if level is not specified. This is used to save contexts of parent views so they can be bound in embedded views, or in conjunction with reference() to bind a ref from a parent view.
function nextContext(level){if(level===void 0){level=1;}return nextContextImpl(level);}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextContext(level) {\n if (level === void 0) {\n level = 1;\n }\n contextViewData = walkUpViews(level, contextViewData);\n return contextViewData[CONTEXT];\n}", "function nextContext(level) {\n if (level === void 0) { level = 1; }\n return nextContextImpl(level);\n}", "functio...
[ "0.6816859", "0.54609597", "0.54609597", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696", "0.51904696",...
0.5260106
3
This function returns the default configuration of rendering flags depending on when the template is in creation mode or update mode. Update block and create block are always run separately.
function getRenderFlags(view){return isCreationMode(view)?1/* Create */:2/* Update */;}//////////////////////////
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRenderFlags(view) {\n return isCreationMode(view) ? 1 /* Create */ : 2 /* Update */;\n}", "function getRenderFlags(view) {\n return isCreationMode(view) ? 1 /* Create */ : 2 /* Update */;\n}", "function getRenderFlags(view) {\n return isCreationMode(view) ? 1 /* Create */ : 2 /* Update */;...
[ "0.62668306", "0.62668306", "0.62668306", "0.60659975", "0.60134345", "0.60134345", "0.5655797", "0.555647", "0.5552571", "0.55356884", "0.54777217", "0.54726946", "0.54396576", "0.5420737", "0.5397312", "0.5388575", "0.53752625", "0.53742784", "0.53557307", "0.53531396", "0....
0.6709282
0
Creates a logical container for other nodes () backed by a comment node in the DOM. The instruction must later be followed by `elementContainerEnd()` call.
function elementContainerStart(index,attrs,localRefs){var lView=getLView();var tView=lView[TVIEW];var renderer=lView[RENDERER];var tagName='ng-container';ngDevMode&&assertEqual(lView[BINDING_INDEX],tView.bindingStartIndex,'element containers should be created before any bindings');ngDevMode&&ngDevMode.rendererCreateCom...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TElementContainerNode() {}", "function TElementContainerNode() {}", "function TElementContainerNode() {}", "function TElementContainerNode() { }", "function TElementContainerNode() { }", "function TElementContainerNode(){}", "function decorateComment( node, comment, options ) {\n\tconst { locS...
[ "0.6146316", "0.6146316", "0.6146316", "0.607797", "0.607797", "0.6066885", "0.59426224", "0.5919702", "0.5817232", "0.5801154", "0.57534355", "0.5724012", "0.5671306", "0.56670886", "0.56650764", "0.56494796", "0.56494796", "0.5643876", "0.5619936", "0.554913", "0.55176425",...
0.51601213
57
Mark the end of the .
function elementContainerEnd(){var previousOrParentTNode=getPreviousOrParentTNode();var lView=getLView();var tView=lView[TVIEW];if(getIsParent()){setIsParent(false);}else{ngDevMode&&assertHasParent(getPreviousOrParentTNode());previousOrParentTNode=previousOrParentTNode.parent;setPreviousOrParentTNode(previousOrParentTN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set end(value) {}", "get end() { return this._end; }", "get end() {\n\t\treturn this.__end;\n\t}", "get end() {\n\t\treturn this.__end;\n\t}", "get end() {\n return this.endInternal;\n }", "get end() {\n return this._end;\n }", "extendToWordEnd() {\n this.extendToWordEndInter...
[ "0.7218908", "0.6948426", "0.6759353", "0.6759353", "0.6756859", "0.67232835", "0.6590818", "0.6548973", "0.6495862", "0.64855784", "0.64299107", "0.64299107", "0.63966846", "0.6395399", "0.6308179", "0.629524", "0.6284835", "0.6226345", "0.62227964", "0.6178508", "0.6174281"...
0.0
-1
Create DOM element. The instruction must later be followed by `elementEnd()` call.
function elementStart(index,name,attrs,localRefs){var lView=getLView();var tView=lView[TVIEW];ngDevMode&&assertEqual(lView[BINDING_INDEX],tView.bindingStartIndex,'elements should be created before any bindings ');ngDevMode&&ngDevMode.rendererCreateElement++;var _native11=elementCreate(name);ngDevMode&&assertDataInRange...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNode(element) {\n return document.createElement(element);\n }", "function createNode(element) {\n return document.createElement(element);\n }", "function createNode(element) {\n return document.createElement(element);\n }", "function create(element) { return d...
[ "0.7043123", "0.7020135", "0.70094526", "0.7003003", "0.69118667", "0.69118667", "0.69118667", "0.69118667", "0.69118667", "0.69118667", "0.69118667", "0.6895047", "0.6895047", "0.6895047", "0.68340814", "0.6718315", "0.6690275", "0.65912914", "0.64944255", "0.6449803", "0.64...
0.0
-1
Creates a native element from a tag name, using a renderer.
function elementCreate(name,overriddenRenderer){var _native12;var rendererToUse=overriddenRenderer||getLView()[RENDERER];if(isProceduralRenderer(rendererToUse)){_native12=rendererToUse.createElement(name,_currentNamespace);}else{if(_currentNamespace===null){_native12=rendererToUse.createElement(name);}else{_native12=re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function elementCreate(name, overriddenRenderer) {\n var native;\n var rendererToUse = overriddenRenderer || renderer;\n if (isProceduralRenderer(rendererToUse)) {\n native = rendererToUse.createElement(name, _currentNamespace);\n }\n else {\n if (_currentNamespace === null) {\n ...
[ "0.73001736", "0.7294971", "0.7294922", "0.7294922", "0.65939504", "0.6523952", "0.65075517", "0.64927", "0.64799917", "0.6446825", "0.64299643", "0.64141476", "0.63840175", "0.63830817", "0.63391376", "0.63391376", "0.63391376", "0.63391376", "0.63391376", "0.6334445", "0.63...
0.70670694
4
Creates directive instances and populates local refs.
function createDirectivesAndLocals(tView,viewData,localRefs,localRefExtractor){if(localRefExtractor===void 0){localRefExtractor=getNativeByTNode;}if(!getBindingsEnabled())return;var previousOrParentTNode=getPreviousOrParentTNode();if(getFirstTemplatePass()){ngDevMode&&ngDevMode.firstTemplatePass++;resolveDirectives(tVi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectivesAndLocals(localRefs, localRefExtractor) {\n if (localRefExtractor === void 0) {\n localRefExtractor = getNativeByTNode;\n }\n if (!bindingsEnabled)\n return;\n if (firstTemplatePass) {\n ngDevMode && ngDevMode.firstTemplatePass++;\n cacheMatchingDire...
[ "0.67432165", "0.65034634", "0.64185166", "0.63528395", "0.63522017", "0.6278628", "0.62779564", "0.62779564", "0.62466025", "0.62466025", "0.62466025", "0.62466025", "0.62466025", "0.62466025", "0.6137567", "0.6073575", "0.6073575", "0.5670439", "0.5600534", "0.55467844", "0...
0.6558585
1
Takes a list of local names and indices and pushes the resolved local variable values to LView in the same order as they are loaded in the template with load().
function saveResolvedLocalsInData(viewData,tNode,localRefExtractor){var localNames=tNode.localNames;if(localNames){var localIndex=tNode.index+1;for(var i=0;i<localNames.length;i+=2){var index=localNames[i+1];var value=index===-1?localRefExtractor(tNode,viewData):viewData[index];viewData[localIndex++]=value;}}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function discoverLocalRefs(lView, nodeIndex) {\n var tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n var result = {};\n var localIndex = tNode.index + 1;\n for (var i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[l...
[ "0.62069887", "0.61932313", "0.6174003", "0.61607003", "0.61560154", "0.6143139", "0.6143139", "0.6137647", "0.6137647", "0.6137647", "0.61303693", "0.61303693", "0.61303693", "0.61303693", "0.61303693", "0.61303693", "0.6126156", "0.6031644", "0.6031644", "0.6031644", "0.603...
0.6283738
0
Gets TView from a template function or creates a new TView if it doesn't already exist.
function getOrCreateTView(templateFn,consts,vars,directives,pipes,viewQuery){// TODO(misko): reading `ngPrivateData` here is problematic for two reasons // 1. It is a megamorphic call on each invocation. // 2. For nested embedded views (ngFor inside ngFor) the template instance is per // outer template invocation, w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateTView(templateFn, consts, vars, directives, pipes, viewQuery) {\n // TODO(misko): reading `ngPrivateData` here is problematic for two reasons\n // 1. It is a megamorphic call on each invocation.\n // 2. For nested embedded views (ngFor inside ngFor) the template instance is per\n //...
[ "0.7081485", "0.7081485", "0.7081485", "0.65914226", "0.60310566", "0.59634984", "0.5938482", "0.5938482", "0.58746433", "0.58746433", "0.58665305", "0.58665305", "0.58665305", "0.58665305", "0.58665305", "0.58665305", "0.5854507", "0.58333915", "0.5798237", "0.5752081", "0.5...
0.6950289
3
Creates a TView instance
function createTView(viewIndex,templateFn,consts,vars,directives,pipes,viewQuery){ngDevMode&&ngDevMode.tView++;var bindingStartIndex=HEADER_OFFSET+consts;// This length does not yet contain host bindings from child directives because at this point, // we don't know which directives are active on this template. As soon ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TView() {}", "function TView() {}", "function TView() {}", "function TView() { }", "function TView() { }", "function TView(){}", "function TViewNode() {}", "function TViewNode() {}", "function TViewNode() {}", "function TViewNode() { }", "function TViewNode() { }", "function TViewNod...
[ "0.8348236", "0.8348236", "0.8348236", "0.81247824", "0.81247824", "0.80905175", "0.747253", "0.747253", "0.747253", "0.73783076", "0.73783076", "0.7275652", "0.713531", "0.713531", "0.713531", "0.713531", "0.71291333", "0.7076624", "0.7031464", "0.701291", "0.6905995", "0....
0.6826154
21
Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
function locateHostElement(factory,elementOrSelector){var defaultRenderer=factory.createRenderer(null,null);var rNode=typeof elementOrSelector==='string'?isProceduralRenderer(defaultRenderer)?defaultRenderer.selectRootElement(elementOrSelector):defaultRenderer.querySelector(elementOrSelector):elementOrSelector;if(ngDev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHostElement(directive){return getLContext(directive)[\"native\"];}", "function getHostElement(componentOrDirective) {\n return getLContext(componentOrDirective)[\"native\"];\n }", "get nativeElement() {\n var _a;\n return (_a = this.view) === null || _a === void 0 ? void 0...
[ "0.68320066", "0.6656773", "0.6612224", "0.6592282", "0.6523031", "0.6444827", "0.6444827", "0.6421898", "0.6421898", "0.6421898", "0.6421898", "0.6421898", "0.6421898", "0.6421898", "0.6421898", "0.63798887", "0.632843", "0.632843", "0.632843", "0.6214086", "0.62092847", "...
0.6786996
1
Adds an event listener to the current node. If an output exists on one of the node's directives, it also subscribes to the output and saves the subscription for later cleanup.
function listener(eventName,listenerFn,useCapture){if(useCapture===void 0){useCapture=false;}var lView=getLView();var tNode=getPreviousOrParentTNode();var tView=lView[TVIEW];var firstTemplatePass=tView.firstTemplatePass;var tCleanup=firstTemplatePass&&(tView.cleanup||(tView.cleanup=[]));ngDevMode&&assertNodeOfPossibleT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listener(eventName, listenerFn, useCapture) {\n if (useCapture === void 0) {\n useCapture = false;\n }\n var tNode = previousOrParentTNode;\n ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 4 /* ElementContainer */);\n // add native event listener - ...
[ "0.68001294", "0.6695363", "0.6695363", "0.6169287", "0.55982214", "0.5570874", "0.5570874", "0.5570874", "0.5570874", "0.5570874", "0.5570874", "0.5566883", "0.5566883", "0.55514157", "0.5517387", "0.5517387", "0.5517387", "0.5517387", "0.5517387", "0.5517387", "0.5502014", ...
0.6673937
3
Saves context for this cleanup function in LView.cleanupInstances. On the first template pass, saves in TView: Cleanup function Index of context we just saved in LView.cleanupInstances
function storeCleanupWithContext(lView,context,cleanupFn){var lCleanup=getCleanup(lView);lCleanup.push(context);if(lView[TVIEW].firstTemplatePass){getTViewCleanup(lView).push(cleanupFn,lCleanup.length-1);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeCleanupWithContext(lView, context, cleanupFn) {\n var lCleanup = getCleanup(lView);\n lCleanup.push(context);\n if (lView[TVIEW].firstTemplatePass) {\n getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);\n }\n}", "function storeCleanupWithContext(lView, context, cleanupF...
[ "0.76803833", "0.76803833", "0.76803833", "0.7428095", "0.7350211", "0.7323028", "0.71831256", "0.71831256", "0.71831256", "0.71831256", "0.71831256", "0.71831256", "0.68229336", "0.627006", "0.627006", "0.627006", "0.627006", "0.56316566", "0.56313384", "0.55928224", "0.5592...
0.7991065
0
Saves the cleanup function itself in LView.cleanupInstances. This is necessary for functions that are wrapped with their contexts, like in renderer2 listeners. On the first template pass, the index of the cleanup function is saved in TView.
function storeCleanupFn(view,cleanupFn){getCleanup(view).push(cleanupFn);if(view[TVIEW].firstTemplatePass){getTViewCleanup(view).push(view[CLEANUP].length-1,null);}}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeCleanupWithContext(lView,context,cleanupFn){var lCleanup=getCleanup(lView);lCleanup.push(context);if(lView[TVIEW].firstTemplatePass){getTViewCleanup(lView).push(cleanupFn,lCleanup.length-1);}}", "function storeCleanupFn(view, cleanupFn) {\n getCleanup(view).push(cleanupFn);\n if (view[TVIEW]....
[ "0.7517272", "0.7283872", "0.7283872", "0.7283872", "0.7283872", "0.7240082", "0.7240082", "0.7240082", "0.72202456", "0.70998967", "0.7017324", "0.7017324", "0.7017324", "0.7017324", "0.7017324", "0.7017324", "0.6974796", "0.6624358", "0.66139764", "0.65563226", "0.65563226"...
0.75095063
1
Mark the end of the element.
function elementEnd(){var previousOrParentTNode=getPreviousOrParentTNode();if(getIsParent()){setIsParent(false);}else{ngDevMode&&assertHasParent(getPreviousOrParentTNode());previousOrParentTNode=previousOrParentTNode.parent;setPreviousOrParentTNode(previousOrParentTNode);}ngDevMode&&assertNodeType(previousOrParentTNode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get end() { return this._end; }", "get end() {\n return this.span.end;\n }", "set end(value) {}", "get end() {\n\t\treturn this.__end;\n\t}", "get end() {\n\t\treturn this.__end;\n\t}", "get end() {\n return this._end;\n }", "get end() {\n return this.endInternal;\n }", ...
[ "0.7000837", "0.6952748", "0.6947942", "0.6946984", "0.6946984", "0.69386756", "0.6874073", "0.66770303", "0.6595042", "0.6481227", "0.645855", "0.6451681", "0.6387003", "0.63181573", "0.63181573", "0.62892526", "0.608716", "0.608716", "0.608716", "0.608716", "0.608716", "0...
0.5721131
42