New:Socket for Asana Is Now Available.Learn more
Get Started

@svgrid/enterprise

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svgrid/enterprise - npm Package Compare versions

Comparing version
2.5.2
to
2.5.3
dist/designer/assets/index-CBYU-KNn.js

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

+2
-2

@@ -7,3 +7,3 @@ <!doctype html>

<title>SvGrid Studio - Designer</title>
<script type="module" crossorigin src="./assets/index-CM5xvaOy.js"></script>
<script type="module" crossorigin src="./assets/index-CBYU-KNn.js"></script>
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-Dd_uD5pT.js">

@@ -20,3 +20,3 @@ <link rel="modulepreload" crossorigin href="./assets/disclose-version-CIm4S9xS.js">

<link rel="modulepreload" crossorigin href="./assets/SvGridChart-BEDNTdc5.js">
<link rel="modulepreload" crossorigin href="./assets/src-D-ET9Mmo.js">
<link rel="modulepreload" crossorigin href="./assets/src-i309BeJb.js">
<link rel="modulepreload" crossorigin href="./assets/SvListBox-BVzVfCG3.js">

@@ -23,0 +23,0 @@ <link rel="stylesheet" crossorigin href="./assets/dismissable-BF-9TJSd.css">

@@ -7,3 +7,3 @@ {

},
"version": "2.5.2",
"version": "2.5.3",
"description": "Enterprise feature pack for SvGrid: Excel (xlsx), PDF, CSV, TSV and HTML export, Excel/CSV/JSON import, pivot tables with a drag-and-drop designer, paginated print, Kanban board and scheduler views. Requires a paid license key.",

@@ -10,0 +10,0 @@ "license": "SEE LICENSE IN LICENSE",

@@ -100,14 +100,31 @@ // @vitest-environment jsdom

it('a lapsed trial gets the card but NOT the watermark', () => {
it('a lapsed trial gets the watermark, the console notice AND the card', () => {
vi.useFakeTimers({ now: new Date('2026-09-20T10:00:00Z') })
const info = vi.spyOn(console, 'info').mockImplementation(() => {})
setLicenseKey(KEY)
assertEnterpriseLicensed('Export')
// The evaluation is over, so the app stops looking licensed on every
// surface - it just keeps working.
expect(document.querySelector(CARD)).not.toBeNull()
// Someone who evaluated and let the clock run out is a prospect mid-
// conversation; stamping their UI is the wrong pressure. An app with no
// key at all still gets both surfaces - covered below.
expect(watermarkCalls()).toBe(0)
expect(watermarkCalls()).toBeGreaterThan(0)
expect(info.mock.calls.flat().join(' ')).toMatch(/evaluation license expired on 2026-09-04/)
info.mockRestore()
})
it('the expiry console notice fires once, not on every Pro call', () => {
vi.useFakeTimers({ now: new Date('2026-09-20T10:00:00Z') })
const info = vi.spyOn(console, 'info').mockImplementation(() => {})
setLicenseKey(KEY)
assertEnterpriseLicensed('Export')
assertEnterpriseLicensed('Export')
assertEnterpriseLicensed('Print')
const expiryNotices = info.mock.calls
.flat()
.filter((m) => typeof m === 'string' && m.includes('evaluation license expired'))
expect(expiryNotices).toHaveLength(1)
info.mockRestore()
})
it('an app with no key at all still gets the watermark', () => {

@@ -114,0 +131,0 @@ clearLicenseKey()

@@ -15,7 +15,7 @@ // Polite license gate. Not crypto - anyone with devtools can extract the key

// "SVENTERPRISE-EVAL" -> works; one-time console.info notice
// an EXPIRED dev/eval key -> still works, but shows the upgrade
// card each session. No watermark: a
// lapsed trial is a prospect, not an
// unlicensed app. Stays a soft gate so a
// trial ending cannot break a build.
// an EXPIRED dev/eval key -> still works, but stops looking
// licensed: watermark + a one-time
// console notice naming the expiry date
// + the upgrade card. Stays a soft gate
// so a trial ending cannot break a build.
// any other "SVENTERPRISE-..." -> works silently (paid production)

@@ -31,3 +31,19 @@

let noticedDev = false
let noticedExpired = false
/** One-time console notice for a trial that has run out. Separate from the
* dev/eval notice: that one says "not for production", this one says the
* evaluation is over and names the date, which is the actionable part. */
function noticeExpired(info: LicenseInfo): void {
if (noticedExpired) return
noticedExpired = true
const on = info.expiresAt ? ` on ${info.expiresAt.toISOString().slice(0, 10)}` : ''
// eslint-disable-next-line no-console
console.info(
`@svgrid/enterprise: your evaluation license expired${on}. Everything still ` +
'works, but the watermark and upgrade notice stay until a license key is set. ' +
'Contact sales@jqwidgets.com or see https://svgrid.com/pricing',
)
}
export function setLicenseKey(key: string): void {

@@ -39,2 +55,3 @@ if (typeof key !== 'string' || key.length === 0) {

noticedDev = false
noticedExpired = false
}

@@ -45,2 +62,3 @@

noticedDev = false
noticedExpired = false
}

@@ -93,7 +111,7 @@

const lapsedTrial = info.valid && info.expired === true
// A lapsed trial gets the card but NOT the watermark. Someone who evaluated
// and let the clock run out is a prospect mid-conversation, not an app that
// never had a licence - stamping their UI is the wrong pressure. An app with
// no key at all still gets both.
if (!lapsedTrial) emitUnlicensedNudge()
// A lapsed trial gets the same treatment as an unlicensed app - watermark,
// console notice and card. The evaluation is over; the app keeps running,
// but it stops looking licensed.
emitUnlicensedNudge()
if (lapsedTrial) noticeExpired(info)
showUpgradePrompt(feature, { expired: lapsedTrial })

@@ -126,4 +144,6 @@ }

// The trial is over. Deliberately NOT a throw: the app keeps working,
// so the developer sees the nudge without their users hitting a broken
// build. Card only - no watermark; see nudgeEnterprise() for why.
// so the developer sees the nudges without their users hitting a broken
// build. Watermark + console notice + card, same as an unlicensed app.
emitUnlicensedNudge()
noticeExpired(info)
showUpgradePrompt(feature, { expired: true })

@@ -130,0 +150,0 @@ return

@@ -13,2 +13,2 @@ /**

*/
export const SVGRID_VERSION = '2.5.2'
export const SVGRID_VERSION = '2.5.3'

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display