{"version":3,"sources":["kendo.filtermenu.js"],"names":["f","define","$","undefined","removeFiltersForField","expression","field","filters","grep","filter","length","convertItems","items","idx","item","value","text","result","clearFilter","expr","nested","filterValuesForField","operator","flatFilterValues","logic","map","distinct","getter","kendo","index","seen","hasOwnProperty","push","removeDuplicates","dataSelector","dataTextField","e","window","ui","proxy","support","AUTOCOMPLETEVALUE","browser","chrome","POPUP","INIT","OPEN","REFRESH","CHANGE","NS","EQ","NEQ","roles","number","date","mobileRoles","string","isFunction","Widget","booleanTemplate","customBooleanTemplate","defaultTemplate","defaultMobileTemplate","booleanMobileTemplate","FilterMenu","extend","init","element","options","operators","initial","link","that","this","type","fn","call","appendToElement","addClass","find","prepend","messages","attr","on","_click","dataSource","DataSource","create","model","reader","_parse","fields","parse","values","_defaultFilter","_refreshHandler","refresh","bind","_init","role","setUI","pane","_isMobile","_createMobileForm","_createForm","form","_submit","_reset","removeClass","each","end","trigger","container","cycleForm","hasCustomTemplate","title","html","template","format","ns","extra","append","popup","closest","data","anchor","copyAnchorStyles","open","_open","activate","_activate","close","closeCallback","_keydown","filterMenuGuid","guid","inputType","view","submit","preventDefault","_closeForm","_mobileClear","defaultFilters","defaultOperator","filterModel","observable","children","first","_bind","destroy","unbind","purge","currentFilter","found","current","set","_stripFilters","_merge","clear","_removeFilter","booleanRadioButton","booleanRadioButtonValue","operatorSelects","valueInputs","andLogicRadio","viewElement","val","prop","i","input","containsFilters","currentExpression","stopPropagation","toJSON","_checkForNullOrEmptyFilter","firstNullOrEmpty","secondNullOrEmpty","search","parent","show","navigate","animations","right","left","toggle","not","focus","keyCode","keys","ESC","events","name","eq","neq","startswith","contains","doesnotcontain","endswith","isnull","isnotnull","isempty","isnotempty","isnullorempty","isnotnullorempty","gte","gt","lte","lt","enums","info","isTrue","isFalse","and","or","selectValue","additionalValue","additionalOperator","cancel","done","into","multiCheckNS","multiCkeckMobileTemplate","FilterMultiCheck","checkSource","_foreignKeyValues","fetch","forceUnique","pageSize","toLowerCase","parseFloat","_createLink","_link","serverPaging","_attachProgress","checkChangeHandler","empty","_filter","_progressHandler","progress","_progressHideHandler","_input","_clearTypingTimeout","_typingTimeout","setTimeout","clearTimeout","label","labelText","ignoreCase","searchString","searchTextBox","labels","checkAll","style","visibility","parentNode","display","textContent","innerText","indexOf","selectedItemsFormat","_mobileCheckAll","kendoPopup","createCheckAllItem","itemTemplate","mobile","checkAllContainer","all","checkBoxAll","checkAllHandler","updateCheckAllState","state","getFilterArray","toggleClass","sender","action","autoSync","is","createCheckBoxes","checkValues","flatValues","itemsHtml","templateOptions","valueField","_isServerGrouped","_flatData","render","ele","checkBoxVal","getTime","checkboxes","checkbox","valueFormat","clearAll","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,oBACH,mBACA,uBACA,qBACA,gBACDD,IACL,WA2iCE,MA9hCC,UAAUE,EAAGC,GAcV,QAASC,GAAsBC,EAAYC,GACnCD,EAAWE,UACXF,EAAWE,QAAUL,EAAEM,KAAKH,EAAWE,QAAS,SAAUE,GAEtD,MADAL,GAAsBK,EAAQH,GAC1BG,EAAOF,QACAE,EAAOF,QAAQG,OAEfD,EAAOH,OAASA,KAKvC,QAASK,GAAaC,GAClB,GAAIC,GAAKH,EAAQI,EAAMC,EAAOC,EAAMC,CACpC,IAAIL,GAASA,EAAMF,OAEf,IADAO,KACKJ,EAAM,EAAGH,EAASE,EAAMF,OAAQG,EAAMH,EAAQG,IAC/CC,EAAOF,EAAMC,GACbG,EAAqB,KAAdF,EAAKE,KAAcF,EAAKE,MAAQF,EAAKC,OAASD,EAAOA,EAAKE,KACjED,EAAsB,MAAdD,EAAKC,MAAgBD,EAAKE,MAAQF,EAAOA,EAAKC,MACtDE,EAAOJ,IACHG,KAAMA,EACND,MAAOA,EAInB,OAAOE,GAEX,QAASC,GAAYX,EAASD,GAC1B,MAAOJ,GAAEM,KAAKD,EAAS,SAAUY,GAC7B,MAAIA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,SACR0C,oBAAqB,qBACrBzC,KAAM,OACNC,KAAM,MAEVO,aAAa,EACb7C,YACIE,KAAM,QACND,MAAO,gBAGfQ,QACIjJ,EACAE,EACA,SACAD,IAGR5C,GAAE+D,OAAO6J,EAAiBnJ,IACtBS,OAAQpB,EAAWW,GAAGS,OACtBiD,SAAUrE,EAAWW,GAAG0D,SACxB1B,OAAQ3C,EAAWW,GAAGgC,OACtBiC,WAAY5E,EAAWW,GAAGiE,WAC1BmB,cAAe/F,EAAWW,GAAGoF,cAC7BD,MAAO9F,EAAWW,GAAGmF,MACrBD,OAAQ7F,EAAWW,GAAGkF,SAE1BvH,EAAG+P,OAAOrO,GACV1B,EAAG+P,OAAOvE,IACZzL,OAAOT,MAAM0Q,QACRjQ,OAAOT,OACE,kBAAV3B,SAAwBA,OAAOsS,IAAMtS,OAAS,SAAUuS,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.filtermenu.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.filtermenu', [\n 'kendo.datepicker',\n 'kendo.numerictextbox',\n 'kendo.dropdownlist',\n 'kendo.binder'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'filtermenu',\n name: 'Filtering Menu',\n category: 'framework',\n depends: [\n 'datepicker',\n 'numerictextbox',\n 'dropdownlist',\n 'binder'\n ],\n advanced: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, proxy = $.proxy, support = kendo.support, AUTOCOMPLETEVALUE = support.browser.chrome ? 'disabled' : 'off', POPUP = 'kendoPopup', INIT = 'init', OPEN = 'open', REFRESH = 'refresh', CHANGE = 'change', NS = '.kendoFilterMenu', EQ = 'Is equal to', NEQ = 'Is not equal to', roles = {\n 'number': 'numerictextbox',\n 'date': 'datepicker'\n }, mobileRoles = {\n 'string': 'text',\n 'number': 'number',\n 'date': 'date'\n }, isFunction = kendo.isFunction, Widget = ui.Widget;\n var booleanTemplate = '
' + '
#=messages.info#
' + '' + '' + '
' + '' + '' + '
' + '
';\n var customBooleanTemplate = '
' + '
#=messages.info#
' + '' + '
' + '' + '' + '
' + '
';\n var defaultTemplate = '
' + '
#=messages.info#
' + '' + '#if(values){#' + '' + '#}else{#' + '' + '#}#' + '#if(extra){#' + '' + '' + '#if(values){#' + '' + '#}else{#' + '' + '#}#' + '#}#' + '
' + '' + '' + '
' + '
';\n var defaultMobileTemplate = '
' + '
' + '' + '#=messages.filter# #=messages.into# #=title#' + '' + '
' + '
' + '' + '
' + '
';\n var booleanMobileTemplate = '
' + '
' + '' + '#=messages.filter# #=messages.into# #=title#' + '' + '
' + '
' + '' + '
' + '
';\n function removeFiltersForField(expression, field) {\n if (expression.filters) {\n expression.filters = $.grep(expression.filters, function (filter) {\n removeFiltersForField(filter, field);\n if (filter.filters) {\n return filter.filters.length;\n } else {\n return filter.field != field;\n }\n });\n }\n }\n function convertItems(items) {\n var idx, length, item, value, text, result;\n if (items && items.length) {\n result = [];\n for (idx = 0, length = items.length; idx < length; idx++) {\n item = items[idx];\n text = item.text !== '' ? item.text || item.value || item : item.text;\n value = item.value == null ? item.text || item : item.value;\n result[idx] = {\n text: text,\n value: value\n };\n }\n }\n return result;\n }\n function clearFilter(filters, field) {\n return $.grep(filters, function (expr) {\n if (expr.filters) {\n expr.filters = $.grep(expr.filters, function (nested) {\n return nested.field != field;\n });\n return expr.filters.length;\n }\n return expr.field != field;\n });\n }\n var FilterMenu = Widget.extend({\n init: function (element, options) {\n var that = this, type = 'string', operators, initial, link, field;\n Widget.fn.init.call(that, element, options);\n operators = that.operators = options.operators || {};\n element = that.element;\n options = that.options;\n if (!options.appendToElement) {\n link = element.addClass('k-with-icon k-filterable').find('.k-grid-filter');\n if (!link[0]) {\n link = element.prepend('').find('.k-grid-filter');\n }\n link.attr('tabindex', -1).on('click' + NS, proxy(that._click, that));\n }\n that.link = link || $();\n that.dataSource = DataSource.create(options.dataSource);\n that.field = options.field || element.attr(kendo.attr('field'));\n that.model = that.dataSource.reader.model;\n that._parse = function (value) {\n return value != null ? value + '' : value;\n };\n if (that.model && that.model.fields) {\n field = that.model.fields[that.field];\n if (field) {\n type = field.type || 'string';\n if (field.parse) {\n that._parse = proxy(field.parse, field);\n }\n }\n }\n if (options.values) {\n type = 'enums';\n }\n that.type = type;\n operators = operators[type] || options.operators[type];\n for (initial in operators) {\n break;\n }\n that._defaultFilter = function () {\n return {\n field: that.field,\n operator: initial || 'eq',\n value: ''\n };\n };\n that._refreshHandler = proxy(that.refresh, that);\n that.dataSource.bind(CHANGE, that._refreshHandler);\n if (options.appendToElement) {\n that._init();\n } else {\n that.refresh();\n }\n },\n _init: function () {\n var that = this, ui = that.options.ui, setUI = isFunction(ui), role;\n that.pane = that.options.pane;\n if (that.pane) {\n that._isMobile = true;\n }\n if (!setUI) {\n role = ui || roles[that.type];\n }\n if (that._isMobile) {\n that._createMobileForm(role);\n } else {\n that._createForm(role);\n }\n that.form.on('submit' + NS, proxy(that._submit, that)).on('reset' + NS, proxy(that._reset, that));\n if (setUI) {\n that.form.find('.k-textbox').removeClass('k-textbox').each(function () {\n ui($(this));\n });\n }\n that.form.find('[' + kendo.attr('role') + '=numerictextbox]').removeClass('k-textbox').end().find('[' + kendo.attr('role') + '=datetimepicker]').removeClass('k-textbox').end().find('[' + kendo.attr('role') + '=timepicker]').removeClass('k-textbox').end().find('[' + kendo.attr('role') + '=datepicker]').removeClass('k-textbox');\n that.refresh();\n that.trigger(INIT, {\n field: that.field,\n container: that.form\n });\n kendo.cycleForm(that.form);\n },\n _createForm: function (role) {\n var that = this, options = that.options, operators = that.operators || {}, type = that.type, hasCustomTemplate = isFunction(that.options.ui);\n operators = operators[type] || options.operators[type];\n that.form = $('
').html(kendo.template(type === 'boolean' ? hasCustomTemplate ? customBooleanTemplate : booleanTemplate : defaultTemplate)({\n field: that.field,\n format: options.format,\n ns: kendo.ns,\n messages: options.messages,\n extra: options.extra,\n operators: operators,\n type: type,\n role: role,\n values: convertItems(options.values)\n }));\n if (!options.appendToElement) {\n that.popup = that.form[POPUP]({\n anchor: that.link,\n copyAnchorStyles: false,\n open: proxy(that._open, that),\n activate: proxy(that._activate, that),\n close: function () {\n if (that.options.closeCallback) {\n that.options.closeCallback(that.element);\n }\n }\n }).data(POPUP);\n } else {\n that.element.append(that.form);\n that.popup = that.element.closest('.k-popup').data(POPUP);\n }\n that.form.on('keydown' + NS, proxy(that._keydown, that));\n },\n _createMobileForm: function (role) {\n var that = this, options = that.options, operators = that.operators || {}, filterMenuGuid = kendo.guid(), type = that.type;\n operators = operators[type] || options.operators[type];\n that.form = $('
').html(kendo.template(type === 'boolean' ? booleanMobileTemplate : defaultMobileTemplate)({\n field: that.field,\n title: options.title || that.field,\n format: options.format,\n ns: kendo.ns,\n messages: options.messages,\n extra: options.extra,\n operators: operators,\n filterMenuGuid: filterMenuGuid,\n type: type,\n role: role,\n inputType: mobileRoles[type],\n values: convertItems(options.values)\n }));\n that.view = that.pane.append(that.form.html());\n that.form = that.view.element.find('form');\n that.view.element.on('click', '.k-header-done', function (e) {\n that.form.submit();\n e.preventDefault();\n }).on('click', '.k-header-cancel', function (e) {\n that._closeForm();\n e.preventDefault();\n }).on('click', '.k-clear', function (e) {\n that._mobileClear();\n e.preventDefault();\n });\n that.view.bind('showStart', function () {\n that.refresh();\n });\n },\n refresh: function () {\n var that = this, expression = that.dataSource.filter() || {\n filters: [],\n logic: 'and'\n };\n var defaultFilters = [that._defaultFilter()];\n var defaultOperator = that._defaultFilter().operator;\n if (that.options.extra || defaultOperator !== 'isnull' && defaultOperator !== 'isnullorempty' && defaultOperator !== 'isnotnullorempty' && defaultOperator !== 'isnotnull' && defaultOperator !== 'isempty' && defaultOperator !== 'isnotempty') {\n defaultFilters.push(that._defaultFilter());\n }\n that.filterModel = kendo.observable({\n logic: 'and',\n filters: defaultFilters\n });\n if (that.form) {\n kendo.bind(that.form.children().first(), that.filterModel);\n }\n if (that._bind(expression)) {\n that.link.addClass('k-state-active');\n } else {\n that.link.removeClass('k-state-active');\n }\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n if (that.form) {\n kendo.unbind(that.form);\n kendo.destroy(that.form);\n that.form.unbind(NS);\n if (that.popup) {\n that.popup.destroy();\n that.popup = null;\n }\n that.form = null;\n }\n if (that.view) {\n that.view.purge();\n that.view = null;\n }\n that.link.unbind(NS);\n if (that._refreshHandler) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n that.dataSource = null;\n }\n that.element = that.link = that._refreshHandler = that.filterModel = null;\n },\n _bind: function (expression) {\n var that = this, filters = expression.filters, idx, length, found = false, current = 0, filterModel = that.filterModel, currentFilter, filter;\n for (idx = 0, length = filters.length; idx < length; idx++) {\n filter = filters[idx];\n if (filter.field == that.field) {\n filterModel.set('logic', expression.logic);\n currentFilter = filterModel.filters[current];\n if (!currentFilter) {\n filterModel.filters.push({ field: that.field });\n currentFilter = filterModel.filters[current];\n }\n currentFilter.set('value', that._parse(filter.value));\n currentFilter.set('operator', filter.operator);\n current++;\n found = true;\n } else if (filter.filters) {\n found = found || that._bind(filter);\n }\n }\n return found;\n },\n _stripFilters: function (filters) {\n return $.grep(filters, function (filter) {\n return filter.value !== '' && filter.value != null || (filter.operator === 'isnull' || filter.operator === 'isnotnull' || filter.operator === 'isempty' || filter.operator === 'isnotempty' || filter.operator == 'isnullorempty' || filter.operator == 'isnotnullorempty');\n });\n },\n _merge: function (expression) {\n var that = this, logic = expression.logic || 'and', filters = this._stripFilters(expression.filters), filter, result = that.dataSource.filter() || {\n filters: [],\n logic: 'and'\n }, idx, length;\n removeFiltersForField(result, that.field);\n for (idx = 0, length = filters.length; idx < length; idx++) {\n filter = filters[idx];\n filter.value = that._parse(filter.value);\n }\n if (filters.length) {\n if (result.filters.length) {\n expression.filters = filters;\n if (result.logic !== 'and') {\n result.filters = [{\n logic: result.logic,\n filters: result.filters\n }];\n result.logic = 'and';\n }\n if (filters.length > 1) {\n result.filters.push(expression);\n } else {\n result.filters.push(filters[0]);\n }\n } else {\n result.filters = filters;\n result.logic = logic;\n }\n }\n return result;\n },\n filter: function (expression) {\n var filters = this._stripFilters(expression.filters);\n if (filters.length && this.trigger('change', {\n filter: {\n logic: expression.logic,\n filters: filters\n },\n field: this.field\n })) {\n return;\n }\n expression = this._merge(expression);\n if (expression.filters.length) {\n this.dataSource.filter(expression);\n }\n },\n clear: function () {\n var that = this, expression = that.dataSource.filter() || { filters: [] };\n if (this.trigger('change', {\n filter: null,\n field: that.field\n })) {\n return;\n }\n that._removeFilter(expression);\n },\n _mobileClear: function () {\n var that = this;\n var viewElement = that.view.element;\n if (that.type === 'boolean') {\n var booleanRadioButton = viewElement.find('[type=\\'radio\\']:checked');\n var booleanRadioButtonValue = booleanRadioButton.val();\n booleanRadioButton.val('');\n booleanRadioButton.trigger('change');\n booleanRadioButton.val(booleanRadioButtonValue);\n booleanRadioButton.prop('checked', false);\n } else {\n var operatorSelects = viewElement.find('select');\n operatorSelects.each(function (i, e) {\n var input = $(e);\n input.val(input.find('option:first').val());\n input.trigger('change');\n });\n if (that.type === 'string' || that.type === 'date' || that.type === 'number') {\n var valueInputs = viewElement.find('.k-value-input');\n valueInputs.each(function (i, e) {\n var input = $(e);\n input.val('');\n input.trigger('change');\n });\n }\n if (that.options.extra) {\n var andLogicRadio = viewElement.find('[name=logic]').first();\n andLogicRadio.prop('checked', true);\n andLogicRadio.trigger('change');\n }\n }\n },\n _removeFilter: function (expression) {\n var that = this;\n expression.filters = $.grep(expression.filters, function (filter) {\n if (filter.filters) {\n filter.filters = clearFilter(filter.filters, that.field);\n return filter.filters.length;\n }\n return filter.field != that.field;\n });\n if (!expression.filters.length) {\n expression = null;\n }\n that.dataSource.filter(expression);\n },\n _submit: function (e) {\n e.preventDefault();\n e.stopPropagation();\n var expression = this.filterModel.toJSON();\n var containsFilters = $.grep(expression.filters, function (filter) {\n return filter.value !== '' && filter.value !== null;\n });\n if (this._checkForNullOrEmptyFilter(expression) || containsFilters && containsFilters.length) {\n this.filter(expression);\n } else {\n var currentExpression = this.dataSource.filter();\n if (currentExpression) {\n currentExpression.filters.push(expression);\n expression = currentExpression;\n }\n this._removeFilter(expression);\n }\n this._closeForm();\n },\n _checkForNullOrEmptyFilter: function (expression) {\n if (!expression || !expression.filters || !expression.filters.length) {\n return false;\n }\n var firstNullOrEmpty = false;\n var secondNullOrEmpty = false;\n var operator;\n if (expression.filters[0]) {\n operator = expression.filters[0].operator;\n firstNullOrEmpty = operator == 'isnull' || operator == 'isnotnull' || operator == 'isnotempty' || operator == 'isempty' || operator == 'isnullorempty' || operator == 'isnotnullorempty';\n }\n if (expression.filters[1]) {\n operator = expression.filters[1].operator;\n secondNullOrEmpty = operator == 'isnull' || operator == 'isnotnull' || operator == 'isnotempty' || operator == 'isempty' || operator == 'isnullorempty' || operator == 'isnotnullorempty';\n }\n return !this.options.extra && firstNullOrEmpty || this.options.extra && (firstNullOrEmpty || secondNullOrEmpty);\n },\n _reset: function () {\n this.clear();\n if (this.options.search && this.container) {\n this.container.find('label').parent().show();\n }\n this._closeForm();\n },\n _closeForm: function () {\n if (this._isMobile) {\n this.pane.navigate('', this.options.animations.right);\n } else {\n this.popup.close();\n }\n },\n _click: function (e) {\n e.preventDefault();\n e.stopPropagation();\n if (!this.popup && !this.pane) {\n this._init();\n }\n if (this._isMobile) {\n this.pane.navigate(this.view, this.options.animations.left);\n } else {\n this.popup.toggle();\n }\n },\n _open: function () {\n var popup;\n $('.k-filter-menu').not(this.form).each(function () {\n popup = $(this).data(POPUP);\n if (popup) {\n popup.close();\n }\n });\n },\n _activate: function () {\n this.form.find(':kendoFocusable:first').focus();\n this.trigger(OPEN, {\n field: this.field,\n container: this.form\n });\n },\n _keydown: function (e) {\n if (e.keyCode == kendo.keys.ESC) {\n this.popup.close();\n }\n },\n events: [\n INIT,\n 'change',\n OPEN\n ],\n options: {\n name: 'FilterMenu',\n extra: true,\n appendToElement: false,\n type: 'string',\n operators: {\n string: {\n eq: EQ,\n neq: NEQ,\n startswith: 'Starts with',\n contains: 'Contains',\n doesnotcontain: 'Does not contain',\n endswith: 'Ends with',\n isnull: 'Is null',\n isnotnull: 'Is not null',\n isempty: 'Is empty',\n isnotempty: 'Is not empty',\n isnullorempty: 'Has no value',\n isnotnullorempty: 'Has value'\n },\n number: {\n eq: EQ,\n neq: NEQ,\n gte: 'Is greater than or equal to',\n gt: 'Is greater than',\n lte: 'Is less than or equal to',\n lt: 'Is less than',\n isnull: 'Is null',\n isnotnull: 'Is not null'\n },\n date: {\n eq: EQ,\n neq: NEQ,\n gte: 'Is after or equal to',\n gt: 'Is after',\n lte: 'Is before or equal to',\n lt: 'Is before',\n isnull: 'Is null',\n isnotnull: 'Is not null'\n },\n enums: {\n eq: EQ,\n neq: NEQ,\n isnull: 'Is null',\n isnotnull: 'Is not null'\n }\n },\n messages: {\n info: 'Show items with value that:',\n title: 'Show items with value that:',\n isTrue: 'is true',\n isFalse: 'is false',\n filter: 'Filter',\n clear: 'Clear',\n and: 'And',\n or: 'Or',\n selectValue: '-Select value-',\n operator: 'Operator',\n value: 'Value',\n additionalValue: 'Additional value',\n additionalOperator: 'Additional operator',\n logic: 'Filters logic',\n cancel: 'Cancel',\n done: 'Done',\n into: 'in'\n },\n animations: {\n left: 'slide',\n right: 'slide:right'\n }\n }\n });\n var multiCheckNS = '.kendoFilterMultiCheck';\n function filterValuesForField(expression, field) {\n if (expression.filters) {\n expression.filters = $.grep(expression.filters, function (filter) {\n filterValuesForField(filter, field);\n if (filter.filters) {\n return filter.filters.length;\n } else {\n return filter.field == field && filter.operator == 'eq';\n }\n });\n }\n }\n function flatFilterValues(expression) {\n if (expression.logic == 'and' && expression.filters.length > 1) {\n return [];\n }\n if (expression.filters) {\n return $.map(expression.filters, function (filter) {\n return flatFilterValues(filter);\n });\n } else if (expression.value !== undefined) {\n return [expression.value];\n } else {\n return [];\n }\n }\n function distinct(items, field) {\n var getter = kendo.getter(field, true), result = [], index = 0, seen = {};\n while (index < items.length) {\n var item = items[index++], text = getter(item);\n if (text !== undefined && !seen.hasOwnProperty(text)) {\n result.push(item);\n seen[text] = true;\n }\n }\n return result;\n }\n function removeDuplicates(dataSelector, dataTextField) {\n return function (e) {\n var items = dataSelector(e);\n return distinct(items, dataTextField);\n };\n }\n var DataSource = kendo.data.DataSource;\n var multiCkeckMobileTemplate = '
' + '
' + '' + '#=messages.filter# #=messages.into# #=title#' + '' + '
' + '' + '
    ' + '#if(search){#' + '
  • ' + '' + '' + '
  • ' + '#}#' + '
  • ' + '#=messages.checkAll#' + '#=messages.clearAll#' + '
  • ' + '#if(messages.selectedItemsFormat){#' + '
  • ' + '
    ' + '
  • ' + '#}#' + '
  • ' + '
      ' + '
    • ' + '
    ' + '' + '
    ';\n var FilterMultiCheck = Widget.extend({\n init: function (element, options) {\n Widget.fn.init.call(this, element, options);\n options = this.options;\n this.element = $(element);\n var field = this.field = this.options.field || this.element.attr(kendo.attr('field'));\n var checkSource = options.checkSource;\n if (this._foreignKeyValues()) {\n this.checkSource = DataSource.create(options.values);\n this.checkSource.fetch();\n } else if (options.forceUnique) {\n checkSource = $.extend(true, {}, options.dataSource.options);\n delete checkSource.pageSize;\n this.checkSource = DataSource.create(checkSource);\n this.checkSource.reader.data = removeDuplicates(this.checkSource.reader.data, this.field);\n } else {\n this.checkSource = DataSource.create(checkSource);\n }\n this.dataSource = options.dataSource;\n this.model = this.dataSource.reader.model;\n this._parse = function (value) {\n return value + '';\n };\n if (this.model && this.model.fields) {\n field = this.model.fields[this.field];\n if (field) {\n if (field.type == 'number') {\n this._parse = function (value) {\n if (typeof value === 'string' && value.toLowerCase() === 'null') {\n return null;\n }\n return parseFloat(value);\n };\n } else if (field.parse) {\n this._parse = proxy(field.parse, field);\n }\n this.type = field.type || 'string';\n }\n }\n if (!options.appendToElement) {\n this._createLink();\n } else {\n this._init();\n }\n this._refreshHandler = proxy(this.refresh, this);\n this.dataSource.bind(CHANGE, this._refreshHandler);\n },\n _createLink: function () {\n var element = this.element;\n var link = element.addClass('k-with-icon k-filterable').find('.k-grid-filter');\n if (!link[0]) {\n link = element.prepend('').find('.k-grid-filter');\n }\n this._link = link.attr('tabindex', -1).on('click' + NS, proxy(this._click, this));\n },\n _init: function () {\n var that = this;\n var forceUnique = this.options.forceUnique;\n var options = this.options;\n this.pane = options.pane;\n if (this.pane) {\n this._isMobile = true;\n }\n this._createForm();\n if (this._foreignKeyValues()) {\n this.refresh();\n } else if (forceUnique && !this.checkSource.options.serverPaging && this.dataSource.data().length) {\n this.checkSource.data(distinct(this.dataSource.data(), this.field));\n this.refresh();\n } else {\n this._attachProgress();\n this.checkSource.fetch(function () {\n that.refresh.call(that);\n });\n }\n if (!this.options.forceUnique) {\n this.checkChangeHandler = function () {\n that.container.empty();\n that.refresh();\n };\n this.checkSource.bind(CHANGE, this.checkChangeHandler);\n }\n this.form.on('keydown' + multiCheckNS, proxy(this._keydown, this)).on('submit' + multiCheckNS, proxy(this._filter, this)).on('reset' + multiCheckNS, proxy(this._reset, this));\n this.trigger(INIT, {\n field: this.field,\n container: this.form\n });\n },\n _attachProgress: function () {\n var that = this;\n this._progressHandler = function () {\n ui.progress(that.container, true);\n };\n this._progressHideHandler = function () {\n ui.progress(that.container, false);\n };\n this.checkSource.bind('progress', this._progressHandler).bind('change', this._progressHideHandler);\n },\n _input: function () {\n var that = this;\n that._clearTypingTimeout();\n that._typingTimeout = setTimeout(function () {\n that.search();\n }, 100);\n },\n _clearTypingTimeout: function () {\n if (this._typingTimeout) {\n clearTimeout(this._typingTimeout);\n this._typingTimeout = null;\n }\n },\n search: function () {\n var ignoreCase = this.options.ignoreCase;\n var searchString = this.searchTextBox[0].value;\n var labels = this.container.find('label');\n if (ignoreCase) {\n searchString = searchString.toLowerCase();\n }\n var i = 0;\n if (this.options.checkAll && labels.length) {\n if (!this._isMobile) {\n labels[0].parentNode.style.display = searchString ? 'none' : '';\n i++;\n } else {\n this.view.element.find('.k-select-all')[0].style.visibility = searchString ? 'hidden' : '';\n }\n }\n while (i < labels.length) {\n var label = labels[i];\n var labelText = label.textContent || label.innerText;\n if (ignoreCase) {\n labelText = labelText.toLowerCase();\n }\n label.parentNode.style.display = labelText.indexOf(searchString) >= 0 ? '' : 'none';\n i++;\n }\n },\n _activate: function () {\n this.form.find(':kendoFocusable:first').focus();\n this.trigger(OPEN, {\n field: this.field,\n container: this.form\n });\n },\n _createForm: function () {\n var options = this.options;\n var html = '';\n var that = this;\n if (!this._isMobile) {\n html += '
    ';\n if (options.search) {\n html += '
    ' + '' + '' + '
    ';\n }\n html += '
      ';\n if (options.messages.selectedItemsFormat) {\n html += '
      ' + kendo.format(options.messages.selectedItemsFormat, 0) + '
      ';\n }\n html += '
      ';\n html += '';\n html += '';\n html += '
      ';\n html += '
      ';\n this.form = $('
      ').html(html);\n this.container = this.form.find('.k-multicheck-wrap');\n }\n if (this._isMobile) {\n that.form = $('
      ').html(kendo.template(multiCkeckMobileTemplate)({\n field: that.field,\n title: options.title || that.field,\n ns: kendo.ns,\n messages: options.messages,\n search: options.search,\n checkAll: options.checkAll\n }));\n that.view = that.pane.append(that.form.html());\n that.form = that.view.element.find('form');\n var element = this.view.element;\n this.container = element.find('.k-multicheck-wrap');\n element.on('click', '.k-header-done', function (e) {\n that.form.submit();\n e.preventDefault();\n }).on('click', '.k-header-cancel', function (e) {\n that._closeForm();\n e.preventDefault();\n }).on('click', '.k-clear-all', function (e) {\n that._mobileCheckAll(false);\n e.preventDefault();\n }).on('click', '.k-select-all', function (e) {\n that._mobileCheckAll(true);\n e.preventDefault();\n });\n that.view.bind('showStart', function () {\n that.refresh();\n });\n } else {\n if (!options.appendToElement) {\n that.popup = that.form.kendoPopup({\n anchor: that._link,\n copyAnchorStyles: false,\n open: proxy(that._open, that),\n activate: proxy(that._activate, that),\n close: function () {\n if (that.options.closeCallback) {\n that.options.closeCallback(that.element);\n }\n }\n }).data(POPUP);\n } else {\n this.popup = this.element.closest('.k-popup').data(POPUP);\n this.element.append(this.form);\n }\n }\n if (options.search) {\n this.searchTextBox = this.form.find('.k-textbox > input');\n this.searchTextBox.on('input', proxy(this._input, this));\n }\n },\n createCheckAllItem: function () {\n var options = this.options;\n var template = kendo.template(options.itemTemplate({\n field: 'all',\n mobile: this._isMobile\n }));\n var checkAllContainer = $(template({ all: options.messages.checkAll }));\n this.container.prepend(checkAllContainer);\n this.checkBoxAll = checkAllContainer.find(':checkbox').eq(0).addClass('k-check-all');\n this.checkAllHandler = proxy(this.checkAll, this);\n this.checkBoxAll.on(CHANGE + multiCheckNS, this.checkAllHandler);\n },\n updateCheckAllState: function () {\n if (this.options.messages.selectedItemsFormat) {\n this.form.find('.k-filter-selected-items').text(kendo.format(this.options.messages.selectedItemsFormat, this.container.find(':checked:not(.k-check-all)').length));\n }\n if (this.checkBoxAll) {\n var state = this.container.find(':checkbox:not(.k-check-all)').length == this.container.find(':checked:not(.k-check-all)').length;\n this.checkBoxAll.prop('checked', state);\n }\n },\n refresh: function (e) {\n var forceUnique = this.options.forceUnique;\n var dataSource = this.dataSource;\n var filters = this.getFilterArray();\n if (this._link) {\n this._link.toggleClass('k-state-active', filters.length !== 0);\n }\n if (this.form) {\n if (e && forceUnique && e.sender === dataSource && !dataSource.options.serverPaging && (e.action == 'itemchange' || e.action == 'add' || e.action == 'remove' || dataSource.options.autoSync && e.action === 'sync') && !this._foreignKeyValues()) {\n this.checkSource.data(distinct(this.dataSource.data(), this.field));\n this.container.empty();\n }\n if (this.container.is(':empty')) {\n this.createCheckBoxes();\n }\n this.checkValues(filters);\n this.trigger(REFRESH);\n }\n },\n getFilterArray: function () {\n var expression = $.extend(true, {}, {\n filters: [],\n logic: 'and'\n }, this.dataSource.filter());\n filterValuesForField(expression, this.field);\n var flatValues = flatFilterValues(expression);\n return flatValues;\n },\n createCheckBoxes: function () {\n var options = this.options;\n var data;\n var templateOptions = {\n field: this.field,\n format: options.format,\n mobile: this._isMobile,\n type: this.type\n };\n if (!this.options.forceUnique) {\n data = this.checkSource.view();\n } else if (this._foreignKeyValues()) {\n data = this.checkSource.data();\n templateOptions.valueField = 'value';\n templateOptions.field = 'text';\n } else if (this.checkSource._isServerGrouped()) {\n data = distinct(this.checkSource._flatData(this.checkSource.data()), this.field);\n } else {\n data = this.checkSource.data();\n }\n var template = kendo.template(options.itemTemplate(templateOptions));\n var itemsHtml = kendo.render(template, data);\n if (options.checkAll && !this._isMobile) {\n this.createCheckAllItem();\n }\n this.container.on(CHANGE + multiCheckNS, ':checkbox', proxy(this.updateCheckAllState, this));\n this.container.append(itemsHtml);\n },\n checkAll: function () {\n var state = this.checkBoxAll.is(':checked');\n this.container.find(':checkbox').prop('checked', state);\n },\n checkValues: function (values) {\n var that = this;\n $($.grep(this.container.find(':checkbox').prop('checked', false), function (ele) {\n var found = false;\n if ($(ele).is('.k-check-all')) {\n return;\n }\n var checkBoxVal = that._parse($(ele).val());\n for (var i = 0; i < values.length; i++) {\n if (that.type == 'date') {\n if (values[i] && checkBoxVal) {\n found = values[i].getTime() == checkBoxVal.getTime();\n } else if (values[i] === null && checkBoxVal === null) {\n found = true;\n } else {\n found = false;\n }\n } else {\n found = values[i] == checkBoxVal;\n }\n if (found) {\n return found;\n }\n }\n })).prop('checked', true);\n this.updateCheckAllState();\n },\n _mobileCheckAll: function (state) {\n var that = this;\n var checkboxes = that.container.find(':checkbox');\n checkboxes.each(function (i, e) {\n var checkbox = $(e);\n checkbox.prop('checked', state);\n checkbox.trigger('change');\n });\n },\n _filter: function (e) {\n e.preventDefault();\n e.stopPropagation();\n var expression = { logic: 'or' };\n var that = this;\n expression.filters = $.map(this.form.find(':checkbox:checked:not(.k-check-all)'), function (item) {\n return {\n value: $(item).val(),\n operator: 'eq',\n field: that.field\n };\n });\n if (expression.filters.length && this.trigger('change', {\n filter: expression,\n field: that.field\n })) {\n return;\n }\n expression = this._merge(expression);\n if (expression.filters.length) {\n this.dataSource.filter(expression);\n } else {\n this.clear();\n }\n this._closeForm();\n },\n _stripFilters: function (filters) {\n return $.grep(filters, function (filter) {\n return filter.value != null;\n });\n },\n _foreignKeyValues: function () {\n var options = this.options;\n return options.values && !options.checkSource;\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n if (that.form) {\n kendo.unbind(that.form);\n kendo.destroy(that.form);\n that.form.unbind(multiCheckNS);\n if (that.popup) {\n that.popup.destroy();\n that.popup = null;\n }\n that.form = null;\n if (that.container) {\n that.container.unbind(multiCheckNS);\n that.container = null;\n }\n if (that.checkBoxAll) {\n that.checkBoxAll.unbind(multiCheckNS);\n }\n }\n if (that.view) {\n that.view.purge();\n that.view = null;\n }\n if (that._link) {\n that._link.unbind(NS);\n }\n if (that._refreshHandler) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n that.dataSource = null;\n }\n if (that.checkChangeHandler) {\n that.checkSource.unbind(CHANGE, that.checkChangeHandler);\n }\n if (that._progressHandler) {\n that.checkSource.unbind('progress', that._progressHandler);\n }\n if (that._progressHideHandler) {\n that.checkSource.unbind('change', that._progressHideHandler);\n }\n this._clearTypingTimeout();\n this.searchTextBox = null;\n that.element = that.checkSource = that.container = that.checkBoxAll = that._link = that._refreshHandler = that.checkAllHandler = null;\n },\n options: {\n name: 'FilterMultiCheck',\n itemTemplate: function (options) {\n var field = options.field;\n var format = options.format;\n var valueField = options.valueField;\n var mobile = options.mobile;\n var valueFormat = '';\n if (valueField === undefined) {\n valueField = field;\n }\n if (options.type == 'date') {\n valueFormat = ':yyyy-MM-ddTHH:mm:sszzz';\n }\n if (mobile) {\n return '
    • ' + '' + '
    • ';\n }\n return '
    • ' + '' + '
    • ';\n },\n checkAll: true,\n search: false,\n ignoreCase: true,\n appendToElement: false,\n messages: {\n checkAll: 'Select All',\n clearAll: 'Clear All',\n clear: 'Clear',\n filter: 'Filter',\n search: 'Search',\n cancel: 'Cancel',\n selectedItemsFormat: '{0} items selected',\n done: 'Done',\n into: 'in'\n },\n forceUnique: true,\n animations: {\n left: 'slide',\n right: 'slide:right'\n }\n },\n events: [\n INIT,\n REFRESH,\n 'change',\n OPEN\n ]\n });\n $.extend(FilterMultiCheck.fn, {\n _click: FilterMenu.fn._click,\n _keydown: FilterMenu.fn._keydown,\n _reset: FilterMenu.fn._reset,\n _closeForm: FilterMenu.fn._closeForm,\n _removeFilter: FilterMenu.fn._removeFilter,\n clear: FilterMenu.fn.clear,\n _merge: FilterMenu.fn._merge\n });\n ui.plugin(FilterMenu);\n ui.plugin(FilterMultiCheck);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}