Audit History Panel
createAuditHistoryPanelDock
Section titled “createAuditHistoryPanelDock”export function createAuditHistoryPanelDock( panel: HTMLElement, grid: HTMLRevoGridElement, placement: AuditHistoryPanelPlacement,);defineAuditHistoryPanel
Section titled “defineAuditHistoryPanel”Renders the Audit History panel into el for the given RevoGrid element.
The grid must have AuditHistoryPlugin installed.
export function defineAuditHistoryPanel(el: HTMLElement, grid: HTMLRevoGridElement, options: AuditHistoryPanelOptions =;AuditHistoryPanelDateFormatContext
Section titled “AuditHistoryPanelDateFormatContext”export type AuditHistoryPanelDateFormatContext = { mode: 'time' | 'day' | 'filter'; record?: AuditRecord;};AuditHistoryPanelEvents
Section titled “AuditHistoryPanelEvents”export type AuditHistoryPanelEvents = { beforeRecordSelect?: (context: AuditHistoryPanelRecordContext) => boolean | void; beforeCompareOpen?: (context: AuditHistoryPanelRecordContext) => boolean | void; beforeJumpToCell?: (context: AuditHistoryPanelJumpContext) => boolean | void; beforeRestore?: (context: AuditHistoryPanelRestoreContext) => boolean | void; beforeExport?: (context: AuditHistoryPanelExportContext) => boolean | void;};AuditHistoryPanelExportContext
Section titled “AuditHistoryPanelExportContext”export type AuditHistoryPanelExportContext = { format: AuditHistoryExportFormat;};AuditHistoryPanelJumpContext
Section titled “AuditHistoryPanelJumpContext”export type AuditHistoryPanelJumpContext = { record: AuditRecord; change: AuditChange;};AuditHistoryPanelLabels
Section titled “AuditHistoryPanelLabels”export type AuditHistoryPanelLabels = { title: string; liveStatus: string; recordsSummary: (count: number) => string; changesSummary: (count: number) => string; allTab: string; rowTab: string; cellTab: string; tableTab: string; selectedCell: (rowId: string, column: ColumnProp) => string; selectedRow: (rowId: string) => string; export: string; exportCsv: string; exportJson: string; exportCsvTitle: string; exportJsonTitle: string; close: string; openPanel: string; searchPlaceholder: string; searchAriaLabel: string; searchShortcut: string; userPlaceholder: string; userAriaLabel: string; columnAriaLabel: string; actionAriaLabel: string; dateFromAriaLabel: string; dateToAriaLabel: string; allColumns: string; allActions: string; clearFilters: string; addFilter: string; removeFilter: (label: string) => string; noRecords: string; noComparableRecord: string; scopedRecordCount: (visibleChanges: number, totalChanges: number) => string; changedBy: (changedAt: string, user: string) => string; rowTarget: (rowId: string | undefined, column: ColumnProp | undefined) => string; cellValues: (oldValue: string, newValue: string) => string; rowSnapshotAvailable: string; rowRemoved: string; restoreCell: string; restoreRow: string; restoreTransaction: string; restoreSnapshot: string; jumpToCell: string; revertAll: string; moreActions: string; compare: string; compareTitle: string; compareBefore: string; compareAfter: string; closeCompare: string; compareEmpty: string; viewChanges: (count: number) => string; previousPage: string; nextPage: string; pageStatus: (currentPage: number, pageCount: number) => string; dayToday: string; dayYesterday: string; sourceLabels: Record<AuditHistorySource, string>; actions: Partial<Record<AuditActionType, string>>; actionVerbs: Partial<Record<AuditActionType, string>>;};AuditHistoryPanelLabelsOptions (Extended from index.tsx)
Section titled “AuditHistoryPanelLabelsOptions (Extended from index.tsx)”export type AuditHistoryPanelLabelsOptions = Partial<Omit<AuditHistoryPanelLabels, 'actions' | 'actionVerbs' | 'sourceLabels'>> & { actions?: Partial<Record<AuditActionType, string>>; actionVerbs?: Partial<Record<AuditActionType, string>>; sourceLabels?: Partial<Record<AuditHistorySource, string>>;};AuditHistoryPanelHandle
Section titled “AuditHistoryPanelHandle”export type AuditHistoryPanelHandle = { destroy: () => void; setPlacement: (placement: AuditHistoryPanelPlacement) => void; refresh: () => Promise<void>;};AuditHistoryPanelOptions
Section titled “AuditHistoryPanelOptions”export type AuditHistoryPanelOptions = { pageSize?: number; allowExport?: boolean; allowCompare?: boolean | ((context: AuditHistoryPanelRecordContext) => boolean); allowClose?: boolean; miniOnClose?: boolean; restoreActions?: false | AuditRestoreType[] | ((context: AuditHistoryPanelRestoreContext) => boolean); formatDate?: (value: string, context: AuditHistoryPanelDateFormatContext) => string; events?: AuditHistoryPanelEvents; placement?: AuditHistoryPanelPlacement; tooltips?: false | Partial<Record<AuditHistoryPanelTooltipKey, string | false>>; labels?: AuditHistoryPanelLabelsOptions;};AuditHistoryPanelRecordContext
Section titled “AuditHistoryPanelRecordContext”export type AuditHistoryPanelRecordContext = { record: AuditRecord; changes: AuditChange[];};AuditHistoryPanelRestoreContext
Section titled “AuditHistoryPanelRestoreContext”export type AuditHistoryPanelRestoreContext = { type: AuditRestoreType; record?: AuditRecord; change?: AuditChange; transactionId?: string;};AuditHistoryPanelPlacement
Section titled “AuditHistoryPanelPlacement”export type AuditHistoryPanelPlacement = 'right' | 'left' | 'top' | 'bottom' | 'none';AuditHistoryPanelTooltipKey
Section titled “AuditHistoryPanelTooltipKey”export type AuditHistoryPanelTooltipKey = | 'totalRecords' | 'totalChanges' | 'selectedScope' | 'searchFilter' | 'userFilter' | 'columnFilter' | 'actionFilter' | 'dateFromFilter' | 'dateToFilter' | 'clearFilters';resolveLabels
Section titled “resolveLabels”export function resolveLabels(labels?: AuditHistoryPanelLabelsOptions): AuditHistoryPanelLabels;getAuditActionLabel
Section titled “getAuditActionLabel”export function getAuditActionLabel(labels: AuditHistoryPanelLabels, actionType: AuditActionType): string;getAuditActionVerb
Section titled “getAuditActionVerb”export function getAuditActionVerb(labels: AuditHistoryPanelLabels, actionType: AuditActionType): string;actionTypes
Section titled “actionTypes”actionTypes: AuditActionType[];titleizeActionType
Section titled “titleizeActionType”titleizeActionType: (value: string) => string;createInitialFilters
Section titled “createInitialFilters”export function createInitialFilters(): AuditPanelFilters;stringifyValue
Section titled “stringifyValue”export function stringifyValue(value: unknown): string;formatTime
Section titled “formatTime”export function formatTime(value: string, mode: 'compact' | 'day' = 'compact');formatPanelDate
Section titled “formatPanelDate”export function formatPanelDate( value: string, options: AuditHistoryPanelOptions, context:;getUserLabel
Section titled “getUserLabel”export function getUserLabel(record: AuditRecord);getAvatarLabel
Section titled “getAvatarLabel”export function getAvatarLabel(record: AuditRecord);matchesFilters
Section titled “matchesFilters”export function matchesFilters(record: AuditRecord, filters: AuditPanelFilters);getScopedChanges
Section titled “getScopedChanges”export function getScopedChanges(record: AuditRecord, tab: AuditPanelTab, selected: SelectedAuditTarget): AuditChange[];getRecordSource
Section titled “getRecordSource”export function getRecordSource(type: AuditActionType, record?: AuditRecord): AuditHistorySource;getTargetLabel
Section titled “getTargetLabel”export function getTargetLabel(record: AuditRecord, changes: AuditChange[], labels: AuditHistoryPanelLabels);getDetailLabel
Section titled “getDetailLabel”export function getDetailLabel(record: AuditRecord, changes: AuditChange[]);isComparable
Section titled “isComparable”export function isComparable(record: AuditRecord, changes: AuditChange[]);toTimelineRecord
Section titled “toTimelineRecord”export function toTimelineRecord( record: AuditRecord, changes: AuditChange[], labels: AuditHistoryPanelLabels, options: AuditHistoryPanelOptions =;groupTimelineRecords
Section titled “groupTimelineRecords”export function groupTimelineRecords(records: TimelineRecord[]): TimelineGroup[];getPlugin
Section titled “getPlugin”export async function getPlugin(grid: HTMLRevoGridElement): Promise<AuditHistoryPluginRuntime | undefined>;panelRefreshEvents
Section titled “panelRefreshEvents”panelRefreshEvents: readonly ["auditrecord", "auditrecordsloaded", "auditrestore"];canSelectRecord
Section titled “canSelectRecord”export function canSelectRecord(options: AuditHistoryPanelOptions, context: AuditHistoryPanelRecordContext);canOpenCompare
Section titled “canOpenCompare”export function canOpenCompare(options: AuditHistoryPanelOptions, context: AuditHistoryPanelRecordContext);canJumpToCell
Section titled “canJumpToCell”export function canJumpToCell(options: AuditHistoryPanelOptions, context: AuditHistoryPanelJumpContext);canUseRestoreAction
Section titled “canUseRestoreAction”export function canUseRestoreAction(options: AuditHistoryPanelOptions, context: AuditHistoryPanelRestoreContext);canExportAuditHistory
Section titled “canExportAuditHistory”export function canExportAuditHistory(options: AuditHistoryPanelOptions, format: AuditHistoryExportFormat);AuditHistoryTooltip
Section titled “AuditHistoryTooltip”export function AuditHistoryTooltip(;AuditPanelTab
Section titled “AuditPanelTab”export type AuditPanelTab = 'cell' | 'row' | 'table';SelectedAuditTarget
Section titled “SelectedAuditTarget”export type SelectedAuditTarget = { rowId?: string; column?: ColumnProp; columnLabel?: ColumnProp; rowIndex?: number; rowType?: DimensionRows;};AuditPanelFilters
Section titled “AuditPanelFilters”export type AuditPanelFilters = { search: string; user: string; column: string; actionType: '' | AuditActionType; dateFrom: string; dateTo: string;};AuditHistoryPluginRuntime
Section titled “AuditHistoryPluginRuntime”export type AuditHistoryPluginRuntime = { getRecords: () => AuditRecord[]; getCellHistory: (rowId: string, column: ColumnProp) => AuditRecord[]; getRowHistory: (rowId: string) => AuditRecord[]; getStats: () => AuditHistoryStats; exportRecords: (options?: AuditHistoryExportOptions) => string; getRowIdentity: (row: DataType | undefined, rowIndex: number, rowType: DimensionRows) => string | undefined; canRestoreRecord: (context: { type: AuditRestoreType; record?: AuditRecord; change?: AuditChange; transactionId?: string }) => boolean; restoreCell: (change: AuditChange) => boolean; restoreRow: (record: AuditRecord) => boolean; restoreTransaction: (transactionId: string) => boolean; restoreSnapshot?: (recordOrId: AuditRecord | string) => boolean; recordEvent?: (input: AuditRecordEventInput) => AuditRecord | undefined; createSnapshot?: (label: string, options?: AuditSnapshotOptions) => AuditRecord | undefined;};VisibleAuditRecord
Section titled “VisibleAuditRecord”export type VisibleAuditRecord = { record: AuditRecord; changes: AuditChange[];};TimelineRecord (Extended from types.ts)
Section titled “TimelineRecord (Extended from types.ts)”export type TimelineRecord = VisibleAuditRecord & { id: string; source: AuditHistorySource; verb: string; userLabel: string; avatarLabel: string; avatarIndex?: number; avatarColor?: string; targetLabel: string; detailLabel?: string; rangeLabel?: string; changedAtLabel: string; dayKey: string; dayLabel: string; daySubLabel?: string; accent: boolean; comparable: boolean;};TimelineGroup
Section titled “TimelineGroup”export type TimelineGroup = { key: string; label: string; subLabel?: string; records: TimelineRecord[];};AuditHistoryPanel
Section titled “AuditHistoryPanel”export function AuditHistoryPanel(;CompareDrawer
Section titled “CompareDrawer”export function CompareDrawer(;Filters
Section titled “Filters”export function Filters(;MiniAuditHistoryPanel
Section titled “MiniAuditHistoryPanel”export function MiniAuditHistoryPanel(;Pagination
Section titled “Pagination”export function Pagination(;RecordsList
Section titled “RecordsList”export function RecordsList(;Toolbar
Section titled “Toolbar”export function Toolbar(;