UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

82 lines (67 loc) 2.26 kB
import './kendo.core.js'; import './kendo.licensing.js'; import '@progress/kendo-licensing'; const __meta__ = { id: "html.base", name: "Html.Base", category: "web", description: "", depends: ["core"], features: [] }; (function($, undefined$1) { var kendo = window.kendo, Class = kendo.Class; kendo.html = kendo.html || {}; var HTMLBase = Class.extend({ init: function(element, options) { var that = this; that.element = $(element); options = options || {}; delete options.name; that._initOptions(options); }, options: { stylingOptions: [] }, _addClasses: function() { var that = this, options = that.options, stylingOptions = options.stylingOptions, previouslyAddedClasses = that.wrapper.data("added-classes"); stylingOptions = stylingOptions.map(function(option) { var validFill; if (option === "themeColor") { validFill = kendo.cssProperties.getValidClass({ widget: options.name, propName: "fillMode", value: options.fillMode }); if (!validFill || validFill.length === 0) { return ""; } } return kendo.cssProperties.getValidClass({ widget: options.name, propName: option, value: options[option], fill: options.fillMode }); }); if (previouslyAddedClasses) { that.wrapper.removeClass(previouslyAddedClasses.join(" ")); } that.wrapper.data("added-classes", stylingOptions); that.wrapper.addClass(stylingOptions.join(" ")); }, html: function() { var that = this; return that.wrapper[0].outerHTML; } }); $.extend(kendo.html, { HTMLBase: HTMLBase }); })(window.kendo.jQuery); var kendo$1 = kendo; export { __meta__, kendo$1 as default };