@lumerahq/ui 0.12.0-dev.0 → 0.12.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,49 @@
1
+ import { ReactNode } from 'react';
2
+ import { AuditLogEntry as AuditLogEntryData, AuditLogFilterState as AuditLogFilterStateData } from '../../lib/audit-log';
3
+ export type AuditLogDensity = 'compact' | 'comfortable';
4
+ export type AuditLogFilterState = AuditLogFilterStateData;
5
+ export type AuditLogRecord = AuditLogEntryData;
1
6
  export type AuditLogProps = {
2
7
  /** Collections whose combined record history should be shown (maximum 20). */
3
8
  collections: readonly string[];
9
+ /** Friendly display names keyed by collection API name. */
10
+ collectionLabels?: Readonly<Record<string, string>>;
11
+ /** Controlled filter state. */
12
+ filters?: AuditLogFilterState;
13
+ /** Initial filters when the component manages its own state. */
14
+ defaultFilters?: Partial<AuditLogFilterState>;
15
+ /** Called after any user filter change, in controlled and uncontrolled modes. */
16
+ onFiltersChange?: (filters: AuditLogFilterState) => void;
4
17
  /** Rows fetched per page. Defaults to 50; the API maximum is 200. */
5
18
  pageSize?: number;
19
+ /** Maximum rows in one CSV export. Defaults to 10,000 and cannot exceed it. */
20
+ exportMaxRows?: number;
21
+ /** Download name for CSV exports. Defaults to a date-stamped name. */
22
+ exportFilename?: string;
6
23
  /** Header text. Defaults to "Activity". */
7
24
  title?: string;
25
+ /** Row spacing. Defaults to "compact". */
26
+ density?: AuditLogDensity;
27
+ /** Show the collection column. Defaults to true. */
28
+ showCollectionColumn?: boolean;
29
+ /** Show the actor column. Defaults to true. */
30
+ showActorColumn?: boolean;
31
+ /** Include record system fields in before/after values. Defaults to true. */
32
+ showSystemFields?: boolean;
33
+ /** Friendly labels keyed by a field's API key or current label. */
34
+ fieldLabels?: Readonly<Record<string, string>>;
35
+ /** Return an app-specific destination for an audit entry's record. */
36
+ getRecordHref?: (entry: AuditLogEntryData) => string | undefined;
37
+ /** Called when the app-specific record action is selected. */
38
+ onRecordClick?: (entry: AuditLogEntryData) => void;
39
+ /** Optional replacement for the built-in loading state. */
40
+ loadingState?: ReactNode;
41
+ /** Optional replacement for the built-in empty state. */
42
+ emptyState?: ReactNode;
43
+ /** Optional replacement for an API error state. */
44
+ errorState?: (error: Error) => ReactNode;
8
45
  /** Optional classes for the outer container. */
9
46
  className?: string;
10
47
  };
11
- export declare function AuditLog({ collections, pageSize, title, className }: AuditLogProps): import("react/jsx-runtime").JSX.Element;
48
+ export declare function AuditLog({ collections, collectionLabels, filters: controlledFilters, defaultFilters, onFiltersChange, pageSize, exportMaxRows, exportFilename, title, density, showCollectionColumn, showActorColumn, showSystemFields, fieldLabels, getRecordHref, onRecordClick, loadingState, emptyState, errorState, className, }: AuditLogProps): import("react/jsx-runtime").JSX.Element;
12
49
  //# sourceMappingURL=AuditLog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuditLog.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/AuditLog.tsx"],"names":[],"mappings":"AA8BA,MAAM,MAAM,aAAa,GAAG;IAC1B,8EAA8E;IAC9E,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA+BF,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAa,EAAE,KAAkB,EAAE,SAAS,EAAE,EAAE,aAAa,2CAmUpG"}
