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

37 lines (36 loc) 1.68 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { validatePackage as a, getLicenseStatus as m } from "@progress/kendo-licensing"; import { canUseDOM as i } from "./canUseDOM.mjs"; const u = ["telerik.com", "progress.com", "stackblitz.io", "csb.app"], p = "https://www.telerik.com/kendo-react-ui/components/free?utm_medium=product&utm_source=console&utm_campaign=dt_kendoreact_freemium", t = /* @__PURE__ */ new Map(), l = () => { const s = Array.from(t, ([e, o]) => `- ${e}: ${Array.from(o).join(", ") || "all"}`).join(` `); console.group("[WARN][Telerik and Kendo UI Licensing] KendoReact"), console.warn( `License check was triggered by these premium KendoReact components/features ${s} See the full list of free and premium components here: ${p}` ), console.groupEnd(), t.clear(); }, d = (s, e) => { const o = a(s), r = u.some( (c) => { var n; return (n = globalThis.document) == null ? void 0 : n.location.hostname.endsWith(c); } ); if (!o && i && e) if (t.size === 0 && setTimeout(l, 1e3), t.has(e.component)) { const c = t.get(e.component) || []; t.set(e.component, /* @__PURE__ */ new Set([...e.features || [], ...c])); } else t.set(e.component, e.features || []); return o || r; }, k = (s) => m(s).isLicenseValid; export { k as hasValidLicense, d as validatePackage };