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 2.61 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. */ const e={or:{concat:(e,t)=>n=>e(n)||t(n),identity:()=>!1},and:{concat:(e,t)=>n=>e(n)&&t(n),identity:()=>!0}},t={isnullorempty:e=>kendo.isBlank(e)||e===``,isnotnullorempty:e=>kendo.isPresent(e)&&e!==``,contains:(e,t)=>(e+``).indexOf(t)>=0,doesnotcontain:(e,t)=>(e+``).indexOf(t)===-1,doesnotendwith:(e,t)=>(e+``).indexOf(t,(e||``).length-(t||``).length)<0,doesnotstartwith:(e,t)=>(e+``).lastIndexOf(t,0)===-1,endswith:(e,t)=>(e+``).indexOf(t,(e||``).length-(t||``).length)>=0,eq:(e,t)=>e===t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t,isempty:e=>e===``,isnotempty:e=>e!==``,isnotnull:e=>kendo.isPresent(e),isnull:e=>kendo.isBlank(e),lt:(e,t)=>e<t,lte:(e,t)=>e<=t,neq:(e,t)=>e!=t,startswith:(e,t)=>(e+``).lastIndexOf(t,0)===0},n=/^\/Date\((.*?)\)\/$/,r=(e,t,r)=>{if(e!=null&&kendo.isString(e)){let i=n.exec(e);if(i)return new Date(+i[1]).getTime();if(t)return r?e.toLocaleLowerCase(r):e.toLowerCase()}else if(e!=null&&kendo.isDate(e))return e.getTime();return e},i=(e,t,r,i)=>{if(!kendo.isPresent(t))return e;let a=e;if(kendo.isString(t)){let o=n.exec(t);o?t=new Date(+o[1]):a=t=>{let n=e(t);return typeof n==`string`&&r?i?n.toLocaleLowerCase(i):n.toLowerCase():kendo.isNumeric(n)?n+``:n}}return kendo.isDate(t)?e=>{let t=a(e);return kendo.isDate(t)?t.getTime():t}:a},a=({field:e,ignoreCase:n,value:a,operator:o=`eq`,accentFoldingFiltering:s})=>{e=kendo.isPresent(e)?e:e=>e,n=kendo.isPresent(n)?n:!0;let c=i(kendo.isFunction(e)?e:kendo.getter(e,!0),a,n,s);a=r(a,n,s);let l=kendo.isFunction(o)?o:t[o];return e=>l(c(e),a,n)},o=e=>kendo.isPresent(e.filters),s=t=>{let n=t.accentFoldingFiltering,r=e[t.logic||`and`];return t.filters.filter(kendo.isPresent).map(e=>o(e)?s(c(e,n)):a(c(e,n))).reduce(r.concat,r.identity)},c=(e,t)=>kendo.isPresent(t)?Object.assign(e,{accentFoldingFiltering:t}):e,l=function(e){return s(e)};Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}}); //# sourceMappingURL=filter-expression-no-eval--xfq8dEO.js.map