clay-dropdown
Advanced tools
Comparing version
@@ -118,7 +118,7 @@ 'use strict'; | ||
} else { | ||
var msg_2442__soy2443 = ''; | ||
var msg_2445__soy2446 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_2442__soy2443 += MSG_EXTERNAL_6305962755687847469; | ||
param54 += msg_2442__soy2443; | ||
msg_2445__soy2446 += MSG_EXTERNAL_6305962755687847469; | ||
param54 += msg_2445__soy2446; | ||
} | ||
@@ -125,0 +125,0 @@ $templateAlias2({ button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy21, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy30, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param54 }, null, opt_ijData); |
@@ -120,6 +120,6 @@ 'use strict'; | ||
var viewMoreURL = soy.asserts.assertType(opt_data.viewMoreURL == null || goog.isString(opt_data.viewMoreURL) || opt_data.viewMoreURL instanceof goog.soy.data.SanitizedContent, 'viewMoreURL', opt_data.viewMoreURL, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var msg_2445__soy2446 = ''; | ||
var msg_2448__soy2449 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7011425206383801543 = goog.getMsg('more'); | ||
msg_2445__soy2446 += MSG_EXTERNAL_7011425206383801543; | ||
msg_2448__soy2449 += MSG_EXTERNAL_7011425206383801543; | ||
var secondaryItemsFirstGroup__soy93 = secondaryItems != null ? secondaryItems[0] != null ? secondaryItems[0] : null : null; | ||
@@ -142,3 +142,3 @@ var secondaryItemsSecondGroup__soy95 = secondaryItems != null ? secondaryItems[1] != null ? secondaryItems[1] : null : null; | ||
var textMore__soy125 = ''; | ||
textMore__soy125 += msg_2445__soy2446; | ||
textMore__soy125 += msg_2448__soy2449; | ||
var showMoreButton__soy133 = showingItems__soy115 < totalItems__soy105 ? viewMoreURL != null ? { buttonStyle: 'secondary', href: viewMoreURL, label: textMore__soy125 } : { label: textMore__soy125, style: 'secondary' } : null; | ||
@@ -174,7 +174,7 @@ var trigger__soy135 = function trigger__soy135() { | ||
} else { | ||
var msg_2448__soy2449 = ''; | ||
var msg_2451__soy2452 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_2448__soy2449 += MSG_EXTERNAL_7387635272539030076; | ||
param176 += msg_2448__soy2449; | ||
msg_2451__soy2452 += MSG_EXTERNAL_7387635272539030076; | ||
param176 += msg_2451__soy2452; | ||
} | ||
@@ -181,0 +181,0 @@ $templateAlias2({ button: showMoreButton__soy133, caption: param144, disabled: disabled, elementClasses: elementClasses, events: { buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle }, expanded: expanded, helpText: showMoreButton__soy133 ? helpText : null, id: id, items: items__soy123, itemsIconAlignment: itemsIconAlignment, label: trigger__soy135, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param176 }, null, opt_ijData); |
@@ -510,2 +510,27 @@ 'use strict'; | ||
/** | ||
* Workaround for avoiding Closure Templates render an empty `.dropdown-caption` element. | ||
* This workaround was placed here because Soy isn't considering a `msg` as a `string` | ||
* making impossible the usage of `kind="html|string"`. | ||
* | ||
* When having a `html` inside `kind` Soy's attribute, this property is considered a function, | ||
* impeding us to know if there is content or not to render `caption`. | ||
* @private | ||
*/ | ||
}, { | ||
key: 'syncCaption', | ||
value: function syncCaption() { | ||
if (this.refs.portal && this.refs.portal.element) { | ||
var dropdownCaption = this.refs.portal.element.querySelector('.dropdown-caption'); | ||
if (dropdownCaption) { | ||
if (dropdownCaption.innerText === '') { | ||
this._showCaption = false; | ||
} else { | ||
this._showCaption = true; | ||
} | ||
} | ||
} | ||
} | ||
/** | ||
* @inheritDoc | ||
@@ -570,2 +595,11 @@ */ | ||
/** | ||
* Flag to indicate if Dropdown's Caption can be shown. | ||
* @default false | ||
* @instance | ||
* @memberof ClayDropdownBase | ||
* @type {?Boolean} | ||
*/ | ||
_showCaption: _metalState.Config.bool().value(true).internal(), | ||
/** | ||
* Button configuration to place a button at dropdown footer. | ||
@@ -572,0 +606,0 @@ * @default undefined |
@@ -64,2 +64,3 @@ 'use strict'; | ||
* _handleTriggerKeyDown: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -106,2 +107,4 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var _handleTriggerKeyDown = opt_data._handleTriggerKeyDown; | ||
/** @type {boolean|null|undefined} */ | ||
var _showCaption = soy.asserts.assertType(opt_data._showCaption == null || goog.isBoolean(opt_data._showCaption) || opt_data._showCaption === 1 || opt_data._showCaption === 0, '_showCaption', opt_data._showCaption, 'boolean|null|undefined'); | ||
/** @type {?} */ | ||
@@ -143,3 +146,3 @@ var button = opt_data.button; | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0, 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var attributes__soy295 = function attributes__soy295() { | ||
var attributes__soy296 = function attributes__soy296() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -151,6 +154,6 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy295(); | ||
attributes__soy296(); | ||
incrementalDom.elementOpenEnd(); | ||
$trigger({ _handleTriggerKeyDown: _handleTriggerKeyDown, ariaLabel: triggerAriaLabel, classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle }, null, opt_ijData); | ||
$sections({ _handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, _handleSearch: _handleSearch, button: button, caption: caption, contentRenderer: ($$temp = contentRenderer) == null ? '' : $$temp, expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap, useSearchableWithForm: ($$temp = useSearchableWithForm) == null ? true : $$temp }, null, opt_ijData); | ||
$sections({ _handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, _handleSearch: _handleSearch, _showCaption: ($$temp = _showCaption) == null ? true : $$temp, button: button, caption: caption, contentRenderer: ($$temp = contentRenderer) == null ? '' : $$temp, expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap, useSearchableWithForm: ($$temp = useSearchableWithForm) == null ? true : $$temp }, null, opt_ijData); | ||
incrementalDom.elementClose('div'); | ||
@@ -168,2 +171,3 @@ } | ||
* _handleTriggerKeyDown: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -225,19 +229,19 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var spritemap = soy.asserts.assertType(opt_data.spritemap == null || goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent, 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var index353Limit = maxItems && maxItems < items.length ? maxItems : items.length; | ||
for (var index353 = 0; index353 < index353Limit; index353++) { | ||
var item__soy355 = items[index353]; | ||
var variant__soy357 = ''; | ||
var index355Limit = maxItems && maxItems < items.length ? maxItems : items.length; | ||
for (var index355 = 0; index355 < index355Limit; index355++) { | ||
var item__soy357 = items[index355]; | ||
var variant__soy359 = ''; | ||
var $tmp = null; | ||
if (contentRenderer != null && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if (item__soy355.contentRenderer != null && item__soy355.contentRenderer != '') { | ||
$tmp = item__soy355.contentRenderer; | ||
} else if (item__soy355.type) { | ||
$tmp = item__soy355.type; | ||
} else if (item__soy357.contentRenderer != null && item__soy357.contentRenderer != '') { | ||
$tmp = item__soy357.contentRenderer; | ||
} else if (item__soy357.type) { | ||
$tmp = item__soy357.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy357 += $tmp; | ||
$templateAlias1({ active: item__soy355.active, checked: item__soy355.checked, contentRenderer: variant__soy357, data: item__soy355.data, disabled: item__soy355.disabled, events: { itemClicked: _handleItemClick, itemKeyDown: _handleItemKeyDown }, href: item__soy355.href, icon: item__soy355.icon, icons: item__soy355.icons, inputName: item__soy355.inputName, inputValue: item__soy355.inputValue, items: item__soy355.items, itemsIconAlignment: itemsIconAlignment, label: item__soy355.label ? '' + item__soy355.label : '', maxItems: item__soy355.maxItems, ref: 'item' + index353, separator: item__soy355.separator, spritemap: spritemap, target: item__soy355.target, title: item__soy355.title, type: item__soy355.type }, null, opt_ijData); | ||
if (item__soy355.separator) { | ||
variant__soy359 += $tmp; | ||
$templateAlias1({ active: item__soy357.active, checked: item__soy357.checked, contentRenderer: variant__soy359, data: item__soy357.data, disabled: item__soy357.disabled, events: { itemClicked: _handleItemClick, itemKeyDown: _handleItemKeyDown }, href: item__soy357.href, icon: item__soy357.icon, icons: item__soy357.icons, inputName: item__soy357.inputName, inputValue: item__soy357.inputValue, items: item__soy357.items, itemsIconAlignment: itemsIconAlignment, label: item__soy357.label ? '' + item__soy357.label : '', maxItems: item__soy357.maxItems, ref: 'item' + index355, separator: item__soy357.separator, spritemap: spritemap, target: item__soy357.target, title: item__soy357.title, type: item__soy357.type }, null, opt_ijData); | ||
if (item__soy357.separator) { | ||
$templateAlias1({ contentRenderer: 'separator' }, null, opt_ijData); | ||
@@ -283,3 +287,3 @@ } | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0, 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var content__soy412 = function content__soy412() { | ||
var content__soy414 = function content__soy414() { | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -314,6 +318,6 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
incrementalDom.elementOpen('form'); | ||
content__soy412(); | ||
content__soy414(); | ||
incrementalDom.elementClose('form'); | ||
} else { | ||
content__soy412(); | ||
content__soy414(); | ||
} | ||
@@ -341,2 +345,3 @@ } | ||
* _handleSearch: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -371,2 +376,4 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var _handleSearch = opt_data._handleSearch; | ||
/** @type {boolean|null|undefined} */ | ||
var _showCaption = soy.asserts.assertType(opt_data._showCaption == null || goog.isBoolean(opt_data._showCaption) || opt_data._showCaption === 1 || opt_data._showCaption === 0, '_showCaption', opt_data._showCaption, 'boolean|null|undefined'); | ||
/** @type {?} */ | ||
@@ -392,4 +399,4 @@ var button = opt_data.button; | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0, 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var dropdownMenu__soy449 = function dropdownMenu__soy449() { | ||
var listAttributes__soy451 = function listAttributes__soy451() { | ||
var dropdownMenu__soy452 = function dropdownMenu__soy452() { | ||
var listAttributes__soy454 = function listAttributes__soy454() { | ||
incrementalDom.attr('class', 'dropdown-menu' + (itemsIconAlignment == 'left' || itemsIconAlignment == 'left-right' ? ' dropdown-menu-indicator-start' : '') + (itemsIconAlignment == 'right' || itemsIconAlignment == 'left-right' ? ' dropdown-menu-indicator-end' : '') + (expanded ? ' show' : '')); | ||
@@ -399,3 +406,3 @@ incrementalDom.attr('ref', 'menu'); | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy451(); | ||
listAttributes__soy454(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -413,7 +420,7 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy483 = function listItemsContent__soy483() { | ||
var listItemsContent__soy486 = function listItemsContent__soy486() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)(opt_data, null, opt_ijData); | ||
}; | ||
var captionContent__soy494 = function captionContent__soy494() { | ||
if (caption && caption != null) { | ||
var captionContent__soy497 = function captionContent__soy497() { | ||
if (_showCaption && caption && caption != null) { | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -431,5 +438,5 @@ incrementalDom.attr('class', 'dropdown-caption'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy483(); | ||
listItemsContent__soy486(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy494(); | ||
captionContent__soy497(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -446,11 +453,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy483(); | ||
captionContent__soy494(); | ||
listItemsContent__soy486(); | ||
captionContent__soy497(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param541 = function param541() { | ||
dropdownMenu__soy449(); | ||
var param544 = function param544() { | ||
dropdownMenu__soy452(); | ||
}; | ||
$templateAlias4({ content: param541, portalElement: '#' + portalElementId, ref: 'portal' }, null, opt_ijData); | ||
$templateAlias4({ content: param544, portalElement: '#' + portalElementId, ref: 'portal' }, null, opt_ijData); | ||
} | ||
@@ -465,2 +472,3 @@ exports.sections = $sections; | ||
* _handleSearch: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -520,3 +528,3 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var title = soy.asserts.assertType(opt_data.title == null || goog.isString(opt_data.title) || opt_data.title instanceof goog.soy.data.SanitizedContent, 'title', opt_data.title, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var buttonAttributes__soy559 = function buttonAttributes__soy559() { | ||
var buttonAttributes__soy562 = function buttonAttributes__soy562() { | ||
if (expanded) { | ||
@@ -545,3 +553,3 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy559(); | ||
buttonAttributes__soy562(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -585,3 +593,3 @@ soyIdom.print(label); | ||
*/ | ||
function __deltemplate_s612_c28eeb45(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s615_c28eeb45(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -609,3 +617,3 @@ opt_data = opt_data || {}; | ||
} | ||
exports.__deltemplate_s612_c28eeb45 = __deltemplate_s612_c28eeb45; | ||
exports.__deltemplate_s615_c28eeb45 = __deltemplate_s615_c28eeb45; | ||
/** | ||
@@ -622,10 +630,10 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s612_c28eeb45.Params; | ||
__deltemplate_s615_c28eeb45.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s612_c28eeb45.soyTemplateName = 'ClayDropdownBase.__deltemplate_s612_c28eeb45'; | ||
__deltemplate_s615_c28eeb45.soyTemplateName = 'ClayDropdownBase.__deltemplate_s615_c28eeb45'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), '', 0, __deltemplate_s612_c28eeb45); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), '', 0, __deltemplate_s615_c28eeb45); | ||
exports.render.params = ["items", "label", "_handleButtonClick", "_handleItemClick", "_handleItemKeyDown", "_handleSearch", "_handleTriggerKeyDown", "button", "caption", "contentRenderer", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "style", "triggerAriaLabel", "triggerClasses", "triggerSize", "triggerTitle", "useSearchableWithForm"]; | ||
exports.render.types = { "items": "list<?>", "label": "html|string", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleItemKeyDown": "any", "_handleSearch": "any", "_handleTriggerKeyDown": "any", "button": "?", "caption": "html|string", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "style": "string", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string", "useSearchableWithForm": "bool" }; | ||
exports.render.params = ["items", "label", "_handleButtonClick", "_handleItemClick", "_handleItemKeyDown", "_handleSearch", "_handleTriggerKeyDown", "_showCaption", "button", "caption", "contentRenderer", "disabled", "elementClasses", "expanded", "helpText", "id", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "style", "triggerAriaLabel", "triggerClasses", "triggerSize", "triggerTitle", "useSearchableWithForm"]; | ||
exports.render.types = { "items": "list<?>", "label": "html|string", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleItemKeyDown": "any", "_handleSearch": "any", "_handleTriggerKeyDown": "any", "_showCaption": "bool", "button": "?", "caption": "html|string", "contentRenderer": "string", "disabled": "bool", "elementClasses": "string", "expanded": "bool", "helpText": "string", "id": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "style": "string", "triggerAriaLabel": "string", "triggerClasses": "string", "triggerSize": "string", "triggerTitle": "string", "useSearchableWithForm": "bool" }; | ||
exports.items.params = ["items", "_handleItemClick", "_handleItemKeyDown", "contentRenderer", "itemsIconAlignment", "maxItems", "spritemap"]; | ||
@@ -635,4 +643,4 @@ exports.items.types = { "items": "list<?>", "_handleItemClick": "any", "_handleItemKeyDown": "any", "contentRenderer": "string", "itemsIconAlignment": "string", "maxItems": "int", "spritemap": "string" }; | ||
exports.search.types = { "spritemap": "string", "_handleSearch": "any", "useSearchableWithForm": "bool" }; | ||
exports.sections.params = ["items", "_handleButtonClick", "_handleItemClick", "_handleItemKeyDown", "_handleSearch", "button", "caption", "contentRenderer", "expanded", "helpText", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "useSearchableWithForm"]; | ||
exports.sections.types = { "items": "list<?>", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleItemKeyDown": "any", "_handleSearch": "any", "button": "?", "caption": "html|string", "contentRenderer": "string", "expanded": "bool", "helpText": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "useSearchableWithForm": "bool" }; | ||
exports.sections.params = ["items", "_handleButtonClick", "_handleItemClick", "_handleItemKeyDown", "_handleSearch", "_showCaption", "button", "caption", "contentRenderer", "expanded", "helpText", "itemsIconAlignment", "portalElementId", "searchable", "spritemap", "useSearchableWithForm"]; | ||
exports.sections.types = { "items": "list<?>", "_handleButtonClick": "any", "_handleItemClick": "any", "_handleItemKeyDown": "any", "_handleSearch": "any", "_showCaption": "bool", "button": "?", "caption": "html|string", "contentRenderer": "string", "expanded": "bool", "helpText": "string", "itemsIconAlignment": "string", "portalElementId": "string", "searchable": "bool", "spritemap": "string", "useSearchableWithForm": "bool" }; | ||
exports.trigger.params = ["label", "_handleTriggerKeyDown", "ariaLabel", "classes", "disabled", "expanded", "size", "style", "title"]; | ||
@@ -639,0 +647,0 @@ exports.trigger.types = { "label": "html|string", "_handleTriggerKeyDown": "any", "ariaLabel": "string", "classes": "string", "disabled": "bool", "expanded": "bool", "size": "string", "style": "string", "title": "string" }; |
{ | ||
"name": "clay-dropdown", | ||
"version": "2.18.5", | ||
"version": "2.19.0", | ||
"description": "Clay Dropdown Component", | ||
@@ -31,9 +31,9 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"clay-button": "^2.18.5", | ||
"clay-checkbox": "^2.18.5", | ||
"clay-component": "^2.18.5", | ||
"clay-icon": "^2.18.5", | ||
"clay-link": "^2.18.5", | ||
"clay-portal": "^2.18.5", | ||
"clay-radio": "^2.18.5", | ||
"clay-button": "^2.19.0", | ||
"clay-checkbox": "^2.19.0", | ||
"clay-component": "^2.19.0", | ||
"clay-icon": "^2.19.0", | ||
"clay-link": "^2.19.0", | ||
"clay-portal": "^2.19.0", | ||
"clay-radio": "^2.19.0", | ||
"metal": "^2.16.0", | ||
@@ -55,3 +55,3 @@ "metal-component": "^2.16.0", | ||
"browserslist-config-clay": "^2.16.2", | ||
"clay-css": "^2.18.5", | ||
"clay-css": "^2.19.0", | ||
"metal-dom": "^2.13.2", | ||
@@ -65,3 +65,3 @@ "metal-tools-soy": "^4.3.2", | ||
], | ||
"gitHead": "0dd32ddcfcb98101e63bb43b77a4f0e30afd2650" | ||
"gitHead": "34c20ebcde1007b883b05e11e32d1a339a34c906" | ||
} |
@@ -99,7 +99,7 @@ /* jshint ignore:start */ | ||
} else { | ||
var msg_2442__soy2443 = ''; | ||
var msg_2445__soy2446 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_6305962755687847469 = goog.getMsg('actions'); | ||
msg_2442__soy2443 += MSG_EXTERNAL_6305962755687847469; | ||
param54 += msg_2442__soy2443; | ||
msg_2445__soy2446 += MSG_EXTERNAL_6305962755687847469; | ||
param54 += msg_2445__soy2446; | ||
} | ||
@@ -106,0 +106,0 @@ $templateAlias2({button: button, caption: caption, disabled: disabled, elementClasses: dropdownElementClasses__soy21, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: helpText, id: id, items: items, itemsIconAlignment: itemsIconAlignment, label: trigger__soy30, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param54}, null, opt_ijData); |
@@ -101,6 +101,6 @@ /* jshint ignore:start */ | ||
var viewMoreURL = soy.asserts.assertType(opt_data.viewMoreURL == null || (goog.isString(opt_data.viewMoreURL) || opt_data.viewMoreURL instanceof goog.soy.data.SanitizedContent), 'viewMoreURL', opt_data.viewMoreURL, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var msg_2445__soy2446 = ''; | ||
var msg_2448__soy2449 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7011425206383801543 = goog.getMsg('more'); | ||
msg_2445__soy2446 += MSG_EXTERNAL_7011425206383801543; | ||
msg_2448__soy2449 += MSG_EXTERNAL_7011425206383801543; | ||
var secondaryItemsFirstGroup__soy93 = (secondaryItems != null) ? ((secondaryItems[0] != null) ? secondaryItems[0] : null) : null; | ||
@@ -123,3 +123,3 @@ var secondaryItemsSecondGroup__soy95 = (secondaryItems != null) ? ((secondaryItems[1] != null) ? secondaryItems[1] : null) : null; | ||
var textMore__soy125 = ''; | ||
textMore__soy125 += msg_2445__soy2446; | ||
textMore__soy125 += msg_2448__soy2449; | ||
var showMoreButton__soy133 = showingItems__soy115 < totalItems__soy105 ? ((viewMoreURL != null) ? {buttonStyle: 'secondary', href: viewMoreURL, label: textMore__soy125} : {label: textMore__soy125, style: 'secondary'}) : null; | ||
@@ -153,7 +153,7 @@ var trigger__soy135 = function() { | ||
} else { | ||
var msg_2448__soy2449 = ''; | ||
var msg_2451__soy2452 = ''; | ||
/** @desc */ | ||
var MSG_EXTERNAL_7387635272539030076 = goog.getMsg('new'); | ||
msg_2448__soy2449 += MSG_EXTERNAL_7387635272539030076; | ||
param176 += msg_2448__soy2449; | ||
msg_2451__soy2452 += MSG_EXTERNAL_7387635272539030076; | ||
param176 += msg_2451__soy2452; | ||
} | ||
@@ -160,0 +160,0 @@ $templateAlias2({button: showMoreButton__soy133, caption: param144, disabled: disabled, elementClasses: elementClasses, events: {buttonClicked: _handleButtonClick, itemClicked: _handleItemClick, toggle: toggle}, expanded: expanded, helpText: showMoreButton__soy133 ? helpText : null, id: id, items: items__soy123, itemsIconAlignment: itemsIconAlignment, label: trigger__soy135, preferredAlign: preferredAlign, ref: 'dropdown', spritemap: spritemap, style: 'primary', triggerAriaLabel: triggerAriaLabel, triggerClasses: triggerClasses, triggerTitle: param176}, null, opt_ijData); |
@@ -442,2 +442,26 @@ import 'clay-button'; | ||
/** | ||
* Workaround for avoiding Closure Templates render an empty `.dropdown-caption` element. | ||
* This workaround was placed here because Soy isn't considering a `msg` as a `string` | ||
* making impossible the usage of `kind="html|string"`. | ||
* | ||
* When having a `html` inside `kind` Soy's attribute, this property is considered a function, | ||
* impeding us to know if there is content or not to render `caption`. | ||
* @private | ||
*/ | ||
syncCaption() { | ||
if (this.refs.portal && this.refs.portal.element) { | ||
const dropdownCaption = this.refs.portal.element.querySelector( | ||
'.dropdown-caption' | ||
); | ||
if (dropdownCaption) { | ||
if (dropdownCaption.innerText === '') { | ||
this._showCaption = false; | ||
} else { | ||
this._showCaption = true; | ||
} | ||
} | ||
} | ||
} | ||
/** | ||
* @inheritDoc | ||
@@ -507,2 +531,13 @@ */ | ||
/** | ||
* Flag to indicate if Dropdown's Caption can be shown. | ||
* @default false | ||
* @instance | ||
* @memberof ClayDropdownBase | ||
* @type {?Boolean} | ||
*/ | ||
_showCaption: Config.bool() | ||
.value(true) | ||
.internal(), | ||
/** | ||
* Button configuration to place a button at dropdown footer. | ||
@@ -509,0 +544,0 @@ * @default undefined |
@@ -45,2 +45,3 @@ /* jshint ignore:start */ | ||
* _handleTriggerKeyDown: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -87,2 +88,4 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var _handleTriggerKeyDown = opt_data._handleTriggerKeyDown; | ||
/** @type {boolean|null|undefined} */ | ||
var _showCaption = soy.asserts.assertType(opt_data._showCaption == null || (goog.isBoolean(opt_data._showCaption) || opt_data._showCaption === 1 || opt_data._showCaption === 0), '_showCaption', opt_data._showCaption, 'boolean|null|undefined'); | ||
/** @type {?} */ | ||
@@ -124,3 +127,3 @@ var button = opt_data.button; | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || (goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0), 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var attributes__soy295 = function() { | ||
var attributes__soy296 = function() { | ||
incrementalDom.attr('class', 'dropdown' + (elementClasses ? ' ' + elementClasses : '') + (expanded ? ' show' : '')); | ||
@@ -132,6 +135,6 @@ if (id) { | ||
incrementalDom.elementOpenStart('div'); | ||
attributes__soy295(); | ||
attributes__soy296(); | ||
incrementalDom.elementOpenEnd(); | ||
$trigger({_handleTriggerKeyDown: _handleTriggerKeyDown, ariaLabel: triggerAriaLabel, classes: triggerClasses, disabled: disabled, expanded: expanded, label: label, size: triggerSize, style: style, title: triggerTitle}, null, opt_ijData); | ||
$sections({_handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, _handleSearch: _handleSearch, button: button, caption: caption, contentRenderer: ($$temp = contentRenderer) == null ? '' : $$temp, expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap, useSearchableWithForm: ($$temp = useSearchableWithForm) == null ? true : $$temp}, null, opt_ijData); | ||
$sections({_handleButtonClick: _handleButtonClick, _handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, _handleSearch: _handleSearch, _showCaption: ($$temp = _showCaption) == null ? true : $$temp, button: button, caption: caption, contentRenderer: ($$temp = contentRenderer) == null ? '' : $$temp, expanded: expanded, helpText: helpText, items: items, itemsIconAlignment: itemsIconAlignment, portalElementId: portalElementId, searchable: searchable, spritemap: spritemap, useSearchableWithForm: ($$temp = useSearchableWithForm) == null ? true : $$temp}, null, opt_ijData); | ||
incrementalDom.elementClose('div'); | ||
@@ -149,2 +152,3 @@ } | ||
* _handleTriggerKeyDown: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -207,19 +211,19 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var spritemap = soy.asserts.assertType(opt_data.spritemap == null || (goog.isString(opt_data.spritemap) || opt_data.spritemap instanceof goog.soy.data.SanitizedContent), 'spritemap', opt_data.spritemap, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var index353Limit = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
for (var index353 = 0; index353 < index353Limit; index353++) { | ||
var item__soy355 = items[index353]; | ||
var variant__soy357 = ''; | ||
var index355Limit = maxItems && maxItems < (items.length) ? maxItems : (items.length); | ||
for (var index355 = 0; index355 < index355Limit; index355++) { | ||
var item__soy357 = items[index355]; | ||
var variant__soy359 = ''; | ||
var $tmp = null; | ||
if ((contentRenderer != null) && contentRenderer != '') { | ||
$tmp = contentRenderer; | ||
} else if ((item__soy355.contentRenderer != null) && item__soy355.contentRenderer != '') { | ||
$tmp = item__soy355.contentRenderer; | ||
} else if (item__soy355.type) { | ||
$tmp = item__soy355.type; | ||
} else if ((item__soy357.contentRenderer != null) && item__soy357.contentRenderer != '') { | ||
$tmp = item__soy357.contentRenderer; | ||
} else if (item__soy357.type) { | ||
$tmp = item__soy357.type; | ||
} else { | ||
$tmp = 'item'; | ||
} | ||
variant__soy357 += $tmp; | ||
$templateAlias1({active: item__soy355.active, checked: item__soy355.checked, contentRenderer: variant__soy357, data: item__soy355.data, disabled: item__soy355.disabled, events: {itemClicked: _handleItemClick, itemKeyDown: _handleItemKeyDown}, href: item__soy355.href, icon: item__soy355.icon, icons: item__soy355.icons, inputName: item__soy355.inputName, inputValue: item__soy355.inputValue, items: item__soy355.items, itemsIconAlignment: itemsIconAlignment, label: item__soy355.label ? '' + item__soy355.label : '', maxItems: item__soy355.maxItems, ref: 'item' + index353, separator: item__soy355.separator, spritemap: spritemap, target: item__soy355.target, title: item__soy355.title, type: item__soy355.type}, null, opt_ijData); | ||
if (item__soy355.separator) { | ||
variant__soy359 += $tmp; | ||
$templateAlias1({active: item__soy357.active, checked: item__soy357.checked, contentRenderer: variant__soy359, data: item__soy357.data, disabled: item__soy357.disabled, events: {itemClicked: _handleItemClick, itemKeyDown: _handleItemKeyDown}, href: item__soy357.href, icon: item__soy357.icon, icons: item__soy357.icons, inputName: item__soy357.inputName, inputValue: item__soy357.inputValue, items: item__soy357.items, itemsIconAlignment: itemsIconAlignment, label: item__soy357.label ? '' + item__soy357.label : '', maxItems: item__soy357.maxItems, ref: 'item' + index355, separator: item__soy357.separator, spritemap: spritemap, target: item__soy357.target, title: item__soy357.title, type: item__soy357.type}, null, opt_ijData); | ||
if (item__soy357.separator) { | ||
$templateAlias1({contentRenderer: 'separator'}, null, opt_ijData); | ||
@@ -266,3 +270,3 @@ } | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || (goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0), 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var content__soy412 = function() { | ||
var content__soy414 = function() { | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -297,6 +301,6 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
incrementalDom.elementOpen('form'); | ||
content__soy412(); | ||
content__soy414(); | ||
incrementalDom.elementClose('form'); | ||
} else { | ||
content__soy412(); | ||
content__soy414(); | ||
} | ||
@@ -325,2 +329,3 @@ } | ||
* _handleSearch: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -355,2 +360,4 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var _handleSearch = opt_data._handleSearch; | ||
/** @type {boolean|null|undefined} */ | ||
var _showCaption = soy.asserts.assertType(opt_data._showCaption == null || (goog.isBoolean(opt_data._showCaption) || opt_data._showCaption === 1 || opt_data._showCaption === 0), '_showCaption', opt_data._showCaption, 'boolean|null|undefined'); | ||
/** @type {?} */ | ||
@@ -376,4 +383,4 @@ var button = opt_data.button; | ||
var useSearchableWithForm = soy.asserts.assertType(opt_data.useSearchableWithForm == null || (goog.isBoolean(opt_data.useSearchableWithForm) || opt_data.useSearchableWithForm === 1 || opt_data.useSearchableWithForm === 0), 'useSearchableWithForm', opt_data.useSearchableWithForm, 'boolean|null|undefined'); | ||
var dropdownMenu__soy449 = function() { | ||
var listAttributes__soy451 = function() { | ||
var dropdownMenu__soy452 = function() { | ||
var listAttributes__soy454 = function() { | ||
incrementalDom.attr('class', 'dropdown-menu' + (itemsIconAlignment == 'left' || itemsIconAlignment == 'left-right' ? ' dropdown-menu-indicator-start' : '') + (itemsIconAlignment == 'right' || itemsIconAlignment == 'left-right' ? ' dropdown-menu-indicator-end' : '') + (expanded ? ' show' : '')); | ||
@@ -383,3 +390,3 @@ incrementalDom.attr('ref', 'menu'); | ||
incrementalDom.elementOpenStart('div'); | ||
listAttributes__soy451(); | ||
listAttributes__soy454(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -397,7 +404,7 @@ if (helpText) { | ||
} | ||
var listItemsContent__soy483 = function() { | ||
var listItemsContent__soy486 = function() { | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), contentRenderer, false)(opt_data, null, opt_ijData); | ||
}; | ||
var captionContent__soy494 = function() { | ||
if (caption && (caption != null)) { | ||
var captionContent__soy497 = function() { | ||
if (_showCaption && caption && (caption != null)) { | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -415,5 +422,5 @@ incrementalDom.attr('class', 'dropdown-caption'); | ||
incrementalDom.elementOpenEnd(); | ||
listItemsContent__soy483(); | ||
listItemsContent__soy486(); | ||
incrementalDom.elementClose('div'); | ||
captionContent__soy494(); | ||
captionContent__soy497(); | ||
incrementalDom.elementOpenStart('div'); | ||
@@ -430,11 +437,11 @@ incrementalDom.attr('class', 'dropdown-section'); | ||
} else { | ||
listItemsContent__soy483(); | ||
captionContent__soy494(); | ||
listItemsContent__soy486(); | ||
captionContent__soy497(); | ||
} | ||
incrementalDom.elementClose('div'); | ||
}; | ||
var param541 = function() { | ||
dropdownMenu__soy449(); | ||
var param544 = function() { | ||
dropdownMenu__soy452(); | ||
}; | ||
$templateAlias4({content: param541, portalElement: '#' + portalElementId, ref: 'portal'}, null, opt_ijData); | ||
$templateAlias4({content: param544, portalElement: '#' + portalElementId, ref: 'portal'}, null, opt_ijData); | ||
} | ||
@@ -449,2 +456,3 @@ exports.sections = $sections; | ||
* _handleSearch: (*|null|undefined), | ||
* _showCaption: (boolean|null|undefined), | ||
* button: (?), | ||
@@ -505,3 +513,3 @@ * caption: (!goog.soy.data.SanitizedContent|function()|null|string|undefined), | ||
var title = soy.asserts.assertType(opt_data.title == null || (goog.isString(opt_data.title) || opt_data.title instanceof goog.soy.data.SanitizedContent), 'title', opt_data.title, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var buttonAttributes__soy559 = function() { | ||
var buttonAttributes__soy562 = function() { | ||
if (expanded) { | ||
@@ -530,3 +538,3 @@ incrementalDom.attr('aria-expanded', 'true'); | ||
incrementalDom.elementOpenStart('button'); | ||
buttonAttributes__soy559(); | ||
buttonAttributes__soy562(); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -571,3 +579,3 @@ soyIdom.print(label); | ||
*/ | ||
function __deltemplate_s612_c28eeb45(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s615_c28eeb45(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -595,3 +603,3 @@ opt_data = opt_data || {}; | ||
} | ||
exports.__deltemplate_s612_c28eeb45 = __deltemplate_s612_c28eeb45; | ||
exports.__deltemplate_s615_c28eeb45 = __deltemplate_s615_c28eeb45; | ||
/** | ||
@@ -608,10 +616,10 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s612_c28eeb45.Params; | ||
__deltemplate_s615_c28eeb45.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s612_c28eeb45.soyTemplateName = 'ClayDropdownBase.__deltemplate_s612_c28eeb45'; | ||
__deltemplate_s615_c28eeb45.soyTemplateName = 'ClayDropdownBase.__deltemplate_s615_c28eeb45'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), '', 0, __deltemplate_s612_c28eeb45); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownBase.Content.idom'), '', 0, __deltemplate_s615_c28eeb45); | ||
exports.render.params = ["items","label","_handleButtonClick","_handleItemClick","_handleItemKeyDown","_handleSearch","_handleTriggerKeyDown","button","caption","contentRenderer","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","portalElementId","searchable","spritemap","style","triggerAriaLabel","triggerClasses","triggerSize","triggerTitle","useSearchableWithForm"]; | ||
exports.render.types = {"items":"list<?>","label":"html|string","_handleButtonClick":"any","_handleItemClick":"any","_handleItemKeyDown":"any","_handleSearch":"any","_handleTriggerKeyDown":"any","button":"?","caption":"html|string","contentRenderer":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","style":"string","triggerAriaLabel":"string","triggerClasses":"string","triggerSize":"string","triggerTitle":"string","useSearchableWithForm":"bool"}; | ||
exports.render.params = ["items","label","_handleButtonClick","_handleItemClick","_handleItemKeyDown","_handleSearch","_handleTriggerKeyDown","_showCaption","button","caption","contentRenderer","disabled","elementClasses","expanded","helpText","id","itemsIconAlignment","portalElementId","searchable","spritemap","style","triggerAriaLabel","triggerClasses","triggerSize","triggerTitle","useSearchableWithForm"]; | ||
exports.render.types = {"items":"list<?>","label":"html|string","_handleButtonClick":"any","_handleItemClick":"any","_handleItemKeyDown":"any","_handleSearch":"any","_handleTriggerKeyDown":"any","_showCaption":"bool","button":"?","caption":"html|string","contentRenderer":"string","disabled":"bool","elementClasses":"string","expanded":"bool","helpText":"string","id":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","style":"string","triggerAriaLabel":"string","triggerClasses":"string","triggerSize":"string","triggerTitle":"string","useSearchableWithForm":"bool"}; | ||
exports.items.params = ["items","_handleItemClick","_handleItemKeyDown","contentRenderer","itemsIconAlignment","maxItems","spritemap"]; | ||
@@ -621,4 +629,4 @@ exports.items.types = {"items":"list<?>","_handleItemClick":"any","_handleItemKeyDown":"any","contentRenderer":"string","itemsIconAlignment":"string","maxItems":"int","spritemap":"string"}; | ||
exports.search.types = {"spritemap":"string","_handleSearch":"any","useSearchableWithForm":"bool"}; | ||
exports.sections.params = ["items","_handleButtonClick","_handleItemClick","_handleItemKeyDown","_handleSearch","button","caption","contentRenderer","expanded","helpText","itemsIconAlignment","portalElementId","searchable","spritemap","useSearchableWithForm"]; | ||
exports.sections.types = {"items":"list<?>","_handleButtonClick":"any","_handleItemClick":"any","_handleItemKeyDown":"any","_handleSearch":"any","button":"?","caption":"html|string","contentRenderer":"string","expanded":"bool","helpText":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","useSearchableWithForm":"bool"}; | ||
exports.sections.params = ["items","_handleButtonClick","_handleItemClick","_handleItemKeyDown","_handleSearch","_showCaption","button","caption","contentRenderer","expanded","helpText","itemsIconAlignment","portalElementId","searchable","spritemap","useSearchableWithForm"]; | ||
exports.sections.types = {"items":"list<?>","_handleButtonClick":"any","_handleItemClick":"any","_handleItemKeyDown":"any","_handleSearch":"any","_showCaption":"bool","button":"?","caption":"html|string","contentRenderer":"string","expanded":"bool","helpText":"string","itemsIconAlignment":"string","portalElementId":"string","searchable":"bool","spritemap":"string","useSearchableWithForm":"bool"}; | ||
exports.trigger.params = ["label","_handleTriggerKeyDown","ariaLabel","classes","disabled","expanded","size","style","title"]; | ||
@@ -625,0 +633,0 @@ exports.trigger.types = {"label":"html|string","_handleTriggerKeyDown":"any","ariaLabel":"string","classes":"string","disabled":"bool","expanded":"bool","size":"string","style":"string","title":"string"}; |
@@ -112,4 +112,4 @@ /* jshint ignore:start */ | ||
var type = soy.asserts.assertType(opt_data.type == null || (goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent), 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var variant__soy841 = ($$temp = contentRenderer) == null ? 'item' : $$temp; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy841, false)({_handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, active: active, checked: checked, disabled: disabled, href: href, icon: icon, icons: icons, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title, type: type}, null, opt_ijData); | ||
var variant__soy844 = ($$temp = contentRenderer) == null ? 'item' : $$temp; | ||
soy.$$getDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), variant__soy844, false)({_handleItemClick: _handleItemClick, _handleItemKeyDown: _handleItemKeyDown, active: active, checked: checked, disabled: disabled, href: href, icon: icon, icons: icons, inputName: inputName, inputValue: inputValue, items: items, itemsIconAlignment: itemsIconAlignment, label: label ? '' + label : '', maxItems: maxItems, separator: separator, spritemap: spritemap, target: target, title: title, type: type}, null, opt_ijData); | ||
} | ||
@@ -174,3 +174,3 @@ exports.render = $render; | ||
*/ | ||
function __deltemplate_s864_3e6ffd21(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s867_3e6ffd21(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -215,11 +215,11 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var type = soy.asserts.assertType(opt_data.type == null || (goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent), 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var itemContent__soy885 = function() { | ||
var elementClasses__soy887 = ''; | ||
elementClasses__soy887 += 'dropdown-item'; | ||
elementClasses__soy887 += active ? ' active' : ''; | ||
elementClasses__soy887 += disabled ? ' disabled' : ''; | ||
var labelContent__soy898 = function() { | ||
var iconContent__soy900 = function() { | ||
var itemContent__soy888 = function() { | ||
var elementClasses__soy890 = ''; | ||
elementClasses__soy890 += 'dropdown-item'; | ||
elementClasses__soy890 += active ? ' active' : ''; | ||
elementClasses__soy890 += disabled ? ' disabled' : ''; | ||
var labelContent__soy901 = function() { | ||
var iconContent__soy903 = function() { | ||
if (icon && spritemap) { | ||
var classes__soy905 = ''; | ||
var classes__soy908 = ''; | ||
var $tmp = null; | ||
@@ -233,5 +233,5 @@ if (itemsIconAlignment == 'left') { | ||
} | ||
classes__soy905 += $tmp; | ||
classes__soy908 += $tmp; | ||
incrementalDom.elementOpenStart('span'); | ||
incrementalDom.attr('class', classes__soy905); | ||
incrementalDom.attr('class', classes__soy908); | ||
incrementalDom.elementOpenEnd(); | ||
@@ -250,3 +250,3 @@ $templateAlias1({spritemap: spritemap, symbol: icon}, null, opt_ijData); | ||
if (icon && itemsIconAlignment == 'left') { | ||
iconContent__soy900(); | ||
iconContent__soy903(); | ||
} | ||
@@ -263,3 +263,3 @@ } | ||
if (icon && itemsIconAlignment == 'right') { | ||
iconContent__soy900(); | ||
iconContent__soy903(); | ||
} | ||
@@ -277,8 +277,8 @@ } | ||
} | ||
$templateAlias2({elementClasses: elementClasses__soy887, href: '' + $tmp$$1, label: labelContent__soy898, target: target, title: title}, null, opt_ijData); | ||
$templateAlias2({elementClasses: elementClasses__soy890, href: '' + $tmp$$1, label: labelContent__soy901, target: target, title: title}, null, opt_ijData); | ||
} else { | ||
$templateAlias3({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy887, label: labelContent__soy898, size: 'sm', spritemap: spritemap, style: 'link'}, null, opt_ijData); | ||
$templateAlias3({ariaLabel: label, disabled: disabled, elementClasses: elementClasses__soy890, label: labelContent__soy901, size: 'sm', spritemap: spritemap, style: 'link'}, null, opt_ijData); | ||
} | ||
}; | ||
var itemAttributes__soy989 = function() { | ||
var itemAttributes__soy992 = function() { | ||
if (!disabled) { | ||
@@ -291,8 +291,8 @@ incrementalDom.attr('data-onclick', _handleItemClick); | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy989(); | ||
itemAttributes__soy992(); | ||
incrementalDom.elementOpenEnd(); | ||
itemContent__soy885(); | ||
itemContent__soy888(); | ||
incrementalDom.elementClose('li'); | ||
} | ||
exports.__deltemplate_s864_3e6ffd21 = __deltemplate_s864_3e6ffd21; | ||
exports.__deltemplate_s867_3e6ffd21 = __deltemplate_s867_3e6ffd21; | ||
/** | ||
@@ -321,7 +321,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s864_3e6ffd21.Params; | ||
__deltemplate_s867_3e6ffd21.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s864_3e6ffd21.soyTemplateName = 'ClayDropdownItem.__deltemplate_s864_3e6ffd21'; | ||
__deltemplate_s867_3e6ffd21.soyTemplateName = 'ClayDropdownItem.__deltemplate_s867_3e6ffd21'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), '', 0, __deltemplate_s864_3e6ffd21); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), '', 0, __deltemplate_s867_3e6ffd21); | ||
@@ -356,3 +356,3 @@ | ||
*/ | ||
function __deltemplate_s1004_27296c4e(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s1007_27296c4e(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -397,6 +397,6 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var type = soy.asserts.assertType(opt_data.type == null || (goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent), 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var checkbox__soy1025 = function() { | ||
var checkbox__soy1028 = function() { | ||
$templateAlias4({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, null, opt_ijData); | ||
}; | ||
var itemAttributes__soy1036 = function() { | ||
var itemAttributes__soy1039 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -410,8 +410,8 @@ if (!disabled) { | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy1036(); | ||
itemAttributes__soy1039(); | ||
incrementalDom.elementOpenEnd(); | ||
checkbox__soy1025(); | ||
checkbox__soy1028(); | ||
incrementalDom.elementClose('li'); | ||
} | ||
exports.__deltemplate_s1004_27296c4e = __deltemplate_s1004_27296c4e; | ||
exports.__deltemplate_s1007_27296c4e = __deltemplate_s1007_27296c4e; | ||
/** | ||
@@ -440,7 +440,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s1004_27296c4e.Params; | ||
__deltemplate_s1007_27296c4e.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s1004_27296c4e.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1004_27296c4e'; | ||
__deltemplate_s1007_27296c4e.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1007_27296c4e'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'checkbox', 0, __deltemplate_s1004_27296c4e); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'checkbox', 0, __deltemplate_s1007_27296c4e); | ||
@@ -476,3 +476,3 @@ | ||
*/ | ||
function __deltemplate_s1055_4a8d8c89(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s1058_4a8d8c89(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -529,3 +529,3 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
} | ||
exports.__deltemplate_s1055_4a8d8c89 = __deltemplate_s1055_4a8d8c89; | ||
exports.__deltemplate_s1058_4a8d8c89 = __deltemplate_s1058_4a8d8c89; | ||
/** | ||
@@ -555,7 +555,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s1055_4a8d8c89.Params; | ||
__deltemplate_s1058_4a8d8c89.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s1055_4a8d8c89.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1055_4a8d8c89'; | ||
__deltemplate_s1058_4a8d8c89.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1058_4a8d8c89'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'group', 0, __deltemplate_s1055_4a8d8c89); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'group', 0, __deltemplate_s1058_4a8d8c89); | ||
@@ -590,3 +590,3 @@ | ||
*/ | ||
function __deltemplate_s1094_e71956db(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s1097_e71956db(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -631,6 +631,6 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
var type = soy.asserts.assertType(opt_data.type == null || (goog.isString(opt_data.type) || opt_data.type instanceof goog.soy.data.SanitizedContent), 'type', opt_data.type, '!goog.soy.data.SanitizedContent|null|string|undefined'); | ||
var radio__soy1115 = function() { | ||
var radio__soy1118 = function() { | ||
$templateAlias6({checked: checked, disabled: disabled, inline: true, label: label, name: inputName, value: inputValue}, null, opt_ijData); | ||
}; | ||
var itemAttributes__soy1126 = function() { | ||
var itemAttributes__soy1129 = function() { | ||
incrementalDom.attr('class', 'dropdown-item' + (active || checked ? ' active' : '')); | ||
@@ -644,8 +644,8 @@ if (!disabled) { | ||
incrementalDom.elementOpenStart('li'); | ||
itemAttributes__soy1126(); | ||
itemAttributes__soy1129(); | ||
incrementalDom.elementOpenEnd(); | ||
radio__soy1115(); | ||
radio__soy1118(); | ||
incrementalDom.elementClose('li'); | ||
} | ||
exports.__deltemplate_s1094_e71956db = __deltemplate_s1094_e71956db; | ||
exports.__deltemplate_s1097_e71956db = __deltemplate_s1097_e71956db; | ||
/** | ||
@@ -674,7 +674,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s1094_e71956db.Params; | ||
__deltemplate_s1097_e71956db.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s1094_e71956db.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1094_e71956db'; | ||
__deltemplate_s1097_e71956db.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1097_e71956db'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'radio', 0, __deltemplate_s1094_e71956db); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'radio', 0, __deltemplate_s1097_e71956db); | ||
@@ -709,3 +709,3 @@ | ||
*/ | ||
function __deltemplate_s1145_efbc8015(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s1148_efbc8015(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -771,3 +771,3 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
} | ||
exports.__deltemplate_s1145_efbc8015 = __deltemplate_s1145_efbc8015; | ||
exports.__deltemplate_s1148_efbc8015 = __deltemplate_s1148_efbc8015; | ||
/** | ||
@@ -796,7 +796,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s1145_efbc8015.Params; | ||
__deltemplate_s1148_efbc8015.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s1145_efbc8015.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1145_efbc8015'; | ||
__deltemplate_s1148_efbc8015.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1148_efbc8015'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'radiogroup', 0, __deltemplate_s1145_efbc8015); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'radiogroup', 0, __deltemplate_s1148_efbc8015); | ||
@@ -831,3 +831,3 @@ | ||
*/ | ||
function __deltemplate_s1187_03a3ad8c(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
function __deltemplate_s1190_03a3ad8c(opt_data, opt_ijData, opt_ijData_deprecated) { | ||
opt_ijData = opt_ijData_deprecated || opt_ijData; | ||
@@ -879,3 +879,3 @@ /** @type {!goog.soy.data.SanitizedContent|string} */ | ||
} | ||
exports.__deltemplate_s1187_03a3ad8c = __deltemplate_s1187_03a3ad8c; | ||
exports.__deltemplate_s1190_03a3ad8c = __deltemplate_s1190_03a3ad8c; | ||
/** | ||
@@ -904,7 +904,7 @@ * @typedef {{ | ||
*/ | ||
__deltemplate_s1187_03a3ad8c.Params; | ||
__deltemplate_s1190_03a3ad8c.Params; | ||
if (goog.DEBUG) { | ||
__deltemplate_s1187_03a3ad8c.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1187_03a3ad8c'; | ||
__deltemplate_s1190_03a3ad8c.soyTemplateName = 'ClayDropdownItem.__deltemplate_s1190_03a3ad8c'; | ||
} | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'separator', 0, __deltemplate_s1187_03a3ad8c); | ||
soy.$$registerDelegateFn(soy.$$getDelTemplateId('ClayDropdownItem.Item.idom'), 'separator', 0, __deltemplate_s1190_03a3ad8c); | ||
@@ -911,0 +911,0 @@ exports.render.params = ["_handleItemClick","_handleItemKeyDown","active","checked","contentRenderer","disabled","href","icon","icons","inputName","inputValue","items","itemsIconAlignment","label","maxItems","separator","spritemap","target","title","type"]; |
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
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
951695
0.75%9413
0.88%Updated
Updated
Updated
Updated
Updated
Updated
Updated