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

PropTypeDescription
activitiesProcessingActivity[]Required. Activities to display. Sorted by updatedAt descending in the rendered table.
titlestringHeader. Defaults to "Lawful Basis Tracker".
descriptionstringSub-header. Defaults to an NDPA Section 25 explainer.
showSummarybooleanToggle the four-stat summary cards (total / sensitive / cross-border / pending). Defaults to true.
showComplianceGapsbooleanToggle the high / medium severity gap alerts produced by assessComplianceGaps. Defaults to true.
onActivityClick(activity: ProcessingActivity) => voidOptional row callback. When provided, each row becomes keyboard-accessible (role="button", Enter / Space activates).
classNamestringExtra class merged onto the root.
classNamesLawfulBasisTrackerLiteClassNamesPer-slot overrides (root, header, title, summary, summaryCard, table, tableHeader, tableRow, statusBadge, complianceScore, gapAlert).
unstyledbooleanStrip 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 validateProcessingActivity from /core.