UNPKG

@progress/kendo-react-data-tools

Version:

Includes React Pager & React Filter component, an intuitive interface to create complex filter descriptions. KendoReact Data Tools package

10 lines (9 loc) 1.55 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),f=require("./FilterComponent.js"),d=require("@progress/kendo-react-dropdowns");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const g=p(s),c="eq",v={emptyFilter:{operator:c,value:""},inputComponent:e=>null,operatorComponent:function(e,n){const{filter:t=[],field:o}=n,i=t.find(r=>r.field===o);return g.createElement(d.DropDownList,{...e,value:e.data.find(r=>r.operator===(i?i.value:"")),onChange:r=>{if(!n.onFilterChange)return;const a=r.target.value.operator;if(a===""){i&&n.onFilterChange.call(void 0,{filter:t.filter(l=>l.field!==i.field),field:o,syntheticEvent:r.syntheticEvent});return}const u=i?t.map(l=>l.field===o?{...i,value:a}:l):[...t,{value:a,field:o,operator:c}];n.onFilterChange.call(void 0,{filter:u,field:o,syntheticEvent:r.syntheticEvent})}})}};class m extends f.createFilterComponent(v){}exports.BooleanFilterCell=m;