"use strict"; /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ Object.defineProperty(exports, "__esModule", { value: true }); exports.findOutputsOnElementWithAttr = exports.findOutputsOnElementWithTag = exports.findInputsOnElementWithAttr = exports.findInputsOnElementWithTag = void 0; const elements_1 = require("./elements"); /** Finds the specified Angular @Input in the given elements with tag name. */ function findInputsOnElementWithTag(html, inputName, tagNames) { return [ // Inputs can be also used without brackets (e.g. ``) ...(0, elements_1.findAttributeOnElementWithTag)(html, inputName, tagNames), // Add one column to the mapped offset because the first bracket for the @Input // is part of the attribute and therefore also part of the offset. We only want to return // the offset for the inner name of the bracketed input. ...(0, elements_1.findAttributeOnElementWithTag)(html, `[${inputName}]`, tagNames).map(offset => offset + 1), ]; } exports.findInputsOnElementWithTag = findInputsOnElementWithTag; /** Finds the specified Angular @Input in elements that have one of the specified attributes. */ function findInputsOnElementWithAttr(html, inputName, attrs) { return [ // Inputs can be also used without brackets (e.g. `