UNPKG

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 13.7 kB
/*! * 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. */ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`./core-R4j5Vh3b.js`),t=require(`./kendo.licensing.js`);let n=window.jQuery||window.$||jQuery;const r=window.kendo=window.kendo||{cultures:{}},i=n.extend,a=n.each,o=n.noop,s=[].slice;r.version=t.packageMetadata.version;const c=e.O.getConstructor(),l=e.A.getFullEventMap(),u={get paramName(){return e.h.paramName},set paramName(t){e.h.paramName=t},get useWithBlock(){return e.h.useWithBlock},set useWithBlock(t){e.h.useWithBlock=t},render:function(t,n){return e.h.render(t,n)},compile:function(t,n){return e.h.compile(t,n)}};r.jQuery=c,r.eventMap=l,r.ConvertClass=e.M,r.createProxyMember=function(t,n){return e.k.createProxyMember(t,n)},r.getBaseClass=function(t){return e.k.getBaseClass(t)},r.getAllMethods=function(t){return e.k.getAllMethods(t)},r.convertPromiseToDeferred=function(t){return e.k.convertPromiseToDeferred(t)},r.throttle=function(t,n){return e.k.throttle(t,n)},r.trim=function(t){return e.k.trim(t)},r.whenAll=function(t){return e.k.whenAll(t)},r.days=e.k.days,r.isPresent=t=>e.k.isPresent(t),r.isBlank=t=>e.k.isBlank(t),r.isEmpty=t=>e.k.isEmpty(t),r.isString=t=>e.k.isString(t),r.isInteger=t=>e.k.isInteger(t),r.isNumeric=t=>e.k.isNumeric(t),r.isDate=t=>e.k.isDate(t),r.isFunction=t=>e.k.isFunction(t);function d(t){let n=Array.prototype.slice.call(arguments,1);return e.k.deepExtend(t,...n)}function f(t){return e.k.toHyphens(t)}function p(t){return e.k.toCamelCase(t)}function m(t){return e.k.size(t)}function h(t,n){return e.m.encode(t,n)}function g(t){return e.m.sanitizeLink(t)}function _(t){return e.m.unescape(t)}function v(t,n){return e.m.convertTextUrlToLink(t,n)}function y(t){return e.b.findCulture(t)}function b(t){return e.b.getCulture(t)}r.culture=function(t){if(t!==void 0)e.b.setCulture(t);else return e.b.culture()},r.findCulture=y,r.getCulture=b,r.kendoCultureToIntl=function(t){return e.g.convert(t)},r.culture(`en-US`);const x=function(t,n,r){return e.y.round(t,n,r)},S=function(t,n,r){return e.y.toString(t,n,r)};r.format=function(t){let n=Array.prototype.slice.call(arguments,1);return e.y.format(t,...n)},r._extractFormat=function(t){return e.y.extractFormat(t)},r._round=x,r.dimensions=function(t,n){return e.w.dimensions(t,n)},r.onResize=function(t){return e.w.onResize(t)},r.unbindResize=function(t){e.w.unbindResize(t)},r.attrValue=function(t,n){return e.w.attrValue(t,n)},r.stripWhitespace=function(t){e.w.stripWhitespace(t)},r.animationFrame=function(t){e.w.animationFrame(t)},r.queueAnimation=function(t){e.w.queueAnimation(t)},r.runNextAnimation=function(){e.w.runNextAnimation()},r.parseQueryStringParams=function(t){return e.w.parseQueryStringParams(t)},r.elementUnderCursor=function(t){return e.w.elementUnderCursor(t)},r.wheelDeltaY=function(t){return e.w.wheelDeltaY(t)},r.addAttribute=function(t,n,r){return e.w.addAttribute(t,n,r)},r.removeAttribute=function(t,n){return e.w.removeAttribute(t,n)},r.toggleAttribute=function(t,n,r){return e.w.toggleAttribute(t,n,r)},r.applyStylesFromKendoAttributes=function(t,n){return e.w.applyStylesFromKendoAttributes(t,n)},r.isElement=function(t){return e.w.isElement(t)},r._outerWidth=function(t,n,r){return e.w.outerWidth(t,n,r)},r._outerHeight=function(t,n,r){return e.w.outerHeight(t,n,r)},r.getShadows=function(t){return e.w.getShadows(t)},r.wrap=function(t,n,r,i=!0,a){return e.w.wrap(t,n,r,i,a)};function C(t,n){return e.w.getComputedStyles(t,n)}function w(t){return e.w.isScrollable(t)}function T(t,n){return e.w.scrollLeft(t,n)}function E(t,n,r){return e.w.getOffset(t,n,r)}function D(t){return e.w.parseEffects(t)}r.toString=S,r.parseDate=function(t,n,r,i){return e._.parseDate(t,n,r,i)},r.parseExactDate=function(t,n,r){return e._.parseExactDate(t,n,r)},r.parseInt=function(t,n){return e.v.parseInt(t,n)},r.parseFloat=function(t,n,r){return e.v.parseFloat(t,n,r)},(function(){let t=!1,n;Object.defineProperty(r,`timezone`,{get:function(){return n},set:function(r){n=r,r&&!t&&(e._.setTimezoneService(r),t=!0)},configurable:!0})})();const O=e.f.directions;function k(t){return e.f.fx(t)}const A=e.f.effects;function j(t,n,r,i,a){return e.f.animate(t,n,r,i,a)}function M(t,n,r,i){return e.f.toggleClass(t,n,r,i)}`kendoAnimate`in n.fn||i(n.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,r){return j(this,e,t,n,r)},kendoAddClass:function(e,t){return r.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return r.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return r.toggleClass(this,e,t,n)}}),e.j.touch&&a([`swipe`,`swipeLeft`,`swipeRight`,`swipeUp`,`swipeDown`,`doubleTap`,`tap`],function(e,t){n.fn[t]=function(e){return this.on(t,e)}}),i(r,{ui:r.ui||{},fx:r.fx||k,effects:r.effects||A,mobile:r.mobile||{},data:r.data||{},dataviz:r.dataviz||{},drawing:r.drawing||{},spreadsheet:{messages:{}},keys:e.k.keys,support:r.support||e.j,animate:r.animate||j,attr:function(t){return e.w.attr(t)},deepExtend:d,getComputedStyles:C,isScrollable:w,scrollLeft:T,size:m,toCamelCase:p,toHyphens:f,getOffset:r.getOffset||E,parseEffects:r.parseEffects||D,toggleClass:r.toggleClass||M,directions:r.directions||O,Observable:e.E,Class:e.D,Template:u,template:u.compile.bind(u),render:u.render.bind(u),stringify:JSON.stringify.bind(JSON),eventTarget:function(t){return e.w.eventTarget(t)},htmlEncode:h,sanitizeLink:g,convertTextUrlToLink:v,unescape:_,isLocalUrl:function(t){return e.k.isLocalUrl(t)},mediaQuery:e.P,expr:function(t,n,r){return e.c.expr(t,n,r)},exprToArray:function(t,n){return e.c.exprToArray(t,n)},getter:function(t,n){return e.c.getter(t,n)},setter:function(t){return e.c.setter(t)},accessor:function(t){return e.c.accessor(t)},guid:function(){return e.k.guid()},roleSelector:function(t){return e.i.roleSelector(t,e.T.ns)},directiveSelector:function(t){return e.i.directiveSelector(t)},triggeredByInput:function(t){return e.w.triggeredByInput(t)},logToConsole:function(t,n){e.k.logToConsole(t,n)}}),Object.defineProperty(r,`ns`,{get:function(){return e.T.ns},set:function(t){e.T.setNs(t)},enumerable:!0,configurable:!0}),r.notify=o,r.initWidget=function(t,n,r,i){return e.s.initWidget(t,n,r,i)},r.rolesFromNamespaces=function(t){return e.l.rolesFromNamespaces(t,[r.ui,r.dataviz.ui])},r.init=function(t){let n=s.call(arguments,1);e.s.init(t,...n)},r.destroy=function(t){e.s.destroy(t)},r.resize=function(t,n){e.s.resize(t,n)},r.parseOptions=function(t,n,r){return e.s.parseOptions(t,n,r)};const N={bind:function(){return this},nullObject:!0,options:{}},P=e.S.extend({init:function(t,n){e.S.fn.init.call(this,t,n),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass(`km-widget`)},destroy:function(){e.S.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:`Mobile`},events:[],view:function(){let t=this.element.closest(r.roleSelector(`view splitview modalview drawer`));return e.s.widgetInstance(t,r.mobile.ui)||N},viewHasNativeScrolling:function(){let e=this.view();return e&&e.options.useNativeScrolling},container:function(){let t=this.element.closest(r.roleSelector(`view layout modalview drawer splitview`));return e.s.widgetInstance(t.eq(0),r.mobile.ui)||N}});r.ui=e.l.createNamespace(`ui`,{Widget:e.S,DataBoundWidget:e.x,progress:function(t,n,r){return e.w.progress(t,n,r)},plugin:function(t,n,i){e.l.registerToNamespace(t,n||r.ui,i)}}),r.ui.progress.messages={loading:`Loading...`},r.mobile.ui=e.l.createNamespace(`mobile.ui`,{Widget:P,DataBoundWidget:e.x.extend(P.prototype),plugin:function(t){e.l.registerToNamespace(t,r.mobile.ui,`Mobile`)}}),i(r.mobile,{init:function(t){let n=e.l.getNamespace(`ui`),r=e.l.getNamespace(`mobile.ui`),i=e.l.getNamespace(`dataviz.ui`);e.s.init(t,r,n,i)},roles:{}}),r.dataviz.ui=e.l.createNamespace(`dataviz.ui`,{themes:{},views:[],plugin:function(t){e.l.registerToNamespace(t,r.dataviz.ui)}}),d(r.dataviz,{init:function(t){e.s.init(t,e.l.getNamespace(`dataviz.ui`))},roles:{}}),r.touchScroller=function(t,i){return i||={},i.useNative=!0,n(t).map(function(t,a){return a=n(a),e.j.kineticScrollNeeded&&r.mobile.ui.Scroller&&!a.data(`kendoMobileScroller`)?(a.kendoMobileScroller(i),a.data(`kendoMobileScroller`)):!1})[0]},r.preventDefault=function(e){e.preventDefault()},r.widgetInstance=function(t,n){return e.s.widgetInstance(t,n)},r.applyEventMap=function(t,n){return e.A.applyEventMap(t,n)},r.keyDownHandler=function(t,n){return e.O.keyDownHandler(t,n)},r.timezone={get zones(){return e.r.zones},set zones(t){e.r.zones=t},get rules(){return e.r.rules},set rules(t){e.r.rules=t},offset:function(t,n){return e.r.offset(t,n)},convert:function(t,n,r){return e.r.convert(t,n,r)},apply:function(t,n){return e.r.apply(t,n)},remove:function(t,n){return e.r.remove(t,n)},abbr:function(t,n){return e.r.abbr(t,n)},toLocalDate:function(t){return e.r.toLocalDate(t)}},r.date={get MS_PER_MINUTE(){return e.p.MS_PER_MINUTE},get MS_PER_HOUR(){return e.p.MS_PER_HOUR},get MS_PER_DAY(){return e.p.MS_PER_DAY},adjustDST:function(t,n){return e.p.adjustDST(t,n)},setDayOfWeek:function(t,n,r){return e.p.setDayOfWeek(t,n,r)},dayOfWeek:function(t,n,r){return e.p.dayOfWeek(t,n,r)},firstDayOfMonth:function(t){return e.p.firstDayOfMonth(t)},lastDayOfMonth:function(t){return e.p.lastDayOfMonth(t)},firstDayOfYear:function(t){return e.p.firstDayOfYear(t)},lastDayOfYear:function(t){return e.p.lastDayOfYear(t)},weekInYear:function(t,n){return e.p.weekInYear(t,n)},getDate:function(t){return e.p.getDate(t)},toUtcTime:function(t){return e.p.toUtcTime(t)},getMilliseconds:function(t){return e.p.getMilliseconds(t)},isInTimeRange:function(t,n,r){return e.p.isInTimeRange(t,n,r)},isInDateRange:function(t,n,r){return e.p.isInDateRange(t,n,r)},addDays:function(t,n){return e.p.addDays(t,n)},setTime:function(t,n,r){return e.p.setTime(t,n,r)},setHours:function(t,n){return e.p.setHours(t,n)},today:function(){return e.p.today()},isToday:function(t){return e.p.isToday(t)},toInvariantTime:function(t){return e.p.toInvariantTime(t)},nextDay:function(t){return e.p.nextDay(t)},previousDay:function(t){return e.p.previousDay(t)},nextYear:function(t){return e.p.nextYear(t)},previousYear:function(t){return e.p.previousYear(t)},splitDateFormat:function(t){return e.p.splitDateFormat(t)},dateFormatNames:function(t){return e.p.dateFormatNames(t)},dateFieldName:function(t){return e.p.dateFieldName(t)}},r.caret=function(t,n,r){return e.d.caret(t,n,r)},r.antiForgeryTokens=function(){return e.d.antiForgeryTokens()},r.cycleForm=function(t){return e.o.cycleForm(t)},r.focusElement=function(t){return e.o.focusElement(t)},r.focusNextElement=function(){return e.o.focusNextElement()},r.getWidgetFocusableElement=function(t){return e.o.getWidgetFocusableElement(t)},r._activeElement=function(){return e.o.activeElement()},e.o.registerFocusableSelector(),r.matchesMedia=function(t){return e.j.matchesMedia(t)},r._bootstrapToMedia=function(t){return e.j.bootstrapToMedia(t)},r.fileGroupMap=e.u.fileGroupMap,r.getFileGroup=function(t,n){return e.u.getFileGroup(t,n)},r.getFileSizeMessage=function(t){return e.u.getFileSizeMessage(t)},r.saveAs=function(t){return e.u.saveAs(t)},r.selectorFromClasses=function(t){return e.i.selectorFromClasses(t)},r.cssProperties={get positionModeValues(){return e.C.positionModeValues},get roundedValues(){return e.C.roundedValues},get sizeValues(){return e.C.sizeValues},get shapeValues(){return e.C.shapeValues},get fillModeValues(){return e.C.fillModeValues},get themeColorValues(){return e.C.themeColorValues},get resizeValues(){return e.C.resizeValues},get overflowValues(){return e.C.overflowValues},get layoutFlowValues(){return e.C.layoutFlowValues},get defaultValues(){return e.C.defaultValues},set defaultValues(t){e.C.defaultValues=t},get propertyDictionary(){return e.C.propertyDictionary},set propertyDictionary(t){e.C.propertyDictionary=t},registerValues:function(t,n){return e.C.registerValues(t,n)},getValidClass:function(t){return e.C.getValidClass(t)},registerPrefix:function(t,n){return e.C.registerPrefix(t,n)},get propertyToCssClassMap(){return e.C.propertyToCssClassMap},registerCssClass:function(t,n,r){return e.C.registerCssClass(t,n,r)},registerCssClasses:function(t,n){return e.C.registerCssClasses(t,n)},getValidCssClass:function(t,n,r){return e.C.getValidCssClass(t,n,r)}},r.registerCssClass=function(t,n,r){return e.C.registerCssClass(t,n,r)},r.registerCssClasses=function(t,n){return e.C.registerCssClasses(t,n)},r.getValidCssClass=function(t,n,r){return e.C.getValidCssClass(t,n,r)},r.propertyToCssClassMap=e.C.propertyToCssClassMap,r.proxyModelSetters=function(e){let t={};return Object.keys(e||{}).forEach(function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t,e.dirty=!0}})}),t},r.getSeriesColors=function(){return e.a.getSeriesColors()},r.defaults=e.t.getDefaults(),r.setDefaults=function(t,n){e.t.setDefaults(t,n)},r.debugTemplates=window.DEBUG_KENDO_TEMPLATES,r.setDefaults(`breakpoints`,e.N),r.class2type=e.n.getClass2Type(),r.type=function(t){return e.n.type(t)},exports.default=r,exports.fromESClass=e.M; //# sourceMappingURL=kendo.core.js.map