UNPKG

@progress/kendo-react-common

Version:

React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package

12 lines (11 loc) 1.84 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@progress/kendo-licensing"),p=require("./canUseDOM.js"),g=["telerik.com","progress.com","stackblitz.io","csb.app"],d="https://www.telerik.com/kendo-react-ui/components/free?utm_medium=product&utm_source=console&utm_campaign=dt_kendoreact_freemium",n=new Map,h=()=>{const t=Array.from(n,([e,c])=>`- ${e}: ${Array.from(c).join(", ")||"all"}`).join(` `);console.group("[WARN][Telerik and Kendo UI Licensing] KendoReact"),console.warn(`License check was triggered by these premium KendoReact components/features ${t} See the full list of free and premium components here: ${d}`),console.groupEnd(),n.clear()},k=(t,e)=>{const c=i.validatePackage(t),o=g.some(s=>{var a;return(a=globalThis.document)==null?void 0:a.location.hostname.endsWith(s)});if(!c&&p.canUseDOM&&e)if(n.size===0&&setTimeout(h,1e3),n.has(e.component)){const s=n.get(e.component)||[];n.set(e.component,new Set([...e.features||[],...s]))}else n.set(e.component,e.features||[]);return c||o},L=t=>i.getLicenseStatus(t).isLicenseValid,r=new WeakMap,f=t=>{var m;if(r.has(t))return r.get(t);const{version:e,productName:c}=t,o=i.getLicenseStatus(t),s=o.message,a=o.licenseType,l=(m=o.expiration)==null?void 0:m.toDateString(),u={code:s&&"code"in s?s.code:void 0,licenseType:a,version:e,productName:c,expiration:l};return r.set(t,u),u};exports.getLicenseMessage=f;exports.hasValidLicense=L;exports.validatePackage=k;