LawfulBasisTrackerLite
Read-only variant of LawfulBasisTracker. Renders the summary cards, compliance-gap alerts, and activity table — without the form, LIA workflow, or edit affordances. Significantly smaller bundle when all you need is a view.
Overview
LawfulBasisTrackerLite is the display-only counterpart of LawfulBasisTracker. It renders the same summary cards (total activities, sensitive-data count, cross-border count, pending approvals), the same compliance-gap alerts, and the same activity table — but the form, the legitimate-interest assessment, the field validation, and the write-path utilities are not bundled. Pure read.
Reach for it on dashboards, audit reports, and customer-facing transparency pages where users only need to inspect activities, not edit them. For the full read/write surface, use the regular LawfulBasisTracker from the same module.
import { LawfulBasisTrackerLite } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';Quickstart
import { LawfulBasisTrackerLite } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';
import type { ProcessingActivity } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';
const activities: ProcessingActivity[] = [
{
id: 'act_001',
name: 'Customer onboarding',
description: 'KYC and account creation',
lawfulBasis: 'contract',
status: 'active',
involvesSensitiveData: false,
crossBorderTransfer: false,
dpoApproval: { approved: true, approvedAt: Date.now(), approvedBy: 'DPO' },
createdAt: Date.now(),
updatedAt: Date.now(),
// ...remaining ProcessingActivity fields
},
];
export default function ActivitiesPage() {
return (
<LawfulBasisTrackerLite
activities={activities}
showSummary
showComplianceGaps
onActivityClick={(a) => router.push(`/activities/${a.id}`)}
/>
);
}Props
| Prop | Type | Description |
|---|---|---|
activities | ProcessingActivity[] | Required. Activities to display. Sorted by updatedAt descending in the rendered table. |
title | string | Header. Defaults to "Lawful Basis Tracker". |
description | string | Sub-header. Defaults to an NDPA Section 25 explainer. |
showSummary | boolean | Toggle the four-stat summary cards (total / sensitive / cross-border / pending). Defaults to true. |
showComplianceGaps | boolean | Toggle the high / medium severity gap alerts produced by assessComplianceGaps. Defaults to true. |
onActivityClick | (activity: ProcessingActivity) => void | Optional row callback. When provided, each row becomes keyboard-accessible (role="button", Enter / Space activates). |
className | string | Extra class merged onto the root. |
classNames | LawfulBasisTrackerLiteClassNames | Per-slot overrides (root, header, title, summary, summaryCard, table, tableHeader, tableRow, statusBadge, complianceScore, gapAlert). |
unstyled | boolean | Strip every default class. |
When NOT to use the Lite variant
- You need an admin to add, edit, or archive activities — use the full LawfulBasisTracker.
- You need the legitimate-interest assessment (LIA) flow — also full only.
- You want server-side validation of new activities — pair the full variant with
validateProcessingActivityfrom/core.