ab038b77c62999055e1bb55cc18637a065c63a90 |
|
13-Feb-2012 |
Ryan Grove <ryan@wonko.com> |
Specify default attr values to avoid breaking reset(). |
e60611cfb2352e9d36e2591d5ad2d229c445a169 |
|
10-Feb-2012 |
Ryan Grove <ryan@wonko.com> |
Use new 3.5.0 Base features in AutoCompleteBase's init/destroy lifecycle
In addition to taking advantage of chained initializers and destructors,
static properties from AutoCompleteBase are now properly
mixed/aggregated into classes that use it. |
46e44a0982cea3a5d783c1446f22e09eebcf8db9 |
|
09-Feb-2012 |
Ryan Grove <ryan@wonko.com> |
Reformat autocomplete's API docs. |
4e21d9ace0f1e852eddbcea14f5becdce1d8dba9 |
|
24-Jan-2012 |
Ryan Grove <ryan@wonko.com> |
Changing `value` attr via API updates `query` and can fire `clear`.
Changing the value of the `value` attribute programmatically will now
also update the value of the `query` attribute and will fire a `clear`
event when the value is cleared (thus clearing results), but still
will not fire a `query` event. Use the `sendRequest()` method to
trigger a query programmatically. |
e58e329a62c99b6967a791762117392e5af609de |
|
18-Jan-2012 |
Ryan Grove <ryan@wonko.com> |
Add an `enableCache` attribute to AutoComplete.
Set this to false if you want to disable caching in built-in result
sources. |
c329316f92fdab3b92802fb2182e5b5f543d295e |
|
12-Aug-2011 |
Dav Glass <davglass@gmail.com> |
Fixes #2530913 - Minor doc tweaks
Added @main tags to modules that YUIDoc
failed to find the proper main module
description. No build was done, only modified
source files. |
61f745880910a23ddd00c0c637ec5c2d086b2020 |
|
23-Jul-2011 |
Ryan Grove <ryan@wonko.com> |
Fix brokenness with empty queries. |
6c0c7f066697e444ae5506e61ba0e771c58739fc |
|
23-Jul-2011 |
Ryan Grove <ryan@wonko.com> |
Allow sendRequest() when query is null. |
4397b5a5bcaf8a291905306dbcc7f2b0fd2e60ee |
|
22-Jul-2011 |
Ryan Grove <ryan@wonko.com> |
`this` should be the AutoComplete instance in requestTemplate functions.
Includes a bonus fix for an issue that caused the requestTemplate
function to be called twice instead of just once for XHR requests. |
dd1438ea909a39d6bb203a40df018e2da8028239 |
|
21-Jul-2011 |
Ryan Grove <ryan@wonko.com> |
API doc improvements. |
c8f9282d0b684a40b32109c3de35b7fa6c534699 |
|
20-Jul-2011 |
Ryan Grove <ryan@wonko.com> |
Set `this` to the AC instance in locators, filters, formatters, and highlighters. |
ef1ceb334534dfc86c8e2544fa13702e59f67390 |
|
09-Apr-2011 |
Ryan Grove <ryan@wonko.com> |
<select> nodes may now be used as result sources. |
5b968bdd0754c385548517248b8d1e1f51c336ec |
|
08-Apr-2011 |
Ryan Grove <ryan@wonko.com> |
Use a simple Y.mix() for autocomplete-sources instead of Y.Base.mix().
Y.Base.mix() was working, but was actually being used incorrectly in
this case, since the receiver (AutoCompleteBase) doesn't actually extend
Y.Base. It only worked because autocomplete-sources had an empty
constructor, so there were no side effects from the fact that the
constructor was never executed. |
86f5107dfca4cd1edfbb091737aaee46da52b85c |
|
26-Mar-2011 |
Ryan Grove <ryan@wonko.com> |
Make this._acBaseEvents an EventHandle to make detaching easier. |
33564f5e9c3bc7de4a50b9e4bcf8287ba2dba8fb |
|
25-Mar-2011 |
Ryan Grove <ryan@wonko.com> |
Add a sourceType attribute, which may be used to force a specific source
type, overriding automatic source type detection. [Ticket #2529974]
This change also makes it possible for new custom source types to be
added at runtime by third-party code in the same way that they're
added by autocomplete-sources, simply by mapping an sourceType name in
Y.AutoCompleteBase.SOURCE_TYPES to a source setter function.
I haven't yet documented this pluggable functionality since I'd like to
let it simmer a bit before setting it in stone. |
ddc28607ffedc0fdfadf5b6a095d809365ac8476 |
|
25-Mar-2011 |
Ryan Grove <ryan@wonko.com> |
Allow function sources to be asynchronous. [Ticket #2529974] |
dcc025b8477681e766bb1262ac3580d23f7b922b |
|
22-Mar-2011 |
Ryan Grove <ryan@wonko.com> |
Pass the query and the requestTemplate output separately when sending
a request. [Fixes #2529895]
Also fleshed out the unit tests for sendRequest and for the various
autocomplete-sources source types. |
ae06978b65b0c4be55a873306e2d0606a1f1df63 |
|
04-Jan-2011 |
Ryan Grove <ryan@wonko.com> |
Don't trigger a query when attaching to an inputNode that already contains text. [Fixes #2529692] |
4bd5f7e79c79eac3a33964071c19e80f8a4c7a8e |
|
07-Dec-2010 |
Ryan Grove <ryan@wonko.com> |
API doc tweaks. |
c3547b76b8b54759261b297b2e0ac123860b4138 |
|
03-Dec-2010 |
Ryan Grove <ryan@wonko.com> |
Listen for blur instead of change. |
010900601a4f5e9307a2f69c8078a8ab93e2cc6c |
|
30-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Add allowTrailingDelimiter config attribute. Strip trailing delimiters by default. |
2ec999535c9806d11b5a3a04879f07558fc22558 |
|
17-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Turns out these events were never actually queuable, because I spelled "queuable" wrong. Might as well run with it. |
e08d4ec44132da6c7fffdd9a32ce3526b64c4526 |
|
17-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
sendRequest() should set the query even when no source is configured. |
8a0c46685845498de05cbb492afa3b83e2780c28 |
|
17-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
clear event should include the previous query on the event facade. |
9b56e76519cb4b6ccd3a8e3fbbffc43fd7dbbebf |
|
17-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Allow the use of functions as result sources. |
174bc2b9feea5dcd41ecb60213d2ce600b5d08bf |
|
16-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Add support for XHR-based sources without using a DataSource.
Like JSONP sources, XHR sources are specified by setting the source
attribute to a URL. Any URL string with a {callback} placeholder will be
treated as a JSONP source; a URL string without a {callback} placeholder
will be treated as an XHR source. |
0a33c81444b4733a2ca07b957b89f7a0ad29ef80 |
|
16-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Move code for JSONP and YQL sources into a separate autocomplete-sources module.
The autocomplete-sources module is included in the autocomplete rollup,
but is no longer part of autocomplete-base, which results in a smaller
base module when the extra sources aren't needed. |
42f248d8a579c59a974781ff10e808a5dafb09fa |
|
16-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Log warnings when filters, formatters, and highlighters don't return anything. |
606ace0bc6ca6d122fbe733b547579f096b82b0a |
|
16-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
A negative minQueryLength value should prevent all queries. |
63b7fb6d8982a8aeec3b0de4fa10fe2be796ab26 |
|
12-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Refactor the way results are passed to filters, highlighters, and formatters. [Fixes #2529522]
Previously, result filters received an array of raw results,
highlighters received an array of text result strings, and formatters
received several arrays containing different result formats.
This commit changes this behavior: filters, highlighters, and formatters
now all receive a single array of result objects. Each object has
several properties (display, highlighted, raw, text) representing the
various formats of a given result.
Filters are expected to return an array of result objects. Highlighters
should return an array of highlighted result text strings. Formatters
should return an array of HTML strings or Node instances. |
3ec268f1ded84e8b4619357aded94c351fc2d312 |
|
11-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Add support for {maxResults} placeholders in JSONP and YQL sources. |
698d74b35a0158e0dd74688b093e4981af247296 |
|
03-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Dupe arrays before passing them to filters/highlighters/formatters.
This prevents badly-written custom filters/highlighters/formatters from
causing problems by directly modifying the passed arrays. |
2c8eaddac21fee4fadf7f19ae7acb064a353a4d9 |
|
03-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Better handling of single item non-array results in YQL responses. |
5e8fa126d8a4c4f4ca18e265538869ce4e3968a7 |
|
03-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Add yqlProtocol attribute to allow YQL sources to use HTTPS.
This change also ensures that a single YQLRequest instance is reused for
all requests, rather than recreating a new instance for each request. |
95920dc8f58767bb503e5c5e0c0e7e31d634e4d7 |
|
03-Nov-2010 |
Ryan Grove <ryan@wonko.com> |
Don't URI-encode query text used in a YQL query.
The complete YQL query will be URI-encoded as a whole, so this resulted
in the query text being double-encoded. |
13a5f24f54f2b2384d1e924e3f1d737fec5fde9b |
|
22-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Early cut of node-tokeninput.
This is a Node plugin for input fields and textareas that provides a
tokenized input pattern similar to Mac OS X's TokenField widget. It can
be used in conjunction with AutoCompleteList to provide things like tag
completion. |
a59f39aeea42d772dc19906097440f24c3109ede |
|
19-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Attempt to load the jsonp or yql modules on demand when necessary.
Also added a fun Twitter Search JSONP source to the manual test.
Props to ericf and foxxtrot for the insightful GitHub comments which led
to this awesomeness. |
937c727c645f158085a3922c8114778a7689195f |
|
19-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Add support for YQL source strings beginning with "use" or "set". |
ca0bbc4c973111f0af0e380d56e450bce47ece38 |
|
19-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
The resultFilters and resultHighlighter attributes may be specified as strings. [Closes #2529424]
When a string is given as the value of the resultFilters or
resultHighlighter attributes, it is assumed to be the name of a method
on Y.AutoCompleteFilters or Y.AutoCompleteHighlighters respectively. The
resultFilters attribute may also be set to an array of strings. |
fa3f2c88979720d6b2d7a08376549faf23e696d1 |
|
19-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
API doc fixes. |
a34132950051685e23eef8fd04540f494b04ff60 |
|
12-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Append requestTemplate output to the URL when using a JSONP source. [Fixes #2529425] |
15ee205e8f6e740decdadd3ea2537a0e95eeb750 |
|
12-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Add public sendRequest() method to allow manually triggered requests. |
bb942fea7520a59a0138aef36d1897089059ac5d |
|
12-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Allow empty queries if minQueryLength is set to 0. |
55151b19207a4071c5546e6d783b5323463cf6fd |
|
12-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Fix comment. |
62f018bebd68d57a164a874035ec94929092b41e |
|
12-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
resultFilters setter will now coerce a non-array value to an array. |
ac3493f7db5e80dbbf8d05c8dd43418be8f65715 |
|
08-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
trimLeft() is in Lang now. |
d3af1a761f8bb3a11a074f6c16f21ccb748d56c3 |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Use AOP to attach AutoCompleteBase's bind/sync/destroy lifecycle methods. |
32ef22c206bb8c0f3e96b23a54e99ba6b81d89c3 |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Make allowBrowserAutocomplete settable after init. |
0c8e6866ff4256655cc13a40aa9aaea4e9fbca6e |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Move requestTemplate setter to a prototype method. |
7806f34d1a45bd63ef92c06daf6c19a01e64515c |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Remove unnecessary validators. |
815f7b380a8129212dd379f2a8f6ee2a998f45d2 |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Use a local reference to save some bytes and some nanoseconds. |
4d263c284e7251bc6074a844cf90315c0be43158 |
|
06-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Add base-build as a requirement for autocomplete-base. |
be0537ffb0813a95e3d78f1f316f0bd3d5d6cdbc |
|
05-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Move requestTemplate setter to a prototype method. |
31a473dc69f27eb1d4f07d660f2e8302417076be |
|
05-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Remove unnecessary validators. |
1e1922b5988eff8e1692e60f9786d1243dfe9527 |
|
05-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Use a local reference to save some bytes and some nanoseconds. |
562716da73367d8a41abf8e40d4e76fd2817ead6 |
|
05-Oct-2010 |
Ryan Grove <ryan@wonko.com> |
Add base-build as a requirement for autocomplete-base. |
8a473112ab5d8c74fb79ef0553ba5f038fe3bde3 |
|
29-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
AutoComplete source may now be set to a YQL query string.
When the source is a string, AutoComplete will detect whether it's a YQL
query or a URL. If it's a URL, it'll be loaded via the jsonp module. If
it's a YQL query, the query will be executed via the yql module.
That means the following implementation code is all that's needed to
instantiate a working AutoCompleteList widget that displays search
suggestions as you type:
var ac = new Y.AutoComplete({
inputNode: '#foo',
source: 'select * from search.suggest where query="{query}"'
}).render();
The necessary module (either jsonp or yql) must already be loaded;
AutoComplete doesn't pull them in by default in order to avoid
increasing its dependency payload unnecessarily. |
b1ec001afbb5c5d84675023047109f2a42748bd0 |
|
28-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Make AutoComplete a bajillion times easier to use.
The "dataSource" attribute has been renamed to "source", and can now be
an Array, DataSource, Object, or String.
Set it to an array, and that array is your local autocomplete source.
Use an Object, and queries are looked up in the object's properties. Use
a URL string, and AutoComplete will make a JSONP request to that URL.
And of course, you can still use a DataSource too (but now you don't
have to). |
555a47f0eb151996f4d8812b1f5ff93d779971ff |
|
23-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Comment de-lieification. |
f91c934a302779fba4d298cec950eb7a352ca53f |
|
23-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Reduce default queryDelay to 100ms. |
266503e355988c4b7e003ee7ead11815adc7a6a9 |
|
23-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Remove unnecessary shorthand vars. |
864f194d5a9bfa2d7e244094739756785d0f2d2a |
|
23-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Add maxResults attribute. |
5c241e423110dd97fd61c836e4c521c10864d9c9 |
|
17-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Add query delimiter support (currently only at end of input). |
21c49ebfe6eea2f3b5a7fe3018206cb0e213096a |
|
16-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Track the input value internally.
This makes it easier to ensure that we only fire autocomplete queries
when the user changes the input value, as opposed to when the input
value is changed programmatically. |
c7898fc68c0944de3b9a9081bfa0a3b66bfc518c |
|
15-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Better cooperation between formatters and highlighters, and more API docs. |
f52f254210947dd5e90ab38cc8293e89b62572cd |
|
15-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Expose results as an array of objects containing result metadata.
Each result, after being filtered, formatted, and highlighted, is now an
object with three parameters:
- display: Formatted result HTML string or Node suitable for display
to the user.
- raw: The raw, unformatted result in whatever form it was provided by
the DataSource.
- text: Plain text version of the result, suitable for insertion into
the value of a text input field or textarea. |
f5738feb0b3d461c1398fc1cd8fc01b0de21d592 |
|
15-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Move autocomplete-list back under the autocomplete module. Make Y.AutoComplete an alias for Y.AutoCompleteList. |
2b67e7faad85264af073967295e9222adc7a93c1 |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Remove unnecessary concat(). |
72473eadbb258809d678f16550efb3d0309d8d12 |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Add resultFilterLocator, resultFormatter, results, and resultsRaw attributes. |
b5554435260964a5bbdcd74ab7f7d541759bd7a3 |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Better separation of concerns in bind/unbind/sync. |
6d408e55d70c428d9bec98954a332ac92adad6ce |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
More AutoComplete namespace and dependency refactoring.
- Y.AutoComplete is now an instantiable widgetless implementation of
Y.AutoCompleteBase.
- Y.AutoCompleteList is the barebones list completion widget in
progress.
- The filter and highlighter modules now stand alone and don't depend
on any other part of AutoComplete. |
e6b1b9d89771ad8772d7e56a26e5a85656460e42 |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Make AutoCompleteBase testable again. |
73dceb7e22f7fe3c39141e27d9f2a9affd63f5bb |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Add 'clear' event. |
c878779d09e717508716acb5f3b25a6176fa2672 |
|
13-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
AutoComplete work in progress. |
d828c52129c44196483f651586f15efd8acb5f93 |
|
11-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Reorganize the AutoComplete class hierarchy to make way for widgets.
Class name changes are as follows:
- AutoComplete => AutoCompleteBase
- AutoComplete.Filters => AutoCompleteFilters
- AutoComplete.Highlighters => AutoCompleteHighlighters |
99ae4cf94b18f24d35db8c5ffed25fdf304accf4 |
|
09-Sep-2010 |
Ryan Grove <ryan@wonko.com> |
Promote autocomplete out of the sandbox. |