` +\n '
' +\n `
` +\n `
${list.label ? list.label.element.text() : list.options.label || list.options.placeholder || \"Select\"}
` +\n (list.options.placeholder && (list.label || list.options.label) ? `
${list.options.placeholder || \"\"}
` : \"\") +\n '
' +\n (options.closeButton ?\n '
' +\n kendo.html.renderButton(``, { icon: \"x\", fillMode: \"flat\", size: \"large\" }) +\n '
'\n : \"\") +\n '
' +\n (this._isFilterEnabled() ? `
` : '') +\n '
',\n closeButton: true,\n focusOnActivate: false,\n fullscreen: list.smallScreenMQL.mediaQueryList.matches,\n popup: extend({}, list.options.popup, {\n anchor: list.wrapper,\n open: list._openHandler.bind(list),\n close: list._closeHandler.bind(list),\n animation: list.options.animation,\n isRtl: support.isRtl(list.wrapper),\n autosize: list.options.autoWidth,\n }),\n deactivate: () => {\n this._refreshFloatingLabel();\n },\n activate: () => {\n this._refreshFloatingLabel();\n }\n });\n } else {\n list.popup = new ui.Popup(list.list, extend({}, list.options.popup, {\n anchor: list.wrapper,\n open: list._openHandler.bind(list),\n close: list._closeHandler.bind(list),\n animation: list.options.animation,\n isRtl: support.isRtl(list.wrapper),\n autosize: list.options.autoWidth,\n deactivate: () => {\n this._refreshFloatingLabel();\n },\n activate: () => {\n this._refreshFloatingLabel();\n }\n }));\n\n list.popup.one(\"open\", list._popupOpen.bind(list));\n }\n },\n\n _allowOpening: function() {\n return this.options.noDataTemplate || this.treeview.dataSource.flatView().length;\n },\n\n _placeholder: function(show) {\n if (this.span) {\n this.span.toggleClass(\"k-readonly\", show).text(show ? this.options.placeholder : \"\");\n }\n },\n\n _currentValue: function(dataItem) {\n var currentValue = this._value(dataItem);\n if (!currentValue && currentValue !== 0) {\n currentValue = dataItem;\n }\n\n return currentValue;\n },\n\n _checkValue: function(dataItem) {\n var value = \"\";\n var indexOfValue = -1;\n var currentValue = this.value();\n var isMultiple = this.options.tagMode === \"multiple\";\n\n if (dataItem || dataItem === 0) {\n if (dataItem.level) {\n dataItem._level = dataItem.level();\n }\n\n value = this._currentValue(dataItem);\n\n indexOfValue = currentValue.indexOf(value);\n }\n\n if (dataItem.checked) {\n var alreadyAddedTag = $.grep(this._tags, function( item ) {\n return item.uid === dataItem._tagUid;\n });\n\n if (alreadyAddedTag.length) {\n return;\n }\n\n var itemToAdd = new ObservableObject(dataItem.toJSON());\n dataItem._tagUid = itemToAdd.uid;\n this._tags.push(itemToAdd);\n\n if (this._tags.length === 1) {\n this.span.hide();\n\n if (!isMultiple) {\n this._multipleTags.push(itemToAdd);\n }\n }\n\n if (indexOfValue === -1) {\n currentValue.push(value);\n this.setValue(currentValue);\n }\n } else {\n var itemToRemove = this._tags.find(function(item) {\n return item.uid === dataItem._tagUid;\n });\n\n var idx = this._tags.indexOf(itemToRemove);\n\n if (idx !== -1) {\n this._tags.splice(idx, 1);\n } else {\n this._treeViewCheckAllCheck(dataItem);\n return;\n }\n\n if (this._tags.length === 0) {\n this.span.show();\n if (!isMultiple) {\n this._multipleTags.splice(0, 1);\n }\n }\n if (indexOfValue !== -1) {\n currentValue.splice(indexOfValue, 1);\n this.setValue(currentValue);\n }\n }\n\n this._treeViewCheckAllCheck(dataItem);\n if (!this._preventChangeTrigger && !this._valueMethodCalled && !this._noInitialValue) {\n this.trigger(CHANGE);\n }\n\n if (this.options.autoClose && this.popup.visible()) {\n this.close();\n this.wrapper.trigger(\"focus\");\n }\n\n this.popup.position();\n this._toggleCloseVisibility();\n this._updateSelectedOptions();\n },\n\n _updateSelectedOptions: function() {\n if (this.element[0].tagName.toLowerCase() !== 'select') {\n return;\n }\n\n var selectedItems = this._tags;\n var options = '';\n var dataItem = null;\n var value = null;\n\n if (selectedItems.length) {\n for (var idx = 0; idx < selectedItems.length; idx++) {\n dataItem = selectedItems[idx];\n\n value = this._value(dataItem);\n options += this._option(value, this._text(dataItem), true);\n }\n }\n\n this.element.html(options);\n },\n\n _option: function(dataValue, dataText, selected) {\n var option = \"' +\n kendo.ui.icon({ icon: \"exclamation-circle\", iconClass: \"k-tooltip-icon\" }) +\n `${message}` +\n '' +\n '
',\n CHANGE = \"change\";\n var EQUAL_SET = \"equalSet\";\n var specialRules = [\"url\", \"email\", \"number\", \"date\", \"boolean\"];\n\n function fieldType(field) {\n field = field != null ? field : \"\";\n return field.type || kendo.type(field) || \"string\";\n }\n\n function convertToValueBinding(container) {\n container.find(\":input:not(:button, .k-checkbox-list .k-checkbox, .k-radio-list .k-radio, [\" + kendo.attr(\"role\") + \"=listbox], [\" + kendo.attr(\"role\") + \"=upload], [\" + kendo.attr(\"skip\") + \"], [type=file]), [\" + kendo.attr(\"role\") + \"=radiogroup]\").each(function() {\n var bindAttr = kendo.attr(\"bind\"),\n binding = this.getAttribute(bindAttr) || \"\",\n bindingName = this.type === \"checkbox\" || this.type === \"radio\" ? \"checked:\" : \"value:\",\n isAntiForgeryToken = this.getAttribute(\"name\") === Editable.antiForgeryTokenName,\n fieldName = this.attributes.name && this.attributes.name.value;\n\n if (binding.indexOf(bindingName) === -1 && fieldName && !isAntiForgeryToken) {\n binding += (binding.length ? \",\" : \"\") + bindingName + fieldName;\n\n $(this).attr(bindAttr, binding);\n }\n });\n }\n\n function createAttributes(options) {\n var field = (options.model.fields || options.model)[options.field],\n type = fieldType(field),\n validation = field ? field.validation : {},\n attributes = field ? field.attributes : {},\n ruleName,\n DATATYPE = kendo.attr(\"type\"),\n BINDING = kendo.attr(\"bind\"),\n rule,\n attr = {\n id: options.id || options.field,\n name: options.field,\n title: options.title ? options.title : options.field\n };\n\n for (ruleName in validation) {\n rule = validation[ruleName];\n\n if (inArray(ruleName, specialRules) >= 0) {\n attr[DATATYPE] = ruleName;\n } else if (!isFunction(rule)) {\n var culture = kendo.getCulture();\n\n if (typeof rule === \"number\" && culture.name.length) {\n var numberFormat = culture.numberFormat;\n var stringRule = rule.toString()\n .replace(POINT, numberFormat[POINT]);\n\n attr[ruleName] = stringRule;\n } else {\n attr[ruleName] = isPlainObject(rule) ? rule.value || ruleName : rule;\n }\n }\n\n attr[kendo.attr(ruleName + \"-msg\")] = rule.message;\n\n attr.autocomplete = AUTOCOMPLETEVALUE;\n }\n\n for (var attributeName in attributes) {\n attr[attributeName] = attributes[attributeName];\n }\n\n if (inArray(type, specialRules) >= 0) {\n attr[DATATYPE] = type;\n }\n\n attr[BINDING] = (type === \"boolean\" ? \"checked:\" : \"value:\") + options.field;\n\n return attr;\n }\n\n function addIdAttribute(container, attr) {\n var id = container.attr(\"id\");\n\n if (id) {\n attr.id = id;\n container.removeAttr(\"id\");\n }\n\n return attr;\n }\n\n function convertItems(items) {\n var idx,\n length,\n item,\n value,\n text,\n result;\n\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.value || item;\n value = item.value == null ? (item.text || item) : item.value;\n\n result[idx] = { text: text, value: value };\n }\n }\n return result;\n }\n\n function getEditorTag(type, options) {\n var tag;\n\n if (!type.length) { return; }\n\n if ((type === \"DropDownTree\" && options && options.checkboxes) || type === \"MultiSelect\") {\n tag = \"