@molecule/app-audit-log-row-solid

Feature · audit-log-row · App (browser) · v1.1.1 · Apache-2.0

Audit / error / event-log row: actor + action + object + timestamp + old/new values

npm install @molecule/app-audit-log-row-solid

npm · Source on GitHub

How it works

@molecule/app-audit-log-row-solid is a ready-made audit-log-row feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { render } from 'solid-js/web'
import { AuditLogRow } from '@molecule/app-audit-log-row-solid'

render(
  () => (
    <AuditLogRow
      entry={{
        id: 'evt-001',
        actor: 'alice@example.com',
        action: 'updated',
        target: 'Invoice #1042',
        timestamp: '2 min ago',
        oldValue: 'Draft',
        newValue: 'Sent',
      }}
      onClick={() => openDetail('evt-001')}
    />
  ),
  document.getElementById('root')!,
)

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid audit / activity / event-log row.

Exports <AuditLogRow> and the AuditLogEntry type — the Solid counterpart of @molecule/app-audit-log-row-react: the same props (React names) and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { render } from 'solid-js/web'
import { AuditLogRow } from '@molecule/app-audit-log-row-solid'

render(
  () => (
    <AuditLogRow
      entry={{
        id: 'evt-001',
        actor: 'alice@example.com',
        action: 'updated',
        target: 'Invoice #1042',
        timestamp: '2 min ago',
        oldValue: 'Draft',
        newValue: 'Sent',
      }}
      onClick={() => openDetail('evt-001')}
    />
  ),
  document.getElementById('root')!,
)

Type

feature

Installation

npm install @molecule/app-audit-log-row-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

AuditLogEntry

Shape of a single audit / activity log entry displayed by AuditLogRow.

interface AuditLogEntry {
  id: string
  /** Actor name or id (React's `ReactNode`: any Solid JSX element). */
  actor: JSX.Element
  /** Verb describing what happened ("updated", "deleted", "assigned"). */
  action: JSX.Element
  /** Target object / record. */
  target?: JSX.Element
  /** Pre-formatted display timestamp (rendered verbatim — format before passing, e.g. "2 min ago"). */
  timestamp: JSX.Element
  /** Optional summary field for delta display — old + new values. */
  oldValue?: JSX.Element
  newValue?: JSX.Element
  /** Environment / source badge. */
  environment?: JSX.Element
  /** Optional trace or correlation id. */
  traceId?: JSX.Element
}

AuditLogRowProps

Props accepted by the AuditLogRow component.

interface AuditLogRowProps {
  /** The entry to display. */
  entry: AuditLogEntry
  /** Called when the row is clicked. */
  onClick?: () => void
  /** Extra classes. */
  className?: string
}

Functions

AuditLogRow(props)

One audit / activity / event-log row. Shape: [actor] [action] [target] · [timestamp] with an optional [old → new] diff line and environment/trace metadata. With onClick the row is promoted to a real button in the a11y tree (role="button", tabindex="0") and Enter / Space activate it, matching native button keyboard semantics.

function AuditLogRow(props: AuditLogRowProps): JSX.Element
  • props — Component props (see AuditLogRowProps).

Returns: The rendered audit log row.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.5.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • Requires a bonded ClassMap — rendering throws otherwise.

  • entry fields are display nodes: pass pre-formatted, translated values. Solid JSX works anywhere a string does.

  • With onClick the row carries role="button" + tabindex="0" and Enter / Space activate it, like a native button; without it the row is static.