clay-autocomplete
Advanced tools
Comparing version 2.9.0 to 2.10.0
@@ -563,3 +563,13 @@ 'use strict'; | ||
*/ | ||
unstable_content: _metalState.Config.any() | ||
unstable_content: _metalState.Config.any(), | ||
/** | ||
* Flag to indicate the autocomplete should use default css | ||
* classes or not. | ||
* @default true | ||
* @instance | ||
* @memberof ClayAutocomplete | ||
* @type {?bool} | ||
*/ | ||
useDefaultClasses: _metalState.Config.bool().value(true) | ||
}; | ||
@@ -566,0 +576,0 @@ |
@@ -102,4 +102,6 @@ 'use strict'; | ||
var unstable_content = soy.asserts.assertType(opt_data.unstable_content == null || goog.isFunction(opt_data.unstable_content), 'unstable_content', opt_data.unstable_content, 'function()|null|undefined'); | ||
var attributes__soy43 = function attributes__soy43() { | ||
incrementalDom.attr('class', 'dropdown-full' + (elementClasses ? ' ' + elementClasses : ' form-group')); | ||
/** @type {boolean|null|undefined} */ | ||
var useDefaultClasses = soy.asserts.assertType(opt_data.useDefaultClasses == null || goog.isBoolean(opt_data.useDefaultClasses) || opt_data.useDefaultClasses === 1 || opt_data.useDefaultClasses === 0, 'useDefaultClasses', opt_data.useDefaultClasses, 'boolean|null|undefined'); | ||
var attributes__soy46 = function attributes__soy46() { | ||
incrementalDom.attr('class', (elementClasses ? ' ' + elementClasses : '') + (useDefaultClasses != false ? ' dropdown-full form-group' : '')); | ||
incrementalDom.attr('data-onkeydown', _handleOnKeydown); | ||
@@ -111,3 +113,3 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy43(); | ||
attributes__soy46(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -144,2 +146,3 @@ soyIdom.print(unstable_content); | ||
* unstable_content: (function()|null|undefined), | ||
* useDefaultClasses: (boolean|null|undefined), | ||
* }} | ||
@@ -178,3 +181,3 @@ */ | ||
var placeholder = soy.asserts.assertType(opt_data.placeholder == null || goog.isString(opt_data.placeholder) || opt_data.placeholder instanceof goog.soy.data.SanitizedContent, 'placeholder', opt_data.placeholder, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var attributes__soy121 = function attributes__soy121() { | ||
var attributes__soy124 = function attributes__soy124() { | ||
incrementalDom.attr('class', inputElementClasses ? inputElementClasses : 'form-control'); | ||
@@ -201,3 +204,3 @@ if (inputName) { | ||
incrementalDom.elementOpenStart('input'); | ||
attributes__soy121(); | ||
attributes__soy124(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -255,17 +258,17 @@ incrementalDom.elementClose('input'); | ||
var requestTimeout = soy.asserts.assertType(opt_data.requestTimeout == null || goog.isNumber(opt_data.requestTimeout), 'requestTimeout', opt_data.requestTimeout, 'null|number|undefined'); | ||
var isVisible__soy138 = filteredItems && filteredItems.length > 0 ? true : false; | ||
var classes__soy145 = ''; | ||
classes__soy145 += 'dropdown-menu'; | ||
classes__soy145 += isVisible__soy138 ? ' show' : ''; | ||
var param163 = function param163() { | ||
var isVisible__soy141 = filteredItems && filteredItems.length > 0 ? true : false; | ||
var classes__soy148 = ''; | ||
classes__soy148 += 'dropdown-menu'; | ||
classes__soy148 += isVisible__soy141 ? ' show' : ''; | ||
var param166 = function param166() { | ||
incrementalDom.elementOpenStart('ul'); | ||
incrementalDom.attr('class', classes__soy145); | ||
incrementalDom.attr('class', classes__soy148); | ||
incrementalDom.attr('ref', 'dropdown'); | ||
incrementalDom.elementOpenEnd(); | ||
if (filteredItems) { | ||
var item153List = filteredItems; | ||
var item153ListLen = item153List.length; | ||
for (var item153Index = 0; item153Index < item153ListLen; item153Index++) { | ||
var item153Data = item153List[item153Index]; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayAutocomplete.Item.idom'), contentRenderer, true)({ _handleDropdownItemClick: _handleDropdownItemClick, data: item153Data, index: item153Index }, opt_ijData); | ||
var item156List = filteredItems; | ||
var item156ListLen = item156List.length; | ||
for (var item156Index = 0; item156Index < item156ListLen; item156Index++) { | ||
var item156Data = item156List[item156Index]; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayAutocomplete.Item.idom'), contentRenderer, true)({ _handleDropdownItemClick: _handleDropdownItemClick, data: item156Data, index: item156Index }, opt_ijData); | ||
} | ||
@@ -275,3 +278,3 @@ } | ||
}; | ||
$templateAlias1({ content: param163, dataSource: dataSource, events: { dataChange: _handleDataChange }, initialData: initialData, pollingInterval: pollingInterval, ref: 'dataProvider', requestInputMode: requestInputMode, requestOptions: requestOptions, requestRetries: requestRetries, requestTimeout: requestTimeout }, opt_ijData); | ||
$templateAlias1({ content: param166, dataSource: dataSource, events: { dataChange: _handleDataChange }, initialData: initialData, pollingInterval: pollingInterval, ref: 'dataProvider', requestInputMode: requestInputMode, requestOptions: requestOptions, requestRetries: requestRetries, requestTimeout: requestTimeout }, opt_ijData); | ||
}; | ||
@@ -323,12 +326,12 @@ exports.dropdown = $dropdown; | ||
if (data.matches && data.matches.length > 0) { | ||
var char188List = data.matches; | ||
var char188ListLen = char188List.length; | ||
for (var char188Index = 0; char188Index < char188ListLen; char188Index++) { | ||
var char188Data = char188List[char188Index]; | ||
if (char188Data.match) { | ||
var char191List = data.matches; | ||
var char191ListLen = char191List.length; | ||
for (var char191Index = 0; char191Index < char191ListLen; char191Index++) { | ||
var char191Data = char191List[char191Index]; | ||
if (char191Data.match) { | ||
incrementalDom.elementOpen('strong'); | ||
soyIdom.print(char188Data.value); | ||
soyIdom.print(char191Data.value); | ||
incrementalDom.elementClose('strong'); | ||
} else { | ||
soyIdom.print(char188Data.value); | ||
soyIdom.print(char191Data.value); | ||
} | ||
@@ -354,4 +357,4 @@ } | ||
exports.render.params = ["dataSource", "_handleDataChange", "_handleDropdownItemClick", "_handleOnBlur", "_handleOnFocus", "_handleOnInput", "_handleOnKeydown", "contentRenderer", "elementClasses", "filteredItems", "id", "initialData", "inputElementClasses", "inputName", "inputValue", "placeholder", "pollingInterval", "requestInputMode", "requestOptions", "requestRetries", "requestTimeout", "unstable_content"]; | ||
exports.render.types = { "dataSource": "string|[]|list<?>|any", "_handleDataChange": "any", "_handleDropdownItemClick": "any", "_handleOnBlur": "any", "_handleOnFocus": "any", "_handleOnInput": "any", "_handleOnKeydown": "any", "contentRenderer": "string", "elementClasses": "string", "filteredItems": "list<?>", "id": "string", "initialData": "[]|list<?>", "inputElementClasses": "string", "inputName": "string", "inputValue": "string", "placeholder": "string", "pollingInterval": "number", "requestInputMode": "string", "requestOptions": "[\n\t\tmethod: string,\n\t\tmode: string,\n\t\tcache: string,\n\t\tcredentials: string,\n\t\theaders: [],\n\t\tredirect: string,\n\t\treferrer: string,\n\t\tbody: []\n\t]", "requestRetries": "number", "requestTimeout": "number", "unstable_content": "html" }; | ||
exports.render.params = ["dataSource", "_handleDataChange", "_handleDropdownItemClick", "_handleOnBlur", "_handleOnFocus", "_handleOnInput", "_handleOnKeydown", "contentRenderer", "elementClasses", "filteredItems", "id", "initialData", "inputElementClasses", "inputName", "inputValue", "placeholder", "pollingInterval", "requestInputMode", "requestOptions", "requestRetries", "requestTimeout", "unstable_content", "useDefaultClasses"]; | ||
exports.render.types = { "dataSource": "string|[]|list<?>|any", "_handleDataChange": "any", "_handleDropdownItemClick": "any", "_handleOnBlur": "any", "_handleOnFocus": "any", "_handleOnInput": "any", "_handleOnKeydown": "any", "contentRenderer": "string", "elementClasses": "string", "filteredItems": "list<?>", "id": "string", "initialData": "[]|list<?>", "inputElementClasses": "string", "inputName": "string", "inputValue": "string", "placeholder": "string", "pollingInterval": "number", "requestInputMode": "string", "requestOptions": "[\n\t\tmethod: string,\n\t\tmode: string,\n\t\tcache: string,\n\t\tcredentials: string,\n\t\theaders: [],\n\t\tredirect: string,\n\t\treferrer: string,\n\t\tbody: []\n\t]", "requestRetries": "number", "requestTimeout": "number", "unstable_content": "html", "useDefaultClasses": "bool" }; | ||
exports.input.params = ["_handleOnBlur", "_handleOnFocus", "_handleOnInput", "_handleOnKeydown", "inputElementClasses", "inputName", "inputValue", "placeholder"]; | ||
@@ -358,0 +361,0 @@ exports.input.types = { "_handleOnBlur": "any", "_handleOnFocus": "any", "_handleOnInput": "any", "_handleOnKeydown": "any", "inputElementClasses": "string", "inputName": "string", "inputValue": "string", "placeholder": "string" }; |
{ | ||
"name": "clay-autocomplete", | ||
"version": "2.9.0", | ||
"version": "2.10.0", | ||
"description": "Metal ClayAutocomplete component", | ||
@@ -30,3 +30,3 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"clay-data-provider": "^2.9.0", | ||
"clay-data-provider": "^2.10.0", | ||
"metal": "^2.16.0", | ||
@@ -44,8 +44,8 @@ "metal-component": "^2.16.0", | ||
"babel-preset-env": "^1.6.0", | ||
"browserslist-config-clay": "^2.9.0", | ||
"clay-css": "^2.9.0", | ||
"browserslist-config-clay": "^2.10.0", | ||
"clay-css": "^2.10.0", | ||
"metal-dom": "^2.13.2", | ||
"metal-tools-soy": "^6.0.0", | ||
"webpack": "^3.0.0", | ||
"webpack-config-clay": "^2.9.0" | ||
"webpack-config-clay": "^2.10.0" | ||
}, | ||
@@ -55,3 +55,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "f3a3f475987cf60da77fe9185f479c4ed5a4c272" | ||
"gitHead": "f613b706e97f317667d83ba28ec4b5c0f6422d2f" | ||
} |
@@ -509,2 +509,12 @@ import 'clay-data-provider'; | ||
unstable_content: Config.any(), | ||
/** | ||
* Flag to indicate the autocomplete should use default css | ||
* classes or not. | ||
* @default true | ||
* @instance | ||
* @memberof ClayAutocomplete | ||
* @type {?bool} | ||
*/ | ||
useDefaultClasses: Config.bool().value(true), | ||
}; | ||
@@ -511,0 +521,0 @@ |
@@ -83,4 +83,6 @@ /* jshint ignore:start */ | ||
var unstable_content = soy.asserts.assertType(opt_data.unstable_content == null || goog.isFunction(opt_data.unstable_content), 'unstable_content', opt_data.unstable_content, 'function()|null|undefined'); | ||
var attributes__soy43 = function() { | ||
incrementalDom.attr('class', 'dropdown-full' + (elementClasses ? ' ' + elementClasses : ' form-group')); | ||
/** @type {boolean|null|undefined} */ | ||
var useDefaultClasses = soy.asserts.assertType(opt_data.useDefaultClasses == null || (goog.isBoolean(opt_data.useDefaultClasses) || opt_data.useDefaultClasses === 1 || opt_data.useDefaultClasses === 0), 'useDefaultClasses', opt_data.useDefaultClasses, 'boolean|null|undefined'); | ||
var attributes__soy46 = function() { | ||
incrementalDom.attr('class', (elementClasses ? ' ' + elementClasses : '') + (useDefaultClasses != false ? ' dropdown-full form-group' : '')); | ||
incrementalDom.attr('data-onkeydown', _handleOnKeydown); | ||
@@ -92,3 +94,3 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy43(); | ||
attributes__soy46(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -125,2 +127,3 @@ soyIdom.print(unstable_content); | ||
* unstable_content: (function()|null|undefined), | ||
* useDefaultClasses: (boolean|null|undefined), | ||
* }} | ||
@@ -160,3 +163,3 @@ */ | ||
var placeholder = soy.asserts.assertType(opt_data.placeholder == null || (goog.isString(opt_data.placeholder) || opt_data.placeholder instanceof goog.soy.data.SanitizedContent), 'placeholder', opt_data.placeholder, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var attributes__soy121 = function() { | ||
var attributes__soy124 = function() { | ||
incrementalDom.attr('class', inputElementClasses ? inputElementClasses : 'form-control'); | ||
@@ -183,3 +186,3 @@ if (inputName) { | ||
incrementalDom.elementOpenStart('input'); | ||
attributes__soy121(); | ||
attributes__soy124(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -238,17 +241,17 @@ incrementalDom.elementClose('input'); | ||
var requestTimeout = soy.asserts.assertType(opt_data.requestTimeout == null || goog.isNumber(opt_data.requestTimeout), 'requestTimeout', opt_data.requestTimeout, 'null|number|undefined'); | ||
var isVisible__soy138 = filteredItems && (filteredItems.length) > 0 ? true : false; | ||
var classes__soy145 = ''; | ||
classes__soy145 += 'dropdown-menu'; | ||
classes__soy145 += isVisible__soy138 ? ' show' : ''; | ||
var param163 = function() { | ||
var isVisible__soy141 = filteredItems && (filteredItems.length) > 0 ? true : false; | ||
var classes__soy148 = ''; | ||
classes__soy148 += 'dropdown-menu'; | ||
classes__soy148 += isVisible__soy141 ? ' show' : ''; | ||
var param166 = function() { | ||
incrementalDom.elementOpenStart('ul'); | ||
incrementalDom.attr('class', classes__soy145); | ||
incrementalDom.attr('class', classes__soy148); | ||
incrementalDom.attr('ref', 'dropdown'); | ||
incrementalDom.elementOpenEnd(); | ||
if (filteredItems) { | ||
var item153List = filteredItems; | ||
var item153ListLen = item153List.length; | ||
for (var item153Index = 0; item153Index < item153ListLen; item153Index++) { | ||
var item153Data = item153List[item153Index]; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayAutocomplete.Item.idom'), contentRenderer, true)({_handleDropdownItemClick: _handleDropdownItemClick, data: item153Data, index: item153Index}, opt_ijData); | ||
var item156List = filteredItems; | ||
var item156ListLen = item156List.length; | ||
for (var item156Index = 0; item156Index < item156ListLen; item156Index++) { | ||
var item156Data = item156List[item156Index]; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayAutocomplete.Item.idom'), contentRenderer, true)({_handleDropdownItemClick: _handleDropdownItemClick, data: item156Data, index: item156Index}, opt_ijData); | ||
} | ||
@@ -258,3 +261,3 @@ } | ||
}; | ||
$templateAlias1({content: param163, dataSource: dataSource, events: {dataChange: _handleDataChange}, initialData: initialData, pollingInterval: pollingInterval, ref: 'dataProvider', requestInputMode: requestInputMode, requestOptions: requestOptions, requestRetries: requestRetries, requestTimeout: requestTimeout}, opt_ijData); | ||
$templateAlias1({content: param166, dataSource: dataSource, events: {dataChange: _handleDataChange}, initialData: initialData, pollingInterval: pollingInterval, ref: 'dataProvider', requestInputMode: requestInputMode, requestOptions: requestOptions, requestRetries: requestRetries, requestTimeout: requestTimeout}, opt_ijData); | ||
}; | ||
@@ -307,12 +310,12 @@ exports.dropdown = $dropdown; | ||
if (data.matches && (data.matches.length) > 0) { | ||
var char188List = data.matches; | ||
var char188ListLen = char188List.length; | ||
for (var char188Index = 0; char188Index < char188ListLen; char188Index++) { | ||
var char188Data = char188List[char188Index]; | ||
if (char188Data.match) { | ||
var char191List = data.matches; | ||
var char191ListLen = char191List.length; | ||
for (var char191Index = 0; char191Index < char191ListLen; char191Index++) { | ||
var char191Data = char191List[char191Index]; | ||
if (char191Data.match) { | ||
incrementalDom.elementOpen('strong'); | ||
soyIdom.print(char188Data.value); | ||
soyIdom.print(char191Data.value); | ||
incrementalDom.elementClose('strong'); | ||
} else { | ||
soyIdom.print(char188Data.value); | ||
soyIdom.print(char191Data.value); | ||
} | ||
@@ -338,4 +341,4 @@ } | ||
exports.render.params = ["dataSource","_handleDataChange","_handleDropdownItemClick","_handleOnBlur","_handleOnFocus","_handleOnInput","_handleOnKeydown","contentRenderer","elementClasses","filteredItems","id","initialData","inputElementClasses","inputName","inputValue","placeholder","pollingInterval","requestInputMode","requestOptions","requestRetries","requestTimeout","unstable_content"]; | ||
exports.render.types = {"dataSource":"string|[]|list<?>|any","_handleDataChange":"any","_handleDropdownItemClick":"any","_handleOnBlur":"any","_handleOnFocus":"any","_handleOnInput":"any","_handleOnKeydown":"any","contentRenderer":"string","elementClasses":"string","filteredItems":"list<?>","id":"string","initialData":"[]|list<?>","inputElementClasses":"string","inputName":"string","inputValue":"string","placeholder":"string","pollingInterval":"number","requestInputMode":"string","requestOptions":"[\n\t\tmethod: string,\n\t\tmode: string,\n\t\tcache: string,\n\t\tcredentials: string,\n\t\theaders: [],\n\t\tredirect: string,\n\t\treferrer: string,\n\t\tbody: []\n\t]","requestRetries":"number","requestTimeout":"number","unstable_content":"html"}; | ||
exports.render.params = ["dataSource","_handleDataChange","_handleDropdownItemClick","_handleOnBlur","_handleOnFocus","_handleOnInput","_handleOnKeydown","contentRenderer","elementClasses","filteredItems","id","initialData","inputElementClasses","inputName","inputValue","placeholder","pollingInterval","requestInputMode","requestOptions","requestRetries","requestTimeout","unstable_content","useDefaultClasses"]; | ||
exports.render.types = {"dataSource":"string|[]|list<?>|any","_handleDataChange":"any","_handleDropdownItemClick":"any","_handleOnBlur":"any","_handleOnFocus":"any","_handleOnInput":"any","_handleOnKeydown":"any","contentRenderer":"string","elementClasses":"string","filteredItems":"list<?>","id":"string","initialData":"[]|list<?>","inputElementClasses":"string","inputName":"string","inputValue":"string","placeholder":"string","pollingInterval":"number","requestInputMode":"string","requestOptions":"[\n\t\tmethod: string,\n\t\tmode: string,\n\t\tcache: string,\n\t\tcredentials: string,\n\t\theaders: [],\n\t\tredirect: string,\n\t\treferrer: string,\n\t\tbody: []\n\t]","requestRetries":"number","requestTimeout":"number","unstable_content":"html","useDefaultClasses":"bool"}; | ||
exports.input.params = ["_handleOnBlur","_handleOnFocus","_handleOnInput","_handleOnKeydown","inputElementClasses","inputName","inputValue","placeholder"]; | ||
@@ -342,0 +345,0 @@ exports.input.types = {"_handleOnBlur":"any","_handleOnFocus":"any","_handleOnInput":"any","_handleOnKeydown":"any","inputElementClasses":"string","inputName":"string","inputValue":"string","placeholder":"string"}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164280
2087
Updatedclay-data-provider@^2.10.0