/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('autocomplete-sources', function (Y, NAME) { /** Mixes support for JSONP and YQL result sources into AutoCompleteBase. @module autocomplete @submodule autocomplete-sources **/ var ACBase = Y.AutoCompleteBase, Lang = Y.Lang, _SOURCE_SUCCESS = '_sourceSuccess', MAX_RESULTS = 'maxResults', REQUEST_TEMPLATE = 'requestTemplate', RESULT_LIST_LOCATOR = 'resultListLocator'; // Add prototype properties and methods to AutoCompleteBase. Y.mix(ACBase.prototype, { /** Regular expression used to determine whether a String source is a YQL query. @property _YQL_SOURCE_REGEX @type RegExp @protected @for AutoCompleteBase **/ _YQL_SOURCE_REGEX: /^(?:select|set|use)\s+/i, /** Runs before AutoCompleteBase's `_createObjectSource()` method and augments it to support additional object-based source types. @method _beforeCreateObjectSource @param {String} source @protected @for AutoCompleteBase **/ _beforeCreateObjectSource: function (source) { // If the object is a ` node as a source. @method _createSelectSource @param {Node} source YUI Node instance wrapping a `