@progress/kendo-react-common
Version:
React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package
44 lines (43 loc) • 2.08 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { validatePackage as l, getLicenseStatus as u } from "@progress/kendo-licensing";
import { canUseDOM as g } from "./canUseDOM.mjs";
const d = ["telerik.com", "progress.com", "stackblitz.io", "csb.app"], h = "https://www.telerik.com/kendo-react-ui/components/free?utm_medium=product&utm_source=console&utm_campaign=dt_kendoreact_freemium", o = /* @__PURE__ */ new Map(), k = () => {
const t = Array.from(o, ([e, n]) => `- ${e}: ${Array.from(n).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: ${h}`
), console.groupEnd(), o.clear();
}, _ = (t, e) => {
const n = l(t), c = d.some(
(s) => {
var r;
return (r = globalThis.document) == null ? void 0 : r.location.hostname.endsWith(s);
}
);
if (!n && g && e)
if (o.size === 0 && setTimeout(k, 1e3), o.has(e.component)) {
const s = o.get(e.component) || [];
o.set(e.component, /* @__PURE__ */ new Set([...e.features || [], ...s]));
} else
o.set(e.component, e.features || []);
return n || c;
}, M = (t) => u(t).isLicenseValid, a = /* @__PURE__ */ new WeakMap(), v = (t) => {
var m;
if (a.has(t))
return a.get(t);
const { version: e, productName: n } = t, c = u(t), s = c.message, r = c.licenseType, p = (m = c.expiration) == null ? void 0 : m.toDateString(), i = { code: s && "code" in s ? s.code : void 0, licenseType: r, version: e, productName: n, expiration: p };
return a.set(t, i), i;
};
export {
v as getLicenseMessage,
M as hasValidLicense,
_ as validatePackage
};