@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.85 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-licensing"),u=require("./canUseDOM.js"),m=["telerik.com","progress.com","stackblitz.io","csb.app"],l="https://www.telerik.com/kendo-react-ui/components/free?utm_medium=product&utm_source=console&utm_campaign=dt_kendoreact_freemium",n=new Map,p=()=>{const t=Array.from(n,([e,s])=>`- ${e}: ${Array.from(s).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: ${l}`),console.groupEnd(),n.clear()},g=(t,e)=>{const s=r.validatePackage(t),i=m.some(c=>{var a;return(a=globalThis.document)==null?void 0:a.location.hostname.endsWith(c)});if(!s&&u.canUseDOM&&e)if(n.size===0&&setTimeout(p,1e3),n.has(e.component)){const c=n.get(e.component)||[];n.set(e.component,new Set([...e.features||[],...c]))}else n.set(e.component,e.features||[]);return s||i},h=t=>r.getLicenseStatus(t).isLicenseValid,o=new WeakMap,d=t=>{if(o.has(t))return o.get(t);const e=r.getLicenseStatus(t).message,s=e==null?void 0:e.notificationMessage;return(e==null?void 0:e.severity)==="WARN"&&(e==null?void 0:e.code)==="TKL201"?s+"<br />See the browser console for a list of Premium features currently in use.":(o.set(t,s),s)};exports.getLicenseMessage=d;exports.hasValidLicense=h;exports.validatePackage=g;