kendo-ui-core
Version:
Kendo UI is everything you need to build sites and apps with HTML5 & JavaScript. Kendo UI Core is the free and open-source version of Kendo UI that provides access to the web's best UI widgets and key framework features, essential for developing great exp
17 lines • 3.06 kB
JavaScript
/*!
* Copyright 2026 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import"./core-COCvCZRc.js";import"./kendo.core.js";const e={id:`loader`,name:`Loader`,category:`web`,description:`The Loader is a visual indicator of loading data across different parts of the page.`,depends:[`core`]};(function(e,t){var n=window.kendo,r=n.ui.Widget,i=n.ui,a=`k-hidden`,o=`role`,s=`aria-label`,c=`aria-hidden`,l=`aria-live`,u={loader:`k-loader`,canvas:`k-loader-canvas`,segment:`k-loader-segment`},d={pulsing:{className:`pulsing-2`,segments:2},"infinite-spinner":{className:`spinner-3`,segments:3},"converging-spinner":{className:`spinner-4`,segments:4}},f=r.extend({init:function(e,t){var i=this;r.fn.init.call(i,e,t),i._render(),i._appearance(),n.notify(i)},destroy:function(){var e=this;r.fn.destroy.call(e)},options:{name:`Loader`,themeColor:t,sizes:{small:`sm`,medium:`md`,large:`lg`},size:t,type:`pulsing`,visible:!0,messages:{loading:`Loading`},_classNames:[]},_render:function(){var n=this,r=n.element,i=n.options.type,a=d[i]===t?i:d[i],c=[];if(r.empty().attr(s,n.options.messages.loading).attr(o,`alert`).attr(l,`polite`),a.segments)for(var f=0;f<a.segments;f+=1)c.push(e(`<span/>`).addClass(u.segment));e(`<div>`).addClass(u.canvas).append(c).appendTo(r)},_appearance:function(){var e=this;e._themeColor=e.options.themeColor,e._sizes=e.options.sizes,e._size=e.options.size,e._type=e.options.type,e._visible=e.options.visible,e._updateClassNames()},_updateClassNames:function(){var n=this,r=[u.loader],i=n.options._classNames,o=n._themeColor,s=n._sizes,l=n._size,f=n._type,p=d[f]===t?f:d[f],m=s[l]===t?l:s[l],h=n._visible;n.element.removeClass(function(e,t){t.indexOf(`k-`)===0&&i.indexOf(t)===-1&&n.element.removeClass(t)}),typeof o==`string`&&o!==``&&o!==`inherit`&&r.push(`k-loader-`+o),typeof l==`string`&&l!==``&&m!==``&&r.push(`k-loader-`+m),typeof f==`string`&&f!==``&&r.push(`k-loader-`+(e.isPlainObject(p)?p.className:f)),h===!1&&r.push(a),n.element.attr(c,!h),n.element.addClass(r.join(` `))},setOptions:function(e){var t=this;r.fn.setOptions.call(t,e),t._render(),t._appearance()},themeColor:function(e){var n=this;if(arguments.length===0||e===t)return n._themeColor;n._themeColor=e,n._updateClassNames()},hide:function(){var e=this;e._visible=!1,e._updateClassNames()},show:function(){var e=this;e._visible=!0,e._updateClassNames()}});i.plugin(f)})(window.kendo.jQuery);var t=kendo;export{e as __meta__,t as default};
//# sourceMappingURL=kendo.loader.js.map