{"version":3,"sources":["kendo.filtercell.js"],"names":["f","define","$","undefined","isNonValueFilter","filter","operator","inArray","nonValueOperators","findFilterForField","field","i","result","filters","isPlainObject","hasOwnProperty","isArray","length","removeFiltersForField","expression","grep","removeDuplicates","dataSelector","dataTextField","getter","kendo","e","item","text","items","index","seen","push","window","ui","DataSource","data","Widget","CHANGE","BOOL","ENUM","STRING","EQ","NEQ","proxy","FilterCell","extend","init","element","options","wrapper","that","dataSource","viewModel","passedOptions","first","type","operators","input","suggestDataSource","fields","target","addClass","this","appendTo","attr","fn","call","model","reader","values","_parse","value","parse","defaultOperator","observable","operatorVisible","val","get","_clearInProgress","bind","updateDsFilter","initSuggestDataSource","inputWidth","width","_getColumnTitle","_setInputType","showOperators","_createOperatorDropDown","css","_createClearIcon","template","setAutoCompleteSource","setComboBoxSource","_refreshUI","_refreshHandler","radioInput","inputName","labelTrue","labelFalse","_angularItems","suggestionOperator","delay","minLength","remove","guid","messages","isTrue","append","clone","isFalse","column","title","prop","dropdown","operatorDropDown","kendoDropDownList","dataValueField","open","popup","valuePrimitive","ariaLabel","find","removeClass","customDataSource","group","create","_pageSize","autoComplete","setDataSource","comboBox","manuallyUpdatingVM","set","currentFilter","prevented","mergeResult","toJSON","logic","trigger","_merge","idx","clear","html","click","clearFilter","action","elements","closest","angular","destroy","filterModel","unbind","events","name","string","eq","neq","startswith","contains","doesnotcontain","endswith","isnull","isnotnull","isempty","isnotempty","isnullorempty","isnotnullorempty","number","gte","gt","lte","lt","date","enums","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,oBACH,qBACA,mBACA,uBACA,iBACA,sBACDD,IACL,WAuaE,MA/ZC,UAAUE,EAAGC,GASV,QAASC,GAAiBC,GACtB,GAAIC,GAA6B,gBAAXD,GAAsBA,EAASA,EAAOC,QAC5D,OAAOJ,GAAEK,QAAQD,EAAUE,MAE/B,QAASC,GAAmBJ,EAAQK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5C,EAAKC,WAAW4B,KAAK1C,EAAQa,EAAK4C,iBAClC5C,EAAK4C,gBAAkB,MAE3BtE,EAAM8H,OAAOpG,EAAKH,SAClBX,EAAO6B,GAAGmF,QAAQlF,KAAKhB,GACvB1B,EAAM4H,QAAQlG,EAAKH,UAEvBwG,QAASlH,GACTW,SACIwG,KAAM,aACNnD,MAAO,IACPC,UAAW,EACXpB,WAAY,KACZb,OAAQnE,EACRyH,kBAAkB,EAClBlH,MAAO,GACPa,cAAe,GACfiC,KAAM,SACNG,kBAAmB,KACnB0C,mBAAoB,aACpB/F,SAAU,KACViF,eAAe,EACfI,SAAU,KACVe,UACIC,OAAQ,UACRG,QAAS,WACTzG,OAAQ,SACRwI,MAAO,QACPvI,SAAU,YAEdmD,WACIiG,QACIC,GAAIjH,EACJkH,IAAKjH,EACLkH,WAAY,cACZC,SAAU,WACVC,eAAgB,mBAChBC,SAAU,YACVC,OAAQ,UACRC,UAAW,cACXC,QAAS,WACTC,WAAY,eACZC,cAAe,eACfC,iBAAkB,aAEtBC,QACIZ,GAAIjH,EACJkH,IAAKjH,EACL6H,IAAK,8BACLC,GAAI,kBACJC,IAAK,2BACLC,GAAI,eACJV,OAAQ,UACRC,UAAW,eAEfU,MACIjB,GAAIjH,EACJkH,IAAKjH,EACL6H,IAAK,uBACLC,GAAI,WACJC,IAAK,wBACLC,GAAI,YACJV,OAAQ,UACRC,UAAW,eAEfW,OACIlB,GAAIjH,EACJkH,IAAKjH,EACLsH,OAAQ,UACRC,UAAW,kBAK3BhI,GAAG4I,OAAOjI,IACZZ,OAAOR,MAAMsJ,QACR9I,OAAOR,OACE,kBAAVxB,SAAwBA,OAAO+K,IAAM/K,OAAS,SAAUgL,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.filtercell.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.filtercell', [\n 'kendo.autocomplete',\n 'kendo.datepicker',\n 'kendo.numerictextbox',\n 'kendo.combobox',\n 'kendo.dropdownlist'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'filtercell',\n name: 'Row filter',\n category: 'framework',\n depends: ['autocomplete'],\n advanced: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, DataSource = kendo.data.DataSource, Widget = ui.Widget, CHANGE = 'change', BOOL = 'boolean', ENUM = 'enums', STRING = 'string', EQ = 'Is equal to', NEQ = 'Is not equal to', proxy = $.proxy, nonValueOperators = [\n 'isnull',\n 'isnotnull',\n 'isempty',\n 'isnotempty',\n 'isnullorempty',\n 'isnotnullorempty'\n ];\n function isNonValueFilter(filter) {\n var operator = typeof filter === 'string' ? filter : filter.operator;\n return $.inArray(operator, nonValueOperators) > -1;\n }\n function findFilterForField(filter, field) {\n var filters = [];\n if ($.isPlainObject(filter)) {\n if (filter.hasOwnProperty('filters')) {\n filters = filter.filters;\n } else if (filter.field == field) {\n return filter;\n }\n }\n if ($.isArray(filter)) {\n filters = filter;\n }\n for (var i = 0; i < filters.length; i++) {\n var result = findFilterForField(filters[i], field);\n if (result) {\n return result;\n }\n }\n }\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 removeDuplicates(dataSelector, dataTextField) {\n var getter = kendo.getter(dataTextField, true);\n return function (e) {\n var items = dataSelector(e), result = [], index = 0, seen = {};\n while (index < items.length) {\n var item = items[index++], text = getter(item);\n if (!seen.hasOwnProperty(text)) {\n result.push(item);\n seen[text] = true;\n }\n }\n return result;\n };\n }\n var FilterCell = Widget.extend({\n init: function (element, options) {\n element = $(element).addClass('k-filtercell');\n var wrapper = this.wrapper = $('').appendTo(element);\n var that = this, dataSource, viewModel, passedOptions = options, first, type, operators = that.operators = options.operators || {}, input = that.input = $('').attr(kendo.attr('bind'), 'value: value').appendTo(wrapper);\n var suggestDataSource = options ? options.suggestDataSource : null;\n if (suggestDataSource) {\n options = $.extend({}, options, { suggestDataSource: {} });\n }\n Widget.fn.init.call(that, element[0], options);\n if (suggestDataSource) {\n that.options.suggestDataSource = suggestDataSource;\n }\n options = that.options;\n dataSource = that.dataSource = options.dataSource;\n that.model = dataSource.reader.model;\n type = options.type = STRING;\n var fields = kendo.getter('reader.model.fields', true)(dataSource) || {};\n var target = fields[options.field];\n if (target && target.type) {\n type = options.type = target.type;\n }\n if (options.values) {\n options.type = type = ENUM;\n }\n operators = operators[type] || options.operators[type];\n if (!passedOptions.operator) {\n for (first in operators) {\n options.operator = first;\n break;\n }\n }\n that._parse = function (value) {\n return value != null ? value + '' : value;\n };\n if (that.model && that.model.fields) {\n var field = that.model.fields[options.field];\n if (field) {\n if (field.parse) {\n that._parse = proxy(field.parse, field);\n }\n }\n }\n that.defaultOperator = options.operator;\n that.viewModel = viewModel = kendo.observable({\n operator: options.operator,\n value: null,\n operatorVisible: function () {\n var val = this.get('value');\n return val !== null && val !== undefined && val != 'undefined' || isNonValueFilter(this.get('operator')) && !that._clearInProgress;\n }\n });\n viewModel.bind(CHANGE, proxy(that.updateDsFilter, that));\n if (type == STRING) {\n that.initSuggestDataSource(options);\n }\n if (options.inputWidth !== null) {\n input.addClass('k-sized-input');\n input.width(options.inputWidth);\n }\n input.attr('aria-label', that._getColumnTitle());\n input.attr('title', that._getColumnTitle());\n that._setInputType(options, type);\n if (type != BOOL && options.showOperators !== false) {\n that._createOperatorDropDown(operators);\n } else {\n $('
').css('display', 'none').text('eq').appendTo(wrapper);\n wrapper.addClass('k-operator-hidden');\n }\n that._createClearIcon();\n kendo.bind(this.wrapper, viewModel);\n if (type == STRING) {\n if (!options.template) {\n that.setAutoCompleteSource();\n }\n }\n if (type == ENUM) {\n that.setComboBoxSource(that.options.values);\n }\n that._refreshUI();\n that._refreshHandler = proxy(that._refreshUI, that);\n that.dataSource.bind(CHANGE, that._refreshHandler);\n },\n _setInputType: function (options, type) {\n var that = this, input = that.input;\n if (typeof options.template == 'function') {\n options.template.call(that.viewModel, {\n element: that.input,\n dataSource: that.suggestDataSource\n });\n that._angularItems('compile');\n } else if (type == STRING) {\n input.attr(kendo.attr('role'), 'autocomplete').attr(kendo.attr('text-field'), options.dataTextField || options.field).attr(kendo.attr('filter'), options.suggestionOperator).attr(kendo.attr('delay'), options.delay).attr(kendo.attr('min-length'), options.minLength).attr(kendo.attr('value-primitive'), true);\n } else if (type == 'date') {\n input.attr(kendo.attr('role'), 'datepicker');\n } else if (type == BOOL) {\n input.remove();\n var radioInput = $('');\n var wrapper = that.wrapper;\n var inputName = kendo.guid();\n var labelTrue = $('