1
+ {"version":3,"file":"AuditLog.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/AuditLog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA4B,MAAM,OAAO,CAAC;AAmBjE,OAAO,EAGL,KAAK,aAAa,IAAI,iBAAiB,EAEvC,KAAK,mBAAmB,IAAI,uBAAuB,EAOpD,MAAM,iBAA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AAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,2DAA2D;IAC3D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC;IACzC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA4FF,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,gBAAgB,EAChB,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EACd,eAAe,EACf,QAAa,EACb,aAAa,EACb,cAAc,EACd,KAAkB,EAClB,OAAmB,EACnB,oBAA2B,EAC3B,eAAsB,EACtB,gBAAuB,EACvB,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,GACV,EAAE,aAAa,2CAwef"}
@@ -1,5 +1,18 @@
1
+ import { AuditLogDensity } from './AuditLog';
1
2
  import { AuditLogEntry as AuditLogEntryData } from '../../lib/audit-log';
2
- export declare function AuditLogEntry({ entry }: {
3
+ type AuditLogEntryProps = {
3
4
  entry: AuditLogEntryData;
4
- }): import("react/jsx-runtime").JSX.Element;
5
+ collectionLabel: string;
6
+ activityCollectionLabel?: string;
7
+ density: AuditLogDensity;
8
+ showCollectionColumn: boolean;
9
+ showActorColumn: boolean;
10
+ showSystemFields: boolean;
11
+ fieldLabels?: Readonly<Record<string, string>>;
12
+ columnCount: number;
13
+ getRecordHref?: (entry: AuditLogEntryData) => string | undefined;
14
+ onRecordClick?: (entry: AuditLogEntryData) => void;
15
+ };
16
+ export declare function AuditLogEntry({ entry, collectionLabel, activityCollectionLabel, density, showCollectionColumn, showActorColumn, showSystemFields, fieldLabels, columnCount, getRecordHref, onRecordClick, }: AuditLogEntryProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
5
18
  //# sourceMappingURL=AuditLogEntry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuditLogEntry.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/AuditLogEntry.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,aAAa,IAAI,iBAAiB,EAKxC,MAAM,iBAAiB,CAAC;AAyEzB,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,iBAAiB,CAAA;CAAE,2CAiFpE"}
1
+ {"version":3,"file":"AuditLogEntry.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/AuditLogEntry.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EACL,KAAK,aAAa,IAAI,iBAAiB,EAMxC,MAAM,iBAAiB,CAAC;AA+IzB,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,eAAe,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,eAAe,EACf,uBAAuB,EACvB,OAAO,EACP,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,GACd,EAAE,kBAAkB,2CA4HpB"}
@@ -1,2 +1,2 @@
1
- export { AuditLog, type AuditLogProps } from './AuditLog';
1
+ export { AuditLog, type AuditLogDensity, type AuditLogFilterState, type AuditLogProps, type AuditLogRecord, } from './AuditLog';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC"}
@@ -2,7 +2,7 @@ export type { ColumnType, FormatOptions } from '../lib/formatters';
2
2
  export type { AgentChatAbortRequest, AgentChatAction, AgentChatActionBlock, AgentChatActiveStatus, AgentChatAgentProfile, AgentChatAgentRequest, AgentChatBlockRendererProps, AgentChatCollectionMap, AgentChatComposerActions, AgentChatComposerRendererProps, AgentChatComposerState, AgentChatContentBlock, AgentChatCustomBlock, AgentChatFeatureFlags, AgentChatFile, AgentChatFileBlock, AgentChatHistoryPage, AgentChatHistoryRequest, AgentChatHistoryResult, AgentChatID, AgentChatInfoBlock, AgentChatLabels, AgentChatLoadEarlierRequest, AgentChatMessage, AgentChatMessageRendererProps, AgentChatMessageRole, AgentChatMetadata, AgentChatOperationStatus, AgentChatPendingFile, AgentChatPhase, AgentChatProps, AgentChatRenameSessionRequest, AgentChatRenderers, AgentChatResizableWidthOptions, AgentChatSession, AgentChatSessionListRequest, AgentChatSessionListResult, AgentChatStreamEvent, AgentChatStreamHandlers, AgentChatSubmitInput, AgentChatSubmitResult, AgentChatSubscription, AgentChatTerminalStatus, AgentChatTextBlock, AgentChatThinkingBlock, AgentChatTokenUsage, AgentChatToolCall, AgentChatToolCallBlock, AgentChatToolCallLike, AgentChatToolRenderer, AgentChatTransport, AgentChatTurn, AgentChatTurnStatus, LumeraAgentChatTransportOptions, } from './agent-chat';
3
3
  export { AgentChat, ArtifactCard, createLumeraAgentChatTransport, defaultToolRenderers, findRenderer, getCollectionMap, humanizeCollectionName, isExploratoryToolCallError, ToolCallCard, type ToolCallCardProps, ToolRenderersProvider, warmCollectionCache, } from './agent-chat';
4
4
  export { AssistantChat, type AssistantChatProps, AssistantPage, type AssistantPageProps, AssistantWidget, type AssistantWidgetProps, type ComposerChip as AssistantComposerChip, isMutatingToolCall, useDataSyncTransport, withDataSync, } from './assistant';
5
- export { AuditLog, type AuditLogProps } from './audit-log';
5
+ export { AuditLog, type AuditLogDensity, type AuditLogFilterState, type AuditLogProps, type AuditLogRecord, } from './audit-log';
6
6
  export { AutomationRunList } from './automation/AutomationRunList';
7
7
  export { AutomationRunner } from './automation/AutomationRunner';
8
8
  export { type ColumnDef, DataTable, DataTableFilters, type DataTableFiltersProps, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type FilterColumn, RecordSheet, type RecordSheetProps, } from './data-table';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,oBAAoB,EACpB,iBAAiB,EACjB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AqB,EAC1C,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EACL,KAAK,SAAS,EACd,SAAS,EACT,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
@@ -1,4 +1,4 @@
1
- import { A, a, e, j, k, n, o, p, D, q, r, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-DJoKhb3u.js";
1
+ import { A, a, e, j, k, n, o, p, D, q, r, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-B0IaPMZs.js";
2
2
  export {
3
3
  A as AgentChat,
4
4
  a as ArtifactCard,
@@ -1,4 +1,4 @@
1
- import { t as R$1, L as Li, v as At } from "./RecordSheet-DJoKhb3u.js";
1
+ import { t as R$1, L as Li, v as At } from "./RecordSheet-B0IaPMZs.js";
2
2
  import { useContext, useState, useEffect } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var R = ({ code: s, language: e, raw: t, className: h, startLine: d, lineNumbers: m, ...p }) => {
@@ -1,4 +1,4 @@
1
- import { u, a, b, c } from "../use-automation-run-BrghacFY.js";
1
+ import { u, a, b, c } from "../use-automation-run-DmMpzFCS.js";
2
2
  import { u as u2, a as a2, b as b2, c as c2, d, e } from "../use-sql-table-DWHMqSIq.js";
3
3
  export {
4
4
  u as useAgentChat,
@@ -1,10 +1,11 @@
1
- import { AuditLogEntry, AuditLogFilters } from '../lib/audit-log';
1
+ import { AuditLogCollectionStatus, AuditLogEntry, AuditLogFilters } from '../lib/audit-log';
2
2
  export type UseAuditLogOptions = {
3
3
  pageSize?: number;
4
4
  enabled?: boolean;
5
5
  };
6
6
  export type UseAuditLogResult = {
7
7
  entries: AuditLogEntry[];
8
+ collectionStatus: AuditLogCollectionStatus[];
8
9
  error: Error | null;
9
10
  isLoading: boolean;
10
11
  isFetching: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-audit-log.d.ts","sourceRoot":"","sources":["../../src/hooks/use-audit-log.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EAKrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,WAAW,CACzB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,GAAE,eAAoB,EAC7B,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CA8CnB"}
1
+ {"version":3,"file":"use-audit-log.d.ts","sourceRoot":"","sources":["../../src/hooks/use-audit-log.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,eAAe,EAKrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,WAAW,CACzB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,GAAE,eAAoB,EAC7B,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CA+CnB"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { A, a, e, j, k, n, o, p, D, q, r, R, T, b, c, d, f, g, h, i, l, u, w, m } from "./RecordSheet-DJoKhb3u.js";
2
- import { u as u2, a as a2, b as b2, c as c2 } from "./use-automation-run-BrghacFY.js";
1
+ import { A, a, e, j, k, n, o, p, D, q, r, R, T, b, c, d, f, g, h, i, l, u, w, m } from "./RecordSheet-B0IaPMZs.js";
2
+ import { u as u2, a as a2, b as b2, c as c2 } from "./use-automation-run-DmMpzFCS.js";
3
3
  import { u as u3, a as a3, b as b3, c as c3, d as d2, e as e2 } from "./use-sql-table-DWHMqSIq.js";
4
4
  import { B, E, z, b as b4, A as A2, C, D as D2, c as c4, F, G, H, I, g as g2, J, K, L, f as f2, M, O, N, a as a4, h as h2, P, i as i2, Q, R as R2, S, T as T2, U, o as o2, p as p2, d as d3, j as j2, k as k2, l as l2, m as m2, n as n2, q as q2, r as r2, t, u as u4, v, w as w2, V, W, e as e3, x, s, y } from "./automations-EgDXJ43_.js";
5
5
  import { o as o3, f as f3, a as a5, b as b5, c as c5, d as d4, e as e4, g as g3, h as h3, i as i3, j as j3, k as k3, l as l3, m as m3, n as n3, s as s2 } from "./formatters-D4T821Dv.js";
@@ -43,8 +43,13 @@ export type AuditLogPagination = {
43
43
  has_more: boolean;
44
44
  next_cursor?: string;
45
45
  };
46
+ export type AuditLogCollectionStatus = {
47
+ name: string;
48
+ audit_enabled: boolean;
49
+ };
46
50
  export type AuditLogListResponse = {
47
51
  audit_logs: AuditLogEntry[];
52
+ record_collections?: AuditLogCollectionStatus[];
48
53
  pagination: AuditLogPagination;
49
54
  };
50
55
  export type AuditLogSnapshotResponse = {
@@ -57,6 +62,9 @@ export type AuditLogFilters = {
57
62
  since?: string;
58
63
  until?: string;
59
64
  };
65
+ export type AuditLogFilterState = AuditLogFilters & {
66
+ collections: string[];
67
+ };
60
68
  export type ListRecordAuditLogParams = AuditLogFilters & {
61
69
  collections: readonly string[];
62
70
  cursor?: string;
@@ -67,11 +75,18 @@ export type RecordAuditLogCsvResult = {
67
75
  count: number;
68
76
  truncated: boolean;
69
77
  };
78
+ export type AuditLogCsvOptions = {
79
+ collectionLabels?: Readonly<Record<string, string>>;
80
+ };
70
81
  export declare const normalizeAuditLogPageSize: (value?: number) => number;
82
+ export declare const normalizeAuditLogExportLimit: (value?: number) => number;
71
83
  export declare const auditLogActorLabel: (actor: AuditLogActor) => string;
72
84
  export declare function normalizeRecordAuditCollections(collections: readonly string[]): string[];
85
+ /** Keep filter state valid when the component's available collections change. */
86
+ export declare function normalizeAuditLogFilterState(collections: readonly string[], filters?: Partial<AuditLogFilterState>): AuditLogFilterState;
73
87
  /** Build a request scoped to one or more user-defined collections. */
74
88
  export declare function buildRecordAuditLogPath(params: ListRecordAuditLogParams): string;
75
89
  export declare const auditLogDetailValue: (entry: AuditLogEntry, label: string) => string;
76
- export declare function buildAuditLogCsv(entries: AuditLogEntry[]): string;
90
+ export declare function auditLogSummaryWithCollectionLabel(entry: AuditLogEntry, collectionLabel: string): AuditLogSummarySegment[];
91
+ export declare function buildAuditLogCsv(entries: AuditLogEntry[], options?: AuditLogCsvOptions): string;
77
92
  //# sourceMappingURL=audit-log-core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-log-core.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log-core.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAC7C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,aAAa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EACpB,eAAe,EAAE,MAAM,GACtB,sBAAsB,EAAE,CAe1B;AAaD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAkBnG"}
@@ -1,7 +1,7 @@
1
- import { AuditLogListResponse, AuditLogSnapshotResponse, AuditLogStore, ListRecordAuditLogParams, RecordAuditLogCsvResult } from './audit-log-core';
2
- export { AUDIT_LOG_EXPORT_LIMIT, AUDIT_LOG_MAX_COLLECTIONS, type AuditLogActor, type AuditLogEntry, type AuditLogEvent, type AuditLogField, type AuditLogFilters, type AuditLogListResponse, auditLogActorLabel, auditLogDetailValue, normalizeAuditLogPageSize, normalizeRecordAuditCollections, } from './audit-log-core';
1
+ import { AuditLogCsvOptions, AuditLogListResponse, AuditLogSnapshotResponse, AuditLogStore, ListRecordAuditLogParams, RecordAuditLogCsvResult } from './audit-log-core';
2
+ export { AUDIT_LOG_EXPORT_LIMIT, AUDIT_LOG_MAX_COLLECTIONS, type AuditLogActor, type AuditLogCollectionStatus, type AuditLogCsvOptions, type AuditLogEntry, type AuditLogEvent, type AuditLogField, type AuditLogFilterState, type AuditLogFilters, type AuditLogListResponse, auditLogActorLabel, auditLogDetailValue, auditLogSummaryWithCollectionLabel, normalizeAuditLogExportLimit, normalizeAuditLogFilterState, normalizeAuditLogPageSize, normalizeRecordAuditCollections, } from './audit-log-core';
3
3
  export declare function listRecordAuditLog(params: ListRecordAuditLogParams): Promise<AuditLogListResponse>;
4
4
  export declare function getRecordAuditLogSnapshot(id: string, store: AuditLogStore): Promise<AuditLogSnapshotResponse>;
5
5
  /** Fetch the current filtered feed page-by-page, capped defensively at 10,000 rows. */
6
- export declare function fetchRecordAuditLogCsv(params: Omit<ListRecordAuditLogParams, 'cursor' | 'limit'>, maxRows?: number): Promise<RecordAuditLogCsvResult>;
6
+ export declare function fetchRecordAuditLogCsv(params: Omit<ListRecordAuditLogParams, 'cursor' | 'limit'>, maxRows?: number, options?: AuditLogCsvOptions): Promise<RecordAuditLogCsvResult>;
7
7
  //# sourceMappingURL=audit-log.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAGlB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAE1B,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAExG;AAED,wBAAsB,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,wBAAwB,CAAC,CASnH;AAED,uFAAuF;AACvF,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,OAAO,CAAC,EAC1D,OAAO,SAAyB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CA2BlC"}
1
+ {"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../src/lib/audit-log.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAGlB,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,kCAAkC,EAClC,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,kBAAkB,CAAC;AAE1B,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAExG;AAED,wBAAsB,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,wBAAwB,CAAC,CASnH;AAED,uFAAuF;AACvF,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,OAAO,CAAC,EAC1D,OAAO,SAAyB,EAChC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,uBAAuB,CAAC,CA2BlC"}
@@ -0,0 +1,4 @@
1
+ import { s } from "./RecordSheet-B0IaPMZs.js";
2
+ export {
3
+ s as Mermaid
4
+ };
package/dist/ui.css CHANGED
@@ -105,6 +105,7 @@
105
105
  --color-amber-500: oklch(76.9% .188 70.08);
106
106
  --color-amber-600: oklch(66.6% .179 58.318);
107
107
  --color-amber-800: oklch(47.3% .137 46.201);
108
+ --color-amber-950: oklch(27.9% .077 45.635);
108
109
  --color-green-600: oklch(62.7% .194 149.214);
109
110
  --color-emerald-50: oklch(97.9% .021 166.113);
110
111
  --color-emerald-200: oklch(90.5% .093 164.15);
@@ -1086,6 +1087,10 @@
1086
1087
  width: calc(var(--spacing) * 32);
1087
1088
  }
1088
1089
 
1090
+ .w-36 {
1091
+ width: calc(var(--spacing) * 36);
1092
+ }
1093
+
1089
1094
  .w-48 {
1090
1095
  width: calc(var(--spacing) * 48);
1091
1096
  }
@@ -1106,10 +1111,6 @@
1106
1111
  width: 8.5rem;
1107
1112
  }
1108
1113
 
1109
- .w-\[10\.5rem\] {
1110
- width: 10.5rem;
1111
- }
1112
-
1113
1114
  .w-\[11rem\] {
1114
1115
  width: 11rem;
1115
1116
  }
@@ -1851,7 +1852,17 @@
1851
1852
  }
1852
1853
  }
1853
1854
 
1854
- .bg-muted, .bg-muted\/20 {
1855
+ .bg-muted, .bg-muted\/10 {
1856
+ background-color: var(--muted);
1857
+ }
1858
+
1859
+ @supports (color: color-mix(in lab, red, red)) {
1860
+ .bg-muted\/10 {
1861
+ background-color: color-mix(in oklab, var(--muted) 10%, transparent);
1862
+ }
1863
+ }
1864
+
1865
+ .bg-muted\/20 {
1855
1866
  background-color: var(--muted);
1856
1867
  }
1857
1868
 
@@ -2016,6 +2027,10 @@
2016
2027
  padding: calc(var(--spacing) * 4);
2017
2028
  }
2018
2029
 
2030
+ .p-5 {
2031
+ padding: calc(var(--spacing) * 5);
2032
+ }
2033
+
2019
2034
  .p-6 {
2020
2035
  padding: calc(var(--spacing) * 6);
2021
2036
  }
@@ -2292,6 +2307,10 @@
2292
2307
  color: var(--color-amber-800);
2293
2308
  }
2294
2309
 
2310
+ .text-amber-950 {
2311
+ color: var(--color-amber-950);
2312
+ }
2313
+
2295
2314
  .text-background {
2296
2315
  color: var(--background);
2297
2316
  }
@@ -3196,6 +3215,16 @@
3196
3215
  }
3197
3216
  }
3198
3217
 
3218
+ .focus-visible\:ring-ring\/40:focus-visible {
3219
+ --tw-ring-color: var(--ring);
3220
+ }
3221
+
3222
+ @supports (color: color-mix(in lab, red, red)) {
3223
+ .focus-visible\:ring-ring\/40:focus-visible {
3224
+ --tw-ring-color: color-mix(in oklab, var(--ring) 40%, transparent);
3225
+ }
3226
+ }
3227
+
3199
3228
  .focus-visible\:ring-ring\/50:focus-visible {
3200
3229
  --tw-ring-color: var(--ring);
3201
3230
  }
@@ -3206,6 +3235,11 @@
3206
3235
  }
3207
3236
  }
3208
3237
 
3238
+ .focus-visible\:outline-none:focus-visible {
3239
+ --tw-outline-style: none;
3240
+ outline-style: none;
3241
+ }
3242
+
3209
3243
  .active\:scale-95:active {
3210
3244
  --tw-scale-x: 95%;
3211
3245
  --tw-scale-y: 95%;
@@ -957,6 +957,7 @@ function replaceSession(sessions, next) {
957
957
  const AUDIT_LOG_EXPORT_LIMIT = 1e4;
958
958
  const AUDIT_LOG_MAX_COLLECTIONS = 20;
959
959
  const normalizeAuditLogPageSize = (value = 50) => Math.min(200, Math.max(1, Math.trunc(value) || 50));
960
+ const normalizeAuditLogExportLimit = (value = AUDIT_LOG_EXPORT_LIMIT) => Math.min(AUDIT_LOG_EXPORT_LIMIT, Math.max(1, Math.trunc(value) || AUDIT_LOG_EXPORT_LIMIT));
960
961
  const auditLogActorLabel = (actor) => actor.name?.trim() || actor.email?.trim() || actor.type_label;
961
962
  function normalizeRecordAuditCollections(collections) {
962
963
  const normalized = [];
@@ -969,6 +970,20 @@ function normalizeRecordAuditCollections(collections) {
969
970
  }
970
971
  return normalized;
971
972
  }
973
+ function normalizeAuditLogFilterState(collections, filters = {}) {
974
+ const available = normalizeRecordAuditCollections(collections);
975
+ const allowed = new Set(available);
976
+ const selected = normalizeRecordAuditCollections(filters.collections ?? available).filter(
977
+ (name) => allowed.has(name)
978
+ );
979
+ return {
980
+ collections: selected.length > 0 ? selected : available,
981
+ event: filters.event,
982
+ actor: filters.actor?.trim() || void 0,
983
+ since: filters.since?.trim() || void 0,
984
+ until: filters.until?.trim() || void 0
985
+ };
986
+ }
972
987
  function buildRecordAuditLogPath(params) {
973
988
  const collections = normalizeRecordAuditCollections(params.collections);
974
989
  if (collections.length === 0) {
@@ -989,11 +1004,30 @@ function buildRecordAuditLogPath(params) {
989
1004
  if (params.until?.trim()) query.set("until", params.until.trim());
990
1005
  return `/audit-log?${query.toString()}`;
991
1006
  }
992
- const summaryText = (entry) => entry.summary.map((segment) => segment.text).join(" ");
993
1007
  const auditLogDetailValue = (entry, label) => entry.details.find((field) => field.label === label)?.value ?? "";
1008
+ function auditLogSummaryWithCollectionLabel(entry, collectionLabel) {
1009
+ const label = collectionLabel.trim();
1010
+ if (!label) return entry.summary;
1011
+ const recordSegment = entry.summary.find((segment) => segment.emphasis === "strong");
1012
+ const suffixSegments = entry.summary.filter(
1013
+ (segment) => segment.emphasis === "none" && /^\(.+\)$/.test(segment.text.trim())
1014
+ );
1015
+ const eventLabel = entry.event[0].toUpperCase() + entry.event.slice(1);
1016
+ return [
1017
+ { text: `${eventLabel} ${label}`, emphasis: "none" },
1018
+ ...recordSegment ? [recordSegment] : [],
1019
+ ...suffixSegments
1020
+ ];
1021
+ }
1022
+ const summaryText = (entry, options = {}) => {
1023
+ const collection = auditLogDetailValue(entry, "Collection");
1024
+ const collectionLabel = collection ? options.collectionLabels?.[collection]?.trim() : "";
1025
+ const summary = collectionLabel ? auditLogSummaryWithCollectionLabel(entry, collectionLabel) : entry.summary;
1026
+ return summary.map((segment) => segment.text).join(" ");
1027
+ };
994
1028
  const protectSpreadsheetCell = (value) => /^[\t\r ]*[=+\-@]/.test(value) ? `'${value}` : value;
995
1029
  const csvCell = (value) => `"${protectSpreadsheetCell(value).replaceAll('"', '""')}"`;
996
- function buildAuditLogCsv(entries) {
1030
+ function buildAuditLogCsv(entries, options = {}) {
997
1031
  const rows = entries.map(
998
1032
  (entry) => [
999
1033
  entry.occurred_at,
@@ -1002,7 +1036,7 @@ function buildAuditLogCsv(entries) {
1002
1036
  entry.actor.type,
1003
1037
  entry.event,
1004
1038
  auditLogDetailValue(entry, "Record ID"),
1005
- summaryText(entry)
1039
+ summaryText(entry, options)
1006
1040
  ].map(csvCell).join(",")
1007
1041
  );
1008
1042
  return [
@@ -1023,8 +1057,8 @@ async function getRecordAuditLogSnapshot(id, store) {
1023
1057
  { method: "GET" }
1024
1058
  );
1025
1059
  }
1026
- async function fetchRecordAuditLogCsv(params, maxRows = AUDIT_LOG_EXPORT_LIMIT) {
1027
- const limit = Math.min(AUDIT_LOG_EXPORT_LIMIT, Math.max(1, Math.trunc(maxRows) || AUDIT_LOG_EXPORT_LIMIT));
1060
+ async function fetchRecordAuditLogCsv(params, maxRows = AUDIT_LOG_EXPORT_LIMIT, options = {}) {
1061
+ const limit = normalizeAuditLogExportLimit(maxRows);
1028
1062
  const entries = [];
1029
1063
  let cursor = "";
1030
1064
  let truncated = false;
@@ -1046,7 +1080,7 @@ async function fetchRecordAuditLogCsv(params, maxRows = AUDIT_LOG_EXPORT_LIMIT)
1046
1080
  }
1047
1081
  cursor = nextCursor;
1048
1082
  }
1049
- return { csv: buildAuditLogCsv(entries), count: entries.length, truncated };
1083
+ return { csv: buildAuditLogCsv(entries, options), count: entries.length, truncated };
1050
1084
  }
1051
1085
  function useAuditLog(collections, filters = {}, options = {}) {
1052
1086
  const normalizedCollections = normalizeRecordAuditCollections(collections);
@@ -1078,6 +1112,7 @@ function useAuditLog(collections, filters = {}, options = {}) {
1078
1112
  });
1079
1113
  return {
1080
1114
  entries: query.data?.pages.flatMap((page) => page.audit_logs) ?? [],
1115
+ collectionStatus: query.data?.pages[0]?.record_collections ?? [],
1081
1116
  error: query.error,
1082
1117
  isLoading: query.isLoading,
1083
1118
  isFetching: query.isFetching,
@@ -1224,11 +1259,13 @@ export {
1224
1259
  useAgentChatSessions as a,
1225
1260
  useAuditLog as b,
1226
1261
  useAutomationRun as c,
1227
- auditLogDetailValue as d,
1228
- auditLogActorLabel as e,
1229
- fetchRecordAuditLogCsv as f,
1262
+ auditLogSummaryWithCollectionLabel as d,
1263
+ auditLogDetailValue as e,
1264
+ auditLogActorLabel as f,
1230
1265
  getRecordAuditLogSnapshot as g,
1231
- AUDIT_LOG_EXPORT_LIMIT as h,
1266
+ normalizeAuditLogFilterState as h,
1267
+ fetchRecordAuditLogCsv as i,
1268
+ normalizeAuditLogExportLimit as j,
1232
1269
  normalizeRecordAuditCollections as n,
1233
1270
  useAgentChat as u
1234
1271
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/ui",
3
- "version": "0.12.0-dev.0",
3
+ "version": "0.12.0-dev.2",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -1,4 +0,0 @@
1
- import { s } from "./RecordSheet-DJoKhb3u.js";
2
- export {
3
- s as Mermaid
4
- };