Licensing
Delegates every entitlement decision to a remote licensing server. The module contains no key-generation logic, no embedded secrets, and no locally-granted "enterprise" default — the safe default for any caller that omits credentials, or whose request fails, is a restricted trial tier.
The trial tier
Without a valid apiKey (or before the async check resolves), every dashboard runs at:
| Field | Trial value |
|---|---|
| maxHistoricalRows | 1,000 — the dataset is silently truncated to the first 1,000 rows |
| canExport | false — the PDF export button is disabled |
| showWatermark | true — a banner states the row cap and that export is off |
The row cap lives in DashboardStore itself, not in any one framework wrapper —
so it applies identically whether you're using React, Vue, Angular, or the custom element.
A dashboard always starts at this safe default and only loosens once a license check
actually resolves successfully; a slow or failed check never lets more rows through.
Checking a license
import { checkLicense } from '@datastripes/dashboard';
const license = await checkLicense({ apiKey: 'ds_live_...' });
// { isValid, plan, maxHistoricalRows, canExport, showWatermark, ... }
store.setLicense(license); // re-caps the dataset and re-renders
Every framework wrapper does this automatically from its apiKey prop/attribute —
you only need to call it yourself if you're driving DashboardStore directly (see
DashboardStore).
Gated features
On the React entry, a trial (invalid) license additionally locks:
- PDF export — the toolbar button is disabled with a lock icon.
- 9 of the 25 chart types — the Distribution group (heatmap, calendar heatmap, box plot), Relationships & flow (network graph, Sankey, parallel coordinates), and Specialized (gauge, funnel, candlestick) are shown disabled in the chart-type picker.
- New calculated fields — existing ones remain visible and usable; the "Add calculated field" control is disabled.
Everyday chart types (line, area, bar, pie, donut, scatter, radar, treemap, sunburst, …) remain available on trial — a free user can still build a full dashboard.
LicenseValidationResult
interface LicenseValidationResult {
isValid: boolean;
licenseKey: string;
domain: string;
isHostMatch: boolean;
isExpired: boolean;
expiresAt: string | null;
plan: 'trial' | 'pro' | 'enterprise';
customerName?: string;
maxHistoricalRows: number; // Infinity on a valid license
canExport: boolean;
showWatermark: boolean;
tamperDetected: boolean;
hashDigest: string;
}