query
stringlengths
9
14.6k
document
stringlengths
8
5.39M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Given an `LView`, find the closest declaration view which is not an embedded view. This method searches for the `LView` associated with the component which declared the `LView`. This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise it walks the declaration parents until it finds...
function findComponentView(lView) { var rootTNode = lView[T_HOST]; while (rootTNode !== null && rootTNode.type === 2 /* View */) { ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]'); lView = lView[DECLARATION_VIEW]; rootTNode = lView[T_HOST]; } ngDevMo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findComponentView(lView) {\n for (var rootTNode = lView[_interfaces_view__WEBPACK_IMPORTED_MODULE_5__.j]; rootTNode && 2 /* View */ === rootTNode.type; ) rootTNode = (lView = lView[_interfaces_view__WEBPACK_IMPORTED_MODULE_5__.f])[_interfaces_view__WEBPACK_IMPORTED_MODULE_5__.j];\n r...
[ "0.6915312", "0.68340594", "0.68340594", "0.65672654", "0.65672654", "0.65672654", "0.65672654", "0.65672654", "0.65672654", "0.65672654", "0.63605964", "0.63605964", "0.63605964", "0.63605964", "0.63605964", "0.63605964", "0.63605964", "0.6250307", "0.6250307", "0.6250307", ...
0.6957053
0
Detects which sanitizer to use for URL property, based on tag name and prop name. The rules are based on the RESOURCE_URL context config from `packages/compiler/src/schema/dom_security_schema.ts`. If tag and prop names don't match Resource URL schema, use URL sanitizer.
function getUrlSanitizer(tag, prop) { if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' || tag === 'script')) || (prop === 'href' && (tag === 'base' || tag === 'link'))) { return ɵɵsanitizeResourceUrl; } return ɵɵsanitizeUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUrlSanitizer(tag, prop) {\n if ((prop === 'src' &&\n (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵ...
[ "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.72687167", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.6836216", "0.683...
0.7277536
1
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.fla...
{ "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.7085696", "0.70842636", "0.70842636", "0.70842636", "0.70842636", "0.70842636", "0.70842636", "0.70842636", "0.7066419", "0.7066419", "0.7066419", "0.5561705", "0.5561131", "0.5561131", "0.55606824", "0.55606824", "0.55600834", "0.55600834", "0.55600834", "0.55600834", "0....
0.71627873
1
Checks whether a selector is inside a CssSelectorList
function isSelectorInSelectorList(selector, list) { selectorListLoop: for (var i = 0; i < list.length; i++) { var currentSelectorInList = list[i]; if (selector.length !== currentSelectorInList.length) { continue; } for (var j = 0; j < selector.length; j++) { i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\...
[ "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.74527144", "0.68448365", "0.62818223", "0.6239598", "0.60524684", "0.60349435", "0.60349435", "0.60020316", "0.5954687", "0.5954687", "0.5954687", ...
0.7657066
1
Visits a classbased binding and updates the new value (if changed). This function is called each time a classbased styling instruction is executed. It's important that it's always called (even if the value has not changed) so that the inner counter index value is incremented. This way, each instruction is always guaran...
function updateClassBinding(context, data, element, prop, bindingIndex, value, deferRegistration, forceUpdate) { var isMapBased = !prop; var state = getStylingState(element, stateIsPersisted(context)); var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.classesIndex++; var updated = updateBin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵclassProp(className, value) {\n var lView = getLView();\n // if a value is interpolated then it may render a `NO_CHANGE` value.\n // in this case we do not need to do anything, but the binding index\n // still needs to be incremented because all styling binding values\n // are stored insi...
[ "0.63565356", "0.6292764", "0.62198085", "0.62035286", "0.62032235", "0.62032235", "0.61783546", "0.61783546", "0.61783546", "0.61783546", "0.61783546", "0.61783546", "0.61783546", "0.6068084", "0.5852268", "0.5796147", "0.5796147", "0.55371994", "0.54919106", "0.54803467", "...
0.6667038
0
Called each time a binding value has changed within the provided `TStylingContext`. This function is designed to be called from `updateStyleBinding` and `updateClassBinding`. If called during the first update pass, the binding will be registered in the context. If the binding does get registered and the `deferRegistrat...
function updateBindingData(context, data, counterIndex, prop, bindingIndex, value, deferRegistration, forceUpdate, sanitizationRequired) { if (!isContextLocked(context)) { if (deferRegistration) { deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateStyleBinding(context, data, element, prop, bindingIndex, value, sanitizer, deferRegistration, forceUpdate) {\n var isMapBased = !prop;\n var state = getStylingState(element, stateIsPersisted(context));\n var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : state.stylesIndex++;\n var ...
[ "0.6275507", "0.5814078", "0.57276785", "0.5676951", "0.55301577", "0.55301577", "0.55297565", "0.55297565", "0.5477074", "0.5430574", "0.5396943", "0.5396943", "0.53911054", "0.53911054", "0.53911054", "0.53911054", "0.53911054", "0.53911054", "0.53911054", "0.5389789", "0.5...
0.6811177
0
Schedules a binding registration to be run at a later point. The reasoning for this feature is to ensure that styling bindings are registered in the correct order for when directives/components have a super/sub class inheritance chains. Each directive's styling bindings must be registered into the context in reverse or...
function deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired) { deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushDeferredBindings() {\n var i = 0;\n while (i < deferredBindingQueue.length) {\n var context = deferredBindingQueue[i++];\n var count = deferredBindingQueue[i++];\n var prop = deferredBindingQueue[i++];\n var bindingIndex = deferredBindingQueue[i++];\n var sani...
[ "0.6145378", "0.6145378", "0.521944", "0.50195825", "0.4995964", "0.4995964", "0.49771237", "0.49771237", "0.49196225", "0.491333", "0.48989612", "0.48989612", "0.48989612", "0.48703465", "0.48658097", "0.48245272", "0.48245272", "0.48245272", "0.48245272", "0.48245272", "0.4...
0.624756
0
Flushes the collection of deferred bindings and causes each entry to be registered into the context.
function flushDeferredBindings() { var i = 0; while (i < deferredBindingQueue.length) { var context = deferredBindingQueue[i++]; var count = deferredBindingQueue[i++]; var prop = deferredBindingQueue[i++]; var bindingIndex = deferredBindingQueue[i++]; var sanitizationRequ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired) {\n deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n}", "function deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired) {\n ...
[ "0.53789806", "0.53789806", "0.53153014", "0.53153014", "0.53153014", "0.53153014", "0.53153014", "0.53153014", "0.53153014", "0.53122115", "0.5267789", "0.5267789", "0.5267789", "0.522748", "0.5220038", "0.5217801", "0.5200575", "0.51839805", "0.51511455", "0.5145767", "0.51...
0.7338263
0
Registers the provided binding (prop + bindingIndex) into the context. This function is shared between bindings that are assigned immediately (via `updateBindingData`) and at a deferred stage. When called, it will figure out exactly where to place the binding data in the context. It is needed because it will either upd...
function registerBinding(context, countId, prop, bindingValue, sanitizationRequired) { var registered = false; if (prop) { // prop-based bindings (e.g `<div [style.width]="w" [class.foo]="f">`) var found = false; var i = getPropValuesStartPosition(context); while (i < context.len...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBindingIntoContext(context, isMapBased, index, bindingValue, countId) {\n var valuesCount = getValuesCount(context, index);\n var firstValueIndex = index + 3 /* BindingsStartOffset */;\n var lastValueIndex = firstValueIndex + valuesCount;\n if (!isMapBased) {\n // prop-based values a...
[ "0.72012174", "0.72012174", "0.6477569", "0.615354", "0.615354", "0.60780764", "0.60780764", "0.60143507", "0.5837521", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.5797639", "0.55598724", "0.54299265"...
0.7231841
0
Inserts a new binding value into a styling property tuple in the `TStylingContext`. A bindingValue is inserted into a context during the first update pass of a template or host bindings function. When this occurs, two things happen: If the bindingValue value is a number then it is treated as a bindingIndex value (a ind...
function addBindingIntoContext(context, isMapBased, index, bindingValue, countId) { var valuesCount = getValuesCount(context, index); var firstValueIndex = index + 3 /* BindingsStartOffset */; var lastValueIndex = firstValueIndex + valuesCount; if (!isMapBased) { // prop-based values all have de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerBinding(context, countId, prop, bindingValue, sanitizationRequired) {\n var registered = false;\n if (prop) {\n // prop-based bindings (e.g `<div [style.width]=\"w\" [class.foo]=\"f\">`)\n var found = false;\n var i = getPropValuesStartPosition(context);\n while (...
[ "0.6073266", "0.5848688", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.58065665", "0.5369991", "0.5369991", "0.5369991", "0.5369991", "0.5369991", "0.5369991", "0.5369991", "0.53590333", "0.53...
0.7003243
0
Applies all pending style and class bindings to the provided element. This function will attempt to flush styling via the provided `classesContext` and `stylesContext` context values. This function is designed to be run from the `stylingApply()` instruction (which is run at the very end of styling change detection) and...
function flushStyling(renderer, data, classesContext, stylesContext, element, directiveIndex, styleSanitizer) { ngDevMode && ngDevMode.flushStyling++; var persistState = classesContext ? stateIsPersisted(classesContext) : (stylesContext ? stateIsPersisted(stylesContext) : false); var allowFlushClass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵstylingApply() {\n var elementIndex = getSelectedIndex();\n var lView = getLView();\n var tNode = getTNode(elementIndex, lView);\n var renderer = getRenderer(tNode, lView);\n var native = getNativeByTNode(tNode, lView);\n var directiveIndex = getActiveDirectiveStylingIndex();\n var ...
[ "0.66989976", "0.6221861", "0.5839201", "0.5839201", "0.5735567", "0.5735567", "0.567674", "0.567674", "0.567674", "0.567674", "0.567674", "0.56298393", "0.54999435", "0.54999435", "0.54999435", "0.54999435", "0.54999435", "0.54999435", "0.5498127", "0.549487", "0.549487", ...
0.7348643
0
Runs through the provided styling context and applies each value to the provided element (via the renderer) if one or more values are present. This function will iterate over all entries present in the provided `TStylingContext` array (both propbased and mapbased bindings). Each entry, within the `TStylingContext` arra...
function applyStyling(context, renderer, element, bindingData, bitMaskValue, applyStylingFn, sanitizer) { var bitMask = normalizeBitMaskValue(bitMaskValue); var stylingMapsSyncFn = getStylingMapsSyncFn(); var mapsGuardMask = getGuardMask(context, 3 /* MapBindingsPosition */); var applyAllValues = (bitMa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex, defaultValue) {\n var targetPropValueWasApplied = false;\n var totalMaps = getValuesCount(context, 3 /* MapBindingsPosition */);\n if (currentMapIndex < totalMaps) {\n var bi...
[ "0.6528755", "0.62026983", "0.6050828", "0.59885466", "0.563301", "0.563301", "0.5481453", "0.54129916", "0.5259507", "0.5259507", "0.5245749", "0.50129795", "0.49210104", "0.48924655", "0.48916683", "0.48337147", "0.4830245", "0.47566783", "0.47566783", "0.4735507", "0.47355...
0.79076004
0
Iterates over all provided styling entries and renders them on the element. This function is used alongside a `StylingMapArray` entry. This entry is not the same as the `TStylingContext` and is only really used when an element contains initial styling values (e.g. ``), but no style/class bindings are present. If and wh...
function renderStylingMap(renderer, element, stylingValues, isClassBased) { var stylingMapArr = getStylingMapArray(stylingValues); if (stylingMapArr) { for (var i = 1 /* ValuesStartPosition */; i < stylingMapArr.length; i += 2 /* TupleSize */) { var prop = getMapProp(stylingMapArr, i); ...
{ "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.6571039", "0.6571039", "0.6462719", "0.60648793", "0.60351497", "0.599997", "0.59722674", "0.59722674", "0.5803777", "0.5720104", "0.5720104", "0.5719112", "0.5668224", "0.5638812", "0.5638812", "0.5638812", "0.5638812", "0.5638812", "0.5638812", "0.5638812", "0.5638812", ...
0.6692545
0
Registers all initial styling entries into the provided context. This function will iterate over all entries in the provided `initialStyling` ar}ray and register them as default (initial) values in the provided context. Initial styling values in a context are the default values that are to be applied unless overwritten...
function updateInitialStylingOnContext(context, initialStyling) { // `-1` is used here because all initial styling data is not a spart // of a binding (since it's static) var INITIAL_STYLING_COUNT_ID = -1; for (var i = 1 /* ValuesStartPosition */; i < initialStyling.length; i += 2 /* TupleSize */) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function allocTStylingContext(initialStyling) {\n // because map-based bindings deal with a dynamic set of values, there\n // is no way to know ahead of time whether or not sanitization is required.\n // For this reason the configuration will always mark sanitization as active\n // (this means that whe...
[ "0.71158284", "0.6077478", "0.6077478", "0.5981772", "0.5981772", "0.5940937", "0.59238505", "0.5915882", "0.5915882", "0.5570149", "0.5570149", "0.5497055", "0.54046685", "0.5350167", "0.5350167", "0.52465844", "0.51984966", "0.5156872", "0.5156872", "0.5030041", "0.49891064...
0.8029217
0
Recursive function designed to apply mapbased styling to an element one map at a time. This function is designed to be called from the `syncStylingMap` function and will apply mapbased styling data one map at a time to the provided `element`. This function is recursive and it will call itself if a followup map value is...
function innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex, defaultValue) { var targetPropValueWasApplied = false; var totalMaps = getValuesCount(context, 3 /* MapBindingsPosition */); if (currentMapIndex < totalMaps) { var bindingInde...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyStyling(context, renderer, element, bindingData, bitMaskValue, applyStylingFn, sanitizer) {\n var bitMask = normalizeBitMaskValue(bitMaskValue);\n var stylingMapsSyncFn = getStylingMapsSyncFn();\n var mapsGuardMask = getGuardMask(context, 3 /* MapBindingsPosition */);\n var applyAllValues...
[ "0.6195572", "0.6070101", "0.558129", "0.5526434", "0.54831356", "0.5367996", "0.5275178", "0.5246368", "0.5147234", "0.5038197", "0.50196815", "0.5010673", "0.50064534", "0.49302614", "0.48633158", "0.48500285", "0.48500285", "0.48412135", "0.48310944", "0.48310944", "0.4768...
0.6799776
0
Enables support for mapbased styling bindings (e.g. `[style]` and `[class]` bindings).
function activateStylingMapFeature() { setStylingMapsSyncFn(syncStylingMap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hackImplementationOfElementStylingMap(index, classes, styles, directive) {\n throw new Error('unimplemented. Should not be needed by ViewEngine compatibility');\n}", "function hackImplementationOfElementStylingMap(index, classes, styles, directive) {\n throw new Error('unimplemented. Should not be...
[ "0.65909165", "0.65909165", "0.6417917", "0.6276244", "0.6218193", "0.61354375", "0.5928778", "0.5800344", "0.57827437", "0.57646745", "0.5742291", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427", "0.5739427"...
0.66657734
0
Used to determine the mode for the inner recursive call. If an inner map is iterated on then this is done so for one of two reasons: value is being applied: if the value is being applied from this current styling map then there is no need to apply it in a deeper map. value is being not applied: apply the value if it is...
function resolveInnerMapMode(currentMode, valueIsDefined, isExactMatch) { var innerMode = currentMode; if (!valueIsDefined && !(currentMode & 4 /* SkipTargetProp */) && (isExactMatch || (currentMode & 1 /* ApplyAllValues */))) { // case 1: set the mode to apply the targeted prop value if it ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex, defaultValue) {\n var targetPropValueWasApplied = false;\n var totalMaps = getValuesCount(context, 3 /* MapBindingsPosition */);\n if (currentMapIndex < totalMaps) {\n var bi...
[ "0.6299", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54834175", "0.54826707", "0.54402894", "0.54402894", "0.54402894", "0.54402894", ...
0.7246315
0
Decides whether or not a prop/value entry will be applied to an element. To determine whether or not a value is to be applied, the following procedure is evaluated: First check to see the current `mode` status: 1. If the mode value permits all props to be applied then allow. But do not allow if the current prop is set ...
function isValueAllowedToBeApplied(mode, isTargetPropMatched) { var doApplyValue = (mode & 1 /* ApplyAllValues */) > 0; if (!doApplyValue) { if (mode & 2 /* ApplyTargetProp */) { doApplyValue = isTargetPropMatched; } } else if ((mode & 4 /* SkipTargetProp */) && isTargetPropM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isValidProp(prop, propDef) {\n if (propDef === true) {\n return true;\n }\n if (typeof propDef === \"function\") {\n // Check if a value is constructed by some Constructor. Note that there is a\n // slight abuse of language: we want to consider primit...
[ "0.542671", "0.529743", "0.529743", "0.5283974", "0.52823293", "0.5264341", "0.51922876", "0.5157664", "0.5135494", "0.5135494", "0.51092833", "0.5105395", "0.5105395", "0.5065568", "0.5063813", "0.5017311", "0.5016071", "0.5006324", "0.5006324", "0.5006324", "0.50041413", ...
0.7417139
0
Used to reset the state of each cursor value being used to iterate over mapbased styling bindings.
function resetSyncCursors() { for (var i = 0; i < MAP_CURSORS.length; i++) { MAP_CURSORS[i] = 1 /* ValuesStartPosition */; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "resetSmartCursor() {\n this._scActive = false;\n }", "_refreshCursor() {\n this.svgText.removeCursor();\n this.cursorState = true;\n this._serviceCursor();\n }", "reset(){\n if(this.cursor){\n this.cursor.close();\n this.cursor = null;\n }\n }", "function clearCursorLocat...
[ "0.6907882", "0.6787378", "0.6505094", "0.6489989", "0.6452446", "0.6444964", "0.6415276", "0.6364609", "0.63313246", "0.6275835", "0.6194762", "0.6184654", "0.6162316", "0.6138938", "0.61152005", "0.61140764", "0.61065644", "0.60989577", "0.60855657", "0.6060811", "0.6049307...
0.759717
0
Returns an active cursor value at a given mapIndex location.
function getCurrentSyncCursor(mapIndex) { if (mapIndex >= MAP_CURSORS.length) { MAP_CURSORS.push(1 /* ValuesStartPosition */); } return MAP_CURSORS[mapIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCurrentSyncCursor(mapIndex, indexValue) {\n MAP_CURSORS[mapIndex] = indexValue;\n}", "get currentlySelectedAminoAcidIndex() {\n const {aminoAcids, selectionStartPercent} = this.props;\n const aaIndexStart = (aminoAcids.length - 1) * selectionStartPercent;\n const numAAinSelectionBox = ami...
[ "0.6527985", "0.53718966", "0.52654696", "0.52526146", "0.52392256", "0.5235299", "0.5235299", "0.52287996", "0.52287996", "0.5214975", "0.51663804", "0.51365703", "0.5126932", "0.5126932", "0.51045656", "0.50544757", "0.5015591", "0.49961835", "0.49935675", "0.49848542", "0....
0.75009286
0
Sets a cursor value at a given mapIndex location.
function setCurrentSyncCursor(mapIndex, indexValue) { MAP_CURSORS[mapIndex] = indexValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setCursorLocation(map, point) {\n var cursorLocationElement = getSiblingElement(map, \"CursorLocation\");\n cursorLocationElement.innerHTML = GetGridReference(point);\n }", "function setCurrent(idx){\n\t\t\tif(MapService.availableMaps){\n\t\t\tself.currentMap = MapService.availableMaps[...
[ "0.6275046", "0.61034405", "0.5969935", "0.5948718", "0.5948718", "0.5948718", "0.5858805", "0.57998246", "0.56532544", "0.56102276", "0.5605835", "0.55880475", "0.55756116", "0.5507438", "0.5488504", "0.5484586", "0.5481347", "0.54473585", "0.54002964", "0.5376862", "0.53459...
0.80291396
0
Inserts the provided item into the provided styling array at the right spot. The `StylingMapArray` type is a sorted key/value array of entries. This means that when a new entry is inserted it must be placed at the right spot in the array. This function figures out exactly where to place it.
function addItemToStylingMap(stylingMapArr, prop, value, allowOverwrite) { for (var j = 1 /* ValuesStartPosition */; j < stylingMapArr.length; j += 2 /* TupleSize */) { var propAtIndex = getMapProp(stylingMapArr, j); if (prop <= propAtIndex) { var applied = false; if (propAtI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPlace (element, index, array) {\n element.place = index + 1\n }", "function insertAt(arr, index, item) {\n var start = arr.slice(0, index);\n var end = arr.slice(index);\n return [].concat(start).concat(item).concat(end);\n }", "function insertArrayItemAt...
[ "0.5117513", "0.4980806", "0.49232394", "0.4824936", "0.48079824", "0.4800787", "0.47958365", "0.47267568", "0.47200802", "0.46941242", "0.461623", "0.461623", "0.46077502", "0.45896056", "0.45800334", "0.4554113", "0.45399493", "0.4539137", "0.45385262", "0.45385262", "0.453...
0.6217422
0
Converts the provided styling map array into a string. Classes => `one two three` Styles => `prop:value; prop2:value2`
function stylingMapToString(map, isClassBased) { var str = ''; for (var i = 1 /* ValuesStartPosition */; i < map.length; i += 2 /* TupleSize */) { var prop = getMapProp(map, i); var value = getMapValue(map, i); var attrValue = concatString(prop, isClassBased ? '' : value, ':'); s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toCssText(styles) {\n return Object.keys(styles).reduce(function (acc, key) {\n if (styles[key]) {\n acc.push(key + \":\" + styles[key]);\n }\n\n return acc;\n }, []).join(\";\");\n }", "function toCssText(styles) {\r\n return Object.keys(styles)\r\n .reduce((acc, ...
[ "0.66635054", "0.66228133", "0.6417219", "0.63900363", "0.6293447", "0.6217898", "0.62167627", "0.6214976", "0.61944026", "0.6191775", "0.61871934", "0.6178625", "0.6172202", "0.6171271", "0.6167065", "0.6152207", "0.6144636", "0.6144636", "0.6063778", "0.6023493", "0.5981456...
0.75745726
0
Converts the provided styling map array into a key value map.
function stylingMapToStringMap(map) { var stringMap = {}; if (map) { for (var i = 1 /* ValuesStartPosition */; i < map.length; i += 2 /* TupleSize */) { var prop = getMapProp(map, i); var value = getMapValue(map, i); stringMap[prop] = value; } } return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStylingMapArray(value) {\n return isStylingContext(value) ?\n value[0 /* InitialStylingValuePosition */] :\n value;\n}", "function styleKeyValueArraySet(keyValueArray, key, value) {\n if (stylePropNeedsSanitization(key)) {\n value = ɵɵsanitizeStyle(value);\n }\n keyVa...
[ "0.59621537", "0.58753335", "0.5663268", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.56525594", "0.5636343", "0.5604717", "0.55988705", "0.5567792", "0.5561552", "0.5561552", "0...
0.6266107
0
Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.
function attachStylingDebugObject(context) { var debug = new TStylingContextDebug(context); attachDebugObject(context, debug); return debug; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DebugStylingContextEntry() { }", "function addDebug(debugContext) {\n var debugDraw = new b2DebugDraw();\n debugDraw.SetSprite(debugContext);\n debugDraw.SetDrawScale(SCALE);\n debugDraw.SetFillAlpha(0.7);\n debugDraw.SetLineThickness(1.0);\n debugDraw.SetFlags(...
[ "0.66604793", "0.5978205", "0.58354145", "0.5684345", "0.5608341", "0.55575037", "0.55076885", "0.5377433", "0.5361799", "0.5291823", "0.52570415", "0.5252056", "0.51506394", "0.51506394", "0.5086307", "0.50545746", "0.5054132", "0.5054132", "0.50516623", "0.50464845", "0.504...
0.8155426
0
Sets the host bindings for the current view.
function setHostBindings(tView, viewData) { var selectedIndex = getSelectedIndex(); try { if (tView.expandoInstructions) { var bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex; setBindingRoot(bindingRootIndex); var currentDirectiveIndex = -1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHostBindings(bindings) {\n if (bindings != null) {\n var defs = tView.directives;\n for (var i = 0; i < bindings.length; i += 2) {\n var dirIndex = bindings[i];\n var def = defs[dirIndex];\n def.hostBindings && def.hostBindings(dirIndex, bindings[i + 1]...
[ "0.77848005", "0.6926287", "0.6926287", "0.6030137", "0.5926165", "0.5926165", "0.5926165", "0.5926165", "0.5926165", "0.58823943", "0.5871714", "0.5871714", "0.5871714", "0.5441975", "0.54339224", "0.53313607", "0.5326693", "0.5326693", "0.5288681", "0.5278905", "0.5278905",...
0.70003027
1
Refreshes child components in the current view.
function refreshChildComponents(hostLView, components) { if (components != null) { for (var i = 0; i < components.length; i++) { componentRefresh(hostLView, 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 (let i = 0; i < components.length; i++) {\n refreshComponent(hostL...
[ "0.71145505", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.69853455", "0.6817444", "0.6815524", "0.6815524", "0.6629822", "0.6629822", "0.65713", "0.65713", "0.65509796", "0.6439317", "0.63990...
0.70633197
1
Stores debugging data for this property binding on first template pass. This enables features like DebugElement.properties.
function savePropertyDebugData(tNode, lView, propName, tData, nativeOnly) { var lastBindingIndex = lView[BINDING_INDEX] - 1; // Bind/interpolation functions save binding metadata in the last binding index, // but leave the property name blank. If the interpolation delimiter is at the 0 // index, we know...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getDebugData() {\n if (!this.debugData) {\n this.debugData = this.getData({length: DEBUG_DATA_LENGTH});\n return {data: this.debugData, changed: true};\n }\n return {data: this.debugData, changed: false};\n }", "set debug(b) {\n this._debug = b;\n }", "function set(debug) {\n __DEBUG__...
[ "0.5691283", "0.56423235", "0.5318963", "0.5318963", "0.5318963", "0.52985203", "0.5296298", "0.52089226", "0.52043444", "0.51800454", "0.51592547", "0.509794", "0.50206524", "0.5019744", "0.49902198", "0.4972826", "0.48993775", "0.48981252", "0.4889158", "0.4889158", "0.4889...
0.6538962
0
Creates an error that should be thrown when encountering an unknown property on an element.
function createUnknownPropertyError(propName, tNode) { return new Error("Template error: Can't bind to '" + propName + "' since it isn't a known property of '" + tNode.tagName + "'."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function logUnknownPropertyError(propName, tNode) {\n console.error(`Can't bind to '${propName}' since it isn't a known property of '${tNode.tagName}'.`);\n}", "function logUnknownPropertyError(propName, tNode) {\n console.error(`Can't bind to '${propName}' since it isn't a known property of '${tNode.tagNa...
[ "0.6262876", "0.6262876", "0.6262876", "0.60647756", "0.60647756", "0.60647756", "0.60647756", "0.60647756", "0.60647756", "0.60647756", "0.5700927", "0.5457466", "0.52967787", "0.52372336", "0.5025575", "0.5014673", "0.5012973", "0.5012746", "0.5000263", "0.49379626", "0.493...
0.7198091
0
Instantiate all the directives that were previously resolved on the current node.
function instantiateAllDirectives(tView, lView, tNode) { var start = tNode.directiveStart; var end = tNode.directiveEnd; if (!tView.firstTemplatePass && start < end) { getOrCreateNodeInjectorForNode(tNode, lView); } for (var i = start; i < end; i++) { var def = tView.data[i]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function instantiateDirectivesDirectly() {\n var tNode = previousOrParentNode.tNode;\n var count = tNode.flags & 4095 /* DirectiveCountMask */;\n if (count > 0) {\n var start = tNode.flags >> 14 /* DirectiveStartingIndexShift */;\n var end = start + count;\n var tDirectives = tView.di...
[ "0.7676179", "0.69548374", "0.69548374", "0.6936891", "0.683421", "0.6832097", "0.6832097", "0.67313564", "0.67313564", "0.67313564", "0.67313564", "0.67313564", "0.67313564", "0.67313564", "0.58723456", "0.584239", "0.5481755", "0.5481755", "0.543517", "0.543517", "0.5398074...
0.70100623
1
Generates a new block in TView.expandoInstructions for this node. Each expando block starts with the element index (turned negative so we can distinguish it from the hostVar count) and the directive count. See more in VIEW_DATA.md.
function generateExpandoInstructionBlock(tView, tNode, directiveCount) { ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Expando block should only be generated on first template pass.'); var elementIndex = -(tNode.index - HEADER_OFFSET); var providerStartIndex = tNode.providerIndexes & 65535 /* Pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateExpandoInstructionBlock(tView, tNode, directiveCount) {\n ngDevMode &&\n assertEqual(tView.firstCreatePass, true, 'Expando block should only be generated on first create pass.');\n // Important: In JS `-x` and `0-x` is not the same! If `x===0` then `-x` will produce `-0` which\n //...
[ "0.77128094", "0.77128094", "0.77128094", "0.77089524", "0.5801896", "0.5801896", "0.5643992", "0.5503091", "0.54434097", "0.5420974", "0.5397235", "0.5394503", "0.53921556", "0.53921556", "0.5389907", "0.5389907", "0.5384943", "0.5384943", "0.5384943", "0.5384943", "0.533697...
0.77607024
1
Process a directive on the current node after its creation.
function postProcessDirective(viewData, directive, def, directiveDefIdx) { var previousOrParentTNode = getPreviousOrParentTNode(); postProcessBaseDirective(viewData, previousOrParentTNode, directive); ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode'); if (previousOrParentTNode &...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postProcessBaseDirective(lView, previousOrParentTNode, directive, def) {\n var native = Object(render3_util.g)(previousOrParentTNode, lView);\n Object(context_discovery.a)(directive, lView), native && Object(context_discovery.a)(native, lView);\n }", "_compileNode(node, ctx)...
[ "0.64142865", "0.5969594", "0.5957893", "0.5957893", "0.5950453", "0.5950453", "0.56946516", "0.55445784", "0.5507455", "0.5454561", "0.5454561", "0.5454561", "0.54297906", "0.5358369", "0.53127885", "0.5277194", "0.5160738", "0.5156857", "0.5057116", "0.5038252", "0.5015506"...
0.5997493
1
Initializes the flags on the current node, setting all indices to the initial index, the directive count to 0, and adding the isComponent flag.
function initNodeFlags(tNode, index, numberOfDirectives) { var flags = tNode.flags; ngDevMode && assertEqual(flags === 0 || flags === 1 /* isComponent */, true, 'expected node flags to not be initialized'); ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initNodeFlags(tNode, index, numberOfDirectives) {\n // When the first directive is created on a node, save the index\n tNode.flags = 1 /* isComponent */ & tNode.flags, tNode.directiveStart = index, tNode.directiveEnd = index + numberOfDirectives, \n tNode.providerIndexes =...
[ "0.78616506", "0.73758566", "0.73758566", "0.6351641", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.6349873", "0.5209492", "0.5209492", "0.520649", "0.5172095", "0.51629496", "0.51629496", "0.51629496"...
0.7479466
1
Generates initialInputData for a node and stores it in the template's static storage so subsequent template invocations don't have to recalculate it. initialInputData is an array containing values that need to be set as input properties for directives on this node, but only once on creation. We need this array to suppo...
function generateInitialInputs(directiveIndex, inputs, tNode) { var initialInputData = tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new TNodeInitialInputs() : []); // Ensure that we don't create sparse arrays for (var i_1 = initialInputData.length; i_1 <= directiveIndex; i_1++) { initia...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateInitialInputs(directiveIndex, inputs, tNode) {\n var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);\n initialInputData[directiveIndex] = null;\n var attrs = tNode.attrs;\n var i = 0;\n while (i < attrs.length) {\n var attrName = attrs[i];\n if (a...
[ "0.67192495", "0.67110884", "0.67110884", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56212336", "0.56013805", "0.5403652", "0.5403652", "0.5403652", "0.5403652", "0.5403652", "0.5403652", "0...
0.7033717
0
Adds LView or LContainer to the end of the current view tree. This structure will be used to traverse through nested views to remove listeners and call onDestroy callbacks.
function addToViewTree(lView, lViewOrLContainer) { // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer // to // the end of the queue, which means if the developer retrieves the LContainers from RNodes out // of // order, the change detection will run out o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of order, the change detection will run out of orde...
[ "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.70333374", "0.6572848", "0.63400453", "0.63287467", "0.63287467", "0.61764675", "0.6146432", "0.6146432", "0.6128787", "0.6128787", "...
0.7040782
0
Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.
function checkView(hostView, component) { var hostTView = hostView[TVIEW]; var oldView = enterView(hostView, hostView[T_HOST]); var templateFn = hostTView.template; var creationMode = isCreationMode(hostView); // Will become true if the `try` block executes with no errors. var safeToRunHooks = f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkView(hostView, component) {\n var hostTView = hostView[TVIEW];\n var oldView = enterView(hostView, hostView[HOST_NODE]);\n var templateFn = hostTView.template;\n var viewQuery = hostTView.viewQuery;\n try {\n namespaceHTML();\n createViewQuery(viewQuery, hostView, compone...
[ "0.687719", "0.687719", "0.67185724", "0.608768", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.60074127", "0.5790189", "0.5691064", "0.5691064", "0.5691064", "0.5691064", "0.5691064", "0.56910...
0.69753295
0
Renders all initial styling (class and style values) on to the element from the tNode. All initial styling data (i.e. any values extracted from the `style` or `class` attributes on an element) are collected into the `tNode.styles` and `tNode.classes` data structures. These values are populated during the creation phase...
function renderInitialStyling(renderer, native, tNode) { renderStylingMap(renderer, native, tNode.classes, true); renderStylingMap(renderer, native, tNode.styles, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderInitialStylesAndClasses(element, context, renderer) {\n renderInitialStylingValues(element, renderer, context[3 /* InitialClassValuesPosition */ ], !0), \n renderInitialStylingValues(element, renderer, context[2 /* InitialStyleValuesPosition */ ], !1);\n }", "function ...
[ "0.65329576", "0.639132", "0.639132", "0.57299894", "0.56204545", "0.56204545", "0.56204545", "0.56204545", "0.5558959", "0.5554532", "0.5554532", "0.5550432", "0.5550432", "0.54808074", "0.5458349", "0.543122", "0.53090525", "0.52965224", "0.52965224", "0.5279032", "0.527708...
0.6608548
0
Detach a `LView` from the DOM by detaching its nodes.
function renderDetachView(lView) { executeActionOnView(lView[RENDERER], 1 /* Detach */, lView, null, null); }
{ "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.68598694", "0.68598694", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.68571603", "0.66427743", "0.66002876", "0.65845627", "0.6571697", "0.6571697", "0.6571697", "0.65709233", ...
0.6865672
0
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(lViewOrLContainer, rootView) { var tNode; if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) && 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 re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getParentState(lViewOrLContainer, rootView) {\n let 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.66396606", "0.6148749", "0.6148749", "0.60935646", "0.6087045", "0.57083035", "0.5684228", "0.5684228", "0.5684228", "0.5684228", "0.5684228", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.565553", "0.56163...
0.6735921
1
Returns a native element if a node 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 pr...
function getRenderParent(tNode, currentView) { // Nodes of the top-most view can be inserted eagerly. if (isRootView(currentView)) { return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView)); } // Skip over element and ICU containers as those are represented by a comme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canInsertNativeNode(parent, currentView) {\n // We can only insert into a Component or View. Any other type should be an Error.\n ngDevMode && assertNodeOfPossibleTypes(parent, 3 /* Element */, 2 /* View */);\n if (parent.tNode.type === 3 /* Element */) {\n // Parent is an element.\n ...
[ "0.7126065", "0.61907077", "0.61907077", "0.60608584", "0.60608584", "0.5968349", "0.5944338", "0.57980835", "0.57980835", "0.57980835", "0.57980835", "0.57980835", "0.57980835", "0.57980835", "0.57742107", "0.56387556", "0.56029195", "0.56029195", "0.56029195", "0.56029195", ...
0.62519246
1
Gets the native host element for a given view. Will return null if the current view does not have a host element.
function getHostNative(currentView) { ngDevMode && assertLView(currentView); var hostTNode = currentView[T_HOST]; return hostTNode && hostTNode.type === 3 /* Element */ ? getNativeByTNode(hostTNode, getLViewParent(currentView)) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHostNative(currentView) {\n var hostTNode = currentView[HOST_NODE];\n return hostTNode && hostTNode.type !== 2 /* View */ ?\n getNativeByTNode(hostTNode, currentView[PARENT]) :\n null;\n}", "function getHostNative(currentView) {\n var hostTNode = currentView[HOST_NODE];\n re...
[ "0.78277963", "0.78277963", "0.63875246", "0.63875246", "0.63875246", "0.63875246", "0.62510866", "0.62510866", "0.62510866", "0.62510866", "0.5972209", "0.5909824", "0.5901242", "0.58942264", "0.5865033", "0.58567876", "0.58567876", "0.58567876", "0.58567876", "0.58567876", ...
0.82447237
0
Finds a native "anchor" node for cases where we can't append a native child directly (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.
function getNativeAnchorNode(parentTNode, lView) { if (parentTNode.type === 2 /* View */) { var lContainer = getLContainer(parentTNode, lView); var index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET; return getBeforeNodeForView(index, lContainer); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNativeAnchorNode(parentTNode, lView) {\n if (parentTNode.type === 2 /* View */) {\n var lContainer = getLContainer(parentTNode, lView);\n if (lContainer === null)\n return null;\n var index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET...
[ "0.65148866", "0.6463794", "0.64228976", "0.64228976", "0.64082605", "0.61708593", "0.59773326", "0.59773326", "0.59773326", "0.59773326", "0.59773326", "0.5701064", "0.569557", "0.569557", "0.56217587", "0.5568142", "0.5568142", "0.5523904", "0.5519892", "0.5487275", "0.5473...
0.6538332
0
Gets the toplevel element or an ICU container if those containers are nested.
function getHighestElementOrICUContainer(tNode) { while (tNode.parent != null && (tNode.parent.type === 4 /* ElementContainer */ || tNode.parent.type === 5 /* IcuContainer */)) { tNode = tNode.parent; } return tNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getOuterContainerOrSelf(node){var view=node.view;while(_isNgContainer(node.parent,view)){node=node.parent;}return node;}", "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 ...
[ "0.6483882", "0.6477707", "0.6401327", "0.6302402", "0.62362987", "0.61795545", "0.61289024", "0.612515", "0.60710967", "0.5990295", "0.5990295", "0.5907919", "0.588078", "0.588078", "0.588078", "0.588078", "0.58729506", "0.58631283", "0.5842142", "0.5827441", "0.5820224", ...
0.66463697
0
Removes a native node itself using a given renderer. To remove the node we are looking up its parent from the native tree as not all platforms / browsers support the equivalent of node.remove().
function nativeRemoveNode(renderer, rNode, isHostElement) { var nativeParent = nativeParentNode(renderer, rNode); if (nativeParent) { nativeRemoveChild(renderer, nativeParent, rNode, isHostElement); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nativeRemoveNode(renderer, rNode, isHostElement) {\n const nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n}", "function nativeRemoveNode(renderer, rNode, isHostElement) {\n const nativePar...
[ "0.81210303", "0.81210303", "0.81210303", "0.7842903", "0.7842903", "0.7842903", "0.7842903", "0.7842903", "0.7842903", "0.7842903", "0.7392067", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", "0.7293919", ...
0.8267968
1
Appends nodes to a target projection place. Nodes to insert were previously redistribution and stored on a component host level.
function appendProjectedNodes(lView, tProjectionNode, selectorIndex, componentView) { var projectedView = componentView[PARENT]; var componentNode = componentView[T_HOST]; var nodeToProject = componentNode.projection[selectorIndex]; if (Array.isArray(nodeToProject)) { appendChild(nodeToProject, ...
{ "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.6280228", "0.6107432", "0.6107432", "0.60801584", "0.60640657", "0.59298354", "0.5534246", "0.5453318", "0.5449046", "0.54447985", "0.54447985", "0.54447985", "0.5426248", "0.5356749", "0.5354746", "0.5349582", "0.53429115", "0.52731806", "0.52731806", "0.5267289", "0.5266...
0.66066396
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 native = getNativeByTNode(projectedTNode, projectionView); appendChild(native, tProjectionNode, currentView); // the projected contents are processed while in the shadow view (which is the currentView) // th...
{ "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.7568187", "0.7568187", "0.7497008", "0.73263144", "0.7003125", "0.69482756", "0.584834", "0.57652014", "0.5678677", "0.5678677", "0.5678677", "0.5678677", "0.5678677", "0.5678677", "0.5678677", "0.5585687", "0.5541444", "0.55211085", "0.5508253", "0.5502527", "0.5502527", ...
0.76114506
0
`executeActionOnView` performs an operation on the view as specified in `action` (insert, detach, destroy) Inserting a view without projection or containers at top level is simple. Just iterate over the root nodes of the View, and for each node perform the `action`. Things get more complicated with containers and proje...
function executeActionOnView(renderer, action, lView, renderParent, beforeNode) { var tView = lView[TVIEW]; ngDevMode && assertNodeType(tView.node, 2 /* View */); var viewRootTNode = tView.node.child; while (viewRootTNode !== null) { executeActionOnNode(renderer, action, lView, viewRootTNode, re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {\n var componentLView = findComponentView(lView);\n var componentNode = componentLView[T_HOST];\n ngDevMode && assertDefined(componentNode.projection, 'Element nodes for which projection is processed mu...
[ "0.65183216", "0.62769455", "0.62769455", "0.62769455", "0.62769455", "0.62769455", "0.62769455", "0.62769455", "0.61883926", "0.6154366", "0.6146988", "0.6146988", "0.6027271", "0.59369177", "0.58896315", "0.57801354", "0.57801354", "0.56667286", "0.5658782", "0.5658782", "0...
0.65304065
0
`executeActionOnProjection` performs an operation on the projection specified by `action` (insert, detach, destroy). Inserting a projection requires us to locate the projected nodes from the parent component. The complication is that those nodes themselves could be reprojected from their parent component.
function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) { var componentLView = findComponentView(lView); var componentNode = componentLView[T_HOST]; ngDevMode && assertDefined(componentNode.projection, 'Element nodes for which projection is processed must have ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function applyProjectionRecursive(renderer, action, lView, tProjectionNode, parentRElement, beforeNode) {\n const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n const componentNode = componentLView[T_HOST];\n ngDevMode &&\n assertEqual(typeof tProjectionNode.projection, 'number', 'expecting ...
[ "0.627332", "0.627332", "0.627332", "0.627332", "0.627332", "0.627332", "0.627332", "0.62190616", "0.62190616", "0.62190616", "0.62190616", "0.62190616", "0.62190616", "0.62190616", "0.6176127", "0.61645216", "0.6149518", "0.61487", "0.61487", "0.61487", "0.61417156", "0.61...
0.7386585
0
`executeActionOnContainer` performs an operation on the container and its views as specified by `action` (insert, detach, destroy) Inserting a Container is complicated by the fact that the container may have Views which themselves have containers or projections.
function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) { ngDevMode && assertLContainer(lContainer); var anchor = lContainer[NATIVE]; // LContainer has its own before node. var native = unwrapRNode(lContainer); // An LContainer can be created dynamically on any node by ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeActionOnElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more inf...
[ "0.66249233", "0.6494069", "0.5925874", "0.5874431", "0.58589184", "0.58452964", "0.58452964", "0.58452964", "0.58452964", "0.58452964", "0.58452964", "0.58452964", "0.5836588", "0.5836588", "0.5836588", "0.56899077", "0.56899077", "0.56899077", "0.5583982", "0.558024", "0.54...
0.6973503
0
`executeActionOnElementContainerOrIcuContainer` performs an operation on the ngcontainer node and its child nodes as specified by the `action` (insert, detach, destroy).
function executeActionOnElementContainerOrIcuContainer(renderer, action, lView, tNode, renderParent, beforeNode) { var node = lView[tNode.index]; executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode); var childTNode = tNode.child; while (childTNode) { executeActionO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeActionOnElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more inf...
[ "0.74135834", "0.6754524", "0.6337826", "0.632267", "0.632267", "0.632267", "0.62933797", "0.6285745", "0.6285745", "0.6285745", "0.6285745", "0.6285745", "0.6285745", "0.6285745", "0.62844664", "0.62844664", "0.62844664", "0.5803909", "0.5803909", "0.5803909", "0.5803909", ...
0.7229529
1
Returns a Renderer2 (or throws when application was bootstrapped with Renderer3)
function getOrCreateRenderer2(view) { var renderer = view[RENDERER]; if (isProceduralRenderer(renderer)) { return renderer; } else { throw new Error('Cannot inject Renderer2 when the application uses Renderer3!'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrCreateRenderer2(view) {\n const renderer = view[RENDERER];\n if (isProceduralRenderer(renderer)) {\n return renderer;\n }\n else {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n}", "function getOrCreateRenderer2(view) {\n con...
[ "0.79120505", "0.79120505", "0.79120505", "0.7888844", "0.76366585", "0.76366585", "0.76366585", "0.76366585", "0.76366585", "0.76366585", "0.76366585", "0.7297926", "0.7297926", "0.71580607", "0.71580607", "0.71580607", "0.71580607", "0.70460194", "0.70460194", "0.6999419", ...
0.79702
1
Converts a `SingleProvider` into a factory function.
function providerToFactory(provider, ngModuleType, providers) { var factory = undefined; if (isTypeProvider(provider)) { return injectableDefOrInjectorDefFactory(resolveForwardRef(provider)); } else { if (isValueProvider(provider)) { factory = function () { return resolveForw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n var unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n }\n else...
[ "0.64517635", "0.6396808", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6390026", "0.6276457", "0.6252546", "0.6252546", "0.6040469", "0.6004029", "0.5959694", "0.59231347", "0.59231347", "0.59231347", "0.59231347"...
0.64040005
1
Creates an interpolation binding with 1 expression.
function interpolation1(lView, prefix, v0, suffix) { var different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0); storeBindingMetadata(lView, prefix, suffix); return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation1(lView, prefix, v0, suffix) {\n var different = bindingUpdated(lView, nextBindingIndex(), v0);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}", "function interpolation1(lView, prefix, v0, suffix) {\n const different = bindingUpdated(lView, nextBindingIn...
[ "0.61635697", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6090376", "0.6037269", "0.6037269", "0.5957508", "0.59295", "0.58626395", "0.5705611", "0.5622254", "0.5622254", "0.5622254", "0.5622254", "...
0.6229963
0
Creates an interpolation binding with 3 expressions.
function interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2); lView[BINDING_INDEX] += 3; // Only set static strings the first time (data will be null subsequent runs). var data = storeBi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.c)(lView, bindingIndex, v0, v1, v2);\n if (lView[interfaces_view.a] += 3, storeBindingMetadata(lView, prefix, suffix)) {\...
[ "0.6789804", "0.66350466", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.65781534", "0.64578855", "0.64578855", "0.62876976", "0.61676246", "0.61636186", "0.6147137", "0.6140385", "0.6120928", ...
0.6653525
1
Create an interpolation binding with 4 expressions.
function interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); lView[BINDING_INDEX] += 4; // Only set static strings the first time (data will be null subsequent runs). var da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.d)(lView, bindingIndex, v0, v1, v2, v3);\n if (lView[interfaces_view.a] += 4, storeBindingMetadata(lView, prefix,...
[ "0.66396254", "0.64917624", "0.6459133", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6427241", "0.6360374", "0.63223994", "0.63176644", "0.63051075", "0.6259303", "0.6258967", "0.6258967", "0.62200046...
0.6606081
1
Creates an interpolation binding with 5 expressions.
function interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated(lView, bindingIndex + 4, v4) || different; lView[BINDING_INDEX] += 5; // Only...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.d)(lView, bindingIndex, v0, v1, v2, v3);\n if (different = Object(bindings.a)(lView, bindingIndex + 4, v4...
[ "0.6599413", "0.65473676", "0.6489066", "0.6489066", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6409216", "0.6364528", "0.6292967", "0.62222385", "0.6206445", "0.6206445", "0.6206445", "0.6206445", ...
0.65979064
1
Creates an interpolation binding with 6 expressions.
function interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different; lView[BINDING_INDEX] += 6...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.d)(lView, bindingIndex, v0, v1, v2, v3);\n if (different = Object(bindings.b)(lView, bindingIndex...
[ "0.67921126", "0.670729", "0.6665864", "0.6635918", "0.65841895", "0.65841895", "0.65429795", "0.6542627", "0.6507769", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.65051883", "0.64715177", "0...
0.67810893
1
Creates an interpolation binding with 7 expressions.
function interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different; lView[BINDING...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.d)(lView, bindingIndex, v0, v1, v2, v3);\n if (different = Object(bindings.c)(lView, bind...
[ "0.6701837", "0.6639927", "0.6621919", "0.6621919", "0.657784", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.65290093", "0.6278124", "0.6239118", "0.616521", "0.611566", "0.60498446", "0.60339...
0.6765252
0
Creates an interpolation binding with 8 expressions.
function interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) { var bindingIndex = lView[BINDING_INDEX]; var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3); different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different; l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = Object(render3_state.m)(), bindingIndex = lView[interfaces_view.a], different = Object(bindings.d)(lView, bindingIndex, v0, v1, v2, v3);\n if (different = Object(bindings.d)(lVi...
[ "0.6649948", "0.65073746", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6448483", "0.6412103", "0.6412103", "0.6367378", "0.6363729", "0.6321221", "0.6172481", "0.6135973", "0.61250585", "0.61250585", ...
0.66451967
1
Sets the current style sanitizer function which will then be used within all followup prop and mapbased style binding instructions for the given element. Note that once styling has been applied to the element (i.e. once `select(n)` is executed or the hostBindings/template function exits) then the active `sanitizerFn` w...
function ɵɵstyleSanitizer(sanitizer) { setCurrentStyleSanitizer(sanitizer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵstylingApply() {\n var elementIndex = getSelectedIndex();\n var lView = getLView();\n var tNode = getTNode(elementIndex, lView);\n var renderer = getRenderer(tNode, lView);\n var native = getNativeByTNode(tNode, lView);\n var directiveIndex = getActiveDirectiveStylingIndex();\n var ...
[ "0.6577298", "0.6173602", "0.6016957", "0.6016957", "0.6016957", "0.6016957", "0.59907037", "0.5973942", "0.5973942", "0.5922845", "0.5922845", "0.5890808", "0.5639588", "0.5448351", "0.54439956", "0.5415605", "0.5331196", "0.5331196", "0.52603257", "0.5253562", "0.5237518", ...
0.7284034
0
Update a class binding on an element with the provided value. This instruction is meant to handle the `[class.foo]="exp"` case and, therefore, the class binding itself must already be allocated using `styling` within the creation block.
function ɵɵclassProp(className, value) { var lView = getLView(); // if a value is interpolated then it may render a `NO_CHANGE` value. // in this case we do not need to do anything, but the binding index // still needs to be incremented because all styling binding values // are stored inside of the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateClassProp(context, offset, addOrRemove, directiveRef) {\n _updateSingleStylingValue(context, offset, addOrRemove, true, directiveRef);\n}", "function updateClassProp(context, offset, addOrRemove, directiveRef) {\n _updateSingleStylingValue(context, offset, addOrRemove, true, directiveRef);\n...
[ "0.66481495", "0.66481495", "0.6622549", "0.66155106", "0.66049737", "0.66049737", "0.66049737", "0.66049737", "0.66049737", "0.65056366", "0.64549994", "0.64549994", "0.64497864", "0.64497864", "0.64497864", "0.64497864", "0.64497864", "0.6362511", "0.6223358", "0.6223358", ...
0.7027319
0
Shared function used to update a propbased styling binding for an element.
function _stylingProp(elementIndex, bindingIndex, prop, value, isClassBased, defer) { var lView = getLView(); var tNode = getTNode(elementIndex, lView); var native = getNativeByTNode(tNode, lView); var updated = false; if (value !== NO_CHANGE) { if (isClassBased) { updated = upda...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateStyle() {\n this._styling(this._elRef, this);\n }", "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValue(context, offset, input, false, directiveRef);\n}", "function updateStyleProp(context, offset, input, directiveRef) {\n _updateSingleStylingValu...
[ "0.7456751", "0.6900853", "0.6900853", "0.68854964", "0.67382497", "0.6665016", "0.6610334", "0.6609291", "0.6609291", "0.64194775", "0.64194775", "0.64194775", "0.64194775", "0.64194775", "0.64194775", "0.64194775", "0.62776387", "0.62776387", "0.62400544", "0.6205971", "0.6...
0.7825209
0
Shared function used to update a mapbased styling binding for an element. When this function is called it will activate support for `[style]` and `[class]` bindings in Angular.
function _stylingMap(elementIndex, context, bindingIndex, value, isClassBased, defer) { activateStylingMapFeature(); var lView = getLView(); var valueHasChanged = false; if (value !== NO_CHANGE) { var tNode = getTNode(elementIndex, lView); var native = getNativeByTNode(tNode, lView); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵstylingApply() {\n var elementIndex = getSelectedIndex();\n var lView = getLView();\n var tNode = getTNode(elementIndex, lView);\n var renderer = getRenderer(tNode, lView);\n var native = getNativeByTNode(tNode, lView);\n var directiveIndex = getActiveDirectiveStylingIndex();\n var ...
[ "0.6775131", "0.67385226", "0.66922975", "0.6652756", "0.6652756", "0.6583158", "0.6510021", "0.64239615", "0.64239615", "0.6385193", "0.6312503", "0.6312503", "0.62946725", "0.6249716", "0.6240906", "0.6240906", "0.621165", "0.6204947", "0.61924326", "0.6190514", "0.6161067"...
0.6883303
0
Writes a value to a directive's `style` or `class` input binding (if it has changed).
function updateDirectiveInputValue(context, lView, tNode, bindingIndex, newValue, isClassBased) { var oldValue = lView[bindingIndex]; if (oldValue !== newValue) { // even if the value has changed we may not want to emit it to the // directive input(s) in the event that it is falsy during the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeDirectStyle(renderer, element, newValue) {\n ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, 'style', newValue);\n }\n else {\n element.style.cssText = newValue;\n }\n ng...
[ "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.6062485", "0.5872776", "0.5872776", "0.5872776", "0.5872776", "0.5872776", "0.5872776", "0.5872776", "0.5872776", "0.5867972", "0.5779098", "...
0.61333466
0
Returns the appropriate directive input value for `style` or `class`. Earlier versions of Angular expect a binding value to be passed into directive code exactly as it is unless there is a static value present (in which case both values will be stringified and concatenated).
function normalizeStylingDirectiveInputValue(initialValue, bindingValue, isClassBased) { var value = bindingValue; // we only concat values if there is an initial value, otherwise we return the value as is. // Note that this is to satisfy backwards-compatibility in Angular. if (initialValue.length > 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateAttributeValue(className, value, updateFn) {\n var origValue;\n\n if (!needsInterpolation(value)) {\n switch (className.replace(SUFFIXES,\"\")) {\n case 'layout' :\n if (!findIn(value, LAYOUT_OPTIONS)) {\n value = LAYOUT_OPTIONS[0]; // 'row';\n ...
[ "0.5709284", "0.57019246", "0.56484216", "0.56484216", "0.56484216", "0.56484216", "0.56484216", "0.5572141", "0.5572141", "0.5572141", "0.5572141", "0.5572141", "0.55626523", "0.55626523", "0.55198044", "0.55192983", "0.54158276", "0.51045656", "0.5061763", "0.502698", "0.49...
0.66807157
0
Flushes all styling code to the element. This function is designed to be called from the template and hostBindings functions and may be called multiple times depending whether multiple sources of styling exist. If called multiple times, only the last call to `stlyingApply()` will render styling to the element.
function ɵɵstylingApply() { var elementIndex = getSelectedIndex(); var lView = getLView(); var tNode = getTNode(elementIndex, lView); var renderer = getRenderer(tNode, lView); var native = getNativeByTNode(tNode, lView); var directiveIndex = getActiveDirectiveStylingIndex(); var sanitizer = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function flushStyling(renderer, data, classesContext, stylesContext, element, directiveIndex, styleSanitizer) {\n ngDevMode && ngDevMode.flushStyling++;\n var persistState = classesContext ? stateIsPersisted(classesContext) :\n (stylesContext ? stateIsPersisted(stylesContext) : false);\n var allowF...
[ "0.6751952", "0.67472255", "0.6739905", "0.6739905", "0.6739905", "0.6739905", "0.6739905", "0.6668521", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6634213", "0.6114762", "0.5804703", "0.5696736", ...
0.681875
0
Temporary function that will update the max directive index value in both the classes and styles contexts present on the provided `tNode`. This code is only used because the `select(n)` code functionality is not yet 100% functional. The `select(n)` instruction cannot yet evaluate host bindings function code in sync wit...
function updateLastDirectiveIndex$1(tNode, directiveIndex) { updateLastDirectiveIndex(getClassesContext(tNode), directiveIndex); updateLastDirectiveIndex(getStylesContext(tNode), directiveIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateLastDirectiveIndex(context, lastDirectiveIndex) {\n if (lastDirectiveIndex === TEMPLATE_DIRECTIVE_INDEX) {\n var currentValue = context[2 /* LastDirectiveIndexPosition */];\n if (currentValue > TEMPLATE_DIRECTIVE_INDEX) {\n // This means that a directive or two contained ...
[ "0.54007614", "0.535727", "0.5198751", "0.5025129", "0.5018478", "0.50145054", "0.50145054", "0.49732408", "0.49732408", "0.49732408", "0.49732408", "0.49732408", "0.49732408", "0.49732408", "0.4888918", "0.48563313", "0.48563313", "0.48563313", "0.48563313", "0.48563313", "0...
0.5781605
0
Returns/instantiates a styling context from/to a `tNode` instance.
function getContext(tNode, isClassBased) { var context = isClassBased ? tNode.classes : tNode.styles; if (!isStylingContext(context)) { context = allocTStylingContext(context); if (ngDevMode) { attachStylingDebugObject(context); } if (isClassBased) { tNode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNodeStyle(nodeStyle) {\n var style, lableStyle;\n style = 'fill:' + nodeStyle['background-color'] + ';' + 'stroke-width:' + nodeStyle['stroke-width'] + 'px' + ';' + 'stroke:' + nodeStyle['stroke'];\n lableStyle = 'color:' + nodeStyle['color'];\n ...
[ "0.5766046", "0.55987746", "0.55987746", "0.5485004", "0.5265028", "0.52586293", "0.5252817", "0.5194615", "0.5168694", "0.50925076", "0.5077194", "0.50757116", "0.5059984", "0.50582796", "0.50520617", "0.50343645", "0.50336003", "0.50336003", "0.5017935", "0.4972544", "0.497...
0.71012956
0
Whether or not a style/class binding update should be applied later. This function will decide whether a binding should be applied immediately or later (just before the styles/classes are flushed to the element). The reason why this feature exists is because of super/sub directive inheritance. Angular will evaluate hos...
function deferStylingUpdate() { return getActiveDirectiveSuperClassHeight() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n ngDevMode && assertFirstUpdatePass(tView);\n var tData = tView.data;\n if (tData[bindingIndex + 1] === null) {\n // The above check is necessary because we don't clear first update pass until first successful\n ...
[ "0.64181364", "0.63649184", "0.63649184", "0.63649184", "0.62857455", "0.62857455", "0.62857455", "0.62857455", "0.62857455", "0.62857455", "0.62857455", "0.5881683", "0.55577815", "0.5469232", "0.53778017", "0.53540164", "0.5350655", "0.5350655", "0.5350655", "0.53479475", "...
0.73204255
0
Checks a given node against matching projection slots and returns the determined slot index. Returns "null" if no slot matched the given node. This function takes into account the parsed ngProjectAs selector from the node's attributes. If present, it will check whether the ngProjectAs selector matches any of the projec...
function matchingProjectionSlotIndex(tNode, projectionSlots) { var wildcardNgContentIndex = null; var ngProjectAsAttrVal = getProjectAsAttrValue(tNode); for (var i = 0; i < projectionSlots.length; i++) { var slotValue = projectionSlots[i]; // The last wildcard projection slot should match al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function matchingSelectorIndex(tNode, selectors, textSelectors) {\n for (var ngProjectAsAttrVal = function(tNode) {\n var nodeAttrs = tNode.attrs;\n if (null != nodeAttrs) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(projection.a);\n ...
[ "0.58545095", "0.57333416", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5355804", "0.5348579", "0.5348579", "0.527046", "0.527046", "0.527046", "0.52585965", "0.52585965", "0.5167044", "0.49873903", ...
0.74461657
0
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 /* Provi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInjectionTokens(element) {\n const context = loadLContext(element, false);\n if (context === null)\n return [];\n const lView = context.lView;\n const tView = lView[TVIEW];\n const tNode = tView.data[context.nodeIndex];\n const providerTokens = [];\n const startIndex = tNode...
[ "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466854", "0.6466547", "0.64494175", "0.64494175", "0.6195783", "0.57884604", "0.5321933", "0.5321933", "0.5176039", "0.5176039", "0.506833", "0.5065975", "0.49958557", "0.49947864",...
0.64789855
1
Retrieves the rendered text for a given component. This function retrieves the host element of a component and and then returns the `textContent` for that element. This implies that the text returned will include reprojected content of the component as well.
function getRenderedText(component) { var hostElement = getHostElement(component); return hostElement.textContent || ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRenderedText(component) {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}", "function getRenderedText(component) {\n const hostElement = getHostElement(component);\n return hostElement.textContent || '';\n}", "function getRenderedText(componen...
[ "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.8657395", "0.7852358", "0.7852358", "0.7852358", "0.7852358", "0.7852358", "0.78340554", "0.78340554", "0.78340554", "0.78340554", "0.78340554", "0.78340554...
0.87055475
1
Returns the index of the current case of an ICU expression depending on the main binding value
function getCaseIndex(icuExpression, bindingValue) { var index = icuExpression.cases.indexOf(bindingValue); if (index === -1) { switch (icuExpression.type) { case 1 /* plural */: { var resolvedCase = getPluralCase(bindingValue, getLocaleId()); index = icuExpre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCaseIndex(icuExpression, bindingValue) {\n let index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case 1 /* plural */: {\n const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n ind...
[ "0.83060014", "0.83060014", "0.83060014", "0.8283037", "0.8283037", "0.8283037", "0.8283037", "0.8283037", "0.8283037", "0.8283037", "0.82602274", "0.82602274", "0.6224682", "0.6224682", "0.6224682", "0.6224682", "0.6224682", "0.6224682", "0.6224682", "0.5657031", "0.5645095"...
0.83070374
1
Set the configuration for `i18nLocalize`.
function i18nConfigureLocalize(options) { if (options === void 0) { options = { translations: {} }; } TRANSLATIONS = options.translations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_i18n()\n {\n var i18n = {};\n\n i18n[I18N.LANG.EN] = {};\n i18n[I18N.LANG.EN][MODULE_NAME + '_short_desc'] = 'Show the spoilers without mouse hover';\n i18n[I18N.LANG.EN][MODULE_NAME + '_full_desc'] = 'Show the spoilers content without hovering with your mouse.';\n\n ...
[ "0.622552", "0.6175686", "0.6143536", "0.6076264", "0.60588306", "0.5955937", "0.59517616", "0.58626103", "0.57977235", "0.5785573", "0.57466394", "0.5709547", "0.570325", "0.570325", "0.5658841", "0.56283796", "0.56283796", "0.56283796", "0.56283796", "0.56219083", "0.561122...
0.7731113
0
Creates new QueryList for a static view query.
function ɵɵstaticViewQuery(predicate, descend, read) { viewQueryInternal(getLView(), predicate, descend, read, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function QueryViewFactory() {\n this.createModelQueryView = function(dataTypeModel, specializedFieldsObj) {\n switch(dataTypeModel) {\n case DataTypeClasses.SUBJECT:\n return new Query.Views.Subject({ model: new Query.SubjectModel(specializedFieldsObj) });\n ...
[ "0.6221391", "0.5827975", "0.5827975", "0.5827154", "0.5827154", "0.5827154", "0.5827154", "0.5827154", "0.5654234", "0.56423664", "0.5641208", "0.5630955", "0.5584386", "0.5584386", "0.5584386", "0.5584386", "0.5584386", "0.5584386", "0.5584386", "0.5584386", "0.5584386", ...
0.5950495
1
Loads a QueryList corresponding to the current view query.
function ɵɵloadViewQuery() { return loadQueryInternal(getLView(), getCurrentQueryIndex()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}", "function ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}", "function ɵɵloadQuery() {\n return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}", "function ɵɵload...
[ "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.65703297", "0.6227008", "0.60845655", "0.6084096", "0.6084096", "0.6084096", "0.6084096", "0.6084096", "0.6084096", "0.60692185", "0....
0.68845063
0
Loads a QueryList corresponding to the current content query.
function ɵɵloadContentQuery() { return loadQueryInternal(getLView(), getCurrentQueryIndex()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerContentQuery(queryList) {\n var savedContentQueriesLength = (viewData[CONTENT_QUERIES] || (viewData[CONTENT_QUERIES] = [])).push(queryList);\n if (firstTemplatePass) {\n var currentDirectiveIndex = directives.length - 1;\n var tViewContentQueries = tView.contentQueries || (tVie...
[ "0.63543564", "0.6231224", "0.6231224", "0.6085347", "0.5897628", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5862505", "0.5685066", "0.5685066", "0.56684625", "0.56684625", "0.561191", ...
0.6919125
0
Some declared components may be compiled asynchronously, and thus may not have their ngComponentDef set yet. If this is the case, then a reference to the module is written into the `ngSelectorScope` property of the declared type.
function setScopeOnDeclaredComponents(moduleType, ngModule) { var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4); var transitiveScopes = transitiveScopesFor(moduleType); declarations.forEach(function (declaration) { if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) { // A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setScopeOnDeclaredComponents(moduleType, ngModule) {\n var declarations = flatten$1(ngModule.declarations || EMPTY_ARRAY$2);\n var transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(function (declaration) {\n if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n ...
[ "0.64620924", "0.64620924", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53955257", "0.53916764", "0.53916764", "0.53916764", "0.52306825", "0.52306825", "0.52306825", "0.52306825"...
0.64726424
0
Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.
function addBaseDefToUndecoratedParents(type) { var objPrototype = Object.prototype; var parent = Object.getPrototypeOf(type); // Go up the prototype until we hit `Object`. while (parent && parent !== objPrototype) { // Since inheritance works if the class was annotated already, we only need to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDirectiveDefToUndecoratedParents(type) {\n var objPrototype = Object.prototype;\n var parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class wa...
[ "0.6460729", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.6412753", "0.5914295", "0.58971965", "0.5692217", "0.56652004", "0.5464225", "0.5464225", "0.5426606", "0.5426606", "0.54252034", "0.53492874",...
0.7525873
0
Extracts the metadata necessary to construct an `ngBaseDef` from a class.
function extractBaseDefMetadata(type) { var propMetadata = getReflect().ownPropMetadata(type); var viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery); var queries = extractQueriesMetadata(type, propMetadata, isContentQuery); var inputs; var outputs; // We only need to know whe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function factory(){var values=props?props.apply(void 0,arguments):{};return Object.assign({ngMetadataName:name},values)}", "function createInjectorDefinitionMap(meta) {\n const definitionMap = new DefinitionMap();\n definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));\n definition...
[ "0.5841271", "0.52446264", "0.52375185", "0.52375185", "0.52209395", "0.51666594", "0.514284", "0.5138163", "0.5090147", "0.5084574", "0.49780405", "0.49780405", "0.4964797", "0.4963434", "0.49622193", "0.49344078", "0.49344078", "0.49276355", "0.49087852", "0.48793018", "0.4...
0.6973283
0
Iterates through the property bindings for a given node and generates a map of property names to values. This map only contains property bindings defined in templates, not in host bindings.
function collectPropertyBindings(tNode, lView, tData) { var properties = {}; var bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData); while (bindingIndex < tNode.propertyMetadataEndIndex) { var value = void 0; var propMetadata = tData[bindingIndex]; while (!i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collectPropertyBindings(properties, tNode, lView, tData) {\n var bindingIndexes = tNode.propertyBindings;\n if (bindingIndexes !== null) {\n for (var i = 0; i < bindingIndexes.length; i++) {\n var bindingIndex = bindingIndexes[i];\n var propMetadata = tData[bindingIndex]...
[ "0.6108572", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.6052241", "0.57081604", "0.56643784", "0.55936384", "0.5528314", "0.5521628", "0.5521628", "0.5509296", "0.5509296", "0.5466098", ...
0.6502916
0
Get the sighash (the bytes4 selector) used by Solidity to identify a function
getSighash(functionFragment) { if (typeof (functionFragment) === "string") { functionFragment = this.getFunction(functionFragment); } return Object(_ethersproject_properties__WEBPACK_IMPORTED_MODULE_5__["getStatic"])(this.constructor, "getSighash")(functionFragment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getSighash(functionFragment) {\n if (typeof functionFragment === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n\n return (0, _properties.getStatic)(this.constructor, \"getSighash\")(functionFragment);\n }", "getSighash(functionFragment) {\n if (typeof (function...
[ "0.71420723", "0.69456476", "0.67096734", "0.6368979", "0.63636166", "0.63578045", "0.588448", "0.57107335", "0.54905826", "0.54800934", "0.5460976", "0.538781", "0.5349065", "0.5315667", "0.52655584", "0.5254356", "0.5242698", "0.5223529", "0.52145535", "0.5214409", "0.52143...
0.70525795
1
Get the topic (the bytes32 hash) used by Solidity to identify an event
getEventTopic(eventFragment) { if (typeof (eventFragment) === "string") { eventFragment = this.getEvent(eventFragment); } return Object(_ethersproject_properties__WEBPACK_IMPORTED_MODULE_5__["getStatic"])(this.constructor, "getEventTopic")(eventFragment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getEventTopic(eventFragment) {\n if (typeof eventFragment === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n\n return (0, _properties.getStatic)(this.constructor, \"getEventTopic\")(eventFragment);\n }", "getEventTopic(eventFragment) {\n if (typeof (eventFragment) === \...
[ "0.7273014", "0.71170735", "0.68714714", "0.62298656", "0.62298656", "0.60725915", "0.6036928", "0.5950412", "0.5935462", "0.5879075", "0.57555765", "0.57251734", "0.5601101", "0.55926", "0.55926", "0.5571812", "0.5571812", "0.5571812", "0.551765", "0.54662603", "0.54403746",...
0.7170817
1
Decode the data for a function call (e.g. tx.data)
decodeFunctionData(functionFragment, data) { if (typeof (functionFragment) === "string") { functionFragment = this.getFunction(functionFragment); } const bytes = Object(_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__["arrayify"])(data); if (Object(_ethersproject_bytes__WEBP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "decodeFunctionData(functionFragment, data) {\n if (typeof (functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n const bytes = (0,_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_7__.arrayify)(data);\n if ((0,_ethersproject_bytes__WEB...
[ "0.70876306", "0.7059824", "0.6873519", "0.6867855", "0.68472403", "0.61524147", "0.5994448", "0.5963619", "0.58978796", "0.5824258", "0.5809303", "0.57782483", "0.5750786", "0.5715291", "0.5702375", "0.56432486", "0.56157976", "0.5611776", "0.55887806", "0.55568975", "0.5556...
0.7085135
1
Given a transaction, find the matching function fragment (if any) and determine all its properties and call parameters
parseTransaction(tx) { let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase()); if (!fragment) { return null; } return new TransactionDescription({ args: this._abiCoder.decode(fragment.inputs, "0x" + tx.data.substring(10)), functionFrag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "parseTransaction(tx) {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n\n if (!fragment) {\n return null;\n }\n\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\...
[ "0.66474396", "0.6463443", "0.5470519", "0.54566306", "0.5446784", "0.53472126", "0.5308123", "0.52992433", "0.52801245", "0.52389145", "0.5197317", "0.51608527", "0.51144063", "0.5070832", "0.5060853", "0.5049989", "0.5043592", "0.500877", "0.4995485", "0.49280092", "0.49186...
0.64789397
1
Sanitizes given actions with given function.
function sanitizeActions(actionSanitizer, actions) { return Object.keys(actions).reduce(function (sanitizedActions, actionIdx) { var idx = Number(actionIdx); sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx); return sanitizedActions; }, {}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeAction(actionSanitizer, action, actionIdx) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, action, { action: actionSanitizer(action.action, actionIdx) });\n}", "function apply_action(post,data,action,filter) {\n if (\"class\"==action.action) {\n filter_trace(...
[ "0.67035514", "0.55899894", "0.5433356", "0.5389125", "0.53664535", "0.5313834", "0.5304041", "0.52396953", "0.52353257", "0.5226757", "0.519709", "0.51928556", "0.5127839", "0.51241666", "0.51241666", "0.5105976", "0.5105976", "0.5093099", "0.50202334", "0.50117075", "0.4956...
0.7255515
0
Sanitizes given action with given function.
function sanitizeAction(actionSanitizer, action, actionIdx) { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, action, { action: actionSanitizer(action.action, actionIdx) }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeActions(actionSanitizer, actions) {\n return Object.keys(actions).reduce(function (sanitizedActions, actionIdx) {\n var idx = Number(actionIdx);\n sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx);\n return sanitizedActions;\n }, {});\n}", "reg...
[ "0.6459973", "0.5864575", "0.58484155", "0.567354", "0.5670386", "0.55764174", "0.53732586", "0.53732586", "0.53732586", "0.53732586", "0.53285056", "0.5317812", "0.5291569", "0.52776015", "0.52776015", "0.524241", "0.5206497", "0.5201667", "0.5170972", "0.5164509", "0.516371...
0.7267254
0
Sanitizes given states with given function.
function sanitizeStates(stateSanitizer, states) { return states.map(function (computedState, idx) { return ({ state: sanitizeState(stateSanitizer, computedState.state, idx), error: computedState.error, }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeState(stateSanitizer, state, stateIdx) {\n return stateSanitizer(state, stateIdx);\n}", "function validateStateFilters(state) {\n\t var compacted = _.compact(state.filters);\n\t if (state.filters.length !== compacted.length) {\n\t state.filters = compacted;\n\t state.r...
[ "0.70398456", "0.57638794", "0.5723624", "0.5568681", "0.52824646", "0.52824646", "0.5274303", "0.5274303", "0.5274303", "0.5274303", "0.5253475", "0.51301396", "0.51026934", "0.50747275", "0.5049245", "0.5030962", "0.4984455", "0.4983766", "0.49014464", "0.488418", "0.487804...
0.68674487
1
Sanitizes given state with given function.
function sanitizeState(stateSanitizer, state, stateIdx) { return stateSanitizer(state, stateIdx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitizeStates(stateSanitizer, states) {\n return states.map(function (computedState, idx) { return ({\n state: sanitizeState(stateSanitizer, computedState.state, idx),\n error: computedState.error,\n }); });\n}", "function normalizedFunctionString(fn) {\n return fn.toString().rep...
[ "0.6096138", "0.5636822", "0.5533512", "0.5318151", "0.5316288", "0.5300211", "0.5300211", "0.5267417", "0.5267417", "0.5267417", "0.5267417", "0.5139536", "0.5083637", "0.5067608", "0.504732", "0.50257206", "0.50207096", "0.5000408", "0.49548525", "0.4943484", "0.49315843", ...
0.7693587
0
Read the config and tell if actions should be filtered
function shouldFilterActions(config) { return config.predicate || config.actionsSafelist || config.actionsBlocklist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shouldFilter(e,t){var n=getModuleSettings(e);if(window.Plugins&&!window.PluginsAreDisabled){var y=Plugins.invoke(\"shouldFilter\",e,t);if(y&&0<y.length){var a=!0,r=!1,d=void 0;try{for(var l,o,c=y[Symbol.iterator]();!(a=(l=c.next()).done);a=!0)if(o=l.value,\"boolean\"==typeof o)return o;/* Other values: co...
[ "0.568956", "0.55903065", "0.5430886", "0.5390805", "0.53481406", "0.53469914", "0.53428173", "0.53029275", "0.5302002", "0.5275647", "0.52611566", "0.52459866", "0.52426803", "0.52192414", "0.52192414", "0.52192414", "0.52192414", "0.52192414", "0.52192414", "0.52192414", "0...
0.7385993
0
Return a full filtered lifted state
function filterLiftedState(liftedState, predicate, safelist, blocklist) { var filteredStagedActionIds = []; var filteredActionsById = {}; var filteredComputedStates = []; liftedState.stagedActionIds.forEach(function (id, idx) { var liftedAction = liftedState.actionsById[id]; if (!liftedA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unliftState(liftedState) {\n\t var computedStates = liftedState.computedStates;\n\t var currentStateIndex = liftedState.currentStateIndex;\n\t var state = computedStates[currentStateIndex].state;\n\t\n\t return state;\n\t}", "function unliftState(liftedState) {\n\t var computedStates = liftedState....
[ "0.63409346", "0.63409346", "0.62977743", "0.62977743", "0.62977743", "0.62525946", "0.6122416", "0.60969985", "0.6078835", "0.6078835", "0.5920998", "0.58621705", "0.58417785", "0.5831687", "0.5809023", "0.5783205", "0.57786113", "0.5761854", "0.57080084", "0.5702673", "0.56...
0.7164878
0
NB: defaultPort only knows http and https. Returns undefined otherwise.
function defaultPort (protocol) { return { 'http:': 80, 'https:': 443 }[protocol] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function defaultPort(protocol) {\n return {'http:':80, 'https:':443}[protocol];\n }", "function defaultPort(protocol) {\n return {'http:':80, 'https:':443}[protocol];\n }", "function defaultPort(protocol) {\n return {'http:':80, 'https:':443}[protocol];\n }", "function defaultPort(protoc...
[ "0.7992295", "0.7992295", "0.7992295", "0.7992295", "0.7992295", "0.7992295", "0.7992295", "0.7992295", "0.7742603", "0.76949674", "0.7250599", "0.71250325", "0.7110865", "0.7110865", "0.7110865", "0.7110865", "0.7110865", "0.7110865", "0.7110865", "0.7110865", "0.7110865", ...
0.80202776
1
based on gist XmlHttpRequest's getAllResponseHeaders() method returns a string of response headers according to the format described here: This method parses that string into a userfriendly key/value pair object.
function parseResponseHeaders (headerStr) { var headers = {} headerStr && headerStr.split('\u000d\u000a') .forEach(function (headerPair) { // Can't use split() here because it does the wrong thing // if the header value has the string ": " in it. var index = headerPair.indexOf('\u003a\u0020')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseResponseHeaders(headerStr) {\n var headers = {};\n \n headerStr && headerStr.split('\\u000d\\u000a')\n .forEach(function(headerPair){\n \n // Can't use split() here because it does the wrong thing\n // if the header value has the string \": \" in it.\n var index =...
[ "0.7710993", "0.7710993", "0.7710993", "0.7710993", "0.7710993", "0.7710993", "0.7710993", "0.7710993", "0.7114492", "0.7007782", "0.6920744", "0.6381305", "0.6364154", "0.63526225", "0.6349596", "0.63245666", "0.6279333", "0.6272601", "0.6231945", "0.6213273", "0.61173874", ...
0.77417314
1
When collide with voldemort's spell, turn voldemort countered to true so Voldemort's spell's properties resets Voldemort also vulnerable when he is countered
collideVspell(voldemort) { let d = dist(this.x, this.y, voldemort.x2, voldemort.y2) if (d < 50) { // flash effect image(this.image, width / 2, height / 2, 1800, 1800); voldemort.countered = true; this.hitspell = true; spellcounteredSFX.play(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collideVoldemort(voldemort, timer) {\n let d = dist(this.x, this.y, voldemort.x, voldemort.y)\n if (d < 35) {\n displayText(`-` + this.damage, 40, 5 * width / 6, height / 6, 188, 77, 114);\n if (timer.lostwand === true) {\n timer.lostwand = false\n } else {\n timer.lostwand = tru...
[ "0.701506", "0.64381903", "0.6301622", "0.6118931", "0.60936797", "0.60521036", "0.6041494", "0.6031215", "0.5999738", "0.5997572", "0.594608", "0.59423065", "0.58868146", "0.58716226", "0.5841901", "0.5839407", "0.5825977", "0.5809737", "0.58092326", "0.58043915", "0.5803489...
0.7169407
0
When spell collides with Voldemort, decreases Voldemort's HP by the spell's damage amount. Turn hitVoldemort to true to remove the spell from the array in the main script. Turn expelliarmushurt to true to display Voldemort being struck by the spell in Voldemort class. Expelliarmus ability pause the timer (since Voldy n...
collideVoldemort(voldemort, timer) { let d = dist(this.x, this.y, voldemort.x, voldemort.y) if (d < 35) { displayText(`-` + this.damage, 40, 5 * width / 6, height / 6, 188, 77, 114); if (timer.lostwand === true) { timer.lostwand = false } else { timer.lostwand = true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "collideVspell(voldemort) {\n let d = dist(this.x, this.y, voldemort.x2, voldemort.y2)\n if (d < 50) {\n // flash effect\n image(this.image, width / 2, height / 2, 1800, 1800);\n voldemort.countered = true;\n this.hitspell = true;\n spellcounteredSFX.play();\n }\n }", "function ...
[ "0.68184024", "0.6008141", "0.5828284", "0.5796617", "0.577607", "0.5769524", "0.5763841", "0.5758732", "0.57561505", "0.5739496", "0.5718681", "0.5698651", "0.5696847", "0.5647398", "0.5612876", "0.5604024", "0.55915457", "0.55862683", "0.5582438", "0.5581931", "0.5555528", ...
0.7335162
0
Display submenus for currently selected menu option and hide the rest
function submenuitems(selectedValue) { var i, controls; controls = document.getElementsByClassName("sub-menu"); for (i = 0; i < controls.length; i++) { controls[i].style.display = "none"; } controls = document.getElementsByClassName(selectedValue); for (i = 0; i < controls.l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openSubMenu() {\n\t\t$(this).find('ul').removeClass('hidden');\n\t}", "function hideSubmenu( obj ){ obj.css( 'opacity', '0' ).css( 'display', 'none' ); }", "function show(){$('div.submenu').removeClass('hidden')}", "function HideMenus() {\n HideMenuSubs();\n HideMenusAuds();\n }", ...
[ "0.69605255", "0.69407827", "0.6844623", "0.68421453", "0.6825955", "0.68073195", "0.66618425", "0.66615343", "0.6542971", "0.64925563", "0.6472841", "0.6467938", "0.64611274", "0.6444776", "0.640641", "0.63625497", "0.63245535", "0.6267982", "0.62647635", "0.62336546", "0.62...
0.6952229
1
Returns unique identifier for requested list of glyphs.
function getFontId(config) { var hash = crypto.createHash('md5'); hash.update('fontello' + builderVersion); hash.update(JSON.stringify(config)); return hash.digest('hex'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getNewUniqueID(usedIDs = Object.keys(this.pathLookup)) {\n\n const possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n while (true) {\n let newID = \"\";\n for (let i = 0; i < 7; i++) {\n newID += possible.charAt(Math.floor(Math.random() * possible.length));\n ...
[ "0.5536891", "0.5372307", "0.5337136", "0.5333437", "0.5303551", "0.52420026", "0.5239263", "0.5220474", "0.52067673", "0.5178964", "0.517879", "0.5172134", "0.5165309", "0.51625884", "0.5151263", "0.5150726", "0.5150726", "0.51435715", "0.51424253", "0.5133214", "0.5104415",...
0.54482543
1
(internal) Push new font building task into queue and return `fontId`. Make sure, that task is not duplicated. If we can return result immediately do it.
function createTask(clientConfig, afterRegistered, afterComplete) { var builderConfig = fontConfig(clientConfig) , fontId = getFontId(clientConfig) , outputName = getOutputName(fontId) , outputFile = path.join(builderOutputDir, outputName) , taskInfo = null; if (!builderConfig || ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pushFont(clientConfig, callback) {\n createTask(clientConfig, callback, null);\n}", "async function build () {\n try {\n const result: ?(BuildResult | string) = await builder.build(config)\n if (result && typeof result === 'object') {\n const { error, success } = result\n if (error) {\...
[ "0.57301474", "0.56433123", "0.55985373", "0.53140604", "0.52003056", "0.51902354", "0.4841784", "0.4841784", "0.4841784", "0.4841784", "0.4841784", "0.4841784", "0.4841784", "0.4841784", "0.48199823", "0.47959384", "0.47900033", "0.4785594", "0.4785594", "0.4785594", "0.4770...
0.6215886
0
Push new build task (config) to queue and return `fontId` immediately (via callback)
function pushFont(clientConfig, callback) { createTask(clientConfig, callback, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildFont(clientConfig, callback) {\n createTask(clientConfig, null, callback);\n}", "function createTask(clientConfig, afterRegistered, afterComplete) {\n var builderConfig = fontConfig(clientConfig)\n , fontId = getFontId(clientConfig)\n , outputName = getOutputName(fontId)\n , ou...
[ "0.6348751", "0.626394", "0.6030341", "0.5675379", "0.5247431", "0.5005375", "0.49646807", "0.49341953", "0.48986742", "0.48545906", "0.4835393", "0.4828227", "0.47491693", "0.4730617", "0.46669528", "0.46426666", "0.45431653", "0.45388997", "0.44928986", "0.4488289", "0.4469...
0.6745713
0
function downloads and parses all legislator data from sunlight /legislators passes array of pre legislator objects to callback
function fetchLegislators(cb){ request.get('http://congress.api.sunlightfoundation.com/legislators?per_page=all&in_office=true&apikey=d5ac2a8391d94345b8e93d5c69dd8739', function(err, res, body){ if (err){ console.log("Error retrieving Legislators from sunlight: " + err.message); throw err;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLegislator(req, res) {\n // variables defined in the Swagger document can be referenced using req.swagger.params.{parameter_name}\n var lat = req.swagger.params.lat.value;\n var long = req.swagger.params.long.value;\n\n var locQuery = {\n latitude: lat,\n longitude: long\n };\n var APP_CONFIG =...
[ "0.6055237", "0.6006333", "0.58254224", "0.5562929", "0.5286856", "0.5249377", "0.5241249", "0.5172821", "0.5169099", "0.51605874", "0.5074259", "0.5072905", "0.50519973", "0.5039688", "0.5036475", "0.5033129", "0.50308084", "0.49334753", "0.49285957", "0.49000213", "0.489732...
0.72948223
0