{"version":3,"sources":["kendo.toolbar.js"],"names":["f","define","$","undefined","adjustPopupWidth","width","anchor","this","options","computedWidth","outerWidth","kendo","wrap","element","addClass","css","fontFamily","min-width","toggleActive","e","target","is","toggleClass","STATE_ACTIVE","type","actionSheetWrap","hasClass","closest","parent","preventClick","preventDefault","findFocusableSibling","dir","getSibling","fn","next","prev","getter","first","last","candidate","call","length","find","components","Item","Button","ToolBarButton","OverflowButton","ButtonGroup","ToolBarButtonGroup","OverflowButtonGroup","ToolBarSplitButton","OverflowSplitButton","ToolBarSeparator","OverflowSeparator","TemplateItem","OverflowTemplateItem","Group","ToolBar","window","Class","Widget","ui","proxy","isFunction","keys","_outerWidth","TOOLBAR","BUTTON","OVERFLOW_BUTTON","TOGGLE_BUTTON","BUTTON_GROUP","SPLIT_BUTTON","SEPARATOR","POPUP","RESIZABLE_TOOLBAR","STATE_DISABLED","STATE_HIDDEN","GROUP_START","GROUP_END","PRIMARY","ICON","ICON_PREFIX","BUTTON_ICON","BUTTON_ICON_TEXT","LIST_CONTAINER","SPLIT_BUTTON_ARROW","OVERFLOW_ANCHOR","OVERFLOW_CONTAINER","FIRST_TOOLBAR_VISIBLE","LAST_TOOLBAR_VISIBLE","CLICK","TOGGLE","OPEN","CLOSE","OVERFLOW_OPEN","OVERFLOW_CLOSE","OVERFLOW_NEVER","OVERFLOW_AUTO","OVERFLOW_ALWAYS","OVERFLOW_HIDDEN","KENDO_UID_ATTR","attr","toolbar","overflowAnchor","overflowContainer","registerComponent","name","overflow","extend","addOverflowAttr","addUidAttr","uid","addIdAttr","id","addOverflowIdAttr","attributes","show","removeClass","hidden","hide","remove","enable","isEnabled","twin","data","resizable","popup","init","useButtonTag","primary","togglable","toggle","selected","url","mobile","group","addToGroup","click","clickHandler","toggleHandler","state","propagate","select","getParentGroup","isChild","_addGraphics","isEmpty","span","img","icon","spriteCssClass","imageUrl","contents","filter","each","idx","el","nodeType","trim","nodeValue","children","prependTo","align","showText","text","html","hasIcon","showIcon","button","_wrap","overflowHidden","createButtons","buttonConstructor","item","i","items","buttons","guid","appendTo","refresh","buttonGroup","mainButton","arrowButton","popupElement","removeAttr","createMenuButtons","createPopup","_navigatable","main","splitButton","kendoPopup","that","on","li","keyCode","ESC","TAB","altKey","UP","focus","DOWN","SPACEBAR","ENTER","userEvents","trigger","menuButtons","rootUid","isRtl","_isRtl","copyAnchorStyles","animation","open","activate","close","off","destroy","separator","template","jQuery","add","index","inArray","splice","tmp","wrapper","support","_groups","isMobile","effects","_renderOverflow","overflowUserEvents","UserEvents","threshold","allowSelection","tap","_toggleOverflow","_resizeHandler","onResize","resize","document","_buttonClick","press","release","_toggleOverflowAnchor","notify","events","groupName","unbindResize","tool","overflowTool","component","itemClasses","overflowTemplate","container","angular","elements","get","_shrink","innerWidth","_getItem","toolbarItem","overflowItem","isResizable","getSelectedFromGroup","checked","horizontalDirection","append","Popup","origin","position","parseFloat","innerHeight","isComplexTool","hasVisibleChildren","visibility","splitContainer","handler","eventData","urlTarget","isSplitButtonArrow","_toggle","sender","parents","_keydown","lastHasFocus","firstHasFocus","isFirstTool","prevFocusable","isOverflowAnchor","parentsUntil","shiftKey","not","_getPrevFocusable","activeElement","elementToFocus","prevElement","prevElements","prevAll","isDefaultPrevented","_resize","containerWidth","_stretch","_markVisibles","_childrenWidth","childrenWidth","Math","ceil","commandElement","visibleCommands","eq","_hideItem","hiddenCommands","_showItem","overflowItems","toolbarItems","visibleOverflowItems","visibleToolbarItems","plugin","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,iBACH,aACA,mBACA,eACDD,IACL,WA6qCE,MArqCC,UAAUE,EAAGC,GAkiBV,QAASC,KACL,GAAsEC,GAAlEC,EAASC,KAAKC,QAAQF,OAAQG,EAAgBC,EAAWJ,EAC7DK,GAAMC,KAAKL,KAAKM,SAASC,SAAS,mBAE9BT,EADmC,eAAnCE,KAAKM,QAAQE,IAAI,cACTN,GAAiBC,EA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ACRhK,OAAOjD,OACE,kBAAVV,SAAwBA,OAAO+T,IAAM/T,OAAS,SAAUgU,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.toolbar.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.toolbar', [\n 'kendo.core',\n 'kendo.userevents',\n 'kendo.popup'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'toolbar',\n name: 'ToolBar',\n category: 'web',\n description: 'The ToolBar widget displays one or more command buttons divided into groups.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, Class = kendo.Class, Widget = kendo.ui.Widget, proxy = $.proxy, isFunction = kendo.isFunction, keys = kendo.keys, outerWidth = kendo._outerWidth, TOOLBAR = 'k-toolbar', BUTTON = 'k-button', OVERFLOW_BUTTON = 'k-overflow-button', TOGGLE_BUTTON = 'k-toggle-button', BUTTON_GROUP = 'k-button-group', SPLIT_BUTTON = 'k-split-button', SEPARATOR = 'k-separator', POPUP = 'k-popup', RESIZABLE_TOOLBAR = 'k-toolbar-resizable', STATE_ACTIVE = 'k-state-active', STATE_DISABLED = 'k-state-disabled', STATE_HIDDEN = 'k-state-hidden', GROUP_START = 'k-group-start', GROUP_END = 'k-group-end', PRIMARY = 'k-primary', ICON = 'k-icon', ICON_PREFIX = 'k-i-', BUTTON_ICON = 'k-button-icon', BUTTON_ICON_TEXT = 'k-button-icontext', LIST_CONTAINER = 'k-list-container k-split-container', SPLIT_BUTTON_ARROW = 'k-split-button-arrow', OVERFLOW_ANCHOR = 'k-overflow-anchor', OVERFLOW_CONTAINER = 'k-overflow-container', FIRST_TOOLBAR_VISIBLE = 'k-toolbar-first-visible', LAST_TOOLBAR_VISIBLE = 'k-toolbar-last-visible', CLICK = 'click', TOGGLE = 'toggle', OPEN = 'open', CLOSE = 'close', OVERFLOW_OPEN = 'overflowOpen', OVERFLOW_CLOSE = 'overflowClose', OVERFLOW_NEVER = 'never', OVERFLOW_AUTO = 'auto', OVERFLOW_ALWAYS = 'always', OVERFLOW_HIDDEN = 'k-overflow-hidden', KENDO_UID_ATTR = kendo.attr('uid');\n kendo.toolbar = {};\n var components = {\n overflowAnchor: '
',\n overflowContainer: ''\n };\n kendo.toolbar.registerComponent = function (name, toolbar, overflow) {\n components[name] = {\n toolbar: toolbar,\n overflow: overflow\n };\n };\n var Item = kendo.Class.extend({\n addOverflowAttr: function () {\n this.element.attr(kendo.attr('overflow'), this.options.overflow || OVERFLOW_AUTO);\n },\n addUidAttr: function () {\n this.element.attr(KENDO_UID_ATTR, this.options.uid);\n },\n addIdAttr: function () {\n if (this.options.id) {\n this.element.attr('id', this.options.id);\n }\n },\n addOverflowIdAttr: function () {\n if (this.options.id) {\n this.element.attr('id', this.options.id + '_overflow');\n }\n },\n attributes: function () {\n if (this.options.attributes) {\n this.element.attr(this.options.attributes);\n }\n },\n show: function () {\n this.element.removeClass(STATE_HIDDEN).show();\n this.options.hidden = false;\n },\n hide: function () {\n this.element.addClass(STATE_HIDDEN).hide();\n this.options.hidden = true;\n },\n remove: function () {\n this.element.remove();\n },\n enable: function (isEnabled) {\n if (isEnabled === undefined) {\n isEnabled = true;\n }\n this.element.toggleClass(STATE_DISABLED, !isEnabled);\n this.options.enable = isEnabled;\n },\n twin: function () {\n var uid = this.element.attr(KENDO_UID_ATTR);\n if (this.overflow) {\n return this.toolbar.element.find('[' + KENDO_UID_ATTR + '=\\'' + uid + '\\']').data(this.options.type);\n } else if (this.toolbar.options.resizable) {\n return this.toolbar.popup.element.find('[' + KENDO_UID_ATTR + '=\\'' + uid + '\\']').data(this.options.type);\n }\n }\n });\n kendo.toolbar.Item = Item;\n var Button = Item.extend({\n init: function (options, toolbar) {\n var element = options.useButtonTag ? $('') : $('');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.attributes();\n if (options.primary) {\n element.addClass(PRIMARY);\n }\n if (options.togglable) {\n element.addClass(TOGGLE_BUTTON);\n this.toggle(options.selected);\n }\n if (options.url !== undefined && !options.useButtonTag) {\n element.attr('href', options.url);\n if (options.mobile) {\n element.attr(kendo.attr('role'), 'button');\n }\n }\n if (options.group) {\n element.attr(kendo.attr('group'), options.group);\n this.group = this.toolbar.addToGroup(this, options.group);\n }\n if (!options.togglable && options.click && isFunction(options.click)) {\n this.clickHandler = options.click;\n }\n if (options.togglable && options.toggle && isFunction(options.toggle)) {\n this.toggleHandler = options.toggle;\n }\n },\n toggle: function (state, propagate) {\n state = !!state;\n if (this.group && state) {\n this.group.select(this);\n } else if (!this.group) {\n this.select(state);\n }\n if (propagate && this.twin()) {\n this.twin().toggle(state);\n }\n },\n getParentGroup: function () {\n if (this.options.isChild) {\n return this.element.closest('.' + BUTTON_GROUP).data('buttonGroup');\n }\n },\n _addGraphics: function () {\n var element = this.element, icon = this.options.icon, spriteCssClass = this.options.spriteCssClass, imageUrl = this.options.imageUrl, isEmpty, span, img;\n if (spriteCssClass || imageUrl || icon) {\n isEmpty = true;\n element.contents().filter(function () {\n return !$(this).hasClass('k-sprite') && !$(this).hasClass(ICON) && !$(this).hasClass('k-image');\n }).each(function (idx, el) {\n if (el.nodeType == 1 || el.nodeType == 3 && $.trim(el.nodeValue).length > 0) {\n isEmpty = false;\n }\n });\n if (isEmpty) {\n element.addClass(BUTTON_ICON);\n } else {\n element.addClass(BUTTON_ICON_TEXT);\n }\n }\n if (icon) {\n span = element.children('span.' + ICON).first();\n if (!span[0]) {\n span = $('').prependTo(element);\n }\n span.addClass(ICON_PREFIX + icon);\n } else if (spriteCssClass) {\n span = element.children('span.k-sprite').first();\n if (!span[0]) {\n span = $('').prependTo(element);\n }\n span.addClass(spriteCssClass);\n } else if (imageUrl) {\n img = element.children('img.k-image').first();\n if (!img[0]) {\n img = $('\"icon\"').prependTo(element);\n }\n img.attr('src', imageUrl);\n }\n }\n });\n kendo.toolbar.Button = Button;\n var ToolBarButton = Button.extend({\n init: function (options, toolbar) {\n Button.fn.init.call(this, options, toolbar);\n var element = this.element;\n element.addClass(BUTTON);\n this.addIdAttr();\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n if (options.showText != 'overflow' && options.text) {\n if (options.mobile) {\n element.html('' + options.text + '');\n } else {\n element.html(options.text);\n }\n }\n options.hasIcon = options.showIcon != 'overflow' && (options.icon || options.spriteCssClass || options.imageUrl);\n if (options.hasIcon) {\n this._addGraphics();\n }\n this.addUidAttr();\n this.addOverflowAttr();\n this.enable(options.enable);\n if (options.hidden) {\n this.hide();\n }\n this.element.data({\n type: 'button',\n button: this\n });\n },\n select: function (selected) {\n if (selected === undefined) {\n selected = false;\n }\n this.element.toggleClass(STATE_ACTIVE, selected);\n this.options.selected = selected;\n }\n });\n kendo.toolbar.ToolBarButton = ToolBarButton;\n var OverflowButton = Button.extend({\n init: function (options, toolbar) {\n this.overflow = true;\n Button.fn.init.call(this, options, toolbar);\n var element = this.element;\n if (options.showText != 'toolbar' && options.text) {\n if (options.mobile) {\n element.html('' + options.text + '');\n } else {\n element.html('' + options.text + '');\n }\n }\n options.hasIcon = options.showIcon != 'toolbar' && (options.icon || options.spriteCssClass || options.imageUrl);\n if (options.hasIcon) {\n this._addGraphics();\n }\n if (!options.isChild) {\n this._wrap();\n }\n this.addOverflowIdAttr();\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.enable(options.enable);\n element.addClass(OVERFLOW_BUTTON + ' ' + BUTTON);\n if (options.hidden) {\n this.hide();\n }\n this.element.data({\n type: 'button',\n button: this\n });\n },\n _wrap: function () {\n this.element = this.element.wrap('
  • ').parent();\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n },\n select: function (selected) {\n if (selected === undefined) {\n selected = false;\n }\n if (this.options.isChild) {\n this.element.toggleClass(STATE_ACTIVE, selected);\n } else {\n this.element.find('.k-button').toggleClass(STATE_ACTIVE, selected);\n }\n this.options.selected = selected;\n }\n });\n kendo.toolbar.OverflowButton = OverflowButton;\n kendo.toolbar.registerComponent('button', ToolBarButton, OverflowButton);\n var ButtonGroup = Item.extend({\n createButtons: function (buttonConstructor) {\n var options = this.options;\n var items = options.buttons || [];\n var item;\n for (var i = 0; i < items.length; i++) {\n if (!items[i].uid) {\n items[i].uid = kendo.guid();\n }\n item = new buttonConstructor($.extend({\n mobile: options.mobile,\n isChild: true,\n type: 'button'\n }, items[i]), this.toolbar);\n item.element.appendTo(this.element);\n }\n },\n refresh: function () {\n this.element.children().filter(':not(\\'.' + STATE_HIDDEN + '\\'):first').addClass(GROUP_START);\n this.element.children().filter(':not(\\'.' + STATE_HIDDEN + '\\'):last').addClass(GROUP_END);\n }\n });\n kendo.toolbar.ButtonGroup = ButtonGroup;\n var ToolBarButtonGroup = ButtonGroup.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
    ');\n this.options = options;\n this.toolbar = toolbar;\n this.addIdAttr();\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n this.createButtons(ToolBarButton);\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.refresh();\n element.addClass(BUTTON_GROUP);\n this.element.data({\n type: 'buttonGroup',\n buttonGroup: this\n });\n }\n });\n kendo.toolbar.ToolBarButtonGroup = ToolBarButtonGroup;\n var OverflowButtonGroup = ButtonGroup.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  • ');\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n this.addOverflowIdAttr();\n this.createButtons(OverflowButton);\n this.attributes();\n this.addUidAttr();\n this.addOverflowAttr();\n this.refresh();\n element.addClass((options.mobile ? '' : BUTTON_GROUP) + ' k-overflow-group');\n this.element.data({\n type: 'buttonGroup',\n buttonGroup: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowButtonGroup = OverflowButtonGroup;\n kendo.toolbar.registerComponent('buttonGroup', ToolBarButtonGroup, OverflowButtonGroup);\n var ToolBarSplitButton = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
    ');\n this.options = options;\n this.toolbar = toolbar;\n this.mainButton = new ToolBarButton($.extend({}, options, { hidden: false }), toolbar);\n this.arrowButton = $('');\n this.popupElement = $('');\n this.mainButton.element.removeAttr('href tabindex').appendTo(element);\n this.arrowButton.appendTo(element);\n this.popupElement.appendTo(element);\n if (options.align) {\n element.addClass('k-align-' + options.align);\n }\n if (!options.id) {\n options.id = options.uid;\n }\n element.attr('id', options.id + '_wrapper');\n this.addOverflowAttr();\n this.addUidAttr();\n this.createMenuButtons();\n this.createPopup();\n this._navigatable();\n this.mainButton.main = true;\n this.enable(options.enable);\n if (options.hidden) {\n this.hide();\n }\n element.data({\n type: 'splitButton',\n splitButton: this,\n kendoPopup: this.popup\n });\n },\n _navigatable: function () {\n var that = this;\n that.popupElement.on('keydown', '.' + BUTTON, function (e) {\n var li = $(e.target).parent();\n e.preventDefault();\n if (e.keyCode === keys.ESC || e.keyCode === keys.TAB || e.altKey && e.keyCode === keys.UP) {\n that.toggle();\n that.focus();\n } else if (e.keyCode === keys.DOWN) {\n findFocusableSibling(li, 'next').focus();\n } else if (e.keyCode === keys.UP) {\n findFocusableSibling(li, 'prev').focus();\n } else if (e.keyCode === keys.SPACEBAR || e.keyCode === keys.ENTER) {\n that.toolbar.userEvents.trigger('tap', { target: $(e.target) });\n }\n });\n },\n createMenuButtons: function () {\n var options = this.options;\n var items = options.menuButtons;\n var item;\n for (var i = 0; i < items.length; i++) {\n item = new ToolBarButton($.extend({\n mobile: options.mobile,\n type: 'button',\n click: options.click\n }, items[i]), this.toolbar);\n item.element.wrap('
  • ').parent().appendTo(this.popupElement);\n }\n },\n createPopup: function () {\n var options = this.options;\n var element = this.element;\n this.popupElement.attr('id', options.id + '_optionlist').attr(KENDO_UID_ATTR, options.rootUid);\n if (options.mobile) {\n this.popupElement = actionSheetWrap(this.popupElement);\n }\n this.popup = this.popupElement.kendoPopup({\n appendTo: options.mobile ? $(options.mobile).children('.km-pane') : null,\n anchor: element,\n isRtl: this.toolbar._isRtl,\n copyAnchorStyles: false,\n animation: options.animation,\n open: adjustPopupWidth,\n activate: function () {\n this.element.find(':kendoFocusable').first().focus();\n },\n close: function () {\n element.focus();\n }\n }).data('kendoPopup');\n this.popup.element.on(CLICK, 'a.k-button', preventClick);\n },\n remove: function () {\n this.popup.element.off(CLICK, 'a.k-button');\n this.popup.destroy();\n this.element.remove();\n },\n toggle: function () {\n this.popup.toggle();\n },\n enable: function (isEnabled) {\n if (isEnabled === undefined) {\n isEnabled = true;\n }\n this.mainButton.enable(isEnabled);\n this.options.enable = isEnabled;\n },\n focus: function () {\n this.element.focus();\n },\n hide: function () {\n if (this.popup) {\n this.popup.close();\n }\n this.element.addClass(STATE_HIDDEN).hide();\n this.options.hidden = true;\n },\n show: function () {\n this.element.removeClass(STATE_HIDDEN).hide();\n this.options.hidden = false;\n }\n });\n kendo.toolbar.ToolBarSplitButton = ToolBarSplitButton;\n var OverflowSplitButton = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  • '), items = options.menuButtons, item;\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n this.mainButton = new OverflowButton($.extend({ isChild: true }, options));\n this.mainButton.element.appendTo(element);\n for (var i = 0; i < items.length; i++) {\n item = new OverflowButton($.extend({\n mobile: options.mobile,\n isChild: true\n }, items[i]), this.toolbar);\n item.element.appendTo(element);\n }\n this.addUidAttr();\n this.addOverflowAttr();\n this.mainButton.main = true;\n element.data({\n type: 'splitButton',\n splitButton: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowSplitButton = OverflowSplitButton;\n kendo.toolbar.registerComponent('splitButton', ToolBarSplitButton, OverflowSplitButton);\n var ToolBarSeparator = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
     
    ');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.attributes();\n this.addIdAttr();\n this.addUidAttr();\n this.addOverflowAttr();\n element.addClass(SEPARATOR);\n element.data({\n type: 'separator',\n separator: this\n });\n }\n });\n var OverflowSeparator = Item.extend({\n init: function (options, toolbar) {\n var element = this.element = $('
  •  
  • ');\n this.element = element;\n this.options = options;\n this.toolbar = toolbar;\n this.overflow = true;\n this.attributes();\n this.addUidAttr();\n this.addOverflowIdAttr();\n element.addClass(SEPARATOR);\n element.data({\n type: 'separator',\n separator: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.registerComponent('separator', ToolBarSeparator, OverflowSeparator);\n var TemplateItem = Item.extend({\n init: function (template, options, toolbar) {\n var element = isFunction(template) ? template(options) : template;\n if (!(element instanceof jQuery)) {\n element = $('
    ').html(element);\n } else {\n element = element.wrap('
    ').parent();\n }\n this.element = element;\n this.options = options;\n this.options.type = 'template';\n this.toolbar = toolbar;\n this.attributes();\n this.addUidAttr();\n this.addIdAttr();\n this.addOverflowAttr();\n element.data({\n type: 'template',\n template: this\n });\n }\n });\n kendo.toolbar.TemplateItem = TemplateItem;\n var OverflowTemplateItem = Item.extend({\n init: function (template, options, toolbar) {\n var element = isFunction(template) ? $(template(options)) : $(template);\n if (!(element instanceof jQuery)) {\n element = $('
  • ').html(element);\n } else {\n element = element.wrap('
  • ').parent();\n }\n this.element = element;\n this.options = options;\n this.options.type = 'template';\n this.toolbar = toolbar;\n this.overflow = true;\n this.attributes();\n this.addUidAttr();\n this.addOverflowIdAttr();\n this.addOverflowAttr();\n element.data({\n type: 'template',\n template: this\n });\n },\n overflowHidden: function () {\n this.element.addClass(OVERFLOW_HIDDEN);\n }\n });\n kendo.toolbar.OverflowTemplateItem = OverflowTemplateItem;\n function adjustPopupWidth() {\n var anchor = this.options.anchor, computedWidth = outerWidth(anchor), width;\n kendo.wrap(this.element).addClass('k-split-wrapper');\n if (this.element.css('box-sizing') !== 'border-box') {\n width = computedWidth - (outerWidth(this.element) - this.element.width());\n } else {\n width = computedWidth;\n }\n this.element.css({\n fontFamily: anchor.css('font-family'),\n 'min-width': width\n });\n }\n function toggleActive(e) {\n if (!e.target.is('.k-toggle-button')) {\n e.target.toggleClass(STATE_ACTIVE, e.type == 'press');\n }\n }\n function actionSheetWrap(element) {\n element = $(element);\n return element.hasClass('km-actionsheet') ? element.closest('.km-popup-wrapper') : element.addClass('km-widget km-actionsheet').wrap('
    ').parent().wrap('
    ').parent();\n }\n function preventClick(e) {\n e.preventDefault();\n }\n function findFocusableSibling(element, dir) {\n var getSibling = dir === 'next' ? $.fn.next : $.fn.prev;\n var getter = dir === 'next' ? $.fn.first : $.fn.last;\n var candidate = getSibling.call(element);\n if (candidate.is(':kendoFocusable') || !candidate.length) {\n return candidate;\n }\n if (candidate.find(':kendoFocusable').length) {\n return getter.call(candidate.find(':kendoFocusable'));\n }\n return findFocusableSibling(candidate, dir);\n }\n var Group = Class.extend({\n init: function (name) {\n this.name = name;\n this.buttons = [];\n },\n add: function (button) {\n this.buttons[this.buttons.length] = button;\n },\n remove: function (button) {\n var index = $.inArray(button, this.buttons);\n this.buttons.splice(index, 1);\n },\n select: function (button) {\n var tmp;\n for (var i = 0; i < this.buttons.length; i++) {\n tmp = this.buttons[i];\n tmp.select(false);\n }\n button.select(true);\n if (button.twin()) {\n button.twin().select(true);\n }\n }\n });\n var ToolBar = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n options = that.options;\n element = that.wrapper = that.element;\n element.addClass(TOOLBAR + ' k-widget');\n this.uid = kendo.guid();\n this._isRtl = kendo.support.isRtl(element);\n this._groups = {};\n element.attr(KENDO_UID_ATTR, this.uid);\n that.isMobile = typeof options.mobile === 'boolean' ? options.mobile : that.element.closest('.km-root')[0];\n that.animation = that.isMobile ? { open: { effects: 'fade' } } : {};\n if (that.isMobile) {\n element.addClass('km-widget');\n ICON = 'km-icon';\n ICON_PREFIX = 'km-';\n BUTTON = 'km-button';\n BUTTON_GROUP = 'km-buttongroup km-widget';\n STATE_ACTIVE = 'km-state-active';\n STATE_DISABLED = 'km-state-disabled';\n }\n if (options.resizable) {\n that._renderOverflow();\n element.addClass(RESIZABLE_TOOLBAR);\n that.overflowUserEvents = new kendo.UserEvents(that.element, {\n threshold: 5,\n allowSelection: true,\n filter: '.' + OVERFLOW_ANCHOR,\n tap: proxy(that._toggleOverflow, that)\n });\n that._resizeHandler = kendo.onResize(function () {\n that.resize();\n });\n } else {\n that.popup = { element: $([]) };\n }\n if (options.items && options.items.length) {\n for (var i = 0; i < options.items.length; i++) {\n that.add(options.items[i]);\n }\n }\n that.userEvents = new kendo.UserEvents(document, {\n threshold: 5,\n allowSelection: true,\n filter: '[' + KENDO_UID_ATTR + '=' + this.uid + '] a.' + BUTTON + ', ' + '[' + KENDO_UID_ATTR + '=' + this.uid + '] .' + OVERFLOW_BUTTON,\n tap: proxy(that._buttonClick, that),\n press: toggleActive,\n release: toggleActive\n });\n that.element.on(CLICK, 'a.k-button', preventClick);\n that._navigatable();\n if (options.resizable) {\n that.popup.element.on(CLICK, +'a.k-button', preventClick);\n }\n if (options.resizable) {\n this._toggleOverflowAnchor();\n }\n kendo.notify(that);\n },\n events: [\n CLICK,\n TOGGLE,\n OPEN,\n CLOSE,\n OVERFLOW_OPEN,\n OVERFLOW_CLOSE\n ],\n options: {\n name: 'ToolBar',\n items: [],\n resizable: true,\n mobile: null\n },\n addToGroup: function (button, groupName) {\n var group;\n if (!this._groups[groupName]) {\n group = this._groups[groupName] = new Group();\n } else {\n group = this._groups[groupName];\n }\n group.add(button);\n return group;\n },\n destroy: function () {\n var that = this;\n that.element.find('.' + SPLIT_BUTTON).each(function (idx, element) {\n $(element).data('kendoPopup').destroy();\n });\n that.element.off(CLICK, 'a.k-button');\n that.userEvents.destroy();\n if (that.options.resizable) {\n kendo.unbindResize(that._resizeHandler);\n that.overflowUserEvents.destroy();\n that.popup.element.off(CLICK, 'a.k-button');\n that.popup.destroy();\n }\n Widget.fn.destroy.call(that);\n },\n add: function (options) {\n var component = components[options.type], template = options.template, tool, that = this, itemClasses = that.isMobile ? '' : 'k-item k-state-default', overflowTemplate = options.overflowTemplate, overflowTool;\n $.extend(options, {\n uid: kendo.guid(),\n animation: that.animation,\n mobile: that.isMobile,\n rootUid: that.uid\n });\n if (options.menuButtons) {\n for (var i = 0; i < options.menuButtons.length; i++) {\n $.extend(options.menuButtons[i], { uid: kendo.guid() });\n }\n }\n if (template && !overflowTemplate) {\n options.overflow = OVERFLOW_NEVER;\n } else if (!options.overflow) {\n options.overflow = OVERFLOW_AUTO;\n }\n if (options.overflow !== OVERFLOW_NEVER && that.options.resizable) {\n if (overflowTemplate) {\n overflowTool = new OverflowTemplateItem(overflowTemplate, options, that);\n } else if (component) {\n overflowTool = new component.overflow(options, that);\n overflowTool.element.addClass(itemClasses);\n }\n if (overflowTool) {\n if (options.overflow === OVERFLOW_AUTO) {\n overflowTool.overflowHidden();\n }\n overflowTool.element.appendTo(that.popup.container);\n that.angular('compile', function () {\n return { elements: overflowTool.element.get() };\n });\n }\n }\n if (options.overflow !== OVERFLOW_ALWAYS) {\n if (template) {\n tool = new TemplateItem(template, options, that);\n } else if (component) {\n tool = new component.toolbar(options, that);\n }\n if (tool) {\n if (that.options.resizable) {\n tool.element.appendTo(that.element).css('visibility', 'hidden');\n that._shrink(that.element.innerWidth());\n tool.element.css('visibility', 'visible');\n } else {\n tool.element.appendTo(that.element);\n }\n that.angular('compile', function () {\n return { elements: tool.element.get() };\n });\n }\n }\n },\n _getItem: function (candidate) {\n var element, toolbarItem, overflowItem, isResizable = this.options.resizable, type;\n element = this.element.find(candidate);\n if (!element.length) {\n element = $('.k-split-container[data-uid=' + this.uid + ']').find(candidate);\n }\n type = element.length ? element.data('type') : '';\n toolbarItem = element.data(type);\n if (toolbarItem) {\n if (toolbarItem.main) {\n element = element.parent('.' + SPLIT_BUTTON);\n type = 'splitButton';\n toolbarItem = element.data(type);\n }\n if (isResizable) {\n overflowItem = toolbarItem.twin();\n }\n } else if (isResizable) {\n element = this.popup.element.find(candidate);\n type = element.length ? element.data('type') : '';\n overflowItem = element.data(type);\n if (overflowItem && overflowItem.main) {\n element = element.parent('.' + SPLIT_BUTTON);\n type = 'splitButton';\n overflowItem = element.data(type);\n }\n }\n return {\n type: type,\n toolbar: toolbarItem,\n overflow: overflowItem\n };\n },\n remove: function (candidate) {\n var item = this._getItem(candidate);\n if (item.toolbar) {\n item.toolbar.remove();\n }\n if (item.overflow) {\n item.overflow.remove();\n }\n this.resize(true);\n },\n hide: function (candidate) {\n var item = this._getItem(candidate);\n if (item.toolbar) {\n if (item.toolbar.options.type === 'button' && item.toolbar.options.isChild) {\n item.toolbar.hide();\n item.toolbar.getParentGroup().refresh();\n } else if (!item.toolbar.options.hidden) {\n item.toolbar.hide();\n }\n }\n if (item.overflow) {\n if (item.overflow.options.type === 'button' && item.overflow.options.isChild) {\n item.overflow.hide();\n item.overflow.getParentGroup().refresh();\n } else if (!item.overflow.options.hidden) {\n item.overflow.hide();\n }\n }\n this.resize(true);\n },\n show: function (candidate) {\n var item = this._getItem(candidate);\n if (item.toolbar) {\n if (item.toolbar.options.type === 'button' && item.toolbar.options.isChild) {\n item.toolbar.show();\n item.toolbar.getParentGroup().refresh();\n } else if (item.toolbar.options.hidden) {\n item.toolbar.show();\n }\n }\n if (item.overflow) {\n if (item.overflow.options.type === 'button' && item.overflow.options.isChild) {\n item.toolbar.show();\n item.overflow.getParentGroup().refresh();\n } else if (item.overflow.options.hidden) {\n item.overflow.show();\n }\n }\n this.resize(true);\n },\n enable: function (element, enable) {\n var item = this._getItem(element);\n if (typeof enable == 'undefined') {\n enable = true;\n }\n if (item.toolbar) {\n item.toolbar.enable(enable);\n }\n if (item.overflow) {\n item.overflow.enable(enable);\n }\n },\n getSelectedFromGroup: function (groupName) {\n return this.element.find('.' + TOGGLE_BUTTON + '[data-group=\\'' + groupName + '\\']').filter('.' + STATE_ACTIVE);\n },\n toggle: function (button, checked) {\n var element = $(button), item = element.data('button');\n if (item.options.togglable) {\n if (checked === undefined) {\n checked = true;\n }\n item.toggle(checked, true);\n }\n },\n _renderOverflow: function () {\n var that = this, overflowContainer = components.overflowContainer, isRtl = that._isRtl, horizontalDirection = isRtl ? 'left' : 'right';\n that.overflowAnchor = $(components.overflowAnchor).addClass(BUTTON);\n that.element.append(that.overflowAnchor);\n if (that.isMobile) {\n that.overflowAnchor.append('');\n overflowContainer = actionSheetWrap(overflowContainer);\n } else {\n that.overflowAnchor.append('');\n }\n that.popup = new kendo.ui.Popup(overflowContainer, {\n origin: 'bottom ' + horizontalDirection,\n position: 'top ' + horizontalDirection,\n anchor: that.overflowAnchor,\n isRtl: isRtl,\n animation: that.animation,\n appendTo: that.isMobile ? $(that.isMobile).children('.km-pane') : null,\n copyAnchorStyles: false,\n open: function (e) {\n var wrapper = kendo.wrap(that.popup.element).addClass('k-overflow-wrapper');\n if (!that.isMobile) {\n wrapper.css('margin-left', (isRtl ? -1 : 1) * ((outerWidth(wrapper) - wrapper.width()) / 2 + 1));\n } else {\n that.popup.container.css('max-height', parseFloat($('.km-content:visible').innerHeight()) - 15 + 'px');\n }\n if (that.trigger(OVERFLOW_OPEN)) {\n e.preventDefault();\n }\n },\n activate: function () {\n this.element.find(':kendoFocusable').first().focus();\n },\n close: function (e) {\n if (that.trigger(OVERFLOW_CLOSE)) {\n e.preventDefault();\n }\n this.element.focus();\n }\n });\n that.popup.element.on('keydown', '.' + BUTTON, function (e) {\n var target = $(e.target), li = target.parent(), isComplexTool = li.is('.' + BUTTON_GROUP) || li.is('.' + SPLIT_BUTTON), element;\n e.preventDefault();\n if (e.keyCode === keys.ESC || e.keyCode === keys.TAB || e.altKey && e.keyCode === keys.UP) {\n that._toggleOverflow();\n that.overflowAnchor.focus();\n } else if (e.keyCode === keys.DOWN) {\n element = !isComplexTool || isComplexTool && target.is(':last-child') ? li : target;\n findFocusableSibling(element, 'next').focus();\n } else if (e.keyCode === keys.UP) {\n element = !isComplexTool || isComplexTool && target.is(':first-child') ? li : target;\n findFocusableSibling(element, 'prev').focus();\n } else if (e.keyCode === keys.SPACEBAR || e.keyCode === keys.ENTER) {\n that.userEvents.trigger('tap', { target: $(e.target) });\n }\n });\n if (that.isMobile) {\n that.popup.container = that.popup.element.find('.' + OVERFLOW_CONTAINER);\n } else {\n that.popup.container = that.popup.element;\n }\n that.popup.container.attr(KENDO_UID_ATTR, this.uid);\n },\n _toggleOverflowAnchor: function () {\n var hasVisibleChildren = false;\n if (this.options.mobile) {\n hasVisibleChildren = this.popup.element.find('.' + OVERFLOW_CONTAINER).children(':not(.' + OVERFLOW_HIDDEN + ', .' + POPUP + ')').length > 0;\n } else {\n hasVisibleChildren = this.popup.element.children(':not(.' + OVERFLOW_HIDDEN + ', .' + POPUP + ')').length > 0;\n }\n if (hasVisibleChildren) {\n this.overflowAnchor.css({\n visibility: 'visible',\n width: ''\n });\n } else {\n this.overflowAnchor.css({\n visibility: 'hidden',\n width: '1px'\n });\n }\n },\n _buttonClick: function (e) {\n var that = this, popup, target, item, splitContainer, isSplitButtonArrow = e.target.closest('.' + SPLIT_BUTTON_ARROW).length, handler, eventData, urlTarget;\n e.preventDefault();\n if (isSplitButtonArrow) {\n that._toggle(e);\n return;\n }\n target = $(e.target).closest('.' + BUTTON, that.element);\n if (target.hasClass(OVERFLOW_ANCHOR)) {\n return;\n }\n item = target.data('button');\n if (!item && that.popup) {\n target = $(e.target).closest('.' + OVERFLOW_BUTTON, that.popup.container);\n item = target.parent('li').data('button');\n }\n if (!item || !item.options.enable) {\n return;\n }\n if (item.options.togglable) {\n handler = isFunction(item.toggleHandler) ? item.toggleHandler : null;\n item.toggle(!item.options.selected, true);\n eventData = {\n target: target,\n group: item.options.group,\n checked: item.options.selected,\n id: item.options.id\n };\n if (handler) {\n handler.call(that, eventData);\n }\n that.trigger(TOGGLE, eventData);\n } else {\n handler = isFunction(item.clickHandler) ? item.clickHandler : null;\n eventData = {\n sender: that,\n target: target,\n id: item.options.id\n };\n if (handler) {\n handler.call(that, eventData);\n }\n that.trigger(CLICK, eventData);\n }\n if (item.options.url) {\n if (item.options.attributes && item.options.attributes.target) {\n urlTarget = item.options.attributes.target;\n }\n window.open(item.options.url, urlTarget || '_self');\n }\n if (target.hasClass(OVERFLOW_BUTTON)) {\n that.popup.close();\n }\n splitContainer = target.closest('.k-split-container');\n if (splitContainer[0]) {\n popup = splitContainer.data('kendoPopup');\n (popup ? popup : splitContainer.parents('.km-popup-wrapper').data('kendoPopup')).close();\n }\n },\n _navigatable: function () {\n var that = this;\n that.element.attr('tabindex', 0).focus(function () {\n var element = $(this).find(':kendoFocusable:first');\n if (element.is('.' + OVERFLOW_ANCHOR)) {\n element = findFocusableSibling(element, 'next');\n }\n element[0].focus();\n }).on('keydown', proxy(that._keydown, that));\n },\n _keydown: function (e) {\n var target = $(e.target), keyCode = e.keyCode, items = this.element.children(':not(.k-separator):visible');\n if (keyCode === keys.TAB) {\n var element = target.parentsUntil(this.element).last(), lastHasFocus = false, firstHasFocus = false;\n if (!element.length) {\n element = target;\n }\n if (element.is('.' + OVERFLOW_ANCHOR)) {\n if (e.shiftKey) {\n e.preventDefault();\n }\n if (items.last().is(':kendoFocusable')) {\n items.last().focus();\n } else {\n items.last().find(':kendoFocusable').last().focus();\n }\n }\n if (!e.shiftKey && items.index(element) === items.length - 1) {\n if (element.is('.' + BUTTON_GROUP)) {\n lastHasFocus = target.is(':last-child');\n } else {\n lastHasFocus = true;\n }\n }\n var isFirstTool = items.index(element) === items.not('.k-overflow-anchor').first().index();\n if (e.shiftKey && isFirstTool) {\n if (element.is('.' + BUTTON_GROUP)) {\n firstHasFocus = target.is(':first-child');\n } else {\n firstHasFocus = true;\n }\n }\n if (lastHasFocus && this.overflowAnchor && this.overflowAnchor.css('visibility') !== 'hidden') {\n e.preventDefault();\n this.overflowAnchor.focus();\n }\n if (firstHasFocus) {\n e.preventDefault();\n var prevFocusable = this._getPrevFocusable(this.wrapper);\n if (prevFocusable) {\n prevFocusable.focus();\n }\n }\n }\n if (e.altKey && keyCode === keys.DOWN) {\n var splitButton = $(document.activeElement).data('splitButton');\n var isOverflowAnchor = $(document.activeElement).is('.' + OVERFLOW_ANCHOR);\n if (splitButton) {\n splitButton.toggle();\n } else if (isOverflowAnchor) {\n this._toggleOverflow();\n }\n return;\n }\n if ((keyCode === keys.SPACEBAR || keyCode === keys.ENTER) && !target.is('input, checkbox')) {\n e.preventDefault();\n if (target.is('.' + SPLIT_BUTTON)) {\n target = target.children().first();\n }\n this.userEvents.trigger('tap', { target: target });\n return;\n }\n },\n _getPrevFocusable: function (element) {\n if (element.is('html')) {\n return element;\n }\n var elementToFocus, prevElement, prevElements = element.prevAll();\n prevElements.each(function () {\n prevElement = $(this);\n if (prevElement.is(':kendoFocusable')) {\n elementToFocus = prevElement;\n return false;\n } else if (prevElement.find(':kendoFocusable').length > 0) {\n elementToFocus = prevElement.find(':kendoFocusable').last();\n return false;\n }\n });\n if (elementToFocus) {\n return elementToFocus;\n } else {\n return this._getPrevFocusable(element.parent());\n }\n },\n _toggle: function (e) {\n var splitButton = $(e.target).closest('.' + SPLIT_BUTTON).data('splitButton'), isDefaultPrevented;\n e.preventDefault();\n if (!splitButton.options.enable) {\n return;\n }\n if (splitButton.popup.element.is(':visible')) {\n isDefaultPrevented = this.trigger(CLOSE, { target: splitButton.element });\n } else {\n isDefaultPrevented = this.trigger(OPEN, { target: splitButton.element });\n }\n if (!isDefaultPrevented) {\n splitButton.toggle();\n }\n },\n _toggleOverflow: function () {\n this.popup.toggle();\n },\n _resize: function (e) {\n var containerWidth = e.width;\n if (!this.options.resizable) {\n return;\n }\n this.popup.close();\n this._shrink(containerWidth);\n this._stretch(containerWidth);\n this._markVisibles();\n this._toggleOverflowAnchor();\n },\n _childrenWidth: function () {\n var childrenWidth = 0;\n this.element.children(':visible:not(\\'.' + STATE_HIDDEN + '\\')').each(function () {\n childrenWidth += outerWidth($(this), true);\n });\n return Math.ceil(childrenWidth);\n },\n _shrink: function (containerWidth) {\n var commandElement, visibleCommands;\n if (containerWidth < this._childrenWidth()) {\n visibleCommands = this.element.children(':visible:not([data-overflow=\\'never\\'], .' + OVERFLOW_ANCHOR + ')');\n for (var i = visibleCommands.length - 1; i >= 0; i--) {\n commandElement = visibleCommands.eq(i);\n if (containerWidth > this._childrenWidth()) {\n break;\n } else {\n this._hideItem(commandElement);\n }\n }\n }\n },\n _stretch: function (containerWidth) {\n var commandElement, hiddenCommands;\n if (containerWidth > this._childrenWidth()) {\n hiddenCommands = this.element.children(':hidden:not(\\'.' + STATE_HIDDEN + '\\')');\n for (var i = 0; i < hiddenCommands.length; i++) {\n commandElement = hiddenCommands.eq(i);\n if (containerWidth < this._childrenWidth() || !this._showItem(commandElement, containerWidth)) {\n break;\n }\n }\n }\n },\n _hideItem: function (item) {\n item.hide();\n if (this.popup) {\n this.popup.container.find('>li[data-uid=\\'' + item.data('uid') + '\\']').removeClass(OVERFLOW_HIDDEN);\n }\n },\n _showItem: function (item, containerWidth) {\n if (item.length && containerWidth > this._childrenWidth() + outerWidth(item, true)) {\n item.show();\n if (this.popup) {\n this.popup.container.find('>li[data-uid=\\'' + item.data('uid') + '\\']').addClass(OVERFLOW_HIDDEN);\n }\n return true;\n }\n return false;\n },\n _markVisibles: function () {\n var overflowItems = this.popup.container.children(), toolbarItems = this.element.children(':not(.k-overflow-anchor)'), visibleOverflowItems = overflowItems.filter(':not(.k-overflow-hidden)'), visibleToolbarItems = toolbarItems.filter(':visible');\n overflowItems.add(toolbarItems).removeClass(FIRST_TOOLBAR_VISIBLE + ' ' + LAST_TOOLBAR_VISIBLE);\n visibleOverflowItems.first().add(visibleToolbarItems.first()).addClass(FIRST_TOOLBAR_VISIBLE);\n visibleOverflowItems.last().add(visibleToolbarItems.last()).addClass(LAST_TOOLBAR_VISIBLE);\n }\n });\n kendo.ui.plugin(ToolBar);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}