{"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","_setInputType","showOperators","_createOperatorDropDown","_createClearIcon","template","setAutoCompleteSource","setComboBoxSource","_refreshUI","_refreshHandler","radioInput","inputName","labelTrue","labelFalse","_angularItems","suggestionOperator","delay","minLength","remove","guid","messages","isTrue","append","clone","isFalse","prop","dropdown","operatorDropDown","kendoDropDownList","dataValueField","open","popup","valuePrimitive","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","column","angular","destroy","filterModel","unbind","events","name","string","eq","neq","startswith","contains","doesnotcontain","endswith","isnull","isnotnull","isempty","isnotempty","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,WAuZE,MA/YC,UAAUE,EAAGC,GAOV,QAASC,GAAiBC,GACtB,GAAIC,GAA6B,gBAAXD,GAAsBA,EAASA,EAAOC,QAC5D,OAAOJ,GAAEK,QAAQD,EAAUE,MAE/B,QAASC,GAAmBJ,EAAQK,GAApC,GAYaC,GACDC,EAZJC,IACJ,IAAIX,EA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K7G,EACLuH,IAAK,8BACLC,GAAI,kBACJC,IAAK,2BACLC,GAAI,eACJR,OAAQ,UACRC,UAAW,eAEfQ,MACIf,GAAI7G,EACJ8G,IAAK7G,EACLuH,IAAK,uBACLC,GAAI,WACJC,IAAK,wBACLC,GAAI,YACJR,OAAQ,UACRC,UAAW,eAEfS,OACIhB,GAAI7G,EACJ8G,IAAK7G,EACLkH,OAAQ,UACRC,UAAW,kBAK3B5H,GAAGsI,OAAO3H,IACZZ,OAAOR,MAAMgJ,QACRxI,OAAOR,OACE,kBAAVxB,SAAwBA,OAAOyK,IAAMzK,OAAS,SAAU0K,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 ];\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.width(options.inputWidth);\n }\n that._setInputType(options, type);\n if (type != BOOL && options.showOperators !== false) {\n that._createOperatorDropDown(operators);\n } else {\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 = $('